storeBelieveInLight před 1 rokem
rodič
revize
0935d5a17c

+ 75 - 77
pages/ordermanagement/index.vue

@@ -97,7 +97,7 @@ import {
97 97
 } from "@/commit/order.js";
98 98
 import quickPickUpVue from "./components/quickPickUp/quickPickUp.vue";
99 99
 import { toQueryString } from "@/utils/index.js";
100
-	import readAppInfo ,{getPhpToken}from '@/utils/readAppInfo.js';
100
+import readAppInfo, { getPhpToken } from "@/utils/readAppInfo.js";
101 101
 export default {
102 102
   components: { quickPickUpVue },
103 103
   data() {
@@ -156,94 +156,92 @@ export default {
156 156
           status: 3,
157 157
         },
158 158
       ],
159
-	  uid: "",
160
-	  authorization: "",
159
+      uid: "",
160
+      authorization: "",
161 161
     };
162 162
   },
163 163
   async onLoad() {
164
+    console.log("进了我的页面了");
164 165
 
165
-	
166
-	
167
-	console.log("进了我的页面了");
166
+    await readAppInfo();
167
+    await getPhpToken();
168
+    let jurisdiction = uni.getStorageSync("jurisdiction") || [];
169
+    console.log("jurisdiction", jurisdiction);
170
+    let mnuList = this.mnu;
171
+    if (jurisdiction) {
172
+      jurisdiction.forEach((res, index) => {
173
+        mnuList.forEach((result, i) => {
174
+          if (res == result.id) {
175
+            result.show = true;
176
+          }
177
+          return result;
178
+        });
179
+        return res;
180
+      });
181
+      this.mnu = mnuList;
182
+    }
183
+
184
+    console.log(this.mnu, "this.mnu");
185
+
186
+    setTimeout(function () {
187
+      uni.hideLoading();
188
+    }, 700);
189
+
190
+    console.log("我的show===>>>>>>");
168 191
 
169
-	
170
-	await readAppInfo();
171
-	await getPhpToken();
172
-	return;
173
-	let jurisdiction = uni.getStorageSync("jurisdiction") || [];
174
-	console.log("jurisdiction", jurisdiction);
175
-	let mnuList = this.mnu;
176
-	if (jurisdiction) {
177
-	  jurisdiction.forEach((res, index) => {
178
-	    mnuList.forEach((result, i) => {
179
-	      if (res == result.id) {
180
-	        result.show = true;
181
-	      }
182
-	      return result;
183
-	    });
184
-	    return res;
185
-	  });
186
-	  this.mnu = mnuList;
187
-	}
188
-	
189
-	console.log(this.mnu);
190
-	
191
-	setTimeout(function () {
192
-	  uni.hideLoading();
193
-	}, 700);
194
-	
195
-	console.log("我的show===>>>>>>");
196
-	
197
-	this.authorization = uni.getStorageSync("authorization");
198
-	let userinfo = uni.getStorageSync("userinfo");
199
-	this.uid = userinfo.uid;
200
-	console.log("onshow");
201
-	let authorization = uni.getStorageSync("authorization");
202
-	// let userinfo = uni.getStorageSync('userinfo')
203
-	let selectmerchant = uni.getStorageSync("selectmerchant");
204
-	let uid = userinfo.uid;
205
-	console.log(selectmerchant, authorization, userinfo);
206
-	if (authorization && uid) {
207
-	  if (selectmerchant.merId >= 0 && selectmerchant.status == -1) {
208
-	    uni.redirectTo({
209
-	      url: "/openmerchant/guide/index", //有或者没有商户 没有金额支付and激活码支付
210
-	    });
211
-	    return;
212
-	  } else if (
213
-	    selectmerchant.merId > 0 &&
214
-	    (selectmerchant.status == 1 || selectmerchant.status == 5)
215
-	  ) {
216
-	    return;
217
-	  } else if (
218
-	    selectmerchant.merId >= 0 &&
219
-	    (selectmerchant.status == 3 || selectmerchant.status == 4)
220
-	  ) {
221
-	    uni.redirectTo({
222
-	      url: "/openmerchant/shopentry/process?mer_id=" + selectmerchant.merId, //已开通商户未填写资料
223
-	    });
224
-	    return;
225
-	  } else if (selectmerchant.merId > 0 && selectmerchant.status == 0) {
226
-	    uni.redirectTo({
227
-	      url: "/openmerchant/shopentry/processaudit?submitCode=" + 3, //已开通商户待审核
228
-	    });
229
-	    return;
230
-	  } else if (selectmerchant.merId > 0 && selectmerchant.status == 2) {
231
-	    uni.redirectTo({
232
-	      url: "/openmerchant/shopentry/processaudit?submitCode=" + 2, //已开通商户审核拒绝
233
-	    });
234
-	    return;
235
-	  }
236
-	}
192
+    this.authorization = uni.getStorageSync("authorization");
193
+    let userinfo = uni.getStorageSync("userinfo");
194
+    this.uid = userinfo.uid;
195
+    console.log("onshow");
196
+    let authorization = uni.getStorageSync("authorization");
197
+    // let userinfo = uni.getStorageSync('userinfo')
198
+    let selectmerchant = uni.getStorageSync("selectmerchant");
199
+    let uid = userinfo.uid;
200
+    console.log(selectmerchant, authorization, userinfo, "authorization");
201
+    if (authorization && uid) {
202
+      if (selectmerchant.merId >= 0 && selectmerchant.status == -1) {
203
+        uni.redirectTo({
204
+          url: "/openmerchant/guide/index", //有或者没有商户 没有金额支付and激活码支付
205
+        });
206
+        return;
207
+      } else if (
208
+        selectmerchant.merId > 0 &&
209
+        (selectmerchant.status == 1 || selectmerchant.status == 5)
210
+      ) {
211
+        return;
212
+      } else if (
213
+        selectmerchant.merId >= 0 &&
214
+        (selectmerchant.status == 3 || selectmerchant.status == 4)
215
+      ) {
216
+        uni.redirectTo({
217
+          url: "/openmerchant/shopentry/process?mer_id=" + selectmerchant.merId, //已开通商户未填写资料
218
+        });
219
+        return;
220
+      } else if (selectmerchant.merId > 0 && selectmerchant.status == 0) {
221
+        uni.redirectTo({
222
+          url: "/openmerchant/shopentry/processaudit?submitCode=" + 3, //已开通商户待审核
223
+        });
224
+        return;
225
+      } else if (selectmerchant.merId > 0 && selectmerchant.status == 2) {
226
+        uni.redirectTo({
227
+          url: "/openmerchant/shopentry/processaudit?submitCode=" + 2, //已开通商户审核拒绝
228
+        });
229
+        return;
230
+      }
231
+    } else {
232
+      uni.redirectTo({
233
+        url: "/pages/user/login/index?type=1",
234
+      });
235
+      return;
236
+    }
237 237
   },
238 238
   async onShow() {
239
-   
240 239
     let selectmerchant = uni.getStorageSync("selectmerchant");
241 240
     this.mer_id = selectmerchant.merId;
242
-      uni.showLoading({
241
+    uni.showLoading({
243 242
       title: "加载中",
244 243
     });
245 244
     try {
246
-     
247 245
       await this.getOrderListData();
248 246
       await this.getOrderStatusNumberData();
249 247
       await this.getAfterSaleListData();

+ 5 - 1
shop/productManagementModule/index.vue

@@ -142,7 +142,6 @@ export default {
142 142
 
143 143
     await readAppInfo();
144 144
     await getPhpToken();
145
-    return;
146 145
     let jurisdiction = uni.getStorageSync("jurisdiction") || [];
147 146
     console.log("jurisdiction", jurisdiction);
148 147
     let mnuList = this.mnu;
@@ -207,6 +206,11 @@ export default {
207 206
         });
208 207
         return;
209 208
       }
209
+    }else {
210
+      uni.redirectTo({
211
+        url: "/pages/user/login/index?type=1",
212
+      });
213
+      return;
210 214
     }
211 215
   },
212 216
   async onShow() {