This commit is contained in:
cansnow
2026-01-01 04:15:30 +08:00
parent 09c7889525
commit 78386d4cc1
75 changed files with 1995 additions and 1715 deletions
+13 -7
View File
@@ -16,7 +16,7 @@
<view class="qr" @click="toSelfQr">
<img src="static/images/self_info_qr.png" alt="" />
<img src="static/images/common_right.png" alt="" />
<u-icon name="arrow-right" color="#999"></u-icon>
</view>
</view>
</view>
@@ -94,6 +94,7 @@
uni.removeStorage({
key: "BusinessToken",
});
IMSDK.asyncApi(IMSDK.IMMethods.UnInitSDK,IMSDK.uuid());
}).catch((err) => {
console.log(err)
}).finally(() => {
@@ -116,13 +117,14 @@
});
},
toSelfQr() {
const info = {
const info = util.aesencode({
code : this.selfInfo.userID,
showName: `${this.selfInfo.nickname}`,
faceURL : this.selfInfo.faceURL,
type : "user",
};
const url = `/pages/common/userOrGroupQrCode?sourceInfo=${JSON.stringify(info,)}`;
type : "user"
});
const url = `/pages/common/userOrGroupQrCode?sourceInfo=${info}`;
uni.navigateTo({
url: url,
});
@@ -204,15 +206,19 @@
.nickname {
@include nomalEllipsis();
max-width: 400rpx;
font-weight: 500;
font-weight: 400;
font-size: 34rpx;
margin-bottom: 20rpx;
}
.id {
color: #8e9ab0;
}
}
.qr{
display: flex;
align-items: center;
}
img {
width: 18px;
height: 18px;
+20 -21
View File
@@ -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);
}
},
});
},