Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-uniapp

master
Yer 2023-09-19 17:18:46 +08:00
commit 2aed3b9305
2 changed files with 82 additions and 2 deletions

View File

@ -218,3 +218,13 @@ export function fillShipInfo(afterSaleSn, params) {
data: params,
});
}
// 添加交易投诉对话
export function communication(params) {
return http.request({
url: `/order/complain/communication`,
method: Method.POST,
needToken: true,
params
});
}

View File

@ -35,6 +35,13 @@
</view>
</view>
<view class="speak-way" v-else></view>
<view class="tips">回复对话</view>
<view class="cell-item complain-content">
<view class="cell-view content">
<u-input type="textarea" height="70rpx" auto-height v-model="complainValue" />
</view>
</view>
<view class="submit-btn" @click="handleSubmit"></view>
<view class="tips">平台仲裁</view>
<u-cell-group>
<u-cell-item :arrow="false" title="仲裁意见" :value="complainDetail.arbitrationResult || '暂无'"></u-cell-item>
@ -43,13 +50,15 @@
</template>
<script>
import { getComplainDetail } from "@/api/after-sale";
import { getComplainDetail, communication } from "@/api/after-sale";
export default {
data() {
return {
complainId: "",
complainValue: "", //
complainDetail: "", //
statusData: {
NEW: "新投诉",
NEW: "新投诉",
NO_APPLY: "未申请",
APPLYING: "申请中",
COMPLETE: "已完成",
@ -61,6 +70,7 @@ export default {
},
onLoad(option) {
this.complainId = option.id;
this.init(option.id);
},
methods: {
@ -78,6 +88,38 @@ export default {
},
});
},
handleSubmit() {
if (!this.complainValue) {
uni.showToast({
title: "请输入回复内容",
duration: 2000,
icon: "none",
});
return;
}
let params = {
content: this.complainValue,
complainId: this.complainId,
};
communication(params).then((res) => {
if (res.data.success) {
uni.showToast({
title: "回复成功",
duration: 2000,
icon: "none",
});
this.complainValue = '';
this.init(this.complainId);
} else {
uni.showToast({
title: res.data.message,
duration: 2000,
icon: "none",
});
}
});
},
/**
* 初始化投诉详情
*/
@ -126,4 +168,32 @@ export default {
.tips {
margin: 40rpx 32rpx;
}
.cell {
width: 100%;
background: #fff;
padding: 26rpx;
}
.complain-content {
margin: 40rpx 32rpx;
display: flex;
align-items: center;
.content {
width: 100%;
}
.title {
width: 140rpx;
}
}
.submit-btn {
width: 70%;
margin: 0 auto;
height: 80rpx;
line-height: 80rpx;
color: #fff;
text-align: center;
background: $light-color;
margin-top: 20px;
border-radius: 200px;
}
</style>