DaMowang 2 سال پیش
والد
کامیت
7b727bd80e
4فایلهای تغییر یافته به همراه32 افزوده شده و 15 حذف شده
  1. 8 1
      src/pagesB/cinema/confirmOrder.vue
  2. 17 11
      src/pagesB/orderingfood/detail.vue
  3. 5 1
      src/pagesB/orderingfood/orderlist.vue
  4. 2 2
      src/request/config.js

+ 8 - 1
src/pagesB/cinema/confirmOrder.vue

@@ -32,6 +32,12 @@
                 <span>¥{{ actuallypaid || 0 }}</span>
             </div>
         </div>
+        <div class="money card">
+            <div class="li flex_r flex_jb">
+                <span>赠送茶宝</span>
+                <span>{{ chabao || 0 }}</span>
+            </div>
+        </div>
         <div class="msg card">
             <div class="m_tit">购票须知</div>
             <p>1.请确认场次和时间无误,购买成功后将不予退换</p>
@@ -61,6 +67,7 @@ export default {
             Integral: 0,
             deduction: 0,
             actuallypaid: 0,
+            chabao: 0,
         };
     },
     methods: {
@@ -71,7 +78,7 @@ export default {
                     this.Integral = this.$h.Mul(i1,100);
                     this.deduction = this.$h.Mul(this.cartTotal,i1).toFixed(2);
                     this.actuallypaid = this.$h.Sub(this.cartTotal,this.deduction);
-                    // this.chabao = this.$h.Mul(this.actuallypaid,i2).toFixed(2);
+                    this.chabao = this.$h.Mul(this.actuallypaid,i2).toFixed(2);
                 }
             })
         },

+ 17 - 11
src/pagesB/orderingfood/detail.vue

@@ -18,8 +18,8 @@
                     </view>
                     <view class="button" v-if="$day().unix() < $day(orderDetail.create_time).add(15, 'm').unix()" :style="'background-color:'+template.color.color1" @click="paypalPrderTap(orderDetail.trade_no)">立即支付</view>
                 </view>
-                <view class="header" v-if="orderDetail.status==1">
-                    <view class="title" :style="'color:'+template.color.color2">{{orderDetail.order_status=='OUT_MEAL'?"待自提":"待出餐"}}</view>
+                <view class="header" v-else>
+                    <view class="title" :style="'color:'+template.color.color2">{{orderDetail.order_status=='OUT_MEAL'?"待取餐":"待出餐"}}</view>
                     <view class="statusBox">
                         <view class="status">
                             <icon type="dingdan" size="25" :color="template.color.color5"></icon>
@@ -33,13 +33,14 @@
                         <view class="line"></view>
                         <view class="status">
                             <icon type="ziqu" size="25" :color="orderDetail.order_status=='OUT_MEAL'?template.color.color5:template.color.color3"></icon>
-                            <text :style="'color:'+(orderDetail.order_status=='OUT_MEAL'?template.color.color5:template.color.color3)">自提</text>
+                            <text :style="'color:'+(orderDetail.order_status=='OUT_MEAL'?template.color.color5:template.color.color3)">取餐</text>
                         </view>
                     </view>
-                    <view class="button" v-if="orderDetail.order_status=='OUT_MEAL'" :style="'background-color:'+template.color.color1" @click="qrcodeTap(true)">出示提货码</view>
+                    <view class="codes" v-if="orderDetail.code">{{ orderDetail.code }}</view>
+                    <!-- <view class="button" v-if="orderDetail.order_status=='OUT_MEAL'" :style="'background-color:'+template.color.color1" @click="qrcodeTap(true)">出示取餐码</view> -->
                 </view>
                 <!-- <view class="header" v-if="orderDetail.order_status==3">
-                    <view class="title" :style="'color:'+template.color.color2">{{orderDetail.delivery_type==1?'已送达':'已自提'}}</view>
+                    <view class="title" :style="'color:'+template.color.color2">{{orderDetail.delivery_type==1?'已送达':'已取餐'}}</view>
                     <view class="statusBox">
                         <view class="status">
                             <icon type="wanchen" size="25" :color="template.color.color1"></icon>
@@ -125,7 +126,7 @@
             <view class="showContent" :style="qrcodeShow?'bottom:0;':''">
                 <view class="bg" @click="qrcodeTap(false)"></view>
                 <view class="showBox" style="min-height: 550rpx;">
-                    <view class="pheader" :style="'color:'+template.color.color2">请向店员出示提货码</view>
+                    <view class="pheader" :style="'color:'+template.color.color2">请向店员出示取餐码</view>
                     <view class="images">
                         <uqcode ref="uqcode" class="code-img" :size="150"/>
                     </view>
@@ -201,11 +202,11 @@ export default {
                     this.orderTotal = totals;
                     this.GoodNumber = number;
                     this.getIntegral();
-                    if(this.orderDetail.order_status=='OUT_MEAL'){
-                        setTimeout(() => {
-                            this.$refs.uqcode.createCode(this.orderDetail.code)
-                        }, 1000);
-                    }
+                    // if(this.orderDetail.order_status=='OUT_MEAL'){
+                    //     setTimeout(() => {
+                    //         this.$refs.uqcode.createCode(this.orderDetail.code)
+                    //     }, 1000);
+                    // }
                 }
             })
         },
@@ -631,4 +632,9 @@ page {
         height: 100vw;
     }
 }
+
+.codes{
+    color: #222;
+    font-size: 26rpx;
+}
 </style>

+ 5 - 1
src/pagesB/orderingfood/orderlist.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="orderlist">
+    <div class="orderlist" v-if="orderList.length">
         <div class="o_item" v-for="(i,s) in orderList" :key="s" @click="entrance(i)">
             <div class="p1 flex_r flex_jb">
                 <span class="name_tit ellipsis">{{ i.restaurant_name }}</span>
@@ -28,6 +28,10 @@
             <div class="p3">下单时间:{{ i.create_time }}</div>
         </div>
     </div>
+    <div class="zanwu" v-else>
+        <img src="http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/5a3c6b1e2d098aa6695394c927c38586545188b8png" alt="" class="zanwuimg">
+        <view class="zanwutxt">暂无订单信息</view>
+    </div>
 </template>
 <script>
 import { post } from "@/request/api.js";

+ 2 - 2
src/request/config.js

@@ -15,6 +15,6 @@ if (process.env.UNI_PLATFORM === "h5") {
 export default apis == 1 ? {
 	Hhost: "https://shop-api.haocha13.cn/",
 } : {
-	Hhost: "https://shop-api.haocha13.cn/",  //正式接口
-	// Hhost: "https://test-api.haocha13.cn/",
+	// Hhost: "https://shop-api.haocha13.cn/",  //正式接口
+	Hhost: "https://test-api.haocha13.cn/",
 }