|
|
|
|
<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/你有好蛋.png'}}"
|
|
|
|
|
style="width: 100rpx; height: 100rpx; border-radius: 50%; margin-right: 20rpx; cursor: pointer;"
|
|
|
|
|
bindtap="onAvatarClick"
|
|
|
|
|
></image>
|
|
|
|
|
<view>
|
|
|
|
|
<view style="font-size: 32rpx; font-weight: bold;">{{userInfo.hiddenPhoneNumber || userInfo.phoneNumber || '未登录'}}</view>
|
|
|
|
|
<view style="font-size: 26rpx; color: #666;">
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<!-- 退出登录按钮 -->
|
|
|
|
|
<button
|
|
|
|
|
wx:if="{{userInfo.phoneNumber}}"
|
|
|
|
|
style="background-color: #ff4d4f; color: white; padding: 12rpx 4rpx; border-radius: 20rpx; font-size: 20rpx; width: 176rpx; display: block; box-sizing: border-box; left: 62rpx; top: 0rpx; position: relative"
|
|
|
|
|
bindtap="logout"
|
|
|
|
|
>
|
|
|
|
|
退出登录
|
|
|
|
|
</button>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<!-- 手机号授权按钮 -->
|
|
|
|
|
<view class="card" wx:if="{{!userInfo.phoneNumber}}">
|
|
|
|
|
<button
|
|
|
|
|
open-type="getPhoneNumber"
|
|
|
|
|
bindgetphonenumber="onPhoneNumberResult"
|
|
|
|
|
type="primary"
|
|
|
|
|
style="margin: 20rpx 0;"
|
|
|
|
|
>
|
|
|
|
|
授权登录
|
|
|
|
|
</button>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<view class="card">
|
|
|
|
|
<view class="title">我的标签</view>
|
|
|
|
|
<view style="flex-wrap: wrap; display: flex;">
|
|
|
|
|
<!-- 淘宝样式的收藏按钮 -->
|
|
|
|
|
<view style="background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%); color: white; padding: 12rpx 24rpx; border-radius: 24rpx; margin: 10rpx; font-size: 26rpx; font-weight: bold; box-shadow: 0 4rpx 12rpx rgba(255, 107, 107, 0.3); display: flex; align-items: center; cursor: pointer;" bindtap="goToFavorites">
|
|
|
|
|
<text style="margin-right: 8rpx;">⭐</text>
|
|
|
|
|
<text>收藏夹</text>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 订单按钮 -->
|
|
|
|
|
<view style="background: linear-gradient(135deg, #1677ff 0%, #0d54c7 100%); color: white; padding: 12rpx 24rpx; border-radius: 24rpx; margin: 10rpx; font-size: 26rpx; font-weight: bold; box-shadow: 0 4rpx 12rpx rgba(22, 119, 255, 0.3); display: flex; align-items: center; cursor: pointer;" bindtap="goToOrders">
|
|
|
|
|
<text style="margin-right: 8rpx;">📦</text>
|
|
|
|
|
<text>订单</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view wx:if="{{isInPersonnel}}" style="background: linear-gradient(135deg, #1677ff 0%, #0d54c7 100%); color: white; padding: 12rpx 24rpx; border-radius: 24rpx; margin: 10rpx; font-size: 26rpx; font-weight: bold; box-shadow: 0 4rpx 12rpx rgba(22, 119, 255, 0.3); display: flex; align-items: center; cursor: pointer;" bindtap="navigateToGoods">
|
|
|
|
|
<text style="margin-right: 8rpx;">📦</text>
|
|
|
|
|
<text>货源管理</text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 个人认证 -->
|
|
|
|
|
<view class="card" bindtap="navigateToAuthentication">
|
|
|
|
|
<view style="display: flex; justify-content: space-between; align-items: center; width: 100%;">
|
|
|
|
|
<text style="font-size: 28rpx; color: #333;">个人认证</text>
|
|
|
|
|
<view style="display: flex; align-items: center;">
|
|
|
|
|
<text wx:if="{{userInfo.idcardstatus === 0}}" style="font-size: 24rpx; color: #faad14; margin-right: 12rpx;">待审核</text>
|
|
|
|
|
<text wx:elif="{{userInfo.idcardstatus === 1}}" style="font-size: 24rpx; color: #52c41a; margin-right: 12rpx;">审核通过</text>
|
|
|
|
|
<text wx:elif="{{userInfo.idcardstatus === 2}}" style="font-size: 24rpx; color: #ff4d4f; margin-right: 12rpx; max-width: 400rpx; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">{{userInfo.reasonforfailure ? '审核失败: ' + userInfo.reasonforfailure : '审核失败'}}</text>
|
|
|
|
|
<text style="font-size: 28rpx; color: #999;">></text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 位置授权 -->
|
|
|
|
|
<view class="card">
|
|
|
|
|
<view class="title">位置信息</view>
|
|
|
|
|
<view style="padding: 20rpx 0;">
|
|
|
|
|
<view wx:if="{{hasLocationAuth}}" style="font-size: 28rpx; color: #333; margin-bottom: 20rpx;">
|
|
|
|
|
当前位置:{{locationInfo || '暂无位置信息'}}
|
|
|
|
|
</view>
|
|
|
|
|
<view wx:if="{{hasLocationAuth}}" style="display: flex; justify-content: space-between; gap: 12rpx;">
|
|
|
|
|
<button
|
|
|
|
|
class="btn"
|
|
|
|
|
style="background-color: #18d87eff; color: white; width: 48%; margin-bottom: 0;"
|
|
|
|
|
bindtap="getUserLocation"
|
|
|
|
|
>
|
|
|
|
|
更新位置
|
|
|
|
|
</button>
|
|
|
|
|
<button
|
|
|
|
|
class="btn"
|
|
|
|
|
style="background-color: #1677ff; color: white; width: 48%; margin-bottom: 0;"
|
|
|
|
|
bindtap="chooseLocation"
|
|
|
|
|
>
|
|
|
|
|
手动选择位置
|
|
|
|
|
</button>
|
|
|
|
|
</view>
|
|
|
|
|
<button
|
|
|
|
|
wx:if="{{!hasLocationAuth}}"
|
|
|
|
|
class="btn"
|
|
|
|
|
style="background-color: #1677ff; color: white;"
|
|
|
|
|
bindtap="requestLocationAuth"
|
|
|
|
|
>
|
|
|
|
|
授权位置
|
|
|
|
|
</button>
|
|
|
|
|
</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>
|