19
This commit is contained in:
@@ -32,9 +32,7 @@
|
||||
import dayjs from "dayjs";
|
||||
import InfoItem from "./InfoItem.vue";
|
||||
import util from "@/util";
|
||||
import {
|
||||
getPurePath
|
||||
} from "@/util/common";
|
||||
import {getPurePath} from "@/util/common";
|
||||
export default {
|
||||
components: {
|
||||
CustomNavBar,
|
||||
@@ -74,8 +72,9 @@
|
||||
methods: {
|
||||
...util,
|
||||
updateNickname() {
|
||||
const s = util.aesencode(this.selfInfo);
|
||||
uni.navigateTo({
|
||||
url: `/pages/common/markOrIDPage/index?isSelfNickname=true&sourceInfo=${JSON.stringify(this.selfInfo)}`,
|
||||
url: `/pages/common/markOrIDPage/index?isSelfNickname=true&sourceInfo=${s}`,
|
||||
});
|
||||
},
|
||||
updateGender() {
|
||||
@@ -102,23 +101,23 @@
|
||||
const fileName = path.slice(nameIdx);
|
||||
const fileType = path.slice(typeIdx);
|
||||
this.loadingState.faceURL = true;
|
||||
const {
|
||||
data: {
|
||||
url
|
||||
},
|
||||
} = await IMSDK.asyncApi(IMSDK.IMMethods.UploadFile, IMSDK.uuid(), {
|
||||
filepath: getPurePath(tempFilePaths[0]),
|
||||
name: fileName,
|
||||
contentType: fileType,
|
||||
uuid: IMSDK.uuid(),
|
||||
});
|
||||
console.log(url);
|
||||
this.updateSelfInfo({
|
||||
faceURL: url,
|
||||
},
|
||||
"faceURL",
|
||||
);
|
||||
this.loadingState.faceURL = false;
|
||||
try{
|
||||
const res = await IMSDK.asyncApi(IMSDK.IMMethods.UploadFile, IMSDK.uuid(), {
|
||||
filepath: getPurePath(tempFilePaths[0]),
|
||||
name: fileName,
|
||||
contentType: fileType,
|
||||
uuid: IMSDK.uuid(),
|
||||
});
|
||||
console.log(res);
|
||||
this.updateSelfInfo({
|
||||
faceURL: res.data.url,
|
||||
},
|
||||
"faceURL",
|
||||
);
|
||||
this.loadingState.faceURL = false;
|
||||
}catch(e){
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user