Commit 81b88f24 authored by spc's avatar spc

Merge branch 'yd11_20200922' of gitlab2.dui88.com:wanghongyuan/new_taobao into yd11_20200922

parents a65dd002 60cff560
......@@ -61,7 +61,7 @@ Component({
// if (this.data.missionsList.length !== prevData.missionsList.length) {
// this.setData({ missionsList: this.props.missionsList })
// }
if (this.props.refresh) this.getMissionList()
// this.getMissionList()
},
methods: {
......
......@@ -291,16 +291,17 @@ Page({
.catch(err => {
console.log(`%c助力失败!!!\n` + '-----yd.doHelp\n', ConsoleStyle, err)
if (err.data.url) {
app.vipUrl = data.url
app.vipUrl = err.data.url
this.showCommonMoadalT1({
title: '温馨提示',
content: '成为会员 才能为他助力哦~',
confirmCallback: () => {
navigateToOutside(data.url)
navigateToOutside(err.data.url)
},
btnImg: '//yun.duiba.com.cn/spark/assets/一秒成为会员.10be8a8ede8f6c62eadb005744dc54ae182911d9.png' })
btnImg: '//yun.duiba.com.cn/spark/assets/一秒成为会员.10be8a8ede8f6c62eadb005744dc54ae182911d9.png'
})
} else {
commonToast(err.message + '.');
commonToast(err.message + '.')
}
});
} else {
......@@ -345,7 +346,7 @@ Page({
// 页面显示
onShow() {
if (this.userLogin) this.getGameInfo()
this.setData({ missionRefresh: true })
// this.setData({ missionRefresh: true })
},
// 获取 游戏门票 抽奖次数 今日是否首次登陆
......
......@@ -134,7 +134,7 @@ Page({
this.data.listTurnTable.forEach((item, index) => {
if (item._id == data.prizeId) {
rotateT = index + 1
rotateT = 4 + 1
// rotateT = 4 + 1
this.setData({ rewardsInfo: data })
}
// test code -
......@@ -143,15 +143,14 @@ Page({
})
}
// 调整位置-归零
this.animateRotation(this.timerCount ? 360 * (++this.timerCount * 2) : 0, 20)
rotateDeg = rotateT * 60 - 30
console.log(`%c旋转扇面 ${rotateT}\n` + `%c旋转角度 ${rotateDeg}\n`, ConsoleStyle)
this.timerCount += 1
// 开始动画
setTimeout(() => {
this.animateRotation(360 * (this.timerCount * 2) + rotateDeg, 1000 * (rotateDeg / 360) + 40)
}, 300)
await this.getGameInfo()
// 更改 rotateFlag - 弹窗 结果弹窗
setTimeout(() => {
if (data.type !== 5) {
......@@ -160,13 +159,11 @@ Page({
content: `恭喜您获得${data.name}`,
confirmCallback1: async () => {
this.setData({ rotateFlag: false })
await this.getGameInfo()
this.closeCommonModalT2()
this.gotoMyPrize()
},
confirmCallback2: async () => {
this.setData({ rotateFlag: false })
await this.getGameInfo()
this.closeCommonModalT2()
},
btnImg1: resList['240b56fa-66ce-414c-86ea-4ac13a3ac4e2'].url,
......@@ -179,7 +176,6 @@ Page({
content: `奖励与你擦肩而过\n 再接再厉哦~`,
confirmCallback: async () => {
this.setData({ rotateFlag: false })
await this.getGameInfo()
this.closeCommonModalT1()
},
btnImg: resList['fd0d94ef-fe1a-4771-8ba2-ad7aadacafc0'].url
......@@ -196,9 +192,15 @@ Page({
},
// 转盘归零 函数
gotoZero () {
// 调整位置-归零
this.animateRotation(this.timerCount ? 360 * (++this.timerCount * 2) : 0, 20)
},
// 旋转动画rot:旋转角度,timegap:旋转时间
animateRotation (rot, timegap) {
console.log('animateRotation run', rot, timegap)
console.log('animate_Rotation run', rot, timegap)
let animation = my.createAnimation({
transformOrigin: 'center center',
duration: timegap,
......@@ -302,10 +304,12 @@ Page({
// 通用弹层 - 关闭 - T1
closeCommonModalT1() {
this.setData({ commonModalVisibleT1: false, rotateFlag: false });
this.gotoZero()
},
// 通用弹层 - 关闭 - T2
closeCommonModalT2() {
this.setData({ commonModalVisibleT2: false, rotateFlag: false });
this.gotoZero()
},
onModalT2One () { this.data.onModalT2One() },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment