Commit 0205babd authored by DPFly's avatar DPFly

增加一键关店功能

parent 5700f509
This diff is collapsed.
......@@ -117,7 +117,8 @@
<view class="no-content" v-else>暂无商品详情</view>
</view>
</view>
<view class="bottom-option">
<view v-if="hasCloseStore" class="store-closed">本店已打烊</view>
<view v-else class="bottom-option">
<view class="navigation">
<view class="item" @click="toHome">
<image
......@@ -217,6 +218,13 @@ export default {
limitCount: -1,
}
},
computed: {
hasCloseStore() {
const { store_setting = {} } = this.$store.state
const { store_temporary_closed = 0 } = store_setting
return store_temporary_closed
},
},
onLoad({ id, storeId }) {
this._storeId = storeId
......@@ -229,8 +237,8 @@ export default {
if (this._setStoreId) {
this.$store.commit('SET_STORE_ID', this._storeId)
this._setStoreId = false
storeModel.info()
}
storeModel.info()
this.fetchGroupDetail()
})
},
......@@ -775,6 +783,20 @@ $bottomOptionHeight: 100rpx;
}
}
.store-closed {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 12;
height: 120rpx;
text-align: center;
line-height: 120rpx;
font-size: 34rpx;
color: #fff;
background-color: rgba(0, 0, 0, 0.75);
}
.bottom-option {
position: fixed;
bottom: 0;
......
......@@ -195,6 +195,13 @@ export default {
isVisiblePay: false, // 是否弹出支付组件
}
},
computed: {
hasCloseStore() {
const { store_setting = {} } = this.$store.state
const { store_temporary_closed = 0 } = store_setting
return store_temporary_closed
},
},
onLoad({ teamId, style = 0, status = 0, storeId }) {
this._storeId = storeId
......@@ -208,8 +215,8 @@ export default {
if (this._setStoreId) {
this.$store.commit('SET_STORE_ID', this._storeId)
this._setStoreId = false
storeModel.info()
}
storeModel.info()
const { style, status } = this
if (style == 0 && status == 0) {
// 待支付
......@@ -434,6 +441,7 @@ export default {
})
},
toPay() {
if (this.hasCloseStore) return prompt.toast('本店已打烊')
if (this.disablePay) return
this.payParams = this._payParams
this.togglePayVisible(true)
......@@ -443,6 +451,7 @@ export default {
storage.set('upd-unpay-group-order', true)
},
toJoin() {
if (this.hasCloseStore) return prompt.toast('本店已打烊')
this.$refs.goodsBuy.show()
},
goodsConfirm(e) {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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