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