storeBelieveInLight пре 1 година
родитељ
комит
d05f9d27f2
8 измењених фајлова са 863 додато и 725 уклоњено
  1. 2 1
      commit/requestPhp.js
  2. 5 0
      main.js
  3. 1 1
      manifest.json
  4. 757 550
      openmerchant/shopentry/processidentity.vue
  5. 2 0
      package.json
  6. 43 18
      pages/cashier/index.vue
  7. 41 139
      shop/perating/activitecode.vue
  8. 12 16
      utils/readAppInfo.js

+ 2 - 1
commit/requestPhp.js

@@ -11,13 +11,14 @@ const token = ""
11
 export const phpToken = uni.getStorageSync('phpToken') || token
11
 export const phpToken = uni.getStorageSync('phpToken') || token
12
 // 需要修改token,和根据实际修改请求头
12
 // 需要修改token,和根据实际修改请求头
13
 export function myRequestPhp(options) {
13
 export function myRequestPhp(options) {
14
+	const phpTokens = uni.getStorageSync('phpToken') || token
14
 	let url = options.url;
15
 	let url = options.url;
15
 	let method = options.method || "get";
16
 	let method = options.method || "get";
16
 	let data = options.data || {};
17
 	let data = options.data || {};
17
 	let contentType = options.contentType || "application/json;charset=UTF-8";
18
 	let contentType = options.contentType || "application/json;charset=UTF-8";
18
 	let header = {
19
 	let header = {
19
 		'Content-Type': contentType,
20
 		'Content-Type': contentType,
20
-		"X-Token": phpToken,
21
+		"X-Token": phpTokens,
21
 		...options.header
22
 		...options.header
22
 	}
23
 	}
23
 	return new Promise((resolve, reject) => {
24
 	return new Promise((resolve, reject) => {

+ 5 - 0
main.js

@@ -9,6 +9,11 @@ import Vconsole from "vconsole"
9
 // import VConsole from 'vconsole'
9
 // import VConsole from 'vconsole'
10
 const vConsole = new Vconsole();
10
 const vConsole = new Vconsole();
11
 // console.log('vConsole is running!');
11
 // console.log('vConsole is running!');
12
+// main.js,注意要在use方法之后执行
13
+import uViews from 'uview-ui'
14
+Vue.use(uViews)
15
+// 如此配置即可
16
+uni.$u.config.unit = 'rpx'
12
 
17
 
13
 Vue.config.productionTip = false
18
 Vue.config.productionTip = false
14
 Vue.prototype.$time = time 
19
 Vue.prototype.$time = time 

+ 1 - 1
manifest.json

@@ -90,7 +90,7 @@
90
         // 自行修改下方的 /web
90
         // 自行修改下方的 /web
91
         "/gateway": {
91
         "/gateway": {
92
           // "secure": false,
92
           // "secure": false,
93
-          "target": "https://api.hxxfb.com",
93
+          "target": "https://testapi.hxxfb.com",
94
           "pathRewirte": {
94
           "pathRewirte": {
95
             //路径重写
95
             //路径重写
96
             "^/gateway": "/gateway"
96
             "^/gateway": "/gateway"

Разлика између датотеке није приказан због своје велике величине
+ 757 - 550
openmerchant/shopentry/processidentity.vue


+ 2 - 0
package.json

@@ -4,10 +4,12 @@
4
     "@wangeditor/editor-for-vue": "^1.0.2",
4
     "@wangeditor/editor-for-vue": "^1.0.2",
5
     "base-64": "^1.0.0",
5
     "base-64": "^1.0.0",
6
     "crypto-js": "^4.1.1",
6
     "crypto-js": "^4.1.1",
7
+    "dayjs": "^1.11.13",
7
     "easemob-websdk": "^4.6.0",
8
     "easemob-websdk": "^4.6.0",
8
     "file-saver": "^2.0.5",
9
     "file-saver": "^2.0.5",
9
     "html2canvas": "^1.4.1",
10
     "html2canvas": "^1.4.1",
10
     "pinia": "^2.1.0",
11
     "pinia": "^2.1.0",
12
+    "uview-ui": "^2.0.38",
11
     "vconsole": "^3.15.1"
13
     "vconsole": "^3.15.1"
12
   }
14
   }
13
 }
15
 }

+ 43 - 18
pages/cashier/index.vue

@@ -241,10 +241,13 @@ export default {
241
       zhuangi: "",
241
       zhuangi: "",
242
       gongxian: 0,
242
       gongxian: 0,
243
       jingdou: 0,
243
       jingdou: 0,
244
+      phpToken: "",
245
+      
244
     };
246
     };
245
   },
247
   },
246
   async onLoad() {
248
   async onLoad() {
247
     console.log("进了我的页面了");
249
     console.log("进了我的页面了");
250
+
248
     await readAppInfo();
251
     await readAppInfo();
249
     let daySart = new Date();
252
     let daySart = new Date();
250
     this.start_time = this.$time.dateFormat("yyyy-MM-dd", daySart);
253
     this.start_time = this.$time.dateFormat("yyyy-MM-dd", daySart);
@@ -255,9 +258,7 @@ export default {
255
     let userinfo = uni.getStorageSync("userinfo");
258
     let userinfo = uni.getStorageSync("userinfo");
256
     this.mer_id = selectmerchant.merId;
259
     this.mer_id = selectmerchant.merId;
257
     let jurisdiction = uni.getStorageSync("jurisdiction");
260
     let jurisdiction = uni.getStorageSync("jurisdiction");
258
-    if (this.mer_id > 0) {
259
-      await getPhpToken();
260
-    }
261
+
261
     if (jurisdiction) {
262
     if (jurisdiction) {
262
       jurisdiction.forEach((res, index) => {
263
       jurisdiction.forEach((res, index) => {
263
         if (res == 7) {
264
         if (res == 7) {
@@ -266,6 +267,8 @@ export default {
266
       });
267
       });
267
     }
268
     }
268
     // let selectmerchant = uni.getStorageSync("selectmerchant");
269
     // let selectmerchant = uni.getStorageSync("selectmerchant");
270
+    const res = await getPhpToken();
271
+    this.phpToken = res || uni.getStorageSync("phpToken");
269
     let uid = userinfo.uid;
272
     let uid = userinfo.uid;
270
     console.log(authorization, uid);
273
     console.log(authorization, uid);
271
     if (authorization && uid) {
274
     if (authorization && uid) {
@@ -278,15 +281,7 @@ export default {
278
         selectmerchant.merId > 0 &&
281
         selectmerchant.merId > 0 &&
279
         (selectmerchant.status == 1 || selectmerchant.status == 5)
282
         (selectmerchant.status == 1 || selectmerchant.status == 5)
280
       ) {
283
       ) {
281
-        uni.showLoading({
282
-          title: "加载中",
283
-          mask: true,
284
-        });
285
-        this.selectMerchant();
286
-        this.selectMerchantOrder();
287
-        this.getZuorijinri();
288
-        this.getZuixinjilu();
289
-        this.payUserList();
284
+        this.getInitData(selectmerchant);
290
         return;
285
         return;
291
       } else if (
286
       } else if (
292
         selectmerchant.merId >= 0 &&
287
         selectmerchant.merId >= 0 &&
@@ -363,6 +358,18 @@ export default {
363
       });
358
       });
364
     }
359
     }
365
   },
360
   },
361
+  watch: {
362
+    phpToken:{
363
+      handler(newVal, oldVal) {
364
+         let selectmerchant = uni.getStorageSync("selectmerchant");
365
+         if(newVal){
366
+          this.getInitData(selectmerchant);
367
+         }
368
+      },
369
+      immediate:true
370
+    }
371
+  },
372
+
366
   //监听tab 分类
373
   //监听tab 分类
367
   onPageScroll(res) {
374
   onPageScroll(res) {
368
     const query = uni.createSelectorQuery().in(this);
375
     const query = uni.createSelectorQuery().in(this);
@@ -386,21 +393,38 @@ export default {
386
     this.page = 1;
393
     this.page = 1;
387
     this.is_panudn = true;
394
     this.is_panudn = true;
388
     this.List = [];
395
     this.List = [];
389
-    this.getZuixinjilu()
390
-    this.payUserList();
391
     this.selectMerchant();
396
     this.selectMerchant();
392
     this.selectMerchantOrder();
397
     this.selectMerchantOrder();
398
+    this.getZuorijinri();
399
+    this.getZuixinjilu();
400
+    // this.payUserList();
393
   },
401
   },
394
 
402
 
395
   onReachBottom() {
403
   onReachBottom() {
396
     if (this.is_panudn == true) {
404
     if (this.is_panudn == true) {
397
       this.page++;
405
       this.page++;
398
-      this.payUserList();
406
+      this.getZuixinjilu();
399
     } else {
407
     } else {
400
       return;
408
       return;
401
     }
409
     }
402
   },
410
   },
403
   methods: {
411
   methods: {
412
+      getInitData(selectmerchant) {
413
+    if (
414
+      selectmerchant.merId > 0 &&
415
+      (selectmerchant.status == 1 || selectmerchant.status == 5)
416
+    ) {
417
+      uni.showLoading({
418
+        title: "加载中",
419
+        mask: true,
420
+      });
421
+      this.selectMerchant();
422
+      this.selectMerchantOrder();
423
+      this.getZuorijinri();
424
+      this.getZuixinjilu();
425
+      this.payUserList();
426
+    }
427
+  },
404
     // 店铺信息头
428
     // 店铺信息头
405
     selectMerchant() {
429
     selectMerchant() {
406
       selectMerchant({
430
       selectMerchant({
@@ -410,7 +434,8 @@ export default {
410
           console.log(res);
434
           console.log(res);
411
           if (res.data.status == 200) {
435
           if (res.data.status == 200) {
412
             this.merchantCashierShow = res.data.data.merchantCashierShow;
436
             this.merchantCashierShow = res.data.data.merchantCashierShow;
413
-			this.merchantCashierShow.create_time = this.merchantCashierShow.create_time.split(' ')[0]
437
+            this.merchantCashierShow.create_time =
438
+              this.merchantCashierShow.create_time.split(" ")[0];
414
           }
439
           }
415
         },
440
         },
416
         (fail) => {
441
         (fail) => {
@@ -486,7 +511,7 @@ export default {
486
     },
511
     },
487
     // 最新纪录列表
512
     // 最新纪录列表
488
     payUserList() {
513
     payUserList() {
489
-      return
514
+      return;
490
       payUserList({
515
       payUserList({
491
         mer_id: this.mer_id,
516
         mer_id: this.mer_id,
492
         pageNum: this.page,
517
         pageNum: this.page,
@@ -560,7 +585,7 @@ export default {
560
               }
585
               }
561
               this.is_panudn = false;
586
               this.is_panudn = false;
562
             }
587
             }
563
-            console.log(this.records,"recordsrecordsrecords")
588
+            console.log(this.records, "recordsrecordsrecords");
564
             uni.hideLoading();
589
             uni.hideLoading();
565
           }
590
           }
566
         },
591
         },

+ 41 - 139
shop/perating/activitecode.vue

@@ -14,7 +14,7 @@
14
         <view class="statement-header-text-title" @click="topgi"> 返回</view>
14
         <view class="statement-header-text-title" @click="topgi"> 返回</view>
15
       </view>
15
       </view>
16
     </view>
16
     </view>
17
-    <view class="activite-nav">
17
+    <view class="activite-nav" id="huoquId">
18
       <view class="activite-card">
18
       <view class="activite-card">
19
         <image
19
         <image
20
           class="activite-card-logo"
20
           class="activite-card-logo"
@@ -22,7 +22,7 @@
22
           mode=""
22
           mode=""
23
         ></image>
23
         ></image>
24
 
24
 
25
-        <view class="activite-cardImg">
25
+        <!-- <view class="activite-cardImg">
26
           <image :src="qrcode_src" mode="widthFix" ref="imagRef"></image>
26
           <image :src="qrcode_src" mode="widthFix" ref="imagRef"></image>
27
         </view>
27
         </view>
28
         <view class="activite-cardText">{{ code_id }}</view>
28
         <view class="activite-cardText">{{ code_id }}</view>
@@ -43,7 +43,7 @@
43
               mode=""
43
               mode=""
44
             ></image>
44
             ></image>
45
           </view>
45
           </view>
46
-        </view>
46
+        </view> -->
47
       </view>
47
       </view>
48
       <!-- <image class="activite-card-logo" :src="imageUrl" mode=""></image> -->
48
       <!-- <image class="activite-card-logo" :src="imageUrl" mode=""></image> -->
49
       <!-- <view class="downLoadButton" @click="clickGeneratePicture">
49
       <!-- <view class="downLoadButton" @click="clickGeneratePicture">
@@ -63,7 +63,6 @@
63
         <view class="downLoad-text"> 保存图片 </view>
63
         <view class="downLoad-text"> 保存图片 </view>
64
       </view>
64
       </view>
65
     </view>
65
     </view>
66
-
67
     <!-- ************************* 海报画板 **********************-->
66
     <!-- ************************* 海报画板 **********************-->
68
     <view style="position: absolute; bottom: 10%; left: 0%" v-show="flag">
67
     <view style="position: absolute; bottom: 10%; left: 0%" v-show="flag">
69
       <l-painter
68
       <l-painter
@@ -113,9 +112,9 @@ export default {
113
       poster: null,
112
       poster: null,
114
       image: "",
113
       image: "",
115
       flag: false,
114
       flag: false,
116
-      canvasWidth: 300, // 单位:rpx
117
-      canvasHeight: 300,
118
       imageUrl: "",
115
       imageUrl: "",
116
+      canvasWidth: 300,
117
+      canvasHeight: 400,
119
     };
118
     };
120
   },
119
   },
121
   onLoad(e) {
120
   onLoad(e) {
@@ -129,7 +128,11 @@ export default {
129
     this.qrcode_src = e.qrcode_src;
128
     this.qrcode_src = e.qrcode_src;
130
     this.code_id = e.code_id;
129
     this.code_id = e.code_id;
131
   },
130
   },
131
+  mounted() {
132
+
133
+  },
132
   methods: {
134
   methods: {
135
+
133
     queryByKey() {
136
     queryByKey() {
134
       const _this = this;
137
       const _this = this;
135
       queryByKey({
138
       queryByKey({
@@ -151,54 +154,7 @@ export default {
151
         }
154
         }
152
       );
155
       );
153
     },
156
     },
154
-    async drawImageToCanvas() {
155
-      // const ctx = uni.createCanvasContext("myCanvas", this);
156
-      // 清空画布
157
-      // ctx.clearRect(0, 0, this.canvasWidth, this.canvasHeight);
158
-      //  const img = new Image();
159
-      //   img.crossOrigin = 'anonymous'; // 设置跨域属性
160
-      //   img.src = 'https://example.com/your-image.jpg'; // 替换为实际的图片地址
161
-      const _this = this;
162
-      try {
163
-        const resData = await uni.getImageInfo({
164
-          src: decodeURIComponent(this.qrcode_src),
165
-        });
166
-        const res = resData[1] || {};
167
-        // 居中绘制图片(带缩放)
168
-        const imgWidth = res.width;
169
-        const imgHeight = res.height;
170
-        const scale = Math.min(
171
-          this.canvasWidth / imgWidth,
172
-          this.canvasHeight / imgHeight
173
-        );
174
-        const drawWidth = imgWidth * scale;
175
-        const drawHeight = imgHeight * scale;
176
-        const offsetX = (this.canvasWidth - drawWidth) / 2;
177
-        const offsetY = (this.canvasHeight - drawHeight) / 2;
178
-        console.log(res, "resData");
179
-        uni.canvasToTempFilePath({
180
-          x: offsetX,
181
-          y: offsetY,
182
-          width: imgWidth,
183
-          height: imgHeight,
184
-          destWidth: drawWidth,
185
-          destHeight: drawHeight,
186
-          canvasId: "container",
187
-          success: function (res) {
188
-            // 在H5平台下,tempFilePath 为 base64
189
-            // const imageUrl = `data:image/png;base64,${res.tempFilePath}`;
190
-            const imageUrl = `${res.tempFilePath}`;
191
-            const contentPath = _this.$refs.imagRef.contentPath;
192
-            _this.fileDwonload(imageUrl, contentPath);
193
-          },
194
-        });
195
 
157
 
196
-        // ctx.drawImage(res.path, offsetX, offsetY, drawWidth, drawHeight);
197
-        // ctx.draw();
198
-      } catch (err) {
199
-        console.error("图片加载失败:", err);
200
-      }
201
-    },
202
 
158
 
203
     // 绘制图片
159
     // 绘制图片
204
     drawPoster() {
160
     drawPoster() {
@@ -380,26 +336,34 @@ export default {
380
       });
336
       });
381
     },
337
     },
382
     clickGeneratePicture2() {
338
     clickGeneratePicture2() {
383
-      //this.drawImageToCanvas();
339
+      let _this = this;
384
       let fileName = "pension_分享海报.jpg";
340
       let fileName = "pension_分享海报.jpg";
385
-      if (this.qrcode_src == "") {
386
-        uni.showToast({
387
-          title: "无生成二维码",
388
-          icon: "none",
389
-          duration: 2000,
390
-        });
391
-        return;
392
-      }
393
-      let fileUrl = decodeURIComponent(this.qrcode_src);
394
-      if (window.android) {
395
-        window.android.downloadFile(fileName, fileUrl);
396
-      } else {
397
-        uni.showToast({
398
-          title: "未检测到Android环境",
399
-          icon: "none",
400
-          duration: 2000,
401
-        });
402
-      }
341
+      this.drawCanvas();
342
+      // const cardElement = document.getElementById('huoquId');
343
+      // console.log(cardElement,"cardElement")
344
+      // html2canvas(cardElement).then((canvas) => {
345
+      //     const imageUrl = canvas.toDataURL('image/png');
346
+      //     _this.saveImageData(imageUrl);
347
+      //   });
348
+      //
349
+      // if (this.qrcode_src == "") {
350
+      //   uni.showToast({
351
+      //     title: "无生成二维码",
352
+      //     icon: "none",
353
+      //     duration: 2000,
354
+      //   });
355
+      //   return;
356
+      // }
357
+      // let fileUrl = decodeURIComponent(this.qrcode_src);
358
+      // if (window.android) {
359
+      //   window.android.downloadFile(fileName, fileUrl);
360
+      // } else {
361
+      //   uni.showToast({
362
+      //     title: "未检测到Android环境",
363
+      //     icon: "none",
364
+      //     duration: 2000,
365
+      //   });
366
+      // }
403
     },
367
     },
404
     // 保存图片
368
     // 保存图片
405
     saveImage() {
369
     saveImage() {
@@ -442,54 +406,7 @@ export default {
442
       }
406
       }
443
     },
407
     },
444
 
408
 
445
-    fileDwonload(base64Data, path) {
446
-      uni.showLoading({ title: "保存中...", mask: true });
447
-      const _this = this;
448
-      // const blob = this.base64ToBlob(base64Data);
449
-      // const blobUrl = URL.createObjectURL(blob);
450
-      const finName = "海报.jpg";
451
-      uni.downloadFile({
452
-        url: path, //请求地址
453
-        success: (res) => {
454
-          //下载成功
455
-          console.log(res, "下载成功");
456
-          if (res.statusCode === 200) {
457
-            //保存文件
458
-            let filePath = res.tempFilePath;
459
-            // #ifdef H5
460
-            saveAs(filePath, finName);
461
-            uni.showModal({
462
-              title: "保存成功",
463
-              content: "图片已成功保存到相册,快去分享到您的圈子吧",
464
-              showCancel: false,
465
-            });
466
-            // #endif
467
-            //  #ifdef MP-WEIXIN || APP-PLUS
468
-            uni.saveFile({
469
-              tempFilePath: filePath,
470
-              success: function (filRes) {
471
-                console.log(filRes, "=====>");
472
-              },
473
-              fail: function (err) {
474
-                console.log("保存失败");
475
-              },
476
-            });
477
-            // #endif
478
-            uni.hideLoading();
479
-          }
480
-        },
481
-        fail: (e) => {
482
-          console.log(e, "文件下载失败downloadFile");
483
-          uni.hideLoading();
484
-          _this.loadFiles(path, finName);
485
 
409
 
486
-          // uni.showToast({
487
-          //   title: "文件下载保存失败",
488
-          //   icon: "error",
489
-          // });
490
-        },
491
-      });
492
-    },
493
     loadFiles(url, fileName) {
410
     loadFiles(url, fileName) {
494
       const a = document.createElement("a");
411
       const a = document.createElement("a");
495
       a.href = url;
412
       a.href = url;
@@ -531,20 +448,6 @@ export default {
531
         },
448
         },
532
       });
449
       });
533
     },
450
     },
534
-    base64ToBlob(base64) {
535
-      const parts = base64.split(";base64,");
536
-      const mimeType = parts[0].split(":")[1];
537
-      const base64Data = parts[1];
538
-      var binaryData = atob(base64.split(";base64,")[1]);
539
-      // const binaryData = atob(base64Data);
540
-      const arrayBuffer = new ArrayBuffer(binaryData.length);
541
-      const uint8Array = new Uint8Array(arrayBuffer);
542
-      for (let i = 0; i < binaryData.length; i++) {
543
-        uint8Array[i] = binaryData.charCodeAt(i);
544
-      }
545
-
546
-      return new Blob([uint8Array], { type: mimeType });
547
-    },
548
     // 保存到相册
451
     // 保存到相册
549
     saveImageToAlbum() {
452
     saveImageToAlbum() {
550
       uni.saveImageToPhotosAlbum({
453
       uni.saveImageToPhotosAlbum({
@@ -575,7 +478,7 @@ page {
575
   flex-direction: column;
478
   flex-direction: column;
576
   align-items: center;
479
   align-items: center;
577
   justify-content: center;
480
   justify-content: center;
578
-  
481
+
579
   .statement-header {
482
   .statement-header {
580
     position: fixed;
483
     position: fixed;
581
     top: 0;
484
     top: 0;
@@ -586,7 +489,7 @@ page {
586
     background: url("https://cdn.bjtdba.com/vod/image/2022-08-23/20220823132549341.png");
489
     background: url("https://cdn.bjtdba.com/vod/image/2022-08-23/20220823132549341.png");
587
     display: flex;
490
     display: flex;
588
     justify-content: center;
491
     justify-content: center;
589
-  
492
+
590
     .statement-header-text {
493
     .statement-header-text {
591
       width: 686rpx;
494
       width: 686rpx;
592
       font-size: 36rpx;
495
       font-size: 36rpx;
@@ -595,17 +498,17 @@ page {
595
       display: flex;
498
       display: flex;
596
       // margin-top: 107rpx;
499
       // margin-top: 107rpx;
597
       align-items: center;
500
       align-items: center;
598
-  
501
+
599
       .statement-header-text-neishi {
502
       .statement-header-text-neishi {
600
         width: 45rpx;
503
         width: 45rpx;
601
         height: 45rpx;
504
         height: 45rpx;
602
         margin-right: 17rpx;
505
         margin-right: 17rpx;
603
-  
506
+
604
         .statement-header-text-icon {
507
         .statement-header-text-icon {
605
           width: 36rpx;
508
           width: 36rpx;
606
           height: 36rpx;
509
           height: 36rpx;
607
           margin-top: 2rpx;
510
           margin-top: 2rpx;
608
-  
511
+
609
           image {
512
           image {
610
             width: 100%;
513
             width: 100%;
611
             height: 100%;
514
             height: 100%;
@@ -614,7 +517,6 @@ page {
614
       }
517
       }
615
     }
518
     }
616
   }
519
   }
617
-  
618
 
520
 
619
   .activite-nav {
521
   .activite-nav {
620
     width: 100%;
522
     width: 100%;

+ 12 - 16
utils/readAppInfo.js

@@ -175,7 +175,7 @@ const func = async () => {
175
       );
175
       );
176
       localStorage.setItem("aaa", "33333");
176
       localStorage.setItem("aaa", "33333");
177
       console.log("读原生的", localStorage.getItem("aaa"));
177
       console.log("读原生的", localStorage.getItem("aaa"));
178
-
178
+       getPhpToken()
179
       if (storeStaff) {
179
       if (storeStaff) {
180
         queryStoreBranch({
180
         queryStoreBranch({
181
           id: storeStaff.department
181
           id: storeStaff.department
@@ -260,14 +260,14 @@ export default func;
260
 export async function getPhpToken(merId) {
260
 export async function getPhpToken(merId) {
261
   let phpToken = uni.getStorageSync("phpToken");
261
   let phpToken = uni.getStorageSync("phpToken");
262
   let selectmerchant = uni.getStorageSync("selectmerchant");
262
   let selectmerchant = uni.getStorageSync("selectmerchant");
263
-  // console.log("phpToken", phpToken);
264
-  // console.log("selectmerchant", selectmerchant);
263
+  console.log("phpToken", phpToken);
264
+  console.log("selectmerchant", selectmerchant);
265
   if (!phpToken && (selectmerchant && selectmerchant.merId > 0) || merId > 0) {
265
   if (!phpToken && (selectmerchant && selectmerchant.merId > 0) || merId > 0) {
266
-	  uni.showLoading({
267
-		  title:"数据加载中",
268
-		  mask:true
269
-	  })
270
-     const merIdS = merId || selectmerchant.merId || ""
266
+    uni.showLoading({
267
+      title: "数据加载中",
268
+      mask: true
269
+    })
270
+    const merIdS = merId || selectmerchant.merId || ""
271
     try {
271
     try {
272
       const res = await getPhpGlobalToken({
272
       const res = await getPhpGlobalToken({
273
         merId: merIdS
273
         merId: merIdS
@@ -275,17 +275,13 @@ export async function getPhpToken(merId) {
275
       if (res.data.status == 200) {
275
       if (res.data.status == 200) {
276
         const token = res.data.data.token || "";
276
         const token = res.data.data.token || "";
277
         uni.setStorageSync("phpToken", token);
277
         uni.setStorageSync("phpToken", token);
278
-		console.log(this,"uni.navigateBack({})")
279
-		if(this.$router){
280
-			this.$router.go(0)
281
-		}else{
282
-			window.location.reload()
283
-		}
284
-		
278
+        console.log(this, "uni.navigateBack({})")
279
+        return token
280
+        // window.location.reload()
285
       } else {
281
       } else {
286
         uni.setStorageSync("phpToken", "");
282
         uni.setStorageSync("phpToken", "");
287
       }
283
       }
288
-	  
284
+
289
     } catch (error) {}
285
     } catch (error) {}
290
   }
286
   }
291
 }
287
 }