diff --git a/App.vue b/App.vue
index fee1d6b..dc2925f 100644
--- a/App.vue
+++ b/App.vue
@@ -8,7 +8,6 @@
uni.cache.set('menuInfo', uni.getMenuButtonBoundingClientRect());
// #endif
uni.cache.set('NAME', '零点八零');
- this.userlogin()
},
onLoad() {
},
diff --git a/components/navseat.vue b/components/navseat.vue
index 33d185a..e5308fc 100644
--- a/components/navseat.vue
+++ b/components/navseat.vue
@@ -12,23 +12,36 @@
+ :style="{'height':HeighT.customBar + ( (HeighT.heightBar - systemInfo.statusBarHeight)*2 )+'px','marginTop': ( HeighT.heightBar - (HeighT.heightBar - systemInfo.statusBarHeight))+'px','padding-right':HeighT.custwidth + 'px'}">
-
-
+
+
+
+
+
+
+
+
+
-
+
@@ -46,7 +59,10 @@
-
+
+
+
+
-
-
\ No newline at end of file
diff --git a/pages/member/billDetails.vue b/pages/member/billDetails.vue
index aec7806..d211b81 100644
--- a/pages/member/billDetails.vue
+++ b/pages/member/billDetails.vue
@@ -21,17 +21,22 @@
-
-
-
- {{item.biz_name}}
- {{item.type}}{{item.amount}}
+
+
+
+
+
+ {{item.biz_name}}
+ {{item.type}}{{item.amount}}
+
+
+
+
+ {{$u.timeFormat(item.create_time, 'yyyy-mm-dd hh:MM:ss')}}
+ 余额:{{item.balance}}
-
- {{$u.timeFormat(item.create_time, 'yyyy-mm-dd hh:MM:ss')}}
- 余额:{{item.balance}}
-
+
@@ -150,7 +155,9 @@
.listrigth,
.listrigth2 {
+ width: 100%;
display: flex;
+ flex-direction: row;
justify-content: space-between;
align-items: center;
// padding-left: 32rpx;
@@ -167,9 +174,17 @@
color: #333333;
}
}
-
+ .listStyle_left{
+ width: 100%;
+ display: flex;
+ align-items: center;
+ }
+ .head_img{
+ border-radius: 50%;
+ margin-right: 32rpx;
+ }
.listrigth2 {
- margin-top: 6rpx;
+ margin-top: 16rpx;
>view {
font-weight: 500;
diff --git a/pages/member/components/card.vue b/pages/member/components/card.vue
deleted file mode 100644
index eea9a89..0000000
--- a/pages/member/components/card.vue
+++ /dev/null
@@ -1,169 +0,0 @@
-
-
-
-
-
- {{userInfo.shopName || '暂无昵称'}}
-
-
-
- 余额:{{userInfo.amount || '0.00'}}
-
-
- VIP{{userInfo.code || '无'}}
-
-
- VIP{{userInfo.isVip||''}}
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/member/components/registermember.vue b/pages/member/components/registermember.vue
index 3e363e2..adefa47 100644
--- a/pages/member/components/registermember.vue
+++ b/pages/member/components/registermember.vue
@@ -161,7 +161,7 @@
encryptedData: d.detail.encryptedData,
iv: d.detail.iv,
})
- this.phonetitle = res.data
+ this.telephone = res.data
}
})
}
@@ -205,7 +205,14 @@
birthDay: this.birthDay
})
if ( res.code == 0 ) {
+
this.$emit('getRegisterMember', false)
+ let res = await this.api.loginwxuserInfo({
+ userId: uni.cache.get('userInfo').id
+ })
+ if (res.code == 0) {
+ uni.cache.set('userInfo', res.data);
+ }
}
}
@@ -240,6 +247,8 @@
.reg-head-img{
width: 120rpx;
height: 120rpx;
+ border-radius: 50%;
+ padding: 0;
position: relative;
}
.reg-head-edit{
diff --git a/pages/member/index - 副本.vue b/pages/member/index - 副本.vue
deleted file mode 100644
index c159a44..0000000
--- a/pages/member/index - 副本.vue
+++ /dev/null
@@ -1,332 +0,0 @@
-
-
-
-
-
-
-
-
-
- {{item.minNum}}元
- 充{{item.minNum}}送{{item.handselNum}}
-
-
-
-
- 立即充值
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/member/index.vue b/pages/member/index.vue
index 67f672b..cccef52 100644
--- a/pages/member/index.vue
+++ b/pages/member/index.vue
@@ -70,11 +70,14 @@
-
+
+
+
已同意
- 《用户储值协议》
- 《用户授权协议》
+ 《用户隐私协议》
+
+
立即充值
@@ -116,9 +119,9 @@
this.shopId = this.getQueryString(decodeURIComponent(e.q), 'shopId')
this.tokenShow = false;
// 等待登录结果返回
- if (!uni.cache.get('token')) {
- await this.$onLaunched;
- }
+ // if (!uni.cache.get('token')) {
+ // await this.$onLaunched;
+ // }
this.init();
} else{
this.shopId = e.shopId;
@@ -173,25 +176,16 @@
uni.pro.navigateTo(item.url, this.userInfo)
},
- async Privacy(e) {
- if (e == 1) {
- //用户协议
- let res = await this.api.agreementgetAgreementOne({
- discern: 0
- });
- uni.pro.navigateTo('my/about/agreement', {
- discern: 0,
- list: res.data.content
- });
- } else {
- let res3 = await this.api.agreementgetAgreementOne({
- discern: 3
- });
- uni.pro.navigateTo('my/about/agreement', {
- discern: 3,
- list: res3.data.content
- });
- }
+
+ /**
+ * 查看协议
+ */
+ viewProtocol (){
+ wx.openPrivacyContract({
+ success: () => {}, // 打开成功
+ fail: () => {}, // 打开失败
+ complete: () => {}
+ })
},
/**
@@ -216,18 +210,26 @@
* 拉起地图
*/
openLocation () {
-
+ console.log('123');
uni.openLocation({
- latitude: Number(this.userInfo.lat), // 目的地的纬度,浮点数,范围为-90~90
- longitude: Number(this.userInfo.lng), // 目的地的经度,浮点数,范围为-180~180
+ latitude: Number(this.usershopUserinfo.lat), // 目的地的纬度,浮点数,范围为-90~90
+ longitude: Number(this.usershopUserinfo.lng), // 目的地的经度,浮点数,范围为-180~180
scale: 18, // 缩放比例,范围5~18
- name: this.userInfo.shopName, // 位置名
- address: this.userInfo.address, // 地址的详细说明
+ name: this.usershopUserinfo.shopName, // 位置名
+ address: this.usershopUserinfo.address, // 地址的详细说明
success() {
console.log('导航启动成功');
+
},
fail(error) {
console.log('导航启动失败', error);
+ if ( error.errMsg == "openLocation:fail invalid_coordinate") {
+ uni.showToast({
+ title: "门店经纬度无效",
+ icon: 'none'
+ });
+ }
+
}
});
},
@@ -278,6 +280,13 @@
* 充值
*/
async userbalancerechangesub() {
+ if (!this.isProtocol) {
+ uni.showToast({
+ title: '请勾选协议',
+ icon: 'none'
+ });
+ return false;
+ }
if (this.amount == null || this.amount == '') {
uni.showToast({
title: '金额不能为空',
@@ -317,9 +326,7 @@
uni.hideLoading()
let pages = getCurrentPages()
if ( pages.length > 1) {
- setTimeout(res => {
- uni.navigateBack()
- }, 500)
+ this.paygetShopByMember()
} else {
setTimeout(res => {
uni.switchTab({
diff --git a/pages/member/list.vue b/pages/member/list.vue
index 1f0423a..9718f92 100644
--- a/pages/member/list.vue
+++ b/pages/member/list.vue
@@ -40,17 +40,24 @@
size: 10, //页容量
status: 'loadmore',
},
- userId: uni.cache.get('userInfo').id
+ userId: uni.cache.get('userInfo').id,
+ type: null,
+ }
+ },
+ onLoad(e) {
+ console.log(e)
+ if ( e.type ) {
+ this.type = e.type;
}
},
onShow() {
this.list = []
this.form = {
- page: 1, //页数
- size: 10, //页容量
- status: 'loadmore',
- },
- this.paygetShopByMember()
+ page: 1, //页数
+ size: 10, //页容量
+ status: 'loadmore',
+ },
+ this.paygetShopByMember()
},
onReachBottom() {
this.paygetShopByMember()
@@ -86,9 +93,21 @@
}
},
eeInfo(item) {
- uni.pro.navigateTo('member/memberdetails', {
- shopId_id: item.shopId
- })
+ if ( this.type && this.type == 'user_payCode') {
+ uni.navigateTo({
+ url: '/pages/pay_code/pay_code?shopInfo=' + JSON.stringify(item)
+ })
+ } else if ( this.type && this.type == 'user_recharge') {
+ uni.pro.navigateTo('member/index', {
+ shopId: item.shopId,
+ type: 'index',
+ })
+ } else {
+ uni.pro.navigateTo('member/memberdetails', {
+ shopId_id: item.shopId
+ })
+ }
+
},
}
}
diff --git a/pages/member/memberdetails - 副本.vue b/pages/member/memberdetails - 副本.vue
deleted file mode 100644
index 8e3ec8d..0000000
--- a/pages/member/memberdetails - 副本.vue
+++ /dev/null
@@ -1,304 +0,0 @@
-
-
-
-
-
- 会员详情
-
- 账单明细
-
-
-
- 会员充值
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/member/memberdetails.vue b/pages/member/memberdetails.vue
index e6defbc..cefbc64 100644
--- a/pages/member/memberdetails.vue
+++ b/pages/member/memberdetails.vue
@@ -23,13 +23,13 @@
查看特权
-
+
{{userInfo.amount || '0.00'}}储值
0积分
-
+
0优惠券
@@ -93,39 +93,53 @@
list: ['鸿运当头',"财运亨通","时来运转","否极泰来","花逢时发"],
index: 0,
text: ""
- }
+ },
+ usershopUserinfo:{},
}
},
onLoad(e) {
this.shopId_id = e.shopId_id
},
onShow() {
- this.paygetShopByMember()
+ this.init();
+
},
methods: {
/**
- * 获取会员卡信息
+ * 获取店铺信息
*/
- async paygetShopByMember() {
- let res = await this.api.paygetShopByMember({
- page: 1,
- pageSize: 10,
- userId: uni.cache.get('userInfo').id,
- shopId: this.shopId_id
+ async init() {
+ let res = await this.api.shopUserInfo({
+ "shopId": this.shopId_id,
+ "userId": uni.cache.get('userInfo').id,
})
- this.userInfo = res.data.list[0];
+ if (res.code == 0) {
+ this.userInfo = res.data
+ }
if ( this.userInfo.isVip == 0 ) {
this.memberOpen = true;
return;
}
},
+
+ itemClick ( type ) {
+ if ( type == 1) {
+ uni.pro.navigateTo('member/index', {
+ shopId: this.userInfo.shopId,
+ type: 'index',
+ })
+ } else if ( type == 3 ) {
+ uni.pro.navigateTo('user/coupon')
+ }
+ },
+
/**
* 注册会员卡
* @param {Object} e
*/
getRegisterMember (e) {
this.memberOpen = e;
- this.paygetShopByMember()
+ this.init()
},
clickEvent() {
diff --git a/pages/member/setPassword.vue b/pages/member/setPassword.vue
index 9658790..2857429 100644
--- a/pages/member/setPassword.vue
+++ b/pages/member/setPassword.vue
@@ -7,7 +7,7 @@
-
+
{{ Recapture }}
@@ -28,7 +28,7 @@
- 确定
+ 确定
@@ -52,8 +52,13 @@
Recapture: '获取验证码'
};
},
- onLoad() {
-
+ onLoad(e) {
+ // if ( e.shopUserInfo ) {
+ // this.shopUserInfo = JSON.parse(e.shopUserInfo);
+ // this.isPwd = this.shopUserInfo.isPwd;
+ // this.mobile = this.shopUserInfo.telephone.slice(0, 3)+'****'+this.shopUserInfo.telephone.slice(7);
+ // this.form.mobile = this.shopUserInfo.telephone;
+ // }
},
methods: {
@@ -62,7 +67,7 @@
// post 手机验证码
phone: this.form.mobile
});
- if (res) {
+ if (res.code == 0) {
uni.showToast({
title: '验证码获取成功',
icon: 'none'
@@ -150,9 +155,10 @@
icon: 'none'
});
}
- // 获取用户信息
- this.loginwxuserInfo()
+
setTimeout(() => {
+ // 获取用户信息
+ this.loginwxuserInfo()
uni.navigateBack();
}, 1000);
}
@@ -196,7 +202,7 @@
font-size: 28rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
- color: #999999;
+ color: #333;
}
@@ -238,7 +244,7 @@
width: 100%;
height: 96rpx;
line-height: 96rpx;
- background: #999;
+ background-color: #999;
border-radius: 48rpx;
font-size: 32rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
@@ -246,6 +252,9 @@
color: #ffffff;
text-align: center;
}
+ .Box_bottom.active{
+ background-color: #E3AD7F;
+ }
}
}
\ No newline at end of file
diff --git a/pages/order/order_detail.vue b/pages/order/order_detail.vue
index a25a061..6b63b64 100644
--- a/pages/order/order_detail.vue
+++ b/pages/order/order_detail.vue
@@ -419,7 +419,7 @@
.flex-between {
width: 100%;
- padding: 24rpx 28rpx;
+ padding: 48rpx 28rpx;
background: #FFFFFF;
.fixedview_one {
diff --git a/pages/order_food/confirm_order.vue b/pages/order_food/confirm_order.vue
index 30fffb6..759cfc4 100644
--- a/pages/order_food/confirm_order.vue
+++ b/pages/order_food/confirm_order.vue
@@ -94,15 +94,18 @@
- {{ item.name }}
+
+ {{ item.name }}
+
+ 会员卡余额 ¥{{amountVIP?amountVIP.amount:0}}
+ 去充值
+
+
-
- 会员卡余额 ¥{{amountVIP?amountVIP.amount:0}}
- 去充值
-
+
@@ -361,16 +364,9 @@
goRecharge() {
// 判断是否绑定手机,只有下单时候有,会员列表肯定有
// console.log(this.amountVIP.isVip, '调试1')
- if (this.amountVIP.isVip == 0) {
- // 跳转到开通页面
- uni.navigateTo({
- url: '/pages/member/activatedmemberone?shopId=' + uni.cache.get('shopUser')
- })
- } else {
- uni.pro.navigateTo('/pages/member/index', {
- shopId: uni.cache.get('shopUser')
- })
- }
+ uni.pro.navigateTo('/pages/member/index', {
+ shopId: uni.cache.get('shopUser')
+ })
},
/**
@@ -422,18 +418,26 @@
} else {
// 先判断是否设置支付密码。0是没设置。没设置的情况下跳转到设置页面。有的话输入支付密码
// console.log(isPwd,'是否设置了支付密码')
- if (uni.cache.get('userInfo').isPwd == 0) {
- uni.pro.navigateTo('/pages/user/repairpassword', {
- shopId_id: uni.cache.get('shopUser')
- })
+ if ( this.amountVIP.isVip == 0 ) {//非会员情况
+
+ this.goRecharge();
} else {
- uni.hideLoading()
- // this.payPasswordShow = false;
- this.ispws = true
- this.$nextTick(() => {
- // this.$refs.payPwd.onPayUp();
- })
+ console.log(this.amountVIP)
+ if (uni.cache.get('userInfo').isPwd == 0) {
+ uni.navigateTo({
+ url: '/pages/member/setPassword?shopUserInfo=' + JSON.stringify(this.amountVIP)
+ })
+
+ } else {
+ uni.hideLoading()
+ // this.payPasswordShow = false;
+ this.ispws = true
+ this.$nextTick(() => {
+ // this.$refs.payPwd.onPayUp();
+ })
+ }
}
+
}
},
@@ -534,8 +538,8 @@
} else if (res.data == 3) {
this.showToastUppop('未设置支付密码')
setTimeout(() => {
- uni.pro.navigateTo('/pages/user/repairpassword', {
- shopId_id: uni.cache.get('shopUser')
+ uni.navigateTo({
+ url: '/pages/member/setPassword?shopUserInfo=' + JSON.stringify(this.amountVIP)
})
}, 1500)
@@ -906,24 +910,25 @@
.paymentMethod_content{
background-color: $uni-bg-color;
border-radius: 22rpx;
- padding:30rpx 0;
+ padding:30rpx 0 0 0;
box-sizing: border-box;
.paymentMethod_title{
font-weight: 500;
font-size: 32rpx;
color: #333333;
- margin-bottom: 30rpx;
+ // margin-bottom: 30rpx;
padding: 0 30rpx;
box-sizing: border-box;
}
.method_list{
- padding: 20rpx 30rpx;
+ padding: 40rpx 30rpx;
box-sizing: border-box;
.method_list_top{
display: flex;
justify-content: space-between;
.method_list_top_left{
display: flex;
+ align-items: center;
.icon{
width: 54.67rpx!important;
height: 48rpx!important;
@@ -934,13 +939,18 @@
font-weight: 500;
color: #333;
}
+ .method_list_top_cen{
+ display: flex;
+ flex-direction: column;
+ }
}
+
}
.method_list_bom{
display: flex;
+ align-items: center;
.balance{
margin-right: 20rpx;
- margin-left: 70rpx;
font-size: 24rpx;
}
.topUpNow{
diff --git a/pages/order_food/order_food.vue b/pages/order_food/order_food.vue
index 8b61504..38bc0b0 100644
--- a/pages/order_food/order_food.vue
+++ b/pages/order_food/order_food.vue
@@ -9,7 +9,7 @@
-
+
¥{{item.lowPrice}}/份
- 已售罄
+ 非可售时间
+ 已售罄
@@ -106,7 +107,7 @@
-
+
@@ -143,7 +144,7 @@
TOP{{index1+1}}
-
+
{{ item1.name }}
本店回头客第{{index1+1}}名
@@ -151,11 +152,12 @@
月售{{item1.stockNumber}}
-
+
¥{{ item1.lowPrice }}/份
- 已售罄
+ 非可售时间
+ 已售罄
@@ -196,7 +198,7 @@
-
+
@@ -444,8 +446,6 @@
this.tableCode = this.getQueryString(decodeURIComponent(e.q), 'code')
uni.cache.set('tableCode', this.tableCode)
}
- uni.cache.set('types', 'types');
-
},
onUnload() {
if (this.socketTicket) {
@@ -465,10 +465,9 @@
scrollTop: 0,
duration: 0
});
- if (!uni.cache.get('token')) {
- await this.$onLaunched;
- }
- uni.$on('message', this.getMessage)
+ console.log(uni.cache.get('token'))
+
+ console.log(14)
_this.getLocation()
},
methods: {
@@ -494,6 +493,7 @@
userId: uni.cache.get('userInfo').id,
"type": "connect",
})
+ uni.$on('message', this.getMessage)
},
/**
@@ -563,7 +563,12 @@
// e.currentTarget.src
},
- searchVal (e) {
+ searchStatus (e) {
+ if ( e == "searchClick" ) {
+ uni.navigateTo({
+ url: '/pages/order_food/order_food_search?tableCode=' + uni.cache.get('tableCode')
+ });
+ }
console.log(e)
},
@@ -736,7 +741,7 @@
* @param {Object} index1
*/
async clickspecifications(item1, index, index1, type) {
- if ( item1.isPauseSale != 0 ) {
+ if ( item1.isPauseSale != 0 || item1.isSale == 0 ) {
return;
}
this.skuidname = []
@@ -956,6 +961,7 @@
* @param {Object} msg
*/
getMessage(msg) { //wss 回显数据
+ console.log(msg)
if (msg == 1) { // 网络在连接
this.fixedtrue = true
return false
@@ -1064,7 +1070,6 @@
/* 获取最后一项的高度,设置填充高度。判断和填充时做了 +-20 的操作,是为了滚动时更好的定位 */
let last = res[res.length - 1].height;
if (last - 20 < this.scrollHeight) {
- // this.fillHeight = this.scrollHeight - last + 20; //这是吸到顶部的距离
this.fillHeight = 200;
}
});
@@ -1110,10 +1115,7 @@
\ No newline at end of file
diff --git a/pages/pay_code/pay_code.vue b/pages/pay_code/pay_code.vue
index 1a65a46..b928c8b 100644
--- a/pages/pay_code/pay_code.vue
+++ b/pages/pay_code/pay_code.vue
@@ -6,7 +6,7 @@
账户余额:
- {{shopInfo.amount || '--'}}
+ {{shopInfo.amount || '0'}}
diff --git a/pages/user/coupon - 副本.vue b/pages/user/coupon - 副本.vue
deleted file mode 100644
index 9c4e07e..0000000
--- a/pages/user/coupon - 副本.vue
+++ /dev/null
@@ -1,353 +0,0 @@
-
-
-
-
-
- {{item.name}}
-
-
-
-
-
-
-
-
-
-
- ¥
- {{item.couponsAmount || 0}}
-
-
- 优惠券(元)
-
-
-
-
- 无门槛使用
-
-
- 通用红包券
-
-
- 有效期至:{{$u.timeFormat(item.endTime, 'yyyy/mm/dd') || '0'}}
-
-
- {{item.status == 0 ? '兑换积分':'已过期'}}
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/user/coupon.vue b/pages/user/coupon.vue
index f65f80d..b3ce7d6 100644
--- a/pages/user/coupon.vue
+++ b/pages/user/coupon.vue
@@ -12,6 +12,7 @@
+
@@ -32,15 +33,16 @@
无门槛使用
- 通用红包券
+ 通用红包券
+
+ {{item.status == 0 ? '去使用':'已过期'}}
+
有效期至:{{$u.timeFormat(item.endTime, 'yyyy/mm/dd') || '0'}}
-
- {{item.status == 0 ? '兑换积分':'已过期'}}
-
+
账号
-
@@ -64,7 +69,7 @@
- 保存
+ 保存
@@ -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;
+ }
}
diff --git a/pages/user/repairpassword - 副本 (2).vue b/pages/user/repairpassword - 副本 (2).vue
deleted file mode 100644
index a54a2e5..0000000
--- a/pages/user/repairpassword - 副本 (2).vue
+++ /dev/null
@@ -1,227 +0,0 @@
-
-
-
-
- {{form.password.length == 6?'请再次确认支付密码':"请设置新密码,用于支付验证"}}
-
-
-
- {{consumeFee.slice(0,1)}}
-
-
- {{consumeFee.slice(1,2)}}
-
-
- {{consumeFee.slice(2,3)}}
-
-
- {{consumeFee.slice(3,4)}}
-
-
- {{consumeFee.slice(4,5)}}
-
-
- {{consumeFee.slice(5,6)}}
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/user/user - 副本.vue b/pages/user/user - 副本.vue
deleted file mode 100644
index 7637bc2..0000000
--- a/pages/user/user - 副本.vue
+++ /dev/null
@@ -1,384 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{userInfo.nickName || '无'}}
-
-
- 去登录
-
-
-
-
-
-
-
-
-
-
-
-
- {{item.name}}
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/user/user.vue b/pages/user/user.vue
index 9e3c234..f2442eb 100644
--- a/pages/user/user.vue
+++ b/pages/user/user.vue
@@ -8,8 +8,8 @@
{{userInfo.nickName || '无'}}
-
-
+
+
免费入会
@@ -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;