Commit dfb0f09cd8d3f25cb89b0de21585813e8510e303
1 parent
cde89a3e
切换身份后需要重新刷新企业信息
Showing
2 changed files
with
7 additions
and
0 deletions
garbage-removal/src/pages/home/index.vue
| @@ -381,6 +381,11 @@ onLoad(() => { | @@ -381,6 +381,11 @@ onLoad(() => { | ||
| 381 | onShow(() => { | 381 | onShow(() => { |
| 382 | // 初始化数据 | 382 | // 初始化数据 |
| 383 | initData() | 383 | initData() |
| 384 | + let flag = uni.getStorageSync("refreshFlag"); | ||
| 385 | + if(flag){ | ||
| 386 | + paging.value.reload(); | ||
| 387 | + uni.removeStorageSync("refreshFlag"); | ||
| 388 | + } | ||
| 384 | }) | 389 | }) |
| 385 | 390 | ||
| 386 | const refreshPage = () => { | 391 | const refreshPage = () => { |
garbage-removal/src/pages/wode-info/wode-info-choose/index.vue
| @@ -137,6 +137,7 @@ const submit = (userType) => { | @@ -137,6 +137,7 @@ const submit = (userType) => { | ||
| 137 | url: `pages/order/index`, | 137 | url: `pages/order/index`, |
| 138 | }) | 138 | }) |
| 139 | }else{ | 139 | }else{ |
| 140 | + uni.setStorageSync("refreshFlag",true); | ||
| 140 | uni.$u.route({ | 141 | uni.$u.route({ |
| 141 | type: "switchTab", | 142 | type: "switchTab", |
| 142 | url: `/pages/home/index`, | 143 | url: `/pages/home/index`, |
| @@ -145,6 +146,7 @@ const submit = (userType) => { | @@ -145,6 +146,7 @@ const submit = (userType) => { | ||
| 145 | 146 | ||
| 146 | // #endif | 147 | // #endif |
| 147 | // #ifdef MP-WEIXIN | 148 | // #ifdef MP-WEIXIN |
| 149 | + uni.setStorageSync("refreshFlag",true); | ||
| 148 | uni.switchTab({ | 150 | uni.switchTab({ |
| 149 | url: `/pages/home/index` | 151 | url: `/pages/home/index` |
| 150 | }) | 152 | }) |