Browse Source

修改bug

cr 4 years ago
parent
commit
30afa0ec08
5 changed files with 97 additions and 20 deletions
  1. 5 5
      .env
  2. 4 4
      .env.develop
  3. 5 5
      .env.production
  4. 3 0
      releaselog.md
  5. 80 6
      src/pages/index/index.vue

+ 5 - 5
.env

@@ -7,17 +7,17 @@ NODE_ENV = 'production'
7 7
 VUE_APP_ENV = develop
8 8
 
9 9
 # 接口请求基地址
10
-VUE_APP_API_BASE_URL = http://localhost:59982
10
+VUE_APP_API_BASE_URL = https://delivery.ixiaokejia.com
11 11
 
12 12
 # 接口请求基地址
13
-VUE_APP_WEBSOCKET_BASE_URL = wss://whcsocket.chuangzhikeji.com
13
+VUE_APP_WEBSOCKET_BASE_URL = 
14 14
 
15 15
 # 图片基地址
16
-VUE_APP_IMAGE_BASE_URL = http://localhost:59982
17
-VUE_APP_IMAGE_RESOURCE_URL = https://whcoss.chuangzhikeji.com
16
+VUE_APP_IMAGE_BASE_URL = https://delivery.ixiaokejia.com
17
+VUE_APP_IMAGE_RESOURCE_URL = 
18 18
 
19 19
 # 微信小程序appId
20
-VUE_APP_WX_APPID = wx83192c5ed4977f37
20
+VUE_APP_WX_APPID = wxda6414f3c83f2378
21 21
 
22 22
 # 签名加密盐
23 23
 VUE_APP_SALT =

+ 4 - 4
.env.develop

@@ -7,14 +7,14 @@ NODE_ENV = 'production'
7 7
 VUE_APP_ENV = production
8 8
 
9 9
 # 接口请求基地址
10
-VUE_APP_API_BASE_URL = http://localhost:59982
10
+VUE_APP_API_BASE_URL = https://delivery.ixiaokejia.com
11 11
 
12 12
 # 接口请求基地址
13
-VUE_APP_WEBSOCKET_BASE_URL = wss://whc.socket.dev.chuangzhikeji.com
13
+VUE_APP_WEBSOCKET_BASE_URL = 
14 14
 
15 15
 # 图片基地址
16
-VUE_APP_IMAGE_BASE_URL = http://localhost:59982
17
-VUE_APP_IMAGE_RESOURCE_URL = https://whcoss.chuangzhikeji.com
16
+VUE_APP_IMAGE_BASE_URL = https://delivery.ixiaokejia.com
17
+VUE_APP_IMAGE_RESOURCE_URL = 
18 18
 
19 19
 # 微信小程序appId
20 20
 VUE_APP_WX_APPID = wxda6414f3c83f2378

+ 5 - 5
.env.production

@@ -7,17 +7,17 @@ NODE_ENV = 'production'
7 7
 VUE_APP_ENV = production
8 8
 
9 9
 # 接口请求基地址
10
-VUE_APP_API_BASE_URL = https://whcapi.chuangzhikeji.com
10
+VUE_APP_API_BASE_URL = https://delivery.ixiaokejia.com
11 11
 
12 12
 # 接口请求基地址
13
-VUE_APP_WEBSOCKET_BASE_URL = wss://whcsocket.chuangzhikeji.com
13
+VUE_APP_WEBSOCKET_BASE_URL = 
14 14
 
15 15
 # 图片基地址
16
-VUE_APP_IMAGE_BASE_URL = https://whcapi.chuangzhikeji.com
17
-VUE_APP_IMAGE_RESOURCE_URL = https://whcoss.chuangzhikeji.com
16
+VUE_APP_IMAGE_BASE_URL = https://delivery.ixiaokejia.com
17
+VUE_APP_IMAGE_RESOURCE_URL = 
18 18
 
19 19
 # 微信小程序appId
20
-VUE_APP_WX_APPID = wx83192c5ed4977f37
20
+VUE_APP_WX_APPID = wxda6414f3c83f2378
21 21
 
22 22
 # 签名加密盐
23 23
 VUE_APP_SALT =

+ 3 - 0
releaselog.md

@@ -0,0 +1,3 @@
1
+
2
+# 0.1.0 (20.09.20)
3
+### 第一次发布

+ 80 - 6
src/pages/index/index.vue

@@ -26,27 +26,41 @@
26 26
                                     <div class="order__top">
27 27
                                         <div
28 28
                                             class="des"
29
-                                        >{{order.orderInfo.deliveryStartTime | dateFormat('MM-dd hh:mm')}} —— {{order.orderInfo.deliveryEndTime | dateFormat('MM-dd hh:mm')}}</div>
29
+                                        ><span>要求送达时间:</span>{{order.orderInfo.deliveryStartTime | dateFormat('MM-dd hh:mm')}} —— {{order.orderInfo.deliveryEndTime | dateFormat('MM-dd hh:mm')}}</div>
30 30
                                         <div class="index">
31 31
                                             <!-- <span class="symbol">#</span>155 -->
32 32
                                         </div>
33 33
                                     </div>
34
+                                    <div class="tags">
35
+                                        <span
36
+                                            class="tag geekblue"
37
+                                            v-if="order.orderInfo.deliveryMethod===0"
38
+                                        >快递</span>
39
+                                        <span
40
+                                            class="tag green"
41
+                                            v-if="order.orderInfo.deliveryMethod===1"
42
+                                        >门店自提</span>
43
+                                        <span
44
+                                            class="tag magenta"
45
+                                            v-if="order.orderInfo.deliveryMethod===2"
46
+                                        >送货上门</span>
47
+                                    </div>
34 48
                                     <div class="order__con">
35 49
                                         <div
36
-                                            class="order__title on"
50
+                                            class="order__title"
37 51
                                         >{{order.fromAddress.address}} ({{order.storeInfo.name}})</div>
38 52
                                         <p
39 53
                                             class="order__des"
40 54
                                         >{{order.fromAddress.province+ order.fromAddress.city+order.fromAddress.county}}</p>
41 55
                                         <div
42
-                                            class="order__title order__title2"
56
+                                            class="order__title on order__title2"
43 57
                                         >{{order.toAddress.address}}</div>
44 58
                                         <p
45
-                                            class="order__des"
59
+                                            class="order__des on"
46 60
                                         >{{order.toAddress.province+ order.toAddress.city+order.toAddress.county}}</p>
47 61
                                     </div>
48 62
                                 </div>
49
-                                <!-- <div class="yuji">预计9.30出餐</div> -->
63
+                                <!-- <div class="yuji" v-if="tab!==4">预计{{order | yujiTime}}送达</div> -->
50 64
                                 <div
51 65
                                     class="remarks"
52 66
                                     v-if="order.orderInfo.description"
@@ -93,6 +107,7 @@
93 107
 
94 108
 <script>
95 109
 import MyImage from "../../components/image/index";
110
+import fn from "../../common/js/function";
96 111
 
97 112
 export default {
98 113
     name: "",
@@ -141,6 +156,29 @@ export default {
141 156
             loading: false, // 是否加载完成
142 157
         };
143 158
     },
159
+    filters: {
160
+        yujiTime(item) {
161
+            let sTime = item.orderInfo.deliveryStartTime;
162
+            sTime = sTime.replace(/-/g, "/");
163
+            sTime = new Date(sTime);
164
+            sTime = sTime.getTime();
165
+            let instantDelivery = 0; // 配送时间 m
166
+            let reserveReceivingOrdersTime = 0; // 预留接单时间 m
167
+            if (item.storeExtraInfo) {
168
+                instantDelivery =
169
+                    item.storeExtraInfo.deliveryConfig.instantDelivery *
170
+                    60 *
171
+                    1000;
172
+                reserveReceivingOrdersTime =
173
+                    item.storeExtraInfo.deliveryConfig
174
+                        .reserveReceivingOrdersTime *
175
+                    60 *
176
+                    1000;
177
+            }
178
+            sTime += instantDelivery + reserveReceivingOrdersTime;
179
+            return fn.getDateFormat(new Date(sTime), "MM-dd hh:mm");
180
+        },
181
+    },
144 182
 
145 183
     onLoad() {
146 184
         const self = this;
@@ -150,7 +188,7 @@ export default {
150 188
         const self = this;
151 189
         // 未授权
152 190
         if (this.$store.state.user.noPower === true) {
153
-            console.log('未授权重定向',this.$store.state.user)
191
+            console.log("未授权重定向", this.$store.state.user);
154 192
             this.idrouter.replace({
155 193
                 path: "/pages/index/bind",
156 194
                 isReLaunch: true,
@@ -487,6 +525,9 @@ page {
487 525
         align-items: center;
488 526
         .des {
489 527
             font-size: px(40);
528
+            span{
529
+                color: #666;
530
+            }
490 531
         }
491 532
         .index {
492 533
             font-size: px(55);
@@ -495,6 +536,34 @@ page {
495 536
             font-size: px(36);
496 537
         }
497 538
     }
539
+    .tags {
540
+        margin-top: px(20);
541
+        .tag {
542
+            display: inline-block;
543
+            line-height: px(50);
544
+            padding: 0 px(15);
545
+            font-size: px(32);
546
+            border: 1px solid #d9d9d9;
547
+            color: #666;
548
+            background: #fafafa;
549
+            border-radius: px(4);
550
+        }
551
+        .magenta {
552
+            color: #eb2f96;
553
+            background: #fff0f6;
554
+            border-color: #ffadd2;
555
+        }
556
+        .green {
557
+            color: #52c41a;
558
+            background: #f6ffed;
559
+            border-color: #b7eb8f;
560
+        }
561
+        .geekblue {
562
+            color: #2f54eb;
563
+            background: #f0f5ff;
564
+            border-color: #adc6ff;
565
+        }
566
+    }
498 567
 
499 568
     &__con {
500 569
         margin-top: px(60);
@@ -514,6 +583,7 @@ page {
514 583
     &__title {
515 584
         font-size: px(60);
516 585
         position: relative;
586
+        color: #999;
517 587
         &::after {
518 588
             content: "";
519 589
             position: absolute;
@@ -540,6 +610,10 @@ page {
540 610
     &__des {
541 611
         font-size: px(36);
542 612
         margin-top: px(20);
613
+        color: #999;
614
+        &.on {
615
+            color: #333;
616
+        }
543 617
     }
544 618
     &__btns {
545 619
         display: flex;