修改好店快捷支付操作逻辑
This commit is contained in:
parent
e646266c0b
commit
eeaf21d272
@ -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
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -283,7 +296,7 @@ export default {
|
|||||||
commentDesc(e) {
|
commentDesc(e) {
|
||||||
NavgateTo(`../UserComment/index?id=${e.id}`)
|
NavgateTo(`../UserComment/index?id=${e.id}`)
|
||||||
},
|
},
|
||||||
|
|
||||||
// 预览图片
|
// 预览图片
|
||||||
previewImage(imageList, currentIndex) {
|
previewImage(imageList, currentIndex) {
|
||||||
// 将相对路径转换为完整URL
|
// 将相对路径转换为完整URL
|
||||||
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user