解决白屏问题

This commit is contained in:
D 2024-04-21 22:20:13 +08:00
parent aec59ebd47
commit 4d873bfcc3
3 changed files with 551 additions and 635 deletions

View File

@ -41,19 +41,20 @@
"clean:windows": "rd /s /q dist || rd /s /q node_modules" "clean:windows": "rd /s /q dist || rd /s /q node_modules"
}, },
"dependencies": { "dependencies": {
"@dcloudio/uni-app": "3.0.0-3090920231225001", "@dcloudio/uni-app": "3.0.0-4000820240401001",
"@dcloudio/uni-app-plus": "3.0.0-3090920231225001", "@dcloudio/uni-app-plus": "3.0.0-4000820240401001",
"@dcloudio/uni-components": "3.0.0-3090920231225001", "@dcloudio/uni-components": "3.0.0-4000820240401001",
"@dcloudio/uni-h5": "3.0.0-3090920231225001", "@dcloudio/uni-h5": "3.0.0-4000820240401001",
"@dcloudio/uni-mp-alipay": "3.0.0-3090920231225001", "@dcloudio/uni-mp-alipay": "3.0.0-4000820240401001",
"@dcloudio/uni-mp-baidu": "3.0.0-3090920231225001", "@dcloudio/uni-mp-baidu": "3.0.0-4000820240401001",
"@dcloudio/uni-mp-jd": "3.0.0-3090920231225001", "@dcloudio/uni-mp-jd": "3.0.0-4000820240401001",
"@dcloudio/uni-mp-kuaishou": "3.0.0-3090920231225001", "@dcloudio/uni-mp-kuaishou": "3.0.0-4000820240401001",
"@dcloudio/uni-mp-lark": "3.0.0-3090920231225001", "@dcloudio/uni-mp-lark": "3.0.0-4000820240401001",
"@dcloudio/uni-mp-qq": "3.0.0-3090920231225001", "@dcloudio/uni-mp-qq": "3.0.0-4000820240401001",
"@dcloudio/uni-mp-toutiao": "3.0.0-3090920231225001", "@dcloudio/uni-mp-toutiao": "3.0.0-4000820240401001",
"@dcloudio/uni-mp-weixin": "3.0.0-3090920231225001", "@dcloudio/uni-mp-weixin": "3.0.0-4000820240401001",
"@dcloudio/uni-quickapp-webview": "3.0.0-3090920231225001", "@dcloudio/uni-mp-xhs": "3.0.0-4000820240401001",
"@dcloudio/uni-quickapp-webview": "3.0.0-4000820240401001",
"@jridgewell/sourcemap-codec": "^1.4.15", "@jridgewell/sourcemap-codec": "^1.4.15",
"@qiun/wx-ucharts": "2.5.0-20230101", "@qiun/wx-ucharts": "2.5.0-20230101",
"@ttou/uview-typings": "^2.0.5", "@ttou/uview-typings": "^2.0.5",
@ -63,21 +64,22 @@
"pinia": "2.0.17", "pinia": "2.0.17",
"tslib": "^2.6.2", "tslib": "^2.6.2",
"uview-plus": "^3.1.45", "uview-plus": "^3.1.45",
"vue": "3.2.47", "vue": "3.4.23",
"vue-i18n": "^9.10.2" "vue-i18n": "^9.10.2"
}, },
"devDependencies": { "devDependencies": {
"@dcloudio/types": "^3.4.8", "@dcloudio/types": "^3.4.8",
"@dcloudio/uni-automator": "3.0.0-3090920231225001", "@dcloudio/uni-automator": "3.0.0-4000820240401001",
"@dcloudio/uni-cli-shared": "3.0.0-3090920231225001", "@dcloudio/uni-cli-shared": "3.0.0-4000820240401001",
"@dcloudio/uni-stacktracey": "3.0.0-3090920231225001", "@dcloudio/uni-stacktracey": "3.0.0-4000820240401001",
"@dcloudio/vite-plugin-uni": "3.0.0-3090920231225001", "@dcloudio/vite-plugin-uni": "3.0.0-4000820240401001",
"@vue/runtime-core": "^3.3.11",
"@vue/tsconfig": "^0.1.3", "@vue/tsconfig": "^0.1.3",
"less": "^4.2.0", "less": "^4.2.0",
"sass": "^1.66.1", "sass": "^1.66.1",
"sass-loader": "^10.4.1", "sass-loader": "^10.4.1",
"typescript": "^4.9.5", "typescript": "^4.9.5",
"vite": "4.1.4", "vite": "4.3.5",
"vue-tsc": "^1.8.8" "vue-tsc": "^1.8.8"
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -53,7 +53,6 @@
import config from '@/config' import config from '@/config'
import { uploadAvatar } from "@/api/system/user" import { uploadAvatar } from "@/api/system/user"
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
const userStore = useUserStore()
const baseUrl = config.baseUrl const baseUrl = config.baseUrl
let sysInfo = uni.getSystemInfoSync() let sysInfo = uni.getSystemInfoSync()
@ -82,7 +81,7 @@ export default {
*/ */
data() { data() {
return { return {
imageSrc: userStore.avatar, imageSrc: useUserStore().avatar,
isShowImg: false, isShowImg: false,
// //
cropperInitW: SCREEN_WIDTH, cropperInitW: SCREEN_WIDTH,
@ -273,7 +272,7 @@ export default {
uploadAvatar(data).then(response => { uploadAvatar(data).then(response => {
// userStore.avatar = response.imgUrl // userStore.avatar = response.imgUrl
/*cloud*/ /*cloud*/
userStore.avatar = baseUrl + response.imgUrl useUserStore().avatar = baseUrl + response.imgUrl
uni.showToast({ title: "修改成功", icon: 'success' }) uni.showToast({ title: "修改成功", icon: 'success' })
uni.$emit('refresh'); uni.$emit('refresh');
uni.navigateBack(); uni.navigateBack();