| New file |
| | |
| | | <template> |
| | | <view class="birthday"> |
| | | <view class="interval"></view> |
| | | <view class="row birthday_info"> |
| | | <image src="../../../../static/img/info/birthday.png"/> |
| | | <e-picker :showValue="date" :style="{color:birthdayColor}" class="birthday_select" @change="birthdayChange">{{birthday||'请选择出生日期'}}</e-picker> |
| | | </view> |
| | | <view class="interval"></view> |
| | | <view class="btn"> |
| | | <button class="btn-update" @click="updateUserInfo()">确认修改</button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default{ |
| | | data (){ |
| | | return { |
| | | birthday:"", |
| | | birthdayColor:"#808080", |
| | | pathUrl:"http://s16s652780.51mypc.cn/api/blade-user", |
| | | // pathUrl:"http://localhost:8102" |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | //获取页面传递的参数数据 |
| | | this.birthday = option.birthday; |
| | | if(option.birthday!=null || option.birthday!=""){ |
| | | this.birthdayColor = "#000000"; |
| | | } |
| | | }, |
| | | methods:{ |
| | | //修改用户昵称信息 |
| | | updateUserInfo(){ |
| | | uni.request({ |
| | | url:this.pathUrl + "/updateUserInfo", |
| | | method:"POST", |
| | | data:{ |
| | | id: this.$store.state.puserID, |
| | | birthday:this.birthday |
| | | }, |
| | | success:(res)=> { |
| | | if(res.data.code==200){ |
| | | uni.showToast({ |
| | | title: '修改成功!', |
| | | duration: 2000 |
| | | }); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | //日期选择 |
| | | birthdayChange(e) { |
| | | this.birthday = e; |
| | | //修改颜色 |
| | | this.birthdayColor = "#000000"; |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss"> |
| | | page{ |
| | | background-color: rgba($color: #cdcdcd, $alpha: 0.2); |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped> |
| | | |
| | | .birthday{ |
| | | display: flex; |
| | | flex-direction: column; |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | .interval { |
| | | width: 100%; |
| | | height: 30rpx; |
| | | } |
| | | |
| | | .birthday_info{ |
| | | background-color: #FFFFFF; |
| | | height: 90rpx; |
| | | width: 100%; |
| | | line-height: 90rpx; |
| | | |
| | | |
| | | image{ |
| | | width: 50rpx; |
| | | height: 50rpx; |
| | | float: left; |
| | | margin-left: 30rpx; |
| | | margin-top: 20rpx; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .birthday_select{ |
| | | // background-color: #009F95; |
| | | height: 90rpx; |
| | | width: 80%; |
| | | line-height: 90rpx; |
| | | position: absolute; |
| | | left: 80px; |
| | | font-size: 28rpx; |
| | | } |
| | | } |
| | | |
| | | .btn{ |
| | | width: 100%; |
| | | text-align: center; |
| | | flex: 1; |
| | | |
| | | .btn-update { |
| | | line-height: 75rpx; |
| | | border-radius: 50px; |
| | | width: 90%; |
| | | height: 75rpx; |
| | | background-color: #00BFFF; |
| | | font-size: 28rpx; |
| | | letter-spacing: 3rpx; |
| | | color: #FFFFFF; |
| | | outline: none; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <view class="email"> |
| | | <view class="interval"></view> |
| | | <view class="row email_info"> |
| | | <image src="../../../../static/img/info/email.png"/> |
| | | <input placeholder="请输入邮箱" v-model="email"> |
| | | </view> |
| | | <view class="interval"></view> |
| | | <view class="btn"> |
| | | <button class="btn-update" @click="updateUserInfo()">确认修改</button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default{ |
| | | data (){ |
| | | return { |
| | | email:"", |
| | | pathUrl:"http://s16s652780.51mypc.cn/api/blade-user", |
| | | // pathUrl:"http://localhost:8102" |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | //获取页面传递的参数数据 |
| | | this.email = option.email; |
| | | }, |
| | | methods:{ |
| | | //修改用户昵称信息 |
| | | updateUserInfo(){ |
| | | uni.request({ |
| | | url:this.pathUrl + "/updateUserInfo", |
| | | method:"POST", |
| | | data:{ |
| | | id: this.$store.state.puserID, |
| | | email:this.email |
| | | }, |
| | | success:(res)=> { |
| | | if(res.data.code==200){ |
| | | uni.showToast({ |
| | | title: '修改成功!', |
| | | duration: 2000 |
| | | }); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss"> |
| | | page{ |
| | | background-color: rgba($color: #cdcdcd, $alpha: 0.2); |
| | | } |
| | | </style> |
| | | |
| | | <style lang="scss" scoped> |
| | | .email{ |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | .interval { |
| | | width: 100%; |
| | | height: 30rpx; |
| | | } |
| | | |
| | | .email_info{ |
| | | background-color: #FFFFFF; |
| | | height: 90rpx; |
| | | width: 100%; |
| | | line-height: 90rpx; |
| | | |
| | | |
| | | image{ |
| | | width: 60rpx; |
| | | height: 60rpx; |
| | | float: left; |
| | | margin-left: 30rpx; |
| | | margin-top: 10rpx; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | input{ |
| | | // background-color: #009F95; |
| | | height: 90rpx; |
| | | width: 80%; |
| | | line-height: 90rpx; |
| | | position: absolute; |
| | | left: 80px; |
| | | font-size: 28rpx; |
| | | } |
| | | } |
| | | |
| | | .btn{ |
| | | width: 100%; |
| | | text-align: center; |
| | | |
| | | .btn-update { |
| | | line-height: 75rpx; |
| | | border-radius: 50px; |
| | | width: 90%; |
| | | height: 75rpx; |
| | | background-color: #00BFFF; |
| | | font-size: 28rpx; |
| | | letter-spacing: 3rpx; |
| | | color: #FFFFFF; |
| | | outline: none; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <view class="nick_name"> |
| | | <view class="interval"></view> |
| | | <view class="row nick_name_info"> |
| | | <text class="lable">昵称</text> |
| | | <input placeholder="请输入昵称" v-model="name"> |
| | | </view> |
| | | <view class="interval"></view> |
| | | <view class="btn"> |
| | | <button class="btn-update" @click="updateUserInfo()">确认修改</button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default{ |
| | | data (){ |
| | | return { |
| | | name:"", |
| | | pathUrl:"http://s16s652780.51mypc.cn/api/blade-user", |
| | | // pathUrl:"http://localhost:8102" |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | //获取页面传递的参数数据 |
| | | this.name = option.name; |
| | | }, |
| | | methods:{ |
| | | //修改用户昵称信息 |
| | | updateUserInfo(){ |
| | | uni.request({ |
| | | url:this.pathUrl + "/updateUserInfo", |
| | | method:"POST", |
| | | data:{ |
| | | id: this.$store.state.puserID, |
| | | name:this.name |
| | | }, |
| | | success:(res)=> { |
| | | if(res.data.code==200){ |
| | | uni.showToast({ |
| | | title: '修改成功!', |
| | | duration: 2000 |
| | | }); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss"> |
| | | page{ |
| | | background-color: rgba($color: #cdcdcd, $alpha: 0.2); |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped> |
| | | .nick_name{ |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | .interval { |
| | | width: 100%; |
| | | height: 30rpx; |
| | | } |
| | | |
| | | .nick_name_info{ |
| | | background-color: #FFFFFF; |
| | | height: 90rpx; |
| | | width: 100%; |
| | | line-height: 90rpx; |
| | | |
| | | |
| | | .lable{ |
| | | float: left; |
| | | margin-left: 30rpx; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | input{ |
| | | // background-color: #009F95; |
| | | height: 90rpx; |
| | | width: 80%; |
| | | line-height: 90rpx; |
| | | position: absolute; |
| | | left: 80px; |
| | | font-size: 28rpx; |
| | | } |
| | | } |
| | | |
| | | .btn{ |
| | | width: 100%; |
| | | text-align: center; |
| | | |
| | | .btn-update { |
| | | line-height: 75rpx; |
| | | border-radius: 50px; |
| | | width: 90%; |
| | | height: 75rpx; |
| | | background-color: #00BFFF; |
| | | font-size: 28rpx; |
| | | |
| | | letter-spacing: 3rpx; |
| | | color: #FFFFFF; |
| | | outline: none; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <view class="phone"> |
| | | <view class="interval"></view> |
| | | <view class="row phone_info"> |
| | | <image src="../../../../static/img/info/phone.png"/> |
| | | <input placeholder="请输入手机号" v-model="phone"> |
| | | </view> |
| | | <view class="interval"></view> |
| | | <view class="btn"> |
| | | <button class="btn-update" @click="updateUserInfo()">确认修改</button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default{ |
| | | data (){ |
| | | return { |
| | | phone:"", |
| | | pathUrl:"http://s16s652780.51mypc.cn/api/blade-user", |
| | | // pathUrl:"http://localhost:8102" |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | //获取页面传递的参数数据 |
| | | this.phone = option.phone; |
| | | }, |
| | | methods:{ |
| | | //修改用户昵称信息 |
| | | updateUserInfo(){ |
| | | uni.request({ |
| | | url:this.pathUrl + "/updateUserInfo", |
| | | method:"POST", |
| | | data:{ |
| | | id: this.$store.state.puserID, |
| | | phone:this.phone |
| | | }, |
| | | success:(res)=> { |
| | | if(res.data.code==200){ |
| | | uni.showToast({ |
| | | title: '修改成功!', |
| | | duration: 2000 |
| | | }); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss"> |
| | | page{ |
| | | background-color: rgba($color: #cdcdcd, $alpha: 0.2); |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped> |
| | | .phone{ |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | .interval { |
| | | width: 100%; |
| | | height: 30rpx; |
| | | } |
| | | |
| | | .phone_info{ |
| | | background-color: #FFFFFF; |
| | | height: 90rpx; |
| | | width: 100%; |
| | | line-height: 90rpx; |
| | | |
| | | |
| | | image{ |
| | | width: 50rpx; |
| | | height: 50rpx; |
| | | float: left; |
| | | margin-left: 30rpx; |
| | | margin-top: 15rpx; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | input{ |
| | | // background-color: #009F95; |
| | | height: 90rpx; |
| | | width: 80%; |
| | | line-height: 90rpx; |
| | | position: absolute; |
| | | left: 80px; |
| | | font-size: 28rpx; |
| | | } |
| | | } |
| | | |
| | | .btn{ |
| | | width: 100%; |
| | | text-align: center; |
| | | |
| | | .btn-update { |
| | | line-height: 75rpx; |
| | | border-radius: 50px; |
| | | width: 90%; |
| | | height: 75rpx; |
| | | background-color: #00BFFF; |
| | | font-size: 28rpx; |
| | | letter-spacing: 3rpx; |
| | | color: #FFFFFF; |
| | | outline: none; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | </style> |