|
@@ -13,7 +13,7 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="two">
|
|
<view class="two">
|
|
- <scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
|
|
|
|
|
|
+ <scroll-view scroll-y="true" class="scroll-view">
|
|
<view class="list-scroll-view">
|
|
<view class="list-scroll-view">
|
|
<view class="list" v-for="(item, index) in list" :key="index">
|
|
<view class="list" v-for="(item, index) in list" :key="index">
|
|
<image v-if="item.customer.icon&&item.customer.icon.length>0" class="image"
|
|
<image v-if="item.customer.icon&&item.customer.icon.length>0" class="image"
|
|
@@ -63,22 +63,22 @@
|
|
user: {},
|
|
user: {},
|
|
btnlist: [{
|
|
btnlist: [{
|
|
name: '全部好评',
|
|
name: '全部好评',
|
|
- total: '0',
|
|
|
|
|
|
+ total: 0,
|
|
code: '0'
|
|
code: '0'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: '好评',
|
|
name: '好评',
|
|
- total: '0',
|
|
|
|
|
|
+ total: 0,
|
|
code: '1'
|
|
code: '1'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: '中评',
|
|
name: '中评',
|
|
- total: '0',
|
|
|
|
|
|
+ total: 0,
|
|
code: '2'
|
|
code: '2'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: '差评',
|
|
name: '差评',
|
|
- total: '0',
|
|
|
|
|
|
+ total: 0,
|
|
code: '3'
|
|
code: '3'
|
|
}
|
|
}
|
|
],
|
|
],
|
|
@@ -93,6 +93,8 @@
|
|
thr: [],
|
|
thr: [],
|
|
// 回复数据
|
|
// 回复数据
|
|
reply: {},
|
|
reply: {},
|
|
|
|
+ // 列表
|
|
|
|
+ code: ''
|
|
};
|
|
};
|
|
},
|
|
},
|
|
onLoad: function(e) {
|
|
onLoad: function(e) {
|
|
@@ -139,8 +141,9 @@
|
|
// 选择
|
|
// 选择
|
|
toSelect(e) {
|
|
toSelect(e) {
|
|
const that = this;
|
|
const that = this;
|
|
|
|
+ that.$set(that, `code`, e.code);
|
|
if (e.code == '0') {
|
|
if (e.code == '0') {
|
|
- that.clearPage();
|
|
|
|
|
|
+ // that.clearPage();
|
|
that.search()
|
|
that.search()
|
|
} else if (e.code == '1') {
|
|
} else if (e.code == '1') {
|
|
that.$set(that, `list`, that.one);
|
|
that.$set(that, `list`, that.one);
|
|
@@ -179,18 +182,22 @@
|
|
that.$set(that, `info`, res.data)
|
|
that.$set(that, `info`, res.data)
|
|
}
|
|
}
|
|
let info = {
|
|
let info = {
|
|
- skip: that.skip,
|
|
|
|
- limit: that.limit,
|
|
|
|
|
|
+ // skip: that.skip,
|
|
|
|
+ // limit: that.limit,
|
|
goods: that.id
|
|
goods: that.id
|
|
}
|
|
}
|
|
res = await that.$api(`/goodsRate`, `GET`, {
|
|
res = await that.$api(`/goodsRate`, `GET`, {
|
|
...info,
|
|
...info,
|
|
})
|
|
})
|
|
if (res.errcode == '0') {
|
|
if (res.errcode == '0') {
|
|
- let list = [...that.list, ...res.data]
|
|
|
|
|
|
+ // let list = [...that.list, ...res.data]
|
|
|
|
+ let list = res.data;
|
|
for (let val of list) {
|
|
for (let val of list) {
|
|
val.customer.phone = val.customer.phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
|
|
val.customer.phone = val.customer.phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
|
|
}
|
|
}
|
|
|
|
+ that.$set(that, `list`, list)
|
|
|
|
+ that.$set(that, `total`, res.total)
|
|
|
|
+ that.$set(that.btnlist[0], `total`, res.total)
|
|
let one = list.filter(item => item.goods_score == 5);
|
|
let one = list.filter(item => item.goods_score == 5);
|
|
that.$set(that, `one`, one)
|
|
that.$set(that, `one`, one)
|
|
that.$set(that.btnlist[1], `total`, one.length);
|
|
that.$set(that.btnlist[1], `total`, one.length);
|
|
@@ -200,9 +207,6 @@
|
|
let thr = list.filter(item => item.goods_score <= 2)
|
|
let thr = list.filter(item => item.goods_score <= 2)
|
|
that.$set(that, `thr`, thr)
|
|
that.$set(that, `thr`, thr)
|
|
that.$set(that.btnlist[3], `total`, thr.length);
|
|
that.$set(that.btnlist[3], `total`, thr.length);
|
|
- that.$set(that, `list`, list)
|
|
|
|
- that.$set(that, `total`, res.total)
|
|
|
|
- that.$set(that.btnlist[0], `total`, res.total)
|
|
|
|
} else {
|
|
} else {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
title: res.errmsg,
|
|
title: res.errmsg,
|