Authored by lea guo

yohood原价购

import { getUserInfo, getPhoneNumber, checkUnionIdIsBind } from '../utils/login/login.js';
import {
getUserInfo,
getPhoneNumber,
checkUnionIdIsBind,
} from '../utils/login/login.js';
Component({
/**
* 组件的属性列表
... ... @@ -6,41 +10,42 @@ Component({
properties: {
theme: {
type: String,
value: 'light'
value: 'light',
},
isShow: Boolean,
openType: {
type: String,
value: "getUserInfo",
observer: function (newValue, oldValue) {
if (newValue === "getPhoneNumber") {
value: 'getUserInfo',
observer: function(newValue, oldValue) {
if (newValue === 'getPhoneNumber') {
this.setData({
loginBtnTitle: "绑定手机号"
})
loginBtnTitle: '绑定手机号',
});
} else if (newValue === 'getUserInfo') {
this.setData({
loginBtnTitle: "微信授权登录"
})
loginBtnTitle: '微信授权登录',
});
} else {
this.setData({
loginBtnTitle: "微信登录",
checkUnionIdIsBind: 'checkUnionIdIsBind'
})
loginBtnTitle: '微信登录',
checkUnionIdIsBind: 'checkUnionIdIsBind',
});
}
}
}
},
},
},
/**
* 组件的初始数据
*/
data: {
logo: "https://feature.yoho.cn/1019/youhuo2.png",
lightLogo: "https://img11.static.yhbimg.com/article/2018/11/29/11/018a4f01d4621f9072788f6510ac83bfec.png",
loginBtnTitle: "微信授权登录",
subLogoTitle: "LIVE IN STAY COOL",
tips: "还差一步,绑定手机号,加入Yoho!Family!",
checkUnionIdIsBind: ''
logo: 'https://feature.yoho.cn/1019/youhuo2.png',
lightLogo:
'https://img11.static.yhbimg.com/article/2018/11/29/11/018a4f01d4621f9072788f6510ac83bfec.png',
loginBtnTitle: '微信授权登录',
subLogoTitle: 'LIVE IN STAY COOL',
tips: '还差一步,绑定手机号,加入Yoho!Family!',
checkUnionIdIsBind: '',
},
/**
... ... @@ -48,7 +53,7 @@ Component({
*/
methods: {
getUserInfo,
getPhoneNumber,
checkUnionIdIsBind
}
})
getPhoneNumber,
checkUnionIdIsBind,
},
});
... ...
... ... @@ -86,7 +86,7 @@ Component({
this.commonService = new CommonService();
const timeId = setInterval(() => {
if (this.data.isStart) {
this.triggerEvent('onActivityEnd');
this.triggerEvent('changeStatus');
clearInterval(timeId);
}
const fomartTimes = fomartCountdownTime({
... ... @@ -148,7 +148,7 @@ Component({
hadJoinToShare() {
this.goShare();
this.triggerEvent('getcode');
this.triggerEvent('changeStatus');
},
goMyList() {
... ... @@ -175,7 +175,7 @@ Component({
error: false,
});
this.triggerEvent('getcode');
this.triggerEvent('changeStatus');
},
openFellowAlert() {
... ... @@ -190,7 +190,7 @@ Component({
error: false,
fellow: false,
});
this.triggerEvent('getcode');
this.triggerEvent('changeStatus');
},
submitFormId(e) {
... ...
... ... @@ -30,7 +30,7 @@ Component({
ready: function() {
const timeId = setInterval(() => {
if (this.data.isEnd) {
this.triggerEvent('onActivityEnd');
this.triggerEvent('changeStatus');
clearInterval(timeId);
}
const formatTimeList = this.formatCountDown();
... ...
... ... @@ -428,7 +428,7 @@ Page(
return this.data.myPrizeCount > 0;
},
changeActionStatus() {
changeActionStatus(isStart) {
wx.showLoading({
mask: true,
});
... ...
<view class="header {{shareFlag || 'mt-header'}}">
<product-header product="{{product}}" shareFlag="{{shareFlag}}" avatars="{{avatars}}"></product-header>
<product-header product="{{product}}" shareFlag="{{shareFlag}}" bindchangeStatus="changeActionStatus" avatars="{{avatars}}"></product-header>
</view>
<view class="lottery-info">
<view class="flow-tile-wrap">
... ... @@ -40,7 +40,7 @@
</block>
</view>
<view class="action-bar">
<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>
<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>
</view>
<view class="foot"></view>
<import src="../../vendors/zanui/actionsheet/index.wxml" />
... ...