|
|
@@ -24,7 +24,7 @@
|
|
|
:disabled="true"></u-rate>
|
|
|
<span>{{shopData.grade}}分</span>
|
|
|
</view>
|
|
|
- <span :style="{color:btnList[typeIndex].color}">{{btnList[typeIndex].name}}</span>
|
|
|
+ <span v-if="typeIndex !== null" :style="{color:btnList[typeIndex].color}">{{btnList[typeIndex].name}}</span>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="address">
|
|
|
@@ -83,7 +83,7 @@
|
|
|
</view>
|
|
|
<view class="center">
|
|
|
<image :src="btnList[currentIndex].image" mode="" v-show="shopStatus == 1"></image>
|
|
|
- <span>{{btnList[currentIndex].tip}}</span>
|
|
|
+ <span>{{ resultTip || (btnList[currentIndex] && btnList[currentIndex].tip) }}</span>
|
|
|
<view class="error" v-show="shopStatus == 4">
|
|
|
当前门店还存在有效服务券<br />
|
|
|
暂时无法关闭门店
|
|
|
@@ -124,28 +124,28 @@
|
|
|
type:3,
|
|
|
class:"close",
|
|
|
tip:"该店铺已暂停营业",
|
|
|
- image:"/static/index/close.png",
|
|
|
- content:" ",
|
|
|
- color:"#999999"
|
|
|
- },
|
|
|
- {
|
|
|
- name: '解约下线',
|
|
|
- type: 4,
|
|
|
- class:"close",
|
|
|
- tip:"谢谢光临,该店铺已下架",
|
|
|
image:"/static/index/rest.png",
|
|
|
content:" ",
|
|
|
color:"#FF8024"
|
|
|
},
|
|
|
- {
|
|
|
- name: '门店歇业',
|
|
|
- type: 5,
|
|
|
- class:"rest",
|
|
|
- tip:"当前门店已歇业",
|
|
|
- image:"/static/index/rest.png",
|
|
|
- content:"当前门店确定歇业?",
|
|
|
- color:"#FF8024"
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // name: '解约下线',
|
|
|
+ // type: 4,
|
|
|
+ // class:"close",
|
|
|
+ // tip:"谢谢光临,该店铺已下架",
|
|
|
+ // image:"/static/index/rest.png",
|
|
|
+ // content:" ",
|
|
|
+ // color:"#FF8024"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // name: '门店歇业',
|
|
|
+ // type: 5,
|
|
|
+ // class:"rest",
|
|
|
+ // tip:"当前门店已歇业",
|
|
|
+ // image:"/static/index/rest.png",
|
|
|
+ // content:"当前门店确定歇业?",
|
|
|
+ // color:"#FF8024"
|
|
|
+ // },
|
|
|
],
|
|
|
currentIndex: 0,
|
|
|
isPopup: false,
|
|
|
@@ -154,8 +154,9 @@
|
|
|
count: 5,
|
|
|
shopData: {},
|
|
|
shopStatus: null,
|
|
|
- typeIndex: 0,
|
|
|
+ typeIndex: null,
|
|
|
id: '',
|
|
|
+ resultTip:''
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -183,8 +184,10 @@
|
|
|
this.$http.post("/merchant/localMerchantInfo/editStatus", data).then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
this.isPopup = false
|
|
|
- this.isSuccess = true
|
|
|
- this.getShopData()
|
|
|
+ // 解决页面闪烁状态问题
|
|
|
+ this.getShopData().then(() => {
|
|
|
+ this.isSuccess = true
|
|
|
+ })
|
|
|
}else {
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
|
@@ -194,13 +197,21 @@
|
|
|
})
|
|
|
},
|
|
|
getShopData() {
|
|
|
- this.$http.get("/merchant/localMerchantInfo/queryById?id=" + this.id).then(res => {
|
|
|
+ return this.$http.get("/merchant/localMerchantInfo/queryById?id=" + this.id).then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
this.shopData = res.data.result
|
|
|
+ this.resultTip = ''
|
|
|
this.shopStatus = res.data.result.merchantStatus
|
|
|
- const index=this.btnList.findIndex(item => item.type == this.shopStatus);
|
|
|
- this.typeIndex = index
|
|
|
- this.currentIndex=index
|
|
|
+ let tempStatus = this.shopStatus
|
|
|
+ if (tempStatus === 5) {
|
|
|
+ this.resultTip = '当前时间不在营业时间范围内,已自动歇业。'
|
|
|
+ tempStatus = 3
|
|
|
+ }
|
|
|
+ const index=this.btnList.findIndex(item => item.type == tempStatus);
|
|
|
+ if (index > -1) {
|
|
|
+ this.typeIndex = index
|
|
|
+ this.currentIndex=index
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
},
|