·修改部分页面数据冗余

This commit is contained in:
lemon橪
2021-05-14 17:31:40 +08:00
parent 23804939eb
commit 7f4212755d
42 changed files with 1415 additions and 2987 deletions

View File

@@ -323,6 +323,9 @@ export default {
},
},
methods: {
/**
* 点击图片放大或保存
*/
preview(urls, index) {
uni.previewImage({
current: index,

View File

@@ -37,7 +37,7 @@
<view class="cell-view"> {{ complainTopic }} </view>
<u-icon style="margin-left: 20rpx" name="arrow-down"></u-icon>
</view>
<view class="cell-item complain-content">
<view class="cell-title title"> 投诉内容 </view>
<view class="cell-view content">
@@ -47,7 +47,8 @@
<view class="cell-item">
<view class="cell-title"> 投诉凭证 </view>
<view class="cell-view">
<u-upload ref="uUpload" :header=" { accessToken: storage.getAccessToken() }" upload-text="" :show-progress="false" :action="action" width="100" @on-uploaded="onUploaded" :max-count="5"></u-upload>
<u-upload ref="uUpload" :header=" { accessToken: storage.getAccessToken() }" upload-text="" :show-progress="false" :action="action" width="100" @on-uploaded="onUploaded" :max-count="5">
</u-upload>
</view>
</view>
</view>
@@ -65,8 +66,9 @@ export default {
data() {
return {
storage,
action: upload,
action: upload, //上传图片地址
orderStatusList: {
//订单状态列表
UNDELIVERED: "待发货",
UNPAID: "未付款",
PAID: "已付款",
@@ -77,45 +79,44 @@ export default {
},
complainValue: "", //投诉内容
complainShow: false, //投诉主题开关
complainTopic: "",
// 投诉列表
complainList: [],
images: [],
order: "",
orderGoodsList: "",
orderDetail: "",
complainTopic: "", //投诉抱怨话题
complainList: [], // 投诉列表
images: [], //投诉内容图片
order: "", //订单
orderGoodsList: "", //订单商品
orderDetail: "", //订单详情
sn: "",
skuId: "",
skuId: "", //商品skuid
};
},
onLoad(option) {
console.log(option);
this.loadData(option.sn);
this.sn = option.sn;
this.skuId = option.skuId;
},
mounted() {
this.getReasion();
},
methods: {
onUploaded(lists) {
console.log(lists);
let images = [];
methods: {
/**
* 上传完成
*/
onUploaded(lists) {
let images = [];
lists.forEach((item) => {
images.push(item.response.result);
});
this.images = images;
console.log(this.images);
},
// 提交
/**
* 提交
*/
handleSumit() {
// 循环出商品
let goods = this.orderGoodsList.filter((item) => {
return item.skuId == this.skuId;
});
//数据赋值
let data = {
complainTopic: this.complainTopic, //投诉主题,
content: this.complainValue, //投诉内容
@@ -124,7 +125,6 @@ export default {
orderSn: this.sn, //订单号
skuId: this.skuId, //skuid
};
addComplain(data).then((res) => {
if (res.data.success) {
uni.showToast({
@@ -142,6 +142,9 @@ export default {
});
},
/**
* 获取投诉原因
*/
getReasion() {
getComplainReason().then((res) => {
if (res.data.result.length >= 1) {
@@ -153,10 +156,13 @@ export default {
this.complainList.push(way);
});
this.complainTopic = res.data.result[0].reason;
console.log(this.complainTopic);
}
});
},
/**
* 加载订单详情
*/
loadData(sn) {
uni.showLoading({
title: "加载中",
@@ -166,12 +172,14 @@ export default {
this.order = order.order;
this.orderGoodsList = order.orderItems;
this.orderDetail = res.data.result;
uni.hideLoading();
});
},
/**
* 确认投诉
*/
confirmComplain(e) {
console.log(e);
this.complainTopic = e[0].label;
},
},

View File

@@ -2,76 +2,28 @@
<view class="wrapper">
<view class="tips">我的投诉信息</view>
<u-cell-group>
<u-cell-item
:arrow="false"
:value="detail.goodsName"
title="投诉商品"
></u-cell-item>
<u-cell-item
:arrow="false"
:value="statusData[detail.complainStatus]"
title="投诉状态"
></u-cell-item>
<u-cell-item
:arrow="false"
:value="detail.createTime"
title="投诉时间"
></u-cell-item>
<u-cell-item
:arrow="false"
:value="detail.complainTopic"
title="投诉主题"
></u-cell-item>
<u-cell-item
:arrow="false"
:value="detail.content"
title="投诉内容"
></u-cell-item>
<view class="row" v-if="detail.orderComplaintImages">
<u-image
width="100rpx"
height="100rpx"
border-radius="10"
style="margin: 0 10rpx"
v-for="(item, index) in detail.orderComplaintImages"
:key="index"
:src="item"
@click="preview(detail.orderComplaintImages, index)"
/>
<u-cell-item :arrow="false" :value="complainDetail.goodsName" title="投诉商品"></u-cell-item>
<u-cell-item :arrow="false" :value="statusData[complainDetail.complainStatus]" title="投诉状态"></u-cell-item>
<u-cell-item :arrow="false" :value="complainDetail.createTime" title="投诉时间"></u-cell-item>
<u-cell-item :arrow="false" :value="complainDetail.complainTopic" title="投诉主题"></u-cell-item>
<u-cell-item :arrow="false" :value="complainDetail.content" title="投诉内容"></u-cell-item>
<view class="row" v-if="complainDetail.orderComplaintImages">
<u-image width="100rpx" height="100rpx" border-radius="10" style="margin: 0 10rpx" v-for="(item, index) in complainDetail.orderComplaintImages" :key="index" :src="item"
@click="preview(complainDetail.orderComplaintImages, index)" />
</view>
</u-cell-group>
<view class="tips">商家申诉信息</view>
<u-cell-group>
<u-cell-item
:arrow="false"
:value="detail.appealTime || '暂无'"
title="申诉时间"
></u-cell-item>
<u-cell-item
:arrow="false"
:value="detail.appealContent || '暂无'"
title="申诉内容"
></u-cell-item>
<view class="row" v-if="detail.appealImagesList">
<u-image
width="100rpx"
height="100rpx"
border-radius="10"
style="margin: 0 10rpx"
v-for="(item, index) in detail.appealImagesList"
@click="preview(detail.appealImagesList, index)"
:key="index"
:src="item"
/>
<u-cell-item :arrow="false" :value="complainDetail.appealTime || '暂无'" title="申诉时间"></u-cell-item>
<u-cell-item :arrow="false" :value="complainDetail.appealContent || '暂无'" title="申诉内容"></u-cell-item>
<view class="row" v-if="complainDetail.appealImagesList">
<u-image width="100rpx" height="100rpx" border-radius="10" style="margin: 0 10rpx" v-for="(item, index) in complainDetail.appealImagesList"
@click="preview(complainDetail.appealImagesList, index)" :key="index" :src="item" />
</view>
</u-cell-group>
<view class="tips">对话详情</view>
<view class="speak-way" v-if="detail.orderComplaintCommunications">
<view
class="speak-msg seller"
:key="i"
v-for="(complaint, i) in detail.orderComplaintCommunications"
>
<view class="speak-way" v-if="complainDetail.orderComplaintCommunications">
<view class="speak-msg seller" :key="i" v-for="(complaint, i) in complainDetail.orderComplaintCommunications">
{{
complaint.owner == "PLATFORM"
? "平台"
@@ -85,11 +37,7 @@
<view class="speak-way" v-else>暂无对话</view>
<view class="tips">平台仲裁</view>
<u-cell-group>
<u-cell-item
:arrow="false"
title="仲裁意见"
:value="detail.arbitrationResult || '暂无'"
></u-cell-item>
<u-cell-item :arrow="false" title="仲裁意见" :value="complainDetail.arbitrationResult || '暂无'"></u-cell-item>
</u-cell-group>
</view>
</template>
@@ -99,8 +47,7 @@ import { getComplainDetail } from "@/api/after-sale";
export default {
data() {
return {
detail: "",
complainDetail: "", //投诉详情
statusData: {
NO_APPLY: "未申请",
APPLYING: "申请中",
@@ -110,10 +57,14 @@ export default {
},
};
},
onLoad(option) {
this.init(option.id);
},
methods: {
/**
* 点击图片放大或保存
*/
preview(urls, index) {
uni.previewImage({
current: index,
@@ -125,24 +76,29 @@ export default {
},
});
},
/**
* 初始化投诉详情
*/
init(id) {
uni.showLoading({
title: "加载中",
});
getComplainDetail(id).then((res) => {
if (res.data.success) {
this.detail = res.data.result;
this.complainDetail = res.data.result;
} else {
uni.showToast({
title: res.data.message,
duration: 2000,
icon: "none",
});
}
uni.hideLoading();
});
},
},
mounted() {},
};
</script>
<style lang="scss" scoped>
.row {
display: flex;

View File

@@ -1,10 +1,6 @@
<template>
<view>
<view
class="seller-view"
v-for="(item, index) in complaionData"
:key="index"
>
<view class="seller-view" v-for="(item, index) in complaionData" :key="index">
<view class="seller-info u-flex u-row-between">
<view class="seller-name">
<view class="name">{{ item.storeName }}</view>
@@ -14,12 +10,7 @@
<u-line color="#DCDFE6"></u-line>
<view class="goods-item-view">
<view class="goods-img" @click="handleToGoods(item)">
<u-image
border-radius="6"
width="131rpx"
height="131rpx"
:src="item.goodsImage"
></u-image>
<u-image border-radius="6" width="131rpx" height="131rpx" :src="item.goodsImage"></u-image>
</view>
<view class="goods-info" @click="handleToGoods(item)">
<view class="goods-title u-line-2">{{ item.goodsName }}</view>
@@ -37,34 +28,16 @@
<view class="complain-speak"> {{ item.complainTopic }} </view>
</view>
<view class="complain-btn">
<u-tag
mode="plain"
@click="handleClear(item)"
class="complain-tag"
text="撤销投诉"
type="info"
v-if="
<u-tag mode="plain" @click="handleClear(item)" class="complain-tag" text="撤销投诉" type="info" v-if="
item.complainStatus != 'EXPIRED' && item.complainStatus != 'CANCEL'
"
/>
<u-tag
mode="plain"
@click="handleInfo(item)"
class="complain-tag"
text="投诉详情"
type="info"
/>
" />
<u-tag mode="plain" @click="handleInfo(item)" class="complain-tag" text="投诉详情" type="info" />
</view>
</view>
<view v-if="empty" style="margin-top: 40rpx">
<u-empty text="暂无投诉列表" mode="list"></u-empty>
</view>
<u-modal
show-cancel-button
@confirm="handleClearConfirm"
v-model="show"
:content="content"
></u-modal>
<u-empty v-if="empty" :style="{'marginTop':complaionDetail.total == 0 ? '200rpx':'0rpx'}" class="empty" style="" text="暂无投诉列表" mode="list"></u-empty>
<u-modal show-cancel-button @confirm="handleClearConfirm" v-model="show" :content="content"></u-modal>
</view>
</template>
@@ -87,38 +60,49 @@ export default {
params: {
pageNumber: 1,
pageSize: 20,
// memberId: "",
// memberName: "",
},
complaionData: [],
complaionDetail: "", //返回的整个response
complaionData: [], //投诉列表
empty: false,
rows: "",
checkComplainData: "", //存储投诉信息
};
},
mounted() {
this.init();
},
/**
* 触底加载
*/
onReachBottom() {
this.params.pageNumber++;
this.init();
if (
this.complaionDetail &&
this.complaionDetail.total < this.params.pageNumber * this.params.pageSize
) {
this.params.pageNumber++;
this.init();
}
},
methods: {
// 点击跳转到商品
handleToGoods(val) {
uni.navigateTo({
url: "/pages/product/goods?id=" + val.skuId+"&goodsId="+val.goodsId,
url: "/pages/product/goods?id=" + val.skuId + "&goodsId=" + val.goodsId,
});
},
// 撤销投诉
/**
* 点击撤销投诉
*/
handleClear(val) {
console.log(val);
this.show = true;
this.rows = val;
this.checkComplainData = val;
},
/**
* 执行撤销
*/
handleClearConfirm() {
clearComplain(this.rows.id).then((res) => {
clearComplain(this.checkComplainData.id).then((res) => {
if (res.data.success) {
uni.showToast({
title: "撤销成功",
@@ -131,19 +115,25 @@ export default {
}
});
},
/**
* 查看详情
*/
handleInfo(val) {
uni.navigateTo({
url: "./complainInfo?id=" + val.id,
});
},
/**
* 初始化投诉列表
*/
init() {
uni.showLoading({
title: "加载中",
});
getComplain(this.params).then((res) => {
console.log(res);
this.complaionDetail = res.data.result;
if (res.data.result.records.length >= 1) {
this.complaionData.push(...res.data.result.records);
} else {
@@ -185,4 +175,7 @@ export default {
.complain-tag {
margin-left: 10rpx;
}
.empty {
margin-top: 40rpx;
}
</style>

View File

@@ -1,241 +0,0 @@
<template>
<view class="page-main">
<view class="after-sales-goods-detail-view">
<view>
<view class="goods-item-view">
<view class="goods-img"><u-image width="131rpx" height="131rpx" :src="order.goods_img"></u-image></view>
<view class="goods-info">
<view class="goods-title u-line-2">{{ order.goodsName }}</view>
<view class="goods-specs">/</view>
<view class="goods-price"></view>
</view>
<view class="goods-num"><view></view></view>
</view>
</view>
</view>
<view class="info-evaluate-view">
<view class="info-cell">
<view class="info-cell-title">初评日期{{ $u.timeFormat(order.create_time, 'yyyy-mm-dd') }}</view>
</view>
<view class="info-cell">
<view class="info-cell-title">初评评价{{ order.grade_str }}</view>
</view>
<view class="info-cell">
<view class="info-cell-title">初评内容{{ order.content }}</view>
</view>
<view class="info-cell"><view class="info-cell-title">初评审核状态您的初评审核通过</view></view>
</view>
<view class="info-evaluate-view">
<view class="input-view">
<u-input
height="200"
placeholder-style="font-size:12px;color:#CCCCCC"
v-model="form[0].content"
:type="type"
maxlength="500"
:border="border"
:maxlength="maxlength"
:placeholder="placeholder"
/>
</view>
<view class="input-num">
<text>{{ form[0].content.length }}/{{ maxlength }}</text>
</view>
</view>
<view class="info-evaluate-view">
<view class="images-view"><u-upload :action="action" width="150" @on-uploaded="onUploaded" :max-count="5"></u-upload></view>
</view>
<view class="submit-view"><u-button shape="circle" style="background-color: #1abc9c;color: #ffffff;" @click="onSubmit">提交</u-button></view>
<u-toast ref="uToast" />
</view>
</template>
<script>
import { commentsOrder, AppendCommentsOrder } from '@/api/members.js';
import { upload } from '@/api/common.js';
export default {
data() {
return {
value: '',
type: 'textarea',
border: false,
maxlength: 500,
placeholder: '对评价进行补充,更客观,更全面',
order: {},
form: [],
action: upload
};
},
onLoad(options) {
this.order = JSON.parse(options.order);
console.log(this.order);
let sku = {
comment_id: this.order.comment_id,
content: '',
grade: this.order.grade,
images: [],
sku_id: this.order.sku_id
};
this.form.push(sku);
},
methods: {
onSubmit() {
AppendCommentsOrder(this.form).then(res => {
if(res.statusCode == 200){
this.$refs.uToast.show({
title: '发布追评成功',
type: 'success',
url: '/pages/order/evaluate/myEvaluate'
});
}
});
},
onUploaded(lists) {
let images = [];
lists.forEach(item => {
images.push(item.response.url);
});
this.form[0].images = images;
}
}
};
</script>
<style lang="scss">
page,
.content {
background: #f1f1f1;
height: 100%;
margin-bottom: 100rpx;
}
.after-sales-goods-detail-view {
background-color: #f4f4f5;
.header {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
padding-bottom: 20rpx;
.header-text {
background-color: #f4f4f5;
padding: 10rpx 30rpx;
border-radius: 50rpx;
.seller-name {
color: #fa3534;
font-weight: 600;
}
}
}
.goods-item-view {
display: flex;
flex-direction: row;
padding: 30rpx 30rpx;
background-color: #eef1f2;
.goods-img {
}
.goods-info {
padding-left: 30rpx;
flex: 1;
.goods-title {
margin-bottom: 10rpx;
color: $font-color-dark;
}
.goods-specs {
font-size: 24rpx;
margin-bottom: 10rpx;
color: #cccccc;
}
.goods-price {
font-size: 28rpx;
margin-bottom: 10rpx;
color: #ff5a10;
}
}
.goods-num {
width: 60rpx;
color: $main-color;
}
}
.after-num {
margin: 0rpx 30rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
height: 80rpx;
}
}
.goods-evaluate-view {
margin-top: 8rpx;
padding: 30rpx;
margin-bottom: 5rpx;
background-color: #fff;
display: flex;
flex-direction: row;
align-items: center;
.goods-view {
width: 250rpx;
}
.rate-view {
display: flex;
flex-direction: row;
align-items: center;
.rate-btn {
margin: 0rpx 35rpx;
}
}
}
.info-evaluate-view {
margin: 20rpx 0;
padding: 30rpx;
background-color: #fff;
color: #666666;
align-items: center;
.input-view {
width: 100%;
}
.input-num {
color: #cccccc;
text-align: right;
}
.images-view {
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
}
.info-header {
font-size: 33rpx;
margin-bottom: 10rpx;
}
.seller-rate-view {
display: flex;
flex-direction: row;
align-items: center;
.rate-title {
width: 150rpx;
font-size: 33rpx;
}
}
.info-cell {
display: flex;
flex-direction: row;
align-items: center;
margin: 8rpx 0rpx;
}
}
.submit-view {
margin-top: 100rpx;
height: 100rpx;
width: 750rpx;
align-items: center;
padding: 10rpx 20rpx;
}
.uni-textarea-wrapper {
font-size: 24rpx;
}
.u-hairline-border:after{
border: none;
}
</style>

View File

@@ -3,13 +3,7 @@
<view class="exaluate-member-view">
<view class="member-view">
<view class="member-img">
<u-image
width="82rpx"
style="border: 1px solid #ededed"
height="82rpx"
shape="circle"
:src="comment.memberProfile || '/static/missing-face.png'"
></u-image>
<u-image width="82rpx" style="border: 1px solid #ededed" height="82rpx" shape="circle" :src="comment.memberProfile || '/static/missing-face.png'"></u-image>
</view>
<view class="member-info">
<view class="memName">{{ comment.memberName }}</view>
@@ -17,21 +11,13 @@
</view>
</view>
<view class="goods-view">
<view class="goods-title"
>商品评价: {{ gradeList[comment.grade] }}</view
>
<view class="goods-title">商品评价: {{ gradeList[comment.grade] }}</view>
<view class="goods-subtitle">
{{ comment.content }}
</view>
<view class="goods-imgs-view" v-if="comment.image != null && comment.image.length != 0">
<view
class="img-view"
v-for="(img, imgIndex) in comment.image.split(',')"
:key="imgIndex"
>
<!-- 如果有图片则会循环显示评价的图片 -->
<view class="goods-imgs-view" v-if="comment.image != null && comment.image.length != 0">
<view class="img-view" v-for="(img, imgIndex) in comment.image.split(',')" :key="imgIndex">
<u-image @click.native="preview(comment.image.split(','),imgIndex)" width="160rpx" height="160rpx" :src="img"></u-image>
</view>
</view>
@@ -39,38 +25,7 @@
{{ comment.goodsName }}
</view>
<view class="goods-subtitle"></view>
<view v-if="comment.additional_comment != null">
<view class="goods-comm">
<span style="margin-left: 10rpx">
购买{{ calcDay(comment) }}天后追加评论
</span>
<text>{{
comment.additional_comment.create_time | unixToDate
}}</text>
</view>
<view class="goods-subtitle additional">{{
comment.additional_comment.content
}}</view>
<view class="goods-imgs-view">
<view
class="img-view"
v-for="(img, imgIndex) in comment.additional_comment.images"
:key="imgIndex"
>
<!-- <image :src="img"></image> -->
<u-image width="160rpx" height="160rpx" :src="img"></u-image>
</view>
</view>
<view v-if="comment.additional_comment.reply_status == 1">
<view style="border-bottom: 1px solid #ededed; width: 100%"></view>
<view class="goods-comm store-reply">
<span style="margin-left: 10rpx">掌柜回复</span>
</view>
<view class="goods-subtitle additional">{{
comment.additional_comment.reply.content
}}</view>
</view>
</view>
</view>
</view>
</view>
@@ -80,9 +35,9 @@
export default {
data() {
return {
src: "",
comment: {},
gradeList: {
comment: {}, //评论信息
gradeList: {
//评价grade
GOOD: "好评",
MODERATE: "中评",
WORSE: "差评",
@@ -92,11 +47,12 @@ export default {
},
onLoad(options) {
this.comment = JSON.parse(decodeURIComponent(options.comment));
},
methods: {
preview(urls, index) {
/**
* 点击图片放大或保存
*/
preview(urls, index) {
uni.previewImage({
current: index,
urls: urls,
@@ -107,47 +63,15 @@ export default {
},
});
},
calcDay(order) {
let date = "";
console.log();
if (order.additional_comment) {
date =
(order.additional_comment.create_time - order.create_time) /
60 /
60 /
24;
}
return Math.ceil(date);
},
},
};
</script>
<style lang="scss">
.goods-comm {
color: #ff6262;
border-left: 3px solid #1abc9c;
text {
float: right;
font-size: 24rpx;
color: #999999;
}
&::after {
content: "";
display: block;
clear: both;
}
}
.store-reply {
color: #333;
margin-top: 20rpx;
}
<style lang="scss" scoped>
.memName {
font-size: 28rpx;
}
.additional {
margin: 20rpx 0;
}
.goods-name {
border-bottom: 1px solid #ededed;
padding-bottom: 30rpx;
@@ -162,73 +86,7 @@ page,
background: $page-color-base;
height: 100%;
}
.seller-view {
background-color: #fff;
margin: 5rpx 0rpx;
padding: 0rpx 30rpx;
.seller-info {
height: 70rpx;
.seller-name {
font-size: 33rpx;
font-weight: 600;
}
.order-sn {
color: #909399;
}
}
.goods-item-view {
display: flex;
flex-direction: row;
padding: 10rpx 0rpx;
.goods-img {
}
.goods-info {
padding-left: 30rpx;
width: 380rpx;
.goods-title {
margin-bottom: 10rpx;
}
.goods-specs {
margin-bottom: 10rpx;
color: #909399;
}
.goods-price {
margin-bottom: 10rpx;
color: #909399;
}
}
.goods-num {
margin: 0rpx 10rpx;
display: flex;
flex-direction: row;
align-items: flex-end;
margin-bottom: 10rpx;
}
}
.btn-view {
min-height: 70rpx;
margin: 5rpx 0rpx;
display: flex;
flex-direction: row;
.description {
color: #909399;
size: 25rpx;
.text {
margin: 10rpx 0rpx;
}
.title {
color: #000000;
}
}
.again-btn {
margin: 0rpx 10rpx;
display: flex;
flex-direction: row;
align-items: flex-end;
margin-bottom: 10rpx;
}
}
}
.exaluate-member-view {
background-color: #fff;
margin-top: 12rpx;
@@ -247,26 +105,26 @@ page,
}
.goods-view {
margin-left: 15rpx;
.border-bottom {
padding-bottom: 20rpx;
border-bottom: 1px solid #ededed;
}
.goods-title {
margin-bottom: 10rpx;
}
.goods-subtitle {
margin-bottom: 20rpx;
color: #909399;
}
.goods-imgs-view {
margin: 20rpx 0;
display: flex;
flex-direction: row;
align-items: center;
.img-view {
margin-right: 15rpx;
}
}
}
}
.border-bottom {
padding-bottom: 20rpx;
border-bottom: 1px solid #ededed;
}
.goods-title {
margin-bottom: 10rpx;
}
.goods-subtitle {
margin-bottom: 20rpx;
color: #909399;
}
.goods-imgs-view {
margin: 20rpx 0;
display: flex;
flex-direction: row;
align-items: center;
.img-view {
margin-right: 15rpx;
}
}
</style>

View File

@@ -1,81 +0,0 @@
<template>
<view>
<view class="info-view">
<view class="info-text">
1.对商品金额大于20元商品(虚拟商品除外)进行评价并通过审核后根据商品价格和您的评价内容为您发放积分
</view>
<view class="info-text">
2.只能对90天内购买的订单进行商品评价
</view>
<view class="info-text">
3.同一订单和相隔15日内不同订单中的相同商品只能评价一次
</view>
<view class="info-text">
4.退换货订单产生的商品评价将会被删除且会扣除相应的优币
</view>
<view class="info-text">
5.鼓励发表原创有价值的评价;杜绝剽窃发表无意义违反法律法规的评价内容如果您发布的无效评价超过(包含)5则一年内您发表的商品评价都不会获得积分奖励
</view>
<view class="info-text">
6.晒单发表成功后会对晒图进行审核审核过程中心得文字会先展示出来审核通过后晒图会一起进行展示
</view>
<view class="info-text">
7.对于审核不通过的评价晒单不能获得优币奖励且文字晒图均不能被展示出来有下列情形之一的审核不予通过
</view>
<view class="info-text">
评价心得文字与商品无关且出现言辞露骨的情况;
</view>
<view class="info-text">
图片与所购商品不一致;
</view>
<view class="info-text">
晒单为截屏图片;
</view>
<view class="info-text">
图片不清晰不能达到晒单目的;
</view>
<view class="info-text">
图片中涉及淫秽色情等违法不良信息;
</view>
<view class="info-text">
未经过他人同意涉及使用他人图片或将他人图片进行编辑后发布;
</view>
<view class="info-text">
盗用他人图片经举报诉讼情况属实;
</view>
<view class="info-text">
图片中涉及敏感词汇(曝光315假二水翻新等);
</view>
<view class="info-text">
图片涉及与客服聊天记录;
</view>
<view class="info-text">
对于成人用品晒单未对特殊部位进行遮掩或打马赛克
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
};
}
}
</script>
<style lang="scss">
page, .content{
background: $page-color-base;
height: 100%;
}
.info-view {
padding: 50rpx;
.info-text {
color: #909399;
margin-bottom: 8rpx;
}
}
</style>

View File

@@ -2,9 +2,9 @@
<view>
<view class="wrap">
<view class="u-tabs-box">
<u-tabs :list="list" :is-scroll="false" inactive-color="#333" :current="current" class="utabs" :active-color="$lightColor" @change="change"></u-tabs>
<u-tabs :list="list" :is-scroll="false" inactive-color="#333" :current="current" class="utabs" :active-color="$lightColor" @change="changeTab"></u-tabs>
</view>
<swiper class="swiper-box" :current="current" @change="changeTab" duration="500">
<swiper class="swiper-box" :current="current" @change="changeSwiper" duration="500">
<swiper-item v-for="(item, listIndex) in list" :key="listIndex">
<scroll-view scroll-y style="height: 100%" @scrolltolower="renderData(listIndex)">
<u-empty text="尚无需要评价的商品" mode="list" v-if="orderList.length == 0"></u-empty>
@@ -32,7 +32,7 @@
<rich-text :nodes="'评论内容:' + order.content || ''"></rich-text>
</u-read-more>
</view>
<view class="goods-imgs-view" v-if="order.image">
<view class="img-view" v-if="order.image" v-for="(img, imgIndex) in order.image.split(',')" :key="imgIndex">
<u-image v-if="order.image" @click.native="
@@ -47,7 +47,7 @@
</view>
<view v-if="current == 0 && sku.commentStatus == 'UNFINISHED'">
<view class="evaluate">
<view @click="onCommont(order)">
<view @click="talkCommont(order)">
<u-tag text="发表评价" shape="circle" mode="plain" type="error" />
</view>
</view>
@@ -69,14 +69,7 @@ import { getComments } from "@/api/members.js";
export default {
data() {
return {
customStyle: {
backgroundColor: this.$lightColor,
color: "#FFF",
height: "60rpx",
width: "150rpx",
margin: "20rpx 0",
},
list: [
list: [ //顶部tab
{
name: "待评价",
},
@@ -84,28 +77,32 @@ export default {
name: "已评价",
},
],
gradeList: {
gradeList: { //评论表
GOOD: "好评",
MODERATE: "中评",
WORSE: "差评",
haveImage: "有图",
},
current: 0,
orderList: [],
current: 0, //当前tabIndex
orderList: [], //商品集合
params: {
pageNumber: 1,
pageSize: 10,
orderStatus: "",
loadStatus: "more",
},
};
},
onShow() {
this.orderList = [];
this.params.pageNumber = 1;
this.current == 0 ? this.loadData() : this.loadComments();
},
watch: {
/**
* 切换current
* 更改页面并重新加载数据
*/
current(val) {
this.params.pageNumber = 1;
this.params.loadStatus = "more";
@@ -120,16 +117,16 @@ export default {
}
},
},
mounted() {
},
methods: {
// 判断当前店铺是否有可评价的商品
/**
* 判断当前店铺是否有可评价的商品
*/
commentStatus(val) {
if (this.current == 1) {
return true;
} else {
let show;
val.orderItems &&
val.orderItems.forEach((item) => {
if (item.commentStatus == "UNFINISHED") {
@@ -143,6 +140,9 @@ export default {
}
},
/**
* 点击图片放大或保存
*/
preview(urls, index) {
uni.previewImage({
current: index,
@@ -155,14 +155,27 @@ export default {
});
},
change(index) {
/**
* 点击tab触发
*/
changeTab(index) {
this.current = index;
},
changeTab(e) {
/**
* 点击swiper
*/
changeSwiper(e) {
this.current = e.target.current;
},
/**
* 获取订单数据
*/
loadData() {
uni.showLoading({});
uni.showLoading({
title: "加载中",
});
getOrderList(this.params).then((res) => {
uni.hideLoading();
const orderList = res.data.result.records;
@@ -175,15 +188,25 @@ export default {
}
});
},
onCommont(order) {
/**
* 发表评价
*/
talkCommont(order) {
uni.navigateTo({
url: `./releaseEvaluate?sn=${order.sn}&order=${encodeURIComponent(
JSON.stringify(order)
)}`,
});
},
/**
* 加载已评价数据
*/
loadComments() {
uni.showLoading({});
uni.showLoading({
title: "加载中",
});
getComments(this.params).then((res) => {
uni.hideLoading();
let orderList = res.data.result.records;
@@ -200,19 +223,14 @@ export default {
},
];
});
this.orderList = this.orderList.concat(orderList);
this.params.pageNumber += 1;
});
},
onAgain(order) {
uni.navigateTo({
url: `./againEvaluate?order=${encodeURIComponent(
JSON.stringify(order)
)}`,
});
},
/**
* 滑到底部加载数据
*/
renderData(index) {
if (this.params.loadStatus == "noMore") return;
if (index == 0) {
@@ -224,13 +242,11 @@ export default {
this.params.comment_status = "WAIT_CHASE";
this.loadComments();
}
if (index == 2) {
this.params.audit_status = "";
this.params.comments_type = "";
this.params.comment_status = "FINISHED";
this.loadComments();
}
},
/**
* 评价详情
*/
onDetail(comment) {
uni.navigateTo({
url:

View File

@@ -1,5 +1,6 @@
<template>
<view>
<!-- 遍历出评价商品 -->
<view v-for="(sku, index) in order.orderItems" :key="index">
<view class="after-sales-goods-detail-view">
<view>
@@ -45,7 +46,7 @@
</view>
</view>
<view class="info-evaluate-view">
<view class="images-view" @click="beforeUpload(index)">
<view class="images-view">
<u-upload :header=" { accessToken: storage.getAccessToken() }" :action="action" width="150" @on-uploaded="onUploaded" :max-count="5" :show-progress="false"></u-upload>
</view>
</view>
@@ -88,47 +89,45 @@ export default {
data() {
return {
storage,
value: "",
type: "textarea",
border: false,
maxlength: 500,
type: "textarea", //输入框状态为 textarea
border: false, //没有border
maxlength: 500, //评价最大字数为500字
placeholder:
"宝贝满足您的期待吗?说说它的优点和美中不足的地方吧。您的评价会帮助更多的人",
order: {},
order: {}, //订单信息
form: {
content: "",
goodsId: "",
grade: "GOOD",
orderItemSn: "",
skuId: "",
descriptionScore: 5,
serviceScore: 5,
deliveryScore: 5,
// // 是否为初评价 true 默认为初评
// first_comment: true,
//content,grade: 'GOOD',skuId,images:[]
content: "", //评价详情
goodsId: "", //商品id
grade: "GOOD", //默认为好评
orderItemSn: "", //商品的sn
skuId: "", //商品skuId
descriptionScore: 5, //默认描述得分为5分
serviceScore: 5, //默认服务得分为5分
deliveryScore: 5, //默认物流得分为5分
},
currentIndex: 0,
action: upload,
action: upload, //图片上传地址
};
},
onLoad(options) {
// 获取上一级传过来的数据进行解析
this.form.orderItemSn = options.sn;
this.order = JSON.parse(decodeURIComponent(options.order));
//现在只能一个商品一个评价
},
mounted() {
this.form.goodsId = this.order.orderItems[0].goodsId;
this.form.orderItemSn = this.order.orderItems[0].sn;
this.form.skuId = this.order.orderItems[0].skuId;
},
methods: {
beforeUpload(index) {
this.currentIndex = index;
},
onGrade(grade, index) {
/**
* 点击评价
*/
onGrade(grade) {
this.form.grade = grade;
},
/**
* 提交评价
*/
onSubmit() {
uni.showLoading({
title: "加载中",
@@ -148,9 +147,12 @@ export default {
});
});
},
/**
* 图片成功后回调
*/
onUploaded(lists) {
let images = [];
console.log(lists);
lists.forEach((item) => {
images.push(item.response.result);
});

View File

@@ -63,6 +63,9 @@ export default {
this.order = order;
});
},
/**
* 点击图片放大或保存
*/
preview() {
//预览发票
if (this.order.elec_file_list.length) {