Browse Source

会员图片优化

master
杜叶春 2 years ago
parent
commit
12743f9546
  1. BIN
      images/member/component_lv_0.jpg
  2. BIN
      images/member/component_lv_0.png
  3. BIN
      images/member/component_lv_1.jpg
  4. BIN
      images/member/component_lv_1.png
  5. BIN
      images/member/component_lv_2.jpg
  6. BIN
      images/member/component_lv_2.png
  7. BIN
      images/member/component_lv_3.jpg
  8. BIN
      images/member/component_lv_3.png
  9. BIN
      images/member/component_lv_4.jpg
  10. BIN
      images/member/component_lv_4.png
  11. BIN
      images/member/component_lv_5.jpg
  12. BIN
      images/member/component_lv_5.png
  13. BIN
      images/member/component_lv_6.jpg
  14. BIN
      images/member/component_lv_6.png
  15. 29
      pages/member/member.js
  16. 15
      pages/member/member.wxml
  17. 11
      pages/user/user.wxml

BIN
images/member/component_lv_0.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

BIN
images/member/component_lv_0.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
images/member/component_lv_1.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

BIN
images/member/component_lv_1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
images/member/component_lv_2.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

BIN
images/member/component_lv_2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
images/member/component_lv_3.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

BIN
images/member/component_lv_3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
images/member/component_lv_4.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

BIN
images/member/component_lv_4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
images/member/component_lv_5.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

BIN
images/member/component_lv_5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
images/member/component_lv_6.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

BIN
images/member/component_lv_6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

29
pages/member/member.js

@ -1,18 +1,41 @@
// pages/member/member.js // pages/member/member.js
var app = getApp()
var WXAPI = require('../../utils/server.js');
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
user: {},
},
requestMyData: function () {
var that = this;
WXAPI.userIndex({
accessId: app.globalData.accessId,
storeId: 239,
storeType: 1,
}).then(res => {
if (res.code == 200) {
var data = res.data;
if (data.data) {
that.setData({
user: data.data.user,
});
}
} else {
wx.showToast({
title: '访问失败!',
duration: 2000
});
}
});
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
this.requestMyData()
}, },
/** /**

15
pages/member/member.wxml

@ -1,13 +1,12 @@
<!--pages/member/member.wxml--> <!--pages/member/member.wxml-->
<view class="container"> <view class="container">
<view class="card"> <view class="card">
<view class="detail" style="color:#356386;">当前积分0,充值会员即可拥有积分特权</view> <view class="detail" style="color:#356386;">当前积分{{user.score}},充值会员即可拥有积分特权</view>
<image class="card_bg" src="/images/member/component_lv_1.jpg" mode="aspectFit"></image> <image class="card_bg" wx:if="{{user.level==1}}" src="/images/member/component_lv_1.png" mode="aspectFit"></image>
<!-- <image class="card_bg" wx:if="{{user.level==1}}" src="/images/member/component_lv_1.jpg" mode="aspectFill"></image> <image class="card_bg" wx:elif="{{user.level==2}}" src="/images/member/component_lv_2.png" mode="aspectFit"></image>
<image class="card_bg" wx:elif="{{user.level==2}}" src="/images/member/component_lv_2.jpg" mode="aspectFill"></image> <image class="card_bg" wx:elif="{{user.level==3}}" src="/images/member/component_lv_3.png" mode="aspectFit"></image>
<image class="card_bg" wx:elif="{{user.level==3}}" src="/images/member/component_lv_3.jpg" mode="aspectFill"></image> <image class="card_bg" wx:elif="{{user.level==4}}" src="/images/member/component_lv_4.png" mode="aspectFit"></image>
<image class="card_bg" wx:elif="{{user.level==4}}" src="/images/member/component_lv_4.jpg" mode="aspectFill"></image> <image class="card_bg" wx:elif="{{user.level==5}}" src="/images/member/component_lv_5.png" mode="aspectFit"></image>
<image class="card_bg" wx:elif="{{user.level==5}}" src="/images/member/component_lv_5.jpg" mode="aspectFill"></image> <image class="card_bg" wx:elif="{{user.level==6}}" src="/images/member/component_lv_6.png" mode="aspectFit"></image>
<image class="card_bg" wx:elif="{{user.level==6}}" src="/images/member/component_lv_6.jpg" mode="aspectFill"></image> -->
</view> </view>
</view> </view>

11
pages/user/user.wxml

@ -43,13 +43,12 @@
<block wx:if="{{user}}"> <block wx:if="{{user}}">
<view class='user_mc' bindtap="copyText" data-text="{{user.user_id}}" style='display:block;'> <view class='user_mc' bindtap="copyText" data-text="{{user.user_id}}" style='display:block;'>
<view class='user_name'>{{user.user_name}}</view> <view class='user_name'>{{user.user_name}}</view>
<!-- <image class="level" wx:if="{{user.level==1}}" src="/images/member/lv_1.png" mode="aspectFill" bindtap="navToMemberCenter"></image> <image class="level" wx:if="{{user.level==1}}" src="/images/member/lv_1.png" mode="aspectFill" bindtap="navToMemberCenter"></image>
<image class="level" wx:elif="{{user.level==2}}" src="/images/member/lv_2.png" mode="aspectFill" bindtap="navToMemberCenter"></image> <image class="level" wx:elif="{{user.level==2}}" src="/images/member/lv_2.png" mode="aspectFill" bindtap="navToMemberCenter"></image>
<image class="level" wx:elif="{{user.level==3}}" src="/images/member/lv_3.png" mode="aspectFill" bindtap="navToMemberCenter"></image> <image class="level" wx:elif="{{user.level==3}}" src="/images/member/lv_3.png" mode="aspectFill" bindtap="navToMemberCenter"></image>
<image class="level" wx:elif="{{user.level==4}}" src="/images/member/lv_4.png" mode="aspectFill" bindtap="navToMemberCenter"></image> <image class="level" wx:elif="{{user.level==4}}" src="/images/member/lv_4.png" mode="aspectFill" bindtap="navToMemberCenter"></image>
<image class="level" wx:elif="{{user.level==5}}" src="/images/member/lv_5.png" mode="aspectFill" bindtap="navToMemberCenter"></image> <image class="level" wx:elif="{{user.level==5}}" src="/images/member/lv_5.png" mode="aspectFill" bindtap="navToMemberCenter"></image>
<image class="level" wx:elif="{{user.level==6}}" src="/images/member/lv_6.png" mode="aspectFill" bindtap="navToMemberCenter"></image> --> <image class="level" wx:elif="{{user.level==6}}" src="/images/member/lv_6.png" mode="aspectFill" bindtap="navToMemberCenter"></image>
<image class="level" src="/images/member/lv_1.png" mode="aspectFill" bindtap="navToMemberCenter"></image>
</view> </view>
</block> </block>
<block wx:else> <block wx:else>
@ -69,18 +68,18 @@
<text>优惠券</text> <text>优惠券</text>
</view> </view>
<view bindtap="navToScore"> <view bindtap="navToScore">
<view>{{user.score?user.score:'—'}}</view> <view>{{user?user.score:'—'}}</view>
<text>积分</text> <text>积分</text>
</view> </view>
<view bindtap="navToWallet"> <view bindtap="navToWallet">
<view> <view>
{{user.money?user.money:'—'}} {{user?user.money:'—'}}
</view> </view>
<text>余额</text> <text>余额</text>
</view> </view>
<view bindtap="navToCollection"> <view bindtap="navToCollection">
<view class="relative" style="top: -6rpx;"> <view class="relative" style="top: -6rpx;">
{{collection_num?collection_num:'—'}} {{user?collection_num:'—'}}
</view> </view>
<text>我的收藏</text> <text>我的收藏</text>
</view> </view>

Loading…
Cancel
Save