|
|
@@ -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
|
|