Commit aa9dfc91 authored by liwei's avatar liwei

Merge remote-tracking branch 'origin/master'

parents e795e619 73d78161
...@@ -40,6 +40,10 @@ ...@@ -40,6 +40,10 @@
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "心仪的Ta" title: "心仪的Ta"
}) })
} else if (option.type == 4) {
uni.setNavigationBarTitle({
title: "未来规划"
})
} }
that.value = uni.getStorageSync("editText") that.value = uni.getStorageSync("editText")
...@@ -58,7 +62,6 @@ ...@@ -58,7 +62,6 @@
async saveAbout() { async saveAbout() {
var that = this; var that = this;
if (that.type == 1) { if (that.type == 1) {
var data = { var data = {
openId: uni.getStorageSync('userInfo').wxOpenid, openId: uni.getStorageSync('userInfo').wxOpenid,
memIntroduce: that.value memIntroduce: that.value
...@@ -73,6 +76,11 @@ ...@@ -73,6 +76,11 @@
openId: uni.getStorageSync('userInfo').wxOpenid, openId: uni.getStorageSync('userInfo').wxOpenid,
memHalfDesire: that.value memHalfDesire: that.value
}; };
} else if (that.type == 4) {
var data = {
openId: uni.getStorageSync('userInfo').wxOpenid,
memFuturePlan: that.value
};
} }
uni.showLoading({ uni.showLoading({
title: '保存中...' title: '保存中...'
......
...@@ -221,34 +221,6 @@ ...@@ -221,34 +221,6 @@
name="arrow-right" name="arrow-right"
></u-icon> ></u-icon>
</u-form-item> </u-form-item>
<u-form-item
label="自我介绍"
prop="memIntroduce"
borderBottom
>
<u--textarea v-model="userInfo.memIntroduce" placeholder="请输入自我介绍"></u--textarea>
</u-form-item>
<u-form-item
label="兴趣爱好"
prop="memHobby"
borderBottom
>
<u--textarea v-model="userInfo.memHobby" placeholder="请输入兴趣爱好" ></u--textarea>
</u-form-item>
<u-form-item
label="未来规划"
prop="memFuturePlan"
borderBottom
>
<u--textarea v-model="userInfo.memFuturePlan" placeholder="请输入未来规划" ></u--textarea>
</u-form-item>
<u-form-item
label="期待"
prop="memHalfDesire"
borderBottom
>
<u--textarea v-model="userInfo.memHalfDesire" placeholder="请输入期待" ></u--textarea>
</u-form-item>
<u-form-item <u-form-item
label="婚姻状况" label="婚姻状况"
prop="form.memMarriageText" prop="form.memMarriageText"
...@@ -364,6 +336,7 @@ ...@@ -364,6 +336,7 @@
@confirm="confirmMarriage" @confirm="confirmMarriage"
></u-picker> ></u-picker>
</view> </view>
<ELM ref="elm" :msg="tipMsg" :isConfirm="isConfirm" @confirm="confirm"></ELM>
</view> </view>
</template> </template>
...@@ -372,8 +345,10 @@ import UFormItem from "../../uni_modules/uview-ui/components/u-form-item/u-form- ...@@ -372,8 +345,10 @@ import UFormItem from "../../uni_modules/uview-ui/components/u-form-item/u-form-
import {getCity, getOptions, getResidence, getValue} from "../../common/options"; import {getCity, getOptions, getResidence, getValue} from "../../common/options";
import {updateUser, userDetail} from "../../api/user"; import {updateUser, userDetail} from "../../api/user";
import {calculateAge, parseDate} from "../../common"; import {calculateAge, parseDate} from "../../common";
import ELM from '@/components/elm-toast/index.vue';
export default { export default {
components: {UFormItem}, components: {UFormItem , ELM },
data() { data() {
return { return {
index:0, index:0,
...@@ -440,6 +415,8 @@ export default { ...@@ -440,6 +415,8 @@ export default {
memMbti:'',//人格 memMbti:'',//人格
}, },
form:{}, form:{},
tipMsg: '',
isConfirm: false,
birthday: Number(new Date()), birthday: Number(new Date()),
rules: { rules: {
// 'form.memNationText': [ // 'form.memNationText': [
...@@ -689,25 +666,23 @@ export default { ...@@ -689,25 +666,23 @@ export default {
this.$refs.uForm.validate().then(res => { this.$refs.uForm.validate().then(res => {
this.userInfo.openId= uni.getStorageSync('userInfo').wxOpenid this.userInfo.openId= uni.getStorageSync('userInfo').wxOpenid
updateUser(this.userInfo).then(response => { updateUser(this.userInfo).then(response => {
if (response.data.code === 200){ if (response.data.code == 200) {
uni.showToast({ this.isConfirm = true;
title: '修改成功', this.tipMsg = "修改成功";
icon: 'success', this.$refs.elm.showDialog();
}) } else {
setTimeout(() => { this.tipMsg = res.data.msg;
uni.navigateBack({ this.$refs.elm.showDialog();
delta: 1, //返回层数,2则上上页
},1000)
})
}else {
uni.showToast({
title: '修改失败',
icon: 'error',
})
} }
}) })
}) })
}, },
confirm() {
this.isConfirm = false;
uni.navigateBack({
delta: 1
})
},
reset() { reset() {
this.getUserInfo() this.getUserInfo()
}, },
......
<template> <template>
<view> <view style="padding-bottom: 100rpx">
<!-- 头像部分--> <!-- 头像部分-->
<view class="w-100 pt30 pb60"> <view class="w-100 pt30 pb60">
<view class="pr40 pl72 pt40 rowa" v-if="userInfo.avatarUrl == null"> <view class="pr40 pl72 pt40 rowa" v-if="userInfo.avatarUrl == null">
...@@ -106,12 +106,6 @@ ...@@ -106,12 +106,6 @@
<view class="name">{{ userInfo.memNickName ? userInfo.memNickName : '' }}</view> <view class="name">{{ userInfo.memNickName ? userInfo.memNickName : '' }}</view>
<image :src="baseUrl+'/user/famale.png'" mode="aspectFill" v-if="userInfo.memSex == '0'"></image> <image :src="baseUrl+'/user/famale.png'" mode="aspectFill" v-if="userInfo.memSex == '0'"></image>
<image :src="baseUrl+'/user/male.png'" mode="aspectFill" v-else></image> <image :src="baseUrl+'/user/male.png'" mode="aspectFill" v-else></image>
<view class="hint">
<image :src="baseUrl+'/user/auth.png'" mode="aspectFill"></image>
<view class="t">
{{ userInfo.memRealAuthen }}
</view>
</view>
</view> </view>
<view class="box-bq"> <view class="box-bq">
<view> <view>
...@@ -225,6 +219,21 @@ ...@@ -225,6 +219,21 @@
<view>{{userInfo.memHalfDesire}}</view> <view>{{userInfo.memHalfDesire}}</view>
</view> </view>
</view> </view>
<!-- 未来规划-->
<view class="w690 p30 bcfff br20 mt30 ml30 p30">
<view class="rowjbic">
<view class="rowic">
<image class="w30 h30" :src="baseUrl+'/user/futurePlan.png'" mode="aspectFill"></image>
<view style="color: #434343;" class="fs28 fwb ml10">未来规划</view>
</view>
<view class="w120 h52 lh52 tc br100 fs28" @click="gotoEditText(4,userInfo.memFuturePlan)" style="color: #434343; background-color: #F5F6FA;">
编辑
</view>
</view>
<view class=" mt25 fs28" style="color: #434343; ">
<view>{{userInfo.memFuturePlan}}</view>
</view>
</view>
<view class="h40"></view> <view class="h40"></view>
...@@ -307,6 +316,7 @@ import {updateUser, userDetail} from "../../api/user"; ...@@ -307,6 +316,7 @@ import {updateUser, userDetail} from "../../api/user";
if (Index == 9) { if (Index == 9) {
this.singleIndex = 9; this.singleIndex = 9;
} else { } else {
console.log('index',Index)
this.singleIndex = Index; this.singleIndex = Index;
} }
this.singleNoShow = true; this.singleNoShow = true;
...@@ -409,7 +419,6 @@ import {updateUser, userDetail} from "../../api/user"; ...@@ -409,7 +419,6 @@ import {updateUser, userDetail} from "../../api/user";
gotoEditText(type, value) { gotoEditText(type, value) {
var that = this; var that = this;
if (type) { if (type) {
console.log(value);
uni.setStorageSync("editText", value) uni.setStorageSync("editText", value)
uni.navigateTo({ uni.navigateTo({
url: "/pagesme/me/editAbout?type=" + type url: "/pagesme/me/editAbout?type=" + type
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment