修改本地生活线下快捷买单设置的显示逻辑

This commit is contained in:
赵毅 2025-08-07 10:18:15 +08:00
parent 70d90876ee
commit 353b01fa4f
2 changed files with 13 additions and 1 deletions

View File

@ -2,6 +2,7 @@ export const apiArr = {
getMerChantCateList:"/api/v2/wechat/merchant-cate-crud/list", //商家分类
getMerchantList:"/api/v2/wechat/merchant-info-crud/page",//商家列表
createComment:"/api/v2/wechat/merchant-evaluation-crud/creat",//创建用户评价
getMerchantInfo:"/api/v2/wechat/merchant-info-crud/info",//获取商家信息详情
getMerchantComment:"/api/v2/wechat/merchant-evaluation-crud/page",//获取商家评价
merChantCommentLike:"/api/v2/wechat/merchant-evaluation-like-crud/creat",//点赞
merChantCommentUnlike:"/api/v2/wechat/merchant-evaluation-like-crud/del",//取消点赞

View File

@ -97,7 +97,7 @@
<view>点评</view>
</view>
</view>
<text class="btn" @click="handleQuickPayClick">快捷买单</text>
<text v-if="isShow" class="btn" @click="handleQuickPayClick">快捷买单</text>
</view>
</view>
</template>
@ -120,6 +120,7 @@ export default {
page_size: 10,
commentList: [],
flag: false,
isShow: false,
};
},
onLoad(options) {
@ -130,6 +131,7 @@ export default {
this.flag = false
this.commentList = []
this.getCommentList()
this.getMerchantInfo()
},
onReachBottom() {
if (this.flag) {
@ -154,10 +156,19 @@ export default {
} else {
this.flag = false;
}
this.isShow = res.rows[0].merchant_info.quick_purchase_enabled == 1
this.commentList = this.commentList.concat(res.rows);
})
},
getMerchantInfo(){
request(apiArr.getMerchantInfo, "POST", {
id:uni.getStorageSync("merchantInfo").id,
}).then(res => {
this.isShow = res.quick_purchase_enabled == 1
})
},
//
detail_msg() {
NavgateTo('../detail_msg/index')