['我的资产-我的优惠券']

This commit is contained in:
2021-09-17 09:45:15 +08:00
parent 004536faeb
commit e9d6eae051
25 changed files with 27229 additions and 8134 deletions

65
apis/interfaces/mine.js Normal file
View File

@@ -0,0 +1,65 @@
/**
* Web-zdx
* moduleName:个人中心相关操作
*/
import request from '../request.js'
// 关注店铺
const shopSubscribe = (id) => {
return request({
url: 'mall/shops/subscribe/' + id,
method: 'POST'
})
}
// 我的关注店铺列表
const shopSubscribeList = (page) => {
return request({
url: 'mall/shops/subscribe',
method:'get',
data:{
page:page
}
})
}
// 关于我们
const aboutUs = () => {
return request({
url: 'articles/about'
})
}
// 获取用户信息
const getUserInfo = () => {
return request({
url: 'user/info'
})
}
// 获取用户设置中心的信息
const getUserSettingInfo = () => {
return request({
url: 'user/setting'
})
}
// 账号余额等信息
const chaineb = (data) => {
return request({
url: 'user/account/chaineb',
method:'get',
data:data
})
}
export {
shopSubscribe,
shopSubscribeList,
aboutUs,
getUserInfo,
getUserSettingInfo,
chaineb
}

View File

@@ -21,12 +21,10 @@
<view class="coupon-right-des" v-if='item.type.value === 2'>{{item.price_text}}</view>
<view class="coupon-right-day">剩余{{item.time.expire}}</view>
</view>
<view class="coupon-to-used" @click="$router.push({name:'CouponDetail',query:{id:item.coupon_grant_id}})">
去使用
</view>
<view class="coupon-to-used" @click="couponDetailGo(item.coupon_grant_id)"> 去使用 </view>
</view>
</view>
<view class="check-all" v-if="item.coupon_count>2" @click="$router.push({name:'CouponMoreList', query:{id:item.coupon_id}})">
<view class="check-all" v-if="item.coupon_count>2" @click="couponMoreListGo(item.coupon_id)">
查看全部{{item.coupon_count}}张优惠券 <uni-icons type="arrowright" size="16" color="#cacaca"></uni-icons>
</view>
<!-- 已使用未使用标识 -->
@@ -54,11 +52,26 @@
return {
};
},
methods:{
couponDetailGo(id) {
// this.$router.push({name: 'CouponDetail', query: {id: id}})
uni.navigateTo({
url:'/pages/property/coupon/detail?id='+id
})
},
couponMoreListGo(id) {
// this.$router.push({name:'CouponMoreList', query:{id: id}})
uni.navigateTo({
url: '/pages/property/coupon/couponMore?id='+id
})
}
}
}
</script>
<style lang="scss" scoped>
$padding:20rpx;
.coupon-item {
margin: $padding $padding;
position: relative;

View File

@@ -139,6 +139,15 @@
"navigationBarBackgroundColor": "#e93340",
"navigationBarTitleText": "优惠券详情"
}
},{
"path": "pages/property/collection/collection",
"name": "Collection",
"style": {
"enablePullDownRefresh": true,
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#e93340",
"navigationBarTitleText": "收藏的企业"
}
},
{
"path": "pages/goods/details",

View File

@@ -0,0 +1,217 @@
<template>
<view class="Collect-list">
<!--有收藏的店铺 -->
<view class="list-item" v-if="lists.length>0" v-for="(item,index) in lists" :key="index">
<view class="list-top">
<view class="list-top-left">
<image :src="item.cover" mode="aspectFill" class="list-banner"></image>
<view class="shop-info">
<view class="title ellipsis">{{item.name}}</view>
<view class="urate">
<u-rate :current="item.star" size="28rpx" :disabled="true"></u-rate>
</view>
<view class="des">销量:<span>100</span> <span> </span> 库存:<span>2524</span></view>
</view>
</view>
<view class="list-top-right" @click="onOpenWechat(item)">进店逛逛</view>
</view>
<view class="list-bottom">
<view class="list-bottom-item" v-for="(it,idx) in item.goods" :key='idx'>
<image class="goods-img" :src="it.cover" mode="aspectFill" @click="goGoods(it.goods_id)"></image>
<view class="money"> {{it.price.price_min}}</view>
</view>
</view>
</view>
<!-- 没有收藏的店铺 -->
<no-list name='no-shop' v-if="lists.length === 0" txt="您还没有收藏任何企业哦~" />
<!-- <u-toast ref="uToast" /> -->
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
shopSubscribeList
} from '@/apis/interfaces/mine'
export default {
data() {
return {
lists: [],
page: 1,
has_more: true,
};
},
onLoad(e) {
this.getList()
},
onReachBottom() {
if (this.has_more) {
this.page = this.page + 1
this.getGoodsByCompanyidCaregoryid()
} else {
this.$refs.uToast.show({
title: '吼吼吼~我是有底的~',
type: 'primary',
duration: 3000
})
}
},
methods: {
// 获取列表
getList() {
shopSubscribeList(this.page).then(res => {
console.log(res)
this.lists = this.lists.concat(res.data)
if (res.page.has_more) {
this.has_more = true
} else {
this.has_more = false
}
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
type: 'primary',
duration: 3000
})
})
},
// 打开微信小程序
onOpenWechat(e){
plus.share.getServices(res => {
let sweixin = null;
for(let val of res){
if(val.id === 'weixin'){
sweixin = val
}
}
/** 以此为例子 显示跳转引导页
* 'index_4'
* index 跳小程序企业首页
* 4 企业id
**/
if(sweixin != null){
sweixin.launchMiniProgram({
id : e.original_id,
path: 'pages/login/guide?scene=index_' + e.company_id,
})
}else{
uni.showToast({
title: '当前环境不支持打开微信小程序',
icon : 'none'
})
}
})
},
// 跳转商城
goShop(company_id) {
uni.setStorageSync('company_id', company_id)
uni.setStorageSync('refresh',true)
this.$Router.pushTab({
name: 'Goods'
})
},
goGoods(id) {
this.$Router.push({name: 'goodsDetails', query: {id: id}})
}
}
}
</script>
<style lang="scss" scoped>
.Collect-list {
.list-item {
border-top: solid 20rpx #F7F7F7;
padding: 0 30rpx 30rpx 30rpx;
.list-top {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 30rpx 0;
font-size: $title-size*0.94;
border-bottom: solid 1rpx #f7f7f7;
.list-top-left {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
.title {
width: 380rpx;
font-size: $title-size*1;
font-weight: 400;
}
.urate {
padding: 10rpx 0;
}
.des {
// padding-top: $padding*0.8;
font-size: $title-size * 0.8;
color: #999;
span {
color: #666;
padding: 0 10rpx;
}
}
.list-banner {
width: 120rpx;
margin-right: $margin*1.5;
height: 120rpx;
border-radius: 4rpx;
}
}
.list-top-right {
border: solid 1rpx $main-color;
color: $main-color;
display: inline-block;
padding: 8rpx 16rpx;
font-size: $title-size *0.8;
border-radius: 4rpx;
}
}
.list-bottom {
margin-top: 20rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
// padding: 0 30rpx;
.list-bottom-item {
width: 160rpx;
height: 160rpx;
position: relative;
.goods-img {
width: 100%;
height: 100%;
}
.money {
position: absolute;
bottom: 0;
right: 0;
background-color: rgba($color: #000000, $alpha: 0.5);
color: #fff;
padding: 2rpx 8rpx;
font-size: $title-size *0.9;
}
}
}
}
}
</style>

View File

@@ -34,7 +34,7 @@
},
onLoad(e) {
console.log(e)
this.id = this.$route.query.id
this.id = e.id
this.getMyCoupon()
},
onShow() {

View File

@@ -12,9 +12,9 @@
<view class="goods-title" v-if="info.goods.length>0">可用商品 <span
style='font-size: 24rpx;color:gray;'>多选一</span></view>
<view class="goods-item" v-if="info.goods.length>0" v-for="(item,index) in info.goods" :key='index'>
<image :src="item.cover" mode="aspectFill" class="goods-img" @click="$router.push({name:'goodsDetails',query:{id:item.goods_id}})" />
<image :src="item.cover" mode="aspectFill" class="goods-img" @click="goDetail(item.goods_id)" />
<view class="goods-right">
<view class="goods-right-title ellipsis-2" @click="$router.push({name:'goodsDetails',query:{id:item.goods_id}})">{{item.name}}</view>
<view class="goods-right-title ellipsis-2" @click="goDetail(item.goods_id)">{{item.name}}</view>
<view class="goods-right-bottom">
<span class='money'>{{item.price}}</span>
<view class="used" v-if='info.use_way.value=== 1' @click="nowBuy(item)">立即购买</view>
@@ -67,8 +67,7 @@
GoodTemplate
},
onLoad(e) {
console.log(this.$route)
this.coupon_grant_id = this.$route.query.id
this.coupon_grant_id = e.id
this.getList()
},
methods: {
@@ -87,16 +86,14 @@
},
// 点击立即购买去商品确认页面
nowBuy(items) {
console.log(items, 'items....')
let data = {
skuId: items.goods_sku_id,
qty: 1
}
this.$router.push({
name: 'Buy',
params: data
uni.navigateTo({
url:'/pages/order/buy?qty=1&skuId='+items.goods_sku_id,
})
},
goDetail(id){
uni.navigateTo({
url:'/pages/goods/details?id='+id
})
console.log(data)
},
// 点击二维码特效
clickCode(grantid) {
@@ -152,7 +149,7 @@
// 优惠券
.coupon {
margin: 0 $margin * 2;
margin: 0 $margin;
background-color: #Fff;
position: relative;
z-index: 1;
@@ -182,7 +179,7 @@
// 可用商品
.goods-item {
background-color: #fff;
margin: $margin*1.5 $margin * 2;
margin: $margin*1.5 $margin;
border-radius: 20rpx;
display: flex;
flex-direction: row;
@@ -237,18 +234,18 @@
font-size: 34rpx;
font-weight: bold;
text-align: left;
margin: $margin*2;
margin: $margin $margin;
// text-shadow:10rpx 10rpx linear-gradient(to right, #f39e17, #f85b05);
text-shadow: 2rpx 2rpx 10rpx $main-color;
}
// 描述
.describe {
margin: $margin * 2 0;
margin: $margin 0;
.describe-des {
color: #999;
padding: 10rpx $margin * 2;
padding: 10rpx $margin ;
font-size: 28rpx;
}
}

View File

@@ -83,18 +83,18 @@
<!-- 我的权证 -->
<view class="user-group">
<view class="group-flex group-flex-4">
<view class="item">
<image class="item-cover" src="@/static/icons/user_icon_01.png" mode="aspectFill" />
<view class="item-title">商品收藏</view>
</view>
<view class="item">
<view class="item" @click="$Router.push({name:'Collection'})">
<image class="item-cover" src="@/static/icons/user_icon_02.png" mode="aspectFill" />
<view class="item-title">关注企业</view>
<view class="item-title">收藏的企业</view>
</view>
<view class="item" @click="$Router.push({name:'CouponList'})">
<image class="item-cover" src="@/static/icons/user_icon_03.png" mode="aspectFill" />
<view class="item-title">我的优惠券</view>
</view>
<view class="item">
<image class="item-cover" src="@/static/icons/user_icon_01.png" mode="aspectFill" />
<view class="item-title">我的足迹</view>
</view>
<view class="item" @click="$Router.push({name:'AddressList'})">
<image class="item-cover" src="@/static/icons/user_icon_04.png" mode="aspectFill" />
<view class="item-title">地址管理</view>
@@ -141,12 +141,13 @@
</view>
</view>
<!-- 推广海报 -->
<view class="poster-text">推广海报</view>
<carousel :img-list="imgList" url-key="url" @selected="selectedBanner"/>
</block>
<!-- 版权信息 -->
<view class="copyright">易品新境 beta 1.0.0</view>
<view class="copyright" @click="copyright">易品新境 beta 1.0.0</view>
</view>
</template>
@@ -177,6 +178,12 @@
},
selectedBanner(item, index) {
console.log('🥒', item, index)
},
copyright(){
uni.clearStorageSync()
uni.navigateTo({
url:'/pages/login/login'
})
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__CD19AAD","name":"易品新境","version":{"name":"1.0.0","code":"100"},"description":"易品新境为商家提供营销引流工具","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"OAuth":{},"Payment":{},"Share":{},"Geolocation":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":false,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#f5f5f5"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"safearea":{"bottom":{"offset":"none"}},"distribute":{"icons":{"android":{"hdpi":"unpackage/res/icons/72x72.png","xhdpi":"unpackage/res/icons/96x96.png","xxhdpi":"unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"}}},"splashscreen":{"androidStyle":"common"},"google":{"permissions":["<uses-feature android:name=\"android.hardware.camera\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"]},"apple":{},"plugins":{"oauth":{"univerify":{},"weixin":{"appid":"wx222fbe58feee7819","appsecret":"3d24525a636d7573a8fae885097d5cf7","UniversalLinks":""}},"payment":{"weixin":{"__platform__":["android"],"appid":"wx222fbe58feee7819","UniversalLinks":""}},"share":{"weixin":{"appid":"wx222fbe58feee7819","UniversalLinks":""}},"maps":{},"ad":{},"geolocation":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"arguments":"{\"name\":\"\",\"path\":\"\",\"query\":\"\",\"id\":0}","allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"3.1.18","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#bababa","selectedColor":"#e93340","backgroundColor":"#FFFFFF","borderStyle":"rgba(255,255,255,0.4)","list":[{"pagePath":"pages/equity/index","text":"通证权易","iconPath":"static/tabBar/tabBar_icon_00.png","selectedIconPath":"static/tabBar/tabBar_show_00.png"},{"pagePath":"pages/market/index","text":"转让市场","iconPath":"static/tabBar/tabBar_icon_01.png","selectedIconPath":"static/tabBar/tabBar_show_01.png"},{"pagePath":"pages/store/index","text":"企业工具","iconPath":"static/tabBar/tabBar_icon_02.png","selectedIconPath":"static/tabBar/tabBar_show_02.png"},{"pagePath":"pages/property/index","text":"我的资产","iconPath":"static/tabBar/tabBar_icon_03.png","selectedIconPath":"static/tabBar/tabBar_show_03.png"}],"height":"50px","child":["lauchwebview"],"selected":0},"launch_path":"__uniappview.html"}}
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__CD19AAD","name":"易品新境","version":{"name":"1.0.0","code":"100"},"description":"易品新境为商家提供营销引流工具","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"OAuth":{},"Payment":{},"Share":{},"Geolocation":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":false,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#f5f5f5"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"safearea":{"bottom":{"offset":"none"}},"distribute":{"icons":{"android":{"hdpi":"unpackage/res/icons/72x72.png","xhdpi":"unpackage/res/icons/96x96.png","xxhdpi":"unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"}}},"splashscreen":{"androidStyle":"common"},"google":{"permissions":["<uses-feature android:name=\"android.hardware.camera\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"]},"apple":{},"plugins":{"oauth":{"univerify":{},"weixin":{"appid":"wx222fbe58feee7819","appsecret":"3d24525a636d7573a8fae885097d5cf7","UniversalLinks":""}},"payment":{"weixin":{"__platform__":["android"],"appid":"wx222fbe58feee7819","UniversalLinks":""}},"share":{"weixin":{"appid":"wx222fbe58feee7819","UniversalLinks":""}},"maps":{},"ad":{},"geolocation":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"arguments":"{\"name\":\"\",\"path\":\"\",\"query\":\"\",\"id\":0}","allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"3.2.3","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#bababa","selectedColor":"#e93340","backgroundColor":"#FFFFFF","borderStyle":"rgba(255,255,255,0.4)","list":[{"pagePath":"pages/equity/index","text":"通证权易","iconPath":"static/tabBar/tabBar_icon_00.png","selectedIconPath":"static/tabBar/tabBar_show_00.png"},{"pagePath":"pages/market/index","text":"转让市场","iconPath":"static/tabBar/tabBar_icon_01.png","selectedIconPath":"static/tabBar/tabBar_show_01.png"},{"pagePath":"pages/store/index","text":"企业工具","iconPath":"static/tabBar/tabBar_icon_02.png","selectedIconPath":"static/tabBar/tabBar_show_02.png"},{"pagePath":"pages/property/index","text":"我的资产","iconPath":"static/tabBar/tabBar_icon_03.png","selectedIconPath":"static/tabBar/tabBar_show_03.png"}],"height":"50px","child":["lauchwebview"],"selected":0},"launch_path":"__uniappview.html"}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB