Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-uniapp
commit
2aed3b9305
|
@ -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
|
||||
});
|
||||
}
|
|
@ -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,10 +50,12 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getComplainDetail } from "@/api/after-sale";
|
||||
import { getComplainDetail, communication } from "@/api/after-sale";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
complainId: "",
|
||||
complainValue: "", //回复内容
|
||||
complainDetail: "", //投诉详情
|
||||
statusData: {
|
||||
NEW: "新投诉",
|
||||
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue