Showing
5 changed files
with
36 additions
and
31 deletions
1 | -import { getUserInfo, getPhoneNumber, checkUnionIdIsBind } from '../utils/login/login.js'; | 1 | +import { |
2 | + getUserInfo, | ||
3 | + getPhoneNumber, | ||
4 | + checkUnionIdIsBind, | ||
5 | +} from '../utils/login/login.js'; | ||
2 | Component({ | 6 | Component({ |
3 | /** | 7 | /** |
4 | * 组件的属性列表 | 8 | * 组件的属性列表 |
@@ -6,41 +10,42 @@ Component({ | @@ -6,41 +10,42 @@ Component({ | ||
6 | properties: { | 10 | properties: { |
7 | theme: { | 11 | theme: { |
8 | type: String, | 12 | type: String, |
9 | - value: 'light' | 13 | + value: 'light', |
10 | }, | 14 | }, |
11 | isShow: Boolean, | 15 | isShow: Boolean, |
12 | openType: { | 16 | openType: { |
13 | type: String, | 17 | type: String, |
14 | - value: "getUserInfo", | ||
15 | - observer: function (newValue, oldValue) { | ||
16 | - if (newValue === "getPhoneNumber") { | 18 | + value: 'getUserInfo', |
19 | + observer: function(newValue, oldValue) { | ||
20 | + if (newValue === 'getPhoneNumber') { | ||
17 | this.setData({ | 21 | this.setData({ |
18 | - loginBtnTitle: "绑定手机号" | ||
19 | - }) | 22 | + loginBtnTitle: '绑定手机号', |
23 | + }); | ||
20 | } else if (newValue === 'getUserInfo') { | 24 | } else if (newValue === 'getUserInfo') { |
21 | this.setData({ | 25 | this.setData({ |
22 | - loginBtnTitle: "微信授权登录" | ||
23 | - }) | 26 | + loginBtnTitle: '微信授权登录', |
27 | + }); | ||
24 | } else { | 28 | } else { |
25 | this.setData({ | 29 | this.setData({ |
26 | - loginBtnTitle: "微信登录", | ||
27 | - checkUnionIdIsBind: 'checkUnionIdIsBind' | ||
28 | - }) | ||
29 | - } | ||
30 | - } | 30 | + loginBtnTitle: '微信登录', |
31 | + checkUnionIdIsBind: 'checkUnionIdIsBind', | ||
32 | + }); | ||
31 | } | 33 | } |
32 | }, | 34 | }, |
35 | + }, | ||
36 | + }, | ||
33 | 37 | ||
34 | /** | 38 | /** |
35 | * 组件的初始数据 | 39 | * 组件的初始数据 |
36 | */ | 40 | */ |
37 | data: { | 41 | data: { |
38 | - logo: "https://feature.yoho.cn/1019/youhuo2.png", | ||
39 | - lightLogo: "https://img11.static.yhbimg.com/article/2018/11/29/11/018a4f01d4621f9072788f6510ac83bfec.png", | ||
40 | - loginBtnTitle: "微信授权登录", | ||
41 | - subLogoTitle: "LIVE IN STAY COOL", | ||
42 | - tips: "还差一步,绑定手机号,加入Yoho!Family!", | ||
43 | - checkUnionIdIsBind: '' | 42 | + logo: 'https://feature.yoho.cn/1019/youhuo2.png', |
43 | + lightLogo: | ||
44 | + 'https://img11.static.yhbimg.com/article/2018/11/29/11/018a4f01d4621f9072788f6510ac83bfec.png', | ||
45 | + loginBtnTitle: '微信授权登录', | ||
46 | + subLogoTitle: 'LIVE IN STAY COOL', | ||
47 | + tips: '还差一步,绑定手机号,加入Yoho!Family!', | ||
48 | + checkUnionIdIsBind: '', | ||
44 | }, | 49 | }, |
45 | 50 | ||
46 | /** | 51 | /** |
@@ -49,6 +54,6 @@ Component({ | @@ -49,6 +54,6 @@ Component({ | ||
49 | methods: { | 54 | methods: { |
50 | getUserInfo, | 55 | getUserInfo, |
51 | getPhoneNumber, | 56 | getPhoneNumber, |
52 | - checkUnionIdIsBind | ||
53 | - } | ||
54 | -}) | 57 | + checkUnionIdIsBind, |
58 | + }, | ||
59 | +}); |
@@ -86,7 +86,7 @@ Component({ | @@ -86,7 +86,7 @@ Component({ | ||
86 | this.commonService = new CommonService(); | 86 | this.commonService = new CommonService(); |
87 | const timeId = setInterval(() => { | 87 | const timeId = setInterval(() => { |
88 | if (this.data.isStart) { | 88 | if (this.data.isStart) { |
89 | - this.triggerEvent('onActivityEnd'); | 89 | + this.triggerEvent('changeStatus'); |
90 | clearInterval(timeId); | 90 | clearInterval(timeId); |
91 | } | 91 | } |
92 | const fomartTimes = fomartCountdownTime({ | 92 | const fomartTimes = fomartCountdownTime({ |
@@ -148,7 +148,7 @@ Component({ | @@ -148,7 +148,7 @@ Component({ | ||
148 | 148 | ||
149 | hadJoinToShare() { | 149 | hadJoinToShare() { |
150 | this.goShare(); | 150 | this.goShare(); |
151 | - this.triggerEvent('getcode'); | 151 | + this.triggerEvent('changeStatus'); |
152 | }, | 152 | }, |
153 | 153 | ||
154 | goMyList() { | 154 | goMyList() { |
@@ -175,7 +175,7 @@ Component({ | @@ -175,7 +175,7 @@ Component({ | ||
175 | error: false, | 175 | error: false, |
176 | }); | 176 | }); |
177 | 177 | ||
178 | - this.triggerEvent('getcode'); | 178 | + this.triggerEvent('changeStatus'); |
179 | }, | 179 | }, |
180 | 180 | ||
181 | openFellowAlert() { | 181 | openFellowAlert() { |
@@ -190,7 +190,7 @@ Component({ | @@ -190,7 +190,7 @@ Component({ | ||
190 | error: false, | 190 | error: false, |
191 | fellow: false, | 191 | fellow: false, |
192 | }); | 192 | }); |
193 | - this.triggerEvent('getcode'); | 193 | + this.triggerEvent('changeStatus'); |
194 | }, | 194 | }, |
195 | 195 | ||
196 | submitFormId(e) { | 196 | submitFormId(e) { |
@@ -30,7 +30,7 @@ Component({ | @@ -30,7 +30,7 @@ Component({ | ||
30 | ready: function() { | 30 | ready: function() { |
31 | const timeId = setInterval(() => { | 31 | const timeId = setInterval(() => { |
32 | if (this.data.isEnd) { | 32 | if (this.data.isEnd) { |
33 | - this.triggerEvent('onActivityEnd'); | 33 | + this.triggerEvent('changeStatus'); |
34 | clearInterval(timeId); | 34 | clearInterval(timeId); |
35 | } | 35 | } |
36 | const formatTimeList = this.formatCountDown(); | 36 | const formatTimeList = this.formatCountDown(); |
@@ -428,7 +428,7 @@ Page( | @@ -428,7 +428,7 @@ Page( | ||
428 | return this.data.myPrizeCount > 0; | 428 | return this.data.myPrizeCount > 0; |
429 | }, | 429 | }, |
430 | 430 | ||
431 | - changeActionStatus() { | 431 | + changeActionStatus(isStart) { |
432 | wx.showLoading({ | 432 | wx.showLoading({ |
433 | mask: true, | 433 | mask: true, |
434 | }); | 434 | }); |
1 | <view class="header {{shareFlag || 'mt-header'}}"> | 1 | <view class="header {{shareFlag || 'mt-header'}}"> |
2 | - <product-header product="{{product}}" shareFlag="{{shareFlag}}" avatars="{{avatars}}"></product-header> | 2 | + <product-header product="{{product}}" shareFlag="{{shareFlag}}" bindchangeStatus="changeActionStatus" avatars="{{avatars}}"></product-header> |
3 | </view> | 3 | </view> |
4 | <view class="lottery-info"> | 4 | <view class="lottery-info"> |
5 | <view class="flow-tile-wrap"> | 5 | <view class="flow-tile-wrap"> |
@@ -40,7 +40,7 @@ | @@ -40,7 +40,7 @@ | ||
40 | </block> | 40 | </block> |
41 | </view> | 41 | </view> |
42 | <view class="action-bar"> | 42 | <view class="action-bar"> |
43 | - <action-bar activity-status="{{product.status}}" start-time="{{product.end_time}}" is-login="{{isLogin}}" status="{{actionStatus}}" num="{{myPrizeCount}}" share-uid="{{shareUid}}" act-prize-id="{{actPrizeId}}" bindgetcode="changeActionStatus" bindshare="share" copyText="{{lottery.miniappCopy}}" text="{{lottery.miniappTip}}" bindgaincodesuccess="reportSuccess" type="{{lottery.miniappType}}"></action-bar> | 43 | + <action-bar activity-status="{{product.status}}" start-time="{{product.end_time}}" is-login="{{isLogin}}" status="{{actionStatus}}" num="{{myPrizeCount}}" share-uid="{{shareUid}}" act-prize-id="{{actPrizeId}}" bindchangeStatus="changeActionStatus" bindshare="share" copyText="{{lottery.miniappCopy}}" text="{{lottery.miniappTip}}" bindgaincodesuccess="reportSuccess" type="{{lottery.miniappType}}"></action-bar> |
44 | </view> | 44 | </view> |
45 | <view class="foot"></view> | 45 | <view class="foot"></view> |
46 | <import src="../../vendors/zanui/actionsheet/index.wxml" /> | 46 | <import src="../../vendors/zanui/actionsheet/index.wxml" /> |
-
Please register or login to post a comment