|
|
@@ -99,7 +99,9 @@ const func = async () => {
|
|
99
|
99
|
const paramsData = readQuery()
|
|
100
|
100
|
if(!paramsData) {
|
|
101
|
101
|
return;
|
|
102
|
|
- }
|
|
|
102
|
+ }
|
|
|
103
|
+
|
|
|
104
|
+ console.log('%c [ 1. 读取url登录信息url参数 ]-4', 'font-size:13px; background:pink; color:#bf2c9f;', paramsData)
|
|
103
|
105
|
|
|
104
|
106
|
const paramsData1 = {
|
|
105
|
107
|
"storeStaff": null,
|
|
|
@@ -143,7 +145,48 @@ const func = async () => {
|
|
143
|
145
|
const userInfoData = await selectMerchant({
|
|
144
|
146
|
uid: paramsData.user.uid
|
|
145
|
147
|
});
|
|
146
|
|
- console.log(userInfoData)
|
|
|
148
|
+
|
|
|
149
|
+ console.log('%c [ 2. 获取用户信息 ]-4', 'font-size:13px; background:pink; color:#bf2c9f;', userInfoData)
|
|
|
150
|
+
|
|
|
151
|
+ if(userInfoData.data.status === 200) {
|
|
|
152
|
+ // 新逻辑
|
|
|
153
|
+ uni.setStorageSync('selectmerchant', userInfoData.data.data);
|
|
|
154
|
+ let storeStaff = uni.getStorageSync('storeStaff')
|
|
|
155
|
+ console.log('%c [ storeStaff ]-4', 'font-size:13px; background:pink; color:#bf2c9f;', storeStaff, storeStaff != null)
|
|
|
156
|
+ console.log('%c [ 本地存储用户信息 userInfo ]-4', 'font-size:13px; background:pink; color:#bf2c9f;', uni.getStorageSync('userinfo'))
|
|
|
157
|
+ localStorage.setItem('aaa', '33333')
|
|
|
158
|
+ console.log('读原生的', localStorage.getItem('aaa'))
|
|
|
159
|
+
|
|
|
160
|
+ if (storeStaff) {
|
|
|
161
|
+ queryStoreBranch({
|
|
|
162
|
+ id: storeStaff.department
|
|
|
163
|
+ }).then(res => {
|
|
|
164
|
+ if (res.data.status == 200) {
|
|
|
165
|
+ uni.setStorageSync('jurisdiction', res.data.data.jurisdiction);
|
|
|
166
|
+ }
|
|
|
167
|
+ })
|
|
|
168
|
+ } else {
|
|
|
169
|
+ uni.setStorageSync('jurisdiction', [7, 9, 5, 3]);
|
|
|
170
|
+ }
|
|
|
171
|
+ // uni.showToast({
|
|
|
172
|
+ // title: res.data.message,
|
|
|
173
|
+ // icon: "none"
|
|
|
174
|
+ // })
|
|
|
175
|
+ setTimeout(function() {
|
|
|
176
|
+ console.log('%c [ 3. 获取用户信息成功,跳转页面 ]-4', 'font-size:13px; background:pink; color:#bf2c9f;')
|
|
|
177
|
+ uni.switchTab({
|
|
|
178
|
+ url: '../../cashier/index'
|
|
|
179
|
+ });
|
|
|
180
|
+ }, 700);
|
|
|
181
|
+ }
|
|
|
182
|
+
|
|
|
183
|
+
|
|
|
184
|
+
|
|
|
185
|
+
|
|
|
186
|
+ return;
|
|
|
187
|
+ // 之前的逻辑
|
|
|
188
|
+
|
|
|
189
|
+ uni.setStorageSync('selectmerchant', data.data.data);
|
|
147
|
190
|
|
|
148
|
191
|
const {
|
|
149
|
192
|
merchantIntention = {},
|