
1 changed files with 262 additions and 199 deletions
@ -1,200 +1,263 @@ |
|||||
<template> |
<template> |
||||
|
|
||||
<view style="display: flex;flex-direction: column;"> |
<view style="display: flex;flex-direction: column;"> |
||||
|
|
||||
<NavBar ref="nav" navTitle="个人信息" :showIcon="true" :supportChange="false"> |
<NavBar ref="nav" navTitle="个人信息" :showIcon="true" :supportChange="false"> |
||||
</NavBar> |
</NavBar> |
||||
|
|
||||
<loading-state ref="pageView" @request="request"> |
<loading-state ref="pageView" @request="request"> |
||||
|
|
||||
<view @click="uploadHeadImage()" class="menu-item"> |
<view @click="uploadHeadImage()" class="menu-item"> |
||||
<text class="text">头像</text> |
<text class="text">头像</text> |
||||
<image :src="page.photo" style="width: 70rpx;height: 70rpx;margin-right: 10rpx;"></image> |
<image :src="page.photo" style="width: 70rpx;height: 70rpx;margin-right: 10rpx;"></image> |
||||
<image class="more" src="../../static/more.png"></image> |
<image class="more" src="../../static/more.png"></image> |
||||
</view> |
</view> |
||||
<view class="line-thin"></view> |
<view class="line-thin"></view> |
||||
<view @click="remark()" class="menu-item"> |
<view @click="remark()" class="menu-item"> |
||||
<text class="text">昵称</text> |
<text class="text">昵称</text> |
||||
<text class="explain">{{page.nick}}</text> |
<text class="explain">{{page.nick}}</text> |
||||
<image class="more" src="../../static/more.png"></image> |
<image class="more" src="../../static/more.png"></image> |
||||
</view> |
</view> |
||||
<view class="line-thin"></view> |
<view class="line-thin"></view> |
||||
<view class="menu-item"> |
<view class="menu-item"> |
||||
<text class="text">手机号</text> |
<text class="text">手机号</text> |
||||
<text class="explain"></text> |
<text class="explain"></text> |
||||
<button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">{{page.phone}}</button> |
<button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">{{page.phone}}</button> |
||||
<image class="more" src="../../static/more.png"></image> |
<image class="more" src="../../static/more.png"></image> |
||||
</view> |
</view> |
||||
|
|
||||
<view class="line-thin"></view> |
<view class="line-thin"></view> |
||||
<view @click="toRealInfo()" class="menu-item"> |
<view @click="toRealInfo()" class="menu-item"> |
||||
<text class="text">实名信息</text> |
<text class="text">实名信息</text> |
||||
<text class="explain">{{page.realAttestationExplain}}</text> |
<text class="explain">{{page.realAttestationExplain}}</text> |
||||
<image class="more" src="../../static/more.png"></image> |
<image class="more" src="../../static/more.png"></image> |
||||
</view> |
</view> |
||||
|
|
||||
</loading-state> |
<view class="line-thin"></view> |
||||
|
<view @click="bank()" class="menu-item"> |
||||
<uni-popup ref="inputDialog" type="dialog"> |
<text class="text">推荐支行</text> |
||||
<uni-popup-dialog ref="inputClose" mode="input" title="修改昵称" :value="page.nick" placeholder="请输入内容" |
|
||||
@confirm="dialogInputConfirm"></uni-popup-dialog> |
<zqs-select class="explain2" :multiple="false" :list="options" label-key="bankName" value-key="bankSid" |
||||
</uni-popup> |
title="选择支行" clearable v-model="page.customerBankName" placeholder=" 请选择支行" @search="searchEvent" |
||||
|
@change="selectChange2"></zqs-select> |
||||
</view> |
|
||||
</template> |
</view> |
||||
|
|
||||
<script> |
</loading-state> |
||||
export default { |
|
||||
data() { |
<uni-popup ref="inputDialog" type="dialog"> |
||||
return { |
<uni-popup-dialog ref="inputClose" mode="input" title="修改昵称" :value="page.nick" placeholder="请输入内容" |
||||
page: {} |
@confirm="dialogInputConfirm"></uni-popup-dialog> |
||||
} |
</uni-popup> |
||||
}, |
|
||||
onLoad(options) { |
</view> |
||||
this.request() |
</template> |
||||
uni.$on("real-info", (e) => { |
|
||||
this.$nextTick(() => { |
<script> |
||||
this.$refs.pageView.setLoadState(0) |
export default { |
||||
}) |
data() { |
||||
this.request(); |
return { |
||||
}) |
options: [{ |
||||
}, |
label: '沃尔玛(WALMART)', |
||||
onUnload() { |
value: '0', |
||||
uni.$off('real-info'); |
}, |
||||
}, |
{ |
||||
methods: { |
label: '国家电网有限公司(STATE GRID)', |
||||
// 获取数据 |
value: '1', |
||||
request() { |
}, |
||||
let _this = this |
{ |
||||
_this.$api.getBaseInfo(getApp().globalData.sid).then((resp) => { |
label: '中国石油天然气集团有限公司', |
||||
_this.page = resp |
value: '2', |
||||
_this.$nextTick(() => { |
}, |
||||
_this.$refs.pageView.setLoadState(2) |
{ |
||||
}) |
label: '苹果公司(APPLE)', |
||||
|
value: '3', |
||||
}).catch(e => { |
}, |
||||
_this.$nextTick(() => { |
{ |
||||
_this.$refs.pageView.setLoadState(1) |
label: 'CVSHealth公司(CVS HEALTH)', |
||||
}) |
value: '4', |
||||
}) |
}, |
||||
}, |
{ |
||||
uploadHeadImage() { |
label: '联合健康集团(UNITEDHEALTH GROUP)', |
||||
let _this = this |
value: '5', |
||||
uni.chooseImage({ |
}, |
||||
success: (chooseImageRes) => { |
{ |
||||
const tempFilePaths = chooseImageRes.tempFilePaths; |
label: '丰田汽车公司(TOYOTA MOTOR)', |
||||
uni.uploadFile({ |
value: '6', |
||||
url: _this.$api.headerUpload, |
} |
||||
filePath: tempFilePaths[0], |
], |
||||
name: 'file', |
page: {} |
||||
formData: { |
} |
||||
'userSid': getApp().globalData.sid |
}, |
||||
}, |
onLoad(options) { |
||||
success: (uploadFileRes) => { |
this.request() |
||||
_this.page.photo = JSON.parse(uploadFileRes.data).data; |
uni.$on("real-info", (e) => { |
||||
} |
this.$nextTick(() => { |
||||
}); |
this.$refs.pageView.setLoadState(0) |
||||
} |
}) |
||||
}); |
this.request(); |
||||
}, |
}) |
||||
// 修改昵称 |
}, |
||||
remark() { |
onUnload() { |
||||
this.$refs.inputDialog.open() |
uni.$off('real-info'); |
||||
}, |
}, |
||||
dialogInputConfirm(val) { |
methods: { |
||||
let _this = this |
// 获取数据 |
||||
_this.$api.changeNick({ |
request() { |
||||
userSid: getApp().globalData.sid, |
let _this = this |
||||
userNickName: val |
_this.$api.getBaseInfo(getApp().globalData.sid).then((resp) => { |
||||
}).then((resp) => { |
_this.page = resp |
||||
_this.page.nick = val |
_this.$nextTick(() => { |
||||
}).catch(e => { |
_this.$refs.pageView.setLoadState(2) |
||||
console.log(e); |
_this.options = resp.customerBankList |
||||
}) |
}) |
||||
}, |
|
||||
getPhoneNumber(e) { |
}).catch(e => { |
||||
let _this = this |
_this.$nextTick(() => { |
||||
console.log(e.detail.code) |
_this.$refs.pageView.setLoadState(1) |
||||
_this.$api.getPhone({ |
}) |
||||
userSid: getApp().globalData.sid, |
}) |
||||
code: e.detail.code |
}, |
||||
}).then((resp) => { |
uploadHeadImage() { |
||||
_this.page.phone = resp |
let _this = this |
||||
}).catch(e => { |
uni.chooseImage({ |
||||
console.log(e); |
success: (chooseImageRes) => { |
||||
}) |
const tempFilePaths = chooseImageRes.tempFilePaths; |
||||
}, |
uni.uploadFile({ |
||||
toRealInfo() { |
url: _this.$api.headerUpload, |
||||
uni.navigateTo({ |
filePath: tempFilePaths[0], |
||||
url: '/pages/me/RealInfo' |
name: 'file', |
||||
}) |
formData: { |
||||
} |
'userSid': getApp().globalData.sid |
||||
} |
}, |
||||
} |
success: (uploadFileRes) => { |
||||
</script> |
_this.page.photo = JSON.parse(uploadFileRes.data).data; |
||||
|
} |
||||
<style lang="scss"> |
}); |
||||
button { |
} |
||||
color: #828282; |
}); |
||||
background-color: #fff; |
}, |
||||
font-size: 28rpx; |
// 修改昵称 |
||||
padding-right: 10rpx; |
remark() { |
||||
} |
this.$refs.inputDialog.open() |
||||
|
}, |
||||
|
dialogInputConfirm(val) { |
||||
button::after { |
let _this = this |
||||
border: 0; |
_this.$api.changeNick({ |
||||
} |
userSid: getApp().globalData.sid, |
||||
|
userNickName: val |
||||
// 修改点击时的样式 |
}).then((resp) => { |
||||
.button-hover { |
_this.page.nick = val |
||||
color: #F85959; |
}).catch(e => { |
||||
background-color: #fff; |
console.log(e); |
||||
} |
}) |
||||
|
}, |
||||
page { |
getPhoneNumber(e) { |
||||
background-color: #f1f2f3; |
let _this = this |
||||
} |
console.log(e.detail.code) |
||||
|
_this.$api.getPhone({ |
||||
|
userSid: getApp().globalData.sid, |
||||
.menu-item { |
code: e.detail.code |
||||
height: 112rpx; |
}).then((resp) => { |
||||
width: auto; |
_this.page.phone = resp |
||||
display: flex; |
}).catch(e => { |
||||
flex-direction: row; |
console.log(e); |
||||
background-color: #fff; |
}) |
||||
align-items: center; |
}, |
||||
padding-left: 36rpx; |
toRealInfo() { |
||||
padding-right: 36rpx; |
uni.navigateTo({ |
||||
} |
url: '/pages/me/RealInfo' |
||||
|
}) |
||||
.more { |
}, |
||||
width: 35rpx; |
bank() {}, |
||||
height: 35rpx; |
selectChange2(e) { |
||||
float: right; |
// 此处为点击的事件 |
||||
} |
let param = { |
||||
|
userSid: getApp().globalData.sid, |
||||
.menu-item .icon { |
customerBankSid: e.bankSid |
||||
width: 69rpx; |
} |
||||
height: 35rpx; |
let _this = this |
||||
} |
_this.$api.saveTuiJianZhiHang(param).then((resp) => { |
||||
|
_this.request() |
||||
.menu-item .text { |
}).catch(e => { |
||||
font-size: 32rpx; |
_this.request() |
||||
color: #101010; |
}) |
||||
flex: 1; |
}, |
||||
float: left; |
searchEvent(val) { |
||||
} |
console.log('查询事件参数', val) |
||||
|
// 此处把新的请求值 赋值给options |
||||
.menu-item .explain { |
}, |
||||
font-size: 28rpx; |
} |
||||
color: #828282; |
} |
||||
margin-right: 10rpx; |
</script> |
||||
} |
|
||||
|
<style lang="scss"> |
||||
.line-thin { |
button { |
||||
height: 1rpx; |
color: #828282; |
||||
width: 100%; |
background-color: #fff; |
||||
background-color: #eee; |
font-size: 28rpx; |
||||
} |
padding-right: 10rpx; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
button::after { |
||||
|
border: 0; |
||||
|
} |
||||
|
|
||||
|
// 修改点击时的样式 |
||||
|
.button-hover { |
||||
|
color: #F85959; |
||||
|
background-color: #fff; |
||||
|
} |
||||
|
|
||||
|
page { |
||||
|
background-color: #f1f2f3; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
.menu-item { |
||||
|
height: 112rpx; |
||||
|
width: auto; |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
background-color: #fff; |
||||
|
align-items: center; |
||||
|
padding-left: 36rpx; |
||||
|
padding-right: 36rpx; |
||||
|
} |
||||
|
|
||||
|
.more { |
||||
|
width: 35rpx; |
||||
|
height: 35rpx; |
||||
|
float: right; |
||||
|
} |
||||
|
|
||||
|
.menu-item .icon { |
||||
|
width: 69rpx; |
||||
|
height: 35rpx; |
||||
|
} |
||||
|
|
||||
|
.menu-item .text { |
||||
|
font-size: 32rpx; |
||||
|
color: #101010; |
||||
|
flex: 1; |
||||
|
float: left; |
||||
|
} |
||||
|
|
||||
|
.menu-item .explain { |
||||
|
font-size: 28rpx; |
||||
|
color: #828282; |
||||
|
margin-right: 10rpx; |
||||
|
} |
||||
|
|
||||
|
.menu-item .explain2 { |
||||
|
font-size: 28rpx; |
||||
|
color: #828282; |
||||
|
} |
||||
|
|
||||
|
.line-thin { |
||||
|
height: 1rpx; |
||||
|
width: 100%; |
||||
|
background-color: #eee; |
||||
|
} |
||||
</style> |
</style> |
Loading…
Reference in new issue