|
|
|
@ -1,11 +1,11 @@ |
|
|
|
|
<template> |
|
|
|
|
<view class="setting"> |
|
|
|
|
<view class="box"> |
|
|
|
|
<view class="box-avter"> |
|
|
|
|
<view class="box-avter" style="padding-bottom: 24rpx;"> |
|
|
|
|
<view class="name-text"> |
|
|
|
|
头像 |
|
|
|
|
</view> |
|
|
|
|
<image @click="chooseImage()" :src="info.avatar_url?info.avatar_url:'/static/default-logo.png'" |
|
|
|
|
<image @click="chooseImage()" :src="info.avatar_url ? info.avatar_url : '/static/default-logo.png'" |
|
|
|
|
class="image_logo"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="box-avter conten-height"> |
|
|
|
@ -18,11 +18,11 @@ |
|
|
|
|
<view class="name-text"> |
|
|
|
|
性别 |
|
|
|
|
</view> |
|
|
|
|
<picker style="width: 400rpx;text-align: right;" :value="genderIndex" :range="gender" |
|
|
|
|
:range-key="'name'" @change="bindPickerChange"> |
|
|
|
|
<view class="lx" :style="genderIndex==-1?'color:#999':'color:#333'"> |
|
|
|
|
{{genderIndex==-1?'请选择':gender[genderIndex].name}} |
|
|
|
|
<image class="more" src="/static/news/icon-arrow.png" mode=""></image> |
|
|
|
|
<picker style="width: 400rpx;text-align: right;" :value="genderIndex" :range="gender" :range-key="'name'" |
|
|
|
|
@change="bindPickerChange"> |
|
|
|
|
<view class="lx" :style="genderIndex == -1 ? 'color:#999' : 'color:#333'"> |
|
|
|
|
{{ genderIndex == -1 ? '请选择' : gender[genderIndex].name }} |
|
|
|
|
<u-icon style="margin-left: 5rpx; color: #8A8A8A" name="arrow-right"></u-icon> |
|
|
|
|
</view> |
|
|
|
|
</picker> |
|
|
|
|
</view> |
|
|
|
@ -30,7 +30,12 @@ |
|
|
|
|
<view class="name-text"> |
|
|
|
|
手机号 |
|
|
|
|
</view> |
|
|
|
|
<text>{{info.mobile}}</text> |
|
|
|
|
<input type="number" v-model="info.mobile" placeholder="请输入手机号"> |
|
|
|
|
|
|
|
|
|
<!-- <view> |
|
|
|
|
<text>{{ info.mobile }}</text> |
|
|
|
|
<u-icon style="margin-left: 5rpx; color: #8A8A8A" name="arrow-right"></u-icon> |
|
|
|
|
</view> --> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="box"> |
|
|
|
@ -38,42 +43,45 @@ |
|
|
|
|
<view class="name-text"> |
|
|
|
|
发票助手 |
|
|
|
|
</view> |
|
|
|
|
<image class="more" src="/static/news/icon-arrow.png" mode=""></image> |
|
|
|
|
<u-icon style="margin-left: 5rpx; color: #8A8A8A" name="arrow-right"></u-icon> |
|
|
|
|
</view> |
|
|
|
|
<view class="box-avter conten-height"> |
|
|
|
|
<view class="name-text"> |
|
|
|
|
清除缓存 |
|
|
|
|
</view> |
|
|
|
|
<image class="more" src="/static/news/icon-arrow.png" mode=""></image> |
|
|
|
|
<u-icon style="margin-left: 5rpx; color: #8A8A8A" name="arrow-right"></u-icon> |
|
|
|
|
</view> |
|
|
|
|
<view class="box-avter conten-height"> |
|
|
|
|
<view class="name-text"> |
|
|
|
|
隐私 |
|
|
|
|
</view> |
|
|
|
|
<image class="more" src="/static/news/icon-arrow.png" mode=""></image> |
|
|
|
|
<u-icon style="margin-left: 5rpx; color: #8A8A8A" name="arrow-right"></u-icon> |
|
|
|
|
</view> |
|
|
|
|
<view class="box-avter conten-height" style="border: none;"> |
|
|
|
|
<view class="box-avter conten-height"> |
|
|
|
|
<view class="name-text"> |
|
|
|
|
关于 |
|
|
|
|
</view> |
|
|
|
|
<image class="more" src="/static/news/icon-arrow.png" mode=""></image> |
|
|
|
|
<u-icon style="margin-left: 5rpx; color: #8A8A8A" name="arrow-right"></u-icon> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="box" style="padding: 0 40rpx;" @click="onOut"> |
|
|
|
|
<view class="box" style="padding: 0 40rpx;margin-bottom: 140rpx;" @click="onOut"> |
|
|
|
|
<view class="box-avter conten-height" style="border: none;"> |
|
|
|
|
<view class="name-text"> |
|
|
|
|
注销账号 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="bottomBtn"> |
|
|
|
|
<button class="submitBtn" @click="sureSubmit">确认修改</button> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import * as UploadApi from '@/api/upload' |
|
|
|
|
import * as userApi from '@/api/user' |
|
|
|
|
export default { |
|
|
|
|
import * as UploadApi from '@/api/upload' |
|
|
|
|
import * as userApi from '@/api/user' |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
genderIndex: -1, |
|
|
|
@ -83,14 +91,14 @@ |
|
|
|
|
}, { |
|
|
|
|
name: '女', |
|
|
|
|
id: 1 |
|
|
|
|
}, ], |
|
|
|
|
},], |
|
|
|
|
info: '', |
|
|
|
|
imageList: [], |
|
|
|
|
avatar_id: [], |
|
|
|
|
nick_name: '' |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
onShow() {}, |
|
|
|
|
onShow() { }, |
|
|
|
|
onLoad(params) { |
|
|
|
|
console.log(uni.getStorageSync("userInfo")) |
|
|
|
|
this.info = uni.getStorageSync("userInfo") |
|
|
|
@ -101,11 +109,11 @@ |
|
|
|
|
let params = { |
|
|
|
|
nick_name: this.info.nick_name, |
|
|
|
|
avatar_id: this.avatar_id[0], |
|
|
|
|
gender: this.genderIndex==0?1:2 |
|
|
|
|
gender: this.genderIndex == 0 ? 1 : 2 |
|
|
|
|
} |
|
|
|
|
userApi.editUser(params) |
|
|
|
|
.then(res => { |
|
|
|
|
if (res.status==200) { |
|
|
|
|
if (res.status == 200) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '修改成功', |
|
|
|
|
icon: 'none', |
|
|
|
@ -186,82 +194,86 @@ |
|
|
|
|
this.genderIndex = e.detail.value |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style> |
|
|
|
|
page { |
|
|
|
|
page { |
|
|
|
|
width: 100%; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.setting { |
|
|
|
|
.setting { |
|
|
|
|
height: 100%; |
|
|
|
|
margin-top: 20rpx; |
|
|
|
|
padding-bottom: 50rpx; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.box { |
|
|
|
|
.box { |
|
|
|
|
background: #FFF; |
|
|
|
|
padding: 24rpx 40rpx; |
|
|
|
|
padding: 24rpx 36rpx; |
|
|
|
|
margin-top: 20rpx; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.more { |
|
|
|
|
.more { |
|
|
|
|
width: 28rpx; |
|
|
|
|
height: 28rpx; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.box-avter { |
|
|
|
|
height: 120rpx; |
|
|
|
|
.box-avter { |
|
|
|
|
width: 100%; |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: space-between; |
|
|
|
|
align-items: center; |
|
|
|
|
border-bottom: 1rpx solid #f2f2f2; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.conten-height { |
|
|
|
|
.conten-height { |
|
|
|
|
height: 100rpx; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.conten-height text { |
|
|
|
|
.conten-height text { |
|
|
|
|
font-size: 35rpx; |
|
|
|
|
color: #333; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.box-avter input { |
|
|
|
|
.box-avter input { |
|
|
|
|
height: 100%; |
|
|
|
|
color: #333; |
|
|
|
|
width: 400rpx; |
|
|
|
|
text-align: right; |
|
|
|
|
font-size: 28rpx; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.name-text { |
|
|
|
|
.name-text { |
|
|
|
|
font-size: 28rpx; |
|
|
|
|
color: #999; |
|
|
|
|
} |
|
|
|
|
color: #303030; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.image_logo { |
|
|
|
|
width: 90rpx; |
|
|
|
|
height: 90rpx; |
|
|
|
|
.image_logo { |
|
|
|
|
width: 114rpx; |
|
|
|
|
height: 114rpx; |
|
|
|
|
border-radius: 50%; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.submitBtn { |
|
|
|
|
} |
|
|
|
|
.bottomBtn{ |
|
|
|
|
width: 100%; |
|
|
|
|
position: fixed; |
|
|
|
|
bottom: 0; |
|
|
|
|
left: 0; |
|
|
|
|
height: 140upx; |
|
|
|
|
z-index: 88; |
|
|
|
|
background: #fff; |
|
|
|
|
} |
|
|
|
|
.submitBtn { |
|
|
|
|
height: 88upx; |
|
|
|
|
margin: 64upx 0; |
|
|
|
|
margin-bottom: 0; |
|
|
|
|
line-height: 88upx; |
|
|
|
|
background: #FFAAA4; |
|
|
|
|
background: #FE483B; |
|
|
|
|
border-radius: 36px 36px 36px 36px; |
|
|
|
|
opacity: 1; |
|
|
|
|
border-radius: 36px; |
|
|
|
|
font-size: 28upx; |
|
|
|
|
font-family: PingFang SC, PingFang SC; |
|
|
|
|
font-weight: 500; |
|
|
|
|
color: #FFFFFF; |
|
|
|
|
text-align: center; |
|
|
|
|
margin: 50rpx 30rpx; |
|
|
|
|
} |
|
|
|
|
margin: 30rpx 58rpx; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|