guhongwei 2 tahun lalu
induk
melakukan
764a33fb88
2 mengubah file dengan 8 tambahan dan 6 penghapusan
  1. 4 2
      pagesHome/order/appraise.vue
  2. 4 4
      pagesHome/order/detail.vue

+ 4 - 2
pagesHome/order/appraise.vue

@@ -21,7 +21,7 @@
 							<text v-else class="iconfont icon-top"></text>
 							<view class="list_1">
 								<view class="other">
-									<text>{{item.customer.phone}}</text>
+									<text>{{item.customer?item.customer.phone:'暂无'}}</text>
 									<text>{{item.reply[0].time||'暂无'}}</text>
 								</view>
 								<view class="flie">
@@ -140,7 +140,9 @@
 				if (res.errcode == '0') {
 					let list = res.data;
 					for (let val of list) {
-						val.customer.phone = val.customer.phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
+						if (val.customer && val.customer.phone) {
+							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)

+ 4 - 4
pagesHome/order/detail.vue

@@ -25,7 +25,7 @@
 								{{info.goods.name}}
 							</view>
 							<view class="brief">
-								{{info.goods.shot_brief}}
+								{{info.goods.shot_brief||''}}
 							</view>
 							<view class="money">
 								<text>运费{{info.specs&&info.specs.length>0?info.specs[0].freight:0}}元</text>
@@ -40,9 +40,9 @@
 								<text class="iconfont icon-jiantouyou"></text>
 							</view>
 						</view>
-						<view class="one_5">
+						<view class="one_5" @tap="toEvaluate">
 							<view class="l">
-								<text @tap="toEvaluate">{{evaluate_num>0?`商品评价(${evaluate_num})`:`暂无评价`}}</text>
+								<text>{{evaluate_num>0?`商品评价(${evaluate_num})`:`暂无评价`}}</text>
 							</view>
 							<view class="r">
 								<text class="iconfont icon-jiantouyou"></text>
@@ -478,7 +478,7 @@
 			toEvaluate() {
 				const that = this;
 				uni.navigateTo({
-					url: `/pagesHome/order/appraise?id=${that.id}`
+					url: `/pagesHome/order/appraise?id=${that.info.goods._id}`
 				})
 			},
 			// 进入店铺