Commit a1e0cead by 李伟康

修改样式&修复BUG

1 parent 19d1f387
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
</view> </view>
<view class="wx-box"> <view class="wx-box">
<block wx:if="{{!isAgree}}"> <block wx:if="{{!isAgree}}">
<button class="wx-auth-button text-center {{isAgree}}" bindtap="showTips">登录</button> <button class="wx-auth-button text-center {{isAgree}}" bindtap="showTips">微信登录</button>
</block> </block>
<block wx:else> <block wx:else>
<button open-type="getPhoneNumber" catchgetphonenumber="getPhoneNumber" class="wx-auth-button text-center">登录</button> <button open-type="getPhoneNumber" catchgetphonenumber="getPhoneNumber" class="wx-auth-button text-center">微信登录</button>
</block> </block>
</view> </view>
</block> </block>
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
</block> </block>
<view class="type-box flex"> <view class="type-box flex">
<view class="title" bindtap="changeLoginType"> <view class="title" bindtap="changeLoginType">
其他方式 {{loginType==0?'手机号登录':'微信登录'}}
</view> </view>
<!-- <view class="type" bindtap="changeLoginType"> <!-- <view class="type" bindtap="changeLoginType">
<view class="icon"> <view class="icon">
......
...@@ -116,8 +116,8 @@ page {} ...@@ -116,8 +116,8 @@ page {}
.type-box { .type-box {
flex-direction: column; flex-direction: column;
margin-top: 33rpx; margin-top: 33rpx;
font-size: 24rpx; font-size: 28rpx;
color: #8A8C90; color: #fff;
} }
.type .icon { .type .icon {
......
...@@ -12,6 +12,14 @@ Component({ ...@@ -12,6 +12,14 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
init() {
this.getMemberCardData()
this.getMerchantDetail()
this.toCheckMember()
},
onPullDownRefresh() {
this.init()
},
getMerchantDetail() { getMerchantDetail() {
const { const {
merchantId merchantId
...@@ -29,18 +37,20 @@ Component({ ...@@ -29,18 +37,20 @@ Component({
wx.p.router.intercept(false).then(res => { wx.p.router.intercept(false).then(res => {
if (res) { if (res) {
this.setData({ this.setData({
memberInfo: {}, isMember: false,
flag: true
}) })
} else { } else {
wx.p.api.equityApi.checkOpenMember().then(res => { wx.p.api.equityApi.checkOpenMember().then(res => {
let isMember = false
if (res.data && res.data.validitDate) { if (res.data && res.data.validitDate) {
res.data.time = new Date(res.data.validitDate).format('yyyy.MM.dd') res.data.time = new Date(res.data.validitDate).format('yyyy.MM.dd')
} }
if (res.code == 0 && res.data) { if (res.code == 0 && res.data) {
// 获取门店会员卡信息 isMember = true
this.getMemberCardData()
} }
this.setData({
isMember
})
}) })
} }
}) })
...@@ -77,8 +87,7 @@ Component({ ...@@ -77,8 +87,7 @@ Component({
}, },
lifetimes: { lifetimes: {
ready() { ready() {
this.getMerchantDetail() this.init()
this.toCheckMember()
} }
}, },
pageLifetimes: { pageLifetimes: {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<view class="content"> <view class="content">
<glsx-image class="equity-icon" src="home/vip-icon.png"></glsx-image> <glsx-image class="equity-icon" src="home/vip-icon.png"></glsx-image>
<text class="text">生活权益|专享超百种生活权益</text> <text class="text">生活权益|专享超百种生活权益</text>
<block wx:if="{{!memberInfo.equityName}}"> <block wx:if="{{!isMember}}">
<view class="content-view equity-btn" bindtap="toBuyMember">立即开通</view> <view class="content-view equity-btn" bindtap="toBuyMember">立即开通</view>
</block> </block>
</view> </view>
......
...@@ -150,6 +150,7 @@ Page({ ...@@ -150,6 +150,7 @@ Page({
}) })
this.getHomeConfig() this.getHomeConfig()
this.getActivityList() this.getActivityList()
this.selectComponent('#storeQuity').onPullDownRefresh()
}, },
onReachBottom() { onReachBottom() {
let { let {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<view class="layout" style="top:{{navHeight}}px"> <view class="layout" style="top:{{navHeight}}px">
<!-- 门店信息 --> <!-- 门店信息 -->
<view class="store-box"> <view class="store-box">
<store-equity></store-equity> <store-equity id="storeQuity"></store-equity>
</view> </view>
<!-- 公告 --> <!-- 公告 -->
<block wx:if="{{noticeContent}}"> <block wx:if="{{noticeContent}}">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!