You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
2.6 KiB

3 months ago
<view class="container" style="align-items: flex-start; padding: 20rpx; width: 100%; max-width: 100vw; overflow-x: hidden; position: relative; box-sizing: border-box;">
<view class="card" style="display: flex; align-items: center; justify-content: space-between;">
<view style="display: flex; align-items: center;">
<image
src="{{userInfo.avatarUrl || '/images/default-avatar.png'}}"
style="width: 100rpx; height: 100rpx; border-radius: 50%; margin-right: 20rpx;"
></image>
<view>
<view style="font-size: 32rpx; font-weight: bold;">{{userInfo.nickName || '未登录'}}</view>
<view style="font-size: 26rpx; color: #666;">当前身份: {{userType || '未设置'}}</view>
<view style="font-size: 26rpx; color: {{userInfo.phoneNumber === '13800138000' ? '#ff4d4f' : '#666'}};">
手机号: {{userInfo.phoneNumber === '13800138000' ? '临时手机号,请重新授权' : (userInfo.phoneNumber || '未绑定')}}
</view>
</view>
</view>
<button
class="edit-btn"
bindtap="onEditNickName"
style="background-color: #1677ff; color: white; padding: 10rpx 20rpx; border-radius: 20rpx; font-size: 26rpx;"
>
修改名称
</button>
</view>
<!-- 手机号授权按钮 -->
<view class="card" wx:if="{{!userInfo.phoneNumber || userInfo.phoneNumber === '13800138000'}}">
<button
open-type="getPhoneNumber"
bindgetphonenumber="onPhoneNumberResult"
type="primary"
style="margin: 20rpx 0;"
>
{{userInfo.phoneNumber === '13800138000' ? '重新授权手机号' : '授权手机号'}}
</button>
</view>
<view class="card">
<view class="title">我的标签</view>
<view style="flex-wrap: wrap; display: flex;">
<view wx:for="{{userTags}}" wx:key="index" style="background-color: #f0f2f5; padding: 10rpx 20rpx; border-radius: 20rpx; margin: 10rpx; font-size: 26rpx;">
{{item}}
</view>
</view>
</view>
<view class="card" wx:if="{{false}}">
<view class="title">身份管理</view>
<button
class="btn"
style="background-color: {{userType === 'buyer' || userType === 'both' ? '#888' : '#07c160'}}; color: white;"
bindtap="setAsBuyer"
>
{{userType === 'buyer' || userType === 'both' ? '已设为买家' : '设为买家'}}
</button>
<button
class="btn"
style="background-color: {{userType === 'seller' || userType === 'both' ? '#888' : '#1677ff'}}; color: white;"
bindtap="setAsSeller"
>
{{userType === 'seller' || userType === 'both' ? '已设为卖家' : '设为卖家'}}
</button>
</view>
</view>