From 78386d4cc1fd9eb4a728b7112dfff898846421b5 Mon Sep 17 00:00:00 2001 From: cansnow Date: Thu, 1 Jan 2026 04:15:30 +0800 Subject: [PATCH] 19 --- .gitignore | 2 + App.vue | 408 +------------ Readme.md | 1 + android.keystore | Bin 0 -> 2764 bytes components/CustomNavBar/index.vue | 148 +++-- components/map.vue | 155 ----- main.js | 2 +- manifest.json | 43 +- package.json | 3 +- pages.json | 12 + pages/common/createGroup/index.vue | 6 +- pages/common/detailsFileds/index.vue | 163 +++-- pages/common/groupCard/index.vue | 3 +- pages/common/login/index.vue | 79 ++- pages/common/map.vue | 58 +- pages/common/markOrIDPage/index.vue | 3 +- pages/common/registerOrForget/index.vue | 15 +- pages/common/scan.vue | 48 +- pages/common/searchUserOrGroup/index.vue | 10 +- pages/common/setPassword/index.vue | 11 +- pages/common/setSelfInfo/index.vue | 8 +- .../userCard/components/UserInfoRowItem.vue | 88 +-- pages/common/userCard/index.vue | 73 +-- pages/common/userCardMore/index.vue | 16 +- pages/common/userOrGroupQrCode.vue | 2 +- pages/common/verifyCode/index.vue | 18 +- pages/contact/applicationDetails/index.vue | 447 +++++++------- .../applicationList/ApplicationItem.vue | 20 +- .../contact/applicationListDetails/index.vue | 144 ++--- pages/contact/contactAdd/index.vue | 14 +- pages/contact/friendList/index.vue | 2 +- .../components/ChatingFooter/index.vue | 17 +- .../chating/components/ChatingHeader.vue | 8 +- .../MessageItem/LocationMessageRender.vue | 11 +- .../MessageItem/NotificationRender.vue | 44 ++ .../MessageItem/VideoMessageRender.vue | 7 +- .../chating/components/MessageItem/index.vue | 5 +- .../components/ConversationItem.vue | 9 +- pages/conversation/groupManage/index.vue | 8 +- pages/conversation/groupMemberList/index.vue | 560 +++++++++--------- pages/conversation/groupSettings/index.vue | 19 +- .../updateGroupOrNickname/index.vue | 157 +++-- pages/index/guide.vue | 75 +++ pages/index/launch.vue | 541 +++++++++++++++++ pages/user/index/index.vue | 20 +- pages/user/selfInfo/index.vue | 41 +- static/images/common_right.png | Bin 411 -> 0 bytes static/images/user_card_message.png | Bin 543 -> 0 bytes store/modules/contact.js | 14 +- styles/common.scss | 2 +- .../ly-map/components/ly-map/ly-map.vue | 38 +- .../app-android/libs/okhttp-3.12.12.jar | Bin 427674 -> 0 bytes .../utssdk/app-android/libs/okio-1.15.0.jar | Bin 88732 -> 0 bytes unpackage/res/cover/1080_1882.9.png | Bin 60339 -> 225630 bytes unpackage/res/cover/480_762.9.png | Bin 15673 -> 69395 bytes unpackage/res/cover/720_1242.9.png | Bin 31961 -> 108179 bytes unpackage/res/icons/1024x1024.png | Bin 399589 -> 206296 bytes unpackage/res/icons/120x120.png | Bin 11285 -> 4149 bytes unpackage/res/icons/144x144.png | Bin 15335 -> 5813 bytes unpackage/res/icons/152x152.png | Bin 16877 -> 6076 bytes unpackage/res/icons/167x167.png | Bin 19927 -> 7277 bytes unpackage/res/icons/180x180.png | Bin 22524 -> 8667 bytes unpackage/res/icons/192x192.png | Bin 25068 -> 6330 bytes unpackage/res/icons/20x20.png | Bin 774 -> 532 bytes unpackage/res/icons/29x29.png | Bin 1351 -> 777 bytes unpackage/res/icons/40x40.png | Bin 2058 -> 1062 bytes unpackage/res/icons/58x58.png | Bin 3510 -> 1543 bytes unpackage/res/icons/60x60.png | Bin 3717 -> 1784 bytes unpackage/res/icons/72x72.png | Bin 4849 -> 2456 bytes unpackage/res/icons/76x76.png | Bin 5357 -> 2414 bytes unpackage/res/icons/80x80.png | Bin 5815 -> 2559 bytes unpackage/res/icons/87x87.png | Bin 6592 -> 2501 bytes unpackage/res/icons/96x96.png | Bin 7808 -> 2837 bytes util/imCommon.js | 5 +- util/index.js | 127 +++- 75 files changed, 1995 insertions(+), 1715 deletions(-) create mode 100644 android.keystore delete mode 100644 components/map.vue create mode 100644 pages/conversation/chating/components/MessageItem/NotificationRender.vue create mode 100644 pages/index/guide.vue create mode 100644 pages/index/launch.vue delete mode 100644 static/images/common_right.png delete mode 100644 static/images/user_card_message.png delete mode 100644 uni_modules/network-manage/utssdk/app-android/libs/okhttp-3.12.12.jar delete mode 100644 uni_modules/network-manage/utssdk/app-android/libs/okio-1.15.0.jar diff --git a/.gitignore b/.gitignore index 56cff83..479a129 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,5 @@ OpenIM_* # plugin /nativeplugins +android-keeplive +sl-notify diff --git a/App.vue b/App.vue index 5d3a189..a01d067 100644 --- a/App.vue +++ b/App.vue @@ -1,417 +1,57 @@ + .more_dot { + padding: 24rpx; + margin-right: 20rpx; + } + } + \ No newline at end of file diff --git a/components/map.vue b/components/map.vue deleted file mode 100644 index 6f609c0..0000000 --- a/components/map.vue +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/main.js b/main.js index 693408d..4416fcf 100644 --- a/main.js +++ b/main.js @@ -53,7 +53,7 @@ const app = new Vue({ ...App, }); app.REQUEST_TRACE = process.env.NODE_ENV == 'development'; -//app.REQUEST_TRACE = false; +app.REQUEST_TRACE = false; // 引入请求封装 import request from "./util/request/index"; diff --git a/manifest.json b/manifest.json index 26bd1e8..093cccf 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { - "name" : "回声", - "appid" : "__UNI__CA458BA", - "description" : "", + "name" : "瞬聊", + "appid" : "__UNI__E41111F", + "description" : "一款即时聊天软件", "versionName" : "3.3.5", "versionCode" : 335, "transformPx" : false, @@ -23,7 +23,8 @@ "Geolocation" : {}, "Fingerprint" : {}, "Contacts" : {}, - "Barcode" : {} + "Barcode" : {}, + "Push" : {} }, "distribute" : { "android" : { @@ -48,12 +49,13 @@ "", "", "", - "" + "", + "" ], "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ], "minSdkVersion" : 21, "targetSdkVersion" : 26, - "schemes" : "huisheng" + "schemes" : "shunliao" }, "ios" : { "dSYMs" : false, @@ -69,11 +71,11 @@ }, "capabilities" : { "entitlements" : { - "com.apple.developer.associated-domains" : [ "huisheng", "applinks:url.huisheng.hk" ] + "com.apple.developer.associated-domains" : [ "shunliao", "applinks:www.shun777.com", "applinks:url.shun777.com" ] } }, "idfa" : false, - "urltypes" : "huisheng" + "urltypes" : "shunliao" }, "sdkConfigs" : { "ad" : {}, @@ -91,7 +93,22 @@ }, "share" : {}, "statics" : {}, - "speech" : {} + "speech" : {}, + "push" : { + "unipush" : { + "version" : "2", + "offline" : true, + "icons" : { + "small" : { + "ldpi" : "static/images/about_logo.png", + "mdpi" : "static/images/about_logo.png", + "hdpi" : "static/images/about_logo.png", + "xhdpi" : "static/images/about_logo.png", + "xxhdpi" : "static/images/about_logo.png" + } + } + } + } }, "splashscreen" : { "androidStyle" : "default", @@ -163,7 +180,10 @@ "setting" : { "urlCheck" : false }, - "usingComponents" : true + "usingComponents" : true, + "unipush" : { + "enable" : true + } }, "mp-alipay" : { "usingComponents" : true @@ -199,6 +219,9 @@ "treeShaking" : { "enable" : true } + }, + "unipush" : { + "enable" : true } } } diff --git a/package.json b/package.json index bd541ee..fb83d44 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,13 @@ { "dependencies": { "@openim/client-sdk": "^0.0.11-ahpha.1", + "crypto-js": "^4.2.0", "date-fns": "^2.30.0", "dayjs": "^1.11.6", "grapheme-splitter": "^1.0.4", "image-tools": "^1.4.0", "md5": "^2.3.0", - "openim-uniapp-polyfill": "^1.4.1", + "openim-uniapp-polyfill": "^1.4.4", "uuid": "^9.0.0" } } diff --git a/pages.json b/pages.json index bcb3b6c..4fc1837 100644 --- a/pages.json +++ b/pages.json @@ -1,5 +1,17 @@ { "pages": [ + { + "path": "pages/index/guide", + "style": { + "navigationBarTitleText": "" + } + }, + { + "path": "pages/index/launch", + "style": { + "navigationBarTitleText": "" + } + }, //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages { "path": "pages/common/login/index" diff --git a/pages/common/createGroup/index.vue b/pages/common/createGroup/index.vue index 02e7c5d..b68f51e 100644 --- a/pages/common/createGroup/index.vue +++ b/pages/common/createGroup/index.vue @@ -48,11 +48,7 @@ + .right_content { + color: #999; + } + } + } + } + \ No newline at end of file diff --git a/pages/common/groupCard/index.vue b/pages/common/groupCard/index.vue index 4a1954d..e1d4423 100644 --- a/pages/common/groupCard/index.vue +++ b/pages/common/groupCard/index.vue @@ -50,6 +50,7 @@ import {navigateToDesignatedConversation} from "@/util/imCommon"; import IMSDK, {GroupVerificationType,SessionType,} from "openim-uniapp-polyfill"; import dayjs from "dayjs"; + import util from "@/util/index.js" import MyAvatar from "@/components/MyAvatar/index.vue"; import CustomNavBar from "@/components/CustomNavBar/index.vue"; import UserInfoRowItem from "../userCard/components/UserInfoRowItem.vue"; @@ -94,7 +95,7 @@ this.sourceID = sourceID; this.getSourceGroupInfo(); } else { - const info = JSON.parse(sourceInfo); + const info = util.aesdecode(sourceInfo); this.sourceID = info.groupID; this.sourceGroupInfo = { ...info, diff --git a/pages/common/login/index.vue b/pages/common/login/index.vue index 409001a..cf27a58 100644 --- a/pages/common/login/index.vue +++ b/pages/common/login/index.vue @@ -68,6 +68,8 @@ import { checkLoginError } from "@/util/common"; import { SmsUserFor } from "@/constant"; import IMSDK from "openim-uniapp-polyfill"; import util from "@/util/index.js" +import config from "@/common/config"; +import {getDbDir,toastWithCallback} from "@/util/common.js"; let timer; @@ -145,59 +147,48 @@ export default { this.loginInfo.email = "commiu@outlook.com"; this.loginInfo.password = "qwe123"; } + plus.navigator.closeSplashscreen(); }, updateEye() { this.eying = !this.eying; }, toRegisterOrForget(isRegister) { - uni.$u.route("/pages/common/login/index", { + uni.$u.route("/pages/common/registerOrForget/index", { isRegister, }); }, async startLogin() { - // this.$refs.loginForm.validate().then(async (valid) => { - this.loading = true; - this.saveLoginInfo(); - let data = {}; - try { - data = await businessLogin({ - mobile: this.loginInfo.phoneNumber, - email: this.loginInfo.email, - region: `+${this.loginInfo.region}`, - password: this.isPwdLogin ? md5(this.loginInfo.password) : "", - platform: uni.$u.os(), - type: this.active === 0 ? 'mobile' : 'email', - code: this.loginInfo.verificationCode, - }); - const { imToken, userID } = data; - // #ifdef APP - await IMSDK.asyncApi(IMSDK.IMMethods.Login, uuidv4(), { - userID, - token: imToken, - }); - // #endif - this.saveLoginProfile(data); - this.$store.commit("user/SET_AUTH_DATA", data); - this.$store.dispatch("user/getSelfInfo"); - this.$store.dispatch("conversation/getConversationList"); - this.$store.dispatch("conversation/getUnReadCount"); - // this.$store.dispatch("contact/getFriendList"); - // this.$store.dispatch("contact/getGrouplist"); - this.$store.dispatch("contact/getBlacklist"); - this.$store.dispatch("contact/getRecvFriendApplications"); - this.$store.dispatch("contact/getSentFriendApplications"); - this.$store.dispatch("contact/getRecvGroupApplications"); - this.$store.dispatch("contact/getSentGroupApplications"); - uni.switchTab({ - url: "/pages/conversation/conversationList/index", - }); - this.loginInfo.password = ""; - } catch (err) { - console.error(err); - uni.$u.toast(checkLoginError(err)); - } - this.loading = false; - // }); + this.$refs.loginForm.validate().then(async (valid) => { + this.loading = true; + this.saveLoginInfo(); + let data = {}; + try { + data = await businessLogin({ + mobile: this.loginInfo.phoneNumber, + email: this.loginInfo.email, + region: `+${this.loginInfo.region}`, + password: this.isPwdLogin ? md5(this.loginInfo.password) : "", + platform: uni.$u.os(), + type: this.active === 0 ? 'mobile' : 'email', + code: this.loginInfo.verificationCode, + }); + const { imToken, userID } = data; + this.saveLoginProfile(data); + this.$store.commit("user/SET_AUTH_DATA", data); + this.loginInfo.password = ""; + // #ifdef APP + // await IMSDK.asyncApi(IMSDK.IMMethods.Login, uuidv4(), { + // userID, + // token: imToken, + // }); + plus.runtime.restart(); + // #endif + } catch (err) { + console.error(err); + uni.$u.toast(checkLoginError(err)); + } + this.loading = false; + }); }, saveLoginProfile(data) { const { imToken, token, userID } = data; diff --git a/pages/common/map.vue b/pages/common/map.vue index e72f549..9dbb650 100644 --- a/pages/common/map.vue +++ b/pages/common/map.vue @@ -1,16 +1,12 @@ + \ No newline at end of file diff --git a/pages/common/searchUserOrGroup/index.vue b/pages/common/searchUserOrGroup/index.vue index 48d5883..4dd7c10 100644 --- a/pages/common/searchUserOrGroup/index.vue +++ b/pages/common/searchUserOrGroup/index.vue @@ -32,9 +32,8 @@ import searchGroup from "static/images/contact_add_join_group_fill.png"; import searchUser from "static/images/contact_add_search_user_fill.png"; - import { - businessSearchUserInfo - } from "@/api/login"; + import {businessSearchUserInfo} from "@/api/login"; + import util from "@/util/index.js" export default { components: { @@ -87,8 +86,9 @@ info = data[0]; } if (info) { + const s = util.aesencode(info); uni.navigateTo({ - url: `/pages/common/groupCard/index?sourceInfo=${JSON.stringify(info,)}`, + url: `/pages/common/groupCard/index?sourceInfo=${s}`, }); } else { this.empty = true; @@ -116,7 +116,7 @@ console.log(info) if (info) { uni.navigateTo({ - url: `/pages/common/userCard/index?sourceInfo=${JSON.stringify(info,)}`, + url: `/pages/common/userCard/index?sourceID=${info.userID}`, }); } else { this.empty = true; diff --git a/pages/common/setPassword/index.vue b/pages/common/setPassword/index.vue index 5d59598..e2369f7 100644 --- a/pages/common/setPassword/index.vue +++ b/pages/common/setPassword/index.vue @@ -30,9 +30,8 @@ + .arrow_right { + justify-content: space-between; + } + \ No newline at end of file diff --git a/pages/common/userCard/index.vue b/pages/common/userCard/index.vue index d459bfa..6082520 100644 --- a/pages/common/userCard/index.vue +++ b/pages/common/userCard/index.vue @@ -1,7 +1,8 @@ + &:last-child { + .u-button { + color: #999 !important; + } + } + } + } + \ No newline at end of file diff --git a/pages/contact/applicationList/ApplicationItem.vue b/pages/contact/applicationList/ApplicationItem.vue index 3a6b198..c1eada4 100644 --- a/pages/contact/applicationList/ApplicationItem.vue +++ b/pages/contact/applicationList/ApplicationItem.vue @@ -28,13 +28,10 @@ + .application_list { + margin-top: 24rpx; + flex: 1; + } + } + \ No newline at end of file diff --git a/pages/contact/contactAdd/index.vue b/pages/contact/contactAdd/index.vue index 1165e90..08e947d 100644 --- a/pages/contact/contactAdd/index.vue +++ b/pages/contact/contactAdd/index.vue @@ -26,15 +26,15 @@ { idx: 0, title: "创建群聊", - desc: "创建群聊,全面使用OpenIM", + desc: "创建群聊", icon: contact_add_create_group_img, }, - { - idx: 1, - title: "添加群聊", - desc: "向管理员或团队成员询问ID", - icon: rcontact_add_join_group_img, - }, + // { + // idx: 1, + // title: "添加群聊", + // desc: "向管理员或团队成员询问ID", + // icon: contact_add_join_group_img, + // }, ], friendActionMenus: [ { diff --git a/pages/contact/friendList/index.vue b/pages/contact/friendList/index.vue index d95efaa..ca0d634 100644 --- a/pages/contact/friendList/index.vue +++ b/pages/contact/friendList/index.vue @@ -15,7 +15,7 @@ - + diff --git a/pages/conversation/chating/components/ChatingFooter/index.vue b/pages/conversation/chating/components/ChatingFooter/index.vue index 46febae..bba4622 100644 --- a/pages/conversation/chating/components/ChatingFooter/index.vue +++ b/pages/conversation/chating/components/ChatingFooter/index.vue @@ -251,12 +251,15 @@ const realVideoPath = await getPurePath(item); console.log('处理后的可用路径', realVideoPath); const info = await getVideoInfo(realVideoPath); - const cover = await getVideoCover(item); + //const cover = await getVideoCover(item); + const res1 = await IMSDK.getVideoCover(item); + //console.log(res1.path); const videoParams = { videoPath: realVideoPath, videoType: "mp4", duration: info.duration, - snapshotPath: getPurePath(cover), + snapshotPath: getPurePath(res1.path), + //snapshotPath: getPurePath(cover), }; console.log('videoParams', videoParams); message = await IMSDK.asyncApi( @@ -271,7 +274,7 @@ getPurePath(item) ); } - console.log(message); + //console.log(message); if(message){ _this.sendMessage(message,_this.storeCurrentConversation.userID,_this.storeCurrentConversation.groupID); } @@ -416,10 +419,16 @@ return ; } if(e.source == "album"){ + // IMSDK.pickFile().then(res=>{ + // console.log(res); + // }).catch(e=>{ + // console.log(e); + // }); + // return; plus.gallery.pick(({files})=>{ _this.sendMediaMesage(files); }, (error )=>{ - reject(error); + console.log(error); }, { animation:true, confirmText:"确定", diff --git a/pages/conversation/chating/components/ChatingHeader.vue b/pages/conversation/chating/components/ChatingHeader.vue index ad05f62..4446bc3 100644 --- a/pages/conversation/chating/components/ChatingHeader.vue +++ b/pages/conversation/chating/components/ChatingHeader.vue @@ -23,12 +23,8 @@ + + \ No newline at end of file diff --git a/pages/conversation/chating/components/MessageItem/VideoMessageRender.vue b/pages/conversation/chating/components/MessageItem/VideoMessageRender.vue index d9df6b5..9c7c06b 100644 --- a/pages/conversation/chating/components/MessageItem/VideoMessageRender.vue +++ b/pages/conversation/chating/components/MessageItem/VideoMessageRender.vue @@ -54,7 +54,7 @@ "videoType": "mp4", "videoSize": 3751005, "duration": 44, - "snapshotPath": "/storage/emulated/0/Android/data/hk.huisheng.im/apps/__UNI__CA458BA/doc/video_cover_2ea1c8ec.jpg", + "snapshotPath": "/storage/emulated/0/Android/data/hk.huisheng.im/apps/__UNI__E41111F/doc/video_cover_2ea1c8ec.jpg", "snapshotSize": 36974, "snapshotUrl": "http://www.axzc.xyz/object/100003/msg_videoSnapshot_d9a596f3e665e84559821a8aa5fb9f16.jpg", "snapshotWidth": 1087, @@ -116,8 +116,11 @@ }, methods: { async init(){ - const snapshotUrl = this.message?.videoElem?.snapshotUrl; + const self = this; + console.log(this.message?.videoElem); + const snapshotUrl = this.message?.videoElem?.snapshotPath || this.message?.videoElem?.snapshotUrl; self.coverDownloading = true; + console.log(snapshotUrl); util.cacheFile(snapshotUrl,`${this.conversationID}`).then((fn)=>{ self.coverDownloading = false; self.src = fn; diff --git a/pages/conversation/chating/components/MessageItem/index.vue b/pages/conversation/chating/components/MessageItem/index.vue index 2c5ff80..f732026 100644 --- a/pages/conversation/chating/components/MessageItem/index.vue +++ b/pages/conversation/chating/components/MessageItem/index.vue @@ -57,6 +57,7 @@ import MarkdownMessageRender from "./MarkdownMessageRender"; import StreamMessageRender from "./StreamMessageRender"; import OANotificationRender from "./OANotificationRender"; + import NotificationRender from "./NotificationRender"; import ErrorMessageRender from "./ErrorMessageRender"; import {noticeMessageTypes} from "@/constant"; @@ -82,6 +83,7 @@ MarkdownMessageRender, StreamMessageRender, OANotificationRender, + NotificationRender, ErrorMessageRender }, props: { @@ -173,7 +175,8 @@ ['type_'+MessageType.FaceMessage] : "FaceMessageRender", ['type_'+MessageType.MarkdownMessage] : "MarkdownMessageRender", ['type_'+MessageType.StreamMessage] : "StreamMessageRender", - ['type_'+MessageType.OANotification] : "OANotificationRender" + ['type_'+MessageType.OANotification] : "OANotificationRender", + 'type_2001' : "NotificationRender" }; this.component = MsgType2Components['type_'+this.source.contentType] || "ErrorMessageRender"; this.$emit('userEvent',{type:"messageItemRender"},this.source.clientMsgID); diff --git a/pages/conversation/conversationList/components/ConversationItem.vue b/pages/conversation/conversationList/components/ConversationItem.vue index fb40f15..c7136e8 100644 --- a/pages/conversation/conversationList/components/ConversationItem.vue +++ b/pages/conversation/conversationList/components/ConversationItem.vue @@ -103,19 +103,20 @@ flex:1; .details { - @include colBox(true); + display: flex; + flex-direction: column; + justify-content: space-around; flex:1; margin-left: 24rpx; height: 46px; - color: $uni-text-color; - padding-bottom:20rpx; + color: $u-main-color; .title{ @include btwBox(); .conversation_name { @include nomalEllipsis(); max-width: 40vw; font-size: 32rpx; - font-weight: 500; + font-weight: 400; } .right_desc { diff --git a/pages/conversation/groupManage/index.vue b/pages/conversation/groupManage/index.vue index 8c54b6a..359bb54 100644 --- a/pages/conversation/groupManage/index.vue +++ b/pages/conversation/groupManage/index.vue @@ -14,13 +14,7 @@ + .member_list { + flex: 1; + } + } + \ No newline at end of file diff --git a/pages/conversation/groupSettings/index.vue b/pages/conversation/groupSettings/index.vue index df2763f..2aa35ac 100644 --- a/pages/conversation/groupSettings/index.vue +++ b/pages/conversation/groupSettings/index.vue @@ -62,18 +62,13 @@ + .u-button { + height: 60rpx; + } + } + } + \ No newline at end of file diff --git a/pages/index/guide.vue b/pages/index/guide.vue new file mode 100644 index 0000000..c6c2de2 --- /dev/null +++ b/pages/index/guide.vue @@ -0,0 +1,75 @@ + + + + \ No newline at end of file diff --git a/pages/index/launch.vue b/pages/index/launch.vue new file mode 100644 index 0000000..ecde904 --- /dev/null +++ b/pages/index/launch.vue @@ -0,0 +1,541 @@ + + + + + \ No newline at end of file diff --git a/pages/user/index/index.vue b/pages/user/index/index.vue index ab611a7..0733b0d 100644 --- a/pages/user/index/index.vue +++ b/pages/user/index/index.vue @@ -16,7 +16,7 @@ - + @@ -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; diff --git a/pages/user/selfInfo/index.vue b/pages/user/selfInfo/index.vue index 35cece5..cd506ac 100644 --- a/pages/user/selfInfo/index.vue +++ b/pages/user/selfInfo/index.vue @@ -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); + } }, }); }, diff --git a/static/images/common_right.png b/static/images/common_right.png deleted file mode 100644 index c387f8d7fa0b63785a62df4dcf85ddad1cc442e7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 411 zcmV;M0c8G(P)Px$RY^oaR7gwh)4fW=P#DJX_dSUb7ZJSyL0cTW1P5CjTww2yNcPcG654lK+o9hae33!XfwJj{wJK?!?aZ{4^W z7;t#vOlcasmT`_ux6PHCft|r;d<5HwnBd5D+syQhOPD-SoH!YX8z%#$O6wdLPx$*-1n}R9Hvtn7=E9Q5eTR-!d4C27`f8GAOH1{s4nT5sKNOER@9{1_Ohcfhb0U z&44l*l$2udCm0lUbo5@mUiZiO@pkW}_l&paJm1gxzUMsmIY%`4P?PiVHvx??Ex-`a zRVRm^fon-0S-oEl8e@8aGoYtVa3z^XU`*0OTK5NF;@o`$;L?zNX(zLQqrgR-oy*FN zNV+Qhm<5~z_8JU0FKNF3jQ9#c4%*{?3%o`Mr>C|71Ar}O*%1UdE9oF7xUV$Em`eLS z2yjr+P0oPBz-3+z+Dd;6yyXPh3d{hVc>(6c<&-Aq6FX(jDd>L!ZUJkOoXd|yX3K@Rpyy7N&9l2^K9X*C zI&(j+^^agz{p)4GaSis;ewe<^RdldYLSu}nBDN}N-4Vts%=z)C3gDuo9WPan;21#r zIW63-hn{z6D4>O#N|ys~Wyc9VfbU89sT-VKgAd>WFrIYQ-;X item.handleResult === 0); + state.unHandleFriendApplicationNum = count.length; + if(state.unHandleFriendApplicationNum>0){ + uni.setTabBarBadge({ + index:1, + text:(state.unHandleFriendApplicationNum<100?state.unHandleFriendApplicationNum:'···')+'', + }); + }else{ + uni.hideTabBarRedDot({ + index:1 + }) + } }, SET_SENT_FRIEND_APPLICATIONS(state, list) { state.sentFriendApplications = [...list]; @@ -60,7 +72,7 @@ const actions = { if (data.length < count) break; initialFetch = false; } catch (error) { - console.error("getFriendListPage error"); + console.error("getFriendListPage error",error); } } commit("SET_FRIEND_LIST", friendInfoList); diff --git a/styles/common.scss b/styles/common.scss index 9828046..8a2427a 100644 --- a/styles/common.scss +++ b/styles/common.scss @@ -36,4 +36,4 @@ -webkit-line-clamp: $line; overflow: hidden; word-break: break-all; -} +} \ No newline at end of file diff --git a/uni_modules/ly-map/components/ly-map/ly-map.vue b/uni_modules/ly-map/components/ly-map/ly-map.vue index 7b0e5c9..5159688 100644 --- a/uni_modules/ly-map/components/ly-map/ly-map.vue +++ b/uni_modules/ly-map/components/ly-map/ly-map.vue @@ -1,5 +1,32 @@