7
This commit is contained in:
@@ -314,6 +314,12 @@
|
|||||||
this.$store.dispatch("contact/getSentGroupApplications");
|
this.$store.dispatch("contact/getSentGroupApplications");
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: "/pages/conversation/conversationList/index?isRedirect=true",
|
url: "/pages/conversation/conversationList/index?isRedirect=true",
|
||||||
|
success() {
|
||||||
|
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url:'/pages/workbench/friend-circle/friend-circle'
|
||||||
|
// })
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
getDbDir()
|
getDbDir()
|
||||||
|
|||||||
+41
-33
@@ -1,4 +1,7 @@
|
|||||||
|
import { reject } from "lodash";
|
||||||
|
import config from "@/common/config";
|
||||||
// 登录
|
// 登录
|
||||||
|
|
||||||
export const businessConfig = (params) =>
|
export const businessConfig = (params) =>
|
||||||
uni.$u?.http.post("/common/init", JSON.stringify(params));
|
uni.$u?.http.post("/common/init", JSON.stringify(params));
|
||||||
// 验证是否升级
|
// 验证是否升级
|
||||||
@@ -78,40 +81,45 @@ export const businessSearchUser = (keyword,searchtype) =>
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
export const getArticle = (id,type) =>
|
export const getArticle = (id,type) => uni.$u?.http.post("/article/detail",JSON.stringify({id,type:(type? type : 'id')}));
|
||||||
uni.$u?.http.post(
|
|
||||||
"/article/detail",
|
|
||||||
JSON.stringify({
|
|
||||||
id,
|
|
||||||
type:(type? type : 'id')
|
|
||||||
}), {
|
|
||||||
header: {
|
|
||||||
token: uni.getStorageSync("BusinessToken"),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
);
|
|
||||||
export const getFriendCircle = (page=1,limit=10) =>{
|
export const getFriendCircle = (page=1,limit=10) =>{
|
||||||
uni.$u?.http.get(
|
return uni.$u?.http.get("/friendcircle/list",JSON.stringify({limit:limit,page:page}));
|
||||||
"/friend_circle/list",
|
|
||||||
JSON.stringify({
|
|
||||||
limit:limit,
|
|
||||||
page:page
|
|
||||||
}),
|
|
||||||
{
|
|
||||||
header: {
|
|
||||||
token: uni.getStorageSync("BusinessToken"),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
export const getFriendCircleNewcount = () =>{
|
export const getFriendCircleNewcount = () =>{
|
||||||
uni.$u?.http.get(
|
return uni.$u?.http.get("/friendcircle/newcount");
|
||||||
"/friend_circle/newcount",
|
}
|
||||||
JSON.stringify({}),
|
export const getFriendCircleInfo = () =>{
|
||||||
{
|
return uni.$u?.http.get("/friendcircle/info");
|
||||||
header: {
|
}
|
||||||
token: uni.getStorageSync("BusinessToken"),
|
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);
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
+1
-1
@@ -18,7 +18,7 @@ const getApiUrl = () => uni.getStorageSync("IMApiUrl") || API_URL;
|
|||||||
const getWsUrl = () => uni.getStorageSync("IMWsUrl") || WS_URL;
|
const getWsUrl = () => uni.getStorageSync("IMWsUrl") || WS_URL;
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
cdnUrl:BASE_DOMAIN,
|
cdnUrl:"http://"+BASE_DOMAIN,
|
||||||
version,
|
version,
|
||||||
getRegisterUrl,
|
getRegisterUrl,
|
||||||
getApiUrl,
|
getApiUrl,
|
||||||
|
|||||||
+34
-3
@@ -269,22 +269,53 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": ""
|
"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": {
|
"tabBar": {
|
||||||
"color": "#171717",
|
"color": "#171717",
|
||||||
"selectedColor": "#07c160",
|
"selectedColor": "#07c160",
|
||||||
"borderStyle": "#f4f4f4",
|
"borderStyle": "#f4f4f4",
|
||||||
"backgroundColor": "#f4f4f4",
|
"backgroundColor": "rgba(244,244,244,0.8)",
|
||||||
"height": "55px",
|
"height": "55px",
|
||||||
"list": [{
|
"list": [
|
||||||
|
{
|
||||||
"pagePath": "pages/conversation/conversationList/index",
|
"pagePath": "pages/conversation/conversationList/index",
|
||||||
"iconPath": "./static/images/tabbar/conversation.png",
|
"iconPath": "./static/images/tabbar/conversation.png",
|
||||||
"selectedIconPath": "static/images/tabbar/conversation_active.png",
|
"selectedIconPath": "static/images/tabbar/conversation_active.png",
|
||||||
"text": "消息"
|
"text": "消息"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "pages/contact/index/index",
|
"pagePath": "pages/contact/friendList/index",
|
||||||
"iconPath": "./static/images/tabbar/contacts.png",
|
"iconPath": "./static/images/tabbar/contacts.png",
|
||||||
"selectedIconPath": "static/images/tabbar/contacts_active.png",
|
"selectedIconPath": "static/images/tabbar/contacts_active.png",
|
||||||
"text": "通讯录"
|
"text": "通讯录"
|
||||||
|
|||||||
@@ -159,7 +159,6 @@
|
|||||||
...imData,
|
...imData,
|
||||||
...res.data[0],
|
...res.data[0],
|
||||||
};
|
};
|
||||||
console.log(info)
|
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
info = {};
|
info = {};
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view @click="clickItem" class="application_item">
|
<view @click="clickItem" class="application_item">
|
||||||
<my-avatar
|
<my-avatar :src="getAvatarUrl" :isGroup="isGroupApplication"
|
||||||
:src="getAvatarUrl"
|
:desc="application[isRecv ? 'fromNickname' : 'toNickname']" size="42" />
|
||||||
:isGroup="isGroupApplication"
|
|
||||||
:desc="application[isRecv ? 'fromNickname' : 'toNickname']"
|
|
||||||
size="42"
|
|
||||||
/>
|
|
||||||
<view class="application_item_details">
|
<view class="application_item_details">
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<text class="user_name">{{ getShowName }}</text>
|
<text class="user_name">{{ getShowName }}</text>
|
||||||
@@ -19,18 +15,9 @@
|
|||||||
|
|
||||||
<view class="application_action">
|
<view class="application_action">
|
||||||
<text v-if="showStateStr" class="status_tip">{{ getStateStr }}</text>
|
<text v-if="showStateStr" class="status_tip">{{ getStateStr }}</text>
|
||||||
<text v-if="showGreet" @tap.stop="greetToUser" class="status_tip greet"
|
<text v-if="showGreet" @tap.stop="greetToUser" class="status_tip greet">打招呼</text>
|
||||||
>打招呼</text
|
<button :loading="accessLoading" v-if="showAccept" class="access_btn" @tap.stop="acceptApplication"
|
||||||
>
|
type="primary" :plain="true" size="mini">
|
||||||
<button
|
|
||||||
:loading="accessLoading"
|
|
||||||
v-if="showAccept"
|
|
||||||
class="access_btn"
|
|
||||||
@tap.stop="acceptApplication"
|
|
||||||
type="primary"
|
|
||||||
:plain="true"
|
|
||||||
size="mini"
|
|
||||||
>
|
|
||||||
{{ isGroupApplication ? "同意" : "接受" }}
|
{{ isGroupApplication ? "同意" : "接受" }}
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
@@ -41,10 +28,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { navigateToDesignatedConversation } from "@/util/imCommon";
|
import {
|
||||||
import IMSDK, { SessionType } from "openim-uniapp-polyfill";
|
navigateToDesignatedConversation
|
||||||
import MyAvatar from "@/components/MyAvatar/index.vue";
|
} from "@/util/imCommon";
|
||||||
export default {
|
import IMSDK, {
|
||||||
|
SessionType
|
||||||
|
} from "openim-uniapp-polyfill";
|
||||||
|
import MyAvatar from "@/components/MyAvatar/index.vue";
|
||||||
|
export default {
|
||||||
name: "ApplicationItem",
|
name: "ApplicationItem",
|
||||||
components: {
|
components: {
|
||||||
MyAvatar,
|
MyAvatar,
|
||||||
@@ -114,9 +105,9 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
let sourceID =
|
let sourceID =
|
||||||
this.application.groupID ??
|
this.application.groupID ??
|
||||||
(this.isRecv
|
(this.isRecv ?
|
||||||
? this.application.fromUserID
|
this.application.fromUserID :
|
||||||
: this.application.toUserID);
|
this.application.toUserID);
|
||||||
let cardType = this.isGroupApplication ? "groupCard" : "userCard";
|
let cardType = this.isGroupApplication ? "groupCard" : "userCard";
|
||||||
const url = `/pages/common/${cardType}/index?sourceID=${sourceID}`;
|
const url = `/pages/common/${cardType}/index?sourceID=${sourceID}`;
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@@ -130,8 +121,7 @@ export default {
|
|||||||
if (this.isGroupApplication) {
|
if (this.isGroupApplication) {
|
||||||
func = IMSDK.asyncApi(
|
func = IMSDK.asyncApi(
|
||||||
IMSDK.IMMethods.AcceptGroupApplication,
|
IMSDK.IMMethods.AcceptGroupApplication,
|
||||||
IMSDK.uuid(),
|
IMSDK.uuid(), {
|
||||||
{
|
|
||||||
groupID: this.application.groupID,
|
groupID: this.application.groupID,
|
||||||
fromUserID: this.application.userID,
|
fromUserID: this.application.userID,
|
||||||
handleMsg: "",
|
handleMsg: "",
|
||||||
@@ -140,8 +130,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
func = IMSDK.asyncApi(
|
func = IMSDK.asyncApi(
|
||||||
IMSDK.IMMethods.AcceptFriendApplication,
|
IMSDK.IMMethods.AcceptFriendApplication,
|
||||||
IMSDK.uuid(),
|
IMSDK.uuid(), {
|
||||||
{
|
|
||||||
toUserID: this.application.fromUserID,
|
toUserID: this.application.fromUserID,
|
||||||
handleMsg: "",
|
handleMsg: "",
|
||||||
},
|
},
|
||||||
@@ -159,11 +148,11 @@ export default {
|
|||||||
).catch(() => uni.$u.toast("获取会话信息失败"));
|
).catch(() => uni.$u.toast("获取会话信息失败"));
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.application_item {
|
.application_item {
|
||||||
// @include vCenterBox();
|
// @include vCenterBox();
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
@@ -236,11 +225,11 @@ export default {
|
|||||||
bottom: -24rpx;
|
bottom: -24rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.u-list-item:last-child {
|
.u-list-item:last-child {
|
||||||
.bottom_line {
|
.bottom_line {
|
||||||
height: 0;
|
height: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,36 +1,41 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="friend_list_container">
|
<view class="friend_list_container">
|
||||||
<custom-nav-bar title="我的好友" />
|
<view class="header">
|
||||||
<view class="search_bar_wrap">
|
<uni-nav-bar
|
||||||
<u-search
|
right-icon="plus"
|
||||||
class="search_bar"
|
@clickRight="contactAddClick"
|
||||||
shape="square"
|
:border="false"
|
||||||
placeholder="搜索"
|
title="通讯录"
|
||||||
:showAction="false"
|
backgroundColor="transparent"
|
||||||
disabled
|
>
|
||||||
/>
|
</uni-nav-bar>
|
||||||
|
<SearchbarPlace>搜索</SearchbarPlace>
|
||||||
</view>
|
</view>
|
||||||
|
<uni-list class="contact_menus">
|
||||||
|
<uni-list-item title="新的好友" :showBadge="storeUnHandleFriendApplicationNum>0" :badgeText="storeUnHandleFriendApplicationNum+''" badgeType="error" thumbSize="lg" to="/pages/contact/applicationList/index?applicationType=NewFriend" thumb="/static/images/contact_new_friend.png"></uni-list-item>
|
||||||
|
<uni-list-item title="新的群组" thumbSize="lg" to="/pages/contact/applicationList/index?applicationType=NewGroup" thumb="/static/images/contact_new_group.png"></uni-list-item>
|
||||||
|
<uni-list-item title="群聊" thumbSize="lg" to="/pages/contact/groupList/index" thumb="/static/images/contact_my_group.png"></uni-list-item>
|
||||||
|
</uni-list>
|
||||||
|
|
||||||
<choose-index-list
|
<choose-index-list v-if="getIndexData.dataList.length > 0" @itemClick="userClick" :height="`${listHeight}px`"
|
||||||
v-if="getIndexData.dataList.length > 0"
|
:indexList="getIndexData.indexList" :itemArr="getIndexData.dataList" />
|
||||||
@itemClick="userClick"
|
|
||||||
:height="`${listHeight}px`"
|
|
||||||
:indexList="getIndexData.indexList"
|
|
||||||
:itemArr="getIndexData.dataList"
|
|
||||||
/>
|
|
||||||
<u-empty v-else mode="list" />
|
<u-empty v-else mode="list" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from "vuex";
|
import {mapGetters,mapActions} from "vuex";
|
||||||
import { formatChooseData } from "@/util/common";
|
import {formatChooseData} from "@/util/common";
|
||||||
import CustomNavBar from "@/components/CustomNavBar/index.vue";
|
import CustomNavBar from "@/components/CustomNavBar/index.vue";
|
||||||
import ChooseIndexList from "@/components/ChooseIndexList/index.vue";
|
import SearchbarPlace from "@/components/searchbar_place.vue";
|
||||||
export default {
|
import ChooseIndexList from "@/components/ChooseIndexList/index.vue";
|
||||||
|
import ContactMenus from "../index/components/ContactMenus.vue";
|
||||||
|
export default {
|
||||||
components: {
|
components: {
|
||||||
CustomNavBar,
|
CustomNavBar,
|
||||||
ChooseIndexList,
|
ChooseIndexList,
|
||||||
|
ContactMenus,
|
||||||
|
SearchbarPlace
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -39,7 +44,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(["storeFriendList"]),
|
...mapGetters(["storeFriendList",'storeUnHandleFriendApplicationNum']),
|
||||||
getIndexData() {
|
getIndexData() {
|
||||||
return formatChooseData(this.storeFriendList);
|
return formatChooseData(this.storeFriendList);
|
||||||
},
|
},
|
||||||
@@ -47,7 +52,25 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.getListHeight();
|
this.getListHeight();
|
||||||
},
|
},
|
||||||
|
async onShow() {
|
||||||
|
await this.getFriendList();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapActions('contact',['getFriendList']),
|
||||||
|
clear(){},
|
||||||
|
cancel(){},
|
||||||
|
input(){},
|
||||||
|
search() {},
|
||||||
|
contactAddClick() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/contact/contactAdd/index",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
goto(url){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: url,
|
||||||
|
});
|
||||||
|
},
|
||||||
userClick(friend) {
|
userClick(friend) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/common/userCard/index?sourceID=${friend.userID}`,
|
url: `/pages/common/userCard/index?sourceID=${friend.userID}`,
|
||||||
@@ -55,13 +78,19 @@ export default {
|
|||||||
},
|
},
|
||||||
async getListHeight() {
|
async getListHeight() {
|
||||||
const windowInfo = uni.getWindowInfo();
|
const windowInfo = uni.getWindowInfo();
|
||||||
const data = await this.getEl(".search_bar_wrap");
|
//const data = await this.getEl(".search_bar_wrap");
|
||||||
const searchBarHeight = Number(data.height.toFixed());
|
const contact_menus = await this.getEl(".contact_menus");
|
||||||
|
const header = await this.getEl(".header");
|
||||||
|
|
||||||
|
//const searchBarHeight = Number(data.height.toFixed());
|
||||||
|
const contact_menusHeight = contact_menusHeight ? Number(contact_menus.height.toFixed()) : 0;
|
||||||
|
const headerBarHeight = header ? Number(header.height.toFixed()) : 0;
|
||||||
this.listHeight =
|
this.listHeight =
|
||||||
windowInfo.windowHeight -
|
windowInfo.windowHeight -
|
||||||
windowInfo.statusBarHeight -
|
windowInfo.statusBarHeight -
|
||||||
44 -
|
44 -
|
||||||
searchBarHeight;
|
contact_menusHeight -
|
||||||
|
headerBarHeight;
|
||||||
},
|
},
|
||||||
getEl(el) {
|
getEl(el) {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
@@ -76,11 +105,15 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.friend_list_container {
|
.friend_list_container {
|
||||||
|
padding-top: 36rpx;
|
||||||
|
.header{
|
||||||
|
background-color: #f4f4f4;
|
||||||
|
}
|
||||||
.search_bar_wrap {
|
.search_bar_wrap {
|
||||||
height: 34px;
|
height: 34px;
|
||||||
padding: 12px 22px;
|
padding: 12px 22px;
|
||||||
@@ -89,5 +122,10 @@ export default {
|
|||||||
.u-empty {
|
.u-empty {
|
||||||
margin-top: 25vh !important;
|
margin-top: 25vh !important;
|
||||||
}
|
}
|
||||||
}
|
.contact_menus{
|
||||||
|
::v-deep .uni-list-item__container{
|
||||||
|
padding: 24rpx 44rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,10 +1,61 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="chat_header">
|
<view class="chat_header">
|
||||||
<view class="self_info">
|
<uni-nav-bar
|
||||||
<my-avatar :src="storeSelfInfo.faceURL" :desc="storeSelfInfo.nickname" size="46" />
|
right-icon="plus"
|
||||||
|
@clickRight="showMore"
|
||||||
|
:border="false"
|
||||||
|
title="标题"
|
||||||
|
backgroundColor="transparent"
|
||||||
|
>
|
||||||
|
<template #right>
|
||||||
|
<uni-icons type="plus" size="26" class="more_icon"></uni-icons>
|
||||||
|
</template>
|
||||||
|
</uni-nav-bar>
|
||||||
|
<view class="right_action">
|
||||||
|
<u-overlay :show="moreMenuVisible" @click="moreMenuVisible = false" opacity="0">
|
||||||
|
<view :style="{ top: popMenuPosition.top, right: popMenuPosition.right }" class="more_menu">
|
||||||
|
<view @click="clickMenu({name:'createGroup'})" class="menu_item">
|
||||||
|
<uni-icons size="24" color="#FFF" type="chat"></uni-icons>
|
||||||
|
<text>创建群聊</text>
|
||||||
|
</view>
|
||||||
|
<view @click="clickMenu({name:'addFriend'})" class="menu_item">
|
||||||
|
<uni-icons size="24" color="#FFF" type="personadd"></uni-icons>
|
||||||
|
<text>添加好友</text>
|
||||||
|
</view>
|
||||||
|
<view @click="clickMenu({name:'createGroup'})" class="menu_item">
|
||||||
|
<uni-icons size="24" color="#FFF" type="scan"></uni-icons>
|
||||||
|
<text>扫一扫</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</u-overlay>
|
||||||
|
</view>
|
||||||
|
<uni-search-bar @confirm="search" :focus="false" bgColor="#fff"
|
||||||
|
placeholder="请输入您要搜索的内容"
|
||||||
|
v-model="searchValue" @input="input"
|
||||||
|
@cancel="cancel" @clear="clear">
|
||||||
|
</uni-search-bar>
|
||||||
|
<view class="status_notice">
|
||||||
|
<view class="tag" v-if="storeIsSyncing">
|
||||||
|
<img class="loading" style="height: 24rpx; width: 24rpx" src="static/images/loading.png"
|
||||||
|
alt="" />
|
||||||
|
<text class="status">同步中</text>
|
||||||
|
</view>
|
||||||
|
<view class="tag" v-if="connectStart == 0">
|
||||||
|
<img class="loading" style="height: 24rpx; width: 24rpx" src="static/images/loading.png"
|
||||||
|
alt="" />
|
||||||
|
<text class="status">连接中</text>
|
||||||
|
</view>
|
||||||
|
<view class="err-tag" v-if="connectStart == -1">
|
||||||
|
<img style="height: 24rpx; width: 24rpx" src="static/images/sync_error.png" alt="" />
|
||||||
|
<text class="status">连接失败</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="self_info" v-if="1==2">
|
||||||
|
<my-avatar :src="storeSelfInfo.faceURL" :desc="storeSelfInfo.nickname || storeSelfInfo.remark" size="46" />
|
||||||
<view class="self_info_desc">
|
<view class="self_info_desc">
|
||||||
<view class="user_state">
|
<view class="user_state">
|
||||||
<text class="nickname">{{ storeSelfInfo.nickname }}</text>
|
<text class="nickname">{{ storeSelfInfo.nickname || storeSelfInfo.remark }}</text>
|
||||||
<view v-if="!storeReinstall">
|
<view v-if="!storeReinstall">
|
||||||
<view class="tag" v-if="storeIsSyncing">
|
<view class="tag" v-if="storeIsSyncing">
|
||||||
<img class="loading" style="height: 24rpx; width: 24rpx" src="static/images/loading.png"
|
<img class="loading" style="height: 24rpx; width: 24rpx" src="static/images/loading.png"
|
||||||
@@ -24,20 +75,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right_action">
|
|
||||||
<view class="call_icon"> </view>
|
|
||||||
<view @click="showMore" class="more_icon">
|
|
||||||
<image src="@/static/images/common_circle_add.png"></image>
|
|
||||||
</view>
|
|
||||||
<u-overlay :show="moreMenuVisible" @click="moreMenuVisible = false" opacity="0">
|
|
||||||
<view :style="{ top: popMenuPosition.top, right: popMenuPosition.right }" class="more_menu">
|
|
||||||
<view @click="clickMenu(item)" v-for="item in moreMenus" :key="item.idx" class="menu_item">
|
|
||||||
<image :src="item.icon" mode=""></image>
|
|
||||||
<text>{{ item.title }}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</u-overlay>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -47,6 +85,7 @@
|
|||||||
} from "vuex";
|
} from "vuex";
|
||||||
import MyAvatar from "@/components/MyAvatar/index.vue";
|
import MyAvatar from "@/components/MyAvatar/index.vue";
|
||||||
import IMSDK from "openim-uniapp-polyfill";
|
import IMSDK from "openim-uniapp-polyfill";
|
||||||
|
import util from "@/util";
|
||||||
export default {
|
export default {
|
||||||
name: "ChatHeader",
|
name: "ChatHeader",
|
||||||
components: {
|
components: {
|
||||||
@@ -55,28 +94,13 @@
|
|||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
searchValue:"",
|
||||||
connectStart: -2,
|
connectStart: -2,
|
||||||
moreMenuVisible: false,
|
moreMenuVisible: false,
|
||||||
popMenuPosition: {
|
popMenuPosition: {
|
||||||
top: 0,
|
top: 0,
|
||||||
right: 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: {
|
computed: {
|
||||||
@@ -89,6 +113,12 @@
|
|||||||
this.unsubscribeAll();
|
this.unsubscribeAll();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
search(){},
|
||||||
|
blur(){},
|
||||||
|
focus(){},
|
||||||
|
input(){},
|
||||||
|
cancel(){},
|
||||||
|
clear(){},
|
||||||
setStateStart() {
|
setStateStart() {
|
||||||
this.connectStart = 0;
|
this.connectStart = 0;
|
||||||
},
|
},
|
||||||
@@ -108,18 +138,20 @@
|
|||||||
IMSDK.unsubscribe(IMSDK.IMEvents.OnConnectSuccess, this.setStateSuccess);
|
IMSDK.unsubscribe(IMSDK.IMEvents.OnConnectSuccess, this.setStateSuccess);
|
||||||
IMSDK.unsubscribe(IMSDK.IMEvents.OnConnectFailed, this.setStateError);
|
IMSDK.unsubscribe(IMSDK.IMEvents.OnConnectFailed, this.setStateError);
|
||||||
},
|
},
|
||||||
clickMenu({idx}) {
|
clickMenu({name}) {
|
||||||
switch (idx) {
|
switch (name) {
|
||||||
case 1:
|
case 'createGroup':
|
||||||
case 2:
|
uni.navigateTo({
|
||||||
|
url: `/pages/common/createGroup/index`,
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 'addFriend':
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/common/searchUserOrGroup/index?isSearchGroup=${idx === 2}`,
|
url: `/pages/common/searchUserOrGroup/index?isSearchGroup=${idx === 2}`,
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 'scan':
|
||||||
uni.navigateTo({
|
util.scan();
|
||||||
url: `/pages/common/createGroup/index`,
|
|
||||||
});
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -160,9 +192,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.chat_header {
|
.chat_header {
|
||||||
@include btwBox();
|
@include colBox(true);
|
||||||
padding: 36rpx 44rpx;
|
padding: 36rpx 24rpx 10rpx;
|
||||||
margin-top: var(--status-bar-height);
|
//margin-top: var(--status-bar-height);
|
||||||
|
background: #f4f4f4;
|
||||||
|
|
||||||
.self_info {
|
.self_info {
|
||||||
@include btwBox();
|
@include btwBox();
|
||||||
@@ -249,22 +282,6 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.call_icon {
|
|
||||||
margin-right: 24rpx;
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 56rpx;
|
|
||||||
height: 56rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.more_icon {
|
|
||||||
image {
|
|
||||||
width: 56rpx;
|
|
||||||
height: 56rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.more_menu {
|
.more_menu {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
// bottom: 0;
|
// bottom: 0;
|
||||||
@@ -274,7 +291,7 @@
|
|||||||
box-shadow: 0px 0px 6px 2px rgba(0, 0, 0, 0.16);
|
box-shadow: 0px 0px 6px 2px rgba(0, 0, 0, 0.16);
|
||||||
width: max-content;
|
width: max-content;
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
background-color: #fff;
|
background-color: rgba(76 ,76, 76, 0.9);
|
||||||
|
|
||||||
.menu_item {
|
.menu_item {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -282,13 +299,12 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 20rpx 24rpx;
|
padding: 20rpx 24rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: $uni-text-color;
|
color: #fff;
|
||||||
border-bottom: 1px solid #f0f0f0;
|
//border-bottom: 1px solid #f0f0f0;
|
||||||
|
|
||||||
image {
|
.uni-icons {
|
||||||
width: 24px;
|
margin-right: 16rpx;
|
||||||
height: 24px;
|
color: #FFF;
|
||||||
margin-right: 24rpx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
|
|||||||
+35
-57
@@ -3,9 +3,9 @@
|
|||||||
<view class="login">
|
<view class="login">
|
||||||
<view class="logo">
|
<view class="logo">
|
||||||
<img src="static/images/logo.png" alt="" />
|
<img src="static/images/logo.png" alt="" />
|
||||||
<view class="title">欢迎使用{{config.name}}</view>
|
<view class="title">欢迎使用{{ config.name }}</view>
|
||||||
</view>
|
</view>
|
||||||
<u-tabs :list="list" :current="active" @click="click"></u-tabs>
|
<u-tabs v-if="1 == 2" :list="list" :current="active" @click="click"></u-tabs>
|
||||||
<u-form class="loginForm" labelPosition="top" :model="loginInfo" :labelStyle="{
|
<u-form class="loginForm" labelPosition="top" :model="loginInfo" :labelStyle="{
|
||||||
fontSize: '14px',
|
fontSize: '14px',
|
||||||
marginTop: '20rpx',
|
marginTop: '20rpx',
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
<u-form-item v-if="active === 0" label="" prop="phoneNumber">
|
<u-form-item v-if="active === 0" label="" prop="phoneNumber">
|
||||||
<u-input v-model="loginInfo.phoneNumber" border="surround" placeholder="请输入手机号码" clearable>
|
<u-input v-model="loginInfo.phoneNumber" border="surround" placeholder="请输入手机号码" clearable>
|
||||||
<view slot="prefix" class="phoneNumber_areacode" @click="showPicker">
|
<view slot="prefix" class="phoneNumber_areacode" @click="showPicker">
|
||||||
<text class="areacode_content">+{{ loginInfo.areaCode }}</text>
|
<text class="areacode_content">+{{ loginInfo.region }}</text>
|
||||||
<u-icon class="arrow_down" name="arrow-down"></u-icon>
|
<u-icon class="arrow_down" name="arrow-down"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</u-input>
|
</u-input>
|
||||||
@@ -59,18 +59,18 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from "vuex";
|
import { mapGetters } from "vuex";
|
||||||
import { v4 as uuidv4 } from "uuid";
|
import { v4 as uuidv4 } from "uuid";
|
||||||
import md5 from "md5";
|
import md5 from "md5";
|
||||||
import { businessLogin, businessSendSms } from "@/api/login";
|
import { businessLogin, businessSendSms } from "@/api/login";
|
||||||
import AreaPicker from "@/components/AreaPicker";
|
import AreaPicker from "@/components/AreaPicker";
|
||||||
import { checkLoginError } from "@/util/common";
|
import { checkLoginError } from "@/util/common";
|
||||||
import { SmsUserFor } from "@/constant";
|
import { SmsUserFor } from "@/constant";
|
||||||
import IMSDK from "openim-uniapp-polyfill";
|
import IMSDK from "openim-uniapp-polyfill";
|
||||||
|
|
||||||
let timer;
|
let timer;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
AreaPicker,
|
AreaPicker,
|
||||||
},
|
},
|
||||||
@@ -85,15 +85,15 @@
|
|||||||
email: "",
|
email: "",
|
||||||
phoneNumber: "",
|
phoneNumber: "",
|
||||||
password: "",
|
password: "",
|
||||||
areaCode: "86",
|
region: "86",
|
||||||
verificationCode: "",
|
verificationCode: "",
|
||||||
},
|
},
|
||||||
appversion:0,
|
appversion: 0,
|
||||||
eying: false,
|
eying: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
count: 0,
|
count: 0,
|
||||||
isPwdLogin: true,
|
isPwdLogin: true,
|
||||||
active: 1,
|
active: 0,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
const _this = this;
|
const _this = this;
|
||||||
plus.runtime.getProperty(plus.runtime.appid,(inf) => {
|
plus.runtime.getProperty(plus.runtime.appid, (inf) => {
|
||||||
console.log(inf);
|
console.log(inf);
|
||||||
_this.appversion = inf.version
|
_this.appversion = inf.version
|
||||||
});
|
});
|
||||||
@@ -117,14 +117,14 @@
|
|||||||
this.init();
|
this.init();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
click({index}) {
|
click({ index }) {
|
||||||
this.active = index;
|
this.active = index;
|
||||||
},
|
},
|
||||||
copy() {
|
copy() {
|
||||||
uni.setClipboardData({
|
uni.setClipboardData({
|
||||||
showToast: false,
|
showToast: false,
|
||||||
data: version,
|
data: version,
|
||||||
success: function() {
|
success: function () {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: "none",
|
icon: "none",
|
||||||
title: "复制成功",
|
title: "复制成功",
|
||||||
@@ -133,11 +133,11 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
this.loginInfo.areaCode = uni.getStorageSync("last_areaCode") || "86";
|
this.loginInfo.region = uni.getStorageSync("last_areaCode") || "86";
|
||||||
this.loginInfo.email = uni.getStorageSync("last_email") || "";
|
this.loginInfo.email = uni.getStorageSync("last_email") || "";
|
||||||
this.loginInfo.phoneNumber = uni.getStorageSync("last_phoneNumber") || "";
|
this.loginInfo.phoneNumber = uni.getStorageSync("last_phoneNumber") || "";
|
||||||
|
|
||||||
if(process.env.NODE_ENV == 'development'){
|
if (process.env.NODE_ENV == 'development') {
|
||||||
this.loginInfo.email = "commiu@outlook.com";
|
this.loginInfo.email = "commiu@outlook.com";
|
||||||
this.loginInfo.password = "qwe123";
|
this.loginInfo.password = "qwe123";
|
||||||
}
|
}
|
||||||
@@ -159,13 +159,13 @@
|
|||||||
data = await businessLogin({
|
data = await businessLogin({
|
||||||
mobile: this.loginInfo.phoneNumber,
|
mobile: this.loginInfo.phoneNumber,
|
||||||
email: this.loginInfo.email,
|
email: this.loginInfo.email,
|
||||||
areaCode: `+${this.loginInfo.areaCode}`,
|
region: `+${this.loginInfo.region}`,
|
||||||
password: this.isPwdLogin ? md5(this.loginInfo.password) : "",
|
password: this.isPwdLogin ? md5(this.loginInfo.password) : "",
|
||||||
platform: uni.$u.os(),
|
platform: uni.$u.os(),
|
||||||
type: this.active === 0 ? 'mobile' : 'email',
|
type: this.active === 0 ? 'mobile' : 'email',
|
||||||
code: this.loginInfo.verificationCode,
|
code: this.loginInfo.verificationCode,
|
||||||
});
|
});
|
||||||
const {imToken,userID} = data;
|
const { imToken, userID } = data;
|
||||||
await IMSDK.asyncApi(IMSDK.IMMethods.Login, uuidv4(), {
|
await IMSDK.asyncApi(IMSDK.IMMethods.Login, uuidv4(), {
|
||||||
userID,
|
userID,
|
||||||
token: imToken,
|
token: imToken,
|
||||||
@@ -194,43 +194,21 @@
|
|||||||
// });
|
// });
|
||||||
},
|
},
|
||||||
saveLoginProfile(data) {
|
saveLoginProfile(data) {
|
||||||
const {
|
const { imToken, token, userID } = data;
|
||||||
imToken,
|
uni.setStorage({ key: "IMUserID", data: userID, });
|
||||||
token,
|
uni.setStorage({ key: "IMToken", data: imToken, });
|
||||||
userID
|
uni.setStorage({ key: "BusinessToken", data: token, });
|
||||||
} = data;
|
|
||||||
uni.setStorage({
|
|
||||||
key: "IMUserID",
|
|
||||||
data: userID,
|
|
||||||
});
|
|
||||||
uni.setStorage({
|
|
||||||
key: "IMToken",
|
|
||||||
data: imToken,
|
|
||||||
});
|
|
||||||
uni.setStorage({
|
|
||||||
key: "BusinessToken",
|
|
||||||
data: token,
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
saveLoginInfo() {
|
saveLoginInfo() {
|
||||||
uni.setStorage({
|
uni.setStorage({key: "last_areaCode",data: this.loginInfo.region,});
|
||||||
key: "last_areaCode",
|
uni.setStorage({key: "last_phoneNumber",data: this.loginInfo.phoneNumber,});
|
||||||
data: this.loginInfo.areaCode,
|
uni.setStorage({key: "last_email",data: this.loginInfo.email,});
|
||||||
});
|
|
||||||
uni.setStorage({
|
|
||||||
key: "last_phoneNumber",
|
|
||||||
data: this.loginInfo.phoneNumber,
|
|
||||||
});
|
|
||||||
uni.setStorage({
|
|
||||||
key: "last_email",
|
|
||||||
data: this.loginInfo.email,
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
showPicker() {
|
showPicker() {
|
||||||
this.$refs.AreaPicker.init();
|
this.$refs.AreaPicker.init();
|
||||||
},
|
},
|
||||||
chooseArea(areaCode) {
|
chooseArea(areaCode) {
|
||||||
this.loginInfo.areaCode = areaCode;
|
this.loginInfo.region = areaCode;
|
||||||
},
|
},
|
||||||
toggleLoginMethod() {
|
toggleLoginMethod() {
|
||||||
this.isPwdLogin = !this.isPwdLogin;
|
this.isPwdLogin = !this.isPwdLogin;
|
||||||
@@ -247,7 +225,7 @@
|
|||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
phoneNumber: this.loginInfo.phoneNumber,
|
phoneNumber: this.loginInfo.phoneNumber,
|
||||||
areaCode: `+${this.loginInfo.areaCode}`,
|
region: `+${this.loginInfo.region}`,
|
||||||
usedFor: SmsUserFor.Login,
|
usedFor: SmsUserFor.Login,
|
||||||
operationID: Date.now() + "",
|
operationID: Date.now() + "",
|
||||||
};
|
};
|
||||||
@@ -273,10 +251,10 @@
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.page_container {
|
.page_container {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.login {
|
.login {
|
||||||
@@ -404,5 +382,5 @@
|
|||||||
transform: scale(0.5, 0.8);
|
transform: scale(0.5, 0.8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -31,6 +31,7 @@
|
|||||||
import MyAvatar from "@/components/MyAvatar/index.vue";
|
import MyAvatar from "@/components/MyAvatar/index.vue";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import InfoItem from "./InfoItem.vue";
|
import InfoItem from "./InfoItem.vue";
|
||||||
|
import util from "@/util";
|
||||||
import {
|
import {
|
||||||
getPurePath
|
getPurePath
|
||||||
} from "@/util/common";
|
} from "@/util/common";
|
||||||
@@ -71,6 +72,7 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...util,
|
||||||
updateNickname() {
|
updateNickname() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/common/markOrIDPage/index?isSelfNickname=true&sourceInfo=${JSON.stringify(
|
url: `/pages/common/markOrIDPage/index?isSelfNickname=true&sourceInfo=${JSON.stringify(
|
||||||
@@ -124,7 +126,7 @@
|
|||||||
},
|
},
|
||||||
toQrCode() {
|
toQrCode() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/common/userOrGroupQrCode/index`,
|
url: `/pages/common/userOrGroupQrCode`,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
copyID() {
|
copyID() {
|
||||||
|
|||||||
@@ -0,0 +1,71 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<u-navbar title="选择背景图" :background="{ background: '#ffffff'}"
|
||||||
|
:border-bottom="false">
|
||||||
|
<view class="slot-wrap" slot="right">
|
||||||
|
<u-button :custom-style="customBtnStyle" size="mini" :disabled="submitFlag"
|
||||||
|
:type="submitFlag?'info ':'success'" @click="handleLink()">设置</u-button>
|
||||||
|
</view>
|
||||||
|
</u-navbar>
|
||||||
|
<u-grid @click="clickGrid">
|
||||||
|
<u-grid-item v-for="(item, index) in bgList" :key="index" :index="index" :custom-style="item.isCheck?girdItemCustomStyle:{}">
|
||||||
|
<u-image :src="item.src" width="200rpx" height="200rpx" mode="aspectFill"></u-image>
|
||||||
|
</u-grid-item>
|
||||||
|
</u-grid>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
bgList:[],
|
||||||
|
customBtnStyle: {
|
||||||
|
fontSize: '30rpx',
|
||||||
|
padding: '28rpx',
|
||||||
|
width:'100rpx'
|
||||||
|
},
|
||||||
|
submitFlag:true,
|
||||||
|
girdItemCustomStyle:{
|
||||||
|
backgroundColor:'#71d5a1',
|
||||||
|
// maring:'0rpx',
|
||||||
|
padding:'20rpx'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
clickGrid(index){
|
||||||
|
this.bgList.forEach((item,i)=>{
|
||||||
|
if(index == i) item.isCheck = !item.isCheck;
|
||||||
|
else item.isCheck = false;
|
||||||
|
})
|
||||||
|
this.submitFlag=false;
|
||||||
|
},
|
||||||
|
|
||||||
|
//处理跳转逻辑
|
||||||
|
handleLink(){
|
||||||
|
const item = this.bgList.find(it=>it.isCheck);
|
||||||
|
if(item){
|
||||||
|
this.$u.vuex('circleBgImg', item.src);
|
||||||
|
uni.navigateBack({
|
||||||
|
delta:2
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.bgList = JSON.parse(JSON.stringify(this.circleBgList))
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.content {
|
||||||
|
.slot-wrap {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<u-cell-group>
|
||||||
|
<u-cell-item title="选择内置背景图" :title-style="titleStyle"
|
||||||
|
:border-bottom="false" :border-top="false"
|
||||||
|
@click="linkToBuiltinBgImg"></u-cell-item>
|
||||||
|
</u-cell-group>
|
||||||
|
<u-gap :height="16" bg-color="#f4f4f5"></u-gap>
|
||||||
|
<u-cell-group>
|
||||||
|
<u-cell-item title="通过手机选择" :title-style="titleStyle"
|
||||||
|
:border-bottom="false" :border-top="false"
|
||||||
|
@click="chooseImg"></u-cell-item>
|
||||||
|
</u-cell-group>
|
||||||
|
|
||||||
|
<u-toast ref="uToast" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
titleStyle:{
|
||||||
|
marginLeft:"20rpx",
|
||||||
|
fontSize:"32rpx",
|
||||||
|
color:"#000000"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
chooseImg() {
|
||||||
|
let that=this;
|
||||||
|
uni.chooseImage({
|
||||||
|
count: 1, //默认9
|
||||||
|
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||||
|
sourceType: ['camera','album'], //从相册选择
|
||||||
|
success: function(res) {
|
||||||
|
console.log("res",res);
|
||||||
|
let tempFilePaths = res.tempFilePaths;
|
||||||
|
that.myUpload(tempFilePaths[0]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
},
|
||||||
|
|
||||||
|
//上传返回图片
|
||||||
|
myUpload(filePath) {
|
||||||
|
let that=this;
|
||||||
|
let obj = {
|
||||||
|
filePath:filePath,
|
||||||
|
savePath: "friendCircle" //文件存放目录
|
||||||
|
}
|
||||||
|
console.log("通过手机选择",obj);
|
||||||
|
this.globalUtil.globalUpload(that,{
|
||||||
|
param:obj,
|
||||||
|
success: (res1) => {
|
||||||
|
console.log("上传成功",res1);
|
||||||
|
let avatar= res1.result.url;
|
||||||
|
that.$u.vuex('circleBgImg',avatar);
|
||||||
|
uni.navigateBack();
|
||||||
|
},
|
||||||
|
fail:(res1) => {
|
||||||
|
console.log("上传失败",res1);
|
||||||
|
},
|
||||||
|
complete: (res1) => {
|
||||||
|
console.log("上传完成",res1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
linkToBuiltinBgImg() {
|
||||||
|
this.$u.route('/pages/tabbar/find/friend-circle/builtinBgImg');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style></style>
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<template>
|
||||||
|
<view class="locationContainer">
|
||||||
|
<view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.locationContainer{
|
||||||
|
padding: 20rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
+30
-228
@@ -1,177 +1,56 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<u-navbar :is-back="false" title="发现" :background="{ background: '#f4f4f5' }" title-color="#404133"
|
<uni-nav-bar title="发现" background-color="transparent"></uni-nav-bar>
|
||||||
:title-bold="true" title-size="34" :border-bottom="false" z-index="1001">
|
<uni-list>
|
||||||
</u-navbar>
|
<uni-list-item title="朋友圈"
|
||||||
<view style="background-color: #FFFFFF;">
|
thumb="/static/images/workbench/01.png"
|
||||||
<view>
|
:thumbSize="thumbSize"
|
||||||
<u-cell-item title="" :title-style="titleStyle" :border-bottom="showBorder(0)" :border-top="false"
|
showArrow
|
||||||
@tap="linkTo(cellList[0])">
|
to="/pages/workbench/friend-circle/friend-circle">
|
||||||
<u-icon class="u-m-r-10" slot="icon" name="/static/image/workbench/01.png" color="inherit" :size="44"></u-icon>
|
<view slot="footer" v-if="newCircleInfo&&newCircleInfo.userHeadImg.length>0">
|
||||||
<view slot="title" class="u-flex u-row-left u-col-center" style="min-width: 200rpx;">
|
|
||||||
<view class="u-m-r-20">
|
|
||||||
<text>朋友圈</text>
|
|
||||||
</view>
|
|
||||||
<view class="u-flex u-row-center u-col-center" v-if="vuex_friendCircleUnreadCount>0"
|
|
||||||
style="width:36rpx;height:36rpx;background-color:#fa3534;border-radius:18rpx;font-size:28rpx;color: #ffffff;">
|
|
||||||
<text>{{vuex_friendCircleUnreadCount}}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view slot="right-icon" v-if="newCircleInfo&&newCircleInfo.userHeadImg.length>0">
|
|
||||||
<u-avatar :src="newCircleInfo.userHeadImg" mode="square" :size="70"></u-avatar>
|
<u-avatar :src="newCircleInfo.userHeadImg" mode="square" :size="70"></u-avatar>
|
||||||
<u-badge :is-dot="true" type="error" :offset="[20,60]"></u-badge>
|
<u-badge :is-dot="true" type="error" :offset="[20,60]"></u-badge>
|
||||||
</view>
|
</view>
|
||||||
</u-cell-item>
|
</uni-list-item>
|
||||||
<u-gap :height="16" bg-color="#f4f4f5" v-if="showGap(0)"></u-gap>
|
</uni-list>
|
||||||
</view>
|
<u-gap :height="10"></u-gap>
|
||||||
|
<uni-list>
|
||||||
|
<uni-list-item title="扫一扫" thumb="/static/images/workbench/03.png" :thumbSize="thumbSize" to="/pages/workbench/friend-circle/friend-circle" showArrow></uni-list-item>
|
||||||
<view v-for="(item,index) in cellList" :key="index">
|
<uni-list-item title="摇一摇" thumb="/static/images/workbench/05.png" :thumbSize="thumbSize" to="/pages/workbench/friend-circle/friend-circle" showArrow></uni-list-item>
|
||||||
<template v-if="item.hidden==false&&index!=0">
|
<uni-list-item title="看一看" thumb="/static/images/workbench/06.png" :thumbSize="thumbSize" to="/pages/workbench/friend-circle/friend-circle" showArrow></uni-list-item>
|
||||||
<u-cell-item :title="item.title" :title-style="titleStyle"
|
<uni-list-item title="听一听" thumb="/static/images/workbench/06.png" :thumbSize="thumbSize" to="/pages/workbench/friend-circle/friend-circle" showArrow></uni-list-item>
|
||||||
:border-bottom="showBorder(index)" :border-top="false"
|
<uni-list-item title="附近" thumb="/static/images/workbench/08.png" :thumbSize="thumbSize" to="/pages/workbench/friend-circle/friend-circle" showArrow></uni-list-item>
|
||||||
@tap="linkTo(item)">
|
<uni-list-item title="购物" thumb="/static/images/workbench/09.png" :thumbSize="thumbSize" to="/pages/workbench/friend-circle/friend-circle" showArrow></uni-list-item>
|
||||||
<u-icon :class="item.title=='购物'?'u-m-l-6 u-m-r-10':'u-m-r-10'"
|
</uni-list>
|
||||||
slot="icon" :name="item.icon" :color="item.color" :size="item.size"></u-icon>
|
|
||||||
</u-cell-item>
|
|
||||||
<u-gap :height="16" bg-color="#f4f4f5" v-if="showGap(index)"></u-gap>
|
|
||||||
</template>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {getFriendCircleInfo } from "@/api/login";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
cellList: [
|
thumbSize:"base",
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
title: "朋友圈",
|
|
||||||
icon: "/static/image/workbench/01.png",
|
|
||||||
color: "inherit",
|
|
||||||
bind: "/pages/workbench/friend-circle/friend-circle",
|
|
||||||
hidden:false,
|
|
||||||
size:44,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 3,
|
|
||||||
title: "扫一扫",
|
|
||||||
//icon: "/static/image/wx/saoyisao.png",
|
|
||||||
icon: "/static/image/workbench/04.png",
|
|
||||||
color: "#409eff",
|
|
||||||
bind: "scan",
|
|
||||||
hidden:false,
|
|
||||||
size:44,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 4,
|
|
||||||
title: "摇一摇",
|
|
||||||
//icon: "/static/image/wx/yaoyiyao.png",
|
|
||||||
icon: "/static/image/workbench/05.png",
|
|
||||||
color: "#409eff",
|
|
||||||
bind: "/pages/tabbar/find/yaoyiyao/yyy-index",
|
|
||||||
hidden:false,
|
|
||||||
size:44,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 11,
|
|
||||||
title: "看一看",
|
|
||||||
icon: "/static/image/workbench/06.png",
|
|
||||||
color: "#f29100",
|
|
||||||
bind: "",
|
|
||||||
hidden:false,
|
|
||||||
size:44,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 13,
|
|
||||||
title: "附近",
|
|
||||||
icon: "/static/image/workbench/08.png",
|
|
||||||
color: "#fab6b6",
|
|
||||||
bind: "",
|
|
||||||
hidden:false,
|
|
||||||
size:44,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 14,
|
|
||||||
title: "购物",
|
|
||||||
icon: "/static/image/workbench/09.png",
|
|
||||||
color: "#fab6b6",
|
|
||||||
bind: "taobao",
|
|
||||||
hidden:false,
|
|
||||||
size:44,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 15,
|
|
||||||
title: "游戏",
|
|
||||||
icon: "/static/image/workbench/10.png",
|
|
||||||
color: "#fab6b6",
|
|
||||||
bind: "",
|
|
||||||
hidden:false,
|
|
||||||
size:44,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 6,
|
|
||||||
title: "小程序",
|
|
||||||
//icon: "/static/image/wx/xiaochengxu.png",
|
|
||||||
icon: "/static/image/workbench/11.png",
|
|
||||||
color: "#fab6b6",
|
|
||||||
bind: "",
|
|
||||||
hidden:false,
|
|
||||||
size:44,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 7,
|
|
||||||
title: "ChatGpt",
|
|
||||||
icon: "/static/image/find/chatgpt.png",
|
|
||||||
color: "#ff9900",
|
|
||||||
bind: "/pages/tabbar/group/chat/chat-gpt-conversion-wss",
|
|
||||||
hidden:true,
|
|
||||||
size:64,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 8,
|
|
||||||
title: "AI绘画",
|
|
||||||
icon: "http://open.yjai.art/assets/logo-9a019aa3.svg",
|
|
||||||
color: "#ff9900",
|
|
||||||
bind: "/pages/tabbar/find/AI/ai-text-to-create-img/ai-text-to-create-img",
|
|
||||||
hidden:true,
|
|
||||||
size:64,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 9,
|
|
||||||
title: "免费听歌",
|
|
||||||
icon: "/static/image/find/MP3.png",
|
|
||||||
color: "#19BE6B",
|
|
||||||
bind: "/pages/tabbar/find/music/free-music",
|
|
||||||
hidden:true,
|
|
||||||
size:64,
|
|
||||||
}
|
|
||||||
],
|
|
||||||
titleStyle: {
|
|
||||||
marginLeft: "20rpx",
|
|
||||||
fontSize: "34rpx",
|
|
||||||
color: "#000000"
|
|
||||||
},
|
|
||||||
newCircleInfo: {
|
newCircleInfo: {
|
||||||
userHeadImg:""
|
userHeadImg:"",
|
||||||
|
count:0
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
this.changeDefaultAvatar(1,10);
|
this.changeDefaultAvatar(1,10);
|
||||||
let unreadCount= 1;//this.vuex_friendCircleUnreadCount+"";
|
let unreadCount= 1;
|
||||||
this.localGroupApi.setTabBarBadge(2,unreadCount);
|
//this.vuex_friendCircleUnreadCount+"";
|
||||||
|
//this.localGroupApi.setTabBarBadge(2,unreadCount);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeDefaultAvatar:function(min,max){
|
changeDefaultAvatar:function(min,max){
|
||||||
let that=this;
|
let that=this;
|
||||||
that.$u.api.friendCircle.checkFriendCircleUpdate().then(res => {
|
getFriendCircleInfo().then(res => {
|
||||||
if(res.code==200){
|
if(res.code==200){
|
||||||
console.log("查询朋友圈更新情况",res.data);
|
console.log("查询朋友圈更新情况",res.data);
|
||||||
if(res.data&&res.data.length>0){
|
if(res.data&&res.data.length>0){
|
||||||
that.newCircleInfo=res.data[0];
|
that.newCircleInfo=res.data;
|
||||||
}else{
|
}else{
|
||||||
that.newCircleInfo=null;
|
that.newCircleInfo=null;
|
||||||
}
|
}
|
||||||
@@ -179,92 +58,15 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
showBorder(index){
|
|
||||||
switch (index){
|
|
||||||
case 1:
|
|
||||||
return true;
|
|
||||||
case 3:
|
|
||||||
return true;
|
|
||||||
case 5:
|
|
||||||
return true;
|
|
||||||
case 8:
|
|
||||||
return true;
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
showGap(index){
|
|
||||||
switch (index){
|
|
||||||
case 0:
|
|
||||||
return true;
|
|
||||||
case 2:
|
|
||||||
return true;
|
|
||||||
case 4:
|
|
||||||
return true;
|
|
||||||
case 6:
|
|
||||||
return true;
|
|
||||||
case 7:
|
|
||||||
return true;
|
|
||||||
case 9:
|
|
||||||
return true;
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
linkTo(item) {
|
|
||||||
let that = this;
|
|
||||||
let url = item.bind;
|
|
||||||
console.log("跳转链接", url);
|
|
||||||
if (url != null && url.length > 0) {
|
|
||||||
if (url == 'taobao') {
|
|
||||||
if (plus.os.name == 'Android') {
|
|
||||||
plus.runtime.launchApplication({
|
|
||||||
pname: 'com.taobao.taobao'
|
|
||||||
},
|
|
||||||
function(e) {
|
|
||||||
console.log('Open system default browser failed: ' + e.message);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
} else if (plus.os.name == 'iOS') {
|
|
||||||
//抖音 snssdk1128://
|
|
||||||
plus.runtime.launchApplication({
|
|
||||||
action: 'snssdk1128://'
|
|
||||||
}, function(e) {
|
|
||||||
console.log('Open system default browser failed: ' + e.message);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else if (url == "scan") {
|
|
||||||
this.globalUtil.scanQRcode(that, {
|
|
||||||
complete: function(res) {
|
|
||||||
console.log("扫码结果", res);
|
|
||||||
if (res.resp_code == 1000) {
|
|
||||||
let respData = res.resp_result;
|
|
||||||
that.$u.route({
|
|
||||||
url: '/pages/chat/qr-info/qr-info',
|
|
||||||
params: {
|
|
||||||
qrInfo: respData
|
|
||||||
},
|
|
||||||
animationType: 'slide-in-bottom'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
console.log("url", url);
|
|
||||||
this.$u.route(url);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.content {}
|
.content {padding-top: 36rpx;}
|
||||||
</style>
|
</style>
|
||||||
<style>
|
<style>
|
||||||
page {
|
page {
|
||||||
background-color: #f4f4f5 !important;
|
background-color: #ececec !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 5.5 KiB |
+23
-109
@@ -40,21 +40,15 @@ const mutations = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
async getFriendList({
|
async getFriendList({commit }) {
|
||||||
commit
|
|
||||||
}) {
|
|
||||||
let offset = 0;
|
let offset = 0;
|
||||||
let friendInfoList = [];
|
let friendInfoList = [];
|
||||||
let initialFetch = true;
|
let initialFetch = true;
|
||||||
while (true) {
|
while (true) {
|
||||||
try {
|
try {
|
||||||
const count = initialFetch ? 10000 : 1000;
|
const count = initialFetch ? 10000 : 1000;
|
||||||
const {
|
const {data} = await IMSDK.asyncApi("getFriendListPage", uuidv4(), {offset,count,});
|
||||||
data
|
//console.log(data);
|
||||||
} = await IMSDK.asyncApi("getFriendListPage", uuidv4(), {
|
|
||||||
offset,
|
|
||||||
count,
|
|
||||||
});
|
|
||||||
friendInfoList = [
|
friendInfoList = [
|
||||||
...friendInfoList,
|
...friendInfoList,
|
||||||
...data,
|
...data,
|
||||||
@@ -68,9 +62,7 @@ const actions = {
|
|||||||
}
|
}
|
||||||
commit("SET_FRIEND_LIST", friendInfoList);
|
commit("SET_FRIEND_LIST", friendInfoList);
|
||||||
},
|
},
|
||||||
async getGrouplist({
|
async getGrouplist({commit}) {
|
||||||
commit
|
|
||||||
}) {
|
|
||||||
let offset = 0;
|
let offset = 0;
|
||||||
let groupList = [];
|
let groupList = [];
|
||||||
while (true) {
|
while (true) {
|
||||||
@@ -93,18 +85,14 @@ const actions = {
|
|||||||
}
|
}
|
||||||
commit("SET_GROUP_LIST", groupList);
|
commit("SET_GROUP_LIST", groupList);
|
||||||
},
|
},
|
||||||
getBlacklist({
|
getBlacklist({commit}) {
|
||||||
commit
|
|
||||||
}) {
|
|
||||||
IMSDK.asyncApi(IMSDK.IMMethods.GetBlackList, uuidv4()).then(({
|
IMSDK.asyncApi(IMSDK.IMMethods.GetBlackList, uuidv4()).then(({
|
||||||
data
|
data
|
||||||
}) => {
|
}) => {
|
||||||
commit("SET_BLACK_LIST", data);
|
commit("SET_BLACK_LIST", data);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getRecvFriendApplications({
|
getRecvFriendApplications({commit}) {
|
||||||
commit
|
|
||||||
}) {
|
|
||||||
IMSDK.asyncApi(
|
IMSDK.asyncApi(
|
||||||
IMSDK.IMMethods.GetFriendApplicationListAsRecipient,
|
IMSDK.IMMethods.GetFriendApplicationListAsRecipient,
|
||||||
uuidv4(),
|
uuidv4(),
|
||||||
@@ -114,9 +102,7 @@ const actions = {
|
|||||||
commit("SET_RECV_FRIEND_APPLICATIONS", data);
|
commit("SET_RECV_FRIEND_APPLICATIONS", data);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getSentFriendApplications({
|
getSentFriendApplications({ commit }) {
|
||||||
commit
|
|
||||||
}) {
|
|
||||||
IMSDK.asyncApi(
|
IMSDK.asyncApi(
|
||||||
IMSDK.IMMethods.GetFriendApplicationListAsApplicant,
|
IMSDK.IMMethods.GetFriendApplicationListAsApplicant,
|
||||||
uuidv4(),
|
uuidv4(),
|
||||||
@@ -126,9 +112,7 @@ const actions = {
|
|||||||
commit("SET_SENT_FRIEND_APPLICATIONS", data);
|
commit("SET_SENT_FRIEND_APPLICATIONS", data);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getRecvGroupApplications({
|
getRecvGroupApplications({ commit }) {
|
||||||
commit
|
|
||||||
}) {
|
|
||||||
IMSDK.asyncApi(
|
IMSDK.asyncApi(
|
||||||
IMSDK.IMMethods.GetGroupApplicationListAsRecipient,
|
IMSDK.IMMethods.GetGroupApplicationListAsRecipient,
|
||||||
uuidv4(),
|
uuidv4(),
|
||||||
@@ -138,9 +122,7 @@ const actions = {
|
|||||||
commit("SET_RECV_GROUP_APPLICATIONS", data);
|
commit("SET_RECV_GROUP_APPLICATIONS", data);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getSentGroupApplications({
|
getSentGroupApplications({ commit }) {
|
||||||
commit
|
|
||||||
}) {
|
|
||||||
IMSDK.asyncApi(
|
IMSDK.asyncApi(
|
||||||
IMSDK.IMMethods.GetGroupApplicationListAsApplicant,
|
IMSDK.IMMethods.GetGroupApplicationListAsApplicant,
|
||||||
uuidv4(),
|
uuidv4(),
|
||||||
@@ -150,23 +132,14 @@ const actions = {
|
|||||||
commit("SET_SENT_GROUP_APPLICATIONS", data);
|
commit("SET_SENT_GROUP_APPLICATIONS", data);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
pushNewFriend({
|
pushNewFriend({ commit, state}, friendInfo) {
|
||||||
commit,
|
|
||||||
state
|
|
||||||
}, friendInfo) {
|
|
||||||
const tmpList = [...state.friendList];
|
const tmpList = [...state.friendList];
|
||||||
const idx = tmpList.findIndex((item) => item.userID === friendInfo.userID);
|
const idx = tmpList.findIndex((item) => item.userID === friendInfo.userID);
|
||||||
if (idx === -1) {
|
if (idx === -1) {
|
||||||
commit("SET_FRIEND_LIST", [...tmpList, friendInfo]);
|
commit("SET_FRIEND_LIST", [...tmpList, friendInfo]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateFriendInfo({
|
updateFriendInfo({commit,state}, { friendInfo,isRemove = false}) {
|
||||||
commit,
|
|
||||||
state
|
|
||||||
}, {
|
|
||||||
friendInfo,
|
|
||||||
isRemove = false
|
|
||||||
}) {
|
|
||||||
const tmpList = [...state.friendList];
|
const tmpList = [...state.friendList];
|
||||||
const idx = tmpList.findIndex((item) => item.userID === friendInfo.userID);
|
const idx = tmpList.findIndex((item) => item.userID === friendInfo.userID);
|
||||||
|
|
||||||
@@ -181,23 +154,14 @@ const actions = {
|
|||||||
commit("SET_FRIEND_LIST", tmpList);
|
commit("SET_FRIEND_LIST", tmpList);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pushNewBlack({
|
pushNewBlack({ commit, state}, blackInfo) {
|
||||||
commit,
|
|
||||||
state
|
|
||||||
}, blackInfo) {
|
|
||||||
const tmpList = [...state.blackList];
|
const tmpList = [...state.blackList];
|
||||||
const idx = tmpList.findIndex((item) => item.userID === blackInfo.userID);
|
const idx = tmpList.findIndex((item) => item.userID === blackInfo.userID);
|
||||||
if (idx === -1) {
|
if (idx === -1) {
|
||||||
commit("SET_BLACK_LIST", [...tmpList, blackInfo]);
|
commit("SET_BLACK_LIST", [...tmpList, blackInfo]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateBlackInfo({
|
updateBlackInfo({commit,state}, {blackInfo,isRemove = false}) {
|
||||||
commit,
|
|
||||||
state
|
|
||||||
}, {
|
|
||||||
blackInfo,
|
|
||||||
isRemove = false
|
|
||||||
}) {
|
|
||||||
const tmpList = [...state.blackList];
|
const tmpList = [...state.blackList];
|
||||||
const idx = tmpList.findIndex((item) => item.userID === blackInfo.userID);
|
const idx = tmpList.findIndex((item) => item.userID === blackInfo.userID);
|
||||||
|
|
||||||
@@ -212,24 +176,14 @@ const actions = {
|
|||||||
commit("SET_BLACK_LIST", tmpList);
|
commit("SET_BLACK_LIST", tmpList);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pushNewGroup({
|
pushNewGroup({commit,state}, groupInfo) {
|
||||||
commit,
|
|
||||||
state
|
|
||||||
}, groupInfo) {
|
|
||||||
const tmpList = [...state.groupList];
|
const tmpList = [...state.groupList];
|
||||||
const idx = tmpList.findIndex((item) => item.groupID === groupInfo.groupID);
|
const idx = tmpList.findIndex((item) => item.groupID === groupInfo.groupID);
|
||||||
if (idx === -1) {
|
if (idx === -1) {
|
||||||
commit("SET_GROUP_LIST", [...tmpList, groupInfo]);
|
commit("SET_GROUP_LIST", [...tmpList, groupInfo]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateGroupInfo({
|
updateGroupInfo({commit,state,rootState}, {groupInfo,isRemove = false}, ) {
|
||||||
commit,
|
|
||||||
state,
|
|
||||||
rootState
|
|
||||||
}, {
|
|
||||||
groupInfo,
|
|
||||||
isRemove = false
|
|
||||||
}, ) {
|
|
||||||
const tmpList = [...state.groupList];
|
const tmpList = [...state.groupList];
|
||||||
const idx = tmpList.findIndex((item) => item.groupID === groupInfo.groupID);
|
const idx = tmpList.findIndex((item) => item.groupID === groupInfo.groupID);
|
||||||
|
|
||||||
@@ -250,10 +204,7 @@ const actions = {
|
|||||||
commit("SET_GROUP_LIST", tmpList);
|
commit("SET_GROUP_LIST", tmpList);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pushNewRecvFriendApplition({
|
pushNewRecvFriendApplition({commit,state}, application) {
|
||||||
commit,
|
|
||||||
state
|
|
||||||
}, application) {
|
|
||||||
const tmpList = [...state.recvFriendApplications];
|
const tmpList = [...state.recvFriendApplications];
|
||||||
const idx = tmpList.findIndex(
|
const idx = tmpList.findIndex(
|
||||||
(item) => item.fromUserID === application.fromUserID,
|
(item) => item.fromUserID === application.fromUserID,
|
||||||
@@ -263,14 +214,7 @@ const actions = {
|
|||||||
}
|
}
|
||||||
commit("SET_RECV_FRIEND_APPLICATIONS", [...tmpList, application]);
|
commit("SET_RECV_FRIEND_APPLICATIONS", [...tmpList, application]);
|
||||||
},
|
},
|
||||||
updateRecvFriendApplition({
|
updateRecvFriendApplition({commit,state,rootState}, {application,isRemove = false}, ) {
|
||||||
commit,
|
|
||||||
state,
|
|
||||||
rootState
|
|
||||||
}, {
|
|
||||||
application,
|
|
||||||
isRemove = false
|
|
||||||
}, ) {
|
|
||||||
const tmpList = [...state.recvFriendApplications];
|
const tmpList = [...state.recvFriendApplications];
|
||||||
const idx = tmpList.findIndex(
|
const idx = tmpList.findIndex(
|
||||||
(item) => item.fromUserID === application.fromUserID,
|
(item) => item.fromUserID === application.fromUserID,
|
||||||
@@ -287,10 +231,7 @@ const actions = {
|
|||||||
commit("SET_RECV_FRIEND_APPLICATIONS", tmpList);
|
commit("SET_RECV_FRIEND_APPLICATIONS", tmpList);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pushNewSentFriendApplition({
|
pushNewSentFriendApplition({commit,state}, application) {
|
||||||
commit,
|
|
||||||
state
|
|
||||||
}, application) {
|
|
||||||
const tmpList = [...state.sentFriendApplications];
|
const tmpList = [...state.sentFriendApplications];
|
||||||
const idx = tmpList.findIndex(
|
const idx = tmpList.findIndex(
|
||||||
(item) => item.toUserID === application.toUserID,
|
(item) => item.toUserID === application.toUserID,
|
||||||
@@ -300,14 +241,7 @@ const actions = {
|
|||||||
}
|
}
|
||||||
commit("SET_SENT_FRIEND_APPLICATIONS", [...tmpList, application]);
|
commit("SET_SENT_FRIEND_APPLICATIONS", [...tmpList, application]);
|
||||||
},
|
},
|
||||||
updateSentFriendApplition({
|
updateSentFriendApplition({commit,state,rootState}, {application,isRemove = false}, ) {
|
||||||
commit,
|
|
||||||
state,
|
|
||||||
rootState
|
|
||||||
}, {
|
|
||||||
application,
|
|
||||||
isRemove = false
|
|
||||||
}, ) {
|
|
||||||
const tmpList = [...state.sentFriendApplications];
|
const tmpList = [...state.sentFriendApplications];
|
||||||
const idx = tmpList.findIndex(
|
const idx = tmpList.findIndex(
|
||||||
(item) => item.toUserID === application.toUserID,
|
(item) => item.toUserID === application.toUserID,
|
||||||
@@ -324,10 +258,7 @@ const actions = {
|
|||||||
commit("SET_SENT_FRIEND_APPLICATIONS", tmpList);
|
commit("SET_SENT_FRIEND_APPLICATIONS", tmpList);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pushNewRecvGroupApplition({
|
pushNewRecvGroupApplition({commit,state}, application) {
|
||||||
commit,
|
|
||||||
state
|
|
||||||
}, application) {
|
|
||||||
const tmpList = [...state.recvGroupApplications];
|
const tmpList = [...state.recvGroupApplications];
|
||||||
const idx = tmpList.findIndex((item) => item.userID === application.userID);
|
const idx = tmpList.findIndex((item) => item.userID === application.userID);
|
||||||
if (idx !== -1) {
|
if (idx !== -1) {
|
||||||
@@ -335,14 +266,7 @@ const actions = {
|
|||||||
}
|
}
|
||||||
commit("SET_RECV_GROUP_APPLICATIONS", [...tmpList, application]);
|
commit("SET_RECV_GROUP_APPLICATIONS", [...tmpList, application]);
|
||||||
},
|
},
|
||||||
updateRecvGroupApplition({
|
updateRecvGroupApplition({commit,state,rootState}, {application,isRemove = false}, ) {
|
||||||
commit,
|
|
||||||
state,
|
|
||||||
rootState
|
|
||||||
}, {
|
|
||||||
application,
|
|
||||||
isRemove = false
|
|
||||||
}, ) {
|
|
||||||
const tmpList = [...state.recvGroupApplications];
|
const tmpList = [...state.recvGroupApplications];
|
||||||
const idx = tmpList.findIndex((item) => item.userID === application.userID);
|
const idx = tmpList.findIndex((item) => item.userID === application.userID);
|
||||||
|
|
||||||
@@ -357,10 +281,7 @@ const actions = {
|
|||||||
commit("SET_RECV_GROUP_APPLICATIONS", tmpList);
|
commit("SET_RECV_GROUP_APPLICATIONS", tmpList);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pushNewSentGroupApplition({
|
pushNewSentGroupApplition({commit,state}, application) {
|
||||||
commit,
|
|
||||||
state
|
|
||||||
}, application) {
|
|
||||||
const tmpList = [...state.sentGroupApplications];
|
const tmpList = [...state.sentGroupApplications];
|
||||||
const idx = tmpList.findIndex(
|
const idx = tmpList.findIndex(
|
||||||
(item) => item.groupID === application.groupID,
|
(item) => item.groupID === application.groupID,
|
||||||
@@ -370,14 +291,7 @@ const actions = {
|
|||||||
}
|
}
|
||||||
commit("SET_SENT_GROUP_APPLICATIONS", [...tmpList, application]);
|
commit("SET_SENT_GROUP_APPLICATIONS", [...tmpList, application]);
|
||||||
},
|
},
|
||||||
updateSentGroupApplition({
|
updateSentGroupApplition({commit,state,rootState}, {application,isRemove = false}, ) {
|
||||||
commit,
|
|
||||||
state,
|
|
||||||
rootState
|
|
||||||
}, {
|
|
||||||
application,
|
|
||||||
isRemove = false
|
|
||||||
}, ) {
|
|
||||||
const tmpList = [...state.sentGroupApplications];
|
const tmpList = [...state.sentGroupApplications];
|
||||||
const idx = tmpList.findIndex(
|
const idx = tmpList.findIndex(
|
||||||
(item) => item.groupID === application.groupID,
|
(item) => item.groupID === application.groupID,
|
||||||
|
|||||||
@@ -16,15 +16,13 @@
|
|||||||
/* 颜色变量 */
|
/* 颜色变量 */
|
||||||
@import "@/uni_modules/uview-ui/theme.scss";
|
@import "@/uni_modules/uview-ui/theme.scss";
|
||||||
|
|
||||||
text {
|
// text element line-height can be customized if needed
|
||||||
// line-height: 1.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 行为相关颜色 */
|
/* 行为相关颜色 */
|
||||||
$uni-color-primary: #007aff;
|
$uni-color-primary: #997aff;
|
||||||
$uni-color-success: #4cd964;
|
$uni-color-success: #07c160;
|
||||||
$uni-color-warning: #f0ad4e;
|
$uni-color-warning: #fa9d3b;
|
||||||
$uni-color-error: #dd524d;
|
$uni-color-error: #fa5151;
|
||||||
|
|
||||||
/* 文字基本颜色 */
|
/* 文字基本颜色 */
|
||||||
$uni-text-color: #0c1c33; //基本色
|
$uni-text-color: #0c1c33; //基本色
|
||||||
@@ -80,3 +78,4 @@ $uni-color-subtitle: #555555; // 二级标题颜色
|
|||||||
$uni-font-size-subtitle: 26px;
|
$uni-font-size-subtitle: 26px;
|
||||||
$uni-color-paragraph: #3f536e; // 文章段落颜色
|
$uni-color-paragraph: #3f536e; // 文章段落颜色
|
||||||
$uni-font-size-paragraph: 15px;
|
$uni-font-size-paragraph: 15px;
|
||||||
|
//@import "@/styles/weui-overrides.scss";
|
||||||
|
|||||||
Reference in New Issue
Block a user