修改好店快捷支付操作逻辑

This commit is contained in:
赵毅 2025-11-03 15:54:51 +08:00
parent e646266c0b
commit eeaf21d272

View File

@ -63,7 +63,8 @@
<view class="Msg_con"> <view class="Msg_con">
{{ item.comment }} {{ item.comment }}
<view class="Msg_con_img" v-if="item.image_url"> <view class="Msg_con_img" v-if="item.image_url">
<image v-for="(img, index) in item.image_url.split(',')" :key="index" :src="picUrl + img" mode="aspectFill" @click="previewImage(item.image_url.split(','), index)"> <image v-for="(img, index) in item.image_url.split(',')" :key="index" :src="picUrl + img" mode="aspectFill"
@click="previewImage(item.image_url.split(','), index)">
</image> </image>
<video class="Msg_con_video" v-if="item.video_url" :src="picUrl + item.video_url" controls></video> <video class="Msg_con_video" v-if="item.video_url" :src="picUrl + item.video_url" controls></video>
</view> </view>
@ -115,7 +116,8 @@
<view>客服</view> <view>客服</view>
</view> </view>
</view> </view>
<text v-if="isShow" class="btn" @click="handleQuickPayClick">快捷买单</text> <button v-if="isShow" :class="{ 'btn_disabled': isDisabled, 'btn': !isDisabled }" :disabled="isDisabled"
@click="handleQuickPayClick">快捷买单</button>
</view> </view>
</view> </view>
</template> </template>
@ -139,6 +141,7 @@ export default {
commentList: [], commentList: [],
flag: false, flag: false,
isShow: false, isShow: false,
isDisabled: false,
}; };
}, },
onLoad(options) { onLoad(options) {
@ -170,7 +173,16 @@ export default {
methods: { methods: {
handleQuickPayClick() { handleQuickPayClick() {
NavgateTo('../pay/index'); if (this.isDisabled) {
uni.showToast({
title: '支付未开通,升级 VIP 或联系工作人员开通',
icon: 'none',
duration: 2000
});
} else {
NavgateTo('../pay/index');
}
}, },
// //
getCommentList() { getCommentList() {
@ -208,6 +220,7 @@ export default {
id: uni.getStorageSync("merchantInfo").id, id: uni.getStorageSync("merchantInfo").id,
}).then(res => { }).then(res => {
this.isShow = res.quick_purchase_enabled == 1 this.isShow = res.quick_purchase_enabled == 1
this.isDisabled = res.level == 1
}) })
}, },
@ -291,10 +304,10 @@ export default {
uni.previewImage({ uni.previewImage({
urls: urls, urls: urls,
current: urls[currentIndex], current: urls[currentIndex],
success: function(res) { success: function (res) {
console.log('预览成功', res); console.log('预览成功', res);
}, },
fail: function(err) { fail: function (err) {
console.log('预览失败', err); console.log('预览失败', err);
} }
}); });