19
This commit is contained in:
@@ -48,11 +48,7 @@
|
||||
|
||||
<script>
|
||||
import { ContactChooseTypes } from "@/constant";
|
||||
import IMSDK, {
|
||||
GroupType,
|
||||
IMMethods,
|
||||
SessionType,
|
||||
} from "openim-uniapp-polyfill";
|
||||
import IMSDK, {GroupType,IMMethods,SessionType,} from "openim-uniapp-polyfill";
|
||||
import CustomNavBar from "@/components/CustomNavBar/index.vue";
|
||||
import MyAvatar from "@/components/MyAvatar/index.vue";
|
||||
import { navigateToDesignatedConversation } from "@/util/imCommon";
|
||||
|
||||
@@ -1,94 +1,93 @@
|
||||
<template>
|
||||
<view class="details_container">
|
||||
<custom-nav-bar title="个人资料" />
|
||||
<view class="details_container">
|
||||
<custom-nav-bar title="个人资料" />
|
||||
|
||||
<view class="info_list">
|
||||
<user-info-row-item class="info_item" lable="头像" arrow>
|
||||
<my-avatar
|
||||
:src="sourceInfo.faceURL"
|
||||
:desc="sourceInfo.nickname"
|
||||
size="26"
|
||||
/>
|
||||
</user-info-row-item>
|
||||
<user-info-row-item class="info_item" lable="昵称" arrow>
|
||||
<text class="right_content">{{ sourceInfo.nickname }}</text>
|
||||
</user-info-row-item>
|
||||
<user-info-row-item class="info_item" lable="性别" arrow>
|
||||
<text class="right_content">{{ getGender }}</text>
|
||||
</user-info-row-item>
|
||||
<user-info-row-item class="info_item" lable="生日" arrow>
|
||||
<text class="right_content">{{ getBirthStr }}</text>
|
||||
</user-info-row-item>
|
||||
</view>
|
||||
<view class="info_list">
|
||||
<user-info-row-item class="info_item" lable="头像" arrow>
|
||||
<my-avatar :src="sourceInfo.faceURL" :desc="sourceInfo.nickname" size="26" />
|
||||
</user-info-row-item>
|
||||
<user-info-row-item class="info_item" lable="昵称" arrow>
|
||||
<text class="right_content">{{ sourceInfo.nickname }}</text>
|
||||
</user-info-row-item>
|
||||
<user-info-row-item class="info_item" lable="性别" arrow>
|
||||
<text class="right_content">{{ getGender }}</text>
|
||||
</user-info-row-item>
|
||||
<user-info-row-item class="info_item" lable="生日" arrow>
|
||||
<text class="right_content">{{ getBirthStr }}</text>
|
||||
</user-info-row-item>
|
||||
</view>
|
||||
|
||||
<view class="info_list">
|
||||
<user-info-row-item class="info_item" lable="手机号码" arrow>
|
||||
<text class="right_content">{{ sourceInfo.phoneNumber || "-" }}</text>
|
||||
</user-info-row-item>
|
||||
<user-info-row-item class="info_item" lable="邮箱" arrow>
|
||||
<text class="right_content">{{ sourceInfo.email || "-" }}</text>
|
||||
</user-info-row-item>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info_list">
|
||||
<user-info-row-item class="info_item" lable="手机号码" arrow>
|
||||
<text class="right_content">{{ sourceInfo.phoneNumber || "-" }}</text>
|
||||
</user-info-row-item>
|
||||
<user-info-row-item class="info_item" lable="邮箱" arrow>
|
||||
<text class="right_content">{{ sourceInfo.email || "-" }}</text>
|
||||
</user-info-row-item>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import dayjs from "dayjs";
|
||||
import CustomNavBar from "@/components/CustomNavBar/index.vue";
|
||||
import MyAvatar from "@/components/MyAvatar/index.vue";
|
||||
import UserInfoRowItem from "../userCard/components/UserInfoRowItem.vue";
|
||||
export default {
|
||||
components: {
|
||||
CustomNavBar,
|
||||
MyAvatar,
|
||||
UserInfoRowItem,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
sourceInfo: {},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
getGender() {
|
||||
if (this.sourceInfo.gender === 1) {
|
||||
return "男";
|
||||
}
|
||||
if (this.sourceInfo.gender === 2) {
|
||||
return "女";
|
||||
}
|
||||
return "保密";
|
||||
},
|
||||
getBirthStr() {
|
||||
const birth = this.sourceInfo.birth ?? 0;
|
||||
return dayjs(birth).format("YYYY-MM-DD");
|
||||
},
|
||||
},
|
||||
onLoad(options) {
|
||||
const { sourceInfo } = options;
|
||||
this.sourceInfo = JSON.parse(sourceInfo);
|
||||
},
|
||||
};
|
||||
import dayjs from "dayjs";
|
||||
import CustomNavBar from "@/components/CustomNavBar/index.vue";
|
||||
import MyAvatar from "@/components/MyAvatar/index.vue";
|
||||
import UserInfoRowItem from "../userCard/components/UserInfoRowItem.vue";
|
||||
import util from "@/util/index.js"
|
||||
export default {
|
||||
components: {
|
||||
CustomNavBar,
|
||||
MyAvatar,
|
||||
UserInfoRowItem,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
sourceInfo: {},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
getGender() {
|
||||
if (this.sourceInfo.gender === 1) {
|
||||
return "男";
|
||||
}
|
||||
if (this.sourceInfo.gender === 2) {
|
||||
return "女";
|
||||
}
|
||||
return "保密";
|
||||
},
|
||||
getBirthStr() {
|
||||
const birth = this.sourceInfo.birth ?? 0;
|
||||
return dayjs(birth).format("YYYY-MM-DD");
|
||||
},
|
||||
},
|
||||
onLoad(options) {
|
||||
const {
|
||||
sourceInfo
|
||||
} = options;
|
||||
this.sourceInfo = util.aesdecode(sourceInfo);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.details_container {
|
||||
@include colBox(false);
|
||||
height: 100vh;
|
||||
background-color: #f6f6f6;
|
||||
.details_container {
|
||||
@include colBox(false);
|
||||
height: 100vh;
|
||||
background-color: #f6f6f6;
|
||||
|
||||
.info_list {
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
margin: 24rpx;
|
||||
.info_list {
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
margin: 24rpx;
|
||||
|
||||
.info_item {
|
||||
background-color: #fff;
|
||||
// border-bottom: 1px solid rgba(153, 153, 153, 0.3);
|
||||
.info_item {
|
||||
background-color: #fff;
|
||||
// border-bottom: 1px solid rgba(153, 153, 153, 0.3);
|
||||
|
||||
.right_content {
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
.right_content {
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -50,6 +50,7 @@
|
||||
import {navigateToDesignatedConversation} from "@/util/imCommon";
|
||||
import IMSDK, {GroupVerificationType,SessionType,} from "openim-uniapp-polyfill";
|
||||
import dayjs from "dayjs";
|
||||
import util from "@/util/index.js"
|
||||
import MyAvatar from "@/components/MyAvatar/index.vue";
|
||||
import CustomNavBar from "@/components/CustomNavBar/index.vue";
|
||||
import UserInfoRowItem from "../userCard/components/UserInfoRowItem.vue";
|
||||
@@ -94,7 +95,7 @@
|
||||
this.sourceID = sourceID;
|
||||
this.getSourceGroupInfo();
|
||||
} else {
|
||||
const info = JSON.parse(sourceInfo);
|
||||
const info = util.aesdecode(sourceInfo);
|
||||
this.sourceID = info.groupID;
|
||||
this.sourceGroupInfo = {
|
||||
...info,
|
||||
|
||||
@@ -68,6 +68,8 @@ import { checkLoginError } from "@/util/common";
|
||||
import { SmsUserFor } from "@/constant";
|
||||
import IMSDK from "openim-uniapp-polyfill";
|
||||
import util from "@/util/index.js"
|
||||
import config from "@/common/config";
|
||||
import {getDbDir,toastWithCallback} from "@/util/common.js";
|
||||
|
||||
let timer;
|
||||
|
||||
@@ -145,59 +147,48 @@ export default {
|
||||
this.loginInfo.email = "commiu@outlook.com";
|
||||
this.loginInfo.password = "qwe123";
|
||||
}
|
||||
plus.navigator.closeSplashscreen();
|
||||
},
|
||||
updateEye() {
|
||||
this.eying = !this.eying;
|
||||
},
|
||||
toRegisterOrForget(isRegister) {
|
||||
uni.$u.route("/pages/common/login/index", {
|
||||
uni.$u.route("/pages/common/registerOrForget/index", {
|
||||
isRegister,
|
||||
});
|
||||
},
|
||||
async startLogin() {
|
||||
// this.$refs.loginForm.validate().then(async (valid) => {
|
||||
this.loading = true;
|
||||
this.saveLoginInfo();
|
||||
let data = {};
|
||||
try {
|
||||
data = await businessLogin({
|
||||
mobile: this.loginInfo.phoneNumber,
|
||||
email: this.loginInfo.email,
|
||||
region: `+${this.loginInfo.region}`,
|
||||
password: this.isPwdLogin ? md5(this.loginInfo.password) : "",
|
||||
platform: uni.$u.os(),
|
||||
type: this.active === 0 ? 'mobile' : 'email',
|
||||
code: this.loginInfo.verificationCode,
|
||||
});
|
||||
const { imToken, userID } = data;
|
||||
// #ifdef APP
|
||||
await IMSDK.asyncApi(IMSDK.IMMethods.Login, uuidv4(), {
|
||||
userID,
|
||||
token: imToken,
|
||||
});
|
||||
// #endif
|
||||
this.saveLoginProfile(data);
|
||||
this.$store.commit("user/SET_AUTH_DATA", data);
|
||||
this.$store.dispatch("user/getSelfInfo");
|
||||
this.$store.dispatch("conversation/getConversationList");
|
||||
this.$store.dispatch("conversation/getUnReadCount");
|
||||
// this.$store.dispatch("contact/getFriendList");
|
||||
// this.$store.dispatch("contact/getGrouplist");
|
||||
this.$store.dispatch("contact/getBlacklist");
|
||||
this.$store.dispatch("contact/getRecvFriendApplications");
|
||||
this.$store.dispatch("contact/getSentFriendApplications");
|
||||
this.$store.dispatch("contact/getRecvGroupApplications");
|
||||
this.$store.dispatch("contact/getSentGroupApplications");
|
||||
uni.switchTab({
|
||||
url: "/pages/conversation/conversationList/index",
|
||||
});
|
||||
this.loginInfo.password = "";
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
uni.$u.toast(checkLoginError(err));
|
||||
}
|
||||
this.loading = false;
|
||||
// });
|
||||
this.$refs.loginForm.validate().then(async (valid) => {
|
||||
this.loading = true;
|
||||
this.saveLoginInfo();
|
||||
let data = {};
|
||||
try {
|
||||
data = await businessLogin({
|
||||
mobile: this.loginInfo.phoneNumber,
|
||||
email: this.loginInfo.email,
|
||||
region: `+${this.loginInfo.region}`,
|
||||
password: this.isPwdLogin ? md5(this.loginInfo.password) : "",
|
||||
platform: uni.$u.os(),
|
||||
type: this.active === 0 ? 'mobile' : 'email',
|
||||
code: this.loginInfo.verificationCode,
|
||||
});
|
||||
const { imToken, userID } = data;
|
||||
this.saveLoginProfile(data);
|
||||
this.$store.commit("user/SET_AUTH_DATA", data);
|
||||
this.loginInfo.password = "";
|
||||
// #ifdef APP
|
||||
// await IMSDK.asyncApi(IMSDK.IMMethods.Login, uuidv4(), {
|
||||
// userID,
|
||||
// token: imToken,
|
||||
// });
|
||||
plus.runtime.restart();
|
||||
// #endif
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
uni.$u.toast(checkLoginError(err));
|
||||
}
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
saveLoginProfile(data) {
|
||||
const { imToken, token, userID } = data;
|
||||
|
||||
+46
-12
@@ -1,16 +1,12 @@
|
||||
<template>
|
||||
<view class="map_page">
|
||||
<u-navbar left-icon="arrow-left" @leftClick="back" placeholder bgColor="transparent">
|
||||
<template slot="right">
|
||||
<u-button type="primary" class="confirm_btn" size="mini" @click="confirm">确定</u-button>
|
||||
</template>
|
||||
</u-navbar>
|
||||
<view style="display: flex; flex-direction: column; height: 100%;">
|
||||
<!-- 使用web-view嵌入天地图 -->
|
||||
<ly-map class="ly-map"
|
||||
v-if="lng && lat"
|
||||
@onUserEvent="onUserEvent"
|
||||
ref="map"
|
||||
:type="type"
|
||||
:lonlat=[lng,lat]
|
||||
:map-key="apikey" />
|
||||
<view class="search_container" v-if="1==2">
|
||||
@@ -24,10 +20,20 @@
|
||||
</u-cell-group>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="map_info" v-if="type == 'viewlocation'">
|
||||
<view class="left">
|
||||
<u-text wordWrap="anywhere" size="16" :text="address"></u-text>
|
||||
</view>
|
||||
<u-button @click="gotoMap" class="right">
|
||||
<uni-icons size="36" color="#07c160" type="paperplane-filled"></uni-icons>
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import util from "@/util/index.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -53,6 +59,7 @@
|
||||
if(opt.address){
|
||||
this.address = opt.address;
|
||||
}
|
||||
console.log(this.type)
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
@@ -72,10 +79,12 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
gotoMap(){
|
||||
util.toMapAPP(this.lng,this.lat,this.address);
|
||||
},
|
||||
onUserEvent(e) {
|
||||
//console.log(e)
|
||||
if(this.type=='chooselocation'){
|
||||
if(e.type == "move"){
|
||||
if(e.type == "move"){
|
||||
if(this.type=='chooselocation'){
|
||||
this.lng = e.lng;
|
||||
this.lat = e.lat;
|
||||
this.$refs.map.setMarkers([
|
||||
@@ -84,10 +93,22 @@
|
||||
lat: Number(e.lat)
|
||||
}
|
||||
]);
|
||||
return ;
|
||||
}
|
||||
if(this.type=='viewlocation'){
|
||||
return ;
|
||||
}
|
||||
return ;
|
||||
}
|
||||
if(this.type=='viewlocation'){
|
||||
if(e.type=='back'){
|
||||
uni.navigateBack();
|
||||
return ;
|
||||
}
|
||||
if(e.type=='confirm'){
|
||||
this.confirm();
|
||||
return ;
|
||||
}
|
||||
//console.log(e)
|
||||
},
|
||||
/**
|
||||
* 确定位置按钮点击
|
||||
@@ -153,8 +174,21 @@
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.confirm_btn{
|
||||
padding: 30rpx 10rpx;
|
||||
.map_info{
|
||||
height: 100rpx;
|
||||
padding: 50rpx 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.left{
|
||||
flex:1;
|
||||
}
|
||||
.right{
|
||||
width: 100rpx;
|
||||
.u-button{
|
||||
background-color: #ccc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
<script>
|
||||
import IMSDK from "openim-uniapp-polyfill";
|
||||
import util from "@/util/index.js"
|
||||
|
||||
import CustomNavBar from "@/components/CustomNavBar/index.vue";
|
||||
import {
|
||||
@@ -56,7 +57,7 @@
|
||||
isSelfNickname,
|
||||
sourceInfo
|
||||
} = options;
|
||||
this.sourceInfo = JSON.parse(sourceInfo);
|
||||
this.sourceInfo = util.aesdecode(sourceInfo);
|
||||
console.log(sourceInfo);
|
||||
console.log(this.sourceInfo);
|
||||
this.isRemark = !!isRemark;
|
||||
|
||||
@@ -34,15 +34,10 @@
|
||||
|
||||
<script>
|
||||
import AreaPicker from "@/components/AreaPicker";
|
||||
import {
|
||||
businessSendSms
|
||||
} from "@/api/login";
|
||||
import {
|
||||
SmsUserFor
|
||||
} from "@/constant";
|
||||
import {
|
||||
checkLoginError
|
||||
} from "@/util/common";
|
||||
import {businessSendSms} from "@/api/login";
|
||||
import {SmsUserFor} from "@/constant";
|
||||
import {checkLoginError} from "@/util/common";
|
||||
import util from "@/util/index.js"
|
||||
export default {
|
||||
components: {
|
||||
AreaPicker,
|
||||
@@ -99,7 +94,7 @@
|
||||
setTimeout(
|
||||
() =>
|
||||
uni.$u.route("/pages/common/verifyCode/index", {
|
||||
userInfo: JSON.stringify(this.userInfo),
|
||||
userInfo: util.aesencode(this.userInfo),
|
||||
isRegister: this.isRegister,
|
||||
}),
|
||||
1000,
|
||||
|
||||
+17
-31
@@ -1,24 +1,9 @@
|
||||
<template>
|
||||
<view class="scan_page" :style="{height:windowHeight+'px'}">
|
||||
<uni-nav-bar
|
||||
left-icon="back"
|
||||
@clickLeft="back"
|
||||
fixed
|
||||
backgroundColor="#FFF"
|
||||
statusBar
|
||||
>
|
||||
<uni-nav-bar left-icon="back" @clickLeft="back" fixed backgroundColor="#FFF" statusBar>
|
||||
</uni-nav-bar>
|
||||
<barcode id='1'
|
||||
class="barcode"
|
||||
ref="barcode"
|
||||
:autostart="true"
|
||||
background="rgb(0,0,0)"
|
||||
frameColor="#07c160"
|
||||
scanbarColor="#07c160"
|
||||
:style="{height:windowHeight+'px'}"
|
||||
:filters="fil"
|
||||
@marked="success"
|
||||
@error="fail">
|
||||
<barcode id='1' class="barcode" ref="barcode" :autostart="true" background="rgb(0,0,0)" frameColor="#07c160"
|
||||
scanbarColor="#07c160" :style="{height:windowHeight+'px'}" :filters="fil" @marked="success" @error="fail">
|
||||
</barcode>
|
||||
<view class="overlay">
|
||||
<button class="btn" @click="toStart">开始扫码识别</button>
|
||||
@@ -33,8 +18,8 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
fil: [0, 2, 1,3,4,12],
|
||||
windowHeight:500,
|
||||
fil: [0, 2, 1, 3, 4, 12],
|
||||
windowHeight: 500,
|
||||
}
|
||||
},
|
||||
|
||||
@@ -52,10 +37,10 @@
|
||||
},
|
||||
methods: {
|
||||
success(e) {
|
||||
console.log("success1:" + JSON.stringify(e));
|
||||
//console.log("success1:" + JSO1N.stringify(e));
|
||||
},
|
||||
fail(e) {
|
||||
console.log("fail1:" + JSON.stringify(e));
|
||||
//console.log("fail1:" + JSON1.stringify(e));
|
||||
},
|
||||
toStart: function() {
|
||||
this.$refs.barcode.start({
|
||||
@@ -63,7 +48,7 @@
|
||||
filename: '_doc/barcode/'
|
||||
});
|
||||
},
|
||||
tocancel:function(){
|
||||
tocancel: function() {
|
||||
this.$refs.barcode.cancel();
|
||||
},
|
||||
toFlash: function() {
|
||||
@@ -73,12 +58,11 @@
|
||||
toscan: function() {
|
||||
console.log("scan:");
|
||||
const barcodeModule = uni.requireNativePlugin('barcodeScan');
|
||||
barcodeModule.scan("/static/barcode1.png"
|
||||
,(e)=>{
|
||||
console.log("scan_error:"+JSON.stringify(e));
|
||||
barcodeModule.scan("/static/barcode1.png", (e) => {
|
||||
console.log("scan_error:", e);
|
||||
});
|
||||
},
|
||||
back(){
|
||||
back() {
|
||||
uni.navigateBack();
|
||||
}
|
||||
}
|
||||
@@ -86,14 +70,15 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.scan_page{
|
||||
.scan_page {
|
||||
width: 750rpx;
|
||||
position: relative;
|
||||
|
||||
.barcode {
|
||||
width: 750rpx;
|
||||
background-color: #808080;
|
||||
}
|
||||
|
||||
|
||||
.btn {
|
||||
top: 20rpx;
|
||||
width: 730rpx;
|
||||
@@ -102,7 +87,8 @@
|
||||
background-color: #458B00;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.overlay{
|
||||
|
||||
.overlay {
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
position: absolute;
|
||||
bottom: 100rpx;
|
||||
@@ -111,4 +97,4 @@
|
||||
height: 200rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -32,9 +32,8 @@
|
||||
|
||||
import searchGroup from "static/images/contact_add_join_group_fill.png";
|
||||
import searchUser from "static/images/contact_add_search_user_fill.png";
|
||||
import {
|
||||
businessSearchUserInfo
|
||||
} from "@/api/login";
|
||||
import {businessSearchUserInfo} from "@/api/login";
|
||||
import util from "@/util/index.js"
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -87,8 +86,9 @@
|
||||
info = data[0];
|
||||
}
|
||||
if (info) {
|
||||
const s = util.aesencode(info);
|
||||
uni.navigateTo({
|
||||
url: `/pages/common/groupCard/index?sourceInfo=${JSON.stringify(info,)}`,
|
||||
url: `/pages/common/groupCard/index?sourceInfo=${s}`,
|
||||
});
|
||||
} else {
|
||||
this.empty = true;
|
||||
@@ -116,7 +116,7 @@
|
||||
console.log(info)
|
||||
if (info) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/common/userCard/index?sourceInfo=${JSON.stringify(info,)}`,
|
||||
url: `/pages/common/userCard/index?sourceID=${info.userID}`,
|
||||
});
|
||||
} else {
|
||||
this.empty = true;
|
||||
|
||||
@@ -30,9 +30,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
businessReset
|
||||
} from "@/api/login";
|
||||
import {businessReset} from "@/api/login";
|
||||
import util from "@/util/index.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -89,8 +88,8 @@
|
||||
isRegister,
|
||||
codeValue
|
||||
} = options;
|
||||
this.userInfo = JSON.parse(userInfo);
|
||||
this.isRegister = JSON.parse(isRegister);
|
||||
this.userInfo = util.aesdecode(userInfo);
|
||||
this.isRegister = util.parse(isRegister);
|
||||
this.codeValue = codeValue;
|
||||
},
|
||||
onBackPress() {
|
||||
@@ -112,7 +111,7 @@
|
||||
businessReset(options)
|
||||
.then(() => {
|
||||
uni.$u.toast("密码重置成功,请前往登录!");
|
||||
setTimeout(() => uni.$u.route("/pages/login/index"), 1000);
|
||||
setTimeout(() => uni.$u.route("/pages/common/login/index"), 1000);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log('err', err)
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
import { mapGetters } from "vuex";
|
||||
import { businessRegister } from "@/api/login";
|
||||
import { checkLoginError } from "@/util/common";
|
||||
import util from "@/util/index.js"
|
||||
export default {
|
||||
components: {
|
||||
MyAvatar,
|
||||
@@ -104,7 +105,7 @@
|
||||
const {userInfo,codeValue} = options;
|
||||
this.userInfo = {
|
||||
...this.userInfo,
|
||||
...JSON.parse(userInfo),
|
||||
...util.aesdecode(userInfo),
|
||||
};
|
||||
this.codeValue = codeValue;
|
||||
if(process.env.NODE_ENV == 'development'){
|
||||
@@ -143,12 +144,13 @@
|
||||
await businessRegister(options);
|
||||
this.saveLoginInfo();
|
||||
uni.$u.toast('注册成功')
|
||||
uni.$u.route("/pages/login/index")
|
||||
uni.$u.route("/pages/common/login/index")
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
if(err.msg=="验证码过期" || err.msg=="验证码错误"){
|
||||
const s = util.aesencode(this.userInfo);
|
||||
uni.$u.route("/pages/common/verifyCode/index", {
|
||||
userInfo: JSON.stringify(this.userInfo),
|
||||
userInfo: s,
|
||||
isRegister: true,
|
||||
resend: 1,
|
||||
})
|
||||
|
||||
@@ -1,51 +1,55 @@
|
||||
<template>
|
||||
<view @click="click" class="row_item" :class="{ arrow_right: arrow }">
|
||||
<view class="title">
|
||||
<text>{{ lable }}</text>
|
||||
</view>
|
||||
<view class="content">
|
||||
<text>{{ content }}</text>
|
||||
</view>
|
||||
<slot>
|
||||
<u-icon v-if="arrow" name="arrow-right" color="#999" size="20"></u-icon>
|
||||
</slot>
|
||||
</view>
|
||||
<view @click="click" class="row_item" :class="{ arrow_right: arrow }">
|
||||
<view class="title">
|
||||
<text>{{ lable }}</text>
|
||||
</view>
|
||||
<view class="content">
|
||||
<text>{{ content }}</text>
|
||||
</view>
|
||||
<slot>
|
||||
<u-icon v-if="arrow" name="arrow-right" color="#999" size="20"></u-icon>
|
||||
</slot>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "",
|
||||
components: {},
|
||||
props: {
|
||||
lable: String,
|
||||
content: String,
|
||||
arrow: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
methods: {
|
||||
click() {
|
||||
this.$emit("click");
|
||||
},
|
||||
},
|
||||
};
|
||||
export default {
|
||||
name: "",
|
||||
components: {},
|
||||
props: {
|
||||
lable: String,
|
||||
content: String,
|
||||
arrow: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
methods: {
|
||||
click() {
|
||||
this.$emit("click");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.row_item {
|
||||
@include vCenterBox();
|
||||
padding: 24rpx 44rpx;
|
||||
}
|
||||
.row_item {
|
||||
@include vCenterBox();
|
||||
padding: 24rpx 44rpx;
|
||||
.content{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
.title {
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
|
||||
.arrow_right {
|
||||
justify-content: space-between;
|
||||
}
|
||||
</style>
|
||||
.arrow_right {
|
||||
justify-content: space-between;
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<view class="user_card_container">
|
||||
<u-loading-page :loading="isLoading" loading-text="loading..."></u-loading-page>
|
||||
<custom-nav-bar title="" />
|
||||
<custom-nav-bar title="" @rightClick="toMoreInfo" more v-if="isFriend" />
|
||||
<custom-nav-bar title="" v-else />
|
||||
|
||||
<view v-if="!isLoading" style="flex: 1;display: flex;flex-direction: column;">
|
||||
<view class="base_info">
|
||||
@@ -9,10 +10,7 @@
|
||||
size="46" />
|
||||
<view class="user_name">
|
||||
<text class="text">{{ getShowName }}</text>
|
||||
<text class="id" @click="copy(sourceUserInfo.userID)">{{sourceUserInfo.userID}}</text>
|
||||
</view>
|
||||
<view class="add_btn" @click="toAddFriend" v-if="trySendRequest">
|
||||
<u-button type="primary" icon="man-add" text="添加"></u-button>
|
||||
<text class="id" @click="copy(sourceUserInfo.userID || sourceUserInfo.id)">{{sourceUserInfo.userID || sourceUserInfo.id}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info_row">
|
||||
@@ -20,15 +18,15 @@
|
||||
<user-info-row-item lable="生日" :content="getBirth" />
|
||||
<user-info-row-item lable="个性签名" :content="sourceUserInfo.bio" />
|
||||
</view>
|
||||
<view v-if="isFriend" class="info_row">
|
||||
<user-info-row-item @click="toMoreInfo" lable="个人资料" arrow />
|
||||
|
||||
<view class="info_row">
|
||||
<user-info-row-item v-if="isFriend" @click="toMoreInfo" lable="更多信息" arrow />
|
||||
<user-info-row-item v-if="1==1" @click="gotoCircle" lable="朋友圈" arrow />
|
||||
</view>
|
||||
|
||||
|
||||
<view class="action_row" v-if="!isSelf">
|
||||
<view @click="toDesignatedConversation" class="action_item">
|
||||
<img src="static/images/user_card_message.png" alt="" />
|
||||
<text>发消息</text>
|
||||
</view>
|
||||
<u-button type="primary" icon="chat" text="发消息" @click="toDesignatedConversation" v-if="isFriend"></u-button>
|
||||
<u-button type="primary" icon="man-add" text="添加" @click="toAddFriend" v-else></u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -43,6 +41,7 @@
|
||||
import UserInfoRowItem from "./components/UserInfoRowItem.vue";
|
||||
import {businessSearchUserInfo} from "@/api/login";
|
||||
import dayjs from "dayjs";
|
||||
import util from "@/util/index.js"
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -106,7 +105,7 @@
|
||||
if (sourceID) {
|
||||
this.sourceID = sourceID;
|
||||
} else {
|
||||
const info = JSON.parse(sourceInfo);
|
||||
const info = util.aesdecode(sourceInfo);
|
||||
this.sourceID = info.userID;
|
||||
}
|
||||
//console.log(this.storeSelfInfo);
|
||||
@@ -148,16 +147,8 @@
|
||||
try {
|
||||
const res = await businessSearchUserInfo(this.sourceID);
|
||||
if (res.total > 0) {
|
||||
const {
|
||||
data
|
||||
} = await IMSDK.asyncApi(
|
||||
IMSDK.IMMethods.GetUsersInfo,
|
||||
IMSDK.uuid(),
|
||||
[this.sourceID+''],
|
||||
);
|
||||
const imData = data[0]?.friendInfo ?? data[0]?.publicInfo ?? {};
|
||||
info = {
|
||||
...imData,
|
||||
...info,
|
||||
...res.data[0],
|
||||
};
|
||||
}
|
||||
@@ -177,6 +168,13 @@
|
||||
notNeedVerification: false,
|
||||
});
|
||||
},
|
||||
gotoCircle(){
|
||||
console.log('gotoCircle');
|
||||
return ;
|
||||
uni.navigateTo({
|
||||
url:"/pages/find/friend-circle/friend-circle?userId="+this.sourceID
|
||||
})
|
||||
},
|
||||
toDesignatedConversation() {
|
||||
navigateToDesignatedConversation(
|
||||
this.sourceID,
|
||||
@@ -185,8 +183,9 @@
|
||||
).catch(() => uni.$u.toast("获取会话信息失败"));
|
||||
},
|
||||
toMoreInfo() {
|
||||
const s = util.aesencode(this.sourceUserInfo);
|
||||
uni.navigateTo({
|
||||
url: `/pages/common/userCardMore/index?sourceInfo=${JSON.stringify(this.sourceUserInfo,)}`,
|
||||
url: `/pages/common/userCardMore/index?sourceInfo=${s}`,
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -207,16 +206,6 @@
|
||||
padding: 44rpx;
|
||||
margin-bottom: 18rpx;
|
||||
|
||||
.add_btn {
|
||||
width: 140rpx;
|
||||
height: 60rpx;
|
||||
margin-left: auto;
|
||||
|
||||
.u-button {
|
||||
width: 140rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.u-avatar {
|
||||
margin-right: 24rpx;
|
||||
@@ -226,7 +215,6 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 12rpx;
|
||||
height: 46px;
|
||||
|
||||
.text {
|
||||
@@ -271,23 +259,6 @@
|
||||
margin: 44rpx;
|
||||
flex: 1;
|
||||
|
||||
.action_item {
|
||||
width: 100%;
|
||||
@include colBox(true);
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 22rpx 0;
|
||||
background: $u-primary;
|
||||
color: #fff;
|
||||
border-radius: 12rpx;
|
||||
|
||||
img {
|
||||
margin-right: 16rpx;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.id {
|
||||
|
||||
@@ -26,9 +26,8 @@
|
||||
import IMSDK from "openim-uniapp-polyfill";
|
||||
import CustomNavBar from "@/components/CustomNavBar/index.vue";
|
||||
import UserInfoRowItem from "../userCard/components/UserInfoRowItem.vue";
|
||||
import {
|
||||
ContactChooseTypes
|
||||
} from "@/constant";
|
||||
import {ContactChooseTypes} from "@/constant";
|
||||
import util from "@/util/index.js"
|
||||
export default {
|
||||
components: {
|
||||
CustomNavBar,
|
||||
@@ -59,7 +58,7 @@
|
||||
},
|
||||
onLoad(options) {
|
||||
const {sourceInfo} = options;
|
||||
this.sourceInfo = JSON.parse(sourceInfo);
|
||||
this.sourceInfo = util.aesdecode(sourceInfo);
|
||||
},
|
||||
methods: {
|
||||
change(isBlack) {
|
||||
@@ -81,18 +80,21 @@
|
||||
.finally(() => (this.showConfirm = false));
|
||||
},
|
||||
toMore() {
|
||||
const s = util.aesencode(this.sourceInfo);
|
||||
uni.navigateTo({
|
||||
url: `/pages/common/detailsFileds/index?sourceInfo=${JSON.stringify(this.sourceInfo,)}`,
|
||||
url: `/pages/common/detailsFileds/index?sourceInfo=${s}`,
|
||||
});
|
||||
},
|
||||
toMark() {
|
||||
const s = util.aesencode(this.sourceInfo);
|
||||
uni.navigateTo({
|
||||
url: `/pages/common/markOrIDPage/index?isRemark=true&sourceInfo=${JSON.stringify(this.sourceInfo,)}`,
|
||||
url: `/pages/common/markOrIDPage/index?isRemark=true&sourceInfo=${s}`,
|
||||
});
|
||||
},
|
||||
toShare() {
|
||||
const s = util.aesencode(this.sourceInfo);
|
||||
uni.navigateTo({
|
||||
url: `/pages/common/contactChoose/index?type=${ContactChooseTypes.ShareCard}&cardInfo=${JSON.stringify(this.sourceInfo)}`,
|
||||
url: `/pages/common/contactChoose/index?type=${ContactChooseTypes.ShareCard}&cardInfo=${s}`,
|
||||
});
|
||||
},
|
||||
showToast(message) {
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
},
|
||||
onLoad(opt) {
|
||||
if(opt.sourceInfo){
|
||||
this.source = JSON.parse(opt.sourceInfo);
|
||||
this.source = util.aesdecode(opt.sourceInfo);
|
||||
}else{
|
||||
this.source = {
|
||||
type:"user",
|
||||
|
||||
@@ -22,10 +22,11 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import user from "../../../store/modules/user";
|
||||
import { businessSendSms, businessVerifyCode } from "@/api/login";
|
||||
import { SmsUserFor } from "@/constant";
|
||||
import { checkLoginError } from "@/util/common";
|
||||
import user from "@/store/modules/user";
|
||||
import {businessSendSms,businessVerifyCode} from "@/api/login";
|
||||
import {SmsUserFor} from "@/constant";
|
||||
import {checkLoginError } from "@/util/common";
|
||||
import util from "@/util/index.js"
|
||||
let timer;
|
||||
export default {
|
||||
data() {
|
||||
@@ -49,7 +50,7 @@
|
||||
resend
|
||||
} = options;
|
||||
console.log(userInfo,isRegister)
|
||||
this.userInfo = JSON.parse(userInfo);
|
||||
this.userInfo = util.aesdecode(userInfo);
|
||||
this.isRegister = JSON.parse(isRegister);
|
||||
if(resend == 1){
|
||||
this.count = 0;
|
||||
@@ -61,7 +62,7 @@
|
||||
onReady() {},
|
||||
methods: {
|
||||
back() {
|
||||
uni.$u.route("/pages/common/login/index", {
|
||||
uni.$u.route("/pages/common/registerOrForget/index", {
|
||||
isRegister: this.isRegister,
|
||||
});
|
||||
},
|
||||
@@ -76,15 +77,16 @@
|
||||
};
|
||||
businessVerifyCode(options)
|
||||
.then(() => {
|
||||
const s = util.aesencode(this.userInfo);
|
||||
if (this.isRegister) {
|
||||
uni.$u.route("/pages/common/setSelfInfo/index", {
|
||||
userInfo: JSON.stringify(this.userInfo),
|
||||
userInfo: s,
|
||||
isRegister: this.isRegister,
|
||||
codeValue: this.codeValue,
|
||||
});
|
||||
} else {
|
||||
uni.$u.route("/pages/common/setPassword/index", {
|
||||
userInfo: JSON.stringify(this.userInfo),
|
||||
userInfo: s,
|
||||
isRegister: !this.isRegister,
|
||||
codeValue: this.codeValue,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user