diff --git a/pages/index/index.vue b/pages/index/index.vue
index 3d73138..c166dec 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -41,7 +41,7 @@
会员套餐
-
+
{{item.name}}
期限:{{item.validity_day}}天
次数:{{item.validity_num}}次
@@ -98,7 +98,12 @@
}
},
onLoad() {
- this.top = uni.getSystemInfoSync().statusBarHeight
+ const that = this;
+ this.top = uni.getSystemInfoSync().statusBarHeight;
+ uni.$on("changeStoreInfo",function(res){
+ that.tuijianlist = [res]
+ console.log(res)
+ })
},
onReady() {
this.viplist=[]
@@ -218,7 +223,7 @@
},
mendianlist() {
uni.navigateTo({
- url: '/pages/mendainlist/mendainlist?item='+'shouye'
+ url: '/pages/mendainlist/mendainlist?item='+'shouye'+'&id='+this.tuijianlist[0].id
})
},
tuanquan() {
diff --git a/pages/mendainlist/mendainlist.vue b/pages/mendainlist/mendainlist.vue
index b14d425..27781f4 100644
--- a/pages/mendainlist/mendainlist.vue
+++ b/pages/mendainlist/mendainlist.vue
@@ -37,12 +37,15 @@
iswanjie:false,
page:1,
isshouye:'',
- top: 0
+ top: 0,
+ id: ""
}
},
onLoad(e) {
this.top = uni.getSystemInfoSync().statusBarHeight
this.isshouye=e.item
+ this.id = e.id
+ console.log(e)
},
onShow() {
this.mendainlist=[]
@@ -79,6 +82,9 @@
uni.setStorageSync('xzmd','')
uni.setStorageSync('xzmd',item)
uni.navigateBack()
+ }else{
+ uni.$emit("changeStoreInfo",item)
+ uni.navigateBack()
}
},
previous() {
@@ -90,6 +96,9 @@
}).then(res => {
let arr = res.data.list
this.mendainlist = [...this.mendainlist, ...arr]
+ if(res.data.total >=1){
+ this.mendainlist.map(a=>a.id = a.store_id)
+ }
if(this.mendainlist.length>=res.data.total){
this.iswanjie=true
}
diff --git a/pages/order/order.vue b/pages/order/order.vue
index dc2a07d..2e46182 100644
--- a/pages/order/order.vue
+++ b/pages/order/order.vue
@@ -77,7 +77,8 @@
mandianxinxi: {},
vipxinxi: {},
yhxyactive: false,
- top: 0
+ top: 0,
+ userxixin: {}
}
},
onLoad(option) {
@@ -88,6 +89,7 @@
that.vipxinxi = vipxinxi
that.mandianxinxi = tuijianlist
that.top = uni.getSystemInfoSync().statusBarHeight
+ this.memberInfo();
},
onShow() {
var xzmd = uni.getStorageSync('xzmd')
@@ -104,6 +106,11 @@
url: '/pages/mendainlist/mendainlist'
})
},
+ memberInfo() {
+ this.$api.memberInfo().then(res => {
+ this.userxixin = res.data
+ })
+ },
change(e) {
console.log(123, e);
if (e.detail.value.length != 0) {
@@ -124,6 +131,22 @@
duration: 3000
});
} else {
+ if(!this.userxixin.face_id) {
+ uni.showModal({
+ title: "温馨提示",
+ content:"当前用户没有人脸识别,是否立即前往?",
+ confirmColor: "#F8A617",
+ confirmText: "前往",
+ success(res) {
+ if(res.confirm){
+ uni.navigateTo({
+ url: "/pages/face/face"
+ })
+ }
+ }
+ })
+ return ;
+ }
this.$api.cardBuy({
card_id: this.vipxinxi.card_id,
store_id: this.mandianxinxi.id