storeBelieveInLight před 1 rokem
rodič
revize
eb0da100de

+ 5 - 1
pages/onlineproductselection/onlineproductselection.vue

@@ -219,9 +219,13 @@ export default {
219 219
           }
220 220
           uni.hideLoading();
221 221
         }
222
+		 uni.hideLoading();
222 223
       } catch (error) {
223 224
         uni.hideLoading();
224
-      }
225
+		  
226
+      }finally{
227
+		   uni.hideLoading();
228
+	  }
225 229
     },
226 230
     sortByPrice() {
227 231
       this.sortBy = this.sortBy === "price" ? "" : "price";

+ 77 - 1
pages/ordermanagement/index.vue

@@ -156,10 +156,86 @@ export default {
156 156
           status: 3,
157 157
         },
158 158
       ],
159
+	  uid: "",
160
+	  authorization: "",
159 161
     };
160 162
   },
161 163
   async onLoad() {
162
-    await getPhpToken()
164
+
165
+	
166
+	
167
+	console.log("进了我的页面了");
168
+
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
+	return;
202
+	
203
+	let authorization = uni.getStorageSync("authorization");
204
+	// let userinfo = uni.getStorageSync('userinfo')
205
+	let selectmerchant = uni.getStorageSync("selectmerchant");
206
+	let uid = userinfo.uid;
207
+	console.log(selectmerchant, authorization, userinfo);
208
+	if (authorization && uid) {
209
+	  if (selectmerchant.merId >= 0 && selectmerchant.status == -1) {
210
+	    uni.redirectTo({
211
+	      url: "/openmerchant/guide/index", //有或者没有商户 没有金额支付and激活码支付
212
+	    });
213
+	    return;
214
+	  } else if (
215
+	    selectmerchant.merId > 0 &&
216
+	    (selectmerchant.status == 1 || selectmerchant.status == 5)
217
+	  ) {
218
+	    return;
219
+	  } else if (
220
+	    selectmerchant.merId >= 0 &&
221
+	    (selectmerchant.status == 3 || selectmerchant.status == 4)
222
+	  ) {
223
+	    uni.redirectTo({
224
+	      url: "/openmerchant/shopentry/process?mer_id=" + selectmerchant.merId, //已开通商户未填写资料
225
+	    });
226
+	    return;
227
+	  } else if (selectmerchant.merId > 0 && selectmerchant.status == 0) {
228
+	    uni.redirectTo({
229
+	      url: "/openmerchant/shopentry/processaudit?submitCode=" + 3, //已开通商户待审核
230
+	    });
231
+	    return;
232
+	  } else if (selectmerchant.merId > 0 && selectmerchant.status == 2) {
233
+	    uni.redirectTo({
234
+	      url: "/openmerchant/shopentry/processaudit?submitCode=" + 2, //已开通商户审核拒绝
235
+	    });
236
+	    return;
237
+	  }
238
+	}
163 239
   },
164 240
   async onShow() {
165 241
    

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

@@ -385,7 +385,7 @@ export default {
385 385
                       if (data.data.status == 200) {
386 386
                         uni.setStorageSync("selectmerchant", data.data.data);
387 387
                         let storeStaff = uni.getStorageSync("storeStaff");
388
-						//  getPhpToken()
388
+						 getPhpToken()
389 389
                         if (storeStaff != null) {
390 390
                           queryStoreBranch({
391 391
                             id: storeStaff.department

+ 12 - 0
utils/readAppInfo.js

@@ -263,6 +263,10 @@ export async function getPhpToken(merId) {
263 263
   // console.log("phpToken", phpToken);
264 264
   // console.log("selectmerchant", selectmerchant);
265 265
   if (!phpToken && (selectmerchant && selectmerchant.merId > 0) || merId > 0) {
266
+	  uni.showLoading({
267
+		  title:"数据加载中",
268
+		  mask:true
269
+	  })
266 270
      const merIdS = merId || selectmerchant.merId || ""
267 271
     try {
268 272
       const res = await getPhpGlobalToken({
@@ -271,9 +275,17 @@ export async function getPhpToken(merId) {
271 275
       if (res.data.status == 200) {
272 276
         const token = res.data.data.token || "";
273 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
+		
274 285
       } else {
275 286
         uni.setStorageSync("phpToken", "");
276 287
       }
288
+	  
277 289
     } catch (error) {}
278 290
   }
279 291
 }