Commit a03b724abfdad275ee0e83aabd359ce07ef9e91c
1 parent
ba7c976d
自定义样式的优化
Showing
7 changed files
with
197 additions
and
10 deletions
components/diy_user_info/diy_user_info.wxml
| ... | ... | @@ -2,17 +2,29 @@ |
| 2 | 2 | <view class="xc-head rel"> |
| 3 | 3 | <block wx:if="{{object.bg_type==1}}"> |
| 4 | 4 | <image class="xc-background" src="{{iurl}}{{ad_img?ad_img:'/miniapp/images/user_index_powder.jpg'}}"> |
| 5 | - <block vw:if="{{object.style==0}}"> | |
| 5 | + <block wx:if="{{object.style==0}}"> | |
| 6 | 6 | <include src="style1.wxml"></include>s |
| 7 | 7 | </block> |
| 8 | + <block wx:if="{{object.style==1}}"> | |
| 9 | + <include src="style2.wxml"></include>s | |
| 10 | + </block> | |
| 11 | + <block wx:if="{{object.style==2}}"> | |
| 12 | + <include src="style3.wxml"></include>s | |
| 13 | + </block> | |
| 8 | 14 | |
| 9 | 15 | </image> |
| 10 | 16 | </block> |
| 11 | 17 | <block wx:else> |
| 12 | 18 | <view class="xc-background" style="background-color:{{object.bg_color}}"> |
| 13 | - <block vw:if="{{object.style==0}}"> | |
| 19 | + <block wx:if="{{object.style==0}}"> | |
| 14 | 20 | <include src="style1.wxml"></include> |
| 15 | 21 | </block> |
| 22 | + <block wx:if="{{object.style==1}}"> | |
| 23 | + <include src="style2.wxml"></include> | |
| 24 | + </block> | |
| 25 | + <block wx:if="{{object.style==2}}"> | |
| 26 | + <include src="style3.wxml"></include> | |
| 27 | + </block> | |
| 16 | 28 | </view> |
| 17 | 29 | </block> |
| 18 | 30 | </view> | ... | ... |
components/diy_user_info/diy_user_info.wxss
| ... | ... | @@ -117,7 +117,7 @@ |
| 117 | 117 | } |
| 118 | 118 | .xc-assets { |
| 119 | 119 | width: 94%; |
| 120 | - bottom: 32rpx; | |
| 120 | + bottom: 26rpx; | |
| 121 | 121 | color: #fff; |
| 122 | 122 | line-height: 46rpx; |
| 123 | 123 | margin-left: 10rpx; |
| ... | ... | @@ -130,8 +130,8 @@ |
| 130 | 130 | background: #fe9db5; |
| 131 | 131 | width: 70rpx; |
| 132 | 132 | height: 70rpx; */ |
| 133 | - top: 70rpx; | |
| 134 | - right: 64rpx; | |
| 133 | + top: 40rpx; | |
| 134 | + right: 40rpx; | |
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | .xc-qrcode { | ... | ... |
components/diy_user_info/style1.wxml
| ... | ... | @@ -45,7 +45,7 @@ |
| 45 | 45 | </view> |
| 46 | 46 | |
| 47 | 47 | |
| 48 | -<view wx:if="{{userInfo && object.is_user_card}}" class="xc-qrcode-frame abs "> | |
| 48 | +<view wx:if="{{userInfo && object.is_user_card}}" class="xc-qrcode-frame abs" style="top:46rpx"> | |
| 49 | 49 | <image bindtap='show_tc' class=" xc-qrcode " style="border: 5rpx solid #fe9db5;background: #fe9db5;" src="{{iurl}}/miniapp/images/qrcode1.png"></image> |
| 50 | 50 | <view style="font-size:12px;color:{{object.word_color}}">会员卡</view> |
| 51 | 51 | </view> | ... | ... |
components/diy_user_info/style2.wxml
0 → 100644
| 1 | +<!-- 会员有登陆登陆的情况 --> | |
| 2 | +<view class="xc-user-frame abs" wx:if="{{userInfo}}" style="top:20rpx"> | |
| 3 | + | |
| 4 | + <view class="flex jc-center"> | |
| 5 | + <view style="position:relative;"> | |
| 6 | + <image class="xc-user-img circle" bindtap="go_info" src="{{userInfo.head_pic?userInfo.head_pic:defaultAvatar}}"></image> | |
| 7 | + <block wx:if="{{pulscardname && sys_switch.rank_switch > 0 && object.is_plus }}"> | |
| 8 | + <view data-url="/pages/user/plus/plus" catchtap="goto" class="flex-center plusMax" style="bottom:-12rpx"> | |
| 9 | + <image class="fuls" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> | |
| 10 | + <view>{{pulscardname}}</view> | |
| 11 | + </view> | |
| 12 | + </block> | |
| 13 | + </view> | |
| 14 | + </view> | |
| 15 | + | |
| 16 | + <view class="xc-uesr-name" style="color:{{object.word_color}}"> | |
| 17 | + <view class="flex ai-center jc-center"> | |
| 18 | + <text class="ellipsis-1" style="max-width: 290rpx;display: inline-block">{{userInfo.nickname}}</text> | |
| 19 | + | |
| 20 | + <view class="hvip" wx:if='{{qy_data && qy_data.GradeName && qy_data.is_init && object.is_qy}}'> | |
| 21 | + <image class="vip-mem" src="{{iurl}}/miniapp/images/vip_hg0.png"></image>{{qy_data.GradeName}} | |
| 22 | + </view> | |
| 23 | + </view> | |
| 24 | + <view class="flex fs24 xc-grow-ups jc-center" style="margin-left:8rpx;margin-top:4rpx" wx:if="{{qy_data && qy_data.is_init && qy_data.gradeId && object.is_cz}}" bindtap='jump'> | |
| 25 | + <block wx:if="{{qy_data.cz_val<qy_data.full_cz_val}}"> | |
| 26 | + {{" "}} | |
| 27 | + <text class="grow-up-val" style="background:{{usertop_ad.bgcolor?usertop_ad.bgcolor:'#fe9db5'}};">{{rfmName}}</text> | |
| 28 | + <view style='margin-left:5rpx; '>{{qy_data.cz_val}} / {{qy_data.need_money}}</view> | |
| 29 | + </block> | |
| 30 | + <block wx:else> | |
| 31 | + {{" "}} | |
| 32 | + <text class="grow-up-val" style="background:{{usertop_ad.bgcolor?usertop_ad.bgcolor:'#fe9db5'}};">{{rfmName}}</text> {{cz_val}} | |
| 33 | + </block> | |
| 34 | + </view> | |
| 35 | + </view> | |
| 36 | + | |
| 37 | +</view> | |
| 38 | + | |
| 39 | + | |
| 40 | +<view wx:else class="flex-space-between abs xc-user-frame"> | |
| 41 | + <!-- 会员没有登陆的情况 --> | |
| 42 | + <view class="xc-user-left flex" bindtap="login_user"> | |
| 43 | + <image class="xc-user-img circle" src="{{defaultAvatar}}"></image> | |
| 44 | + <view class="xc-uesr-name" style="color:{{object.word_color}}">请点击注册</view> | |
| 45 | + </view> | |
| 46 | +</view> | |
| 47 | + | |
| 48 | + | |
| 49 | +<view wx:if="{{userInfo && object.is_user_card}}" class="xc-qrcode-frame abs "> | |
| 50 | + <image bindtap='show_tc' class=" xc-qrcode " style="border: 5rpx solid #fe9db5;background: #fe9db5;" src="{{iurl}}/miniapp/images/qrcode1.png"></image> | |
| 51 | + <view style="font-size:12px;color:{{object.word_color}}">会员卡</view> | |
| 52 | +</view> | |
| 53 | + | |
| 54 | +<view class="flex-vertical abs xc-grow-frame rel" style="display: none"> | |
| 55 | + <view class="xc-grow-up">{{rfmName}}</view> | |
| 56 | + <view class="xc-line-not rel"> | |
| 57 | + <image class="xc-bj-img abs" src="{{iurl}}/miniapp/images/baijing.png"></image> | |
| 58 | + <image class="xc-zs-img abs" src="{{iurl}}/miniapp/images/zhuangshi.png"></image> | |
| 59 | + <view class="xc-line-Yes abs" style="width:{{length}}rpx;"></view> | |
| 60 | + </view> | |
| 61 | + <view class="xc-grow-val">0/0</view> | |
| 62 | +</view> | |
| 63 | + | |
| 64 | + | |
| 65 | +<!-- 底部显示余额,储值卡,积分,优惠券等 --> | |
| 66 | +<view class="flex-equality abs xc-assets" style="color:{{object.word_color}}"> | |
| 67 | + | |
| 68 | + <block wx:for="{{object.show_arr}}"> | |
| 69 | + <block wx:if="{{item.show}}"> | |
| 70 | + <block wx:if="{{item.type=='user_money'}}"> | |
| 71 | + <view class="t-c typefont" bindtap='balance'>{{yuer?yuer:0}} | |
| 72 | + <view class='numfont'>余额</view> | |
| 73 | + </view> | |
| 74 | + </block> | |
| 75 | + <block wx:if="{{item.type=='yc' && !is_close_chuzhi}}"> | |
| 76 | + <view class="t-c typefont" bindtap='deposit'>{{udata.Balance?udata.Balance:0}} | |
| 77 | + <view class='numfont'>储值款</view> | |
| 78 | + </view> | |
| 79 | + </block> | |
| 80 | + <block wx:if="{{item.type=='jf'}}"> | |
| 81 | + <view class="t-c typefont" bindtap='integral'>{{udata.Integral?udata.Integral:0}} | |
| 82 | + <view class='numfont'>积分</view> | |
| 83 | + </view> | |
| 84 | + </block> | |
| 85 | + <block wx:if="{{item.type=='quan'}}"> | |
| 86 | + <view class="t-c typefont" bindtap='coupon'>{{udata.CashCount+byquan?udata.CashCount+byquan:0}} | |
| 87 | + <view class='numfont'>优惠券</view> | |
| 88 | + </view> | |
| 89 | + </block> | |
| 90 | + </block> | |
| 91 | + | |
| 92 | + | |
| 93 | + </block> | |
| 94 | +</view> | |
| 0 | 95 | \ No newline at end of file | ... | ... |
components/diy_user_info/style3.wxml
0 → 100644
| 1 | +<!-- 会员有登陆登陆的情况 --> | |
| 2 | +<view class="xc-user-frame abs" wx:if="{{userInfo}}" style="top:20rpx"> | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + <view class="xc-uesr-name" style="color:{{object.word_color}}"> | |
| 7 | + <view class="flex ai-center jc-center"> | |
| 8 | + <text class="ellipsis-1" style="max-width: 290rpx;display: inline-block">{{userInfo.nickname}}</text> | |
| 9 | + | |
| 10 | + | |
| 11 | + </view> | |
| 12 | + <view class="flex fs24 xc-grow-ups" style="margin-left:8rpx;margin-top:4rpx" wx:if="{{qy_data && qy_data.is_init && qy_data.gradeId && object.is_cz}}" bindtap='jump'> | |
| 13 | + <block wx:if="{{qy_data.cz_val<qy_data.full_cz_val}}"> | |
| 14 | + {{" "}} | |
| 15 | + <text class="grow-up-val" style="background:{{usertop_ad.bgcolor?usertop_ad.bgcolor:'#fe9db5'}};">{{rfmName}}</text> | |
| 16 | + <view style='margin-left:5rpx; '>{{qy_data.cz_val}} / {{qy_data.need_money}}</view> | |
| 17 | + </block> | |
| 18 | + <block wx:else> | |
| 19 | + {{" "}} | |
| 20 | + <text class="grow-up-val" style="background:{{usertop_ad.bgcolor?usertop_ad.bgcolor:'#fe9db5'}};">{{rfmName}}</text> {{cz_val}} | |
| 21 | + </block> | |
| 22 | + </view> | |
| 23 | + </view> | |
| 24 | + | |
| 25 | +</view> | |
| 26 | + | |
| 27 | + | |
| 28 | +<view wx:else class="flex-space-between abs xc-user-frame"> | |
| 29 | + <!-- 会员没有登陆的情况 --> | |
| 30 | + <view class="xc-user-left flex" bindtap="login_user"> | |
| 31 | + <image class="xc-user-img circle" src="{{defaultAvatar}}"></image> | |
| 32 | + <view class="xc-uesr-name" style="color:{{object.word_color}}">请点击注册</view> | |
| 33 | + </view> | |
| 34 | +</view> | |
| 35 | + | |
| 36 | + | |
| 37 | +<view wx:if="{{userInfo && object.is_user_card}}" class="xc-qrcode-frame abs "> | |
| 38 | + <image bindtap='show_tc' class=" xc-qrcode " style="border: 5rpx solid #fe9db5;background: #fe9db5;" src="{{iurl}}/miniapp/images/qrcode1.png"></image> | |
| 39 | + <view style="font-size:12px;color:{{object.word_color}}">会员卡</view> | |
| 40 | +</view> | |
| 41 | + | |
| 42 | +<view class="flex-vertical abs xc-grow-frame rel" style="display: none"> | |
| 43 | + <view class="xc-grow-up">{{rfmName}}</view> | |
| 44 | + <view class="xc-line-not rel"> | |
| 45 | + <image class="xc-bj-img abs" src="{{iurl}}/miniapp/images/baijing.png"></image> | |
| 46 | + <image class="xc-zs-img abs" src="{{iurl}}/miniapp/images/zhuangshi.png"></image> | |
| 47 | + <view class="xc-line-Yes abs" style="width:{{length}}rpx;"></view> | |
| 48 | + </view> | |
| 49 | + <view class="xc-grow-val">0/0</view> | |
| 50 | +</view> | |
| 51 | + | |
| 52 | + | |
| 53 | +<!-- 底部显示余额,储值卡,积分,优惠券等 --> | |
| 54 | +<view class="flex-equality abs xc-assets" style="color:{{object.word_color}}"> | |
| 55 | + | |
| 56 | + <block wx:for="{{object.show_arr}}"> | |
| 57 | + <block wx:if="{{item.show}}"> | |
| 58 | + <block wx:if="{{item.type=='user_money'}}"> | |
| 59 | + <view class="t-c typefont" bindtap='balance'>{{yuer?yuer:0}} | |
| 60 | + <view class='numfont'>余额</view> | |
| 61 | + </view> | |
| 62 | + </block> | |
| 63 | + <block wx:if="{{item.type=='yc' && !is_close_chuzhi}}"> | |
| 64 | + <view class="t-c typefont" bindtap='deposit'>{{udata.Balance?udata.Balance:0}} | |
| 65 | + <view class='numfont'>储值款</view> | |
| 66 | + </view> | |
| 67 | + </block> | |
| 68 | + <block wx:if="{{item.type=='jf'}}"> | |
| 69 | + <view class="t-c typefont" bindtap='integral'>{{udata.Integral?udata.Integral:0}} | |
| 70 | + <view class='numfont'>积分</view> | |
| 71 | + </view> | |
| 72 | + </block> | |
| 73 | + <block wx:if="{{item.type=='quan'}}"> | |
| 74 | + <view class="t-c typefont" bindtap='coupon'>{{udata.CashCount+byquan?udata.CashCount+byquan:0}} | |
| 75 | + <view class='numfont'>优惠券</view> | |
| 76 | + </view> | |
| 77 | + </block> | |
| 78 | + </block> | |
| 79 | + | |
| 80 | + | |
| 81 | + </block> | |
| 82 | +</view> | |
| 0 | 83 | \ No newline at end of file | ... | ... |
components/diy_user_my_rights/diy_user_my_rights.wxss
packageG/pages/user_template/index.js
| ... | ... | @@ -46,13 +46,12 @@ Page({ |
| 46 | 46 | } |
| 47 | 47 | }) |
| 48 | 48 | } |
| 49 | - | |
| 50 | 49 | //判断有没有登陆 |
| 51 | 50 | setTimeout(() =>{ |
| 52 | 51 | if (!getApp().globalData.userInfo) { |
| 53 | 52 | getApp().goto('/packageE/pages/togoin/togoin'); |
| 54 | 53 | } |
| 55 | - },1000) | |
| 54 | + },1500) | |
| 56 | 55 | |
| 57 | 56 | }, |
| 58 | 57 | |
| ... | ... | @@ -320,7 +319,7 @@ Page({ |
| 320 | 319 | goods_list.get_list(); |
| 321 | 320 | } |
| 322 | 321 | |
| 323 | - }, 1000) | |
| 322 | + }, 1500) | |
| 324 | 323 | |
| 325 | 324 | }, |
| 326 | 325 | ... | ... |