diff --git a/App.vue b/App.vue
index 18dcf0f..d98bbce 100644
--- a/App.vue
+++ b/App.vue
@@ -314,6 +314,12 @@
this.$store.dispatch("contact/getSentGroupApplications");
uni.switchTab({
url: "/pages/conversation/conversationList/index?isRedirect=true",
+ success() {
+
+ // uni.navigateTo({
+ // url:'/pages/workbench/friend-circle/friend-circle'
+ // })
+ }
});
};
getDbDir()
diff --git a/api/login.js b/api/login.js
index 92c225a..67f1d06 100644
--- a/api/login.js
+++ b/api/login.js
@@ -1,4 +1,7 @@
+import { reject } from "lodash";
+import config from "@/common/config";
// 登录
+
export const businessConfig = (params) =>
uni.$u?.http.post("/common/init", JSON.stringify(params));
// 验证是否升级
@@ -78,40 +81,45 @@ export const businessSearchUser = (keyword,searchtype) =>
},
}
);
-export const getArticle = (id,type) =>
- uni.$u?.http.post(
- "/article/detail",
- JSON.stringify({
- id,
- type:(type? type : 'id')
- }), {
- header: {
- token: uni.getStorageSync("BusinessToken"),
- },
- }
- );
+export const getArticle = (id,type) => uni.$u?.http.post("/article/detail",JSON.stringify({id,type:(type? type : 'id')}));
export const getFriendCircle = (page=1,limit=10) =>{
- uni.$u?.http.get(
- "/friend_circle/list",
- JSON.stringify({
- limit:limit,
- page:page
- }),
- {
- header: {
- token: uni.getStorageSync("BusinessToken"),
- },
- }
- );
+ return uni.$u?.http.get("/friendcircle/list",JSON.stringify({limit:limit,page:page}));
}
export const getFriendCircleNewcount = () =>{
- uni.$u?.http.get(
- "/friend_circle/newcount",
- JSON.stringify({}),
- {
- header: {
- token: uni.getStorageSync("BusinessToken"),
+ return uni.$u?.http.get("/friendcircle/newcount");
+}
+export const getFriendCircleInfo = () =>{
+ return uni.$u?.http.get("/friendcircle/info");
+}
+export const upload = (url,onProgress) =>{
+ return new Promise((resolve,reject)=>{
+ var u = uni.uploadFile({
+ url: config.getRegisterUrl()+"/user/upload", // 仅为示例,非真实的接口地址
+ filePath: url,
+ name: "file",
+ header:{
+ token:uni.getStorageSync("BusinessToken"),
},
- }
- );
+ success({data,errMsg}){
+ console.log(data);
+ data = JSON.parse(data);
+ if(data.code == 0){
+ resolve(data);
+ }else{
+ reject(data.msg);
+ }
+ },
+ fail(res) {
+ console.log(e);
+ reject(e);
+ }
+ });
+ u.onProgressUpdate((e)=>{
+ var res = {
+ 'code' : 99999,
+ 'progress' : e.progress
+ }
+ onProgress && onProgress.call(this,res);
+ })
+ })
}
\ No newline at end of file
diff --git a/common/config.js b/common/config.js
index fc858a4..98ecce5 100644
--- a/common/config.js
+++ b/common/config.js
@@ -18,7 +18,7 @@ const getApiUrl = () => uni.getStorageSync("IMApiUrl") || API_URL;
const getWsUrl = () => uni.getStorageSync("IMWsUrl") || WS_URL;
module.exports = {
- cdnUrl:BASE_DOMAIN,
+ cdnUrl:"http://"+BASE_DOMAIN,
version,
getRegisterUrl,
getApiUrl,
diff --git a/pages.json b/pages.json
index 77f7c0e..1fe83db 100644
--- a/pages.json
+++ b/pages.json
@@ -269,22 +269,53 @@
"style": {
"navigationBarTitleText": ""
}
+ },
+ {
+ "path": "pages/workbench/friend-circle/releaseFriendCircle",
+ "style": {
+ "navigationBarTitleText": ""
+ }
+ },
+ {
+ "path": "pages/workbench/friend-circle/chooseLocation",
+ "style": {
+ "navigationBarTitleText": ""
+ }
+ },
+ {
+ "path": "pages/workbench/friend-circle/chooseCircleBgImg",
+ "style": {
+ "navigationBarTitleText": ""
+ }
+ },
+ {
+ "path": "pages/workbench/friend-circle/builtinBgImg",
+ "style": {
+ "navigationBarTitleText": ""
+ }
+ },
+ {
+ "path": "pages/common/userOrGroupQrCode",
+ "style": {
+ "navigationBarTitleText": ""
+ }
}
],
"tabBar": {
"color": "#171717",
"selectedColor": "#07c160",
"borderStyle": "#f4f4f4",
- "backgroundColor": "#f4f4f4",
+ "backgroundColor": "rgba(244,244,244,0.8)",
"height": "55px",
- "list": [{
+ "list": [
+ {
"pagePath": "pages/conversation/conversationList/index",
"iconPath": "./static/images/tabbar/conversation.png",
"selectedIconPath": "static/images/tabbar/conversation_active.png",
"text": "消息"
},
{
- "pagePath": "pages/contact/index/index",
+ "pagePath": "pages/contact/friendList/index",
"iconPath": "./static/images/tabbar/contacts.png",
"selectedIconPath": "static/images/tabbar/contacts_active.png",
"text": "通讯录"
diff --git a/pages/common/userCard/index.vue b/pages/common/userCard/index.vue
index bf620e8..a1b1c31 100644
--- a/pages/common/userCard/index.vue
+++ b/pages/common/userCard/index.vue
@@ -159,7 +159,6 @@
...imData,
...res.data[0],
};
- console.log(info)
}
} catch (e) {
info = {};
diff --git a/pages/contact/applicationList/ApplicationItem.vue b/pages/contact/applicationList/ApplicationItem.vue
index f3bf1e4..3a6b198 100644
--- a/pages/contact/applicationList/ApplicationItem.vue
+++ b/pages/contact/applicationList/ApplicationItem.vue
@@ -1,246 +1,235 @@
-
-
-
-
- {{ getShowName }}
+
+
+
+
+ {{ getShowName }}
-
- 申请加入
- {{ application.groupName }}
-
- {{ application.reqMsg }}
-
+
+ 申请加入
+ {{ application.groupName }}
+
+ {{ application.reqMsg }}
+
-
- {{ getStateStr }}
- 打招呼
-
-
+
+ {{ getStateStr }}
+ 打招呼
+
+
-
-
-
+
+
+
+ .u-list-item:last-child {
+ .bottom_line {
+ height: 0;
+ }
+ }
+
\ No newline at end of file
diff --git a/pages/contact/friendList/index.vue b/pages/contact/friendList/index.vue
index a04efe8..a4c5f1a 100644
--- a/pages/contact/friendList/index.vue
+++ b/pages/contact/friendList/index.vue
@@ -1,93 +1,131 @@
-
-
-
-
-
+
+
+
-
-
-
+
+
+
+ .u-empty {
+ margin-top: 25vh !important;
+ }
+ .contact_menus{
+ ::v-deep .uni-list-item__container{
+ padding: 24rpx 44rpx;
+ }
+ }
+ }
+
\ No newline at end of file
diff --git a/pages/conversation/conversationList/components/ChatHeader.vue b/pages/conversation/conversationList/components/ChatHeader.vue
index 10b379e..5d30610 100644
--- a/pages/conversation/conversationList/components/ChatHeader.vue
+++ b/pages/conversation/conversationList/components/ChatHeader.vue
@@ -1,10 +1,61 @@
@@ -47,6 +85,7 @@
} from "vuex";
import MyAvatar from "@/components/MyAvatar/index.vue";
import IMSDK from "openim-uniapp-polyfill";
+ import util from "@/util";
export default {
name: "ChatHeader",
components: {
@@ -55,28 +94,13 @@
props: {},
data() {
return {
+ searchValue:"",
connectStart: -2,
moreMenuVisible: false,
popMenuPosition: {
top: 0,
right: 0,
- },
- moreMenus: [{
- idx: 1,
- title: "添加好友",
- icon: require("static/images/more_add_friend.png"),
- },
- {
- idx: 2,
- title: "添加群聊",
- icon: require("static/images/more_add_group.png"),
- },
- {
- idx: 3,
- title: "创建群聊",
- icon: require("static/images/more_create_group.png"),
- },
- ],
+ }
};
},
computed: {
@@ -89,6 +113,12 @@
this.unsubscribeAll();
},
methods: {
+ search(){},
+ blur(){},
+ focus(){},
+ input(){},
+ cancel(){},
+ clear(){},
setStateStart() {
this.connectStart = 0;
},
@@ -108,18 +138,20 @@
IMSDK.unsubscribe(IMSDK.IMEvents.OnConnectSuccess, this.setStateSuccess);
IMSDK.unsubscribe(IMSDK.IMEvents.OnConnectFailed, this.setStateError);
},
- clickMenu({idx}) {
- switch (idx) {
- case 1:
- case 2:
+ clickMenu({name}) {
+ switch (name) {
+ case 'createGroup':
+ uni.navigateTo({
+ url: `/pages/common/createGroup/index`,
+ });
+ break;
+ case 'addFriend':
uni.navigateTo({
url: `/pages/common/searchUserOrGroup/index?isSearchGroup=${idx === 2}`,
});
break;
- case 3:
- uni.navigateTo({
- url: `/pages/common/createGroup/index`,
- });
+ case 'scan':
+ util.scan();
break;
default:
break;
@@ -160,9 +192,10 @@
}
.chat_header {
- @include btwBox();
- padding: 36rpx 44rpx;
- margin-top: var(--status-bar-height);
+ @include colBox(true);
+ padding: 36rpx 24rpx 10rpx;
+ //margin-top: var(--status-bar-height);
+ background: #f4f4f4;
.self_info {
@include btwBox();
@@ -249,22 +282,6 @@
display: flex;
position: relative;
- .call_icon {
- margin-right: 24rpx;
-
- image {
- width: 56rpx;
- height: 56rpx;
- }
- }
-
- .more_icon {
- image {
- width: 56rpx;
- height: 56rpx;
- }
- }
-
.more_menu {
position: absolute;
// bottom: 0;
@@ -274,7 +291,7 @@
box-shadow: 0px 0px 6px 2px rgba(0, 0, 0, 0.16);
width: max-content;
border-radius: 12rpx;
- background-color: #fff;
+ background-color: rgba(76 ,76, 76, 0.9);
.menu_item {
display: flex;
@@ -282,13 +299,12 @@
align-items: center;
padding: 20rpx 24rpx;
font-size: 28rpx;
- color: $uni-text-color;
- border-bottom: 1px solid #f0f0f0;
+ color: #fff;
+ //border-bottom: 1px solid #f0f0f0;
- image {
- width: 24px;
- height: 24px;
- margin-right: 24rpx;
+ .uni-icons {
+ margin-right: 16rpx;
+ color: #FFF;
}
&:last-child {
diff --git a/pages/login/index.vue b/pages/login/index.vue
index d13a85a..1ba024d 100644
--- a/pages/login/index.vue
+++ b/pages/login/index.vue
@@ -1,408 +1,386 @@
-
-
-
-
- 欢迎使用{{config.name}}
-
-
-
-
-
-
- +{{ loginInfo.areaCode }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ count !== 0 ? `${count} s` : "获取验证码" }}
-
-
-
-
-
- 忘记密码
- {{ isPwdLogin ? "验证码登录" : "密码登录" }}
-
-
-
- 登录
-
-
+
+
+
+
+ 欢迎使用{{ config.name }}
+
+
+
+
+
+
+ +{{ loginInfo.region }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ count !== 0 ? `${count} s` : "获取验证码" }}
+
+
+
+
+
+ 忘记密码
+ {{ isPwdLogin ? "验证码登录" : "密码登录" }}
+
+
+
+ 登录
+
+
-
-
+
+
-
- 还没有账号?立即注册
- {{ appversion }}
-
-
+
+ 还没有账号?立即注册
+ {{ appversion }}
+
+
\ No newline at end of file
diff --git a/pages/profile/selfInfo/index.vue b/pages/profile/selfInfo/index.vue
index 98a8c2b..45679ec 100644
--- a/pages/profile/selfInfo/index.vue
+++ b/pages/profile/selfInfo/index.vue
@@ -31,6 +31,7 @@
import MyAvatar from "@/components/MyAvatar/index.vue";
import dayjs from "dayjs";
import InfoItem from "./InfoItem.vue";
+ import util from "@/util";
import {
getPurePath
} from "@/util/common";
@@ -71,6 +72,7 @@
},
},
methods: {
+ ...util,
updateNickname() {
uni.navigateTo({
url: `/pages/common/markOrIDPage/index?isSelfNickname=true&sourceInfo=${JSON.stringify(
@@ -124,7 +126,7 @@
},
toQrCode() {
uni.navigateTo({
- url: `/pages/common/userOrGroupQrCode/index`,
+ url: `/pages/common/userOrGroupQrCode`,
});
},
copyID() {
diff --git a/pages/workbench/friend-circle/builtinBgImg.vue b/pages/workbench/friend-circle/builtinBgImg.vue
new file mode 100644
index 0000000..a0cb66c
--- /dev/null
+++ b/pages/workbench/friend-circle/builtinBgImg.vue
@@ -0,0 +1,71 @@
+
+
+
+
+ 设置
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/workbench/friend-circle/chooseCircleBgImg.vue b/pages/workbench/friend-circle/chooseCircleBgImg.vue
new file mode 100644
index 0000000..793e597
--- /dev/null
+++ b/pages/workbench/friend-circle/chooseCircleBgImg.vue
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/workbench/friend-circle/chooseLocation.vue b/pages/workbench/friend-circle/chooseLocation.vue
new file mode 100644
index 0000000..eb4f1db
--- /dev/null
+++ b/pages/workbench/friend-circle/chooseLocation.vue
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/workbench/index/index.vue b/pages/workbench/index/index.vue
index 1be9766..3b4bdbc 100644
--- a/pages/workbench/index/index.vue
+++ b/pages/workbench/index/index.vue
@@ -1,177 +1,56 @@
-
-
-
-
-
-
-
-
- 朋友圈
-
-
- {{vuex_friendCircleUnreadCount}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/static/images/friendCircle/at.png b/static/images/friendCircle/at.png
new file mode 100644
index 0000000..2cc2807
Binary files /dev/null and b/static/images/friendCircle/at.png differ
diff --git a/store/modules/contact.js b/store/modules/contact.js
index 4ff8386..a41e928 100644
--- a/store/modules/contact.js
+++ b/store/modules/contact.js
@@ -40,21 +40,15 @@ const mutations = {
};
const actions = {
- async getFriendList({
- commit
- }) {
+ async getFriendList({commit }) {
let offset = 0;
let friendInfoList = [];
let initialFetch = true;
while (true) {
try {
const count = initialFetch ? 10000 : 1000;
- const {
- data
- } = await IMSDK.asyncApi("getFriendListPage", uuidv4(), {
- offset,
- count,
- });
+ const {data} = await IMSDK.asyncApi("getFriendListPage", uuidv4(), {offset,count,});
+ //console.log(data);
friendInfoList = [
...friendInfoList,
...data,
@@ -68,9 +62,7 @@ const actions = {
}
commit("SET_FRIEND_LIST", friendInfoList);
},
- async getGrouplist({
- commit
- }) {
+ async getGrouplist({commit}) {
let offset = 0;
let groupList = [];
while (true) {
@@ -93,18 +85,14 @@ const actions = {
}
commit("SET_GROUP_LIST", groupList);
},
- getBlacklist({
- commit
- }) {
+ getBlacklist({commit}) {
IMSDK.asyncApi(IMSDK.IMMethods.GetBlackList, uuidv4()).then(({
data
}) => {
commit("SET_BLACK_LIST", data);
});
},
- getRecvFriendApplications({
- commit
- }) {
+ getRecvFriendApplications({commit}) {
IMSDK.asyncApi(
IMSDK.IMMethods.GetFriendApplicationListAsRecipient,
uuidv4(),
@@ -114,9 +102,7 @@ const actions = {
commit("SET_RECV_FRIEND_APPLICATIONS", data);
});
},
- getSentFriendApplications({
- commit
- }) {
+ getSentFriendApplications({ commit }) {
IMSDK.asyncApi(
IMSDK.IMMethods.GetFriendApplicationListAsApplicant,
uuidv4(),
@@ -126,9 +112,7 @@ const actions = {
commit("SET_SENT_FRIEND_APPLICATIONS", data);
});
},
- getRecvGroupApplications({
- commit
- }) {
+ getRecvGroupApplications({ commit }) {
IMSDK.asyncApi(
IMSDK.IMMethods.GetGroupApplicationListAsRecipient,
uuidv4(),
@@ -138,9 +122,7 @@ const actions = {
commit("SET_RECV_GROUP_APPLICATIONS", data);
});
},
- getSentGroupApplications({
- commit
- }) {
+ getSentGroupApplications({ commit }) {
IMSDK.asyncApi(
IMSDK.IMMethods.GetGroupApplicationListAsApplicant,
uuidv4(),
@@ -150,23 +132,14 @@ const actions = {
commit("SET_SENT_GROUP_APPLICATIONS", data);
});
},
- pushNewFriend({
- commit,
- state
- }, friendInfo) {
+ pushNewFriend({ commit, state}, friendInfo) {
const tmpList = [...state.friendList];
const idx = tmpList.findIndex((item) => item.userID === friendInfo.userID);
if (idx === -1) {
commit("SET_FRIEND_LIST", [...tmpList, friendInfo]);
}
},
- updateFriendInfo({
- commit,
- state
- }, {
- friendInfo,
- isRemove = false
- }) {
+ updateFriendInfo({commit,state}, { friendInfo,isRemove = false}) {
const tmpList = [...state.friendList];
const idx = tmpList.findIndex((item) => item.userID === friendInfo.userID);
@@ -181,23 +154,14 @@ const actions = {
commit("SET_FRIEND_LIST", tmpList);
}
},
- pushNewBlack({
- commit,
- state
- }, blackInfo) {
+ pushNewBlack({ commit, state}, blackInfo) {
const tmpList = [...state.blackList];
const idx = tmpList.findIndex((item) => item.userID === blackInfo.userID);
if (idx === -1) {
commit("SET_BLACK_LIST", [...tmpList, blackInfo]);
}
},
- updateBlackInfo({
- commit,
- state
- }, {
- blackInfo,
- isRemove = false
- }) {
+ updateBlackInfo({commit,state}, {blackInfo,isRemove = false}) {
const tmpList = [...state.blackList];
const idx = tmpList.findIndex((item) => item.userID === blackInfo.userID);
@@ -212,24 +176,14 @@ const actions = {
commit("SET_BLACK_LIST", tmpList);
}
},
- pushNewGroup({
- commit,
- state
- }, groupInfo) {
+ pushNewGroup({commit,state}, groupInfo) {
const tmpList = [...state.groupList];
const idx = tmpList.findIndex((item) => item.groupID === groupInfo.groupID);
if (idx === -1) {
commit("SET_GROUP_LIST", [...tmpList, groupInfo]);
}
},
- updateGroupInfo({
- commit,
- state,
- rootState
- }, {
- groupInfo,
- isRemove = false
- }, ) {
+ updateGroupInfo({commit,state,rootState}, {groupInfo,isRemove = false}, ) {
const tmpList = [...state.groupList];
const idx = tmpList.findIndex((item) => item.groupID === groupInfo.groupID);
@@ -250,10 +204,7 @@ const actions = {
commit("SET_GROUP_LIST", tmpList);
}
},
- pushNewRecvFriendApplition({
- commit,
- state
- }, application) {
+ pushNewRecvFriendApplition({commit,state}, application) {
const tmpList = [...state.recvFriendApplications];
const idx = tmpList.findIndex(
(item) => item.fromUserID === application.fromUserID,
@@ -263,14 +214,7 @@ const actions = {
}
commit("SET_RECV_FRIEND_APPLICATIONS", [...tmpList, application]);
},
- updateRecvFriendApplition({
- commit,
- state,
- rootState
- }, {
- application,
- isRemove = false
- }, ) {
+ updateRecvFriendApplition({commit,state,rootState}, {application,isRemove = false}, ) {
const tmpList = [...state.recvFriendApplications];
const idx = tmpList.findIndex(
(item) => item.fromUserID === application.fromUserID,
@@ -287,10 +231,7 @@ const actions = {
commit("SET_RECV_FRIEND_APPLICATIONS", tmpList);
}
},
- pushNewSentFriendApplition({
- commit,
- state
- }, application) {
+ pushNewSentFriendApplition({commit,state}, application) {
const tmpList = [...state.sentFriendApplications];
const idx = tmpList.findIndex(
(item) => item.toUserID === application.toUserID,
@@ -300,14 +241,7 @@ const actions = {
}
commit("SET_SENT_FRIEND_APPLICATIONS", [...tmpList, application]);
},
- updateSentFriendApplition({
- commit,
- state,
- rootState
- }, {
- application,
- isRemove = false
- }, ) {
+ updateSentFriendApplition({commit,state,rootState}, {application,isRemove = false}, ) {
const tmpList = [...state.sentFriendApplications];
const idx = tmpList.findIndex(
(item) => item.toUserID === application.toUserID,
@@ -324,10 +258,7 @@ const actions = {
commit("SET_SENT_FRIEND_APPLICATIONS", tmpList);
}
},
- pushNewRecvGroupApplition({
- commit,
- state
- }, application) {
+ pushNewRecvGroupApplition({commit,state}, application) {
const tmpList = [...state.recvGroupApplications];
const idx = tmpList.findIndex((item) => item.userID === application.userID);
if (idx !== -1) {
@@ -335,14 +266,7 @@ const actions = {
}
commit("SET_RECV_GROUP_APPLICATIONS", [...tmpList, application]);
},
- updateRecvGroupApplition({
- commit,
- state,
- rootState
- }, {
- application,
- isRemove = false
- }, ) {
+ updateRecvGroupApplition({commit,state,rootState}, {application,isRemove = false}, ) {
const tmpList = [...state.recvGroupApplications];
const idx = tmpList.findIndex((item) => item.userID === application.userID);
@@ -357,10 +281,7 @@ const actions = {
commit("SET_RECV_GROUP_APPLICATIONS", tmpList);
}
},
- pushNewSentGroupApplition({
- commit,
- state
- }, application) {
+ pushNewSentGroupApplition({commit,state}, application) {
const tmpList = [...state.sentGroupApplications];
const idx = tmpList.findIndex(
(item) => item.groupID === application.groupID,
@@ -370,14 +291,7 @@ const actions = {
}
commit("SET_SENT_GROUP_APPLICATIONS", [...tmpList, application]);
},
- updateSentGroupApplition({
- commit,
- state,
- rootState
- }, {
- application,
- isRemove = false
- }, ) {
+ updateSentGroupApplition({commit,state,rootState}, {application,isRemove = false}, ) {
const tmpList = [...state.sentGroupApplications];
const idx = tmpList.findIndex(
(item) => item.groupID === application.groupID,
diff --git a/uni.scss b/uni.scss
index 54e31bd..8d641f1 100644
--- a/uni.scss
+++ b/uni.scss
@@ -16,15 +16,13 @@
/* 颜色变量 */
@import "@/uni_modules/uview-ui/theme.scss";
-text {
- // line-height: 1.5;
-}
+// text element line-height can be customized if needed
/* 行为相关颜色 */
-$uni-color-primary: #007aff;
-$uni-color-success: #4cd964;
-$uni-color-warning: #f0ad4e;
-$uni-color-error: #dd524d;
+$uni-color-primary: #997aff;
+$uni-color-success: #07c160;
+$uni-color-warning: #fa9d3b;
+$uni-color-error: #fa5151;
/* 文字基本颜色 */
$uni-text-color: #0c1c33; //基本色
@@ -80,3 +78,4 @@ $uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle: 26px;
$uni-color-paragraph: #3f536e; // 文章段落颜色
$uni-font-size-paragraph: 15px;
+//@import "@/styles/weui-overrides.scss";