Commit b5cecb6f by zhangzhen

界面和细节优化

parent 218de66b
......@@ -86,6 +86,7 @@
this.list = this.value;
},
onNavToHome(val) {
uni.setStorageSync("storePopShow",false)
uni.setStorageSync("storeId", val.id)
uni.switchTab({
url: `/pages/index/index?storeId=${val.id}`
......
......@@ -82,7 +82,8 @@
}
],
couponInfo:'',
eventChannel:null
eventChannel:null,
orderPage:false
};
},
filters:{
......@@ -90,8 +91,20 @@
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:{
onConfirm(){
let that = this;
if(!this.code){
uni.showToast({
icon:"none",
......@@ -119,6 +132,9 @@
title:"核验成功",
success: () => {
setTimeout(()=>{
if(that.orderPage){
that.eventChannel.emit('acceptData', {data: true});
}
uni.navigateBack()
},1000)
}
......
......@@ -178,7 +178,7 @@
<view class="title">
<text class="text-black text-xl text-bold">温馨提示</text>
</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>
</view>
</view>
......@@ -327,7 +327,7 @@
methods: {
onStoreChage(id){
uni.setStorageSync("storeId", id);
this.onClose();
this.onStoreClose(false);
setTimeout(()=>{
this.onGetListStore();
},200)
......@@ -475,8 +475,10 @@
let l = that.roomVoList.filter(item=>item.sortNum === 1)
if(l.length<=0){
if(!uni.getStorageSync("storePopShow")){
that.$refs.popupStoreList.open();
}
}
} else {
that.roomVoList = []
......@@ -595,6 +597,10 @@
},
onClose() {
this.$refs.popup.close()
},
onStoreClose(storePopShow = true){
uni.setStorageSync("storePopShow",storePopShow)
this.$refs.popupStoreList.close()
},
onNavToSet() {
......
......@@ -1373,6 +1373,9 @@
let that = this;
uni.navigateTo({
url: "/pages/couponCheck/couponCheck?openShopUuid=" + this.roomInfo.openShopUuid,
success: (res) => {
res.eventChannel.emit('acceptDataFromOpenerPage', { orderPage:true })
},
events: {
// 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
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