cr 4 anni fa
parent
commit
6cf641d794

+ 3 - 3
src/common/api/ajax.js

@@ -206,9 +206,9 @@ const http = {
206 206
                     }
207 207
                 }
208 208
             } else if (response.statusCode === 401) {
209
-                await plugin.getToken()
210
-                data = await self.ajax(request[0], request[1], request[2], request[3])
211
-                // router.replace('/pages/index/login');
209
+                // await plugin.getToken()
210
+                // data = await self.ajax(request[0], request[1], request[2], request[3])
211
+                router.replace('/pages/index/login');
212 212
             } else {
213 213
                 console.error(response.data)
214 214
             }

+ 0 - 1
src/common/js/poster.js

@@ -127,7 +127,6 @@ export default {
127 127
             // 背景
128 128
             ctx.setFillStyle("#fff");
129 129
             ctx.fillRect(0, 0, 750, canvasH);
130
-            console.log(resList);
131 130
             // 顶图
132 131
             if (resList[0][1].path) {
133 132
                 ctx.drawImage(resList[0][1].path, bgTop.x, bgTop.y, bgTop.w, bgTop.h);

+ 3 - 2
src/components/easy-upload/easy-upload-media.vue

@@ -27,12 +27,12 @@
27 27
                         :src="upload"
28 28
                         controls
29 29
                     >
30
-                        <cover-image
30
+                        <image
31 31
                             v-if="types == 'video'"
32 32
                             class="clear-one-icon"
33 33
                             :src="respath + 'static/icon/close.png'"
34 34
                             @tap="delImage(index)"
35
-                        ></cover-image>
35
+                        ></image>
36 36
                     </video>
37 37
                 </view>
38 38
             </block>
@@ -431,6 +431,7 @@ export default {
431 431
             //#ifdef APP-PLUS
432 432
             return "";
433 433
             //#endif
434
+            return "/";
434 435
         },
435 436
     },
436 437
 };

+ 6 - 4
src/components/easy-upload/easy-upload.vue

@@ -13,7 +13,7 @@
13 13
                     <image
14 14
                         v-if="types == 'image'"
15 15
                         class="clear-one-icon"
16
-                        :src="respath+'static/icon/close.png'"
16
+                        :src="'/static/icon/close.png'"
17 17
                         @tap="delImage(index)"
18 18
                     ></image>
19 19
                     <view class="load-box" v-if="viewLoading(upload)">
@@ -27,12 +27,12 @@
27 27
                         :src="upload"
28 28
                         controls
29 29
                     >
30
-                        <cover-image
30
+                        <image
31 31
                             v-if="types == 'video'"
32 32
                             class="clear-one-icon"
33 33
                         :src="respath+'static/icon/close.png'"
34 34
                             @tap="delImage(index)"
35
-                        ></cover-image>
35
+                        ></image>
36 36
                     </video>
37 37
                 </view>
38 38
             </block>
@@ -126,7 +126,6 @@ export default {
126 126
     watch: {
127 127
         value: {
128 128
             handler(val) {
129
-                console.log(2222, val);
130 129
                 this.uploads = val;
131 130
             },
132 131
         },
@@ -422,6 +421,8 @@ export default {
422 421
             //#ifdef APP-PLUS
423 422
             return "";
424 423
             //#endif
424
+            
425
+            return "/";
425 426
         },
426 427
     },
427 428
 };
@@ -469,6 +470,7 @@ export default {
469 470
     top: 0;
470 471
     right: 0;
471 472
     z-index: 9;
473
+	background-color: red;
472 474
 }
473 475
 .uploader-input-box {
474 476
     position: relative;

+ 1 - 0
src/components/layout/nav.vue

@@ -73,6 +73,7 @@
73 73
             //#ifdef APP-PLUS
74 74
             return '';
75 75
             //#endif
76
+            return '/';
76 77
         }
77 78
         },
78 79
 

+ 60 - 18
src/manifest.json

@@ -1,7 +1,7 @@
1 1
 {
2 2
     "name" : "配送助手",
3 3
     "appid" : "__UNI__EBBC677",
4
-    "description" : "",
4
+    "description" : "线下商超配送助手",
5 5
     "versionName" : "1.0.0",
6 6
     "versionCode" : "100",
7 7
     "transformPx" : false,
@@ -14,42 +14,84 @@
14 14
             "autoclose" : true,
15 15
             "delay" : 0
16 16
         },
17
-        "modules" : {},
17
+        "modules" : {
18
+            "OAuth" : {}
19
+        },
18 20
         /* 模块配置 */
19 21
         "distribute" : {
20 22
             /* 应用发布信息 */
21 23
             "android" : {
22 24
                 /* android打包配置 */
23 25
                 "permissions" : [
24
-                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
25
-                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
26
-                    "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
27
-                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
28
-                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
29
-                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
26
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
30 27
                     "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
31
-                    "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
28
+                    "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
29
+                    "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
32 30
                     "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
31
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
32
+                    "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
33 33
                     "<uses-permission android:name=\"android.permission.CAMERA\"/>",
34
-                    "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
34
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
35
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
36
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
35 37
                     "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
36 38
                     "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
39
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
40
+                    "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
41
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
37 42
                     "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
38
-                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
43
+                    "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
44
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
39 45
                     "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
40
-                    "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
41
-                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
42
-                    "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
43
-                    "<uses-feature android:name=\"android.hardware.camera\"/>",
44
-                    "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
46
+                    "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
45 47
                     "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
46 48
                 ],
47
-                "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
49
+                "abiFilters" : [ "armeabi-v7a", "arm64-v8a" ]
48 50
             },
49 51
             "ios" : {},
50 52
             /* ios打包配置 */
51 53
             "sdkConfigs" : {
52
-                "ad" : {}
54
+                "ad" : {},
55
+                "oauth" : {
56
+                    "weixin" : {
57
+                        "appid" : "wxda6414f3c83f2378",
58
+                        "appsecret" : "",
59
+                        "UniversalLinks" : ""
60
+                    }
61
+                },
62
+                "geolocation" : {}
63
+            },
64
+            "icons" : {
65
+                "android" : {
66
+                    "hdpi" : "unpackage/res/icons/72x72.png",
67
+                    "xhdpi" : "unpackage/res/icons/96x96.png",
68
+                    "xxhdpi" : "unpackage/res/icons/144x144.png",
69
+                    "xxxhdpi" : "unpackage/res/icons/192x192.png"
70
+                },
71
+                "ios" : {
72
+                    "appstore" : "unpackage/res/icons/1024x1024.png",
73
+                    "ipad" : {
74
+                        "app" : "unpackage/res/icons/76x76.png",
75
+                        "app@2x" : "unpackage/res/icons/152x152.png",
76
+                        "notification" : "unpackage/res/icons/20x20.png",
77
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
78
+                        "proapp@2x" : "unpackage/res/icons/167x167.png",
79
+                        "settings" : "unpackage/res/icons/29x29.png",
80
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
81
+                        "spotlight" : "unpackage/res/icons/40x40.png",
82
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png"
83
+                    },
84
+                    "iphone" : {
85
+                        "app@2x" : "unpackage/res/icons/120x120.png",
86
+                        "app@3x" : "unpackage/res/icons/180x180.png",
87
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
88
+                        "notification@3x" : "unpackage/res/icons/60x60.png",
89
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
90
+                        "settings@3x" : "unpackage/res/icons/87x87.png",
91
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png",
92
+                        "spotlight@3x" : "unpackage/res/icons/120x120.png"
93
+                    }
94
+                }
53 95
             }
54 96
         }
55 97
     },

+ 19 - 13
src/pages/index/index-scan.vue

@@ -2,7 +2,7 @@
2 2
     <div class="page">
3 3
         <div class="page__top">
4 4
             <div class="name">当前门店:</div>
5
-            <div class="shop"  @click="goShopSelect">
5
+            <div class="shop" @click="goShopSelect">
6 6
                 <div class="shop__name">
7 7
                     <!-- 最多6字 -->
8 8
                     {{ curShopName }}
@@ -423,7 +423,7 @@
423 423
                         <div class="null" v-if="loading && !item.list.length">
424 424
                             <img
425 425
                                 class="null__img"
426
-                                :src="respath+'static/common/order_null.jpg'"
426
+                                :src="respath + 'static/common/order_null.jpg'"
427 427
                                 alt
428 428
                             />
429 429
                             <div class="null__title">还没有相关数据哦</div>
@@ -502,7 +502,7 @@ export default {
502 502
                     list: [],
503 503
                 },
504 504
             ],
505
-            vipCode:'',
505
+            vipCode: "",
506 506
             loading: false, // 是否加载完成
507 507
         };
508 508
     },
@@ -590,15 +590,21 @@ export default {
590 590
     onLoad(opts) {
591 591
         this.vipCode = opts.vipcode;
592 592
         // 判断权限
593
-        if (this.user.authStatus === 0) {
594
-            // 未注册
595
-            this.router.replace({
596
-                path: "/pages/manage/mina/register",
597
-            });
598
-        } else if (this.user.authStatus === 90) {
599
-            // 等待注册
593
+        if (this.user) {
594
+            if (this.user.authStatus === 0) {
595
+                // 未注册
596
+                this.router.replace({
597
+                    path: "/pages/manage/mina/register",
598
+                });
599
+            } else if (this.user.authStatus === 90) {
600
+                // 等待注册
601
+                this.router.replace({
602
+                    path: "/pages/manage/mina/query",
603
+                });
604
+            }
605
+        } else {
600 606
             this.router.replace({
601
-                path: "/pages/manage/mina/query",
607
+                path: "/pages/index/login",
602 608
             });
603 609
         }
604 610
     },
@@ -658,7 +664,7 @@ export default {
658 664
                     status: self.list[self.tab].status,
659 665
                     pageIndex: self.list[self.tab].page,
660 666
                     pageSize: 20,
661
-                    vipCode:this.vipCode,
667
+                    vipCode: this.vipCode,
662 668
                 })
663 669
                 .then((res) => {
664 670
                     uni.hideLoading();
@@ -688,7 +694,7 @@ export default {
688 694
                     status: self.list[self.tab].status,
689 695
                     pageIndex: self.list[self.tab].page,
690 696
                     pageSize: 20,
691
-                    vipCode:this.vipCode,
697
+                    vipCode: this.vipCode,
692 698
                 })
693 699
                 .then((res) => {
694 700
                     let data = res.data.data;

+ 14 - 8
src/pages/index/index.vue

@@ -615,15 +615,21 @@ export default {
615 615
     },
616 616
     onLoad() {
617 617
         // 判断权限
618
-        if (this.user.authStatus === 0) {
619
-            // 未注册
620
-            this.router.replace({
621
-                path: "/pages/manage/mina/register",
622
-            });
623
-        } else if (this.user.authStatus === 90) {
624
-            // 等待注册
618
+        if (this.user) {
619
+            if (this.user.authStatus === 0) {
620
+                // 未注册
621
+                this.router.replace({
622
+                    path: "/pages/manage/mina/register",
623
+                });
624
+            } else if (this.user.authStatus === 90) {
625
+                // 等待注册
626
+                this.router.replace({
627
+                    path: "/pages/manage/mina/query",
628
+                });
629
+            }
630
+        } else {
625 631
             this.router.replace({
626
-                path: "/pages/manage/mina/query",
632
+                path: "/pages/index/login",
627 633
             });
628 634
         }
629 635
     },

+ 1 - 1
src/pages/index/login.vue

@@ -46,7 +46,6 @@ export default {
46 46
     // 函数
47 47
     methods: {
48 48
         submit() {
49
-            console.log(this.mobile);
50 49
             if (!this.userName) {
51 50
                 this.fn.showToast(`请输入账号`);
52 51
                 return;
@@ -70,6 +69,7 @@ export default {
70 69
                         })
71 70
                         .then((res) => {
72 71
                             uni.hideLoading();
72
+								console.log(res);
73 73
 
74 74
                             if (res.success) {
75 75
                                 // 判断权限

+ 1 - 1
src/pages/manage/poster/index.vue

@@ -19,7 +19,7 @@
19 19
 
20 20
         <div
21 21
             class="canvas"
22
-            v-show="canvasShow"
22
+            v-if="canvasShow"
23 23
             @touchmove.stop=""
24 24
             @click="closeCanvas"
25 25
         >