20
This commit is contained in:
@@ -235,6 +235,7 @@
|
||||
}
|
||||
},
|
||||
confirm() {
|
||||
const _this = this;
|
||||
//console.log(this.checkedUserIDList,this.checkedGroupIDList);
|
||||
//return false;
|
||||
// if (this.activeTab) {
|
||||
@@ -262,16 +263,20 @@
|
||||
return;
|
||||
}
|
||||
if (this.type === ContactChooseTypes.Invite) {
|
||||
console.log(_this.getCheckedUserInfo,_this.groupID);
|
||||
IMSDK.asyncApi(IMSDK.IMMethods.InviteUserToGroup, IMSDK.uuid(), {
|
||||
groupID: this.groupID,
|
||||
groupID: _this.groupID,
|
||||
reason: "",
|
||||
userIDList: this.getCheckedUserInfo.map((user) => user.userID),
|
||||
userIDList: _this.getCheckedUserInfo.map((user) => user.userID),
|
||||
})
|
||||
.then(() => {
|
||||
toastWithCallback("操作成功", () => uni.navigateBack());
|
||||
this.comfirmLoading = false;
|
||||
_this.comfirmLoading = false;
|
||||
})
|
||||
.catch(() => toastWithCallback("操作失败"));
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
toastWithCallback("操作失败")
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -66,8 +66,6 @@
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
console.log(friend.nickname);
|
||||
return friend.nickname.indexOf(this.keyword) !==-1 || friend?.remark.indexOf(this.keyword) !==-1
|
||||
}
|
||||
),
|
||||
],
|
||||
|
||||
@@ -158,37 +158,35 @@ export default {
|
||||
});
|
||||
},
|
||||
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;
|
||||
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;
|
||||
});
|
||||
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;
|
||||
@@ -275,6 +273,7 @@ export default {
|
||||
align-items: center;
|
||||
|
||||
img {
|
||||
border-radius: 32rpx;
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
}
|
||||
|
||||
+100
-30
@@ -1,24 +1,32 @@
|
||||
<template>
|
||||
<view class="m-shade n-flex-1 n-align-center n-justify-center">
|
||||
<view :style="{width:'580rpx'}">
|
||||
<image src="/static/image/upgrade.png" mode="widthFix"></image>
|
||||
<view class="n-ps-all-ll n-ms-top-ll n-position-absolute">
|
||||
<text class="n-size-mm n-weight-7 n-color-inverse">发现新版本</text>
|
||||
<text class="n-size-base n-ms-top-ss n-color-inverse">V{{model.version}}</text>
|
||||
</view>
|
||||
<view class="n-ps-all-l n-radius-lb-base" :style="{backgroundColor:'#f3f3f3',borderRadius:'0 0 16rpx 16rpx'}">
|
||||
<view :style="{height:'300rpx'}">
|
||||
<scroll-view class="n-flex-1" :show-scrollbar="false" scroll-y>
|
||||
<rich-text class="n-size-s" :nodes="model.content" :style="{lineHeight:'26rpx'}"></rich-text>
|
||||
</scroll-view>
|
||||
<view class="upgrade_page">
|
||||
<uni-nav-bar left-icon="back"
|
||||
@clickLeft="back"
|
||||
title="系统更新"
|
||||
backgroundColor="#FFF"
|
||||
fixed
|
||||
statusBar>
|
||||
</uni-nav-bar>
|
||||
|
||||
<view style="flex:1;display: flex;align-items: center;justify-content: center;">
|
||||
<view :style="{width:'580rpx',position:'relative'}">
|
||||
<image src="/static/images/upgrade.png" :style="{width:'580rpx'}" mode="widthFix"></image>
|
||||
<view class="version_info">
|
||||
<text class="title">发现新版本</text>
|
||||
<text class="code">V{{model.version}}</text>
|
||||
</view>
|
||||
<view class="n-height-base n-justify-center">
|
||||
<view v-if="progress">
|
||||
<uv-line-progress :percentage="value" activeColor="#fc3463"></uv-line-progress>
|
||||
</view>
|
||||
<view class="n-flex-row" v-else>
|
||||
<uv-button class="n-flex-1 n-ms-right-ll" v-if="model.force==0" @click="cancel" :customStyle="{backgroundColor:'#f3f3f3'}" text="暂不更新" color="#fc3463" shape="circle" throttleTime="1000" plain></uv-button>
|
||||
<uv-button class="n-flex-1" @click="upgrade" text="立即更新" color="#fc3463" shape="circle" throttleTime="1000"></uv-button>
|
||||
<view class="detail">
|
||||
<scroll-view :show-scrollbar="false" scroll-y>
|
||||
<rich-text :nodes="model.content"></rich-text>
|
||||
</scroll-view>
|
||||
<view class="footer">
|
||||
<view v-if="progress">
|
||||
<u-line-progress :percentage="value" activeColor="#fc3463"></u-line-progress>
|
||||
</view>
|
||||
<view class="buttons" v-else>
|
||||
<u-button v-if="model.force==0" @click="cancel" :customStyle="{backgroundColor:'#f3f3f3'}" text="暂不更新" color="#fc3463" shape="circle" throttleTime="1000" plain></u-button>
|
||||
<u-button @click="upgrade" text="立即更新" color="#fc3463" shape="circle" throttleTime="1000"></u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -27,7 +35,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import util from "@/util/index.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -42,9 +50,23 @@
|
||||
}
|
||||
},
|
||||
onLoad(evt) {
|
||||
if(evt.model){
|
||||
this.model = {...this.model, ...JSON.parse(evt.model)}
|
||||
// if(evt.model){
|
||||
// this.model = {...this.model, ...JSON.parse(evt.model)}
|
||||
// }
|
||||
var model = uni.getStorageSync('upgrade_model');
|
||||
console.log(model);
|
||||
if(model){
|
||||
this.model = {...this.model, ...model};
|
||||
}
|
||||
// this.model = {
|
||||
// "id": 1,
|
||||
// "type": 1,
|
||||
// "force": 1,
|
||||
// "source": "https://shunliao.oss-accelerate.aliyuncs.com/files/150016c51d8672fde3d1cc6945a95089_695d97b6c0162.wgt",
|
||||
// "version": "3.3.6",
|
||||
// "content": "修复了一些bug",
|
||||
// "source_text": null
|
||||
// };
|
||||
},
|
||||
onBackPress() {
|
||||
if(this.model.force==1){
|
||||
@@ -52,6 +74,11 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
back(){
|
||||
if(this.model.force!=1){
|
||||
uni.navigateBack()
|
||||
}
|
||||
},
|
||||
// 取消更新
|
||||
cancel() {
|
||||
uni.navigateBack()
|
||||
@@ -80,17 +107,14 @@
|
||||
// 防止强制更新无法关闭界面
|
||||
this.model.force = 0
|
||||
if(this.model.type==1){
|
||||
uni.showToast({
|
||||
title:'更新成功,软件重启'
|
||||
})
|
||||
util.showToast('更新成功,软件重启')
|
||||
setTimeout(()=>{ plus.runtime.restart() }, 1500)
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: error=>{
|
||||
uni.showToast({
|
||||
title:'下载失败,请检查您的网络情况'
|
||||
})
|
||||
util.showToast('下载失败,请检查您的网络情况')
|
||||
this.model.force = 0;
|
||||
}
|
||||
})
|
||||
// 监听下载进度
|
||||
@@ -103,8 +127,54 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.m-shade{
|
||||
<style lang="scss" scoped>
|
||||
.upgrade_page{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
.version_info{
|
||||
position: absolute;
|
||||
top:120rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
margin-left: 20rpx;
|
||||
width: 100%;
|
||||
.title{
|
||||
color: #fff;
|
||||
}
|
||||
.code{
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.detail{
|
||||
margin-top: -10rpx;
|
||||
background-color:#f3f3f3;
|
||||
border-radius:0 0 16rpx 16rpx;
|
||||
padding: 10rpx 20rpx 30rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
scroll-view{
|
||||
flex: 1;
|
||||
min-height: 300rpx;
|
||||
rich-text{
|
||||
font-size:32rpx;
|
||||
line-height: 1.5;
|
||||
}
|
||||
}
|
||||
.footer{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
gap: 20rpx;
|
||||
.buttons{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
+120
-142
@@ -1,157 +1,135 @@
|
||||
<template>
|
||||
<view class="group_list_container">
|
||||
<custom-nav-bar title="我的群组">
|
||||
<view class="group_list_container">
|
||||
<custom-nav-bar title="我的群组"></custom-nav-bar>
|
||||
<view class="search_bar_wrap">
|
||||
<u-search class="search_bar" shape="square" placeholder="搜索" disabled :showAction="false" />
|
||||
</view>
|
||||
|
||||
</custom-nav-bar>
|
||||
<view class="search_bar_wrap">
|
||||
<u-search
|
||||
class="search_bar"
|
||||
shape="square"
|
||||
placeholder="搜索"
|
||||
disabled
|
||||
:showAction="false"
|
||||
/>
|
||||
</view>
|
||||
<u-tabs :scrollable="false" :list="tabList" @click="clickTab"></u-tabs>
|
||||
|
||||
<u-tabs :scrollable="false" :list="tabList" @click="clickTab"></u-tabs>
|
||||
<view class="pane_row" :style="{ transform: `translateX(${isMyCreate ? '0' : '-100%'})` }">
|
||||
<view class="pane_content">
|
||||
<u-list v-if="getMyCreateGroupList.length > 0" class="group_list" :height="`${getListHeight}px`">
|
||||
<u-list-item v-for="group in getMyCreateGroupList" :key="group.groupID">
|
||||
<group-item :groupInfo="group" />
|
||||
</u-list-item>
|
||||
</u-list>
|
||||
<u-empty v-else mode="list" />
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="pane_row"
|
||||
:style="{ transform: `translateX(${isMyCreate ? '0' : '-100%'})` }"
|
||||
>
|
||||
<view class="pane_content">
|
||||
<u-list
|
||||
v-if="getMyCreateGroupList.length > 0"
|
||||
class="group_list"
|
||||
:height="`${getListHeight}px`"
|
||||
>
|
||||
<u-list-item
|
||||
v-for="group in getMyCreateGroupList"
|
||||
:key="group.groupID"
|
||||
>
|
||||
<group-item :groupInfo="group" />
|
||||
</u-list-item>
|
||||
</u-list>
|
||||
<u-empty v-else mode="list" />
|
||||
</view>
|
||||
|
||||
<view class="pane_content">
|
||||
<u-list
|
||||
v-if="getMyJoinedGroupList.length > 0"
|
||||
class="group_list"
|
||||
:height="`${getListHeight}px`"
|
||||
>
|
||||
<u-list-item
|
||||
v-for="group in getMyJoinedGroupList"
|
||||
:key="group.groupID"
|
||||
>
|
||||
<group-item :groupInfo="group" />
|
||||
</u-list-item>
|
||||
</u-list>
|
||||
<u-empty v-else mode="list" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pane_content">
|
||||
<u-list v-if="getMyJoinedGroupList.length > 0" class="group_list" :height="`${getListHeight}px`">
|
||||
<u-list-item v-for="group in getMyJoinedGroupList" :key="group.groupID">
|
||||
<group-item :groupInfo="group" />
|
||||
</u-list-item>
|
||||
</u-list>
|
||||
<u-empty v-else mode="list" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from "vuex";
|
||||
import CustomNavBar from "@/components/CustomNavBar/index.vue";
|
||||
import GroupItem from "./GroupItem.vue";
|
||||
export default {
|
||||
components: {
|
||||
CustomNavBar,
|
||||
GroupItem,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
keyword: "",
|
||||
tabList: [
|
||||
{
|
||||
name: "我创建的",
|
||||
},
|
||||
{
|
||||
name: "我加入的",
|
||||
},
|
||||
],
|
||||
isMyCreate: true,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(["storeGroupList", "storeCurrentUserID"]),
|
||||
getMyCreateGroupList() {
|
||||
return this.storeGroupList.filter(
|
||||
(group) => group.ownerUserID === this.storeCurrentUserID,
|
||||
);
|
||||
},
|
||||
getListHeight() {
|
||||
const statusBar = uni.getWindowInfo().statusBarHeight;
|
||||
const searchBar = 58;
|
||||
const tabAndNavBar = 44 * 2;
|
||||
const titleBar = 32;
|
||||
return (
|
||||
uni.getWindowInfo().safeArea.height -
|
||||
statusBar -
|
||||
searchBar -
|
||||
tabAndNavBar -
|
||||
titleBar
|
||||
);
|
||||
},
|
||||
getMyJoinedGroupList() {
|
||||
// console.log(this.storeGroupList.filter(group => group.ownerUserID !== this.storeCurrentUserID));
|
||||
return this.storeGroupList.filter(
|
||||
(group) => group.ownerUserID !== this.storeCurrentUserID,
|
||||
);
|
||||
},
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
clickTab({ index }) {
|
||||
this.isMyCreate = index === 0;
|
||||
},
|
||||
toCreateGroup() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/common/createGroup/index`,
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
import CustomNavBar from "@/components/CustomNavBar/index.vue";
|
||||
import GroupItem from "./GroupItem.vue";
|
||||
export default {
|
||||
components: {
|
||||
CustomNavBar,
|
||||
GroupItem,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
keyword: "",
|
||||
tabList: [{
|
||||
name: "我创建的",
|
||||
},
|
||||
{
|
||||
name: "我加入的",
|
||||
},
|
||||
],
|
||||
isMyCreate: true,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(["storeGroupList", "storeCurrentUserID"]),
|
||||
getMyCreateGroupList() {
|
||||
return this.storeGroupList.filter(
|
||||
(group) => group.ownerUserID === this.storeCurrentUserID,
|
||||
);
|
||||
},
|
||||
getListHeight() {
|
||||
const statusBar = uni.getWindowInfo().statusBarHeight;
|
||||
const searchBar = 58;
|
||||
const tabAndNavBar = 44 * 2;
|
||||
const titleBar = 32;
|
||||
return (
|
||||
uni.getWindowInfo().safeArea.height -
|
||||
statusBar -
|
||||
searchBar -
|
||||
tabAndNavBar -
|
||||
titleBar
|
||||
);
|
||||
},
|
||||
getMyJoinedGroupList() {
|
||||
//console.log(this.storeGroupList);
|
||||
return this.storeGroupList.filter(
|
||||
(group) => group.ownerUserID !== this.storeCurrentUserID,
|
||||
);
|
||||
},
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
clickTab({
|
||||
index
|
||||
}) {
|
||||
this.isMyCreate = index === 0;
|
||||
},
|
||||
toCreateGroup() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/common/createGroup/index`,
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.group_list_container {
|
||||
@include colBox(false);
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
.group_list_container {
|
||||
@include colBox(false);
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
|
||||
.nav_right_action {
|
||||
padding-right: 44rpx;
|
||||
}
|
||||
.nav_right_action {
|
||||
padding-right: 44rpx;
|
||||
}
|
||||
|
||||
.search_bar_wrap {
|
||||
height: 34px;
|
||||
padding: 12px 22px;
|
||||
}
|
||||
.search_bar_wrap {
|
||||
height: 34px;
|
||||
padding: 12px 22px;
|
||||
}
|
||||
|
||||
.pane_row {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
transition: all 0.3s ease 0s !important;
|
||||
border-top: 2rpx solid #e8eaef;
|
||||
// overflow-x: hidden;
|
||||
.pane_row {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
transition: all 0.3s ease 0s !important;
|
||||
border-top: 2rpx solid #e8eaef;
|
||||
// overflow-x: hidden;
|
||||
|
||||
.pane_content {
|
||||
@include colBox(false);
|
||||
height: 100%;
|
||||
flex: 0 0 100%;
|
||||
.pane_content {
|
||||
@include colBox(false);
|
||||
height: 100%;
|
||||
flex: 0 0 100%;
|
||||
|
||||
.pane_title {
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
padding: 6px 22px;
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
.pane_title {
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
padding: 6px 22px;
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -33,7 +33,7 @@
|
||||
conversationID:String,
|
||||
},
|
||||
data() {
|
||||
console.log(this.message);
|
||||
//console.log(this.message);
|
||||
return {
|
||||
loadingWidth: "120px",
|
||||
src:"",
|
||||
@@ -64,7 +64,7 @@
|
||||
util.cacheFile(snapshotUrl,`${this.conversationID}`).then((fn)=>{
|
||||
self.coverDownloading = false;
|
||||
self.src = fn;
|
||||
console.log(fn);
|
||||
//console.log(fn);
|
||||
});
|
||||
},
|
||||
clickMediaItem() {
|
||||
|
||||
@@ -117,10 +117,10 @@
|
||||
methods: {
|
||||
async init(){
|
||||
const self = this;
|
||||
console.log(this.message?.videoElem);
|
||||
const snapshotUrl = this.message?.videoElem?.snapshotPath || this.message?.videoElem?.snapshotUrl;
|
||||
//console.log(this.message?.videoElem);
|
||||
const snapshotUrl = this.message?.videoElem?.snapshotUrl;
|
||||
self.coverDownloading = true;
|
||||
console.log(snapshotUrl);
|
||||
//console.log(snapshotUrl);
|
||||
util.cacheFile(snapshotUrl,`${this.conversationID}`).then((fn)=>{
|
||||
self.coverDownloading = false;
|
||||
self.src = fn;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<uni-icons size="24" color="#FFF" type="personadd"></uni-icons>
|
||||
<text>添加好友</text>
|
||||
</view>
|
||||
<view @click="clickMenu({name:'createGroup'})" class="menu_item">
|
||||
<view @click="clickMenu({name:'scan'})" class="menu_item">
|
||||
<uni-icons size="24" color="#FFF" type="scan"></uni-icons>
|
||||
<text>扫一扫</text>
|
||||
</view>
|
||||
@@ -191,6 +191,45 @@
|
||||
padding: 0 24rpx 10rpx;
|
||||
//margin-top: var(--status-bar-height);
|
||||
background: #f4f4f4;
|
||||
.status_notice{
|
||||
.err-tag {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 44rpx;
|
||||
background: #ffe1dd;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
margin-left: 8rpx;
|
||||
|
||||
.status {
|
||||
font-size: 24rpx;
|
||||
margin-left: 8rpx;
|
||||
font-weight: 400;
|
||||
color: #ff381f;
|
||||
}
|
||||
}
|
||||
|
||||
.tag {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 44rpx;
|
||||
background: #f2f8ff;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
margin-left: 8rpx;
|
||||
|
||||
.loading {
|
||||
animation: loading 1.5s infinite;
|
||||
}
|
||||
|
||||
.status {
|
||||
font-size: 24rpx;
|
||||
margin-left: 8rpx;
|
||||
font-weight: 400;
|
||||
color: #0089ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.self_info {
|
||||
@include btwBox();
|
||||
@@ -216,46 +255,6 @@
|
||||
max-width: 240rpx;
|
||||
}
|
||||
|
||||
.err-tag {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 152rpx;
|
||||
height: 44rpx;
|
||||
background: #ffe1dd;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
margin-left: 8rpx;
|
||||
|
||||
.status {
|
||||
font-size: 24rpx;
|
||||
margin-left: 8rpx;
|
||||
font-weight: 400;
|
||||
color: #ff381f;
|
||||
}
|
||||
}
|
||||
|
||||
.tag {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 152rpx;
|
||||
height: 44rpx;
|
||||
background: #f2f8ff;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
margin-left: 8rpx;
|
||||
|
||||
.loading {
|
||||
animation: loading 1.5s infinite;
|
||||
}
|
||||
|
||||
.status {
|
||||
font-size: 24rpx;
|
||||
margin-left: 8rpx;
|
||||
font-weight: 400;
|
||||
color: #0089ff;
|
||||
}
|
||||
}
|
||||
|
||||
.online_state {
|
||||
@include vCenterBox();
|
||||
margin-left: 24rpx;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<template>
|
||||
<view @longtap.prevent="longtapConversationItem" @tap.prevent="clickConversationItem" :class="['conversation_item',source.isPinned?'pinned' : '']">
|
||||
<view class="left_info">
|
||||
<my-avatar :isGroup="isGroup" :isNotify="isNotify" :src="source.faceURL" :desc="source.showName" size="46" />
|
||||
<view class="avatar">
|
||||
<my-avatar :isGroup="isGroup" :isNotify="isNotify" :src="source.faceURL" :desc="source.showName" size="46" />
|
||||
<u-badge max="99" :value="source.unreadCount"></u-badge>
|
||||
</view>
|
||||
<view class="details">
|
||||
<view class="title">
|
||||
<text class="conversation_name">
|
||||
@@ -9,7 +12,6 @@
|
||||
</text>
|
||||
<view class="right_desc">
|
||||
<text class="send_time">{{ latestMessageTime }}</text>
|
||||
<u-badge max="99" :value="source.unreadCount"></u-badge>
|
||||
</view>
|
||||
</view>
|
||||
<view class="lastest_msg_wrap">
|
||||
@@ -101,7 +103,14 @@
|
||||
box-sizing: border-box;
|
||||
padding: 12rpx 44rpx 20rpx;
|
||||
flex:1;
|
||||
|
||||
.avatar{
|
||||
position: relative;
|
||||
.u-badge{
|
||||
position: absolute;
|
||||
right: -6rpx;
|
||||
top: -6rpx;
|
||||
}
|
||||
}
|
||||
.details {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -161,5 +170,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -1,11 +1,22 @@
|
||||
<template>
|
||||
<view class="conversation_container">
|
||||
<chat-header ref="chatHeaderRef" />
|
||||
<scroll-view class="scroll-view" scroll-y="true" refresher-enabled="true" :refresher-triggered="triggered"
|
||||
:scroll-top="scrollTop" :scroll-with-animation="true" @scroll="scroll" @refresherrefresh="onRefresh"
|
||||
@refresherrestore="onRestore" @scrolltolower="scrolltolower">
|
||||
<scroll-view class="scroll-view"
|
||||
scroll-y="true"
|
||||
refresher-enabled="true"
|
||||
:refresher-triggered="triggered"
|
||||
:scroll-top="scrollTop"
|
||||
:scroll-with-animation="true"
|
||||
@scroll="scroll"
|
||||
@refresherrefresh="onRefresh"
|
||||
@refresherrestore="onRestore"
|
||||
@scrolltolower="scrolltolower">
|
||||
<uni-swipe-action ref="swipe_action">
|
||||
<uni-swipe-action-item :right-options="swipe_actions" @click="actionClick($event,item)" v-for="item in storeConversationList" :key="item.conversationID" >
|
||||
<uni-swipe-action-item
|
||||
:right-options="swipe_actions"
|
||||
@click="actionClick($event,item)"
|
||||
v-for="item in storeConversationList"
|
||||
:key="item.conversationID" >
|
||||
<conversation-item @longtapEvent="showExtendMenu(item)" :source="item"/>
|
||||
</uni-swipe-action-item>
|
||||
</uni-swipe-action>
|
||||
@@ -178,7 +189,9 @@
|
||||
this.queryList();
|
||||
},
|
||||
async queryList(isFirstPage = false) {
|
||||
//console.log(1);
|
||||
await this.$store.dispatch("conversation/getConversationList",isFirstPage);
|
||||
//console.log(2);
|
||||
this.triggered = false;
|
||||
this._freshing = false;
|
||||
},
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
faceURL : this.storeCurrentConversation.faceURL,
|
||||
type : "group",
|
||||
});
|
||||
return `/pages/common/userOrGroupQrCode?sourceInfo=${s}`;
|
||||
return `/pages/common/userOrGroupQrCode?sourceInfo=${info}`;
|
||||
},
|
||||
getGroupVerStr() {
|
||||
if (
|
||||
|
||||
@@ -24,13 +24,14 @@
|
||||
<uni-list-item v-if="1==2" title="看一看" thumb="/static/images/find/06.png" :thumbSize="thumbSize" to="/pages/find/friend-circle/friend-circle" showArrow></uni-list-item>
|
||||
<uni-list-item v-if="1==2" title="听一听" thumb="/static/images/find/06.png" :thumbSize="thumbSize" to="/pages/find/friend-circle/friend-circle" showArrow></uni-list-item>
|
||||
<uni-list-item v-if="config.near_user_open == '1'" title="附近" thumb="/static/images/find/08.png" :thumbSize="thumbSize" to="/pages/find/near/near" showArrow></uni-list-item>
|
||||
<uni-list-item title="购物" thumb="/static/images/find/09.png" :thumbSize="thumbSize" :to="'/pages/common/webview?url='+encodeURI('http://pinduoduo.com')" showArrow></uni-list-item>
|
||||
<uni-list-item v-if="1===2" title="购物" thumb="/static/images/find/09.png" :thumbSize="thumbSize" :to="'/pages/common/webview?url='+encodeURI('http://pinduoduo.com')" showArrow></uni-list-item>
|
||||
</uni-list>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from "vuex";
|
||||
import util from "@/util";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -50,37 +51,8 @@
|
||||
let unreadCount= 1;
|
||||
this.$store.dispatch('circle/getFriendCircleInfo');
|
||||
},
|
||||
methods: {
|
||||
scan(){
|
||||
uni.scanCode({
|
||||
success(res) {
|
||||
if(res.scanType == "QR_CODE"){
|
||||
if(res.result.startsWith("http")){
|
||||
uni.navigateTo({
|
||||
url:"/pages/common/webview?url="+encodeURIComponent(res.result)
|
||||
});
|
||||
//res.result;
|
||||
return ;
|
||||
}
|
||||
const user_prefix = `${this.config.website}/u/`;
|
||||
if(res.result.startsWith(user_prefix)){
|
||||
return uni.navigateTo({
|
||||
url:"/pages/common/userCard/index?sourceID="+res.result.replace(user_prefix,'')
|
||||
});
|
||||
}
|
||||
const group_prefix = `${this.config.website}/g/`;
|
||||
if(res.result.startsWith(group_prefix)){
|
||||
return uni.navigateTo({
|
||||
url:"/pages/common/groupCard/index?sourceID="+res.result.replace(group_prefix,'')
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
// uni.navigateTo({
|
||||
// url:"/pages/common/scan"
|
||||
// })
|
||||
}
|
||||
methods: {
|
||||
scan:util.scan
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
+39
-28
@@ -36,6 +36,10 @@
|
||||
},
|
||||
onReady() {
|
||||
//console.log('onReady');
|
||||
// uni.navigateTo({
|
||||
// url:"/pages/common/upgrade"
|
||||
// });
|
||||
// return ;
|
||||
// #ifdef APP
|
||||
this.checkUpdate();
|
||||
this.tryLogin();
|
||||
@@ -148,7 +152,6 @@
|
||||
if (this.storeIsSyncing) {
|
||||
return;
|
||||
}
|
||||
console.log(data);
|
||||
data.forEach(this.handleNewMessage);
|
||||
});
|
||||
|
||||
@@ -282,8 +285,8 @@
|
||||
//设置了批量消息监听setBatchMsgListener时,此回调不会触发。
|
||||
//IMSDK.subscribe(IMSDK.IMEvents.onRecvOfflineNewMessage,({ data })=>{});
|
||||
//当应用在后台运行,接收到新消息时,会收到该回调,回调中可能会携带多条消息。
|
||||
IMSDK.subscribe(IMSDK.IMEvents.OnRecvOfflineNewMessages,(res)=>{
|
||||
console.log(res);
|
||||
IMSDK.subscribe(IMSDK.IMEvents.OnRecvOfflineNewMessages,({data})=>{
|
||||
data.forEach(this.handleOfflineNewMessages);
|
||||
});
|
||||
//已订阅用户的在线状态发生变化时,会触发此回调。
|
||||
//IMSDK.subscribe(IMSDK.IMEvents.onUserStatusChanged,({ data })=>{});
|
||||
@@ -404,6 +407,35 @@
|
||||
}
|
||||
},
|
||||
|
||||
handleOfflineNewMessages(newServerMsg) {
|
||||
console.log(newServerMsg);
|
||||
console.log( getConversationContent(newServerMsg));
|
||||
uni.createPushMessage({
|
||||
title:"您的朋友发来新的消息",
|
||||
content:getConversationContent(newServerMsg),
|
||||
payload:{
|
||||
type:"msg",
|
||||
data:newServerMsg
|
||||
},
|
||||
//icon:'',
|
||||
//sound:'',
|
||||
//cover:'false',
|
||||
//delay:0,
|
||||
//when:0,//消息上显示的提示时间
|
||||
//channelId:"",
|
||||
//category:"",
|
||||
success(res){
|
||||
//console.log(res);
|
||||
},
|
||||
fail(res){
|
||||
//console.log(res);
|
||||
},
|
||||
complete(res){
|
||||
//console.log(res);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
handleNewMessage(newServerMsg) {
|
||||
if (this.inCurrentConversation(newServerMsg)) {
|
||||
if (
|
||||
@@ -416,30 +448,7 @@
|
||||
uni.$u.debounce(this.markConversationAsRead, 2000);
|
||||
}
|
||||
}else{
|
||||
console.log(newServerMsg);
|
||||
|
||||
console.log( getConversationContent(newServerMsg));
|
||||
uni.createPushMessage({
|
||||
title:"您的朋友发来新的消息",
|
||||
content:getConversationContent(newServerMsg),
|
||||
payload:newServerMsg,
|
||||
//icon:'',
|
||||
//sound:'',
|
||||
//cover:'false',
|
||||
//delay:0,
|
||||
//when:0,//消息上显示的提示时间
|
||||
//channelId:"",
|
||||
//category:"",
|
||||
success(res){
|
||||
console.log(res);
|
||||
},
|
||||
fail(res){
|
||||
console.log(res);
|
||||
},
|
||||
complete(res){
|
||||
console.log(res);
|
||||
}
|
||||
});
|
||||
this.handleOfflineNewMessages(newServerMsg);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -497,10 +506,10 @@
|
||||
let system = uni.getSystemInfoSync()
|
||||
plus.runtime.getProperty(plus.runtime.appid, function(inf) {
|
||||
checkUpgrade({version:system.appVersion,platform:system.platform,version_wgt:inf.versionCode}).then(res=>{
|
||||
console.log(res.version,skip_version);
|
||||
let skip_version = uni.getStorageSync('skip_version')
|
||||
if(res && res.version!=skip_version){
|
||||
uni.$emit('closeWebview')
|
||||
this.setShow(this.current, false)
|
||||
router('/pages/common/upgrade?model=' + JSON.stringify(res), '', 'fade-in')
|
||||
}
|
||||
})
|
||||
@@ -523,6 +532,7 @@
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -537,5 +547,6 @@
|
||||
|
||||
.gif-image {
|
||||
width: 50%;
|
||||
border-radius: 10%;
|
||||
}
|
||||
</style>
|
||||
+20
-30
@@ -2,19 +2,19 @@
|
||||
<view class="page_container">
|
||||
<custom-nav-bar title="关于我们" />
|
||||
<view class="logo_area">
|
||||
<image :src="cdn(config.app_logo)" mode=""></image>
|
||||
<image class="logo" :src="cdn(config.app_logo)" mode="aspectFit"></image>
|
||||
<view>{{ appversion }}</view>
|
||||
|
||||
<info-item @click="checkUpdate" class="check" title="检测更新" />
|
||||
<info-item @click="openurl(config.website)" class="check" title="官方网站" />
|
||||
<info-item @click="goto('/pages/common/article?type=spage&name=cooperation&title=商务合作')" class="check" title="商务合作" />
|
||||
<info-item v-if="1==2" @click="goto('/pages/common/article?type=spage&name=cooperation&title=商务合作')" class="check" title="商务合作" />
|
||||
<info-item @click="goto('/pages/common/article?type=spage&name=terms_of_service&title=用户协议')" class="check" title="用户协议" />
|
||||
<info-item @click="goto('/pages/common/article?type=spage&name=privacy_policy&title=隐私政策')" class="check" title="隐私政策" />
|
||||
<info-item @click="goto('/pages/common/article?type=spage&name=aboutus&title=关于我们')" class="check" title="关于我们" />
|
||||
<info-item @click="clearcache" class="check" title="清除缓存" />
|
||||
<info-item @click="show = true" class="check" title="上传调试日志" />
|
||||
<info-item v-if="1==2" @click="show = true" class="check" title="上传调试日志" />
|
||||
|
||||
<u-modal showCancelButton :show="show" title="上传日志" @confirm="uploadLog" @cancel="show = false">
|
||||
<u-modal v-if="1==2" showCancelButton :show="show" title="上传日志" @confirm="uploadLog" @cancel="show = false">
|
||||
<view class="slot-content">
|
||||
<u--input placeholder="日志数量" border="surround" v-model="line"></u--input>
|
||||
</view>
|
||||
@@ -31,7 +31,7 @@
|
||||
import InfoItem from "../selfInfo/InfoItem.vue";
|
||||
import {checkUpgrade} from "@/api/login.js"
|
||||
import { mapGetters } from "vuex";
|
||||
import util from "@/util/index.js"
|
||||
import util from "@/util/index.js"
|
||||
export default {
|
||||
components: {
|
||||
CustomNavBar,
|
||||
@@ -113,27 +113,16 @@ import util from "@/util/index.js"
|
||||
checkUpdate() {
|
||||
this.loading = true;
|
||||
const _this = this;
|
||||
let system = uni.getSystemInfoSync();
|
||||
plus.runtime.getProperty(plus.runtime.appid, function(inf) {
|
||||
checkUpgrade({version:system.appVersion,platform:system.platform,version_wgt:inf.versionCode}).then(res=>{
|
||||
_this.loading = false;
|
||||
if(!res.data){
|
||||
uni.showToast({
|
||||
title:"已经是最新版本"
|
||||
})
|
||||
return ;
|
||||
}
|
||||
let skip_version = uni.getStorageSync('skip_version')
|
||||
if(res && res.version!=skip_version){
|
||||
uni.$emit('closeWebview')
|
||||
_this.setShow(_this.current, false)
|
||||
uni.navigateTo({
|
||||
url: '/pages/common/upgrade?model=' + JSON.stringify(res),
|
||||
animationType:"fade-in"
|
||||
});
|
||||
}
|
||||
})
|
||||
})
|
||||
checkUpgrade().then(res=>{
|
||||
_this.loading = false;
|
||||
}).catch(e=>{
|
||||
console.log(e);
|
||||
if(e === true){
|
||||
uni.showToast({title:'已经是最新版本'})
|
||||
return ;
|
||||
}
|
||||
_this.loading = false;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -152,10 +141,11 @@ import util from "@/util/index.js"
|
||||
border-radius: 6px;
|
||||
padding: 48rpx 0 16rpx 0;
|
||||
color: $uni-text-color;
|
||||
|
||||
image {
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
|
||||
.logo{
|
||||
border-radius: 32rpx;
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<view class="id_row">
|
||||
<text class="nickname">{{ selfInfo.nickname }}</text>
|
||||
<view class="id_row_copy" @click="copy">
|
||||
<text class="id">{{ selfInfo.userID }}</text>
|
||||
<text class="id">瞬聊号:{{ selfInfo.userID }}</text>
|
||||
<image style="width: 32rpx; height: 32rpx" src="@/static/images/id_copy.png" mode="" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -55,16 +55,15 @@
|
||||
return this.$store.getters.storeSelfInfo;
|
||||
},
|
||||
getGender() {
|
||||
if (this.selfInfo.sex === 0) {
|
||||
if (this.selfInfo.sex == 0) {
|
||||
return "保密";
|
||||
}
|
||||
if (this.selfInfo.sex === 1) {
|
||||
if (this.selfInfo.sex == 1) {
|
||||
return "男";
|
||||
}
|
||||
return "女";
|
||||
},
|
||||
getBirth() {
|
||||
console.log(this.selfInfo);
|
||||
const birth = this.selfInfo.birthday ?? 0;
|
||||
return dayjs(birth).format("YYYY-MM-DD");
|
||||
},
|
||||
@@ -153,6 +152,7 @@
|
||||
},
|
||||
confirmDate({value}) {
|
||||
this.loadingState.birth = true;
|
||||
console.log(this.$store.getters.storeSelfInfo.faceURL);
|
||||
this.updateSelfInfo({birth: value,},"birth",);
|
||||
this.showDatePicker = false;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user