提交
This commit is contained in:
@ -110,18 +110,15 @@
|
||||
{{ cartShowCount }}
|
||||
</view>
|
||||
|
||||
<view class="contact-icon-view">
|
||||
<image class="contact-icon" :src="`${imgPrefix}supportStaff.png`" @click="jumpToWeChat" />
|
||||
<view class="contact-btn fs-20">
|
||||
联系客服
|
||||
</view>
|
||||
</view>
|
||||
<!-- 可拖动联系客服组件 -->
|
||||
<DraggableContact ref="draggableContact" :onClick="handleContactClick" />
|
||||
|
||||
<add-goods-modal v-if="showModal" :data="addGoodInfo" optText="加入购物车" @change="(val) => (showModal = val)"
|
||||
@optAction="optAction" />
|
||||
<coupon-modal v-if="showCouponModal" :couponList="couponList" @close="onCouponModalClose"
|
||||
@getCoupon="getCoupon" />
|
||||
<contact-modal v-if="showContactModal" @close="showContactModal = false" />
|
||||
<contact-modal v-if="showContactModal" @close="showContactModal = false" />
|
||||
<WeChatCopyModal ref="wechatCopyModal" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -133,7 +130,9 @@
|
||||
import GoodItem from "./components/GoodItem.vue";
|
||||
import AddGoodsModal from "@/components/goods/AddGoodsModal.vue";
|
||||
import CouponModal from "./components/CouponModal.vue";
|
||||
import ContactModal from "@/components/ContactModal.vue";
|
||||
import ContactModal from "@/components/ContactModal.vue";
|
||||
import WeChatCopyModal from "@/components/WeChatCopyModal.vue";
|
||||
import DraggableContact from "@/components/DraggableContact.vue";
|
||||
|
||||
import {
|
||||
getGoodsClassify,
|
||||
@ -153,12 +152,14 @@
|
||||
jumpToWeChat
|
||||
} from "@/utils/common";
|
||||
|
||||
export default {
|
||||
export default {
|
||||
components: {
|
||||
GoodItem,
|
||||
AddGoodsModal,
|
||||
CouponModal,
|
||||
ContactModal,
|
||||
WeChatCopyModal,
|
||||
DraggableContact,
|
||||
},
|
||||
data() {
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
@ -236,7 +237,42 @@
|
||||
|
||||
// this.getCouponList();
|
||||
},
|
||||
methods: {
|
||||
methods: {
|
||||
// 跳转微信客服 - 使用自定义弹窗(与首页在线客服功能一致)
|
||||
handleContactClick() {
|
||||
console.log('[shop.vue] handleContactClick called')
|
||||
console.log('[shop.vue] $refs.wechatCopyModal:', this.$refs.wechatCopyModal)
|
||||
if (this.$refs.wechatCopyModal && this.$refs.wechatCopyModal.show) {
|
||||
this.$refs.wechatCopyModal.show({
|
||||
title: '请添加客服号',
|
||||
weChatCode: 'Wagoo2025'
|
||||
});
|
||||
console.log('[shop.vue] wechatCopyModal.show called')
|
||||
} else {
|
||||
console.error('[shop.vue] wechatCopyModal not available, using fallback')
|
||||
// 降级方案:直接显示系统弹窗
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '请添加客服号:Wagoo2025',
|
||||
confirmText: '复制微信号',
|
||||
showCancel: true,
|
||||
cancelText: '取消',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.setClipboardData({
|
||||
data: 'Wagoo2025',
|
||||
success: () => {
|
||||
uni.showToast({
|
||||
title: '已复制微信号',
|
||||
icon: 'success'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
jumpToWeChat,
|
||||
onShowFun() {
|
||||
this.initData();
|
||||
@ -710,26 +746,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.contact-icon-view {
|
||||
position: fixed;
|
||||
bottom: calc(35vh - 130rpx - 48rpx);
|
||||
right: 20rpx;
|
||||
text-align: center;
|
||||
|
||||
.contact-icon {
|
||||
width: 66rpx;
|
||||
height: 66rpx;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.contact-btn {
|
||||
color: #FFFFFF;
|
||||
background-color: #FF19A0;
|
||||
border-radius: 257px;
|
||||
padding: 6rpx 8rpx;
|
||||
transform: translateY(-8px);
|
||||
}
|
||||
}
|
||||
/* 可拖动联系客服组件无需额外样式 */
|
||||
|
||||
|
||||
.cart-count {
|
||||
|
||||
Reference in New Issue
Block a user