订单售后支持多商户争议沟通

master
gongfuxiang 2025-12-23 22:38:52 +08:00
parent b3641de720
commit c42402db2a
8 changed files with 627 additions and 126 deletions

View File

@ -1095,6 +1095,84 @@
.right-xxxxxl {
right: 24rpx;
}
/**
* flex
*/
.flex-row {
display: flex;
flex-direction: row;
}
.flex-col {
display: flex;
flex-direction: column;
}
.jc-sb {
justify-content: space-between;
}
.jc-c {
justify-content: center;
}
.jc-sa {
justify-content: space-around;
}
.jc-e {
justify-content: flex-end;
}
.align-c {
align-items: center;
}
.align-e {
align-items: flex-end;
}
.align-s {
align-items: flex-start;
}
.align-b {
align-items: baseline;
}
.flex-wrap {
flex-wrap: wrap;
}
.flex-nowrap {
flex-wrap: nowrap;
}
.flex-1 {
flex: 1;
}
.flex-2 {
flex: 2;
}
.flex-3 {
flex: 3;
}
.self-c {
align-self: center;
}
.self-b {
align-self: baseline;
}
.self-s {
align-self: flex-start;
}
.self-e {
align-self: flex-end;
}
.flex-shrink {
flex-shrink: 0;
}
.flex-shrink-1 {
flex-shrink: 0;
}
.flex-width {
width: 0;
}
.flex-width-half {
width: 50%;
}
.flex-width-half-half {
width: 25%;
}
/**

View File

@ -1088,84 +1088,6 @@ button[disabled].bg-grey {
height: 40rpx;
}
/**
* flex
*/
.flex-row {
display: flex;
flex-direction: row;
}
.flex-col {
display: flex;
flex-direction: column;
}
.jc-sb {
justify-content: space-between;
}
.jc-c {
justify-content: center;
}
.jc-sa {
justify-content: space-around;
}
.jc-e {
justify-content: flex-end;
}
.align-c {
align-items: center;
}
.align-e {
align-items: flex-end;
}
.align-s {
align-items: flex-start;
}
.align-b {
align-items: baseline;
}
.flex-wrap {
flex-wrap: wrap;
}
.flex-nowrap {
flex-wrap: nowrap;
}
.flex-1 {
flex: 1;
}
.flex-2 {
flex: 2;
}
.flex-3 {
flex: 3;
}
.self-c {
align-self: center;
}
.self-b {
align-self: baseline;
}
.self-s {
align-self: flex-start;
}
.self-e {
align-self: flex-end;
}
.flex-shrink {
flex-shrink: 0;
}
.flex-shrink-1 {
flex-shrink: 0;
}
.flex-width {
width: 0;
}
.flex-width-half {
width: 50%;
}
.flex-width-half-half {
width: 25%;
}
/**
* css线
*/

View File

@ -13,6 +13,7 @@
"not_yet": "Not yet",
"submit": "Submit",
"save": "Preserve",
"send": "Send",
"add": "Add",
"copy": "Copy",
"remove": "Remove",
@ -102,7 +103,13 @@
"two_nav_text" : "Secondary Navigation",
"no_data": "No data available at the moment",
"goods": "Goods",
"shop": "Shop"
"shop": "Shop",
"customer_service": "Customer Service",
"tel_service": "Tel Service",
"view_history": "View history",
"no_chat_record": "No communication records",
"dispute_chat": "Dispute communication",
"input_enter_chat_tips": "Please enter a message"
},
"client": {
"weixin": "WeChat",
@ -875,7 +882,6 @@
"29f6n5": "Transfer",
"8752a4": "Withdrawal",
"91h03v": "Payment code",
"ki1nor": "Tel Service",
"2k0227": "Exit",
"3q4p8k": "Collection",
"57xw84": "Tracks",
@ -1586,7 +1592,9 @@
"23v6rp": "Please select the operation type",
"dn3423": "Please select the quantity of returns",
"c9e2ms": "Please fill in the courier name",
"ld10pm": "Please fill in the courier tracking number"
"ld10pm": "Please fill in the courier tracking number",
"87tuff": "Describe the reason",
"6uygft": "Describe the reason in a format of 1-230 characters"
}
},
"ask-comments": {

View File

@ -13,6 +13,7 @@
"not_yet": "暂不",
"submit": "提交",
"save": "保存",
"send": "发送",
"add": "新增",
"copy": "复制",
"remove": "移除",
@ -102,7 +103,13 @@
"two_nav_text" : "二级导航",
"no_data": "暂无数据",
"goods": "商品",
"shop": "店铺"
"shop": "店铺",
"customer_service": "咨询客服",
"tel_service": "电话客服",
"view_history": "查看历史",
"no_chat_record": "没有沟通记录",
"dispute_chat": "争议沟通",
"input_enter_chat_tips": "请输入消息"
},
"client": {
"weixin": "微信",
@ -865,7 +872,6 @@
"29f6n5": "转账",
"8752a4": "提现",
"91h03v": "付款码",
"ki1nor": "电话客服",
"2k0227": "退出账号",
"3q4p8k": "商品收藏",
"57xw84": "我的足迹",
@ -1573,7 +1579,9 @@
"23v6rp": "请选择操作类型",
"dn3423": "请选择退货数量",
"c9e2ms": "请填写快递名称",
"ld10pm": "请填写快递单号"
"ld10pm": "请填写快递单号",
"87tuff": "描述原因",
"6uygft": "描述原因格式1~230个字符"
}
},
"ask-comments": {

View File

@ -24,4 +24,53 @@
-ms-transition: border-color .2s ease-in;
-o-transition: border-color .2s ease-in;
transition: border-color .2s ease-in;
}
.chat-head .chat-user-avatar {
height: 90rpx;
}
.chat-head .chat-user-avatar .image {
width: 80rpx;
height: 80rpx;
}
.chat-head .chat-user-status {
line-height: 28rpx;
width: 28rpx;
height: 28rpx;
top: -26rpx;
-webkit-box-shadow: 0px 0px 5px #9E9E9E;
box-shadow: 0px 0px 5px #9E9E9E;
}
.chat-content {
height: 800rpx;
}
.chat-content .chat-item .content {
width: calc(100vw - 260rpx);
}
.chat-content .chat-item .image {
width: 64rpx;
height: 64rpx;
}
.chat-content .chat-item .content-image {
max-width: 300rpx;
max-height: 300rpx;
}
.chat-content .chat-item .content-video {
max-width: 450rpx;
max-height: 450rpx;
}
.chat-input,
.chat-input .chat-send-submit{
height: 100rpx;
}
.chat-input .chat-send-input {
border-top-right-radius: 0 !important;
border-bottom-right-radius: 0 !important;
}
.chat-input .chat-send-submit {
width: 240rpx;
line-height: 100rpx;
border-top-left-radius: 0 !important;
border-bottom-left-radius: 0 !important;
}

View File

@ -23,17 +23,6 @@
</view>
</view>
<!-- 客服信息 -->
<view v-if="(plugins_intellectstools_data || null) != null" class="bg-white padding-main border-radius-main spacing-mb">
<view v-if="(plugins_intellectstools_data.service_msg || null) != null" class="cr-red margin-bottom">{{ plugins_intellectstools_data.service_msg }}</view>
<button type="default" size="mini" class="bg-main br-main cr-white text-size-sm padding-left-xxxl padding-right-xxxl round" @tap="plugins_intellectstools_service_open_event">
<view class="dis-inline-block va-m margin-right-sm lh-0">
<uni-icons type="chatbubble" size="34rpx" color="#fff"></uni-icons>
</view>
<text>{{$t('user.user.ki1nor')}}</text>
</button>
</view>
<!-- 基础信息 -->
<view v-if="aftersale_data != null && is_create_aftersale == 0">
<!-- 退货地址 -->
@ -51,11 +40,96 @@
<!-- 提示 -->
<view class="bg-white padding-main border-radius-main spacing-mb">
<!-- 售后状态退货取消智能工具箱插件客服信息 -->
<view class="fw-b text-size" :class="aftersale_data.status == 3 ? 'cr-green' : (aftersale_data.status == 4 ? 'cr-red' : '')">{{ aftersale_data.tips_msg.title }}</view>
<view v-if="(aftersale_data.tips_msg.desc || null) != null" class="cr-grey margin-top-sm">{{ aftersale_data.tips_msg.desc }}</view>
<view v-if="(aftersale_data.status != 3 && aftersale_data.status != 5) || (aftersale_data.status == 1 && aftersale_data.type == 1 && return_goods_address != null)" class="margin-top-sm oh">
<button v-if="aftersale_data.status == 1 && aftersale_data.type == 1 && return_goods_address != null" class="bg-green br-green cr-white round dis-inline-block margin-right-xl" type="default" size="mini" @tap="delivery_submit_event">{{$t('user-orderaftersale-detail.user-orderaftersale-detail.uuhf62')}}</button>
<button v-if="aftersale_data.status != 3 && aftersale_data.status != 5" class="bg-yellow br-yellow cr-white round dis-inline-block" type="default" size="mini" @tap="cancel_event" hover-class="none">{{$t('common.cancel')}}</button>
<view v-if="(plugins_intellectstools_data || null) != null && (plugins_intellectstools_data.service_msg || null) != null" class="cr-grey margin-top-sm">{{ plugins_intellectstools_data.service_msg }}</view>
<view v-if="(aftersale_data.status != 3 && aftersale_data.status != 5) || (aftersale_data.status == 1 && aftersale_data.type == 1 && return_goods_address != null) || ((plugins_intellectstools_data || null) != null) || ((plugins_shop_data || null) != null && (plugins_shop_data.status || 0) == 1 && (plugins_shop_data.dispute_data || null) == null)" class="margin-top-sm oh">
<button v-if="aftersale_data.status == 1 && aftersale_data.type == 1 && return_goods_address != null" class="bg-green br-green cr-white round margin-right" type="default" size="mini" @tap="delivery_submit_event">{{$t('user-orderaftersale-detail.user-orderaftersale-detail.uuhf62')}}</button>
<button v-if="aftersale_data.status != 3 && aftersale_data.status != 5" class="bg-yellow br-yellow cr-white round margin-right" type="default" size="mini" @tap="cancel_event" hover-class="none">{{$t('common.cancel')}}</button>
<button v-if="(plugins_intellectstools_data || null) != null" type="default" size="mini" class="bg-green br-green cr-white round margin-right" @tap="plugins_intellectstools_service_open_event" hover-class="none">{{$t('common.customer_service')}}</button>
<button v-if="(plugins_shop_data || null) != null && (plugins_shop_data.status || 0) == 1 && (plugins_shop_data.dispute_data || null) == null" type="default" size="mini" class="bg-main br-main cr-white round" @tap="plugins_shop_dispute_interfere_open_event" hover-class="none"></button>
</view>
</view>
<!-- 售后争议 -->
<view v-if="(plugins_shop_data || null) != null && (plugins_shop_data.status || 0) == 1 && (plugins_shop_data.dispute_data || null) != null" class="panel-item padding-main border-radius-main bg-white spacing-mb">
<view class="br-b padding-bottom-main fw-b text-size">{{$t('common.dispute_chat')}}</view>
<view class="panel-content">
<view v-if="chat_user_list.length > 0" class="chat-head oh flex-row gap-10 tc margin-top">
<view v-for="(item, index) in chat_user_list" :key="index">
<view class="chat-user-avatar">
<image :src="item.chat_avatar" class="image br-grey-f5 circle" mode="aspectFit"></image>
<view class="chat-user-status auto pr bg-white circle">
<iconfont name="icon-select" size="28rpx" :class="item.status == 1 ? 'cr-green' : 'cr-grey'"></iconfont>
</view>
</view>
<view class="text-size-sm">{{item.chat_user}}{{item.chat_user_type_name}}</view>
</view>
</view>
<scroll-view scroll-y="true" :scroll-top="chat_content_scroll_top_value" :scroll-with-animation="true" class="chat-content bs-bb bg-grey-f5 oh margin-top padding radius">
<view v-if="chat_more_submit_status" class="padding-top-sm padding-bottom-xl tc">
<view class="dis-inline-block cr-blue" @tap="chat_more_submit_event">
<text class="dis-inline-block">{{$t('common.view_history')}}</text>
<view class="dis-inline-block margin-left-xs">
<iconfont name="icon-angle-double-up" size="24rpx" class="cr-blue"></iconfont>
</view>
</view>
</view>
<view v-if="chat_loading_status" class="padding-top-sm padding-bottom-xl tc">
<text class="cr-grey">{{$t('common.loading_in_text')}}</text>
</view>
<view v-if="chat_no_data_status" class="padding-top-xxxxl tc">
<text class="cr-grey">{{$t('common.no_chat_record')}}</text>
</view>
<view v-if="(chat_error_msg || null) != null" class="padding-top-xxxxl tc">
<text class="cr-grey">{{chat_error_msg}}</text>
</view>
<block v-if="chat_data_list.length > 0">
<view v-for="(item, index) in chat_data_list" :key="index" class="chat-item oh padding-bottom-lg">
<view v-if="item.chat_user_type == chat_user_type" class="flex-row align-s gap-10 fr">
<view class="content oh">
<view class="tr">
<view class="cr-grey text-size-xss">{{item.add_time}}</view>
<view class="cr-base">{{item.chat_user}}{{item.chat_user_type_name}}</view>
</view>
<view class="bg-white radius padding-sm margin-top-sm fr">
<image v-if="item.type == 1" :src="item.content" @tap="image_show_event" :data-value="item.content" class="content-image radius dis-block" mode="aspectFit"></image>
<video v-else-if="item.type == 2" :src="item.content" class="content-video radius dis-block" controls></video>
<block v-else>
<view v-for="(items, indexs) in item.content" :key="indexs">
{{items}}
</view>
</block>
</view>
</view>
<image :src="item.chat_avatar" class="image br-grey-f5 circle" mode="aspectFit"></image>
</view>
<view v-else class="flex-row align-s gap-10 fl">
<image :src="item.chat_avatar" class="image br-grey-f5 circle" mode="aspectFit"></image>
<view class="content oh">
<view class="tl">
<view class="cr-grey text-size-xss">{{item.add_time}}</view>
<view class="cr-base">{{item.chat_user}}{{item.chat_user_type_name}}</view>
</view>
<view class="bg-white radius padding-sm margin-top-sm fl">
<image v-if="item.type == 1" :src="item.content" @tap="image_show_event" :data-value="item.content" class="content-image radius dis-block" mode="aspectFit"></image>
<video v-else-if="item.type == 2" :src="item.content" class="content-video radius dis-block" controls></video>
<block v-else>
<view v-for="(items, indexs) in item.content" :key="indexs">
{{items}}
</view>
</block>
</view>
</view>
</view>
</view>
</block>
</scroll-view>
<view v-if="chat_send_submit_status" class="chat-input flex-row align-s margin-top-sm">
<textarea :placeholder="$t('common.input_enter_chat_tips')" class="chat-send-input ht-auto padding-sm br radius" :value="chat_input_value" @input="chat_input_event" placeholder-class="cr-grey"></textarea>
<button type="default" size="mini" class="chat-send-submit bg-main br-main cr-white radius" @tap="chat_send_submit_event" :disabled="chat_send_submit_disabled_status" hover-class="none">{{$t('common.send')}}</button>
</view>
</view>
</view>
@ -124,16 +198,12 @@
</view>
<view v-if="form_type == 1" class="form-gorup">
<view class="form-gorup-title"
>{{$t('user-orderaftersale-detail.user-orderaftersale-detail.85pnkf')}}<text class="form-group-tips">{{$t('user-orderaftersale-detail.user-orderaftersale-detail.84upo4')}}{{ returned_data.returned_quantity }}</text></view
>
<view class="form-gorup-title">{{$t('user-orderaftersale-detail.user-orderaftersale-detail.85pnkf')}}<text class="form-group-tips">{{$t('user-orderaftersale-detail.user-orderaftersale-detail.84upo4')}}{{ returned_data.returned_quantity }}</text></view>
<slider @change="form_number_event" min="0" :max="returned_data.returned_quantity" step="1" :value="returned_data.returned_quantity" show-value></slider>
</view>
<view class="form-gorup">
<view class="form-gorup-title"
>{{$t('order-detail.order-detail.v52n5r')}}<text class="form-group-tips">{{$t('user-orderaftersale-detail.user-orderaftersale-detail.1252if')}}{{ returned_data.refund_price }}</text></view
>
<view class="form-gorup-title">{{$t('order-detail.order-detail.v52n5r')}}<text class="form-group-tips">{{$t('user-orderaftersale-detail.user-orderaftersale-detail.1252if')}}{{ returned_data.refund_price }}</text></view>
<input type="digit" @input="form_price_event" placeholder-class="cr-grey" class="cr-base" :placeholder="$t('user-orderaftersale-detail.user-orderaftersale-detail.9kvu52')" :value="form_price" />
</view>
@ -173,7 +243,7 @@
<!-- 退货弹层 -->
<component-popup :propShow="popup_delivery_status" propPosition="bottom" @onclose="popup_delivery_close_event">
<view class="delivery-popup bg-white padding-horizontal-main padding-top-main">
<view class="bg-white padding-horizontal-main padding-top-main">
<view class="fr oh">
<view class="fr" @tap.stop="popup_delivery_close_event">
<iconfont name="icon-close-line" size="28rpx" color="#999"></iconfont>
@ -197,7 +267,7 @@
</view>
</component-popup>
<!-- 客服弹窗 -->
<!-- 智能工具箱 - 客服弹窗 -->
<component-popup :propShow="plugins_intellectstools_service_status" propPosition="bottom" @onclose="plugins_intellectstools_service_close_event">
<view class="padding-top-main bg-white">
<view class="padding-horizontal-main">
@ -221,7 +291,7 @@
<text class="cp" @tap="text_event" data-event="copy" :data-value="plugins_intellectstools_data.service_qq">{{ plugins_intellectstools_data.service_qq }}</text>
</view>
<view v-if="(plugins_intellectstools_data.service_tel || null) != null" class="item padding-main br-t-f9 single-text">
<text>{{$t('order.order.7dxbm5')}}</text>
<text>{{$t('order.order.7dxbm5')}}</text>
<text class="cp" @tap="text_event" data-event="tel" :data-value="plugins_intellectstools_data.service_tel">{{ plugins_intellectstools_data.service_tel }}</text>
</view>
<view v-if="(plugins_intellectstools_data.service_weixin || null) != null || (plugins_intellectstools_data.service_line || null) != null" class="oh qrcode tc br-t-f9 padding-top-main">
@ -239,6 +309,32 @@
</view>
</component-popup>
<!-- 多商户订单售后 - 平台介入弹窗 -->
<component-popup :propShow="plugins_shop_dispute_interfere_status" propPosition="bottom" @onclose="plugins_shop_dispute_interfere_close_event">
<view class="bg-white padding-horizontal-main padding-top-main">
<view class="fr oh">
<view class="fr" @tap.stop="plugins_shop_dispute_interfere_close_event">
<iconfont name="icon-close-line" size="28rpx" color="#999"></iconfont>
</view>
</view>
<view class="margin-top-xxxl">
<view v-if="(plugins_shop_data || null) != null" class="form-container">
<view class="cr-red padding-vertical padding-horizontal-lg">{{plugins_shop_data.apply_dispute_tips}}</view>
<view class="form-gorup">
<view class="form-gorup-title">{{$t('user-orderaftersale-detail.user-orderaftersale-detail.87tuff')}}<text class="form-group-tips-must">*</text></view>
<input type="text" @input="form_dispute_describe_value_event" placeholder-class="cr-grey" class="cr-base br-b" :placeholder="$t('user-orderaftersale-detail.user-orderaftersale-detail.6uygft')" :value="form_dispute_describe_value" />
</view>
<view class="form-gorup form-gorup-submit">
<button class="bg-main br-main cr-white round text-size" type="default" @tap="form_dispute_describe_submit_event" hover-class="none" :disabled="form_dispute_describe_button_disabled">{{$t('common.submit')}}</button>
</view>
</view>
<block v-else>
<component-no-data propStatus="0"></component-no-data>
</block>
</view>
</view>
</component-popup>
<!-- 公共 -->
<component-common ref="common"></component-common>
</view>
@ -369,6 +465,23 @@
//
plugins_intellectstools_data: null,
plugins_intellectstools_service_status: false,
//
plugins_shop_data: null,
plugins_shop_dispute_interfere_status: false,
form_dispute_describe_value: '',
form_dispute_describe_button_disabled: false,
chat_input_value: '',
chat_user_type: 0,
chat_send_submit_disabled_status: false,
chat_send_submit_status: false,
chat_more_submit_status: false,
chat_loading_status: false,
chat_no_data_status: false,
chat_error_msg: '',
chat_user_list: [],
chat_data_list: [],
chat_data_timer: null,
chat_content_scroll_top_value: 0,
};
},
@ -388,15 +501,15 @@
params: params,
popup_delivery_status: (params.is_delivery_popup || 0) == 1,
});
//
this.init();
},
onShow() {
//
app.globalData.page_event_onshow_handle();
//
this.init();
// onshow
if ((this.$refs.common || null) != null) {
this.$refs.common.on_show();
@ -406,6 +519,11 @@
app.globalData.page_share_handle();
},
//
onUnload: function () {
clearInterval(this.chat_data_timer);
},
//
onPullDownRefresh() {
this.init();
@ -442,7 +560,11 @@
return_goods_address: data.return_goods_address || null,
form_price: data.returned_data || null != null ? data.returned_data.refund_price : '',
plugins_intellectstools_data: data.plugins_intellectstools_data || null,
plugins_shop_data: data.plugins_shop_data || null,
});
//
this.chat_data('init');
} else {
this.setData({
data_list_loding_status: 0,
@ -796,7 +918,10 @@
uni.hideLoading();
if (res.data.code == 0) {
app.globalData.showToast(res.data.msg, "success");
this.init();
var self = this;
setTimeout(function () {
self.init();
}, 1000);
} else {
if (app.globalData.is_login_check(res.data)) {
app.globalData.showToast(res.data.msg);
@ -836,6 +961,279 @@
plugins_intellectstools_service_status: false,
});
},
//
plugins_shop_dispute_interfere_open_event(e) {
this.setData({
plugins_shop_dispute_interfere_status: true,
});
},
//
plugins_shop_dispute_interfere_close_event(e) {
this.setData({
plugins_shop_dispute_interfere_status: false,
});
},
//
form_dispute_describe_value_event(e) {
this.setData({
form_dispute_describe_value: e.detail.value,
});
},
//
form_dispute_describe_submit_event(e) {
var value = this.form_dispute_describe_value;
if(value === '') {
app.globalData.showToast(this.$t('user-orderaftersale-detail.user-orderaftersale-detail.6uygft'));
return;
}
uni.showLoading({
title: this.$t('common.processing_in_text'),
});
this.setData({
form_dispute_describe_button_disabled: true,
});
uni.request({
url: app.globalData.get_request_url("usercreate", "orderaftersaledispute", "shop"),
method: "POST",
data: {
order_aftersale_id: this.aftersale_data.id,
describe: value
},
dataType: "json",
success: (res) => {
uni.hideLoading();
this.setData({
form_dispute_describe_button_disabled: false,
});
if (res.data.code == 0) {
app.globalData.showToast(res.data.msg, "success");
this.setData({
plugins_shop_dispute_interfere_status: false,
});
var self = this;
setTimeout(function () {
self.init();
}, 1000);
} else {
if (app.globalData.is_login_check(res.data)) {
app.globalData.showToast(res.data.msg);
} else {
app.globalData.showToast(this.$t('common.sub_error_retry_tips'));
}
}
},
fail: () => {
uni.hideLoading();
this.setData({
form_dispute_describe_button_disabled: false,
});
app.globalData.showToast(this.$t('common.internet_error_tips'));
},
});
},
//
// type add | init | history
chat_data(type = 'init') {
//
if((this.plugins_shop_data || null) != null && parseInt(this.plugins_shop_data.status || 0) == 1 && (this.plugins_shop_data.dispute_data || null) != null) {
//
this.setData({
chat_send_submit_status: this.plugins_shop_data.dispute_data.status <= 2,
});
//
var order_aftersale_dispute_id = 0;
var temp_chat_data_list = this.chat_data_list;
if(temp_chat_data_list.length > 0) {
var index = (type == 'history') ? 0 : temp_chat_data_list.length-1;
order_aftersale_dispute_id = temp_chat_data_list[index]['id']
}
if(type == 'init' || type == 'history')
{
this.setData({
chat_more_submit_status: false,
chat_loading_status: true,
});
}
uni.request({
url: app.globalData.get_request_url("userchatdata", "orderaftersaledispute", "shop"),
method: "POST",
data: {
type: type,
order_aftersale_id: this.aftersale_data.id,
order_aftersale_dispute_id: order_aftersale_dispute_id,
},
dataType: "json",
success: (res) => {
if (res.data.code == 0) {
// id
var data = res.data.data.data;
if(data.length > 0)
{
if(type == 'init')
{
data = data.reverse();
}
for(var i in data)
{
this.chat_data_merge(data[i], type);
}
}
//
if(type == 'init' || type == 'history')
{
this.setData({
chat_more_submit_status: (res.data.data.count > 0),
chat_loading_status: false,
});
}
//
if(res.data.data.user_list.length > 0)
{
this.setData({
chat_user_list: res.data.data.user_list,
});
}
//
if(type == 'init')
{
//
this.setData({
chat_no_data_status: res.data.data.data.length == 0
});
//
var self = this;
if(self.chat_send_submit_status)
{
var timer = setInterval(function()
{
self.chat_data('add');
}, 6000);
self.setData({
chat_data_timer: timer
});
}
}
} else {
if(type == 'init')
{
this.setData({
chat_error_msg: res.data.msg,
chat_loading_status: false,
});
} else {
app.globalData.showToast(res.data.msg);
}
}
},
fail: () => {
var msg = this.$t('common.internet_error_tips');
if(type == 'init')
{
this.setData({
chat_error_msg: msg,
chat_loading_status: false,
});
} else {
app.globalData.showToast(msg);
}
},
});
}
},
//
// item
// type add | init | history
chat_data_merge(item, type) {
var temp_chat_data_list = this.chat_data_list;
if(type == 'history') {
temp_chat_data_list.unshift(item);
} else {
temp_chat_data_list.push(item);
}
this.setData({
chat_data_list: temp_chat_data_list,
chat_no_data_status: temp_chat_data_list.length == 0,
});
//
if(type == 'add') {
var self = this;
setTimeout(function() {
const query = uni.createSelectorQuery().in(self);
query.selectAll('.chat-content .chat-item').boundingClientRect();
query.exec(res => {
const scrollContentHeight = res[0].reduce((total, item) => total + item.height, 0);
self.setData({
chat_content_scroll_top_value: scrollContentHeight,
});
});
});
}
},
//
chat_input_event(e) {
this.setData({
chat_input_value: e.detail.value,
});
},
//
chat_send_submit_event(e) {
if(this.chat_input_value !== '') {
this.setData({
chat_send_submit_disabled_status: true,
});
uni.request({
url: app.globalData.get_request_url("userchatsend", "orderaftersaledispute", "shop"),
method: "POST",
data: {
order_aftersale_id: this.aftersale_data.id,
content: this.chat_input_value
},
dataType: "json",
success: (res) => {
this.setData({
chat_send_submit_disabled_status: false,
});
if(res.data.code == 0)
{
this.setData({
chat_input_value: '',
});
this.chat_data_merge(res.data.data, 'add');
} else {
if (app.globalData.is_login_check(res.data, this, "chat_send_submit_event")) {
app.globalData.showToast(res.data.msg);
}
}
},
fail: () => {
this.setData({
chat_send_submit_disabled_status: false,
});
app.globalData.showToast(this.$t('common.internet_error_tips'));
},
});
}
},
// -
chat_more_submit_event(e) {
this.chat_data('history');
},
//
image_show_event(e) {
@ -855,7 +1253,7 @@
// url
url_event(e) {
app.globalData.url_event(e);
}
},
},
};
</script>

View File

@ -119,7 +119,7 @@
<view v-if="(common_app_customer_service_tel || null) != null" class="nav-item br-t cp padding-main" @tap="call_event">
<view class="arrow-right">
<image :src="common_static_url + 'customer-service-icon.png'" class="item-icon va-m" mode="widthFix"></image>
<text class="item-name va-m cr-base margin-left-sm text-size-sm">{{ $t('user.user.ki1nor') }}</text>
<text class="item-name va-m cr-base margin-left-sm text-size-sm">{{ $t('common.tel_service') }}</text>
</view>
</view>
</view>
@ -139,7 +139,7 @@
<!-- 联系客服 -->
<view v-if="(common_app_customer_service_tel || null) != null" class="nav-item padding-vertical-main padding-horizontal-xs fl tc cp" @tap="call_event">
<image :src="common_static_url + 'customer-service-icon.png'" class="item-icon" mode="widthFix"></image>
<view class="item-name single-text cr-base text-size-sm">{{ $t('user.user.ki1nor') }}</view>
<view class="item-name single-text cr-base text-size-sm">{{ $t('common.tel_service') }}</view>
</view>
</view>
</view>

File diff suppressed because one or more lines are too long