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