Commit 7024a81e authored by 罗林杰's avatar 罗林杰

修改样式

parent b138f0f2
......@@ -12,6 +12,7 @@
</template>
<script>
import ELM from '@/components/elm-toast/index.vue';
import {updateUser} from "../../api/user";
export default {
data() {
return {
......@@ -26,7 +27,6 @@
},
onLoad(option) {
var that = this;
console.log(option);
that.type = option.type;
if (option.type == 1) {
uni.setNavigationBarTitle({
......@@ -48,10 +48,7 @@
uni.removeStorageSync('editText')
},
onPageScroll(e) {
console.log(e);
if (e.scrollTop > 50) {} else {}
},
onReachBottom() {
var that = this;
......@@ -60,65 +57,36 @@
methods: {
async saveAbout() {
var that = this;
if (that.value.length < 10) {
this.tipMsg = "内容不能少于10个字";
this.$refs.elm.showDialog();
return false;
}
if (that.type == 1) {
var data = {
aboutMe: that.value
openId: uni.getStorageSync('userInfo').wxOpenid,
memIntroduce: that.value
};
} else if (that.type == 2) {
var data = {
interest: that.value
openId: uni.getStorageSync('userInfo').wxOpenid,
memHobby: that.value
};
} else if (that.type == 3) {
var data = {
loveRequirement: that.value
openId: uni.getStorageSync('userInfo').wxOpenid,
memHalfDesire: that.value
};
}
uni.showLoading({
title: '保存中...'
})
const res = await this.$myRequest({
url: 'nostalgia/fruser/baseInfo/edit',
data: data,
withToken: true,
method: 'PUT',
});
uni.hideLoading();
if (res.data.code == 200) {
this.isConfirm = true;
this.tipMsg = "编辑成功";
this.$refs.elm.showDialog();
if (that.type == 1) {
uni.$emit('updateAboutMe', {
data: that.value
});
} else if (that.type == 2) {
uni.$emit('updateInterest', {
data: that.value
});
} else if (that.type == 3) {
uni.$emit('updateLoveRequirement', {
data: that.value
});
}
/* setTimeout(() => {
var pages = getCurrentPages();
var prevPage = pages[pages.length - 2]; //上一个页面
prevPage.$vm.BackPage({'type':that.type,"value":that.value}); //重点$vm
uni.navigateBack({
delta: 1
})
uni.hideLoading()
}, 1000) */
} else {
this.tipMsg = res.data.msg;
this.$refs.elm.showDialog();
}
updateUser(data).then(res => {
if (res.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;
......
......@@ -114,7 +114,7 @@
</view>
</view>
<view class="box-bq">
<view class="">
<view>
{{ userInfo.memAge ? userInfo.memAge : '' }}岁 · {{ userInfo.memHeight ? userInfo.memHeight : '' }}cm
· {{ userInfo.memConstellation ? userInfo.memConstellation : '' }}
</view>
......@@ -880,11 +880,6 @@ import {updateUser, userDetail} from "../../api/user";
position: relative;
}
.box-name {
.simg {
width: 48rpx;
height: 48rpx;
margin-left: 20rpx;
}
height: 56rpx;
font-size: 40rpx;
......@@ -893,7 +888,7 @@ import {updateUser, userDetail} from "../../api/user";
font-weight: 800;
color: #4a4a4a;
line-height: 56rpx;
margin-left: 58rpx;
margin-left: 20rpx;
margin-top: 24rpx;
display: flex;
align-items: center;
......@@ -917,6 +912,7 @@ import {updateUser, userDetail} from "../../api/user";
display: flex;
justify-content: center;
align-items: center;
padding-left: 60rpx;
image {
width: 24rpx;
......@@ -937,8 +933,8 @@ import {updateUser, userDetail} from "../../api/user";
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #333333;
margin-left: 58rpx;
margin-top: 24rpx;
margin-left: 30rpx;
margin-top: 30rpx;
line-height: 40rpx;
display: flex;
align-items: center;
......
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