shish 4 éve
szülő
commit
e41a502113

+ 1 - 1
mallApp/src/api/item/index.js

@@ -15,4 +15,4 @@ import https from "@/plugins/luch-request_0.0.7/request";
  */
  export const getGhsProductList = data => {
 	return https.get('/item/ghs-item', data)
-}
+}

+ 5 - 0
mallApp/src/api/order/index.js

@@ -1,4 +1,9 @@
 import https from '@/plugins/luch-request_0.0.7/request'
+
+export const buyItem = data => {
+	return https.post('/order/buy-item', data)
+}
+
 /** *
  * 商城下单-生成订单 m
  */

+ 3 - 22
mallApp/src/components/module/app-order-list.vue

@@ -3,15 +3,15 @@
 		<block v-if="!$util.isEmpty(info)">
 			<div class="list-left">
 				<div class="image">
-					<image :src="imgUrl | default_img" mode="aspectFill" style="width:68upx;height:68upx;"></image>
+					<image :src="info.cover" mode="aspectFill" style="width:130upx;height:130upx;"></image>
 				</div>
 				<div class="list-msg">
 					<div class="title">{{ info.name}}</div>
 				</div>
 			</div>
 			<div class="list-right">
-				<div class="price">¥{{ info.price || info.unitPrice }}</div>
-				<div class="num">*{{ info.buyNum || info.num }}</div>
+				<div class="price">¥{{info.unitPrice?parseFloat(info.unitPrice):0}}</div>
+				<div class="num">X{{info.num}}</div>
 			</div>
 		</block>
 	</div>
@@ -30,25 +30,6 @@ export default {
 		return {}
 	},
 	computed: {
-		imgUrl() {
-			if (this.$util.isEmpty(this.info)){
-				return '';
-			}
-			let img = '';
-			if(!this.$util.isEmpty(this.info.goodsStyleList)){
-				this.info.goodsStyleList.forEach((ele)=>{
-					if(ele.id==this.goodsStyleId){
-						img = ele.img
-					}
-				})
-				if(!this.$util.isEmpty(img)){
-					return img
-				}
-			}
-			if(this.info.smallCoverUrl){
-				return this.info.smallCoverUrl
-			}
-		}
 	},
 	mounted() {
 	},

+ 67 - 0
mallApp/src/components/module/app-order-list2.vue

@@ -0,0 +1,67 @@
+<template>
+	<div class="list-module">
+		<block v-if="!$util.isEmpty(info)">
+			<div class="list-left">
+				<div class="image">
+					<image :src="info.cover" mode="aspectFill" style="width:130upx;height:130upx;"></image>
+				</div>
+				<div class="list-msg">
+					<div class="title">{{ info.name}}</div>
+				</div>
+			</div>
+			<div class="list-right">
+				<div class="price">¥{{info.price?parseFloat(info.price):0}}</div>
+				<div class="num">X{{info.buyNum}}</div>
+			</div>
+		</block>
+	</div>
+</template>
+<script>
+export default {
+	name: 'list-module',
+	props: {
+		info: {
+			type: Object,
+			default: () => {}
+		},
+        goodsStyleId:'',
+	},
+	data() {
+		return {}
+	},
+	computed: {
+	},
+	mounted() {
+	},
+	methods: {}
+}
+</script>
+<style lang="scss" scoped>
+.list-module {
+	@include disFlex(center, space-between);
+	padding: 20upx 0;
+	border-bottom: 1upx solid $borderColor;
+	.list-left {
+		@include disFlex(flex-start, space-between);
+		.list-msg {
+			margin-left: 30upx;
+			.title {
+				font-size: 28upx;
+				color: $fontColor2;
+				margin-bottom: 10upx;
+			}
+			.desc {
+				color: $fontColor3;
+			}
+		}
+	}
+	.list-right {
+		text-align: right;
+		color: $fontColor2;
+		.price {
+			margin-bottom: 70upx;
+			color: #333;
+		}
+	}
+}
+</style>

+ 5 - 2
mallApp/src/pages/billing/affirmGhs.vue

@@ -45,6 +45,7 @@
 </template>
 <script>
 import productMins from "@/mixins/cgProduct";
+import { buyItem } from "@/api/order"
 import { mapActions, mapGetters } from "vuex";
 export default {
 	name: "BillingAffirm",
@@ -131,9 +132,11 @@ export default {
 				return { productId: ele.id, num:num,ptItemId:ele.itemId,property:1,unitType:unitType,property:1};
 			});
 			let params = { product: JSON.stringify(product) }
-			createOrder(params).then(res => {
+			uni.showLoading({mask:true})
+			buyItem(params).then(res => {
+				uni.hideLoading()
 				if(res.code && res.code == 1){
-
+					this.$util.pageTo({ url: "/pages/callback/index", type: 2, query: { pageStatus: 1, ...res.data } })
 				}
 			});
 		},

+ 12 - 26
mallApp/src/pages/callback/index.vue

@@ -22,7 +22,7 @@
         <block v-if="pageStatus == 1 || pageStatus == 2">
           <div class="price">
             <span>¥</span>
-            <span class="app-size-36 app-bold">{{ option.totalPrice }}</span>
+            <span class="app-size-36 app-bold">{{ option.totalPrice?parseFloat(option.totalPrice):0 }}</span>
           </div>
           <div class="order-num app-color-3">订单号: {{ option.orderSn }}</div>
         </block>
@@ -50,33 +50,21 @@
             <div class="app-color-2">识别二维码并关注公众号</div>
           </div>
         </block>
-        <!-- 待支付 -->
+
         <block v-if="pageStatus == 1 || pageStatus == 2">
           <div class="call-one-btn">
             <button v-if="isYeBtnShow" class="button-com red pay-ye" @click="balancePayFn">余额支付</button>
-            <button class="button-com green pay-wx" @click="_wxPay">微信支付</button>
+            <button class="button-com green pay-wx" @click="wxPayFn">微信支付</button>
           </div>
         </block>
-        <!-- 两个主按钮 -->
+
         <block v-else-if="pageStatus == 3 || pageStatus == 4 || pageStatus == 5">
           <div class="call-btn-com call-two-btn">
-            <button
-              class="button-com default"
-              @click="pageTo({
-							url: '/pages/order/detail',
-							type: 2,
-							query: {
-								orderSn: option.orderSn,
-								id: option.id
-							}
-						})"
-            >查看订单</button>
-            <!--<button class="button-com" @click="pageTo({url: '/pages/home/index',type:4})">返回首页</button>-->
+            <button class="button-com default" @click="pageTo({ url: '/pages/order/detail', type: 2, query: { id: option.id } })" >查看订单</button>
             <navigator open-type="switchTab" url="/pages/home/index" class="button-com" >返回首页</navigator>
           </div>
         </block>
       </div>
-      <!-- 优惠券 -->
       <div class="coupon-wrap" v-if="option.pageStatus == 5">
         <div class="coupon-img">
           <img :src="`${constant.imgUrl}/retail/callback/coupon.png`" alt mode="widthFix" />
@@ -86,7 +74,7 @@
         </div>
       </div>
     </div>
-    <!-- 支付密码弹窗 -->
+
     <modal-module
       :show="passwordModal"
       @cancel="modalCancel"
@@ -205,14 +193,12 @@ export default {
         });
     },
     // 微信支付
-    _wxPay() {
-      wxPay({
-        orderSn: this.option.orderSn,
-        couponId: this.option.couponId
-      }).then(res => {
-        this.payCallData = res.data;
-        wexinPay(res.data, this.paySuccess, this.payFail);
-      });
+    wxPayFn() {
+      let miniOpenId = uni.getStorageSync('miniOpenId')
+      wxPay({ orderSn: this.option.orderSn, couponId: this.option.couponId,miniOpenId:miniOpenId }).then(res => {
+        this.payCallData = res.data
+        wexinPay(res.data, this.paySuccess, this.payFail)
+      })
     },
     paySuccess() {
       this.$util.pageTo({

+ 2 - 3
mallApp/src/pages/goods/components/sel-popup.vue

@@ -104,9 +104,8 @@ export default {
       this.selIndex = index;
     },
     nextFn() {
-      uni.setStorageSync("buyGoodsDetil", this.info);
-      this.$util.pageTo({ url: "/pages/order/buy", type: 2,
-      query: { goodsId: this.info.id, goodsStyleId: this.$util.isEmpty(this.info.goodsStyleList) ? "" : this.info.goodsStyleList[this.selIndex].id, goodsNum: this.buyNum, selIndex: this.selIndex } })
+      uni.setStorageSync("buyGoodsDetil", this.info)
+      this.$util.pageTo({url:"/pages/order/buy",type:2,query:{goodsId:this.info.id,goodsNum:this.buyNum,selIndex:this.selIndex}})
     }
   }
 };

+ 3 - 24
mallApp/src/pages/goods/detail.vue

@@ -96,38 +96,17 @@ export default {
   },
   methods: {
     init() {
-      let account = uni.getStorageSync('account')
-      this._getDetail().then(() => {
-        // 设置分享
-        let shareParams = {
-          title: `${this.data.goodsName}`, // 分享标题
-          desc: "这束花不错推荐给你", // 分享内容
-          imgUrl: this.data.smallImgList[0],
-          // #ifndef H5
-          pagePath: `/pages/goods/detail?id=${this.data.id}&account=${account}`
-          // #endif
-        };
-        this.jweixinFn(shareParams);
-      })
+      this.getGoodsInfo()
     },
-    async _getDetail() {
+    async getGoodsInfo() {
       await getDetail({ id: this.option.id }).then(res => {
         if (this.$util.isEmpty(res.data)) return false;
         let newArr = [];
         for (let i in res.data.imgList) {
-          newArr.push({
-            img: res.data.imgList[i]
-          });
+          newArr.push({ img: res.data.imgList[i] })
         }
         this.imgList = newArr;
-        // 格式化数据
-        let goodsStyleList = [];
-        for (let i in res.data.goodsStyleList) {
-          goodsStyleList.push(res.data.goodsStyleList[i]);
-        }
         res.data.stock = res.data.stock ? parseInt(res.data.stock) : 0;
-        res.data.goodsStyleList = goodsStyleList;
-
         this.data = res.data;
       });
     },

+ 1 - 1
mallApp/src/pages/home/category.vue

@@ -17,7 +17,7 @@
                 <div class="goods-name">{{ items.name }}</div>
                 <div class="goods-sales">已售{{ items.sold }}</div>
               </div>
-              <div class="goods-price">¥{{ items.price }}</div>
+              <div class="goods-price">¥{{ items.price?parseFloat(items.price):0 }}</div>
             </div>
           </div>
         </div>

+ 1 - 1
mallApp/src/pages/home/components/goods-list-big.vue

@@ -15,7 +15,7 @@
 					<div class="goods-det">
 						<div class="goods-left">
 							<div class="goods-name">{{ item.name }}</div>
-							<div class="app-price">¥{{ item.price }}</div>
+							<div class="app-price">¥{{ item.price?parseFloat(item.price):0 }}</div>
 						</div>
 						<div class="button-com red buy-com-btn">购买</div>
 					</div>

+ 1 - 1
mallApp/src/pages/home/components/goods-list-middle.vue

@@ -14,7 +14,7 @@
 				<div class="goods-det">
 					<div class="goods-left">
 						<div class="goods-name">{{ item.name }}</div>
-						<div class="app-price">¥{{ item.price }}</div>
+						<div class="app-price">¥{{ item.price?parseFloat(item.price):0 }}</div>
 					</div>
 					<div class="button-com red buy-com-btn" @click="pageTo(`/pages/goods/detail?id=${item.id}`)">购买</div>
 				</div>

+ 1 - 1
mallApp/src/pages/home/components/goods-list-small.vue

@@ -14,7 +14,7 @@
 				<div class="goods-det">
 					<div class="goods-left">
 						<div class="goods-name">{{ item.name }}</div>
-						<div class="app-price">¥{{ item.price }}</div>
+						<div class="app-price">¥{{ item.price?parseFloat(item.price):0 }}</div>
 					</div>
 					<div class="button-com red buy-com-btn">购买</div>
 				</div>

+ 1 - 1
mallApp/src/pages/item/item.vue

@@ -60,7 +60,7 @@
 		<modal-module :show="isModel" @cancel="modalCancel" @click="affirm" :title="customData.itemName" color="#333" :size="32" padding="30upx 30upx" >
 			<template slot="customContent">
 				<view class="select-cmd_bx" v-if="customData">
-					<view class="kc"> 库存 {{ customData.stock }} </view>
+					<view class="kc"> 库存 {{ customData.stock ? parseFloat(customData.stock) : 0 }} </view>
 					<view class="num_bx">
 						<input v-model="customData.bigCount" :focus="isFocus" type="number" placeholder="扎数" />
 					</view>

+ 75 - 150
mallApp/src/pages/order/buy.vue

@@ -1,103 +1,70 @@
 <template>
-  <div class="app-content">
-    <!-- tabs -->
-    <app-tabs
-      :tabs="tabs"
-      :currentTab="tabIndex"
-      :isFixed="true"
-      :borderLeft="true"
-      @change="tabChange"
-      itemWidth="50%"
-    />
-    <!-- 配送 -->
+  <view class="app-content">
+    <app-tabs :tabs="tabs" :currentTab="tabIndex" :isFixed="true" :borderLeft="true" @change="tabChange" itemWidth="50%" />
     <form @submit="formSubmit">
       <block v-if="tabIndex == 0">
         <app-delivery-module ref="appDelivery" @changeAddress="changeAddress" />
       </block>
-      <!-- 自取 -->
       <block v-else>
-        <!-- 收花人 -->
-        <div class="module-com">
+        <view class="module-com">
           <tui-list-cell class="line-cell" :hover="false">
-            <div class="tui-title">手机号</div>
-            <input
-              v-model="mentionForm.bookMobile"
-              placeholder-class="phcolor"
-              class="tui-input"
-              name="phone"
-              placeholder="请输入手机号"
-              type="number"
-            />
+            <view class="tui-title">手机号</view>
+            <input v-model="mentionForm.bookMobile" placeholder-class="phcolor" class="tui-input" name="phone" placeholder="请输入手机号" type="number" />
           </tui-list-cell>
-        </div>
+        </view>
       </block>
 
-      <!-- 商品金额 -->
-      <div class="module-com shop-price-wrap">
-        <div class="module-tit">商品信息</div>
-        <div class="module-det">
-          <app-list-module v-if="!$util.isEmpty(goodsInfo)" :goodsStyleId="option.goodsStyleId" :info="goodsInfo" />
-          <div class="shop-prompt" v-if="!$util.isEmpty(orderShop)" @click="showAlert = true">
-            <div>
+      <view class="module-com shop-price-wrap">
+        <view class="module-tit">商品信息</view>
+        <view class="module-det">
+          <app-list-module v-if="!$util.isEmpty(goodsInfo)" :info="goodsInfo" />
+          <view class="shop-prompt" v-if="!$util.isEmpty(orderShop)" @click="showAlert = true">
+            <view>
               <span>{{ `运费(${showDistance}公里)` }}</span>
               <i class="iconfont iconchangjianwentixiangguanwenti2" style="font-size:45upx;"></i>
-            </div>
-            <div>¥{{ freightPrice }}</div>
-          </div>
+            </view>
+            <view>¥{{ freightPrice }}</view>
+          </view>
+          <view class="shop-prompt">
+            <view>总计</view>
+            <view>¥{{ totalPrice }}</view>
+          </view>
+        </view>
+      </view>
 
-          <div class="shop-prompt">
-            <div>总计</div>
-            <div>¥{{ totalPrice }}</div>
-          </div>
-        </div>
-      </div>
-      <!-- 可选优惠 -->
-      <div class="module-com discount-wrap" v-if="!$util.isEmpty(discountArr)">
-        <div class="module-tit">可选优惠</div>
-        <div class="module-det">
-          <app-coupon-sel
-            ref="couponSel"
-            @calcDiscount="calcDiscount"
-            :discountArr="['member', 'coupon']"
-          />
-        </div>
-      </div>
-      <app-trademark />
-      <view style="width:100%;height:90upx"></view>
-      <!-- 按钮 -->
-      <div class="page-btn app-footer">
-        <div class="flex-center">
+      <view style="width:100vw;height:200upx"></view>
+
+      <view class="page-btn app-footer">
+        <view class="flex-center">
           <span>应付款</span>
           <span class="app-price">
             <span>¥</span>
             <span class="app-size-40">{{ mayPayAmount }}</span>
           </span>
-        </div>
+        </view>
         <button class="button-com red" formType="submit">确认</button>
-      </div>
+      </view>
     </form>
-    <!-- 弹窗 -->
     <alert-module :show="showAlert" @click="hideAlert" @cancel="hideAlert">
-      <div class="alt-content" v-if="!$util.isEmpty(orderShop)">
-        <div>
+      <view class="alt-content" v-if="!$util.isEmpty(orderShop)">
+        <view>
           <span class="app-price">{{ `${orderShop.freight.first}公里`}}</span>内免运费
-        </div>
-        <div>
+        </view>
+        <view>
           <span>超过每增加1公里运费加</span>
           <span class="app-price">{{ `${orderShop.freight.add}元` }}</span>
-        </div>
-      </div>
+        </view>
+      </view>
     </alert-module>
-  </div>
+  </view>
 </template>
-
 <script>
 import { mapGetters } from "vuex";
 import AppTabs from "@/components/plugin/tabs";
 import TuiListCell from "@/components/plugin/list-cell";
 import AppDeliveryModule from "@/components/app-delivery";
 import AppTrademark from "@/components/module/app-trademark";
-import AppListModule from "@/components/module/app-order-list";
+import AppListModule from "@/components/module/app-order-list2";
 import AppCouponSel from "@/components/app-coupon-sel";
 import AlertModule from "@/components/plugin/alert";
 const form = require("@/utils/formValidation.js");
@@ -129,7 +96,6 @@ export default {
         }
       ],
       showAlert: false,
-      // form
       form: {
         anonymity: "0", // 是否匿名 0不 1要
         sendDistance: "", // 配送距离,根据腾讯js进行计算
@@ -140,15 +106,12 @@ export default {
         receiveLat: "", // 收花人纬度
         receiveLong: "" // 收花人经度
       },
-      // 自提form
       mentionForm: {
         bookMobile: ""
       },
       discountArr: false,
-      // 运费
       freightPrice: 0,
       goodsNum: 1,
-      //显示的距离
       showDistance: 0,
       totalPrice: 0,
       memberDiscount: 1,
@@ -159,38 +122,24 @@ export default {
   computed: {
     ...mapGetters({ orderShop: "getOrderShop" }),
     ...mapGetters({ shopUser: "getShopUser" }),
-    mayPayAmount: function() {
-      let price =
-        (this.goodsInfo.price * this.goodsInfo.buyNum + this.freightPrice) *
-          this.memberDiscount -
-        this.couponDiscountAmount;
-      return price.toFixed(2);
+    mayPayAmount(){
+      let price = (this.goodsInfo.price * this.goodsInfo.buyNum + this.freightPrice) * this.memberDiscount - this.couponDiscountAmount
+      return parseFloat(price.toFixed(2))
     }
   },
   watch: {
     //运费变化则总金额和应付金额变化
     freightPrice(newVal) {
       let price = this.goodsInfo.price * this.goodsInfo.buyNum + newVal;
-      this.totalPrice = price.toFixed(2);
+      this.totalPrice = parseFloat(price.toFixed(2))
     }
   },
-  onLoad() {
-  },
-  created() {},
   methods: {
     init() {
-      let goodsInfo = uni.getStorageSync("buyGoodsDetil");
-
-      goodsInfo.price = this.option.goodsStyleId
-        ? goodsInfo.goodsStyleList[this.option.selIndex].price
-        : goodsInfo.price;
 
-      getOrderShop().then(() => {
-        this.$refs.couponSel._getUserDiscount().then(discountData => {
-          this.discountArr = discountData;
-        });
-      });
+      let goodsInfo = uni.getStorageSync("buyGoodsDetil")
 
+      getOrderShop()
       getShopUser();
 
       goodsInfo.buyNum = this.option.goodsNum;
@@ -198,17 +147,39 @@ export default {
 
       this.totalPrice = goodsInfo.price * this.option.goodsNum;
 
-      // 初始化上个页面带入的值
       Object.keys(this.form).forEach((i, index) => {
         this.form[i] = this.option[i];
+      })
+
+    },
+    tabChange(e) {
+      this.tabIndex = e.index;
+    },
+    hideAlert() {
+      this.showAlert = false;
+    },
+    anonymityChange(e) {
+      this.form.anonymity = this.form.anonymity == 1 ? 0 : 1;
+    },
+    //计算客户距离和运费
+    changeAddress(e) {
+      let lat = this.$refs.appDelivery.region.latitude;
+      let long = this.$refs.appDelivery.region.longitude;
+      getUserDistance({ lat: lat, lng: long }).then(res => {
+        this.freightPrice = res.data.fee;
+        this.showDistance = res.data.showDistance;
       });
     },
-    //最终会员优惠的折扣和优惠券优惠金额
-    calcDiscount(discountData) {
-      this.memberDiscount = discountData.memberDiscount;
-      this.couponDiscountAmount = discountData.couponDiscountAmount;
+    formSubmit(e) {
+      let rules = [];
+      let formData = e.detail.value;
+      let checkRes = form.validation(formData, rules);
+      if (!checkRes) {
+        this.createOrderFn()
+      } else {
+        this.$msg(checkRes);
+      }
     },
-    // 生成订单
     createOrderFn() {
       let addForm = {};
       let form =
@@ -244,57 +215,12 @@ export default {
           return false;
         }
       }
-
-      createOrder({
-        needSend: this.tabIndex == 0 ? "1" : "0",
-        ...form,
-        ...this.form,
-        ...addForm,
-        ...region
-      }).then(res => {
-        uni.removeStorageSync("buyGoodsDetil");
-        this.$util.pageTo({
-          url: "/pages/callback/index",
-          type: 2,
-          query: {
-            pageStatus: 1,
-            ...res.data
-          }
-        });
+      uni.showLoading({mask:true})
+      createOrder({ needSend: this.tabIndex == 0 ? "1" : "0", ...form, ...this.form, ...addForm, ...region }).then(res => {
+        uni.hideLoading()
+        uni.removeStorageSync("buyGoodsDetil")
+        this.$util.pageTo({ url: "/pages/callback/index", type: 2, query: { pageStatus: 1, ...res.data } })
       });
-    },
-    confirmFn() {
-      this.createOrderFn();
-    },
-    tabChange(e) {
-      this.tabIndex = e.index;
-    },
-    hideAlert() {
-      this.showAlert = false;
-    },
-    anonymityChange(e) {
-      this.form.anonymity = this.form.anonymity == 1 ? 0 : 1;
-    },
-    // 选择地址
-    changeAddress(e) {
-      // 计算客户距离和运费
-      let lat = this.$refs.appDelivery.region.latitude;
-      let long = this.$refs.appDelivery.region.longitude;
-      getUserDistance({ lat: lat, lng: long }).then(res => {
-        this.freightPrice = res.data.fee;
-        this.showDistance = res.data.showDistance;
-      });
-    },
-    // 表单验证
-    formSubmit(e) {
-      let rules = [];
-      let formData = e.detail.value;
-      let checkRes = form.validation(formData, rules);
-      if (!checkRes) {
-        this.confirmFn();
-      } else {
-        this.$msg(checkRes);
-      }
     }
   }
 };
@@ -303,7 +229,7 @@ export default {
 <style lang='scss' scoped>
 .app-content {
   padding-top: 100upx;
-  padding-bottom: 120upx;
+  padding-bottom: 160upx;
   min-height: calc(100vh - 220upx);
   .module-com {
     margin-bottom: 20upx;
@@ -379,7 +305,6 @@ export default {
     width: 270upx;
   }
 }
-// 弹窗
 /deep/.tui-alert-content {
   padding: 40upx 40upx;
 }

+ 13 - 35
mallApp/src/pages/order/detail.vue

@@ -15,26 +15,18 @@
         </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"
-            />
+            <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>
@@ -49,7 +41,6 @@
               <div class="value">{{ data.fullAddress }}</div>
             </div>
           </div>
-          <!--  -->
           <div class="order-msg-blo">
             <div class="msg-list">
               <div class="label">送达时间</div>
@@ -69,7 +60,6 @@
               <div class="value">{{ data.anonymity == 1 ? '是' : '' }}</div>
             </div>
           </div>
-          <!--  -->
           <div class="order-msg-blo">
             <div class="msg-list">
               <div class="label">订单号</div>
@@ -77,52 +67,41 @@
             </div>
             <div class="msg-list">
               <div class="label">时间</div>
-              <div class="value">{{ data.addTime}}</div>
+              <div class="value">{{ data.addTime ? data.addTime.substr(5,11) : ''}}</div>
             </div>
             <div class="msg-list">
-              <div class="label">运费</div>
-              <div class="value">¥{{ data.sendCost }}</div>
+              <div class="label">支付方式</div>
+              <div class="value">{{ payWayInfo }}</div>
             </div>
             <div class="msg-list">
-              <div class="label">总价</div>
-              <div class="value">¥{{ data.prePrice }}</div>
+              <div class="label">运费</div>
+              <div class="value">¥{{ data.sendCost }}</div>
             </div>
             <div class="msg-list">
-              <div class="label">支付方式</div>
-              <div class="value">{{ payWayInfo }}</div>
+              <div class="label">合计</div>
+              <div class="value">¥{{ data.orderPrice }}</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']"
-            />
+            <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-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-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>
@@ -143,7 +122,6 @@
     </div>
   </div>
 </template>
-
 <script>
 import { mapGetters } from "vuex";
 import ListModule from "@/components/module/app-order-list";
@@ -186,7 +164,7 @@ export default {
   },
   methods: {
     init() {
-      this._getDet().then(() => {
+      this.getDetail().then(() => {
         getShopUser().then(res => {
           if (this.data.status == 0) {
             this.$refs.couponSel._getUserDiscount().then(status => {
@@ -196,7 +174,7 @@ export default {
         });
       });
     },
-    _getDet() {
+    getDetail() {
       let form = {};
       if (this.option.id) {
         form.id = this.option.id;