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 @@
-
-
- 确定
-
-
@@ -24,10 +20,20 @@
+
+
+
+
+
+
+
+
+
+
\ 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 @@
-
+
+
@@ -9,10 +10,7 @@
size="46" />
{{ getShowName }}
- {{sourceUserInfo.userID}}
-
-
-
+ {{sourceUserInfo.userID || sourceUserInfo.id}}
@@ -20,15 +18,15 @@
-
-
+
+
+
+
-
+
-
-
- 发消息
-
+
+
@@ -43,6 +41,7 @@
import UserInfoRowItem from "./components/UserInfoRowItem.vue";
import {businessSearchUserInfo} from "@/api/login";
import dayjs from "dayjs";
+ import util from "@/util/index.js"
export default {
components: {
@@ -106,7 +105,7 @@
if (sourceID) {
this.sourceID = sourceID;
} else {
- const info = JSON.parse(sourceInfo);
+ const info = util.aesdecode(sourceInfo);
this.sourceID = info.userID;
}
//console.log(this.storeSelfInfo);
@@ -148,16 +147,8 @@
try {
const res = await businessSearchUserInfo(this.sourceID);
if (res.total > 0) {
- const {
- data
- } = await IMSDK.asyncApi(
- IMSDK.IMMethods.GetUsersInfo,
- IMSDK.uuid(),
- [this.sourceID+''],
- );
- const imData = data[0]?.friendInfo ?? data[0]?.publicInfo ?? {};
info = {
- ...imData,
+ ...info,
...res.data[0],
};
}
@@ -177,6 +168,13 @@
notNeedVerification: false,
});
},
+ gotoCircle(){
+ console.log('gotoCircle');
+ return ;
+ uni.navigateTo({
+ url:"/pages/find/friend-circle/friend-circle?userId="+this.sourceID
+ })
+ },
toDesignatedConversation() {
navigateToDesignatedConversation(
this.sourceID,
@@ -185,8 +183,9 @@
).catch(() => uni.$u.toast("获取会话信息失败"));
},
toMoreInfo() {
+ const s = util.aesencode(this.sourceUserInfo);
uni.navigateTo({
- url: `/pages/common/userCardMore/index?sourceInfo=${JSON.stringify(this.sourceUserInfo,)}`,
+ url: `/pages/common/userCardMore/index?sourceInfo=${s}`,
});
}
},
@@ -207,16 +206,6 @@
padding: 44rpx;
margin-bottom: 18rpx;
- .add_btn {
- width: 140rpx;
- height: 60rpx;
- margin-left: auto;
-
- .u-button {
- width: 140rpx;
- height: 60rpx;
- }
- }
.u-avatar {
margin-right: 24rpx;
@@ -226,7 +215,6 @@
display: flex;
flex-direction: column;
justify-content: space-between;
- margin-bottom: 12rpx;
height: 46px;
.text {
@@ -271,23 +259,6 @@
margin: 44rpx;
flex: 1;
- .action_item {
- width: 100%;
- @include colBox(true);
- flex-direction: row;
- align-items: center;
- justify-content: center;
- padding: 22rpx 0;
- background: $u-primary;
- color: #fff;
- border-radius: 12rpx;
-
- img {
- margin-right: 16rpx;
- width: 40rpx;
- height: 40rpx;
- }
- }
}
.id {
diff --git a/pages/common/userCardMore/index.vue b/pages/common/userCardMore/index.vue
index a0c3987..90da1db 100644
--- a/pages/common/userCardMore/index.vue
+++ b/pages/common/userCardMore/index.vue
@@ -26,9 +26,8 @@
import IMSDK from "openim-uniapp-polyfill";
import CustomNavBar from "@/components/CustomNavBar/index.vue";
import UserInfoRowItem from "../userCard/components/UserInfoRowItem.vue";
- import {
- ContactChooseTypes
- } from "@/constant";
+ import {ContactChooseTypes} from "@/constant";
+ import util from "@/util/index.js"
export default {
components: {
CustomNavBar,
@@ -59,7 +58,7 @@
},
onLoad(options) {
const {sourceInfo} = options;
- this.sourceInfo = JSON.parse(sourceInfo);
+ this.sourceInfo = util.aesdecode(sourceInfo);
},
methods: {
change(isBlack) {
@@ -81,18 +80,21 @@
.finally(() => (this.showConfirm = false));
},
toMore() {
+ const s = util.aesencode(this.sourceInfo);
uni.navigateTo({
- url: `/pages/common/detailsFileds/index?sourceInfo=${JSON.stringify(this.sourceInfo,)}`,
+ url: `/pages/common/detailsFileds/index?sourceInfo=${s}`,
});
},
toMark() {
+ const s = util.aesencode(this.sourceInfo);
uni.navigateTo({
- url: `/pages/common/markOrIDPage/index?isRemark=true&sourceInfo=${JSON.stringify(this.sourceInfo,)}`,
+ url: `/pages/common/markOrIDPage/index?isRemark=true&sourceInfo=${s}`,
});
},
toShare() {
+ const s = util.aesencode(this.sourceInfo);
uni.navigateTo({
- url: `/pages/common/contactChoose/index?type=${ContactChooseTypes.ShareCard}&cardInfo=${JSON.stringify(this.sourceInfo)}`,
+ url: `/pages/common/contactChoose/index?type=${ContactChooseTypes.ShareCard}&cardInfo=${s}`,
});
},
showToast(message) {
diff --git a/pages/common/userOrGroupQrCode.vue b/pages/common/userOrGroupQrCode.vue
index dc69e02..144c0e6 100644
--- a/pages/common/userOrGroupQrCode.vue
+++ b/pages/common/userOrGroupQrCode.vue
@@ -74,7 +74,7 @@
},
onLoad(opt) {
if(opt.sourceInfo){
- this.source = JSON.parse(opt.sourceInfo);
+ this.source = util.aesdecode(opt.sourceInfo);
}else{
this.source = {
type:"user",
diff --git a/pages/common/verifyCode/index.vue b/pages/common/verifyCode/index.vue
index 6bba3d6..b08e74b 100644
--- a/pages/common/verifyCode/index.vue
+++ b/pages/common/verifyCode/index.vue
@@ -22,10 +22,11 @@
+ &: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 @@
+
+
+
+
+
+
+
+ Make some money
+
+ Paid surveys are a handy sideline for anyone looking to make some extra money,You earn a commission for
+ each survey you complete.
+
+
+
+
+
+
+
+ Make money by
completing surveys
+
+ If you are looking for an easy way to make money with surveys, you can join the "MMT" community.
+
+
+
+
+
+
+
+
+
+
\ 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 c387f8d..0000000
Binary files a/static/images/common_right.png and /dev/null differ
diff --git a/static/images/user_card_message.png b/static/images/user_card_message.png
deleted file mode 100644
index c269959..0000000
Binary files a/static/images/user_card_message.png and /dev/null differ
diff --git a/store/modules/contact.js b/store/modules/contact.js
index 325b7fc..d4b4921 100644
--- a/store/modules/contact.js
+++ b/store/modules/contact.js
@@ -27,6 +27,18 @@ const mutations = {
},
SET_RECV_FRIEND_APPLICATIONS(state, list) {
state.recvFriendApplications = [...list];
+ const count = list.filter((item) => 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 @@
+
+
+ 确定
+
+
@@ -48,7 +75,8 @@
showLocationIcon: {
type: Boolean,
default: false,
- }
+ },
+ type:String
},
// 数据定义
data() {
@@ -81,6 +109,12 @@
},
// 通用方法
methods: {
+ confirm(){
+ this.$emit('onUserEvent',{type:'confirm'});
+ },
+ back(){
+ this.$emit('onUserEvent',{type:'back'});
+ },
// 生成唯一ID
genId() {
let result = '';
@@ -621,7 +655,7 @@
height: 100%;
position: relative;
overflow: hidden;
- background: #f0f0f0;
+ background: transparent;
.ly-map {
width: 100%;
diff --git a/uni_modules/network-manage/utssdk/app-android/libs/okhttp-3.12.12.jar b/uni_modules/network-manage/utssdk/app-android/libs/okhttp-3.12.12.jar
deleted file mode 100644
index f4381a6..0000000
Binary files a/uni_modules/network-manage/utssdk/app-android/libs/okhttp-3.12.12.jar and /dev/null differ
diff --git a/uni_modules/network-manage/utssdk/app-android/libs/okio-1.15.0.jar b/uni_modules/network-manage/utssdk/app-android/libs/okio-1.15.0.jar
deleted file mode 100644
index ab8ab73..0000000
Binary files a/uni_modules/network-manage/utssdk/app-android/libs/okio-1.15.0.jar and /dev/null differ
diff --git a/unpackage/res/cover/1080_1882.9.png b/unpackage/res/cover/1080_1882.9.png
index 3d90e72..aedf4a8 100644
Binary files a/unpackage/res/cover/1080_1882.9.png and b/unpackage/res/cover/1080_1882.9.png differ
diff --git a/unpackage/res/cover/480_762.9.png b/unpackage/res/cover/480_762.9.png
index 41fb6eb..93f6b78 100644
Binary files a/unpackage/res/cover/480_762.9.png and b/unpackage/res/cover/480_762.9.png differ
diff --git a/unpackage/res/cover/720_1242.9.png b/unpackage/res/cover/720_1242.9.png
index 2157c9d..09b693a 100644
Binary files a/unpackage/res/cover/720_1242.9.png and b/unpackage/res/cover/720_1242.9.png differ
diff --git a/unpackage/res/icons/1024x1024.png b/unpackage/res/icons/1024x1024.png
index ca3b505..ae1e384 100644
Binary files a/unpackage/res/icons/1024x1024.png and b/unpackage/res/icons/1024x1024.png differ
diff --git a/unpackage/res/icons/120x120.png b/unpackage/res/icons/120x120.png
index adf8685..3e30142 100644
Binary files a/unpackage/res/icons/120x120.png and b/unpackage/res/icons/120x120.png differ
diff --git a/unpackage/res/icons/144x144.png b/unpackage/res/icons/144x144.png
index b29af59..d9c3d35 100644
Binary files a/unpackage/res/icons/144x144.png and b/unpackage/res/icons/144x144.png differ
diff --git a/unpackage/res/icons/152x152.png b/unpackage/res/icons/152x152.png
index 1d12b5f..952ed8d 100644
Binary files a/unpackage/res/icons/152x152.png and b/unpackage/res/icons/152x152.png differ
diff --git a/unpackage/res/icons/167x167.png b/unpackage/res/icons/167x167.png
index 6167a5b..b624076 100644
Binary files a/unpackage/res/icons/167x167.png and b/unpackage/res/icons/167x167.png differ
diff --git a/unpackage/res/icons/180x180.png b/unpackage/res/icons/180x180.png
index 56adb58..b8cf383 100644
Binary files a/unpackage/res/icons/180x180.png and b/unpackage/res/icons/180x180.png differ
diff --git a/unpackage/res/icons/192x192.png b/unpackage/res/icons/192x192.png
index 61e4e49..2f824db 100644
Binary files a/unpackage/res/icons/192x192.png and b/unpackage/res/icons/192x192.png differ
diff --git a/unpackage/res/icons/20x20.png b/unpackage/res/icons/20x20.png
index 18d6974..e4acfb4 100644
Binary files a/unpackage/res/icons/20x20.png and b/unpackage/res/icons/20x20.png differ
diff --git a/unpackage/res/icons/29x29.png b/unpackage/res/icons/29x29.png
index 4fcb50f..06c8c76 100644
Binary files a/unpackage/res/icons/29x29.png and b/unpackage/res/icons/29x29.png differ
diff --git a/unpackage/res/icons/40x40.png b/unpackage/res/icons/40x40.png
index 63fbb20..a8d05be 100644
Binary files a/unpackage/res/icons/40x40.png and b/unpackage/res/icons/40x40.png differ
diff --git a/unpackage/res/icons/58x58.png b/unpackage/res/icons/58x58.png
index 758bc2b..4d02bf9 100644
Binary files a/unpackage/res/icons/58x58.png and b/unpackage/res/icons/58x58.png differ
diff --git a/unpackage/res/icons/60x60.png b/unpackage/res/icons/60x60.png
index 7ac5599..5a8b2bb 100644
Binary files a/unpackage/res/icons/60x60.png and b/unpackage/res/icons/60x60.png differ
diff --git a/unpackage/res/icons/72x72.png b/unpackage/res/icons/72x72.png
index 5467b60..cc86b3f 100644
Binary files a/unpackage/res/icons/72x72.png and b/unpackage/res/icons/72x72.png differ
diff --git a/unpackage/res/icons/76x76.png b/unpackage/res/icons/76x76.png
index 7cb3e6b..583beaf 100644
Binary files a/unpackage/res/icons/76x76.png and b/unpackage/res/icons/76x76.png differ
diff --git a/unpackage/res/icons/80x80.png b/unpackage/res/icons/80x80.png
index 155d431..f86b312 100644
Binary files a/unpackage/res/icons/80x80.png and b/unpackage/res/icons/80x80.png differ
diff --git a/unpackage/res/icons/87x87.png b/unpackage/res/icons/87x87.png
index 2cb70c0..1cee449 100644
Binary files a/unpackage/res/icons/87x87.png and b/unpackage/res/icons/87x87.png differ
diff --git a/unpackage/res/icons/96x96.png b/unpackage/res/icons/96x96.png
index 83f7e68..9aa35d6 100644
Binary files a/unpackage/res/icons/96x96.png and b/unpackage/res/icons/96x96.png differ
diff --git a/util/imCommon.js b/util/imCommon.js
index 2d64c0f..ae8961e 100644
--- a/util/imCommon.js
+++ b/util/imCommon.js
@@ -32,7 +32,6 @@ dayjs.updateLocale("zh-cn", {
export const formatMessageTime = (timestemp, keepSameYear = false) => {
if (!timestemp) return "";
-
const isRecent = dayjs().diff(timestemp, "day") < 7;
const keepYear = keepSameYear || !isThisYear(timestemp);
@@ -211,6 +210,10 @@ export const parseMessageByType = (pmsg) => {
return `[RevokeMessage]`;
case MessageType.MsgPinned:
return `[MsgPinned]`;
+ case 2001:
+ const body = JSON.parse(pmsg.notificationElem.detail);
+ body.data = JSON.parse(body.data);
+ return parseMessageByType(body.data);
default:
return "[暂未支持的消息类型]";
}
diff --git a/util/index.js b/util/index.js
index 514aa6c..2bf5f94 100644
--- a/util/index.js
+++ b/util/index.js
@@ -4,6 +4,7 @@ import base from '@/common/config';
//import store from "@/store";
import IMSDK from "openim-uniapp-polyfill";
+import CryptoJS from 'crypto-js';
import md5 from "md5";
import {downloadFile} from "@/uni_modules/network-manage";
@@ -233,8 +234,6 @@ const get_absolute_path = (fn)=>{
}
const pendingDownloads = new Map();
const cacheFile = (url, saveDir,progressCallback) => {
- let cacheDir = plus.io.convertLocalFileSystemURL(`_doc/{{dir}}/{{key}}.{{ext}}`);
- cacheDir = cacheDir.replace('apps/'+plus.runtime.appid+'/doc','cache');
return new Promise(async (resolve, reject) => {
try {
if(!url || !url.startsWith('http')){
@@ -246,6 +245,8 @@ const cacheFile = (url, saveDir,progressCallback) => {
if(url.toLowerCase().indexOf('.mp4')!==-1){
ext = "mp4";
}
+ let cacheDir = plus.io.convertLocalFileSystemURL(`_doc/{{dir}}/{{key}}.{{ext}}`);
+ cacheDir = cacheDir.replace('apps/'+plus.runtime.appid+'/doc','cache');
const cacheFilePath = cacheDir.replace('{{dir}}',saveDir)
.replace('{{key}}',key)
.replace('{{ext}}',ext);
@@ -315,8 +316,130 @@ const cacheFile = (url, saveDir,progressCallback) => {
}
});
};
+const toMapAPP = (latitude,longitude,name) =>{
+ let url = "";
+ if (plus.os.name == "Android") {//判断是安卓端
+ plus.nativeUI.actionSheet({//选择菜单
+ title: "选择地图应用",
+ cancel: "取消",
+ buttons: [{title: "腾讯地图"},{title: "百度地图"}, {title: "高德地图"}]
+ }, function(e) {
+ switch (e.index) {
+ //下面是拼接url,不同系统以及不同地图都有不同的拼接字段
+ case 1:
+ //注意referer=xxx的xxx替换成你在腾讯地图开发平台申请的key
+ url = `qqmap://map/geocoder?coord=${latitude},${longitude}&referer=xxx`;
+ break;
+ case 2:
+ url = `baidumap://map/marker?location=${latitude},${longitude}&title=${name}&coord_type=gcj02&src=andr.baidu.openAPIdemo`;
+ break;
+ case 3:
+ url = `androidamap://viewMap?sourceApplication=appname&poiname=${name}&lat=${latitude}&lon=${longitude}&dev=0`;
+ break;
+ default:
+ break;
+ }
+ if (url != "") {
+ url = encodeURI(url);
+ //plus.runtime.openURL(url,function(e){})调起手机APP应用
+ plus.runtime.openURL(url, function(e) {
+ plus.nativeUI.alert("本机未安装指定的地图应用");
+ });
+ }
+ })
+ } else {
+ // iOS上获取本机是否安装了百度高德地图,需要在manifest里配置
+ // 在manifest.json文件app-plus->distribute->apple->urlschemewhitelist节点下添加
+ //(如urlschemewhitelist:["iosamap","baidumap"])
+ plus.nativeUI.actionSheet({
+ title: "选择地图应用",
+ cancel: "取消",
+ buttons: [{title: "腾讯地图"},{title: "百度地图"}, {title: "高德地图"}]
+ }, function(e) {
+ switch (e.index) {
+ case 1:
+ url = `qqmap://map/geocoder?coord=${latitude},${longitude}&referer=xxx`;
+ break;
+ case 2:
+ url = `baidumap://map/marker?location=${latitude},${longitude}&title=${name}&content=${name}&src=ios.baidu.openAPIdemo&coord_type=gcj02`;
+ break;
+ case 3:
+ url = `iosamap://viewMap?sourceApplication=applicationName&poiname=${name}&lat=${latitude}&lon=${longitude}&dev=0`;
+ break;
+ default:
+ break;
+ }
+ if (url != "") {
+ url = encodeURI(url);
+ plus.runtime.openURL(url, function(e) {
+ plus.nativeUI.alert("本机未安装指定的地图应用");
+ });
+ }
+ })
+ }
+}
+
+/**
+* AES 加密函数
+* @param {String|Object|Array} str 要加密的内容
+* @param {String} key 加密密钥
+* @returns {String} 加密后的Base64字符串
+*/
+const aesencode = (str, key = 'muNcJyt0XXV6faCGe41VSIaf0ecZeW2jXmgpL0Ak93Kbwjyr')=> {
+ // 如果是对象或数组,转为JSON字符串
+ if (typeof str === 'object') {
+ str = JSON.stringify(str);
+ }
+
+ // 使用SHA-256哈希处理密钥
+ const hashedKey = CryptoJS.SHA256(key);
+
+ // 生成IV(前16字节)
+ const iv = CryptoJS.lib.WordArray.create(hashedKey.words.slice(0, 4));
+
+ // 加密
+ const encrypted = CryptoJS.AES.encrypt(str,hashedKey,{
+ iv: iv,
+ mode: CryptoJS.mode.CBC,
+ padding: CryptoJS.pad.Pkcs7
+ });
+
+ // 返回Base64编码结果
+ const _str = encrypted.toString();
+ return _str.replace(/\+/ig,'%2b');
+}
+
+/**
+* AES 解密函数
+* @param {String} str 要解密的Base64字符串
+* @param {String} key 解密密钥
+* @returns {String} 解密后的原始字符串
+*/
+const aesdecode = (str, key = 'muNcJyt0XXV6faCGe41VSIaf0ecZeW2jXmgpL0Ak93Kbwjyr') => {
+ // 使用SHA-256哈希处理密钥
+ const hashedKey = CryptoJS.SHA256(key);
+
+ // 生成IV(前16字节)
+ const iv = CryptoJS.lib.WordArray.create(hashedKey.words.slice(0, 4));
+ str = str.replace(/\%2b/ig,'+');
+ // 解密
+ const decrypted = CryptoJS.AES.decrypt(str,hashedKey,{
+ iv: iv,
+ mode: CryptoJS.mode.CBC,
+ padding: CryptoJS.pad.Pkcs7
+ });
+
+ // 转为UTF-8字符串
+ let _str = decrypted.toString(CryptoJS.enc.Utf8);
+ console.log(_str);
+ const obj = _str.startsWith('{') || _str.startsWith('[') ? JSON.parse(_str) : _str;
+ return obj;
+}
export default{
+ aesdecode,
+ aesencode,
+ toMapAPP,
cacheFile,
fileExsit,
get_absolute_path,