|
|
@@ -81,8 +81,8 @@ |
|
|
|
|
|
|
|
<script setup>
|
|
|
|
//#region 导入
|
|
|
|
import { ref, reactive } from "vue";
|
|
|
|
import { onLoad } from "@dcloudio/uni-app";
|
|
|
|
import { ref, reactive, nextTick } from "vue";
|
|
|
|
import { onLoad, onShow } from "@dcloudio/uni-app";
|
|
|
|
import { loginApi } from "../../api/login";
|
|
|
|
import { addImageApi } from "../../api/uploadphoto.js";
|
|
|
|
import { userInfoModules } from "@/store/modules/userInfo";
|
|
|
@@ -99,6 +99,7 @@ const showImgData = ref(null); //上传数据 |
|
|
|
|
|
|
|
// 点击上传图片
|
|
|
|
function chooseImage() {
|
|
|
|
console.log("chooseImage");
|
|
|
|
// 检查token
|
|
|
|
if (!userInfoModulesPinia.token) {
|
|
|
|
uni.showModal({
|
|
|
@@ -351,9 +352,19 @@ onLoad((options) => { |
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
|
|
|
console.log(options);
|
|
|
|
});
|
|
|
|
//#endregion ---------------------
|
|
|
|
|
|
|
|
onShow(() => {
|
|
|
|
// 若来自我的页面的更换头像按钮,直接触发以下操作
|
|
|
|
const action = uni.getStorageSync("action");
|
|
|
|
if (action == 1) {
|
|
|
|
chooseImage();
|
|
|
|
uni.removeStorageSync("action");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
//#region
|
|
|
|
function goOtherPage(url) {
|
|
|
|
uni.navigateTo({
|
|
|
|