350
This commit is contained in:
+2
-2
@@ -2,8 +2,8 @@
|
|||||||
"name" : "瞬聊",
|
"name" : "瞬聊",
|
||||||
"appid" : "__UNI__E41111F",
|
"appid" : "__UNI__E41111F",
|
||||||
"description" : "一款即时聊天软件",
|
"description" : "一款即时聊天软件",
|
||||||
"versionName" : "3.4.8",
|
"versionName" : "3.5.0",
|
||||||
"versionCode" : 348,
|
"versionCode" : 350,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
"bounce" : "none",
|
"bounce" : "none",
|
||||||
|
|||||||
@@ -383,6 +383,12 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": ""
|
"navigationBarTitleText": ""
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/user/selfInfo/change_bio",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"tabBar": {
|
"tabBar": {
|
||||||
|
|||||||
@@ -13,17 +13,17 @@
|
|||||||
<text class="id" @click="copy(sourceUserInfo.userID || sourceUserInfo.id)">{{sourceUserInfo.userID || sourceUserInfo.id}}</text>
|
<text class="id" @click="copy(sourceUserInfo.userID || sourceUserInfo.id)">{{sourceUserInfo.userID || sourceUserInfo.id}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="info_row">
|
<uni-list class="info_row">
|
||||||
<user-info-row-item lable="性别" :content="getGender" />
|
<uni-list-item title="性别" :rightText="getGender"></uni-list-item>
|
||||||
<user-info-row-item lable="生日" :content="getBirth" />
|
<uni-list-item title="生日" :rightText="getBirth"></uni-list-item>
|
||||||
<user-info-row-item lable="个性签名" :content="sourceUserInfo.bio" />
|
<uni-list-item title="个性签名">
|
||||||
</view>
|
<u--text slot="footer" color="#999" :text="sourceUserInfo.bio" :lines="2" wordWrap="anywhere"></u--text>
|
||||||
|
</uni-list-item>
|
||||||
<view class="info_row">
|
</uni-list>
|
||||||
<user-info-row-item v-if="isFriend" @click="toMoreInfo" lable="更多信息" arrow />
|
<uni-list class="info_row" v-if="isFriend">
|
||||||
<user-info-row-item v-if="1==1" @click="gotoCircle" lable="朋友圈" arrow />
|
<uni-list-item v-if="isFriend" title="性别" @click="toMoreInfo" clickable showArrow></uni-list-item>
|
||||||
</view>
|
<uni-list-item v-if="1==2" title="朋友圈" @click="gotoCircle" clickable showArrow></uni-list-item>
|
||||||
|
</uni-list>
|
||||||
<view class="action_row" v-if="!isSelf">
|
<view class="action_row" v-if="!isSelf">
|
||||||
<u-button type="primary" icon="chat" text="发消息" @click="toDesignatedConversation" v-if="isFriend"></u-button>
|
<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>
|
<u-button type="primary" icon="man-add" text="添加" @click="toAddFriend" v-else></u-button>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<view v-if="item.files.length==1&&item.releaseType==1"
|
<view v-if="item.files.length==1&&item.releaseType==1"
|
||||||
class="u-flex u-row-left u-col-center"
|
class="u-flex u-row-left u-col-center"
|
||||||
style="width:100%;min-height: 200rpx;">
|
style="width:100%;min-height: 200rpx;">
|
||||||
<u-image width="280rpx" :src="cdn(item.files[0])" mode="widthFix" @tap="previewImg(0)">
|
<u-image width="280rpx" :src="cdn(item.files[0])" mode="aspectFill" @tap="previewImg(0)">
|
||||||
<u-loading-icon slot="loading"></u-loading-icon>
|
<u-loading-icon slot="loading"></u-loading-icon>
|
||||||
<view slot="error"
|
<view slot="error"
|
||||||
class="u-flex u-row-left u-col-center"
|
class="u-flex u-row-left u-col-center"
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- 个性签名 -->
|
<!-- 个性签名 -->
|
||||||
<view class="signature">
|
<view class="signature">
|
||||||
<view class="">{{ storeSelfInfo.bio }}</view>
|
<u--text :text="storeSelfInfo.bio" :lines="4" size="13" color="#999"></u--text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-if="storeCircleUnreadCount>0" style="display: flex;justify-content: center;">
|
<view v-if="storeCircleUnreadCount>0" style="display: flex;justify-content: center;">
|
||||||
@@ -384,7 +384,7 @@
|
|||||||
let that = this;
|
let that = this;
|
||||||
let tempFilePaths = [];
|
let tempFilePaths = [];
|
||||||
//拍照
|
//拍照
|
||||||
if (index == 0) {
|
if (index == 1) {
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
count: 9, //默认9
|
count: 9, //默认9
|
||||||
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||||
@@ -399,9 +399,10 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
return ;
|
||||||
}
|
}
|
||||||
//选择视频
|
//选择视频
|
||||||
if (index == 1) {
|
if (index == 2) {
|
||||||
uni.chooseVideo({
|
uni.chooseVideo({
|
||||||
sourceType: ['camera', 'album'],
|
sourceType: ['camera', 'album'],
|
||||||
maxDuration: 60,
|
maxDuration: 60,
|
||||||
@@ -417,6 +418,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -42,18 +42,23 @@
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.info_item {
|
.info_item {
|
||||||
@include btwBox();
|
@include btwBox();
|
||||||
height: 82rpx;
|
min-height: 82rpx;
|
||||||
padding: 0 44rpx;
|
padding: 0 44rpx;
|
||||||
color: $uni-text-color;
|
color: $uni-text-color;
|
||||||
// border-bottom: 1px solid rgba(153,153,153,0.3);
|
// border-bottom: 1px solid rgba(153,153,153,0.3);
|
||||||
position: relative;
|
position: relative;
|
||||||
|
.left_label{
|
||||||
|
width: 6em;
|
||||||
|
}
|
||||||
.right_value {
|
.right_value {
|
||||||
|
flex: 1;
|
||||||
@include vCenterBox();
|
@include vCenterBox();
|
||||||
|
justify-content: flex-end;
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #999;
|
color: #999;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.u-icon {
|
.u-icon {
|
||||||
|
|||||||
@@ -0,0 +1,80 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<u-navbar
|
||||||
|
title="个性签名"
|
||||||
|
placeholder
|
||||||
|
:autoBack="true"
|
||||||
|
>
|
||||||
|
<view class="u-nav-slot" slot="right">
|
||||||
|
<u-button type="primary" @click="save">保存</u-button>
|
||||||
|
</view>
|
||||||
|
</u-navbar>
|
||||||
|
<u--textarea
|
||||||
|
count
|
||||||
|
confirmType="done"
|
||||||
|
focus
|
||||||
|
autoHeight
|
||||||
|
height="500"
|
||||||
|
maxlength="100"
|
||||||
|
border="none"
|
||||||
|
:adjustPosition="false"
|
||||||
|
class="textarea"
|
||||||
|
placeholder="个性签名"
|
||||||
|
v-model="bio"
|
||||||
|
>
|
||||||
|
</u--textarea>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {mapGetters} from "vuex";
|
||||||
|
import {businessInfoUpdate} from "@/api/login";
|
||||||
|
export default {
|
||||||
|
computed: {
|
||||||
|
...mapGetters([
|
||||||
|
"storeSelfInfo"
|
||||||
|
])
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
bio:"",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.bio = this.storeSelfInfo.bio||"";
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
back(){
|
||||||
|
uni.navigateBack();
|
||||||
|
},
|
||||||
|
save(){
|
||||||
|
console.log(this.bio);
|
||||||
|
businessInfoUpdate({
|
||||||
|
userID: this.storeSelfInfo.userID,
|
||||||
|
bio:this.bio,
|
||||||
|
}).then(res=>{
|
||||||
|
this.$store.commit("user/SET_SELF_INFO",{
|
||||||
|
...this.storeSelfInfo,
|
||||||
|
bio:this.bio,
|
||||||
|
});
|
||||||
|
uni.navigateBack();
|
||||||
|
}).catch(e=>{
|
||||||
|
uni.showToast({
|
||||||
|
title: "保存失败",
|
||||||
|
icon: "none"
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.textarea{
|
||||||
|
}
|
||||||
|
.u-nav-slot{
|
||||||
|
.u-button{
|
||||||
|
height: 60rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -2,20 +2,25 @@
|
|||||||
<view class="page_container">
|
<view class="page_container">
|
||||||
<custom-nav-bar title="个人资料" />
|
<custom-nav-bar title="个人资料" />
|
||||||
|
|
||||||
<view class="info_wrap">
|
<uni-list class="info_wrap">
|
||||||
<info-item :loading="loadingState.faceURL" @click="updateAvatar" title="头像">
|
<uni-list-item :loading="loadingState.faceURL" @click="updateAvatar" title="头像" clickable showArrow >
|
||||||
<my-avatar :src="selfInfo.faceURL" :desc="selfInfo.nickname" size="30" slot="value" />
|
<my-avatar :src="selfInfo.faceURL" :desc="selfInfo.nickname" size="30" slot="footer" />
|
||||||
</info-item>
|
</uni-list-item>
|
||||||
<info-item @click="updateNickname" title="姓名" :content="selfInfo.nickname" />
|
<uni-list-item @click="updateNickname" title="姓名" :rightText="selfInfo.nickname" clickable showArrow />
|
||||||
<info-item :loading="loadingState.gender" @click="updateGender" title="性别" :content="getGender" />
|
<uni-list-item :loading="loadingState.gender" @click="updateGender" title="性别" :rightText="getGender" clickable showArrow />
|
||||||
<info-item :loading="loadingState.birth" @click="() => (showDatePicker = true)" title="生日"
|
<uni-list-item :loading="loadingState.birth" @click="() => (showDatePicker = true)" title="生日"
|
||||||
:content="getBirth" />
|
:rightText="getBirth" clickable showArrow />
|
||||||
</view>
|
</uni-list>
|
||||||
|
|
||||||
<view class="info_wrap">
|
<uni-list class="info_wrap">
|
||||||
<info-item :showArrow="false" title="手机号码" :content="selfInfo.mobile || '-'" />
|
<uni-list-item title="手机号码" :rightText="selfInfo.mobile || '-'"/>
|
||||||
<info-item :showArrow="false" title="邮箱" :content="selfInfo.email || '-'" />
|
<uni-list-item title="邮箱" :rightText="selfInfo.email || '-'" />
|
||||||
</view>
|
</uni-list>
|
||||||
|
<uni-list class="info_wrap">
|
||||||
|
<uni-list-item title="个性签名" @click="changeBio" clickable showArrow>
|
||||||
|
<u--text slot="footer" color="#999" :text="selfInfo.bio" :lines="2" wordWrap="anywhere"></u--text>
|
||||||
|
</uni-list-item>
|
||||||
|
</uni-list>
|
||||||
|
|
||||||
<u-datetime-picker :minDate="0" :maxDate="nowDate" :show="showDatePicker" @confirm="confirmDate"
|
<u-datetime-picker :minDate="0" :maxDate="nowDate" :show="showDatePicker" @confirm="confirmDate"
|
||||||
@cancel="() => (showDatePicker = false)" v-model="selfInfo.birth" mode="date" />
|
@cancel="() => (showDatePicker = false)" v-model="selfInfo.birth" mode="date" />
|
||||||
@@ -169,10 +174,14 @@
|
|||||||
},
|
},
|
||||||
confirmDate({value}) {
|
confirmDate({value}) {
|
||||||
this.loadingState.birth = true;
|
this.loadingState.birth = true;
|
||||||
console.log(this.$store.getters.storeSelfInfo.faceURL);
|
|
||||||
this.updateSelfInfo({birth: value,},"birth",);
|
this.updateSelfInfo({birth: value,},"birth",);
|
||||||
this.showDatePicker = false;
|
this.showDatePicker = false;
|
||||||
},
|
},
|
||||||
|
changeBio(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/user/selfInfo/change_bio`,
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user