shish 6 år sedan
förälder
incheckning
7d416b24c0

+ 2 - 5
mall/src/components/module/app-order-list.vue

@@ -3,7 +3,7 @@
 		<block v-if="!$util.isEmpty(info)">
 			<div class="list-left">
 				<div class="image">
-					<img :src="imgUrl | default_img" alt="商品图片" mode="aspectFill" style="width:80px;height:80px;" />
+					<img :src="imgUrl | default_img" alt="商品图片" mode="aspectFill" style="width:68px;height:68px;" />
 				</div>
 				<div class="list-msg">
 					<div class="title">{{ info.goodsName || info.title }}</div>
@@ -51,11 +51,8 @@ export default {
 		border-bottom: 1px solid $borderColor;
 		.list-left {
 			@include disFlex(flex-start, space-between);
-			.image {
-				width: 140px;
-			}
 			.list-msg {
-				margin-left: 28px;
+				margin-left: 30px;
 				.title {
 					font-size: 28px;
 					color: $fontColor2;

+ 1 - 1
mall/src/filters/constant.js

@@ -77,7 +77,7 @@ const _CONST_MAP = {
 		},
 		{
 			label: '已完成',
-			value: 4
+			value: 5
 		}
 	],
 	// 配送状态

+ 5 - 13
mall/src/pages/callback/index.vue

@@ -123,7 +123,6 @@
 	import { mapGetters } from 'vuex'
 	import ModalModule from '@/components/plugin/modal'
 	import AlertModule from '@/components/plugin/alert'
-	//  api
 	import wexinPay from '@/utils/pay/wxPay'
 	import { getMerchantInfo } from '@/api/common'
 	import { getShopUser } from '@/utils/auth'
@@ -142,29 +141,26 @@
 				contentClass: '',
 				payDiscountPrice: null,
 				payDiscountType:0,
-				// 支付相关 ============
 				passwordModal: false,
 				form: {
 					payPassword: ''
 				},
-
 				payCallData: {},
 				merchantInfo: {},
-				// 未设置密码
 				setPassModal: false
 			}
 		},
 		computed: {
 			...mapGetters({ shopUser: 'getShopUser' }),
 			isYeBtnShow() {
-				if (this.$util.isEmpty(this.shopUser)) return false
+				if (this.$util.isEmpty(this.shopUser)){
+					return false
+				} 
 				return this.shopUser.userAsset.balance > this.option.totalPrice
 			}
 		},
 		onLoad() {
-			// if (this.pageStatus) {
-			// 	this.init()
-			// }
+
 		},
 		methods: {
 			init() {
@@ -174,15 +170,11 @@
 				this.payDiscountPrice = this.option.payDiscountPrice
 				this.payDiscountType = this.option.payDiscountType
 				this.initClass(this.pageStatus)
-				getShopUser()
-				// 商户信息
-				// if (this.pageStatus == 6) {
+				getShopUser(true)
 				getMerchantInfo().then(res => {
 					this.merchantInfo = res.data
 				})
-				// }
 			},
-			// 支付相关块 =======================================================
 			// 余额支付
 			_balancePay() {
 				if (!this.form.payPassword) {

+ 2 - 2
mall/src/pages/home/shop.vue

@@ -19,7 +19,7 @@
 						<div class="list-val">{{ shop.telephone || '暂无' }}</div>
 					</div>
 					<div class="list-icon">
-						<i class="iconfont iconditu"></i>
+						<i class="iconfont iconditu" style="font-size:36rpx;"></i>
 					</div>
 				</tui-list-cell>
 				<tui-list-cell @click="goNavBtn" :lineLeft="false" :lineRight="false" padding="26rpx 30rpx 26rpx 0" class="tui-list">
@@ -28,7 +28,7 @@
 						<div class="list-val">{{ shop.fullAddress || '暂无' }}</div>
 					</div>
 					<div class="list-icon">
-						<i class="iconfont icondianhua"></i>
+						<i class="iconfont icondianhua" style="font-size:36rpx;"></i>
 					</div>
 				</tui-list-cell>
 			</tui-list-view>

+ 159 - 166
mall/src/pages/order/comment.vue

@@ -1,173 +1,166 @@
 <template>
-	<div class="app-content">
-		<div class="order-det">
-			<div class="order-det-left">
-				<img src alt="商品图片" mode="center" />
-			</div>
-			<div class="order-det-right">
-				<div class="app-size-28 app-color-2">{{ data.orderSn }}</div>
-				<div class="app-color-3">{{ data.addTime | formatTime }}</div>
-				<div class="app-size-28 app-bold">¥{{ data.prePrice }}</div>
-			</div>
-		</div>
-		<!-- separae -->
-		<div class="separae-wrap">欢迎您对本次服务作出评价</div>
-		<!-- comment -->
-		<div class="comment-wrap">
-			<div class="comment-textarea">
-				<textarea v-model="form.evaluate" class="textarea-wrap" placeholder-class="textarea-place" name="evaluate" placeholder="您的关注,是我们前进的动力" />
-			</div>
-			<div class="comment-star">
-				<div class="star-list" v-for="(item, index) in rateData" :key="index">
-					<span class="star-label">{{ item.name }}</span>
-					<rate-module :current="form[item.key]" @change="changeRateFn($event, item)"></rate-module>
-				</div>
-			</div>
-		</div>
-		<!-- button -->
-		<div class="btn-wrap">
-			<button class="button-com red big" @click="commnetFn">提交</button>
-		</div>
-	</div>
+  <div class="app-content">
+    <div class="order-det">
+      <div class="order-det-left">
+        <img src alt="商品图片" mode="center" />
+      </div>
+      <div class="order-det-right">
+        <div class="app-size-28 app-color-2">{{ data.orderSn }}</div>
+        <div class="app-color-3">{{ data.addTime | formatTime }}</div>
+        <div class="app-size-28 app-bold">¥{{ data.prePrice }}</div>
+      </div>
+    </div>
+    <!-- separae -->
+    <div class="separae-wrap">欢迎您对本次服务作出评价</div>
+    <!-- comment -->
+    <div class="comment-wrap">
+      <div class="comment-textarea">
+        <textarea
+          v-model="form.evaluate"
+          class="textarea-wrap"
+          placeholder-class="textarea-place"
+          name="evaluate"
+          placeholder="您的关注,是我们前进的动力"
+        />
+      </div>
+      <div class="comment-star">
+        <div class="star-list" v-for="(item, index) in rateData" :key="index">
+          <span class="star-label">{{ item.name }}</span>
+          <rate-module :current="form[item.key]" @change="changeRateFn($event, item)"></rate-module>
+        </div>
+      </div>
+    </div>
+    <!-- button -->
+    <div class="btn-wrap">
+      <button class="button-com red big" @click="commnetFn">提交</button>
+    </div>
+  </div>
 </template>
-
 <script>
-import RateModule from '@/components/plugin/rate'
-// api
-import { getDetail, comment } from '@/api/order'
+import RateModule from "@/components/plugin/rate";
+import { getDetail, comment } from "@/api/order";
 export default {
-	name: 'order-comment',
-	components: {
-		RateModule
-	},
-	data() {
-		return {
-			data: {},
-			form: {
-				grade: 1,
-				gradeService: 1,
-				gradeQuality: 1,
-				gradeSend: 1,
-				evaluate: ''
-			},
-			rateData: [
-				{
-					name: '整体评分',
-					key: 'grade'
-				},
-				{
-					name: '服务态度',
-					key: 'gradeService'
-				},
-				{
-					name: '鲜花品质',
-					key: 'gradeQuality'
-				},
-				{
-					name: '配送服务',
-					key: 'gradeSend'
-				}
-			]
-		}
-	},
-	onLoad() {
-		// this.init()
-	},
-	methods: {
-		init() {
-			this.data = uni.getStorageSync('orderDetialComment') || {}
-		},
-		commnetFn() {
-			// this.form = {
-			// 	grade: 1,
-			// 	gradeService: 1,
-			// 	gradeQuality: 1,
-			// 	gradeSend: 1,
-			// 	evaluate: ''
-			// }
-			comment({
-				id: this.data.id,
-				...this.form
-			}).then(res => {
-				this.$msg('评价成功!')
-				setTimeout(() => {
-					uni.removeStorageSync('orderDetialComment')
-					this.$util.pageTo({
-						url: '/pages/callback/index',
-						query: {
-							pageStatus: 4,
-							orderSn: this.data.orderSn
-						},
-						type: 2
-					})
-				}, 1000)
-			})
-		},
-		// operate
-		changeRateFn(e, item) {
-			this.form[item.key] = e.index
-		}
-	}
-}
+  name: "order-comment",
+  components: {
+    RateModule
+  },
+  data() {
+    return {
+      data: {},
+      form: {
+        grade: 1,
+        gradeService: 1,
+        gradeQuality: 1,
+        gradeSend: 1,
+        evaluate: ""
+      },
+      rateData: [
+        {
+          name: "整体评分",
+          key: "grade"
+        },
+        {
+          name: "服务态度",
+          key: "gradeService"
+        },
+        {
+          name: "鲜花品质",
+          key: "gradeQuality"
+        },
+        {
+          name: "配送速度",
+          key: "gradeSend"
+        }
+      ]
+    };
+  },
+  onLoad() {},
+  methods: {
+    init() {
+      getDetail({id:this.option.id}).then(res => {
+        this.data = res.data;
+      });
+    },
+    commnetFn() {
+      comment({
+        id: this.data.id,
+        ...this.form
+      }).then(res => {
+        this.$msg("评价成功!");
+        setTimeout(() => {
+          this.$util.pageTo({
+            url: "/pages/callback/index",
+            query: {
+              pageStatus: 4,
+              orderSn: this.data.orderSn
+            },
+            type: 2
+          });
+        }, 1000);
+      });
+    },
+    changeRateFn(e, item) {
+      this.form[item.key] = e.index;
+    }
+  }
+};
 </script>
-
 <style lang="scss" scoped>
-	.order-det {
-		background-color: #fff;
-		@include disFlex(center, flex-start);
-		padding: 30px;
-		width: calc(100% - 60px);
-		.order-det-left {
-			width: 140px;
-		}
-		.order-det-right {
-			width: calc(100% - 160px);
-			margin-left: 20px;
-			& > div {
-				margin-bottom: 12px;
-			}
-			.app-bold {
-				margin-top: 30px;
-				margin-bottom: 0;
-			}
-		}
-	}
-	.separae-wrap {
-		color: $fontColor3;
-		padding: 30px 30px 20px 30px;
-	}
-	.comment-wrap {
-		padding: 20px 30px;
-		background-color: #fff;
-		.comment-textarea {
-			border-bottom: 1px solid $borderColor;
-			.textarea-wrap {
-				width: 100%;
-				height: 340px;
-			}
-			/deep/.textarea-place {
-				font-size: 28px;
-				color: #ccc;
-			}
-		}
-		.comment-star {
-			padding-bottom: 20px;
-			.star-list {
-				margin-top: 20px;
-				@include disFlex(center, flex-start);
-				.star-label {
-					font-size: 26px;
-					margin-right: 108px;
-				}
-			}
-		}
-	}
-	// button
-	.btn-wrap {
-		width: 90%;
-		margin: 90px auto 0;
-		.button-com {
-			width: 100%;
-		}
-	}
+.order-det {
+  background-color: #fff;
+  @include disFlex(center, flex-start);
+  padding: 30px;
+  width: calc(100% - 60px);
+  .order-det-left {
+    width: 140px;
+  }
+  .order-det-right {
+    width: calc(100% - 160px);
+    margin-left: 20px;
+    & > div {
+      margin-bottom: 12px;
+    }
+    .app-bold {
+      margin-top: 30px;
+      margin-bottom: 0;
+    }
+  }
+}
+.separae-wrap {
+  color: $fontColor3;
+  padding: 30px 30px 20px 30px;
+}
+.comment-wrap {
+  padding: 20px 30px;
+  background-color: #fff;
+  .comment-textarea {
+    border-bottom: 1px solid $borderColor;
+    .textarea-wrap {
+      width: 100%;
+      height: 340px;
+    }
+    /deep/.textarea-place {
+      font-size: 28px;
+      color: #ccc;
+    }
+  }
+  .comment-star {
+    padding-bottom: 20px;
+    .star-list {
+      margin-top: 20px;
+      @include disFlex(center, flex-start);
+      .star-label {
+        font-size: 26px;
+        margin-right: 108px;
+      }
+    }
+  }
+}
+.btn-wrap {
+  width: 90%;
+  margin: 90px auto 0;
+  .button-com {
+    width: 100%;
+  }
+}
 </style>

+ 333 - 299
mall/src/pages/order/detail.vue

@@ -1,307 +1,341 @@
 <template>
-	<div class="app-content">
-		<div class="page-top">
-			<div class="page-top-img">
-				<image mode="widthFix" :src="`${constant.imgUrl}/retail/order/bg.png`" alt />
-			</div>
-			<div class="page-top-det">
-				<div>
-					<div class="page-status">{{ data.status | constantfilter('ORDER_STATUS') }}</div>
-					<div class="page-prompt" v-if="data.status == 0">请尽快支付哟~</div>
-					<div class="page-prompt" v-if="data.status == 1 || data.status == 2">请耐心等待~</div>
-				</div>
-				<div class="page-status-img">
-					<img :src="statusImg" alt />
-				</div>
-			</div>
-		</div>
-		<!-- 订单详情 -->
-		<div class="page-det">
-			<!-- 商品信息 -->
-			<div class="module-com">
-				<div class="module-tit">商品信息</div>
-				<div class="module-det">
-					<block v-if="!$util.isEmpty(data.goodsInfoList)">
-						<list-module v-for="(items, subIndex) in data.goodsInfoList" :key="subIndex" :info="items" />
-					</block>
-				</div>
-			</div>
-			<!-- 订单信息 -->
-			<div class="module-com order-msg">
-				<div class="module-tit">订单信息</div>
-				<div class="module-det">
-					<!--  -->
-					<div class="order-msg-blo">
-						<div class="msg-list">
-							<div class="label">收花人</div>
-							<div class="value">{{ data.receiveUserName }}</div>
-						</div>
-						<div class="msg-list">
-							<div class="label">电话</div>
-							<div class="value">{{ data.receiveMobile }}</div>
-						</div>
-						<div class="msg-list">
-							<div class="label">地址</div>
-							<div class="value">{{ data.receiveFullAddress }}</div>
-						</div>
-					</div>
-					<!--  -->
-					<div class="order-msg-blo">
-						<div class="msg-list">
-							<div class="label">送达时间</div>
-							<div class="value">{{ data.reachDate }}</div>
-						</div>
-						<div class="msg-list">
-							<div class="label">贺卡</div>
-							<div class="value">{{ data.needCard == 1 ? "需要" : '不需要' }}</div>
-						</div>
-						<div class="msg-list">
-							<div class="label">祝福语</div>
-							<div class="value">{{ data.cardInfo || '暂无' }}</div>
-						</div>
-					</div>
-					<!--  -->
-					<div class="order-msg-blo">
-						<div class="msg-list">
-							<div class="label">订单号</div>
-							<div class="value">{{ data.orderSn }}</div>
-						</div>
-						<div class="msg-list">
-							<div class="label">时间</div>
-							<div class="value">{{ data.addTime | formatTime }}</div>
-						</div>
-						<div class="msg-list">
-							<div class="label">总价</div>
-							<div class="value">¥{{ data.prePrice }}</div>
-						</div>
-						<div class="msg-list">
-							<div class="label">运费</div>
-							<div class="value">¥{{ data.sendCost }}</div>
-						</div>
-					</div>
-				</div>
-			</div>
-			<!-- 优惠信息 -->
-			<block v-if="data.status == 0">
-				<div class="module-com coupon-wrap" v-if="!$util.isEmpty(discountArr)">
-					<div class="module-tit">优惠信息</div>
-					<div class="module-det">
-						<app-coupon-sel 
-							ref="couponSel" 
-							:price="data.prePrice * data.goodsNum" 
-							:discountArr="['member', 'coupon']" />
-					</div>
-				</div>
-			</block>
-			<block v-else>
-				<div class="module-com coupon-wrap" v-if="data.discountAmount && data.discountAmount != '0.00'">
-					<div class="module-tit">优惠信息</div>
-					<div class="module-det">
-						<div class="app-color-3">{{ data.discountType == 1 ? '使用优惠券' : data.discountType == 2 ? '会员打折' : '随机优惠' }}</div>
-						<div class="app-price">-¥{{ data.discountAmount }}</div>
-					</div>
-				</div>
-			</block>
-		</div>
-		<!-- 按钮 -->
-		<div class="page-btn app-footer">
-			<div class="flex-center">
-				<span>应付款</span>
-				<span class="app-price">
-					<span>¥</span>
-					<span class="app-size-40">{{ data.prePrice }}</span>
-				</span>
-			</div>
-			<template v-if="data.status == 0">
-				<button class="button-com red" @click="payFn">立即支付</button>
-			</template>
-			<template v-else-if="data.status == 5">
-				<button class="button-com middle" @click="evealFn">评价</button>
-			</template>
-		</div>
-	</div>
+  <div class="app-content">
+    <div class="page-top">
+      <div class="page-top-img">
+        <image mode="widthFix" :src="`${constant.imgUrl}/retail/order/bg.png`" alt />
+      </div>
+      <div class="page-top-det">
+        <div>
+          <div class="page-status">{{ data.status | constantfilter('ORDER_STATUS') }}</div>
+          <div class="page-prompt" v-if="data.status == 0">请尽快支付哟~</div>
+          <div class="page-prompt" v-if="data.status == 1 || data.status == 2">请耐心等待~</div>
+        </div>
+        <div class="page-status-img">
+          <img :src="statusImg" alt />
+        </div>
+      </div>
+    </div>
+    <!-- 订单详情 -->
+    <div class="page-det">
+      <!-- 商品信息 -->
+      <div class="module-com">
+        <div class="module-tit">商品信息</div>
+        <div class="module-det">
+          <block v-if="!$util.isEmpty(data.goodsInfoList)">
+            <list-module
+              v-for="(items, subIndex) in data.goodsInfoList"
+              :key="subIndex"
+              :info="items"
+            />
+          </block>
+        </div>
+      </div>
+      <!-- 订单信息 -->
+      <div class="module-com order-msg">
+        <div class="module-tit">订单信息</div>
+        <div class="module-det">
+          <!--  -->
+          <div class="order-msg-blo">
+            <div class="msg-list">
+              <div class="label">收花人</div>
+              <div class="value">{{ data.receiveUserName }}</div>
+            </div>
+            <div class="msg-list">
+              <div class="label">电话</div>
+              <div class="value">{{ data.receiveMobile }}</div>
+            </div>
+            <div class="msg-list">
+              <div class="label">地址</div>
+              <div class="value">{{ data.receiveFullAddress }}</div>
+            </div>
+          </div>
+          <!--  -->
+          <div class="order-msg-blo">
+            <div class="msg-list">
+              <div class="label">送达时间</div>
+              <div class="value">{{ data.reachDate ? data.reachDate+' '+reachPeriodInfo : '' }}</div>
+            </div>
+            <div class="msg-list">
+              <div class="label">贺卡</div>
+              <div class="value">{{ data.needCard == 1 ? "需要" : '不需要' }}</div>
+            </div>
+            <div class="msg-list">
+              <div class="label">祝福语</div>
+              <div class="value">{{ data.cardInfo || '--' }}</div>
+            </div>
+            <div class="msg-list">
+              <div class="label">匿名派送</div>
+              <div class="value">{{ data.anonymity == 1 ? '是' : '--' }}</div>
+            </div>
+          </div>
+          <!--  -->
+          <div class="order-msg-blo">
+            <div class="msg-list">
+              <div class="label">订单号</div>
+              <div class="value">{{ data.orderSn }}</div>
+            </div>
+            <div class="msg-list">
+              <div class="label">时间</div>
+              <div class="value">{{ data.addTime | formatTime }}</div>
+            </div>
+            <div class="msg-list">
+              <div class="label">运费</div>
+              <div class="value">¥{{ data.sendCost }}</div>
+            </div>
+            <div class="msg-list">
+              <div class="label">总价</div>
+              <div class="value">¥{{ data.prePrice }}</div>
+            </div>
+            <div class="msg-list">
+              <div class="label">支付方式</div>
+              <div class="value">{{ payWayInfo }}</div>
+            </div>
+          </div>
+        </div>
+      </div>
+      <!-- 优惠信息 -->
+      <block v-if="data.status == 0">
+        <div class="module-com coupon-wrap" v-if="!$util.isEmpty(discountArr)">
+          <div class="module-tit">优惠信息</div>
+          <div class="module-det">
+            <app-coupon-sel
+              ref="couponSel"
+              :price="data.prePrice * data.goodsNum"
+              :discountArr="['member', 'coupon']"
+            />
+          </div>
+        </div>
+      </block>
+      <block v-else>
+        <div
+          class="module-com coupon-wrap"
+          v-if="data.discountAmount && data.discountAmount != '0.00'"
+        >
+          <div class="module-tit">优惠信息</div>
+          <div class="module-det">
+            <div
+              class="app-color-3"
+            >{{ data.discountType == 1 ? '优惠券' : data.discountType == 2 ? '会员优惠' : '随机优惠' }}</div>
+            <div class="app-price">-¥{{ data.discountAmount }}</div>
+          </div>
+        </div>
+      </block>
+    </div>
+    <!-- 按钮 -->
+    <div class="page-btn app-footer">
+      <div class="flex-center">
+        <span v-if="data.status == 0">待付款</span>
+        <span v-else>实付款</span>
+        <span class="app-price">
+          <span>¥</span>
+          <span class="app-size-40">{{ data.actPrice }}</span>
+        </span>
+      </div>
+      <template v-if="data.status == 0">
+        <button class="button-com red" @click="payFn">立即支付</button>
+      </template>
+      <template v-else-if="data.status == 5">
+        <template v-if="data.grade == 0">
+          <button class="button-com middle" @click="evealFn">评价</button>
+        </template>
+      </template>
+    </div>
+  </div>
 </template>
 
 <script>
-	import { mapGetters } from 'vuex'
-	import ListModule from '@/components/module/app-order-list'
-	import AppCouponSel from '@/components/app-coupon-sel'
-	// api
-	import { getDetail } from '@/api/order'
-	import { getShopUser } from '@/utils/auth'
-	export default {
-		name: 'order-detail',
-		components: {
-			ListModule,
-			AppCouponSel
-		},
-		data() {
-			return {
-				constant: this.$constant,
-				data: {},
-				discountArr: false
-			}
-		},
-		computed: {
-			...mapGetters({ shopUser: 'getShopUser' }),
-			statusImg() {
-				let img = ''
-				if (this.data.status == 0) {
-					img = `${this.$constant.imgUrl}/retail/order/wait-pay.png`
-				} else if (this.data.status == 1) {
-					img = `${this.$constant.imgUrl}/retail/order/wait-delivery.png`
-				} else if (this.data.status == 2) {
-					img = `${this.$constant.imgUrl}/retail/order/in-delivery.png`
-				} else if (this.data.status == 5) {
-					img = `${this.$constant.imgUrl}/retail/order/order-confirm.png`
-				}
-				return img
-			}
-		},
-		onLoad() {
-			// this.init()
-		},
-		methods: {
-			init() {
-				this._getDet().then(()=>{
-					getShopUser().then(res => {
-					if(this.data.status == 0) {
-						this.$refs.couponSel._getUserDiscount()
-						.then(status => {
-						this.discountArr = status
-					})	
-					}
-				})
-				})
-				
-			},
-			_getDet() {
-				let form = {}
-				if (this.option.id) {
-					form.id = this.option.id
-				} else if (this.option.orderSn) {
-					form.orderSn = this.option.orderSn
-				}
-				return getDetail(form).then(res => {
-					this.data = res.data
-				})
-			},
-			// operate
-			payFn() {
-				let data = {
-					orderSn: this.data.orderSn,
-					totalPrice: this.data.prePrice,
-					couponId: 0
-				}
-				this.$util.pageTo({
-					url: '/pages/callback/index',
-					query: {
-						pageStatus: 1,
-						id: this.data.id,
-						...data
-					}
-				})
-			},
-			evealFn() {
-				uni.setStorageSync('orderDetialComment', this.data)
-				this.$util.pageTo({
-					url: '/pages/order/comment',
-					query: {
-						id: this.data.id
-					}
-				})
-			}
-		}
-	}
+import { mapGetters } from "vuex";
+import ListModule from "@/components/module/app-order-list";
+import AppCouponSel from "@/components/app-coupon-sel";
+import { getDetail } from "@/api/order";
+import { getShopUser } from "@/utils/auth";
+export default {
+  name: "order-detail",
+  components: {
+    ListModule,
+    AppCouponSel
+  },
+  data() {
+    return {
+      constant: this.$constant,
+      data: {},
+      discountArr: false,
+      payWayInfo: "微信支付",
+      reachPeriodInfo: "上午"
+    };
+  },
+  computed: {
+    ...mapGetters({ shopUser: "getShopUser" }),
+    statusImg() {
+      let img = "";
+      if (this.data.status == 0) {
+        img = `${this.$constant.imgUrl}/retail/order/wait-pay.png`;
+      } else if (this.data.status == 1) {
+        img = `${this.$constant.imgUrl}/retail/order/wait-delivery.png`;
+      } else if (this.data.status == 2) {
+        img = `${this.$constant.imgUrl}/retail/order/in-delivery.png`;
+      } else if (this.data.status == 5) {
+        img = `${this.$constant.imgUrl}/retail/order/order-confirm.png`;
+      }
+      return img;
+    }
+  },
+  onLoad() {
+    // this.init()
+  },
+  methods: {
+    init() {
+      this._getDet().then(() => {
+        getShopUser().then(res => {
+          if (this.data.status == 0) {
+            this.$refs.couponSel._getUserDiscount().then(status => {
+              this.discountArr = status;
+            });
+          }
+        });
+      });
+    },
+    _getDet() {
+      let form = {};
+      if (this.option.id) {
+        form.id = this.option.id;
+      } else if (this.option.orderSn) {
+        form.orderSn = this.option.orderSn;
+      }
+      return getDetail(form).then(res => {
+        this.data = res.data;
+
+        if (res.data.payWay == 0) {
+          this.payWayInfo = "微信支付";
+        } else if (res.data.payWay == 1) {
+          this.payWayInfo = "支付宝";
+        } else if (res.data.payWay == 2) {
+          this.payWayInfo = "余额";
+        } else {
+          this.payWayInfo = "其它";
+        }
+
+        if (res.data.reachPeriod == 0) {
+          this.reachPeriodInfo = "上午";
+        } else if (res.data.reachPeriod == 1) {
+          this.reachPeriodInfo = "下午";
+        } else if (res.data.reachPeriod == 2) {
+          this.reachPeriodInfo = "晚上";
+        } else {
+          this.reachPeriodInfo = "上午";
+        }
+      });
+    },
+    payFn() {
+      let data = {
+        orderSn: this.data.orderSn,
+        totalPrice: this.data.prePrice,
+        couponId: 0
+      };
+      this.$util.pageTo({
+        url: "/pages/callback/index",
+        query: {
+          pageStatus: 1,
+          id: this.data.id,
+          ...data
+        }
+      });
+    },
+    evealFn() {
+      this.$util.pageTo({
+        url: "/pages/order/comment",
+        query: {
+          id: this.data.id
+        }
+      });
+    }
+  }
+};
 </script>
 
 <style lang="scss" scoped>
-
-	.app-content {
-		padding-bottom: 80px;
-	}
-	.page-top {
-		position: relative;
-		.page-top-img {
-			// height: 50px;
-		}
-		.page-top-det {
-			position: absolute;
-			top: 22px;
-			@include disFlex(center, space-between);
-			width: 84%;
-			padding: 0 48px;
-			color: #fff;
-			.page-status {
-				font-size: 36px;
-				font-weight: bold;
-				margin-bottom: 16px;
-			}
-			.page-prompt {
-				color: #ffdede;
-			}
-			.page-status-img {
-				width: 180px;
-			}
-		}
-	}
-	.page-det {
-		width: 94%;
-		margin: 0 auto;
-		position: relative;
-		top: -40px;
-		.order-msg {
-			.order-msg-blo {
-				font-size: 28px;
-				padding: 20px 0;
-				border-top: 1px solid $borderColor;
-				.msg-list {
-					@include disFlex(flex-start, space-between);
-					margin: 16px 0;
-					.label {
-						width: 40%;
-						color: $fontColor3;
-					}
-				}
-			}
-			& .order-msg-blo:first-child {
-				border-top: none;
-			}
-		}
-		.coupon-wrap {
-			.module-det {
-				padding: 20px 0;
-			}
-		}
-	}
-	// 底部按钮
-	.page-btn {
-		width: calc(100% - 60px);
-		@include disFlex(center, space-between);
-		padding: 0 30px;
-		.app-price {
-			margin-bottom: 8px;
-			margin-left: 4px;
-		}
-		.red {
-			width: 270px;
-		}
-		.default {
-			width: 260px;
-		}
-	}
-	// 公共模块
-	.module-com {
-		border-radius: 10px;
-		background-color: #fff;
-		padding: 0 20px;
-		box-shadow: 0px 6px 16px #ddd;
-		margin-bottom: 20px;
-		.module-tit {
-			padding: 20px 0;
-			font-size: 28px;
-			font-weight: 600;
-			border-bottom: 1px solid $borderColor;
-		}
-	}
+.app-content {
+  padding-bottom: 80px;
+}
+.page-top {
+  position: relative;
+  .page-top-det {
+    position: absolute;
+    top: 22px;
+    @include disFlex(center, space-between);
+    width: 84%;
+    padding: 0 48px;
+    color: #fff;
+    .page-status {
+      font-size: 36px;
+      font-weight: bold;
+      margin-bottom: 16px;
+    }
+    .page-prompt {
+      color: #ffdede;
+    }
+    .page-status-img {
+      width: 180px;
+    }
+  }
+}
+.page-det {
+  width: 94%;
+  margin: 0 auto;
+  position: relative;
+  top: -40px;
+  .order-msg {
+    .order-msg-blo {
+      font-size: 28px;
+      padding: 20px 0;
+      border-top: 1px solid $borderColor;
+      .msg-list {
+        @include disFlex(flex-start, space-between);
+        margin: 16px 0;
+        .label {
+          width: 40%;
+          color: $fontColor3;
+        }
+      }
+    }
+    & .order-msg-blo:first-child {
+      border-top: none;
+    }
+  }
+  .coupon-wrap {
+    .module-det {
+      padding: 20px 0;
+    }
+  }
+}
+// 底部按钮
+.page-btn {
+  width: calc(100% - 60px);
+  @include disFlex(center, space-between);
+  padding: 0 30px;
+  .app-price {
+    margin-bottom: 8px;
+    margin-left: 4px;
+  }
+  .red {
+    width: 270px;
+  }
+  .default {
+    width: 260px;
+  }
+}
+// 公共模块
+.module-com {
+  border-radius: 10px;
+  background-color: #fff;
+  padding: 0 20px;
+  box-shadow: 0px 6px 16px #ddd;
+  margin-bottom: 20px;
+  .module-tit {
+    padding: 20px 0;
+    font-size: 28px;
+    font-weight: 600;
+    border-bottom: 1px solid $borderColor;
+  }
+}
 </style>

+ 3 - 5
mall/src/pages/order/list.vue

@@ -38,7 +38,7 @@
 						query: {
 							pageStatus: 1,
 							orderSn: item.orderSn,
-							totalPrice: item.prePrice,
+							totalPrice: item.actPrice,
 							couponId: item.couponId
 						}
 					})"
@@ -54,6 +54,7 @@
           </block>-->
           <block v-if="item.status == 5">
             <button
+              v-if="data.grade == 0"
               class="button-com red defalut"
               @click.stop="pageTo({
 						url: '/pages/order/comment',
@@ -76,7 +77,6 @@
 import ListModule from "@/components/module/app-order-list";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import { list } from "@/mixins";
-// api
 import { getList } from "@/api/order";
 export default {
   name: "order-list",
@@ -104,9 +104,7 @@ export default {
       uni.stopPullDownRefresh();
     }
   },
-  onLoad: function() {
-    // this.init()
-  },
+  onLoad: function() {},
   methods: {
     async init() {
       this._list();