|
@@ -3,22 +3,34 @@
|
|
|
<scroll-view scroll-y class="bg">
|
|
|
<div class="user">
|
|
|
<van-cell custom-class="head-cell" is-link label-class="" center>
|
|
|
- <button open-type="getPhoneNumber" @getphonenumber="getPhoneByUser" class="userButton" slot="title">
|
|
|
+ <view
|
|
|
+ @click="
|
|
|
+ () => {
|
|
|
+ userFormShow = true;
|
|
|
+ username = userInfo.nickName||'新用户';
|
|
|
+ }
|
|
|
+ "
|
|
|
+ class="userButton"
|
|
|
+ slot="title"
|
|
|
+ >
|
|
|
<image
|
|
|
class="user-headImg"
|
|
|
v-if="userInfo.headImage"
|
|
|
:src="userInfo.headImage"
|
|
|
></image>
|
|
|
<image class="user-headImg" v-else :src="unLoginHead"></image>
|
|
|
- <view class="flex" style="width: 60%; padding-left: 24rpx;text-align:left;">
|
|
|
- <view style="font-size: 38rpx; color: #0a1a33;width: 100%;">{{
|
|
|
+ <view
|
|
|
+ class="flex"
|
|
|
+ style="width: 60%; padding-left: 24rpx; text-align: left"
|
|
|
+ >
|
|
|
+ <view style="font-size: 38rpx; color: #0a1a33; width: 100%">{{
|
|
|
userInfo.nickName || "新用户"
|
|
|
}}</view>
|
|
|
- <view style="font-size: 26rpx; color: #8a9099;width: 100%;">
|
|
|
+ <view style="font-size: 26rpx; color: #8a9099; width: 100%">
|
|
|
{{ "点击绑定手机号" }}</view
|
|
|
>
|
|
|
</view>
|
|
|
- </button>
|
|
|
+ </view>
|
|
|
</van-cell>
|
|
|
|
|
|
<!-- <van-cell title="我要提现" value="" is-link center @click="goCashOut">
|
|
@@ -111,6 +123,54 @@
|
|
|
unit-id="adunit-8eb44bbd7e3147d4"
|
|
|
></ad>
|
|
|
</view>
|
|
|
+ <van-popup position="bottom" :show="userFormShow">
|
|
|
+ <view class="userform">
|
|
|
+ <view class="userform-close">
|
|
|
+ <van-icon
|
|
|
+ @click="
|
|
|
+ () => {
|
|
|
+ userFormShow = false;
|
|
|
+ }
|
|
|
+ "
|
|
|
+ color="#a8a8a8"
|
|
|
+ size="18"
|
|
|
+ name="cross"
|
|
|
+ />
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <van-field
|
|
|
+ :value="username"
|
|
|
+ required
|
|
|
+ clearable
|
|
|
+ label="用户名"
|
|
|
+ @change="changeUserName"
|
|
|
+ placeholder="请输入用户名"
|
|
|
+ />
|
|
|
+ <van-field
|
|
|
+ readonly
|
|
|
+ :value="userphone"
|
|
|
+ clearable
|
|
|
+ label="手机号"
|
|
|
+ placeholder="请绑定手机号"
|
|
|
+ >
|
|
|
+ <van-button
|
|
|
+ open-type="getPhoneNumber"
|
|
|
+ @getphonenumber="getPhoneByUser"
|
|
|
+ slot="button"
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ >
|
|
|
+ 获取手机号
|
|
|
+ </van-button>
|
|
|
+ </van-field>
|
|
|
+ </view>
|
|
|
+ <view class="userform-bind">
|
|
|
+ <van-button custom-style="width:690rpx;" round type="primary"
|
|
|
+ >修改用户信息</van-button
|
|
|
+ >
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </van-popup>
|
|
|
|
|
|
<!-- <view class="ad-box serviceBox">
|
|
|
<ad unit-id="adunit-d8c1548cc9663765"></ad>
|
|
@@ -140,10 +200,21 @@ export default {
|
|
|
return this.$store.getters.isVip;
|
|
|
},
|
|
|
},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ userFormShow: false,
|
|
|
+ username: "",
|
|
|
+ userphone: "",
|
|
|
+ };
|
|
|
+ },
|
|
|
mounted() {
|
|
|
this.$store.dispatch("GetInfo");
|
|
|
},
|
|
|
methods: {
|
|
|
+ changeUserName(e) {
|
|
|
+ console.log(e);
|
|
|
+ this.username = e.detail;
|
|
|
+ },
|
|
|
getPhoneByUser(e) {
|
|
|
console.log(e);
|
|
|
},
|
|
@@ -200,6 +271,22 @@ export default {
|
|
|
}
|
|
|
</style>
|
|
|
<style lang="scss" scoped>
|
|
|
+.userform {
|
|
|
+ width: 100%;
|
|
|
+ height: 320rpx;
|
|
|
+ background: #fff;
|
|
|
+ .userform-close {
|
|
|
+ text-align: right;
|
|
|
+ padding-right: 15rpx;
|
|
|
+ padding-top: 15rpx;
|
|
|
+ }
|
|
|
+ .userform-bind {
|
|
|
+ width: 100%;
|
|
|
+ padding: 30rpx 30rpx;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ }
|
|
|
+}
|
|
|
.flex {
|
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
@@ -209,7 +296,7 @@ export default {
|
|
|
border: 0;
|
|
|
}
|
|
|
.userButton {
|
|
|
- border: 0;
|
|
|
+ border: 0;
|
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
|
flex-direction: row;
|