350
This commit is contained in:
@@ -13,17 +13,17 @@
|
||||
<text class="id" @click="copy(sourceUserInfo.userID || sourceUserInfo.id)">{{sourceUserInfo.userID || sourceUserInfo.id}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info_row">
|
||||
<user-info-row-item lable="性别" :content="getGender" />
|
||||
<user-info-row-item lable="生日" :content="getBirth" />
|
||||
<user-info-row-item lable="个性签名" :content="sourceUserInfo.bio" />
|
||||
</view>
|
||||
|
||||
<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>
|
||||
|
||||
<uni-list class="info_row">
|
||||
<uni-list-item title="性别" :rightText="getGender"></uni-list-item>
|
||||
<uni-list-item title="生日" :rightText="getBirth"></uni-list-item>
|
||||
<uni-list-item title="个性签名">
|
||||
<u--text slot="footer" color="#999" :text="sourceUserInfo.bio" :lines="2" wordWrap="anywhere"></u--text>
|
||||
</uni-list-item>
|
||||
</uni-list>
|
||||
<uni-list class="info_row" v-if="isFriend">
|
||||
<uni-list-item v-if="isFriend" title="性别" @click="toMoreInfo" clickable showArrow></uni-list-item>
|
||||
<uni-list-item v-if="1==2" title="朋友圈" @click="gotoCircle" clickable showArrow></uni-list-item>
|
||||
</uni-list>
|
||||
<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="man-add" text="添加" @click="toAddFriend" v-else></u-button>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<view v-if="item.files.length==1&&item.releaseType==1"
|
||||
class="u-flex u-row-left u-col-center"
|
||||
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>
|
||||
<view slot="error"
|
||||
class="u-flex u-row-left u-col-center"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</view>
|
||||
<!-- 个性签名 -->
|
||||
<view class="signature">
|
||||
<view class="">{{ storeSelfInfo.bio }}</view>
|
||||
<u--text :text="storeSelfInfo.bio" :lines="4" size="13" color="#999"></u--text>
|
||||
</view>
|
||||
|
||||
<view v-if="storeCircleUnreadCount>0" style="display: flex;justify-content: center;">
|
||||
@@ -384,7 +384,7 @@
|
||||
let that = this;
|
||||
let tempFilePaths = [];
|
||||
//拍照
|
||||
if (index == 0) {
|
||||
if (index == 1) {
|
||||
uni.chooseImage({
|
||||
count: 9, //默认9
|
||||
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
@@ -399,9 +399,10 @@
|
||||
return;
|
||||
}
|
||||
});
|
||||
return ;
|
||||
}
|
||||
//选择视频
|
||||
if (index == 1) {
|
||||
if (index == 2) {
|
||||
uni.chooseVideo({
|
||||
sourceType: ['camera', 'album'],
|
||||
maxDuration: 60,
|
||||
@@ -417,6 +418,7 @@
|
||||
return;
|
||||
}
|
||||
});
|
||||
return ;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
@@ -42,18 +42,23 @@
|
||||
<style lang="scss" scoped>
|
||||
.info_item {
|
||||
@include btwBox();
|
||||
height: 82rpx;
|
||||
min-height: 82rpx;
|
||||
padding: 0 44rpx;
|
||||
color: $uni-text-color;
|
||||
// border-bottom: 1px solid rgba(153,153,153,0.3);
|
||||
position: relative;
|
||||
|
||||
.left_label{
|
||||
width: 6em;
|
||||
}
|
||||
.right_value {
|
||||
flex: 1;
|
||||
@include vCenterBox();
|
||||
justify-content: flex-end;
|
||||
|
||||
.content {
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
|
||||
}
|
||||
|
||||
.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">
|
||||
<custom-nav-bar title="个人资料" />
|
||||
|
||||
<view class="info_wrap">
|
||||
<info-item :loading="loadingState.faceURL" @click="updateAvatar" title="头像">
|
||||
<my-avatar :src="selfInfo.faceURL" :desc="selfInfo.nickname" size="30" slot="value" />
|
||||
</info-item>
|
||||
<info-item @click="updateNickname" title="姓名" :content="selfInfo.nickname" />
|
||||
<info-item :loading="loadingState.gender" @click="updateGender" title="性别" :content="getGender" />
|
||||
<info-item :loading="loadingState.birth" @click="() => (showDatePicker = true)" title="生日"
|
||||
:content="getBirth" />
|
||||
</view>
|
||||
<uni-list class="info_wrap">
|
||||
<uni-list-item :loading="loadingState.faceURL" @click="updateAvatar" title="头像" clickable showArrow >
|
||||
<my-avatar :src="selfInfo.faceURL" :desc="selfInfo.nickname" size="30" slot="footer" />
|
||||
</uni-list-item>
|
||||
<uni-list-item @click="updateNickname" title="姓名" :rightText="selfInfo.nickname" clickable showArrow />
|
||||
<uni-list-item :loading="loadingState.gender" @click="updateGender" title="性别" :rightText="getGender" clickable showArrow />
|
||||
<uni-list-item :loading="loadingState.birth" @click="() => (showDatePicker = true)" title="生日"
|
||||
:rightText="getBirth" clickable showArrow />
|
||||
</uni-list>
|
||||
|
||||
<view class="info_wrap">
|
||||
<info-item :showArrow="false" title="手机号码" :content="selfInfo.mobile || '-'" />
|
||||
<info-item :showArrow="false" title="邮箱" :content="selfInfo.email || '-'" />
|
||||
</view>
|
||||
<uni-list class="info_wrap">
|
||||
<uni-list-item title="手机号码" :rightText="selfInfo.mobile || '-'"/>
|
||||
<uni-list-item title="邮箱" :rightText="selfInfo.email || '-'" />
|
||||
</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"
|
||||
@cancel="() => (showDatePicker = false)" v-model="selfInfo.birth" mode="date" />
|
||||
@@ -169,10 +174,14 @@
|
||||
},
|
||||
confirmDate({value}) {
|
||||
this.loadingState.birth = true;
|
||||
console.log(this.$store.getters.storeSelfInfo.faceURL);
|
||||
this.updateSelfInfo({birth: value,},"birth",);
|
||||
this.showDatePicker = false;
|
||||
},
|
||||
changeBio(){
|
||||
uni.navigateTo({
|
||||
url: `/pages/user/selfInfo/change_bio`,
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user