Commit b5cecb6f by zhangzhen

界面和细节优化

parent 218de66b
...@@ -86,6 +86,7 @@ ...@@ -86,6 +86,7 @@
this.list = this.value; this.list = this.value;
}, },
onNavToHome(val) { onNavToHome(val) {
uni.setStorageSync("storePopShow",false)
uni.setStorageSync("storeId", val.id) uni.setStorageSync("storeId", val.id)
uni.switchTab({ uni.switchTab({
url: `/pages/index/index?storeId=${val.id}` url: `/pages/index/index?storeId=${val.id}`
......
...@@ -82,7 +82,8 @@ ...@@ -82,7 +82,8 @@
} }
], ],
couponInfo:'', couponInfo:'',
eventChannel:null eventChannel:null,
orderPage:false
}; };
}, },
filters:{ filters:{
...@@ -90,8 +91,20 @@ ...@@ -90,8 +91,20 @@
return moment(val).format("YYYY-MM-DD HH:mm:ss") return moment(val).format("YYYY-MM-DD HH:mm:ss")
} }
}, },
onLoad() {
this.eventChannel = this.getOpenerEventChannel();
this.eventChannel.on('acceptDataFromOpenerPage', (data) => {
console.log(data,99999)
if(data.orderPage){
this.orderPage = true
}else{
this.orderPage = false
}
})
},
methods:{ methods:{
onConfirm(){ onConfirm(){
let that = this;
if(!this.code){ if(!this.code){
uni.showToast({ uni.showToast({
icon:"none", icon:"none",
...@@ -119,6 +132,9 @@ ...@@ -119,6 +132,9 @@
title:"核验成功", title:"核验成功",
success: () => { success: () => {
setTimeout(()=>{ setTimeout(()=>{
if(that.orderPage){
that.eventChannel.emit('acceptData', {data: true});
}
uni.navigateBack() uni.navigateBack()
},1000) },1000)
} }
......
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
<view class="title"> <view class="title">
<text class="text-black text-xl text-bold">温馨提示</text> <text class="text-black text-xl text-bold">温馨提示</text>
</view> </view>
<view class="close-box text-xxl" @tap="onClose"> <view class="close-box text-xxl" @tap="onStoreClose(true)">
<text class="cuIcon-roundclosefill text-pink"></text> <text class="cuIcon-roundclosefill text-pink"></text>
</view> </view>
</view> </view>
...@@ -327,7 +327,7 @@ ...@@ -327,7 +327,7 @@
methods: { methods: {
onStoreChage(id){ onStoreChage(id){
uni.setStorageSync("storeId", id); uni.setStorageSync("storeId", id);
this.onClose(); this.onStoreClose(false);
setTimeout(()=>{ setTimeout(()=>{
this.onGetListStore(); this.onGetListStore();
},200) },200)
...@@ -475,8 +475,10 @@ ...@@ -475,8 +475,10 @@
let l = that.roomVoList.filter(item=>item.sortNum === 1) let l = that.roomVoList.filter(item=>item.sortNum === 1)
if(l.length<=0){ if(l.length<=0){
if(!uni.getStorageSync("storePopShow")){
that.$refs.popupStoreList.open(); that.$refs.popupStoreList.open();
} }
}
} else { } else {
that.roomVoList = [] that.roomVoList = []
...@@ -595,6 +597,10 @@ ...@@ -595,6 +597,10 @@
}, },
onClose() { onClose() {
this.$refs.popup.close() this.$refs.popup.close()
},
onStoreClose(storePopShow = true){
uni.setStorageSync("storePopShow",storePopShow)
this.$refs.popupStoreList.close() this.$refs.popupStoreList.close()
}, },
onNavToSet() { onNavToSet() {
......
...@@ -1373,6 +1373,9 @@ ...@@ -1373,6 +1373,9 @@
let that = this; let that = this;
uni.navigateTo({ uni.navigateTo({
url: "/pages/couponCheck/couponCheck?openShopUuid=" + this.roomInfo.openShopUuid, url: "/pages/couponCheck/couponCheck?openShopUuid=" + this.roomInfo.openShopUuid,
success: (res) => {
res.eventChannel.emit('acceptDataFromOpenerPage', { orderPage:true })
},
events: { events: {
// 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据 // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
acceptData(data) { acceptData(data) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment