会员相关更新、商品列表更新
This commit is contained in:
@@ -1,353 +0,0 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="towcontent">
|
||||
<view class="towcontentlistxitem flex-start">
|
||||
<view class="towcontentlistxitembox flex-colum"
|
||||
:class="towcontentclickindex == index?'towcontentlistxitemboxopacity':''"
|
||||
v-for="(item,index) in listbox" :key="index" @click="towcontentclick(index,item)">
|
||||
<text>{{item.name}}</text>
|
||||
<image v-if="towcontentclickindex == index"
|
||||
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/today/dg.png" mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="containertop">
|
||||
<view class="containertopbox">
|
||||
<view class="containertopboxitem flex-start" v-for="(item,index) in list" :key="index">
|
||||
<view class="containertopboxitemleft flex-colum"
|
||||
:class="item.status == 0?'':'containertopboxitemlefts'">
|
||||
<view class="containertopboxitemleft_one"
|
||||
:class="item.status == 0?'':'containertopboxitemleft_ones'">
|
||||
<text style="font-size: 28rpx;">¥</text>
|
||||
<text>{{item.couponsAmount || 0}}</text>
|
||||
</view>
|
||||
<view class="containertopboxitemleft_tow"
|
||||
:class="item.status == 0?'':'containertopboxitemleft_tows'">
|
||||
优惠券(元)
|
||||
</view>
|
||||
</view>
|
||||
<view class="containertopboxitemright">
|
||||
<view class="containertopboxitemright_one">
|
||||
无门槛使用
|
||||
</view>
|
||||
<view class="containertopboxitemright_tow">
|
||||
通用红包券
|
||||
</view>
|
||||
<view class="containertopboxitemright_there">
|
||||
有效期至:{{$u.timeFormat(item.endTime, 'yyyy/mm/dd') || '0'}}
|
||||
</view>
|
||||
<view
|
||||
:class="item.status == 0?'containertopboxitemright_four':'containertopboxitemright_fours'">
|
||||
{{item.status == 0 ? '兑换积分':'已过期'}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<image style="margin:32rpx auto;" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/nomore.png"
|
||||
v-if="is_end" mode="aspectFill"></image>
|
||||
<u-loadmore :status="form.status" iconSize='24' fontSize='24' height='40' />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
listbox: [{
|
||||
name: '全部',
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: '未使用',
|
||||
type: '0'
|
||||
},
|
||||
{
|
||||
name: '已过期',
|
||||
type: '1'
|
||||
}
|
||||
],
|
||||
towcontentclickindex: 0,
|
||||
list: [],
|
||||
is_end:false,
|
||||
form: {
|
||||
page: 1, //页数
|
||||
size: 10, //页容量
|
||||
status: 'loadmore',
|
||||
statuses: ''
|
||||
},
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.ordermineCouponsthis()
|
||||
},
|
||||
onReachBottom() {
|
||||
this.ordermineCouponsthis()
|
||||
},
|
||||
methods: {
|
||||
init_fn(e) {
|
||||
this.list = []
|
||||
this.form = {
|
||||
page: 1, //页数
|
||||
size: 10, //页容量
|
||||
status: 'loadmore',
|
||||
statuses: ''
|
||||
}
|
||||
try {
|
||||
if (e) {
|
||||
this.form.statuses = e
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
this.ordermineCouponsthis()
|
||||
},
|
||||
async ordermineCouponsthis() {
|
||||
try {
|
||||
let res = await this.api.ordermineCoupons({
|
||||
userId: uni.cache.get('userInfo').id,
|
||||
status: this.form.statuses,
|
||||
page: this.form.page,
|
||||
size: this.form.size,
|
||||
orderId:""
|
||||
})
|
||||
if (res.data.pages < this.form.page) {
|
||||
this.form.status = 'nomore'
|
||||
if (this.form.page == 1 && res.data.list == 0) {
|
||||
this.is_end = true
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
this.form.status = 'loading';
|
||||
this.form.page = ++this.form.page;
|
||||
setTimeout(() => {
|
||||
this.list = [...this.list, ...res.data.list];
|
||||
this.form.status = 'loading';
|
||||
if (res.data.pageNum == res.data.pages) {
|
||||
this.form.status = 'nomore';
|
||||
} else {
|
||||
this.form.status = 'loading';
|
||||
}
|
||||
}, 500)
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
},
|
||||
towcontentclick(index, item) {
|
||||
this.towcontentclickindex = index
|
||||
this.form.statuses = item.type
|
||||
this.init_fn(item.type)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
page {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.container {
|
||||
.towcontent {
|
||||
padding: 0 28rpx;
|
||||
border-top: 16rpx solid #F9F9F9;
|
||||
|
||||
.towcontentlistxitem {
|
||||
width: 100%;
|
||||
margin-top: 32rpx;
|
||||
|
||||
.towcontentlistxitembox {
|
||||
width: 33%;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
|
||||
image {
|
||||
margin-top: 6rpx;
|
||||
width: 38.83rpx;
|
||||
height: 8.62rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentlistxitemboxopacity {
|
||||
width: 33%;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
|
||||
image {
|
||||
width: 38.83rpx;
|
||||
height: 8.62rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.containertop {
|
||||
padding: 40rpx 32rpx;
|
||||
|
||||
.containertopbox {
|
||||
.containertopboxitem::after {
|
||||
position: absolute;
|
||||
bottom: 14rpx;
|
||||
left: 14rpx;
|
||||
content: '';
|
||||
display: inline-block;
|
||||
background: url(https://czg-qr-order.oss-cn-beijing.aliyuncs.com/coupontop.png) no-repeat;
|
||||
width: 72.83rpx;
|
||||
height: 77.14rpx;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.containertopboxitem {
|
||||
margin-top: 20rpx;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
|
||||
.containertopboxitemleft {
|
||||
position: relative;
|
||||
width: 182rpx;
|
||||
height: 192rpx;
|
||||
background: #F1CB66;
|
||||
border-radius: 18rpx 0rpx 0rpx 18rpx;
|
||||
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
|
||||
|
||||
::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0rpx;
|
||||
left: 166rpx;
|
||||
background: #f9f9f9;
|
||||
display: inline-block;
|
||||
width: 32rpx;
|
||||
height: 16rpx;
|
||||
border-radius: 0 0 32rpx 32rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 0rpx;
|
||||
left: 166rpx;
|
||||
background: #f9f9f9;
|
||||
display: inline-block;
|
||||
width: 32rpx;
|
||||
height: 16rpx;
|
||||
line-height: 32rpx;
|
||||
border-radius: 32rpx 32rpx 0 0;
|
||||
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(255, 255, 255, 0.16);
|
||||
z-index: 999;
|
||||
|
||||
}
|
||||
|
||||
.containertopboxitemleft_one {
|
||||
text {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 60rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
.containertopboxitemleft_ones {
|
||||
text {
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.containertopboxitemleft_tow {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.containertopboxitemleft_tows {
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.containertopboxitemlefts {
|
||||
background: #F7F7F7;
|
||||
}
|
||||
|
||||
.containertopboxitemright {
|
||||
position: relative;
|
||||
padding: 0 32rpx;
|
||||
flex: auto;
|
||||
height: 192rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
|
||||
border-radius: 0rpx 18rpx 18rpx 0rpx;
|
||||
|
||||
.containertopboxitemright_one {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
padding: 12rpx 0;
|
||||
border-bottom: 1rpx dotted #707070;
|
||||
}
|
||||
|
||||
.containertopboxitemright_tow {
|
||||
margin-top: 14rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.containertopboxitemright_there {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.containertopboxitemright_four {
|
||||
position: absolute;
|
||||
right: 32rpx;
|
||||
top: 50%;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #FFFFFF;
|
||||
padding: 0 14rpx;
|
||||
height: 48rpx;
|
||||
line-height: 48rpx;
|
||||
text-align: center;
|
||||
background: #FE665E;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
}
|
||||
|
||||
.containertopboxitemright_fours {
|
||||
position: absolute;
|
||||
right: 32rpx;
|
||||
top: 50%;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
padding: 0 14rpx;
|
||||
height: 48rpx;
|
||||
line-height: 48rpx;
|
||||
text-align: center;
|
||||
background: #F7F7F7;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -12,6 +12,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="containertop">
|
||||
<view class="containertopbox">
|
||||
<view class="containertopboxitem flex-start" v-for="(item,index) in list" :key="index">
|
||||
@@ -32,15 +33,16 @@
|
||||
无门槛使用
|
||||
</view>
|
||||
<view class="containertopboxitemright_tow">
|
||||
通用红包券
|
||||
<view>通用红包券</view>
|
||||
<view
|
||||
:class="item.status == 0?'containertopboxitemright_four containertopboxitemright_btn':'containertopboxitemright_fours containertopboxitemright_btn'">
|
||||
{{item.status == 0 ? '去使用':'已过期'}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="containertopboxitemright_there">
|
||||
有效期至:{{$u.timeFormat(item.endTime, 'yyyy/mm/dd') || '0'}}
|
||||
</view>
|
||||
<view
|
||||
:class="item.status == 0?'containertopboxitemright_four':'containertopboxitemright_fours'">
|
||||
{{item.status == 0 ? '兑换积分':'已过期'}}
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<image style="margin:32rpx auto;" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/nomore.png"
|
||||
@@ -191,6 +193,7 @@
|
||||
.containertop {
|
||||
padding: 40rpx 32rpx;
|
||||
.containertopbox {
|
||||
margin-top: 8rpx;
|
||||
.containertopboxitem::after {
|
||||
position: absolute;
|
||||
bottom: 14rpx;
|
||||
@@ -204,7 +207,7 @@
|
||||
}
|
||||
|
||||
.containertopboxitem {
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 32rpx;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
|
||||
@@ -212,7 +215,7 @@
|
||||
position: relative;
|
||||
width: 182rpx;
|
||||
height: 192rpx;
|
||||
background: #F1CB66;
|
||||
background: #E3AD7F;
|
||||
border-radius: 18rpx 0rpx 0rpx 18rpx;
|
||||
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
|
||||
|
||||
@@ -287,19 +290,21 @@
|
||||
|
||||
.containertopboxitemright_one {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-weight: bold;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
padding: 12rpx 0;
|
||||
padding: 16rpx 0 16rpx 0;
|
||||
border-bottom: 1rpx dotted #707070;
|
||||
}
|
||||
|
||||
.containertopboxitemright_tow {
|
||||
margin-top: 14rpx;
|
||||
margin-top: 18rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.containertopboxitemright_there {
|
||||
@@ -308,37 +313,23 @@
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.containertopboxitemright_four {
|
||||
position: absolute;
|
||||
right: 32rpx;
|
||||
top: 50%;
|
||||
|
||||
.containertopboxitemright_btn{
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #FFFFFF;
|
||||
padding: 0 14rpx;
|
||||
height: 48rpx;
|
||||
line-height: 48rpx;
|
||||
text-align: center;
|
||||
background: #FE665E;
|
||||
padding: 8rpx 22rpx;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
}
|
||||
|
||||
.containertopboxitemright_four {
|
||||
color: #FFFFFF;
|
||||
background: #333;
|
||||
}
|
||||
|
||||
.containertopboxitemright_fours {
|
||||
position: absolute;
|
||||
right: 32rpx;
|
||||
top: 50%;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
padding: 0 14rpx;
|
||||
height: 48rpx;
|
||||
line-height: 48rpx;
|
||||
text-align: center;
|
||||
background: #F7F7F7;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,12 +21,17 @@
|
||||
<view class="list_item">
|
||||
<view class="list_item_left">账号</view>
|
||||
<view class="list_item_right ">
|
||||
<button open-type="getPhoneNumber" @getphonenumber="getPhone">
|
||||
<button v-if="!mobile" open-type="getPhoneNumber" @getphonenumber="getPhone">
|
||||
<view class="flex-colum-end">
|
||||
<view class="text">{{phonetitle || '请授权手机号'}}</view>
|
||||
<view class="place" v-if="phonetitle">绑定的手机号不能修改</view>
|
||||
<view class="text">请授权手机号</view>
|
||||
</view>
|
||||
</button>
|
||||
<view v-else >
|
||||
<view class="flex-colum-end">
|
||||
<view class="text">{{phonetitle }}</view>
|
||||
<view class="place">绑定的手机号不能修改</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list_item">
|
||||
@@ -64,7 +69,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="save" @click="sumbit">保存</view>
|
||||
<view class="save active" @click="$u.debounce(sumbit, 500)">保存</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -104,6 +109,7 @@
|
||||
userHeadImg: "",
|
||||
nickName: '',
|
||||
birthDay: "",
|
||||
mobile: "",
|
||||
phonetitle: ""
|
||||
};
|
||||
},
|
||||
@@ -120,6 +126,7 @@
|
||||
}
|
||||
this.birthDay = this.userInfo.birthDay;
|
||||
this.phonetitle = this.userInfo.telephone ? (this.userInfo.telephone.substr(0, 3) + "****" + this.userInfo.telephone.substr(7)) : ""
|
||||
this.mobile = this.userInfo.telephone;
|
||||
this.date = this.getDate({ format: true})
|
||||
},
|
||||
|
||||
@@ -163,9 +170,6 @@
|
||||
* @param {Object} d
|
||||
*/
|
||||
async getPhone(d) {
|
||||
if ( this.phonetitle ) {
|
||||
return;
|
||||
}
|
||||
if (d.detail.iv) {
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
@@ -176,7 +180,8 @@
|
||||
encryptedData: d.detail.encryptedData,
|
||||
iv: d.detail.iv,
|
||||
})
|
||||
this.phonetitle = res.data
|
||||
this.phonetitle = res.data.substr(0, 3) + "****" + res.data.substr(7)
|
||||
this.mobile = res.data;
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -243,7 +248,7 @@
|
||||
nickName: this.nickName,
|
||||
sex: this.sex,
|
||||
birthDay: this.birthDay,
|
||||
telephone: this.phonetitle == '请授权手机号' ? '' : this.phonetitle
|
||||
telephone: this.mobile,
|
||||
})
|
||||
if (res.code == 0) {
|
||||
uni.navigateBack()
|
||||
@@ -305,6 +310,7 @@
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
button{
|
||||
outline: none;
|
||||
text{
|
||||
color: #fff!important;
|
||||
}
|
||||
@@ -312,6 +318,9 @@
|
||||
button::after{
|
||||
border: none;
|
||||
}
|
||||
button:active {
|
||||
background-color: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -320,7 +329,7 @@
|
||||
height: 96rpx;
|
||||
line-height: 96rpx;
|
||||
text-align: center;
|
||||
background: #E0E0E0;
|
||||
background-color: #E0E0E0;
|
||||
border-radius: 48rpx;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
@@ -331,6 +340,10 @@
|
||||
right: 0;
|
||||
margin: auto;
|
||||
}
|
||||
.save.active{
|
||||
background-color: #E3AD7F;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,227 +0,0 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view v-if="isPwd == 0">
|
||||
<view class="contenttext flex-center">
|
||||
{{form.password.length == 6?'请再次确认支付密码':"请设置新密码,用于支付验证"}}
|
||||
</view>
|
||||
<view class="contentbox flex-between">
|
||||
<view class="contentboxitem flex-colum">
|
||||
{{consumeFee.slice(0,1)}}
|
||||
</view>
|
||||
<view class="contentboxitem flex-colum">
|
||||
{{consumeFee.slice(1,2)}}
|
||||
</view>
|
||||
<view class="contentboxitem flex-colum">
|
||||
{{consumeFee.slice(2,3)}}
|
||||
</view>
|
||||
<view class="contentboxitem flex-colum">
|
||||
{{consumeFee.slice(3,4)}}
|
||||
</view>
|
||||
<view class="contentboxitem flex-colum">
|
||||
{{consumeFee.slice(4,5)}}
|
||||
</view>
|
||||
<view class="contentboxitem flex-colum">
|
||||
{{consumeFee.slice(5,6)}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-else>
|
||||
|
||||
</view>
|
||||
|
||||
<cwx-keyboard ref="keyboard" v-if="isPwd == 0" @confirmEvent="confirmEvent"
|
||||
:money.sync="consumeFee"></cwx-keyboard>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import cwxKeyboard from '@/components/cwx-keyboard/cwx-keyboard';
|
||||
export default {
|
||||
components: {
|
||||
cwxKeyboard
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isPwd: uni.cache.get('userInfo').isPwd,
|
||||
form: {
|
||||
mobile: uni.cache.get('userInfo').telephone,
|
||||
password: '', //密码
|
||||
payPassword: '', //二次密码
|
||||
checkCode: ''
|
||||
},
|
||||
passwords: false,
|
||||
payPasswords: false,
|
||||
// 注册定时器 初始值
|
||||
second: 60,
|
||||
showText: true,
|
||||
Recapture: '发送验证码',
|
||||
consumeFee: '', //第一遍
|
||||
consumeFees: '', //第二遍
|
||||
money: '',
|
||||
showoverlay: true
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
if (uni.cache.get('userInfo').isPwd != 0) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: '忘记支付密码', // 标题文本,必须是字符串
|
||||
});
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
consumeFee(newVal, oldVal) {
|
||||
if (this.form.password.length == 6) {
|
||||
this.form.payPassword = newVal
|
||||
if (this.form.payPassword.length == 6) {
|
||||
this.userInfosavePayPassword()
|
||||
}
|
||||
} else {
|
||||
this.form.password = newVal
|
||||
if (this.form.password.length == 6) {
|
||||
this.$refs.keyboard._handleClearKey() //清空
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
confirmEvent(e) {
|
||||
console.log(e)
|
||||
},
|
||||
async CodeRegister() {
|
||||
const res = await this.api.phoneValidateCode({
|
||||
// post 手机验证码
|
||||
phone: this.form.mobile
|
||||
});
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: '验证码获取成功',
|
||||
icon: 'none'
|
||||
});
|
||||
// 定时器
|
||||
this.showText = false;
|
||||
this.Recapture = '重新获取';
|
||||
var interval = setInterval(() => {
|
||||
let times = --this.second;
|
||||
this.second = times < 10 ? '0' + times : times; //小于10秒补 0
|
||||
}, 1000);
|
||||
setTimeout(() => {
|
||||
clearInterval(interval);
|
||||
this.second = 60;
|
||||
this.showText = true;
|
||||
}, 60000);
|
||||
}
|
||||
},
|
||||
async loginwxuserInfo() {
|
||||
let res = await this.api.loginwxuserInfo({
|
||||
userId: uni.cache.get('userInfo').id
|
||||
})
|
||||
if (res.code == 0) {
|
||||
uni.cache.set('userInfo', res.data);
|
||||
}
|
||||
},
|
||||
async userInfosavePayPassword() {
|
||||
if (this.form.mobile.length != 11 && this.isPwd == 0) {
|
||||
uni.showToast({
|
||||
title: '手机号必须是11位',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.password == null || this.form.password == '') {
|
||||
uni.showToast({
|
||||
title: '请输入密码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.payPassword == null || this.form.payPassword == '') {
|
||||
uni.showToast({
|
||||
title: '请输入确认密码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.password.length != 6 || this.form.payPassword.length != 6) {
|
||||
uni.showToast({
|
||||
title: '密码必须是6位',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.payPassword != this.form.password) {
|
||||
this.$refs.keyboard._handleClearKey() //清空
|
||||
this.form.payPassword = ''
|
||||
this.form.password = ''
|
||||
uni.showToast({
|
||||
title: '密码和确认密码不一致',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.checkCode == null || this.form.checkCode == '') {
|
||||
uni.showToast({
|
||||
title: '请输入验证码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
let res = await this.api.loginresetPwd({
|
||||
pwd: this.form.password,
|
||||
code: this.form.checkCode
|
||||
})
|
||||
|
||||
if (res.code == 0) {
|
||||
if (uni.cache.get('userInfo').isPwd != 0) {
|
||||
uni.showToast({
|
||||
title: '修改成功',
|
||||
icon: 'none'
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '设置成功',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
// 获取用户信息
|
||||
this.loginwxuserInfo()
|
||||
setTimeout(() => {
|
||||
uni.navigateBack();
|
||||
}, 1000);
|
||||
} else {
|
||||
this.$refs.keyboard._handleClearKey() //清空
|
||||
this.form.payPassword = ''
|
||||
this.form.password = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.content {
|
||||
height: 100%;
|
||||
background: #FFFFFF;
|
||||
|
||||
.contenttext {
|
||||
padding: 48rpx 0;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 40rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.contentbox {
|
||||
margin-top: 48rpx;
|
||||
padding: 0 56rpx;
|
||||
|
||||
.contentboxitem {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
border: 2rpx solid #999999;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -1,384 +0,0 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- <view class="user-info-wrap" @click="clickinformation">
|
||||
<view style="width: 108rpx; height: 108rpx;border-radius: 50%;">
|
||||
<image style="width: 108rpx; height: 108rpx; border-radius: 50%;" v-if="userInfo.headImg"
|
||||
:src="userInfo.headImg" mode="aspectFill">
|
||||
</image>
|
||||
<image style="width: 108rpx; height: 108rpx; border-radius: 50%;" v-else src="@/static/avatar.png"
|
||||
mode="aspectFill">
|
||||
</image>
|
||||
</view>
|
||||
<view class="info flex-colum-start">
|
||||
<text class="phone">{{userInfo.nickName || '无'}}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<navseat :opacity='opacity' class="navseat" title='个人中心' :iconshow="false" :titleshow='true'></navseat>
|
||||
<view class="boxtop">
|
||||
<!-- #ifndef MP-WEIXIN -->
|
||||
<view :style="{'height':Topdistance+'px'}"></view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view :style="{'height':HeighT.customBar+HeighT.heightBar+'px'}"></view>
|
||||
<!-- #endif -->
|
||||
<view class="boxtop_top flex-between">
|
||||
<view class="boxtop_topleft">
|
||||
<view class="flex-start" v-if="userInfo" @click="clickinformation">
|
||||
<image style="width: 108rpx; height: 108rpx; border-radius: 50%;" v-if="userInfo.headImg"
|
||||
:src="userInfo.headImg" mode="aspectFill">
|
||||
</image>
|
||||
<text>{{userInfo.nickName || '无'}}</text>
|
||||
</view>
|
||||
<view class="flex-start" v-else @click="loginClick">
|
||||
<text>去登录</text>
|
||||
</view>
|
||||
</view>
|
||||
<image style="width: 44rpx; height: 42.26rpx;" @click="clickphone()"
|
||||
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/user/kf.png" mode="aspectFill">
|
||||
</view>
|
||||
|
||||
<image @click="memberlist" class="boxtop_botton"
|
||||
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/user/member.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="userinfoone" v-if="teblist.length!=0">
|
||||
<view class="userinfoonebox">
|
||||
<view class="userinfooneboxitem flex-between" @click="clickinfo(item,index)"
|
||||
v-for="(item,index) in teblist" :key="index">
|
||||
<view class="userinfooneboxitemleft flex-start">
|
||||
<image :src="item.shareImg" mode="aspectFill"></image>
|
||||
<text>{{item.name}}</text>
|
||||
</view>
|
||||
<u-icon name="arrow-right" color="#575B66" size="28"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<listitem :list='list' v-if="list.length!=0"></listitem>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uploadImage from "@/js_sdk/yushijie-ossutil/ossutil/uploadFile.js";
|
||||
import listitem from "@/components/listitem.vue";
|
||||
import navseat from '@/components/navseat.vue'
|
||||
export default {
|
||||
components: {
|
||||
listitem,
|
||||
navseat
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
titlename: '个人中心',
|
||||
opacity: false,
|
||||
userInfo: {},
|
||||
teblist: [],
|
||||
list: [],
|
||||
Topdistance: '',
|
||||
};
|
||||
},
|
||||
onLoad() {},
|
||||
computed: {
|
||||
HeighT() { //手机类型的尺寸
|
||||
return this.$store.getters.is_BarHeight
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
setTimeout(() => {
|
||||
this.$nextTick(() => {
|
||||
this.GetTop()
|
||||
});
|
||||
}, 1000)
|
||||
// 当组件挂载完成后获取距离
|
||||
|
||||
},
|
||||
onPageScroll(e) {
|
||||
if (e.scrollTop <= 44) { //搜索导航栏
|
||||
this.opacity = false
|
||||
} else {
|
||||
this.opacity = true
|
||||
}
|
||||
|
||||
},
|
||||
onShow() {
|
||||
if (uni.cache.get('token')) {
|
||||
this.init_fn()
|
||||
this.loginwxuserInfo()
|
||||
this.tbPlatformDict()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickphone() {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: uni.cache.get('userInfo').custPhone
|
||||
});
|
||||
},
|
||||
clickinformation() {
|
||||
uni.pro.navigateTo('user/information')
|
||||
},
|
||||
//获取元素距离顶部的距离
|
||||
GetTop() {
|
||||
this.$u.getRect('.content').then(res => {
|
||||
console.log(1111, res)
|
||||
this.Topdistance = res.height //滚动距离
|
||||
})
|
||||
},
|
||||
memberlist() {
|
||||
if (uni.cache.get('token')) {
|
||||
uni.pro.navigateTo('member/list')
|
||||
} else {
|
||||
this.loginClick()
|
||||
}
|
||||
},
|
||||
//退出登录
|
||||
boxClick() {
|
||||
uni.showModal({
|
||||
title: '注意',
|
||||
content: '确定要退出登录吗?',
|
||||
success: async (res) => {
|
||||
if (res.confirm) {
|
||||
try {
|
||||
await this.api.loginOut();
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
uni.cache.clear();
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
loginClick() {
|
||||
uni.cache.clear();
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
});
|
||||
},
|
||||
// 精选推荐
|
||||
// 下面初始数据
|
||||
init_fn() {
|
||||
this.list = []
|
||||
this.form = {
|
||||
address: uni.cache.get('getLocationstorage').address, //地址
|
||||
lng: uni.cache.get('getLocationstorage').lng,
|
||||
lat: uni.cache.get('getLocationstorage').lat,
|
||||
type: '', //品类
|
||||
orderBy: 5, //0.今日上新 1.离我最近 2.销量优先 3.价格优先 4.热榜推荐
|
||||
other: '', //附近1KM 1选中 0不选中
|
||||
page: 1, //页数
|
||||
size: 10, //页容量
|
||||
dateType: '',
|
||||
status: 'loadmore'
|
||||
}
|
||||
this.onLoadlist()
|
||||
},
|
||||
async onLoadlist() {
|
||||
try {
|
||||
let res = await this.api.indexlist(this.form)
|
||||
if (res.data.pages < this.form.page) {
|
||||
this.form.status = 'nomore'
|
||||
return false;
|
||||
} else {
|
||||
this.form.status = 'loading';
|
||||
this.form.page = ++this.form.page;
|
||||
setTimeout(() => {
|
||||
this.list = [...this.list, ...res.data.list];
|
||||
this.form.status = 'loading';
|
||||
if (res.data.pageNum == res.data.pages) {
|
||||
this.form.status = 'nomore';
|
||||
} else {
|
||||
this.form.status = 'loading';
|
||||
}
|
||||
}, 500)
|
||||
}
|
||||
} catch (e) {}
|
||||
},
|
||||
clickinfo(item, index) {
|
||||
switch (item.jumpType) {
|
||||
case 'scan': //特殊处理点击
|
||||
switch (item.value) {
|
||||
case 'loginOut':
|
||||
this.boxClick()
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'scan_applet':
|
||||
uni.navigateToMiniProgram(JSON.parse(item.value))
|
||||
break
|
||||
case 'relative': //内部页面
|
||||
uni.pro.navigateTo(item.absUrl)
|
||||
break;
|
||||
case 'absolute': //外链url
|
||||
uni.navigateTo({
|
||||
url: `/pages/webview/webview?url=${item.menuUrl}`
|
||||
});
|
||||
break;
|
||||
}
|
||||
},
|
||||
async loginwxuserInfo() {
|
||||
let res = await this.api.loginwxuserInfo({
|
||||
userId: uni.cache.get('userInfo').id
|
||||
})
|
||||
if (res.code == 0) {
|
||||
uni.cache.set('userInfo', res.data);
|
||||
this.userInfo = uni.cache.get('userInfo')
|
||||
}
|
||||
},
|
||||
async tbPlatformDict() {
|
||||
let res = await this.api.tbPlatformDict({
|
||||
type: 'ownMenu'
|
||||
})
|
||||
// console.log(res)
|
||||
if (res.code == 0) {
|
||||
this.teblist = res.data
|
||||
}
|
||||
},
|
||||
// / 更换头像
|
||||
onChooseAvatar(e) {
|
||||
uni.showLoading({
|
||||
title: '上传中',
|
||||
mask: true
|
||||
})
|
||||
console.log(e.detail.avatarUrl)
|
||||
let file = e.detail.avatarUrl;
|
||||
uploadImage(file, 'avatar',
|
||||
result => {
|
||||
//将上传后的图片以对象(官方要求的格式)的形式存入uni-file-picker的value值imageValue(imageValue值的结构为数组包对象)用于图片回显
|
||||
// let objAge = {
|
||||
// 'url': result,
|
||||
// 'extname': 'png',
|
||||
// 'name': 'imgss.png'
|
||||
// };
|
||||
// this.userlist.avatar.push(objAge)
|
||||
this.userInfo.avatar = result
|
||||
console.log(this.userInfo.avatar)
|
||||
uni.hideLoading()
|
||||
}, result => {
|
||||
uni.hideLoading()
|
||||
})
|
||||
},
|
||||
orderHandle(type) {
|
||||
this.useStorage.set('orderType', type);
|
||||
uni.switchTab({
|
||||
url: '/pages/order/order'
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.user-info-wrap {
|
||||
position: relative;
|
||||
padding: 48rpx 32rpx 88rpx 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 750rpx;
|
||||
background: #FFD158;
|
||||
border-radius: 0rpx 0rpx 40rpx 0rpx;
|
||||
|
||||
.info {
|
||||
flex: 1;
|
||||
padding-left: $paddingSize;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.name {
|
||||
input {
|
||||
text-align: left;
|
||||
font-size: 32upx;
|
||||
}
|
||||
}
|
||||
|
||||
.phone {
|
||||
padding-top: 8upx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.user-info-wrap::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
bottom: 40rpx;
|
||||
right: 0;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
text-align: center;
|
||||
background-image: radial-gradient(40rpx at 0px 0px, rgba(0, 0, 0, 0) 40rpx, #fff 40rpx);
|
||||
}
|
||||
|
||||
.boxtop {
|
||||
width: 100%;
|
||||
height: 542rpx;
|
||||
background: url(https://czg-qr-order.oss-cn-beijing.aliyuncs.com/user/user.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
position: relative;
|
||||
|
||||
.boxtop_top {
|
||||
padding: 0 32rpx;
|
||||
margin-top: 52rpx;
|
||||
|
||||
.boxtop_topleft {
|
||||
.flex-start {
|
||||
text {
|
||||
margin-left: 18rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.boxtop_botton {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: 0;
|
||||
transform: translatex(-50%);
|
||||
width: 654rpx;
|
||||
height: 160rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.userinfoone {
|
||||
position: relative;
|
||||
padding: 48rpx 28rpx;
|
||||
width: 100%;
|
||||
// top: -40rpx;
|
||||
background: #F6F6F6;
|
||||
// border-radius: 40rpx 0 0rpx 0rpx;
|
||||
|
||||
.userinfoonebox {
|
||||
padding: 32rpx 20rpx 32rpx 52rpx;
|
||||
border-radius: 22rpx;
|
||||
background: #FFFFFF;
|
||||
width: 100%;
|
||||
|
||||
.userinfooneboxitem {
|
||||
width: 100%;
|
||||
margin-top: 32rpx;
|
||||
|
||||
.userinfooneboxitemleft {
|
||||
image {
|
||||
width: 41.33rpx;
|
||||
height: 36.9rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
margin-left: 32rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.userinfooneboxitem:nth-child(1) {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -8,8 +8,8 @@
|
||||
<image class="my_info_left_head" :src="userInfo.headImg" mode="aspectFill"></image>
|
||||
<view class="name">{{userInfo.nickName || '无'}}</view>
|
||||
</view>
|
||||
<image class="my_info_right_qr" v-if="userInfo" :src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_qRcode.png'" mode="aspectFill"></image>
|
||||
<view class="my_info_right" v-else>
|
||||
<image class="my_info_right_qr" @click="clickEvent" v-if="shopInfo.isVip!=0" :src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_qRcode.png'" mode="aspectFill"></image>
|
||||
<view class="my_info_right" @click="clickEvent" v-else>
|
||||
<text>免费入会</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -57,18 +57,19 @@
|
||||
teblist: [],
|
||||
myAssetsList: [
|
||||
{ name: "储值", type: "recharge", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/storedValue.png"},
|
||||
{ name: "积分", type: "", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/points.png"},
|
||||
// { name: "积分", type: "", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/points.png"},
|
||||
{ name: "优惠券", type: "my_coupon", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/coupon.png"},
|
||||
{ name: "权益卡", type: "", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/equityCard.png"}
|
||||
// { name: "权益卡", type: "", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/equityCard.png"}
|
||||
],
|
||||
myFunList: [
|
||||
{ name: "我的优惠券", type: "my_coupon", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_coupon.png"},
|
||||
{ name: "我的订单", type: "my_order", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_order.png"},
|
||||
{ name: "收货地址", type: "", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_address.png"},
|
||||
// { name: "收货地址", type: "", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_address.png"},
|
||||
{ name: "个人资料", type: "my_info", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/personal.png"},
|
||||
{ name: "我的会员卡", type: "my_member", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_member.png"},
|
||||
{ name: "关于", type: "", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/inRegard.png"},
|
||||
// { name: "关于", type: "", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/inRegard.png"},
|
||||
],
|
||||
shopInfo: {},
|
||||
};
|
||||
},
|
||||
onLoad() {},
|
||||
@@ -82,13 +83,23 @@
|
||||
},
|
||||
|
||||
onShow() {
|
||||
if (uni.cache.get('token')) {
|
||||
this.init_fn()
|
||||
this.loginwxuserInfo()
|
||||
this.tbPlatformDict()
|
||||
this.init_fn()
|
||||
this.loginwxuserInfo()
|
||||
if (uni.cache.get('shopUser') ) {
|
||||
this.getShopInfo();
|
||||
} else{
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 下面初始数据
|
||||
init_fn() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
*/
|
||||
async loginwxuserInfo() {
|
||||
let res = await this.api.loginwxuserInfo({
|
||||
userId: uni.cache.get('userInfo').id
|
||||
@@ -98,6 +109,8 @@
|
||||
this.userInfo = uni.cache.get('userInfo')
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
async tbPlatformDict() {
|
||||
let res = await this.api.tbPlatformDict({
|
||||
type: 'ownMenu'
|
||||
@@ -107,10 +120,7 @@
|
||||
this.teblist = res.data
|
||||
}
|
||||
},
|
||||
// 下面初始数据
|
||||
init_fn() {
|
||||
|
||||
},
|
||||
clickphone() {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: uni.cache.get('userInfo').custPhone
|
||||
@@ -123,8 +133,54 @@
|
||||
url: '/pages/login/login'
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取店铺信息
|
||||
*/
|
||||
async getShopInfo() {
|
||||
let res = await this.api.shopUserInfo({
|
||||
"shopId": uni.cache.get('shopUser'),
|
||||
"userId": uni.cache.get('userInfo').id,
|
||||
})
|
||||
if (res.code == 0) {
|
||||
this.shopInfo = res.data
|
||||
}
|
||||
if ( res.data.isVip == 0 ) {
|
||||
this.memberOpen = true;
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 查看二维码
|
||||
*/
|
||||
clickEvent() {
|
||||
if (uni.cache.get('shopUser') && uni.cache.get('token')) {
|
||||
if ( this.shopInfo.isVip == 0 ) {
|
||||
uni.pro.navigateTo('member/memberdetails', {
|
||||
shopId_id: uni.cache.get('shopUser')
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/pay_code/pay_code?shopInfo=' + JSON.stringify(this.shopInfo)
|
||||
})
|
||||
}
|
||||
} else{
|
||||
uni.pro.navigateTo('member/list', {
|
||||
type: 'user_payCode'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
clickTo(item, index) {
|
||||
let shopId = null;
|
||||
if (uni.cache.get('shopUser') && uni.cache.get('token')) {
|
||||
shopId = uni.cache.get('shopUser');
|
||||
} else{
|
||||
|
||||
}
|
||||
switch (item.type) {
|
||||
case 'my_order':
|
||||
uni.switchTab({
|
||||
@@ -132,14 +188,20 @@
|
||||
});
|
||||
break
|
||||
case 'my_member':
|
||||
if (uni.cache.get('token')) {
|
||||
uni.pro.navigateTo('member/list')
|
||||
} else {
|
||||
this.loginClick()
|
||||
}
|
||||
uni.pro.navigateTo('member/list')
|
||||
break
|
||||
case 'recharge':
|
||||
uni.pro.navigateTo('member/index')
|
||||
if (uni.cache.get('shopUser') && uni.cache.get('token')) {
|
||||
uni.pro.navigateTo('member/index', {
|
||||
shopId: uni.cache.get('shopUser'),
|
||||
type: 'index',
|
||||
})
|
||||
} else{
|
||||
uni.pro.navigateTo('member/list', {
|
||||
type: 'user_recharge'
|
||||
})
|
||||
}
|
||||
|
||||
break
|
||||
case 'my_coupon': //内部页面
|
||||
uni.pro.navigateTo('user/coupon')
|
||||
@@ -238,7 +300,7 @@
|
||||
}
|
||||
.my_assets_list{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
justify-content: space-around;
|
||||
padding: 0 38rpx;
|
||||
.my_list_item{
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user