1
This commit is contained in:
@ -1,12 +1,14 @@
|
||||
<template>
|
||||
<view>
|
||||
<view
|
||||
<button
|
||||
class="draggable-contact"
|
||||
:style="{ right: right + 'rpx', bottom: bottom + 'rpx' }"
|
||||
:hover-class="'draggable-contact-hover'"
|
||||
:hover-stay-time="150"
|
||||
@touchstart="handleClick"
|
||||
@tap="handleClick"
|
||||
open-type="im"
|
||||
:data-im-id="imId"
|
||||
@im="imCallback"
|
||||
@error="onimError"
|
||||
>
|
||||
<view class="click-area">
|
||||
<image class="contact-icon" :src="iconSrc" mode="aspectFill" />
|
||||
@ -14,7 +16,7 @@
|
||||
{{ text }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</button>
|
||||
|
||||
<!-- 联系客服弹窗 -->
|
||||
<ContactPopupModal
|
||||
@ -64,6 +66,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
imId: "42747510730",
|
||||
right: 0,
|
||||
bottom: this.initialBottom,
|
||||
showContactModalFlag: false
|
||||
@ -76,6 +79,16 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
imCallback(e) {
|
||||
console.log("跳转IM客服成功", e.detail)
|
||||
},
|
||||
onimError(e) {
|
||||
console.log("拉起IM客服失败", e.detail)
|
||||
uni.showToast({
|
||||
title: "客服功能暂不可用",
|
||||
icon: "none"
|
||||
})
|
||||
},
|
||||
// 初始化位置
|
||||
initPosition() {
|
||||
const systemInfo = uni.getSystemInfoSync()
|
||||
@ -120,12 +133,22 @@ export default {
|
||||
.draggable-contact {
|
||||
position: fixed;
|
||||
text-align: center;
|
||||
background: none;
|
||||
border: none;
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
z-index: 100000;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
pointer-events: auto;
|
||||
touch-action: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
line-height: normal;
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.click-area {
|
||||
display: flex;
|
||||
|
||||
@ -62,9 +62,9 @@
|
||||
<good-item v-for="(good, i) in leftColumnGoods" :index="2 * i" :key="2 * i" :data="good"
|
||||
@addToCar="addToCar" />
|
||||
</view>
|
||||
<view class="goods-list-item">
|
||||
<good-item v-for="(good, i) in rightColumnGoods" :index="2 * i + 1" :key="2 * i + 1"
|
||||
:data="good" @addToCar="addToCar" />
|
||||
<view class="goods-list-item right">
|
||||
<good-item v-for="(good, i) in rightColumnGoods" :index="2 * i + 1" :key="2 * i + 1" :data="good"
|
||||
@addToCar="addToCar" />
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="isLoadingGoods" class="loading-wrapper flex-center">
|
||||
|
||||
@ -225,7 +225,7 @@ export default {
|
||||
// console.log(this.orderData,'???')
|
||||
createCartOrder(params)
|
||||
.then((res) => {
|
||||
const plugin = tt.requirePlugin("tte57093cd7a7fbf2401");
|
||||
const plugin = tt.requirePlugin("tta5a3d31e3aecfb9b11");
|
||||
plugin.createOrder({
|
||||
goodsList: [
|
||||
{
|
||||
@ -253,6 +253,7 @@ export default {
|
||||
});
|
||||
},
|
||||
fail: (res) => {
|
||||
console.log("fail res", res);
|
||||
const { orderId, outOrderNo, errNo, errMsg, errLogId } = res;
|
||||
if (errLogId) {
|
||||
console.log("预下单失败", errNo, errMsg, errLogId);
|
||||
|
||||
@ -277,6 +277,7 @@
|
||||
afterSaleType: 3,
|
||||
needRefundPackFee: true
|
||||
}"
|
||||
style="width:280rpx;height:100rpx;text-align:center;line-height: 100rpx;"
|
||||
@refund="handleRefundSuccess"
|
||||
@error="handleRefundError"
|
||||
/>
|
||||
@ -483,9 +484,7 @@ import {
|
||||
return this.orderData?.guanjia_info?.guanjia_pic || ''
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getConfig();
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
this.orderId = options.id;
|
||||
this.getOrderDetail();
|
||||
@ -552,12 +551,7 @@ import {
|
||||
...data
|
||||
};
|
||||
},
|
||||
getConfig() {
|
||||
getConfig().then((res) => {
|
||||
this.configInfo.kefu_pic = res.info.kefu_pic;
|
||||
this.configInfo.kefu_time = res.info.kefu_time;
|
||||
});
|
||||
},
|
||||
|
||||
// 取消订单
|
||||
orderCancel() {
|
||||
uni.showLoading({
|
||||
@ -853,6 +847,7 @@ import {
|
||||
width: 34rpx;
|
||||
height: 34rpx;
|
||||
flex-shrink: 0;
|
||||
|
||||
}
|
||||
|
||||
.sliver-text {
|
||||
|
||||
Reference in New Issue
Block a user