页面优化

main
syt 3 months ago
parent 860666c7e1
commit 408e6ed3fa
  1. 11
      pages/index/index.vue
  2. 11
      pages/mendainlist/mendainlist.vue
  3. 25
      pages/order/order.vue

@ -41,7 +41,7 @@
<view class="hy">会员套餐</view>
<view class="btboxs">
<view class="btbox" v-for="(item,index) in viplist" :key="index" @click="taochan(item)">
<image :src="item.img.url" mode="" class="btimg"></image>
<image :src="item.img.url" mode="aspectFill" class="btimg"></image>
<view class="bttitle">{{item.name}}</view>
<view class="btwz" v-if="item.validity_day>0">期限{{item.validity_day}}</view>
<view class="btwz" v-if='item.validity_num>0'>次数{{item.validity_num}}</view>
@ -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() {

@ -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
}

@ -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

Loading…
Cancel
Save