1.新增点击头像上传
2.新增用户昵称,手机号,邮箱,生日可修改
| | |
| | | { |
| | | "name" : "jfpt", |
| | | "appid" : "__UNI__647B57F", |
| | | "appid" : "__UNI__88EDF2B", |
| | | "description" : "", |
| | | "versionName" : "1.0.0", |
| | | "versionCode" : "100", |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/myself/childen/info/nickName", |
| | | "name": "nickName", |
| | | "style": { |
| | | "navigationBarTitleText": "修改昵称", |
| | | "navigationBarBackgroundColor": "#F56968" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/myself/childen/info/phone", |
| | | "name": "phone", |
| | | "style": { |
| | | "navigationBarTitleText": "修改电话", |
| | | "navigationBarBackgroundColor": "#F56968" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/myself/childen/info/email", |
| | | "name": "email", |
| | | "style": { |
| | | "navigationBarTitleText": "修改邮箱", |
| | | "navigationBarBackgroundColor": "#F56968" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/myself/childen/info/birthday", |
| | | "name": "birthday", |
| | | "style": { |
| | | "navigationBarTitleText": "修改生日", |
| | | "navigationBarBackgroundColor": "#F56968" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/business/business", |
| | | "name": "business", |
| | | "style": { |
| | |
| | | this.loadStatus='nomore'; |
| | | } |
| | | } |
| | | |
| | | } |
| | | }); |
| | | } |
| | |
| | | border-radius: 5px; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | page{ |
| | | background-color: rgba($color: #F5F0F6, $alpha: 0.5); |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped> |
| | | .aboutUs { |
| | | width: 100%; |
| | | height: 100%; |
| | | // background-color: rgba(128,128,128,0.1); |
| | | background-color: #F5F0F6; |
| | | // background-color: #F5F0F6; |
| | | |
| | | .up{ |
| | | width: 100%; |
| | |
| | | bottom: 1.5%; |
| | | // left: calc((100% - 640rpx)/2); |
| | | // text-align: center; |
| | | font-size: 22rpx; |
| | | color: #808080; |
| | | font-size: 20rpx; |
| | | // color: #808080; |
| | | } |
| | | } |
| | | } |
| | |
| | | <view class="title">编号</view> |
| | | <view class="msg">{{user.id}}</view> |
| | | </view> |
| | | <view class="row row-base-info"> |
| | | <view class="row row-base-info" @click="updateNickName()"> |
| | | <view class="title">昵称</view> |
| | | <view class="msg">{{user.name}}</view> |
| | | <image src="../../../static/workbench/bracket.png"> |
| | | <view class="msg-update">{{user.name}}</view> |
| | | </view> |
| | | <view class="row row-base-info"> |
| | | <view class="row row-base-info" @click="updatePhone()"> |
| | | <view class="title">电话</view> |
| | | <view class="msg">{{user.phone}}</view> |
| | | <image src="../../../static/workbench/bracket.png"> |
| | | <view class="msg-update">{{user.phone}}</view> |
| | | </view> |
| | | <view class="row row-base-info"> |
| | | <view class="row row-base-info" @click="updateEmail()"> |
| | | <view class="title">邮箱</view> |
| | | <view class="msg">{{user.email}}</view> |
| | | <image src="../../../static/workbench/bracket.png"> |
| | | <view class="msg-update">{{user.email}}</view> |
| | | </view> |
| | | <view class="row row-base-info-birthday"> |
| | | <view class="row row-base-info-birthday" @click="updateBirthday()"> |
| | | <view class="title">生日</view> |
| | | <view class="msg">{{user.birthday}}</view> |
| | | <image src="../../../static/workbench/bracket.png"> |
| | | <view class="msg-update">{{user.birthday}}</view> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | this.getUserInfo(); |
| | | }, |
| | | methods:{ |
| | | //跳转至修改昵称页面 |
| | | updateNickName(){ |
| | | uni.navigateTo({ |
| | | url: 'info/nickName?name='+this.user.name |
| | | }); |
| | | }, |
| | | updatePhone(){ |
| | | uni.navigateTo({ |
| | | url: 'info/phone?phone='+this.user.phone |
| | | }); |
| | | }, |
| | | updateEmail(){ |
| | | uni.navigateTo({ |
| | | url: 'info/email?email='+this.user.email |
| | | }); |
| | | }, |
| | | updateBirthday(){ |
| | | uni.navigateTo({ |
| | | url: 'info/birthday?birthday='+this.user.birthday |
| | | }); |
| | | }, |
| | | //获取客户信息 |
| | | getUserInfo(){ |
| | | var that = this; |
| | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | page{ |
| | | background-color: rgba($color: #F5F0F6, $alpha: 0.5); |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped> |
| | | .user-info{ |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: #F5F0F6; |
| | | // background-color: #F5F0F6; |
| | | letter-spacing: 1rpx; |
| | | |
| | | .base-info-title{ |
| | |
| | | |
| | | .base-info{ |
| | | width: 100%; |
| | | height: 565rpx; |
| | | height: 635rpx; |
| | | background-color: #FFFFFF; |
| | | |
| | | .row-base-info{ |
| | | width: 94%; |
| | | margin: 0 auto; |
| | | height: 80rpx; |
| | | height: 90rpx; |
| | | border-bottom: 1px solid rgba(128,128,128,0.1); |
| | | line-height: 90rpx; |
| | | |
| | | .title{ |
| | | line-height: 80rpx; |
| | | float: left; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .msg{ |
| | | line-height: 80rpx; |
| | | position: absolute; |
| | | right: 30rpx; |
| | | color: #808080; |
| | | font-size: 24rpx; |
| | | } |
| | | |
| | | .msg-update{ |
| | | position: absolute; |
| | | right: 90rpx; |
| | | color: #808080; |
| | | font-size: 24rpx; |
| | | } |
| | | |
| | | image{ |
| | | position: absolute; |
| | | margin-top: 20rpx; |
| | | right: 30rpx; |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | | } |
| | | } |
| | | |
| | | .row-base-info-birthday{ |
| | | width: 94%; |
| | | margin: 0 auto; |
| | | height: 80rpx; |
| | | height: 90rpx; |
| | | line-height: 90rpx; |
| | | |
| | | .title{ |
| | | line-height: 80rpx; |
| | | float: left; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .msg{ |
| | | line-height: 80rpx; |
| | | .msg-update{ |
| | | position: absolute; |
| | | right: 30rpx; |
| | | right: 90rpx; |
| | | color: #808080; |
| | | font-size: 24rpx; |
| | | } |
| | | |
| | | image{ |
| | | position: absolute; |
| | | margin-top: 20rpx; |
| | | right: 30rpx; |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | | } |
| | | } |
| | | } |
| | |
| | | height: 60rpx; |
| | | line-height: 60rpx; |
| | | position: relative; |
| | | left: -60rpx; |
| | | left: 20rpx; |
| | | font-size: 24rpx; |
| | | color: #808080; |
| | | } |
| | | |
| | | .dept-info{ |
| | | width: 100%; |
| | | height: 160rpx; |
| | | height: 180rpx; |
| | | background-color: #FFFFFF; |
| | | |
| | | .row-dept-info{ |
| | | width: 94%; |
| | | margin: 0 auto; |
| | | height: 80rpx; |
| | | height: 90rpx; |
| | | border-bottom: 1px solid rgba(128,128,128,0.1); |
| | | |
| | | .title{ |
| | | line-height: 80rpx; |
| | | line-height: 90rpx; |
| | | float: left; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .msg{ |
| | | line-height: 80rpx; |
| | | line-height: 90rpx; |
| | | position: absolute; |
| | | right: 30rpx; |
| | | color: #808080; |
| | |
| | | .row-dept-info-post{ |
| | | width: 94%; |
| | | margin: 0 auto; |
| | | height: 80rpx; |
| | | height: 90rpx; |
| | | |
| | | .title{ |
| | | line-height: 80rpx; |
| | | line-height: 90rpx; |
| | | float: left; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .msg{ |
| | | line-height: 80rpx; |
| | | line-height: 90rpx; |
| | | position: absolute; |
| | | right: 30rpx; |
| | | color: #808080; |
| | |
| | | <view class="m-top"> |
| | | <view class="m-t-left"> |
| | | <view class="userImg"> |
| | | <img class="img" :src="useimg" alt=""> |
| | | <img class="img" :src="useimg" @click="ChooseImage"> |
| | | </view> |
| | | <view class="usermsg"> |
| | | <view>{{userName}}</view> |
| | |
| | | butTitle() { |
| | | return this.$store.state.loging == true ? '登出' : '登入' |
| | | } |
| | | |
| | | }, |
| | | onLoad() { |
| | | |
| | | if(this.$store.state.avatar!=null && this.$store.state.avatar!=''){ |
| | | this.useimg = this.$store.state.avatar; |
| | | } |
| | | }, |
| | | methods: { |
| | | openThere(fn) { |
| | |
| | | that.showTextmsg = false; |
| | | } |
| | | }, |
| | | //图片上传 |
| | | ChooseImage() { |
| | | var that = this; |
| | | uni.chooseImage({ |
| | | count: 1, //可选择数量,默认9 |
| | | sizeType: ['compressed','original'], //上传压缩图,原图 |
| | | sourceType: ['album','camera'], //从相册选择或从使用相机 |
| | | success: async (res) => { |
| | | for (var i = 0; i < res.tempFiles.length; i++) { |
| | | if(res.tempFiles[i].size > 10 * 1024 * 1000){ //上传图片大小限制 |
| | | uni.showToast({ |
| | | title: "照片大小不能10MB", |
| | | icon: "none" |
| | | }) |
| | | return |
| | | } |
| | | } |
| | | var tempFilePath = res.tempFilePaths; |
| | | try{ |
| | | uni.showLoading({ |
| | | title:"上传中...", |
| | | mask:true |
| | | }) |
| | | var that = this; |
| | | // 文件上传 |
| | | uni.uploadFile({ |
| | | // url: 'https://web.byisf.com/api/blade-jfpts/depl/put-depl', //仅为示例,非真实的接口地址 |
| | | url: 'http://web.byisf.com:82/blade-jfpts/depl/put-depl', |
| | | filePath: tempFilePath[0], |
| | | name: 'file', |
| | | formData: { |
| | | 'user': 'test' // 上传附带参数 |
| | | }, |
| | | success: (data) => { |
| | | that.useimg = JSON.parse(data.data).data; |
| | | //修改用户头像信息 |
| | | uni.request({ |
| | | url:"http://s16s652780.51mypc.cn/api/blade-user/updateUserInfo", |
| | | method:"POST", |
| | | data:{ |
| | | id: this.$store.state.puserID, |
| | | avatar:that.useimg |
| | | }, |
| | | success:(res)=> { |
| | | if(res.data.code==200){ |
| | | uni.showToast({ |
| | | title: '上传成功!', |
| | | duration: 2000 |
| | | }); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | }catch(e){ |
| | | console.log(e); |
| | | }finally{ |
| | | uni.hideLoading(); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | // geton() { |
| | | // wx.navigateTo({ |
| | | // url: '../poput/workbench/policeDetails/policeDetails?id=111' |
| | |
| | | success: (res) => { |
| | | if (res.statusCode == 200) { |
| | | store.commit('getUserData',res.data) |
| | | console.log(res.data,123542); |
| | | data.isit = true; |
| | | data.userName = res.data.real_name; //警袁姓名 |
| | | data.userID = res.data.user_id; //警袁id |
| | | data.avatar = res.data.avatar; //头像 |
| | | // data.userPhon = res.user_id; |
| | | store.commit('login', data); |
| | | } |
| | |
| | | state.message.useName = data.userName; |
| | | state.puserName = data.userName; |
| | | state.puserID = data.userID; |
| | | state.avatar = data.avatar; |
| | | } |
| | | //储存用户 |
| | | WxStorage.set("init", "true"); |
| | |
| | | }, |
| | | logPath: '', |
| | | piAPI: 'http://s16s652780.51mypc.cn/api/', |
| | | puserName: '陈慧英', |
| | | puserID: '1370564873280430082', |
| | | puserIphone:'15649685246', |
| | | puserName: '', |
| | | puserID: '', |
| | | puserIphone:'', |
| | | avatar:"", |
| | | UserData: {}, |
| | | } |
| | | |
| | |
| | | nowIndex: 1, |
| | | |
| | | //基础路径 |
| | | pathUrl: "http://localhost:89", |
| | | // pathUrl: "https://web.byisf.com/api/blade-jfpts", |
| | | // pathUrl: "http://localhost:89", |
| | | pathUrl: "http://s16s652780.51mypc.cn/api/blade-jfpts", |
| | | |
| | | layer: null, |
| | | |