Commit 41a20b5f authored by AU-Pro-mac's avatar AU-Pro-mac

add new code --13

parent d61ad667
......@@ -1928,7 +1928,7 @@ var Main = (function () {
return [4, this.loadImageTexturesCsd02(resCanvasList)];
case 2:
_a.sent();
ctrls_1.changeScene(MainScene_1.CsdScene);
ctrls_1.changeScene(MainScene_2.OpenAni);
return [2];
}
});
......
This diff is collapsed.
......@@ -1930,7 +1930,7 @@ var Main = (function () {
return [4, this.loadImageTexturesCsd02(resCanvasList)];
case 2:
_a.sent();
ctrls_1.changeScene(MainScene_1.CsdScene);
ctrls_1.changeScene(MainScene_2.OpenAni);
return [2];
}
});
......
......@@ -160,8 +160,8 @@ export class Main {
await this.loadImageTexturesCsd01(resCanvasList)
await this.loadImageTexturesCsd02(resCanvasList)
// changeScene(OpenAni)
changeScene(CsdScene)
changeScene(OpenAni)
// changeScene(CsdScene)
// changeScene(XxlScene)
})
......
......@@ -2,6 +2,7 @@ import API from './api';
//埋点
export function clickStat (activityId, type) {
console.log('type:', type)
API.clickStat({activityId: activityId, type: type})
.then(res => {
const { success, message, data } = res
......
......@@ -159,7 +159,7 @@ Page({
this.checkStartEndTime()
// 游戏胜率 - 消消乐
app.xxlWinRate = data.timeChangeWinRate
app.xxlWinRate = data.timeChallengeWinRate
// 游戏胜率 - 传送带
app.csdWinRate = data.conveyBeltWinRate
......@@ -230,7 +230,7 @@ Page({
checkDohelp(){
if (this.query.inviteId) {
API.doHelp({activityId: app.activityId, inviteId: this.query.inviteId}).then(res=>{
const { data, success } = res
const { code, data, success, message } = res
console.log('%c-----助力接口\n' + '-----yd.doHelp\n', ConsoleStyle, res)
if (success) {
this.showCommonMoadalT1({
......@@ -241,6 +241,7 @@ Page({
},
btnImg: '//yun.duiba.com.cn/spark/assets/我也要赢大奖.a22bebbd5be4a6e557ee4ef611216ba73b729d10.png' })
} else {
if (code == '430004') commonToast(message)
if (!data.isVip) {
app.vipUrl = data.url
this.showCommonMoadalT1({
......@@ -287,7 +288,7 @@ Page({
// 分享
onShareAppMessage() {
// 返回自定义分享信息
clickStat({activityId: app.activityId, type: 'share'})
clickStat(app.activityId, 'share')
SHARE_CONFIG.imageUrl = ''
SHARE_CONFIG.path = this.changeURLArg('/pages/homePage/homePage', 'inviteId', app.openId)
return SHARE_CONFIG;
......@@ -503,7 +504,7 @@ Page({
// video - 展示视频
videoShowFunc() {
this.setData({ videoShow: true })
clickStat({activityId: app.activityId, type: 'video'})
clickStat(app.activityId, 'video')
setTimeout(() => {
this.videoCtx.play()
}, 400)
......@@ -520,7 +521,7 @@ Page({
// 选择游戏 小窗
openShowChooseGame () {
if (!this.data.showChooseGame) { this.setData({ showChooseGame: true }) }
clickStat({activityId: app.activityId, type: 'ydhome'})
clickStat(app.activityId, 'ydhome')
},
closeShowChooseGame () { this.setData({ showChooseGame: false }) },
......
......@@ -47,7 +47,7 @@ Page({
},
onShareAppMessage() {
// 返回自定义分享信息
clickStat({activityId: app.activityId, type: 'share'})
clickStat(app.activityId, 'share')
SHARE_CONFIG.imageUrl = ''
SHARE_CONFIG.path = this.changeURLArg('/pages/homePage/homePage', 'inviteId', app.openId)
return SHARE_CONFIG;
......
......@@ -1930,7 +1930,7 @@ var Main = (function () {
return [4, this.loadImageTexturesCsd02(resCanvasList)];
case 2:
_a.sent();
ctrls_1.changeScene(MainScene_1.CsdScene);
ctrls_1.changeScene(MainScene_2.OpenAni);
return [2];
}
});
......
......@@ -223,15 +223,19 @@ Component({
// 游戏胜率计算
countWinRange (type) {
let win = false
let win
console.log('xxlWinRate: ', parseInt(app.xxlWinRate))
console.log('csdWinRate: ', parseInt(app.csdWinRate))
let num = Math.floor(Math.random() * (100 - 1) + 1)
console.log('num: ', num)
if (type === 1) {
if (num <= app.xxlWinRate * 100) win = true
if (num <= parseInt(app.xxlWinRate)) win = true
else win = false
} else if (type === 2) {
if (num <= app.csdWinRate * 100) win = true
if (num <= parseInt(app.csdWinRate)) win = true
else win = false
}
console.log(`%ccountWinRange: ${win}`, ConsoleStyle)
return win
},
......
......@@ -355,7 +355,7 @@ Page({
onShareAppMessage() {
// 返回自定义分享信息
clickStat({activityId: app.activityId, type: 'share'})
clickStat(app.activityId, 'share')
SHARE_CONFIG.imageUrl = ''
SHARE_CONFIG.path = this.changeURLArg('/pages/homePage/homePage', 'inviteId', app.openId)
return SHARE_CONFIG;
......
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