增加登录成功时清除全部缓存,重新请求配置文件
This commit is contained in:
@@ -43,6 +43,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {init} from '@/utils/init.js'
|
import {init} from '@/utils/init.js'
|
||||||
|
import {cacheClearAll} from '@/store/cashe.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -308,7 +309,8 @@
|
|||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
const arr= getCurrentPages()
|
const arr= getCurrentPages()
|
||||||
init()
|
cacheClearAll()
|
||||||
|
init(true)
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url:'/pages/index/index'
|
url:'/pages/index/index'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -76,8 +76,8 @@ function callback() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
export async function init() {
|
export async function init(isNowRequest=false) {
|
||||||
if($cache_config.isEmpty()){
|
if(!$cache_config||$cache_config.isEmpty()||isNowRequest){
|
||||||
httpsRequest.getT('/app/common/getAppUseKv').then(res => {
|
httpsRequest.getT('/app/common/getAppUseKv').then(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user