Commit 73d78161 authored by 罗林杰's avatar 罗林杰

修改样式

parent 0944f24a
......@@ -40,6 +40,10 @@
uni.setNavigationBarTitle({
title: "心仪的Ta"
})
} else if (option.type == 4) {
uni.setNavigationBarTitle({
title: "未来规划"
})
}
that.value = uni.getStorageSync("editText")
......@@ -58,7 +62,6 @@
async saveAbout() {
var that = this;
if (that.type == 1) {
var data = {
openId: uni.getStorageSync('userInfo').wxOpenid,
memIntroduce: that.value
......@@ -73,6 +76,11 @@
openId: uni.getStorageSync('userInfo').wxOpenid,
memHalfDesire: that.value
};
} else if (that.type == 4) {
var data = {
openId: uni.getStorageSync('userInfo').wxOpenid,
memFuturePlan: that.value
};
}
uni.showLoading({
title: '保存中...'
......
......@@ -221,34 +221,6 @@
name="arrow-right"
></u-icon>
</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
label="婚姻状况"
prop="form.memMarriageText"
......@@ -364,6 +336,7 @@
@confirm="confirmMarriage"
></u-picker>
</view>
<ELM ref="elm" :msg="tipMsg" :isConfirm="isConfirm" @confirm="confirm"></ELM>
</view>
</template>
......@@ -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 {updateUser, userDetail} from "../../api/user";
import {calculateAge, parseDate} from "../../common";
import ELM from '@/components/elm-toast/index.vue';
export default {
components: {UFormItem},
components: {UFormItem , ELM },
data() {
return {
index:0,
......@@ -440,6 +415,8 @@ export default {
memMbti:'',//人格
},
form:{},
tipMsg: '',
isConfirm: false,
birthday: Number(new Date()),
rules: {
// 'form.memNationText': [
......@@ -689,25 +666,23 @@ export default {
this.$refs.uForm.validate().then(res => {
this.userInfo.openId= uni.getStorageSync('userInfo').wxOpenid
updateUser(this.userInfo).then(response => {
if (response.data.code === 200){
uni.showToast({
title: '修改成功',
icon: 'success',
})
setTimeout(() => {
uni.navigateBack({
delta: 1, //返回层数,2则上上页
},1000)
})
}else {
uni.showToast({
title: '修改失败',
icon: 'error',
})
if (response.data.code == 200) {
this.isConfirm = true;
this.tipMsg = "修改成功";
this.$refs.elm.showDialog();
} else {
this.tipMsg = res.data.msg;
this.$refs.elm.showDialog();
}
})
})
},
confirm() {
this.isConfirm = false;
uni.navigateBack({
delta: 1
})
},
reset() {
this.getUserInfo()
},
......
<template>
<view>
<view style="padding-bottom: 100rpx">
<!-- 头像部分-->
<view class="w-100 pt30 pb60">
<view class="pr40 pl72 pt40 rowa" v-if="userInfo.avatarUrl == null">
......@@ -106,12 +106,6 @@
<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/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 class="box-bq">
<view>
......@@ -225,6 +219,21 @@
<view>{{userInfo.memHalfDesire}}</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>
......@@ -307,6 +316,7 @@ import {updateUser, userDetail} from "../../api/user";
if (Index == 9) {
this.singleIndex = 9;
} else {
console.log('index',Index)
this.singleIndex = Index;
}
this.singleNoShow = true;
......@@ -409,7 +419,6 @@ import {updateUser, userDetail} from "../../api/user";
gotoEditText(type, value) {
var that = this;
if (type) {
console.log(value);
uni.setStorageSync("editText", value)
uni.navigateTo({
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