问题反馈修改
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import request from './request'
|
||||
import cache from './cacheKey.js'
|
||||
import { getImageUrl } from '@/common/api/basic'
|
||||
import { apiUpdatePush } from '@/common/api/user'
|
||||
import { queryDictDataCache } from '../api/dictionary.js'
|
||||
import {getImageUrl} from '@/common/api/basic'
|
||||
import {apiUpdatePush} from '@/common/api/user'
|
||||
import {queryDictDataCache} from '../api/dictionary.js'
|
||||
import cacheKey from './cacheKey.js'
|
||||
|
||||
const toast = (title, duration = 1500, call, mask = false, icon = 'none') => {
|
||||
if (Boolean(title) === false) {
|
||||
return
|
||||
@@ -18,6 +19,7 @@ const toast = (title, duration = 1500, call, mask = false, icon = 'none') => {
|
||||
call && call()
|
||||
}, duration)
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 格式化时间
|
||||
* @param time
|
||||
@@ -101,6 +103,7 @@ function formatTime(time, option) {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const h5Helper = {
|
||||
isAndroid: function () {
|
||||
return window.navigator.appVersion.toLowerCase().indexOf('android') != -1
|
||||
@@ -210,6 +213,7 @@ const loginSuccess = (data, jump = true) => {
|
||||
console.log(escape, atob)
|
||||
var userInfo = JSON.parse(decodeURIComponent(escape(atob(strings[1].replace(/-/g, '+').replace(/_/g, '/')))))
|
||||
userInfo.authorities = userInfo.authorities[0]
|
||||
uni.setStorageSync(cache.userInfo, userInfo)
|
||||
if (userInfo.headSculpture) {
|
||||
getImageUrl(userInfo.headSculpture).then((res) => {
|
||||
userInfo.avatar = res.data
|
||||
@@ -226,12 +230,12 @@ const loginSuccess = (data, jump = true) => {
|
||||
if (jump) {
|
||||
queryDictDataCache().then((res) => {
|
||||
uni.setStorageSync(cacheKey.dictData, res.data)
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
fail: (err) => {
|
||||
console.log(err)
|
||||
},
|
||||
})
|
||||
})
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
fail: (err) => {
|
||||
console.log(err)
|
||||
},
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -245,7 +249,7 @@ const refreshPrePage = (number = 1, time = 1500) => {
|
||||
let pages = getCurrentPages()
|
||||
let prePage = pages[pages.length - number - 1]
|
||||
if (prePage && time) {
|
||||
prePage.$vm.store.reload()
|
||||
prePage.$vm.store?.reload()
|
||||
setTimeout(() => {
|
||||
uni.navigateBack({
|
||||
delta: number,
|
||||
|
||||
Reference in New Issue
Block a user