|
|
@@ -22,7 +22,7 @@
|
|
22
|
22
|
</template>
|
|
23
|
23
|
|
|
24
|
24
|
<script>
|
|
25
|
|
- import { emConnect } from '@/EaseIM/emApis';
|
|
|
25
|
+ import { emConnect } from '@/EaseIM/emApis';
|
|
26
|
26
|
import readAppInfo from '@/utils/readAppInfo.js';
|
|
27
|
27
|
const { loginWithPassword,closeEaseIM } = emConnect();
|
|
28
|
28
|
export default {
|
|
|
@@ -48,143 +48,150 @@
|
|
48
|
48
|
pages:"/shop/services/lockuser",
|
|
49
|
49
|
show:true,
|
|
50
|
50
|
id: "0",
|
|
|
51
|
+ },
|
|
|
52
|
+ {
|
|
|
53
|
+ name: "商品管理",
|
|
|
54
|
+ url: "https://cdn.bjtdba.com/vod/image/2022-08-12/20220812161733260.png",
|
|
|
55
|
+ pages:"/shop/productManagementModule/productManagement",
|
|
|
56
|
+ show:true,
|
|
|
57
|
+ id: "0",
|
|
51
|
58
|
}
|
|
52
|
|
- ],
|
|
53
|
|
- uid: '',
|
|
|
59
|
+ ],
|
|
|
60
|
+ uid: '',
|
|
54
|
61
|
authorization: ''
|
|
55
|
62
|
}
|
|
56
|
63
|
},
|
|
57
|
|
- async onLoad() {
|
|
58
|
|
- console.log('进了我的页面了')
|
|
|
64
|
+ async onLoad() {
|
|
|
65
|
+ console.log('进了我的页面了')
|
|
59
|
66
|
// uni.showLoading({
|
|
60
|
67
|
// title: '加载中',
|
|
61
|
68
|
// mask: true
|
|
62
|
|
- // });
|
|
63
|
|
-
|
|
64
|
|
- await readAppInfo();
|
|
65
|
|
-
|
|
66
|
|
- let jurisdiction = uni.getStorageSync('jurisdiction')
|
|
67
|
|
- console.log('jurisdiction', jurisdiction)
|
|
68
|
|
- let mnuList = this.mnu
|
|
69
|
|
- if (jurisdiction) {
|
|
70
|
|
- jurisdiction.forEach((res, index) => {
|
|
71
|
|
- mnuList.forEach((result, i) => {
|
|
72
|
|
- if (res == result.id) {
|
|
73
|
|
- result.show = true
|
|
74
|
|
- }
|
|
75
|
|
- return result
|
|
76
|
|
- })
|
|
77
|
|
- return res
|
|
78
|
|
- })
|
|
79
|
|
- this.mnu = mnuList
|
|
80
|
|
- }
|
|
81
|
|
-
|
|
82
|
|
- console.log(this.mnu)
|
|
83
|
|
-
|
|
84
|
|
- setTimeout(function() {
|
|
85
|
|
- uni.hideLoading();
|
|
86
|
|
- }, 700);
|
|
87
|
|
-
|
|
88
|
|
-
|
|
89
|
|
- console.log('我的show===>>>>>>')
|
|
90
|
|
-
|
|
91
|
|
-
|
|
92
|
|
- this.authorization = uni.getStorageSync('authorization')
|
|
93
|
|
- let userinfo = uni.getStorageSync('userinfo')
|
|
94
|
|
- this.uid = userinfo.uid
|
|
95
|
|
- console.log('onshow')
|
|
96
|
|
-
|
|
97
|
|
- let authorization = uni.getStorageSync('authorization')
|
|
98
|
|
- // let userinfo = uni.getStorageSync('userinfo')
|
|
99
|
|
- let selectmerchant = uni.getStorageSync('selectmerchant')
|
|
100
|
|
- let uid = userinfo.uid
|
|
101
|
|
- console.log(selectmerchant, authorization, userinfo)
|
|
102
|
|
- if (authorization && uid) {
|
|
103
|
|
- if (selectmerchant.merId >= 0 && selectmerchant.status == -1) {
|
|
104
|
|
- uni.redirectTo({
|
|
105
|
|
- url: "/openmerchant/guide/index" //有或者没有商户 没有金额支付and激活码支付
|
|
106
|
|
- });
|
|
107
|
|
- return
|
|
108
|
|
- } else if (selectmerchant.merId > 0 && (selectmerchant.status == 1 || selectmerchant.status == 5)) {
|
|
109
|
|
-
|
|
110
|
|
- return
|
|
111
|
|
- } else if (selectmerchant.merId >= 0 && (selectmerchant.status == 3 || selectmerchant.status == 4)) {
|
|
112
|
|
- uni.redirectTo({
|
|
113
|
|
- url: '/openmerchant/shopentry/process?mer_id=' + selectmerchant.merId //已开通商户未填写资料
|
|
114
|
|
- });
|
|
115
|
|
- return
|
|
116
|
|
- } else if (selectmerchant.merId > 0 && selectmerchant.status == 0) {
|
|
117
|
|
- uni.redirectTo({
|
|
118
|
|
- url: '/openmerchant/shopentry/processaudit?submitCode=' + 3 //已开通商户待审核
|
|
119
|
|
- });
|
|
120
|
|
- return
|
|
121
|
|
- } else if (selectmerchant.merId > 0 && selectmerchant.status == 2) {
|
|
122
|
|
- uni.redirectTo({
|
|
123
|
|
- url: '/openmerchant/shopentry/processaudit?submitCode=' + 2 //已开通商户审核拒绝
|
|
124
|
|
- });
|
|
125
|
|
- return
|
|
126
|
|
- }
|
|
127
|
|
-
|
|
|
69
|
+ // });
|
|
|
70
|
+
|
|
|
71
|
+ await readAppInfo();
|
|
|
72
|
+
|
|
|
73
|
+ let jurisdiction = uni.getStorageSync('jurisdiction')
|
|
|
74
|
+ console.log('jurisdiction', jurisdiction)
|
|
|
75
|
+ let mnuList = this.mnu
|
|
|
76
|
+ if (jurisdiction) {
|
|
|
77
|
+ jurisdiction.forEach((res, index) => {
|
|
|
78
|
+ mnuList.forEach((result, i) => {
|
|
|
79
|
+ if (res == result.id) {
|
|
|
80
|
+ result.show = true
|
|
|
81
|
+ }
|
|
|
82
|
+ return result
|
|
|
83
|
+ })
|
|
|
84
|
+ return res
|
|
|
85
|
+ })
|
|
|
86
|
+ this.mnu = mnuList
|
|
|
87
|
+ }
|
|
|
88
|
+
|
|
|
89
|
+ console.log(this.mnu)
|
|
|
90
|
+
|
|
|
91
|
+ setTimeout(function() {
|
|
|
92
|
+ uni.hideLoading();
|
|
|
93
|
+ }, 700);
|
|
|
94
|
+
|
|
|
95
|
+
|
|
|
96
|
+ console.log('我的show===>>>>>>')
|
|
|
97
|
+
|
|
|
98
|
+
|
|
|
99
|
+ this.authorization = uni.getStorageSync('authorization')
|
|
|
100
|
+ let userinfo = uni.getStorageSync('userinfo')
|
|
|
101
|
+ this.uid = userinfo.uid
|
|
|
102
|
+ console.log('onshow')
|
|
|
103
|
+
|
|
|
104
|
+ let authorization = uni.getStorageSync('authorization')
|
|
|
105
|
+ // let userinfo = uni.getStorageSync('userinfo')
|
|
|
106
|
+ let selectmerchant = uni.getStorageSync('selectmerchant')
|
|
|
107
|
+ let uid = userinfo.uid
|
|
|
108
|
+ console.log(selectmerchant, authorization, userinfo)
|
|
|
109
|
+ if (authorization && uid) {
|
|
|
110
|
+ if (selectmerchant.merId >= 0 && selectmerchant.status == -1) {
|
|
|
111
|
+ uni.redirectTo({
|
|
|
112
|
+ url: "/openmerchant/guide/index" //有或者没有商户 没有金额支付and激活码支付
|
|
|
113
|
+ });
|
|
|
114
|
+ return
|
|
|
115
|
+ } else if (selectmerchant.merId > 0 && (selectmerchant.status == 1 || selectmerchant.status == 5)) {
|
|
|
116
|
+
|
|
|
117
|
+ return
|
|
|
118
|
+ } else if (selectmerchant.merId >= 0 && (selectmerchant.status == 3 || selectmerchant.status == 4)) {
|
|
|
119
|
+ uni.redirectTo({
|
|
|
120
|
+ url: '/openmerchant/shopentry/process?mer_id=' + selectmerchant.merId //已开通商户未填写资料
|
|
|
121
|
+ });
|
|
|
122
|
+ return
|
|
|
123
|
+ } else if (selectmerchant.merId > 0 && selectmerchant.status == 0) {
|
|
|
124
|
+ uni.redirectTo({
|
|
|
125
|
+ url: '/openmerchant/shopentry/processaudit?submitCode=' + 3 //已开通商户待审核
|
|
|
126
|
+ });
|
|
|
127
|
+ return
|
|
|
128
|
+ } else if (selectmerchant.merId > 0 && selectmerchant.status == 2) {
|
|
|
129
|
+ uni.redirectTo({
|
|
|
130
|
+ url: '/openmerchant/shopentry/processaudit?submitCode=' + 2 //已开通商户审核拒绝
|
|
|
131
|
+ });
|
|
|
132
|
+ return
|
|
|
133
|
+ }
|
|
|
134
|
+
|
|
|
135
|
+ }
|
|
|
136
|
+ },
|
|
|
137
|
+ onShow() {
|
|
|
138
|
+ return;
|
|
|
139
|
+
|
|
|
140
|
+ // 以下逻辑在onload处理
|
|
|
141
|
+
|
|
|
142
|
+ this.authorization = uni.getStorageSync('authorization')
|
|
|
143
|
+ let userinfo = uni.getStorageSync('userinfo')
|
|
|
144
|
+ this.uid = userinfo.uid
|
|
|
145
|
+
|
|
|
146
|
+ let authorization = uni.getStorageSync('authorization')
|
|
|
147
|
+ // let userinfo = uni.getStorageSync('userinfo')
|
|
|
148
|
+ let selectmerchant = uni.getStorageSync('selectmerchant')
|
|
|
149
|
+ let uid = userinfo.uid
|
|
|
150
|
+ console.log(selectmerchant, authorization, userinfo)
|
|
|
151
|
+ if (authorization && uid) {
|
|
|
152
|
+ if (selectmerchant.merId >= 0 && selectmerchant.status == -1) {
|
|
|
153
|
+ uni.redirectTo({
|
|
|
154
|
+ url: "/openmerchant/guide/index" //有或者没有商户 没有金额支付and激活码支付
|
|
|
155
|
+ });
|
|
|
156
|
+ return
|
|
|
157
|
+ } else if (selectmerchant.merId > 0 && (selectmerchant.status == 1 || selectmerchant.status == 5)) {
|
|
|
158
|
+
|
|
|
159
|
+ return
|
|
|
160
|
+ } else if (selectmerchant.merId >= 0 && (selectmerchant.status == 3 || selectmerchant.status == 4)) {
|
|
|
161
|
+ uni.redirectTo({
|
|
|
162
|
+ url: '/openmerchant/shopentry/process?mer_id=' + selectmerchant.merId //已开通商户未填写资料
|
|
|
163
|
+ });
|
|
|
164
|
+ return
|
|
|
165
|
+ } else if (selectmerchant.merId > 0 && selectmerchant.status == 0) {
|
|
|
166
|
+ uni.redirectTo({
|
|
|
167
|
+ url: '/openmerchant/shopentry/processaudit?submitCode=' + 3 //已开通商户待审核
|
|
|
168
|
+ });
|
|
|
169
|
+ return
|
|
|
170
|
+ } else if (selectmerchant.merId > 0 && selectmerchant.status == 2) {
|
|
|
171
|
+ uni.redirectTo({
|
|
|
172
|
+ url: '/openmerchant/shopentry/processaudit?submitCode=' + 2 //已开通商户审核拒绝
|
|
|
173
|
+ });
|
|
|
174
|
+ return
|
|
|
175
|
+ }
|
|
|
176
|
+
|
|
128
|
177
|
}
|
|
129
|
|
- },
|
|
130
|
|
- onShow() {
|
|
131
|
|
- return;
|
|
132
|
|
-
|
|
133
|
|
- // 以下逻辑在onload处理
|
|
134
|
|
-
|
|
135
|
|
- this.authorization = uni.getStorageSync('authorization')
|
|
136
|
|
- let userinfo = uni.getStorageSync('userinfo')
|
|
137
|
|
- this.uid = userinfo.uid
|
|
138
|
|
-
|
|
139
|
|
- let authorization = uni.getStorageSync('authorization')
|
|
140
|
|
- // let userinfo = uni.getStorageSync('userinfo')
|
|
141
|
|
- let selectmerchant = uni.getStorageSync('selectmerchant')
|
|
142
|
|
- let uid = userinfo.uid
|
|
143
|
|
- console.log(selectmerchant, authorization, userinfo)
|
|
144
|
|
- if (authorization && uid) {
|
|
145
|
|
- if (selectmerchant.merId >= 0 && selectmerchant.status == -1) {
|
|
146
|
|
- uni.redirectTo({
|
|
147
|
|
- url: "/openmerchant/guide/index" //有或者没有商户 没有金额支付and激活码支付
|
|
148
|
|
- });
|
|
149
|
|
- return
|
|
150
|
|
- } else if (selectmerchant.merId > 0 && (selectmerchant.status == 1 || selectmerchant.status == 5)) {
|
|
151
|
|
-
|
|
152
|
|
- return
|
|
153
|
|
- } else if (selectmerchant.merId >= 0 && (selectmerchant.status == 3 || selectmerchant.status == 4)) {
|
|
154
|
|
- uni.redirectTo({
|
|
155
|
|
- url: '/openmerchant/shopentry/process?mer_id=' + selectmerchant.merId //已开通商户未填写资料
|
|
156
|
|
- });
|
|
157
|
|
- return
|
|
158
|
|
- } else if (selectmerchant.merId > 0 && selectmerchant.status == 0) {
|
|
159
|
|
- uni.redirectTo({
|
|
160
|
|
- url: '/openmerchant/shopentry/processaudit?submitCode=' + 3 //已开通商户待审核
|
|
161
|
|
- });
|
|
162
|
|
- return
|
|
163
|
|
- } else if (selectmerchant.merId > 0 && selectmerchant.status == 2) {
|
|
164
|
|
- uni.redirectTo({
|
|
165
|
|
- url: '/openmerchant/shopentry/processaudit?submitCode=' + 2 //已开通商户审核拒绝
|
|
166
|
|
- });
|
|
167
|
|
- return
|
|
168
|
|
- }
|
|
169
|
|
-
|
|
170
|
|
- }
|
|
171
|
|
-
|
|
172
|
|
-
|
|
|
178
|
+
|
|
|
179
|
+
|
|
173
|
180
|
},
|
|
174
|
|
- methods: {
|
|
|
181
|
+ methods: {
|
|
175
|
182
|
// 退出登录
|
|
176
|
183
|
logoutAction(){
|
|
177
|
184
|
uni.removeStorageSync('userinfo');//清除用户信息
|
|
178
|
185
|
uni.removeStorageSync('authorization');//清除authorization
|
|
179
|
186
|
uni.removeStorageSync('selectmerchant');//清除商户数据
|
|
180
|
187
|
uni.removeStorageSync('storeStaff');//部门id对应权限
|
|
181
|
|
- uni.removeStorageSync('jurisdiction');//管理员状态
|
|
182
|
|
- uni.removeStorageSync('mer_id');//环信和项目连接的id,登录环信需要
|
|
|
188
|
+ uni.removeStorageSync('jurisdiction');//管理员状态
|
|
|
189
|
+ uni.removeStorageSync('mer_id');//环信和项目连接的id,登录环信需要
|
|
183
|
190
|
//断开连接
|
|
184
|
191
|
closeEaseIM();
|
|
185
|
|
- // this.$store.commit('SET_PIN_CONVERSATION_LIST', []);
|
|
186
|
|
- this.authorization = ''
|
|
187
|
|
- this.uid = ''
|
|
|
192
|
+ // this.$store.commit('SET_PIN_CONVERSATION_LIST', []);
|
|
|
193
|
+ this.authorization = ''
|
|
|
194
|
+ this.uid = ''
|
|
188
|
195
|
|
|
189
|
196
|
|
|
190
|
197
|
|
|
|
@@ -201,44 +208,44 @@
|
|
201
|
208
|
jinru(n,p){
|
|
202
|
209
|
let name = p
|
|
203
|
210
|
let page = n
|
|
204
|
|
- if(name=="分润设置") {
|
|
205
|
|
- let authorization = uni.getStorageSync('authorization')
|
|
206
|
|
- let userinfo = uni.getStorageSync('userinfo')
|
|
207
|
|
- let selectmerchant = uni.getStorageSync('selectmerchant')
|
|
208
|
|
- let uid = userinfo.uid
|
|
209
|
|
- if (authorization && uid) {
|
|
210
|
|
- if (selectmerchant.merId >= 0 && selectmerchant.status == -1) {
|
|
211
|
|
- uni.redirectTo({
|
|
212
|
|
- url: "/openmerchant/guide/index" //有或者没有商户 没有金额支付and激活码支付
|
|
213
|
|
- });
|
|
214
|
|
- return
|
|
215
|
|
- } else if (selectmerchant.merId > 0 && (selectmerchant.status == 1 || selectmerchant.status == 5)) {
|
|
216
|
|
- uni.redirectTo({
|
|
217
|
|
- url:page
|
|
218
|
|
- })
|
|
219
|
|
- return
|
|
220
|
|
- } else if (selectmerchant.merId >= 0 && (selectmerchant.status == 3 || selectmerchant.status == 4)) {
|
|
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
|
|
-
|
|
237
|
|
- } else {
|
|
238
|
|
- uni.navigateTo({
|
|
239
|
|
- url: "/pages/user/login/index?type=1"
|
|
240
|
|
- });
|
|
241
|
|
- return
|
|
|
211
|
+ if(name=="分润设置") {
|
|
|
212
|
+ let authorization = uni.getStorageSync('authorization')
|
|
|
213
|
+ let userinfo = uni.getStorageSync('userinfo')
|
|
|
214
|
+ let selectmerchant = uni.getStorageSync('selectmerchant')
|
|
|
215
|
+ let uid = userinfo.uid
|
|
|
216
|
+ if (authorization && uid) {
|
|
|
217
|
+ if (selectmerchant.merId >= 0 && selectmerchant.status == -1) {
|
|
|
218
|
+ uni.redirectTo({
|
|
|
219
|
+ url: "/openmerchant/guide/index" //有或者没有商户 没有金额支付and激活码支付
|
|
|
220
|
+ });
|
|
|
221
|
+ return
|
|
|
222
|
+ } else if (selectmerchant.merId > 0 && (selectmerchant.status == 1 || selectmerchant.status == 5)) {
|
|
|
223
|
+ uni.redirectTo({
|
|
|
224
|
+ url:page
|
|
|
225
|
+ })
|
|
|
226
|
+ return
|
|
|
227
|
+ } else if (selectmerchant.merId >= 0 && (selectmerchant.status == 3 || selectmerchant.status == 4)) {
|
|
|
228
|
+ uni.redirectTo({
|
|
|
229
|
+ url: '/openmerchant/shopentry/process?mer_id=' + selectmerchant.merId //已开通商户未填写资料
|
|
|
230
|
+ });
|
|
|
231
|
+ return
|
|
|
232
|
+ } else if (selectmerchant.merId > 0 && selectmerchant.status == 0) {
|
|
|
233
|
+ uni.redirectTo({
|
|
|
234
|
+ url: '/openmerchant/shopentry/processaudit?submitCode=' + 3 //已开通商户待审核
|
|
|
235
|
+ });
|
|
|
236
|
+ return
|
|
|
237
|
+ } else if (selectmerchant.merId > 0 && selectmerchant.status == 2) {
|
|
|
238
|
+ uni.redirectTo({
|
|
|
239
|
+ url: '/openmerchant/shopentry/processaudit?submitCode=' + 2 //已开通商户审核拒绝
|
|
|
240
|
+ });
|
|
|
241
|
+ return
|
|
|
242
|
+ }
|
|
|
243
|
+
|
|
|
244
|
+ } else {
|
|
|
245
|
+ uni.navigateTo({
|
|
|
246
|
+ url: "/pages/user/login/index?type=1"
|
|
|
247
|
+ });
|
|
|
248
|
+ return
|
|
242
|
249
|
}
|
|
243
|
250
|
|
|
244
|
251
|
}else if(name=="锁定用户"){
|