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.
87 lines
3.9 KiB
87 lines
3.9 KiB
<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;"
|
|
></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>
|
|
|
|
</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 wx:for="{{userTags}}" wx:key="index" style="background-color: #f0f2f5; padding: 10rpx 20rpx; border-radius: 20rpx; margin: 10rpx; font-size: 26rpx;">
|
|
{{item}}
|
|
</view>
|
|
<!-- 淘宝样式的收藏按钮 -->
|
|
<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="goToOrders">
|
|
<text style="margin-right: 8rpx;">📦</text>
|
|
<text>货源管理</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>
|
|
<button
|
|
class="btn"
|
|
style="background-color: {{hasLocationAuth ? '#18d87eff' : '#1677ff'}}; color: white;"
|
|
bindtap="{{hasLocationAuth ? 'getUserLocation' : 'requestLocationAuth'}}"
|
|
>
|
|
{{hasLocationAuth ? '更新位置' : '授权位置'}}
|
|
</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>
|
|
|