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

修改样式

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