Browse Source

2021-2-1UI调整

featrue/v4.2
huziyuan 5 years ago
parent
commit
b9d0de6dc3
3 changed files with 58 additions and 28 deletions
  1. 36
      pages/home/index/index.js
  2. 31
      pages/home/index/index.wxml
  3. 19
      pages/home/index/index.wxss

36
pages/home/index/index.js

@ -44,6 +44,11 @@ Component({
height: app.globalData.safeFragmentHeight, height: app.globalData.safeFragmentHeight,
userInfo: app.globalData.userInfo userInfo: app.globalData.userInfo
}) })
if (app.globalData.userInfo && app.globalData.userInfo.memberExpiredAt) {
this.setData({
'userInfo.memberExpiredAt': app.globalData.userInfo.memberExpiredAt.memberExpiredAt
})
}
} }
this.fetchUserInfo() this.fetchUserInfo()
this.data.firstShow = true this.data.firstShow = true
@ -82,11 +87,16 @@ Component({
userInfo: app.globalData.userInfo, userInfo: app.globalData.userInfo,
userName: nickname userName: nickname
}) })
if(this.data.userInfo.isVIP==1){
this.setData({
'userInfo.memberExpiredAt':util.formatDate(new Date(app.globalData.userInfo.memberExpiredAt), 'Y-M-D')
})
}
}) })
getBalanceInfo().then(result => { getBalanceInfo().then(result => {
this.setData({ this.setData({
accountMoney: math.minus(result.data.accountMoney, result.data.frozenMoney), accountMoney: math.minus(result.data.accountMoney, result.data.frozenMoney),
frozenMoney:result.data.frozenMoney
frozenMoney: result.data.frozenMoney
}) })
}) })
getMessageNumber().then(result => { getMessageNumber().then(result => {
@ -118,22 +128,32 @@ Component({
util.navigateTo('/pages/home/setting/index') util.navigateTo('/pages/home/setting/index')
} else if (e.currentTarget.id == 'tovip') { } else if (e.currentTarget.id == 'tovip') {
util.navigateTo('/pages/ztbvip/index') util.navigateTo('/pages/ztbvip/index')
}else if (e.currentTarget.id == 'myCus') {
} else if (e.currentTarget.id == 'myCus') {
util.navigateTo('/pages/home/service/index') util.navigateTo('/pages/home/service/index')
}else if (e.currentTarget.id == 'qnLogistic') {
} else if (e.currentTarget.id == 'qnLogistic') {
util.navigateTo('/pages/html/logistics/index') util.navigateTo('/pages/html/logistics/index')
} else if (e.currentTarget.id == 'toMyMoney') { } else if (e.currentTarget.id == 'toMyMoney') {
util.navigateTo('/pages/bank/bill/index') util.navigateTo('/pages/bank/bill/index')
} else if (e.currentTarget.id == 'agent50') { } else if (e.currentTarget.id == 'agent50') {
wx.navigateTo({ url: '/pages/agent/order/index?status=50&tabIndex=1' })
wx.navigateTo({
url: '/pages/agent/order/index?status=50&tabIndex=1'
})
} else if (e.currentTarget.id == 'agent51') { } else if (e.currentTarget.id == 'agent51') {
wx.navigateTo({ url: '/pages/agent/order/index?status=51&tabIndex=2' })
wx.navigateTo({
url: '/pages/agent/order/index?status=51&tabIndex=2'
})
} else if (e.currentTarget.id == 'agent53') { } else if (e.currentTarget.id == 'agent53') {
wx.navigateTo({ url: '/pages/agent/order/index?status=53&tabIndex=3' })
wx.navigateTo({
url: '/pages/agent/order/index?status=53&tabIndex=3'
})
} else if (e.currentTarget.id == 'agent54') { } else if (e.currentTarget.id == 'agent54') {
wx.navigateTo({ url: '/pages/agent/order/index?status=54&tabIndex=4' })
wx.navigateTo({
url: '/pages/agent/order/index?status=54&tabIndex=4'
})
} else if (e.currentTarget.id == 'agent55') { } else if (e.currentTarget.id == 'agent55') {
wx.navigateTo({ url: '/pages/agent/order/index?status=55&tabIndex=5' })
wx.navigateTo({
url: '/pages/agent/order/index?status=55&tabIndex=5'
})
} }
}, },
toUserInfo: function () { toUserInfo: function () {

31
pages/home/index/index.wxml

@ -7,18 +7,18 @@
<image style="width:156rpx;height:156rpx;border-radio:30px" slot="loading" src="/assets/myinfo/user-icon.png"></image> <image style="width:156rpx;height:156rpx;border-radio:30px" slot="loading" src="/assets/myinfo/user-icon.png"></image>
</wux-image> </wux-image>
<view class="topText" bindtap="toUserInfo"> <view class="topText" bindtap="toUserInfo">
<view wx:if="{{userInfo}}" style="width:208rpx;height:158rpx">
<text class="textType1">{{userName}}\n</text>
<view wx:if="{{userInfo}}" style="height:158rpx">
<view>
<text class="textType1">{{userInfo.realName}}</text>
<image class="img-auth2" src="{{userInfo.isAuth == 1 ? '/assets/myinfo/ysmicon.png' : '/assets/myinfo/wsmicon.png'}}">
</image>
</view>
<text class="textType2">{{userInfo.mobile}}</text> <text class="textType2">{{userInfo.mobile}}</text>
</view> </view>
<view wx:else style="width:208rpx;height:158rpx"> <view wx:else style="width:208rpx;height:158rpx">
<text class="textType1">点击登录\n</text> <text class="textType1">点击登录\n</text>
<text class="textType2">登陆解锁更多功能</text> <text class="textType2">登陆解锁更多功能</text>
</view> </view>
<view class="img-auth2-view" wx:if="{{userInfo}}" catchtap="toAuthor">
<image class="img-auth2" src="{{userInfo.isAuth == 1 ? '/assets/myinfo/ysmicon.png' : '/assets/myinfo/wsmicon.png'}}">
</image>
</view>
</view> </view>
<view class="topIconRight"> <view class="topIconRight">
<view class="topIconRightIcon1" id="message" is-link bindtap="toPage"> <view class="topIconRightIcon1" id="message" is-link bindtap="toPage">
@ -38,7 +38,7 @@
<text style="font-size: 26rpx;color: #DBC189;letter-spacing: 0.5rpx;line-height: 37rpx;float:right;margin-top:-4rpx">VIP会员</text> <text style="font-size: 26rpx;color: #DBC189;letter-spacing: 0.5rpx;line-height: 37rpx;float:right;margin-top:-4rpx">VIP会员</text>
</view> </view>
<view class="vipBjSmallTextMid"> <view class="vipBjSmallTextMid">
<text wx:if="{{userInfo.isVIP==1}}" class="textMid">{{userInfo.memberExpiredAt}}</text>
<text wx:if="{{userInfo.isVIP==1}}" class="textMid">到期时间:{{userInfo.memberExpiredAt}}</text>
<text wx:else class="textMid">立即开通会员 尊享特权</text> <text wx:else class="textMid">立即开通会员 尊享特权</text>
</view> </view>
<view class="vipRightImg"> <view class="vipRightImg">
@ -48,11 +48,15 @@
<view class="topButtomVipBJ2"> <view class="topButtomVipBJ2">
<image class="vipBjImg2" src="/assets/myinfo/vipTopBj.png"> <image class="vipBjImg2" src="/assets/myinfo/vipTopBj.png">
</image> </image>
<text class="vipImgText">开通会员</text>
<text wx:if="{{userInfo.isVIP==1}}" class="vipImgText">立即续费</text>
<text wx:else class="vipImgText">开通会员</text>
</view> </view>
</view> </view>
<view class="dmArea"> <view class="dmArea">
<text class="daAreaTietleText">代卖订单</text>
<view class="boderLine">
<text class="daAreaTietleText">代卖订单</text>
<text style="float:right">查看更多订单></text>
</view>
<view class="dmAreaConten" id="agent50" is-link bindtap="toPage"> <view class="dmAreaConten" id="agent50" is-link bindtap="toPage">
<view class="sonConten1"> <view class="sonConten1">
<view class="iconArea"> <view class="iconArea">
@ -88,7 +92,7 @@
</view> </view>
<view class="dmArea2"> <view class="dmArea2">
<view id="balance" is-link bindtap="toPage">
<view class="boderLine" id="balance" is-link bindtap="toPage">
<text class="daAreaTietleText">我的钱包</text> <text class="daAreaTietleText">我的钱包</text>
<text class="dmArea2Text">进入钱包></text> <text class="dmArea2Text">进入钱包></text>
</view> </view>
@ -102,7 +106,7 @@
<text style="font-family: PingFangSC-Regular;font-size: 26rpx;color: rgba(0,0,0,0.65);letter-spacing: 0;">提现中的金额</text> <text style="font-family: PingFangSC-Regular;font-size: 26rpx;color: rgba(0,0,0,0.65);letter-spacing: 0;">提现中的金额</text>
</view> </view>
<view class="moneyTextArea3" id="toMyMoney" is-link bindtap="toPage"> <view class="moneyTextArea3" id="toMyMoney" is-link bindtap="toPage">
<view class="btnView"><text style="font-size: 10px;color: rgba(0,0,0,0.85);">查看账单</text></view>
<view class="btnView"><text style="font-size: 8px;color: rgba(0,0,0,0.85);">查看账单</text></view>
<text style="font-family: PingFangSC-Regular;font-size: 26rpx;color: rgba(0,0,0,0.65);letter-spacing: 0;margin-top:25rpx;margin-left:15rpx">我的账单</text> <text style="font-family: PingFangSC-Regular;font-size: 26rpx;color: rgba(0,0,0,0.65);letter-spacing: 0;margin-top:25rpx;margin-left:15rpx">我的账单</text>
</view> </view>
</view> </view>
@ -122,7 +126,10 @@
</view> </view>
</view> </view>
<view class="dmArea4"> <view class="dmArea4">
<text class="daAreaTietleText">其他工具</text>
<view class="boderLine">
<text class="daAreaTietleText ">其他工具</text>
</view>
<view class="dmAreaConten"> <view class="dmAreaConten">
<view class="dmArea4sonConten1" id="bidding" is-link bindtap="toPage"> <view class="dmArea4sonConten1" id="bidding" is-link bindtap="toPage">
<view class="dmArea4iconArea"> <view class="dmArea4iconArea">

19
pages/home/index/index.wxss

@ -36,7 +36,6 @@
top: 96rpx; top: 96rpx;
padding: 32rpx; padding: 32rpx;
width: 100%; width: 100%;
height: 170rpx;
overflow: hidden; overflow: hidden;
} }
@ -44,6 +43,7 @@
position: absolute; position: absolute;
top: 70rpx; top: 70rpx;
left: 208rpx; left: 208rpx;
width: 400rpx;
} }
.textType1 { .textType1 {
@ -245,14 +245,14 @@
} }
.btnView { .btnView {
width: 150rpx;
height: 50rpx;
width: 100rpx;
height: 38rpx;
background: #FFFFFF; background: #FFFFFF;
border: 1px solid rgba(0, 0, 0, 0.50); border: 1px solid rgba(0, 0, 0, 0.50);
border-radius: 10rpx;
border-radius: 10rpx;
padding: 5rpx 28rpx 5rpx 28rpx;
border-radius: 18.75rpx;
border-radius: 18.75rpx;
text-align: center; text-align: center;
margin-left: 18rpx;
} }
.dmArea3 { .dmArea3 {
@ -290,14 +290,14 @@
.dmArea4sonConten1 { .dmArea4sonConten1 {
float: left; float: left;
width: 110rpx;
width: 120rpx;
height: 154rpx; height: 154rpx;
} }
.dmArea4sonConten2 { .dmArea4sonConten2 {
float: left; float: left;
margin-left: 42rpx; margin-left: 42rpx;
width: 110rpx;
width: 120rpx;
height: 154rpx; height: 154rpx;
} }
@ -310,4 +310,7 @@
.dmArea4iconAreaIMG { .dmArea4iconAreaIMG {
width: 68rpx; width: 68rpx;
height: 68rpx; height: 68rpx;
}
.boderLine{
border-bottom:1px solid r;
} }
Loading…
Cancel
Save