Commit 08d9ac70 authored by 徐士卿's avatar 徐士卿

Merge branch 'master' of gitlab2.dui88.com:sparkprojects/rb_strongestbrain_250520

parents ec541ace b9e6af66
import CryptoJS from 'crypto-js'; import { mode, pad, enc, AES } from 'crypto-js';
const { mode, pad, enc, AES } = CryptoJS;
const getOptions = (iv: string) => { const getOptions = (iv: string) => {
return { return {
......
import { AESEncrypt } from "../src/utils/Crypto";
export default [
{
url: '/zqdn/start.do',
response: ({ query }) => {
return {
code: "123",
success: true,
message: "message",
data: AESEncrypt(JSON.stringify({
recordId: "recordId",
countdownSeconds: 180,
remainTipTimes: 3,
}), "7A2F4B8D1E6C3905", "cDOiBC1n2QrkAY2P"),
}
},
},
{
url: '/zqdn/suggest.do',
response: ({ query }) => {
return {
code: "123",
success: true,
message: "message",
data: null
}
},
},
{
url: '/zqdn/middleSubmit.do',
response: ({ query }) => {
return {
code: "123",
success: true,
message: "message",
data: null
}
},
},
{
url: '/zqdn/submit.do',
response: ({ query }) => {
return {
code: "123",
success: true,
message: "message",
data: {
drawChance: 3,
title: "5555",
desc: "123123123"
}
}
},
},
]
...@@ -105,7 +105,7 @@ const API = generateAPI({ ...@@ -105,7 +105,7 @@ const API = generateAPI({
method: "post", method: "post",
withToken: true, withToken: true,
}, },
// 推送使用 // 推送使用
outside: { outside: {
uri: `inviteAssist_1/outside.do`, uri: `inviteAssist_1/outside.do`,
...@@ -180,6 +180,14 @@ const API = generateAPI({ ...@@ -180,6 +180,14 @@ const API = generateAPI({
/** 落地页 */ /** 落地页 */
coop_getLoadingInfo: "common/outside.do", coop_getLoadingInfo: "common/outside.do",
rankInfo:`zqdn/rankIndex.do`, rankInfo:`zqdn/rankIndex.do`,
////////////////////////////// Game //////////////////////////////
start:`/zqdn/start.do`,
suggest:`/zqdn/suggest.do`,
middleSubmit:`/zqdn/middleSubmit.do`,
submit:`/zqdn/submit.do`,
}) })
// console.log('======', API) // console.log('======', API)
......
...@@ -8,7 +8,7 @@ import { Button } from '@grace/ui'; ...@@ -8,7 +8,7 @@ import { Button } from '@grace/ui';
import {_asyncThrottle} from "../../utils/utils"; import {_asyncThrottle} from "../../utils/utils";
import { PageCtrl } from "@/core/ctrls/PageCtrl"; import { PageCtrl } from "@/core/ctrls/PageCtrl";
import { ModalCtrl } from "@/core/ctrls/ModalCtrl"; import { ModalCtrl } from "@/core/ctrls/ModalCtrl";
import { LOG_KEY, MatterShareOpt, MatterViewOpt, pageView, sensorLog,MatterViewDuration } from '../../utils/sensors.js';
@observer @observer
class Rulepop extends React.Component { class Rulepop extends React.Component {
constructor(props) { constructor(props) {
...@@ -17,9 +17,22 @@ class Rulepop extends React.Component { ...@@ -17,9 +17,22 @@ class Rulepop extends React.Component {
componentDidMount() { componentDidMount() {
store.initRule(); store.initRule();
pageView("b14294", {
page_name: "活动规则弹窗",
});
sensorLog(LOG_KEY.exposure, "b14294", "d14295", {
page_name: "活动规则弹窗",
button_name: "关闭按钮",
});
} }
handleClose = _asyncThrottle(() => { handleClose = _asyncThrottle(() => {
sensorLog(LOG_KEY.click, "b14294", "d14295", {
page_name: "活动规则弹窗",
button_name: "关闭按钮",
});
ModalCtrl.closeModal() ModalCtrl.closeModal()
}) })
......
...@@ -37,7 +37,7 @@ export async function initBundle(): Promise<void> { ...@@ -37,7 +37,7 @@ export async function initBundle(): Promise<void> {
manifest: manifest, manifest: manifest,
skipDetections: true, skipDetections: true,
preferences: { preferences: {
// preferWorkers: false, preferWorkers: false,
// preferCreateImageBitmap: true, // preferCreateImageBitmap: true,
} }
}); });
......
...@@ -23,7 +23,7 @@ import dynamicSvga from "../../assets/svga/3输出出奖啊.svga"; ...@@ -23,7 +23,7 @@ import dynamicSvga from "../../assets/svga/3输出出奖啊.svga";
import output1Svga from "../../assets/svga/4中奖扭蛋.svga"; import output1Svga from "../../assets/svga/4中奖扭蛋.svga";
import output2Svga from "../../assets/svga/5中奖弹窗.svga"; import output2Svga from "../../assets/svga/5中奖弹窗.svga";
// import { LOG_KEY, pageView, sensorLog } from '@src/utils/sensors'; import { LOG_KEY, pageView, sensorLog } from '../../utils/sensors.js';
@observer @observer
class Capsulepage extends React.Component { class Capsulepage extends React.Component {
...@@ -41,21 +41,13 @@ class Capsulepage extends React.Component { ...@@ -41,21 +41,13 @@ class Capsulepage extends React.Component {
componentDidMount() { componentDidMount() {
this.getDrawInfo(); this.getDrawInfo();
// pageView("b12842", { pageView("b14280", {
// page_name: "抽奖大转盘", page_name: "抽奖页面",
// }); });
// sensorLog(LOG_KEY.exposure, "b12842", "d12843", { sensorLog(LOG_KEY.exposure, "b14280", "d14281", {
// page_name: "抽奖大转盘", page_name: "抽奖页面",
// button_name: "立即抽奖按钮", button_name: "立即抽奖按钮",
// }); });
// sensorLog(LOG_KEY.exposure, "b12842", "d12844", {
// page_name: "抽奖大转盘",
// button_name: "做任务,赚次数按钮",
// });
// sensorLog(LOG_KEY.exposure, "b12842", "d12845", {
// page_name: "抽奖大转盘",
// button_name: "返回按钮",
// });
} }
/** 获取抽奖信息 */ /** 获取抽奖信息 */
...@@ -70,10 +62,10 @@ class Capsulepage extends React.Component { ...@@ -70,10 +62,10 @@ class Capsulepage extends React.Component {
// 开始抽奖 // 开始抽奖
lottteryHandle = _asyncThrottle(async () => { lottteryHandle = _asyncThrottle(async () => {
// sensorLog(LOG_KEY.click, "b12842", "d12843", { sensorLog(LOG_KEY.click, "b14280", "d14281", {
// page_name: "抽奖大转盘", page_name: "抽奖页面",
// button_name: "立即抽奖按钮", button_name: "立即抽奖按钮",
// }); });
// 微信端拦截 // 微信端拦截
if (isWeiXin()) { if (isWeiXin()) {
// 友客小程序 // 友客小程序
...@@ -154,21 +146,12 @@ class Capsulepage extends React.Component { ...@@ -154,21 +146,12 @@ class Capsulepage extends React.Component {
/** 返回 */ /** 返回 */
backHome = _throttle(() => { backHome = _throttle(() => {
// sensorLog(LOG_KEY.click, "b12842", "d12845", {
// page_name: "抽奖大转盘",
// button_name: "返回按钮",
// });
if (this.btnStarting) return false; if (this.btnStarting) return false;
// store.changePage(PAGE_MAP.HOME_PAGE) // store.changePage(PAGE_MAP.HOME_PAGE)
PageCtrl.changePage(Homepage); PageCtrl.changePage(Homepage);
}); });
goTask = _throttle(() => { goTask = _throttle(() => {
// sensorLog(LOG_KEY.click, "b12842", "d12844", {
// page_name: "抽奖大转盘",
// button_name: "做任务,赚次数按钮",
// });
if (this.btnStarting) return false; if (this.btnStarting) return false;
// modalStore.pushPop("Taskpop", { onClose: () => this.getDrawInfo() }) // modalStore.pushPop("Taskpop", { onClose: () => this.getDrawInfo() })
}); });
......
...@@ -8,6 +8,7 @@ import { Level2 } from "@/pages/GamePage/Level/Level2.ts"; ...@@ -8,6 +8,7 @@ import { Level2 } from "@/pages/GamePage/Level/Level2.ts";
import { Level3 } from "@/pages/GamePage/Level/Level3.ts"; import { Level3 } from "@/pages/GamePage/Level/Level3.ts";
import { Level4 } from "@/pages/GamePage/Level/Level4.ts"; import { Level4 } from "@/pages/GamePage/Level/Level4.ts";
import { Level5 } from "@/pages/GamePage/Level/Level5.ts"; import { Level5 } from "@/pages/GamePage/Level/Level5.ts";
import { Level6 } from "@/pages/GamePage/Level/Level6.ts";
import { Level7 } from "@/pages/GamePage/Level/Level7.ts"; import { Level7 } from "@/pages/GamePage/Level/Level7.ts";
import { Level8 } from "@/pages/GamePage/Level/Level8.ts"; import { Level8 } from "@/pages/GamePage/Level/Level8.ts";
import { Level9 } from "@/pages/GamePage/Level/Level9.ts"; import { Level9 } from "@/pages/GamePage/Level/Level9.ts";
...@@ -15,6 +16,8 @@ import { Level10 } from "@/pages/GamePage/Level/Level10.ts"; ...@@ -15,6 +16,8 @@ import { Level10 } from "@/pages/GamePage/Level/Level10.ts";
import { Level13 } from "@/pages/GamePage/Level/Level13.ts"; import { Level13 } from "@/pages/GamePage/Level/Level13.ts";
import { Level14 } from "@/pages/GamePage/Level/Level14.ts"; import { Level14 } from "@/pages/GamePage/Level/Level14.ts";
import { Level18 } from "@/pages/GamePage/Level/Level18.ts"; import { Level18 } from "@/pages/GamePage/Level/Level18.ts";
import { Level21 } from "@/pages/GamePage/Level/Level21.ts";
import { Level22 } from "@/pages/GamePage/Level/Level22.ts";
import { Level23 } from "@/pages/GamePage/Level/Level23.ts"; import { Level23 } from "@/pages/GamePage/Level/Level23.ts";
import gameStore from "@/store/gameStore.ts"; import gameStore from "@/store/gameStore.ts";
import { LevelArr } from "@/pages/GamePage/Level/LevelConfig.ts"; import { LevelArr } from "@/pages/GamePage/Level/LevelConfig.ts";
...@@ -29,7 +32,7 @@ export class Game extends Base { ...@@ -29,7 +32,7 @@ export class Game extends Base {
const qsBg = this.addChild(new Sprite(Assets.get("问题.png"))); const qsBg = this.addChild(new Sprite(Assets.get("问题.png")));
qsBg.position.set(49, 316); qsBg.position.set(49, 316);
this.level = this.addChild(new Level18()); this.level = this.addChild(new Level21());
gameStore.start(); gameStore.start();
......
import { LevelBase } from "@/pages/GamePage/Components/LevelBase.ts";
import { Assets, Rectangle, Sprite } from "pixi.js";
import { Ease, Tween } from "@/core/tween";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
export class Level21 extends LevelBase {
level: number = 21;
A: Sprite;
B: Sprite;
right: Sprite;
onLoad() {
super.onLoad();
this.A = this.addChild(new Sprite(Assets.get(`level${this.level}/A.png`)));
this.A.position.set(162, 835);
this.B = this.addChild(new Sprite(Assets.get(`level${this.level}/A.png`)));
this.B.position.set(443, 835);
this.right = this.addChild(new Sprite(Assets.get(`level${this.level}/right.png`)));
this.right.position.set(452, 1242);
this.right.alpha = 0;
this.right.interactive = false;
this.right.eventMode = "none";
[this.A, this.B].forEach((item) => {
item.on("pointerdown", this.onAPointerDown, this);
item.on("pointerup", this.onAPointerUp, this);
item.on("globalpointermove", this.onAPointerMove, this);
});
}
target = null;
pos = null;
onAPointerUp(e) {
this.pos = null;
}
onAPointerDown(e) {
this.target = e.target;
const { x, y } = e.data.global;
this.pos = {
x: x - e.target.x,
y: y - e.target.y
}
}
onAPointerMove(e) {
if (!this.pos) return;
const { x, y } = e.data.global;
const nx = x - this.pos.x;
const ny = y - this.pos.y;
this.target.position.set(nx, ny);
this.check();
}
check() {
const { x: ax, y: ay, width: aw, height: ah } = this.A;
const { x: bx, y: by, width: bw, height: bh } = this.B;
const edge = 20;
const isIns = new Rectangle(ax + edge, ay + edge, aw - edge * 2, ah - edge * 2)
.intersects(new Rectangle(bx + edge, by + edge, bw - edge * 2, bh - edge * 2));
if (isIns) {
this.setTouchEnable(false);
this.right.position.set(bx - 30, by - 30);
Tween.get(this.B).to({ alpha: 0 }, 666, Ease.quadInOut);
Tween.get(this.right)
.to({ alpha: 1 }, 666, Ease.quadInOut)
.wait(2000)
.call(() => {
globalEvent.emit(GameEvent.NextLevel);
});
}
}
onDestroy() {
super.onDestroy();
Tween.removeTweens(this.right);
[this.A, this.B].forEach((item) => {
item.off("globalpointermove", this.onAPointerMove, this);
});
}
}
import { LevelBase } from "@/pages/GamePage/Components/LevelBase.ts";
import { Assets, Sprite } from "pixi.js";
import { Ease, Tween } from "@/core/tween";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
export class Level22 extends LevelBase {
level: number = 22;
A: Sprite;
B: Sprite;
right: Sprite;
onLoad() {
super.onLoad();
this.addChild(new Sprite(Assets.get(`level${this.level}/底.png`)))
.position.set(194, 697);
this.B = this.addChild(new Sprite(Assets.get(`level${this.level}/裤子.png`)));
this.B.position.set(267, 1119);
this.A = this.addChild(new Sprite(Assets.get(`level${this.level}/衣服.png`)));
this.A.position.set(195, 808);
const x = this.addChild(new Sprite(Assets.get(`level${this.level}/头.png`)))
x.position.set(282, 697);
x.interactive = false;
x.eventMode = "none";
this.right = this.addChild(new Sprite(Assets.get(`level${this.level}/right.png`)));
this.right.position.set(452, 1242);
this.right.alpha = 0;
this.right.interactive = false;
this.right.eventMode = "none";
[this.A, this.B].forEach((item) => {
item.on("pointerdown", this.onAPointerDown, this);
item.on("pointerup", this.onAPointerUp, this);
item.on("globalpointermove", this.onAPointerMove, this);
});
}
target = null;
pos = null;
onAPointerUp(e) {
this.pos = null;
}
onAPointerDown(e) {
this.target = e.target;
const { x, y } = e.data.global;
this.pos = {
x: x - e.target.x,
y: y - e.target.y
}
}
onAPointerMove(e) {
if (!this.pos) return;
const { x, y } = e.data.global;
const nx = x - this.pos.x;
const ny = y - this.pos.y;
this.target.position.set(nx, ny);
this.check();
}
check() {
const { x: ax, y: ay } = this.A;
const { x: bx, y: by } = this.B;
if (
(ax < 0 || ax > 425 || ay < 600 || ay > 970)
&& (bx < 80 || bx > 450 || by < 840 || by > 1200)
) {
this.setTouchEnable(false);
Tween.get(this.right)
.to({ alpha: 1 }, 666, Ease.quadInOut)
.wait(2000)
.call(() => {
globalEvent.emit(GameEvent.NextLevel);
});
}
}
onDestroy() {
super.onDestroy();
Tween.removeTweens(this.right);
[this.A, this.B].forEach((item) => {
item.off("globalpointermove", this.onAPointerMove, this);
});
}
}
import { LevelBase } from "@/pages/GamePage/Components/LevelBase.ts";
import { Assets, Sprite } from "pixi.js";
import { Ease, Tween } from "@/core/tween";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
export class Level6 extends LevelBase {
level: number = 6;
A: Sprite;
B: Sprite;
C: Sprite;
right: Sprite;
onLoad() {
super.onLoad();
this.C = this.addChild(new Sprite(Assets.get(`level${this.level}/C.png`)));
this.C.position.set(199, 821);
this.B = this.addChild(new Sprite(Assets.get(`level${this.level}/B.png`)));
this.B.position.set(226, 789);
this.A = this.addChild(new Sprite(Assets.get(`level${this.level}/A.png`)));
this.A.position.set(266, 672);
this.right = this.addChild(new Sprite(Assets.get(`level${this.level}/right.png`)));
this.right.position.set(103, 1069);
this.right.alpha = 0;
this.right.interactive = false;
this.right.eventMode = "none";
const x = this.addChild(new Sprite(Assets.get(`level${this.level}/叉子.png`)))
x.position.set(286, 1152);
x.interactive = false;
x.eventMode = "none";
[this.A, this.B, this.C].forEach((item) => {
item.on("pointerdown", this.onAPointerDown, this);
item.on("pointerup", this.onAPointerUp, this);
item.on("globalpointermove", this.onAPointerMove, this);
});
}
target = null;
pos = null;
onAPointerUp(e) {
this.pos = null;
}
onAPointerDown(e) {
this.target = e.target;
const { x, y } = e.data.global;
this.pos = {
x: x - e.target.x,
y: y - e.target.y
}
}
onAPointerMove(e) {
if (!this.pos) return;
const { x, y } = e.data.global;
const nx = x - this.pos.x;
const ny = y - this.pos.y;
this.target.position.set(nx, ny);
this.check();
}
check() {
const { x, y } = this.C;
if (x >= 80 && x <= 230 && y >= 1030 && y <= 1100) {
this.setTouchEnable(false);
Tween.get(this.C)
.to({ x: 129, y: 1049 }, 666, Ease.quadInOut);
Tween.get(this.right)
.wait(666)
.to({ alpha: 1 }, 666, Ease.quadInOut)
.wait(2000)
.call(() => {
globalEvent.emit(GameEvent.NextLevel);
});
}
}
onDestroy() {
super.onDestroy();
Tween.removeTweens(this.right);
[this.A, this.B, this.C].forEach((item) => {
item.off("globalpointermove", this.onAPointerMove, this);
});
}
}
...@@ -3,6 +3,7 @@ import { Level2 } from "@/pages/GamePage/Level/Level2.ts"; ...@@ -3,6 +3,7 @@ import { Level2 } from "@/pages/GamePage/Level/Level2.ts";
import { Level3 } from "@/pages/GamePage/Level/Level3.ts"; import { Level3 } from "@/pages/GamePage/Level/Level3.ts";
import { Level4 } from "@/pages/GamePage/Level/Level4.ts"; import { Level4 } from "@/pages/GamePage/Level/Level4.ts";
import { Level5 } from "@/pages/GamePage/Level/Level5.ts"; import { Level5 } from "@/pages/GamePage/Level/Level5.ts";
import { Level6 } from "@/pages/GamePage/Level/Level6.ts";
import { Level7 } from "@/pages/GamePage/Level/Level7.ts"; import { Level7 } from "@/pages/GamePage/Level/Level7.ts";
import { Level8 } from "@/pages/GamePage/Level/Level8.ts"; import { Level8 } from "@/pages/GamePage/Level/Level8.ts";
import { Level9 } from "@/pages/GamePage/Level/Level9.ts"; import { Level9 } from "@/pages/GamePage/Level/Level9.ts";
...@@ -10,6 +11,8 @@ import { Level10 } from "@/pages/GamePage/Level/Level10.ts"; ...@@ -10,6 +11,8 @@ import { Level10 } from "@/pages/GamePage/Level/Level10.ts";
import { Level13 } from "@/pages/GamePage/Level/Level13.ts"; import { Level13 } from "@/pages/GamePage/Level/Level13.ts";
import { Level14 } from "@/pages/GamePage/Level/Level14.ts"; import { Level14 } from "@/pages/GamePage/Level/Level14.ts";
import { Level18 } from "@/pages/GamePage/Level/Level18.ts"; import { Level18 } from "@/pages/GamePage/Level/Level18.ts";
import { Level21 } from "@/pages/GamePage/Level/Level21.ts";
import { Level22 } from "@/pages/GamePage/Level/Level22.ts";
import { Level23 } from "@/pages/GamePage/Level/Level23.ts"; import { Level23 } from "@/pages/GamePage/Level/Level23.ts";
...@@ -19,23 +22,23 @@ export const LevelArr = [ ...@@ -19,23 +22,23 @@ export const LevelArr = [
{ cls: Level3, tip: `当然是太阳最高啦` }, { cls: Level3, tip: `当然是太阳最高啦` },
{ cls: Level4, tip: `没有什么比猫猫的<br/>左右爪更像了` }, { cls: Level4, tip: `没有什么比猫猫的<br/>左右爪更像了` },
{ cls: Level5, tip: `将蛋黄放在蛋白上<br/>拼出荷包蛋` }, { cls: Level5, tip: `将蛋黄放在蛋白上<br/>拼出荷包蛋` },
{ cls: Level5, tip: `直接移动最底层的蛋糕` }, // 6 { cls: Level6, tip: `直接移动最底层的蛋糕` },
{ cls: Level7, tip: `旋转存钱罐,倒出金币` }, { cls: Level7, tip: `旋转存钱罐,倒出金币` },
{ cls: Level8, tip: `最深的颜色是题目` }, { cls: Level8, tip: `最深的颜色是题目` },
{ cls: Level9, tip: `移动小鸭子至河边` }, { cls: Level9, tip: `移动小鸭子至河边` },
{ cls: Level10, tip: `将“1”移动至等号右边<br/>形成等式` }, // 10 { cls: Level10, tip: `将“1”移动至等号右边<br/>形成等式` },
{ cls: Level9, tip: `将冰箱放大至能装够装下<br/>长颈鹿` }, // 11 { cls: Level9, tip: `将冰箱放大至能装够装下<br/>长颈鹿` }, // 11
{ cls: Level9, tip: `掐断烟头` }, // 12 { cls: Level9, tip: `掐断烟头` }, // 12
{ cls: Level13, tip: `打开盖子看看` }, // 13 { cls: Level13, tip: `打开盖子看看` },
{ cls: Level14, tip: `将香蕉移动到牛奶中<br/>变成香蕉牛奶` }, { cls: Level14, tip: `将香蕉移动到牛奶中<br/>变成香蕉牛奶` },
{ cls: Level14, tip: `猫吃老鼠` }, // 15 { cls: Level14, tip: `猫吃老鼠` }, // 15
{ cls: Level14, tip: `移动笼子罩住小鸭子` }, // 16 { cls: Level14, tip: `移动笼子罩住小鸭子` }, // 16
{ cls: Level14, tip: `别忘了,人是高等动物哦` }, // 17 { cls: Level14, tip: `别忘了,人是高等动物哦` }, // 17
{ cls: Level18, tip: `移开乌云露出太阳<br/>让冰块融化` }, // 18 { cls: Level18, tip: `移开乌云露出太阳<br/>让冰块融化` },
{ cls: Level14, tip: `将冰箱放大至能够装下长颈鹿` }, // 19 { cls: Level14, tip: `将冰箱放大至能够装下长颈鹿` }, // 19
{ cls: Level14, tip: `别忘了把题目也装进箱子里` }, // 20 { cls: Level14, tip: `别忘了把题目也装进箱子里` }, // 20
{ cls: Level14, tip: `移动鸡蛋,碰一碰便知` }, // 21 { cls: Level21, tip: `移动鸡蛋,碰一碰便知` }, // 21
{ cls: Level14, tip: `移开圣诞老人的衣服看看` }, // 22 { cls: Level22, tip: `移开圣诞老人的衣服看看` },
{ cls: Level23, tip: `一样重` }, { cls: Level23, tip: `一样重` },
{ cls: Level23, tip: `将雪球合在一起滚成大雪球` }, // 24 { cls: Level23, tip: `将雪球合在一起滚成大雪球` }, // 24
{ cls: Level23, tip: `按住小猪鼻子,把它憋醒` }, // 25 { cls: Level23, tip: `按住小猪鼻子,把它憋醒` }, // 25
......
...@@ -15,7 +15,7 @@ import RankPage from '../RankPage/RankPage.js'; ...@@ -15,7 +15,7 @@ import RankPage from '../RankPage/RankPage.js';
import MyPrize from '../MyPrize/MyPrize.js'; import MyPrize from '../MyPrize/MyPrize.js';
import shareStore from '@/store/share.js'; import shareStore from '@/store/share.js';
import { LOG_KEY, MatterShareOpt, MatterViewDuration, MatterViewOpt, pageView, sensorLog } from "@/utils/sensors.js"; import { LOG_KEY, MatterShareOpt, MatterViewDuration, MatterViewOpt, pageView, sensorLog } from "@/utils/sensors.js";
import { CHANNEL_PARAMS } from '@/utils/constants.js'; import { CHANNEL_PARAMS, extranceName } from '@/utils/constants.js';
@observer @observer
class Homepage extends React.Component { class Homepage extends React.Component {
...@@ -44,44 +44,78 @@ class Homepage extends React.Component { ...@@ -44,44 +44,78 @@ class Homepage extends React.Component {
// 0 我的排名 // 0 我的排名
case 0: case 0:
// TODO 换成我的排名页面 记得引用 // TODO 换成我的排名页面 记得引用
sensorLog(LOG_KEY.click, "b14261", "d14264", {
page_name: "活动首页",
button_name: "我的排名按钮",
});
PageCtrl.changePage(RankPage); PageCtrl.changePage(RankPage);
break; break;
// 1 抽奖 // 1 抽奖
case 1: case 1:
sensorLog(LOG_KEY.click, "b14261", "d14266", {
page_name: "活动首页",
button_name: "抽奖按钮",
});
PageCtrl.changePage(CapsulePage); PageCtrl.changePage(CapsulePage);
break; break;
// 2 做任务 // 2 做任务
case 2: case 2:
// TODO // TODO
sensorLog(LOG_KEY.click, "b14261", "d14267", {
page_name: "活动首页",
button_name: "做任务,赚次数按钮",
});
ModalCtrl.showModal(Taskpop); ModalCtrl.showModal(Taskpop);
break; break;
// 3 答题 // 3 答题
case 3: case 3:
// TODO // TODO
sensorLog(LOG_KEY.click, "b14261", "d14265", {
page_name: "活动首页",
button_name: "开始答题按钮",
});
break; break;
// 4 我的奖品 // 4 我的奖品
case 4: case 4:
// TODO 换成我的奖品页面 记得引用 // TODO 换成我的奖品页面 记得引用
sensorLog(LOG_KEY.click, "b14261", "d14263", {
page_name: "活动首页",
button_name: "奖品按钮",
});
PageCtrl.changePage(MyPrize); PageCtrl.changePage(MyPrize);
break; break;
// 5 活动规则 // 5 活动规则
case 5: case 5:
sensorLog(LOG_KEY.click, "b14261", "d14262", {
page_name: "活动首页",
button_name: "规则按钮",
});
ModalCtrl.showModal(Rulepop); ModalCtrl.showModal(Rulepop);
break; break;
// 6 拜访清单 // 6 拜访清单
case 6: case 6:
// TODO // TODO
sensorLog(LOG_KEY.click, "b14268", "d14268", {
page_name: "友客首页",
button_name: "拜访清单按钮",
});
break; break;
// 7 分享活动 // 7 分享活动
case 7: case 7:
// TODO // TODO
MatterShareOpt("b14268", "d14322", {
button_name: "分享活动按钮",
page_name: "友客首页",
})
shareStore.doShare(); shareStore.doShare();
break; break;
...@@ -91,53 +125,49 @@ class Homepage extends React.Component { ...@@ -91,53 +125,49 @@ class Homepage extends React.Component {
}) })
initSensor = () => { initSensor = () => {
if (CFG.channel == CHANNEL_PARAMS.YK_MINI) { if (CFG.channel == CHANNEL_PARAMS.YK_MINI) {
sensorLog(LOG_KEY.exposure, "b13489", "d13491", { sensorLog(LOG_KEY.exposure, "b14268", "d14322", {
page_name: "友客首页", page_name: "友客首页",
button_name: "分享活动按钮", button_name: "分享活动按钮",
}); });
} }
if (CFG.channel == CHANNEL_PARAMS.YK_MINI || CFG.channel == CHANNEL_PARAMS.YK_PUBLIC) { if (CFG.channel == CHANNEL_PARAMS.YK_MINI || CFG.channel == CHANNEL_PARAMS.YK_PUBLIC) {
MatterViewOpt("b13489", { MatterViewOpt("b14268", {
page_name: "友客首页", page_name: "友客首页",
}) })
if (store?.indexData?.isAgent) { if (store?.indexData?.isAgent) {
sensorLog(LOG_KEY.exposure, "b13489", "d13490", { sensorLog(LOG_KEY.exposure, "b14268", "d14269", {
page_name: "友客首页", page_name: "友客首页",
button_name: "拜访清单按钮", button_name: "拜访清单按钮",
}); });
} }
} }
// pageView("b7350", {
// page_name: "开宝箱页" pageView("b14261", {
// });
//
// sensorLog(LOG_KEY.exposure, "b7350", "d7351", {
// page_name: "开宝箱页",
// button_name: "开宝箱按钮",
// });
pageView("b13480", {
page_name: "活动首页" page_name: "活动首页"
}); });
sensorLog(LOG_KEY.exposure, "b13480", "d13484", { sensorLog(LOG_KEY.exposure, "b14261", "d14267", {
page_name: "活动首页",
button_name: "做任务,赚次数按钮",
});
sensorLog(LOG_KEY.exposure, "b14261", "d14266", {
page_name: "活动首页", page_name: "活动首页",
button_name: "开宝箱按钮", button_name: "抽奖按钮",
}); });
sensorLog(LOG_KEY.exposure, "b13480", "d13485", { sensorLog(LOG_KEY.exposure, "b14261", "d14265", {
page_name: "活动首页", page_name: "活动首页",
button_name: "掷骰子按钮", button_name: "开始答题按钮",
}); });
sensorLog(LOG_KEY.exposure, "b13480", "d13483", { sensorLog(LOG_KEY.exposure, "b14261", "d14264", {
page_name: "活动首页", page_name: "活动首页",
button_name: "背包按钮", button_name: "我的排名按钮",
}); });
sensorLog(LOG_KEY.exposure, "b13480", "d13482", { sensorLog(LOG_KEY.exposure, "b14261", "d14263", {
page_name: "活动首页", page_name: "活动首页",
button_name: "奖品按钮", button_name: "奖品按钮",
}); });
sensorLog(LOG_KEY.exposure, "b13480", "d13481", { sensorLog(LOG_KEY.exposure, "b14261", "d14262", {
page_name: "活动首页", page_name: "活动首页",
button_name: "规则按钮", button_name: "规则按钮",
}); });
......
...@@ -8,9 +8,9 @@ import { PageCtrl } from "@/core/ctrls/PageCtrl.tsx"; ...@@ -8,9 +8,9 @@ import { PageCtrl } from "@/core/ctrls/PageCtrl.tsx";
import { isWeChat } from '@/utils/share'; import { isWeChat } from '@/utils/share';
import store from '@/store/store'; import store from '@/store/store';
import { ModalCtrl } from '@/core/ctrls/ModalCtrl'; import { ModalCtrl } from '@/core/ctrls/ModalCtrl';
import SignSucPanel from '@/panels/SignSucPanel/SignSucPanel';
import {Axios} from 'axios'; import {Axios} from 'axios';
import FillAddress from '@/panels/FillAddress/FillAddress.jsx'; import FillAddress from '@/panels/FillAddress/FillAddress.jsx';
import { LOG_KEY, MatterShareOpt, MatterViewOpt, pageView, sensorLog,MatterViewDuration } from '../../utils/sensors.js';
const apiAxios = new Axios({ const apiAxios = new Axios({
timeout: 10000, timeout: 10000,
}); });
...@@ -30,7 +30,15 @@ class MyPrize extends React.Component<any, any> { ...@@ -30,7 +30,15 @@ class MyPrize extends React.Component<any, any> {
componentDidMount() { componentDidMount() {
this.getPrize(); pageView("b14298", {
page_name: "我的奖品页",
});
sensorLog(LOG_KEY.exposure, "b14298", "d14300", {
page_name: "我的奖品页",
button_name: "返回按钮",
});
this.getPrize('');
} }
...@@ -78,12 +86,10 @@ class MyPrize extends React.Component<any, any> { ...@@ -78,12 +86,10 @@ class MyPrize extends React.Component<any, any> {
PrizeList.forEach((item) => { PrizeList.forEach((item) => {
if (!item?.invalid) { if (!item?.invalid) {
// sensorLog(LOG_KEY.exposure, "b11618", "d11619", { sensorLog(LOG_KEY.exposure, "b14298", "d14299", {
// button_name: "去领取", page_name: "我的奖品页",
// page_name: "我的奖品页", button_name: "去领取按钮",
// entrance: extranceName[CFG.channel], });
// operation_name: "去领取",
// });
} }
}); });
} }
...@@ -96,11 +102,10 @@ class MyPrize extends React.Component<any, any> { ...@@ -96,11 +102,10 @@ class MyPrize extends React.Component<any, any> {
return; return;
} }
// sensorLog(LOG_KEY.click, "b11618", "d11619", { sensorLog(LOG_KEY.click, "b14298", "d14299", {
// button_name: "去领取", page_name: "我的奖品页",
// page_name: "我的奖品页", button_name: "去领取按钮",
// operation_name: "去领取", });
// });
// stopSound('bg_music') // stopSound('bg_music')
const { recordId, url, itemType, recordInfo, projectId, drawStatus } = item; const { recordId, url, itemType, recordInfo, projectId, drawStatus } = item;
...@@ -166,14 +171,6 @@ class MyPrize extends React.Component<any, any> { ...@@ -166,14 +171,6 @@ class MyPrize extends React.Component<any, any> {
agentCode: res?.boundYkCode, agentCode: res?.boundYkCode,
prizeProjectId: projectId, prizeProjectId: projectId,
}) })
// modalStore.pushPop("FillAddress", {
// projectId: this.projectId,
// saveAddresUrl: saveAddresUrl,
// getPrize: this.getPrize,
// recordId,
// agentCode: res?.boundYkCode,
// prizeProjectId: projectId,
// });
} else { } else {
//已填写地址或未绑定业务员 //已填写地址或未绑定业务员
if (recordInfo?.status == "0") { if (recordInfo?.status == "0") {
...@@ -209,6 +206,10 @@ class MyPrize extends React.Component<any, any> { ...@@ -209,6 +206,10 @@ class MyPrize extends React.Component<any, any> {
}); });
}); });
clickBack = () => { clickBack = () => {
sensorLog(LOG_KEY.click, "b14298", "d14300", {
page_name: "我的奖品页",
button_name: "返回按钮",
});
PageCtrl.backPage(); PageCtrl.backPage();
} }
......
...@@ -6,6 +6,7 @@ import { PageCtrl } from "@/core/ctrls/PageCtrl.tsx"; ...@@ -6,6 +6,7 @@ import { PageCtrl } from "@/core/ctrls/PageCtrl.tsx";
import store from "@/store/store.ts"; import store from "@/store/store.ts";
import HomePage from '../HomePage/HomePage'; import HomePage from '../HomePage/HomePage';
import Countdown from '@/components/ComCountdown/index.jsx'; import Countdown from '@/components/ComCountdown/index.jsx';
import { LOG_KEY, MatterShareOpt, MatterViewOpt, pageView, sensorLog,MatterViewDuration } from '../../utils/sensors.js';
@observer @observer
class RankPage extends React.Component<any, any> { class RankPage extends React.Component<any, any> {
constructor(props) { constructor(props) {
...@@ -20,6 +21,14 @@ class RankPage extends React.Component<any, any> { ...@@ -20,6 +21,14 @@ class RankPage extends React.Component<any, any> {
} }
componentDidMount(): void { componentDidMount(): void {
this.getRankInfo(); this.getRankInfo();
pageView("b14286", {
page_name: "排行榜页面",
});
sensorLog(LOG_KEY.exposure, "b14286", "d14287", {
page_name: "排行榜页面",
button_name: "返回按钮",
});
} }
getRankInfo = async() =>{ getRankInfo = async() =>{
const {success, data, timeStamp} = await API.rankInfo() const {success, data, timeStamp} = await API.rankInfo()
...@@ -34,6 +43,10 @@ class RankPage extends React.Component<any, any> { ...@@ -34,6 +43,10 @@ class RankPage extends React.Component<any, any> {
} }
} }
clickBack = () => { clickBack = () => {
sensorLog(LOG_KEY.click, "b14286", "d14287", {
page_name: "排行榜页面",
button_name: "返回按钮",
});
PageCtrl.changePage(HomePage); PageCtrl.changePage(HomePage);
} }
...@@ -55,7 +68,7 @@ class RankPage extends React.Component<any, any> { ...@@ -55,7 +68,7 @@ class RankPage extends React.Component<any, any> {
后更新 后更新
</div> </div>
}} }}
countdownOver={() => store.getHomeInfo()} countdownOver={() => this.getRankInfo()}
/> />
</div> </div>
<div className="prizeList"> <div className="prizeList">
......
@import "../../res.less";
.rankPrizePop {
width: 750px;
height: 100%;
left: 0px;
top: 0px;
position: absolute;
overflow-y: auto;
overflow-x: hidden;
.bg {
width: 750px;
height: 4882px;
left: 0px;
top: 0px;
position: absolute;
// .sparkBg("rulePage/bg.png");
}
.back {
left: 20px;
top: 60px;
width: 28px;
height: 43px;
position: absolute;
.webpBg("MyPrize/返回.png");
}
}
\ No newline at end of file
import React from 'react';
import { observer } from 'mobx-react';
import './RankPrizePop.less';
import API from "@/api";
import { PageCtrl } from "@/core/ctrls/PageCtrl.tsx";
import store from "@/store/store.ts";
import HomePage from '../HomePage/HomePage';
@observer
class RankPrizePop extends React.Component<any, any> {
clickBack = () => {
PageCtrl.changePage(HomePage);
}
render() {
const { ruleImg } = store.frontVariable;
return <div className="rankPrizePop">
<img className="bg"
src={ruleImg}
/>
<span className="back" onClick={this.clickBack}></span>
</div>;
}
}
export default RankPrizePop;
\ No newline at end of file
...@@ -10,7 +10,7 @@ import API from '@/api'; ...@@ -10,7 +10,7 @@ import API from '@/api';
import { extranceName } from '@/utils/constants.ts'; import { extranceName } from '@/utils/constants.ts';
// import { handleLogClick, handleLogExposure } from '../../../MD'; // import { handleLogClick, handleLogExposure } from '../../../MD';
import shareStore from '@/store/share.ts'; import shareStore from '@/store/share.ts';
// import { LOG_KEY, MatterShareOpt, MatterViewDuration, MatterViewOpt, sensorLog } from '@src/utils/sensors'; import { LOG_KEY, MatterShareOpt, MatterViewDuration, MatterViewOpt, sensorLog } from '../../utils/sensors.js';
@observer @observer
class AgentSharepage extends React.Component { class AgentSharepage extends React.Component {
...@@ -22,18 +22,19 @@ class AgentSharepage extends React.Component { ...@@ -22,18 +22,19 @@ class AgentSharepage extends React.Component {
} }
this.startTime = +new Date(); this.startTime = +new Date();
this.shareRef = null; this.shareRef = null;
this.startTime = +new Date();
} }
async componentDidMount() { async componentDidMount() {
// MatterViewOpt("b13548", { MatterViewOpt("b14316", {
// page_name: "非遗-落地页", page_name: "落地页",
// }); });
// sensorLog(LOG_KEY.exposure, "b13548", "d13549", { sensorLog(LOG_KEY.exposure, "b14316", "d14317", {
// page_name: "非遗-落地页", page_name: "落地页",
// button_name: "分享活动按钮", button_name: "分享活动",
// }); });
// await store.checkBindStatus(); // await store.checkBindStatus();
// await this.getShareInfo(); // await this.getShareInfo();
...@@ -48,9 +49,6 @@ class AgentSharepage extends React.Component { ...@@ -48,9 +49,6 @@ class AgentSharepage extends React.Component {
} }
componentWillUnmount() { componentWillUnmount() {
// MatterViewDuration("b13548", +new Date() - this.startTime, {
// page_name: "非遗-落地页",
// });
} }
...@@ -65,22 +63,21 @@ class AgentSharepage extends React.Component { ...@@ -65,22 +63,21 @@ class AgentSharepage extends React.Component {
/** 跳转微信端活动 */ /** 跳转微信端活动 */
toWeActHandle = () => { toWeActHandle = () => {
if (getUrlParam("inviteCode")) {
// handleLogClick(13)
} else {
// handleLogClick(20)
}
CFG.workerCode = getUrlParam("ykCode"); CFG.workerCode = getUrlParam("ykCode");
let url = CFG.domain + CFG.indexUrl + '&channel=' + CFG.channel + `${!!getUrlParam("inviteCode") ? ("&inviteCode=" + getUrlParam("inviteCode")) : ""}` + `${!!CFG.workerCode ? `&ykCode=${CFG.workerCode}` : ""}` let url = CFG.domain + CFG.indexUrl + '&channel=' + CFG.channel + `${!!getUrlParam("inviteCode") ? ("&inviteCode=" + getUrlParam("inviteCode")) : ""}` + `${!!CFG.workerCode ? `&ykCode=${CFG.workerCode}` : ""}`
location.href = url MatterViewDuration("b14316", +new Date() - this.startTime, {
page_name: "落地页",
});
setTimeout(() => {
location.href = url;
}, 500)
} }
handleShareAct = _throttle(() => { handleShareAct = _throttle(() => {
// MatterShareOpt("b13548", "d13549", { MatterShareOpt("b14316", "d14327", {
// button_name: "分享活动按钮", button_name: "分享活动按钮",
// page_name: "非遗-落地页", page_name: "落地页",
// entrance: extranceName[CFG.channel], })
// })
console.log("share") console.log("share")
shareStore.doShare() shareStore.doShare()
......
...@@ -10,7 +10,7 @@ import API from "@/api"; ...@@ -10,7 +10,7 @@ import API from "@/api";
// import { PAGE_MAP } from "@src/utils/constants"; // import { PAGE_MAP } from "@src/utils/constants";
// import modalStore from "@src/store/modal"; // import modalStore from "@src/store/modal";
// import { handleLogClick, handleLogExposure } from "../../../MD"; // import { handleLogClick, handleLogExposure } from "../../../MD";
// import { LOG_KEY, MatterViewDuration, MatterViewOpt, sensorLog } from "@src/utils/sensors"; import { LOG_KEY, MatterViewDuration, MatterViewOpt, sensorLog } from "../../utils/sensors.js";
@observer @observer
class Sharepage extends React.Component { class Sharepage extends React.Component {
...@@ -29,20 +29,20 @@ class Sharepage extends React.Component { ...@@ -29,20 +29,20 @@ class Sharepage extends React.Component {
// accessLog(506) // accessLog(506)
// await store.checkBindStatus(); // await store.checkBindStatus();
await this.getShareInfo(); await this.getShareInfo();
MatterViewOpt("b14316", {
page_name: "落地页",
});
sensorLog(LOG_KEY.exposure, "b14316", "d14319", {
page_name: "落地页",
button_name: "进入活动按钮",
});
sensorLog(LOG_KEY.exposure, "b14316", "d14318", {
page_name: "落地页",
button_name: "为TA助力按钮",
});
// // sensorLog(LOG_KEY.exposure, "b13548", "d13551", {
// page_name: "非遗-落地页",
// button_name: "进入活动按钮",
// });
// // sensorLog(LOG_KEY.exposure, "b13548", "d13550", {
// page_name: "非遗-落地页",
// button_name: "为TA助力按钮",
// });
// MatterViewOpt("b13548", {
// page_name: "非遗-落地页",
// });
if (getUrlParam("inviteCode")) { if (getUrlParam("inviteCode")) {
// handleLogExposure(13) // handleLogExposure(13)
...@@ -78,15 +78,15 @@ class Sharepage extends React.Component { ...@@ -78,15 +78,15 @@ class Sharepage extends React.Component {
if (getUrlParam("inviteCode")) { if (getUrlParam("inviteCode")) {
// handleLogClick(13) // handleLogClick(13)
// // sensorLog(LOG_KEY.click, "b13548", "d13550", { sensorLog(LOG_KEY.click, "b14316", "d14318", {
// page_name: "非遗-落地页", page_name: "落地页",
// button_name: "为TA助力按钮", button_name: "为TA助力按钮",
// }); });
} else { } else {
// // sensorLog(LOG_KEY.click, "b13548", "d13551", { sensorLog(LOG_KEY.click, "b14316", "d14319", {
// page_name: "非遗-落地页", page_name: "落地页",
// button_name: "进入活动按钮", button_name: "进入活动按钮",
// }); });
// handleLogClick(20) // handleLogClick(20)
} }
CFG.workerCode = getUrlParam("ykCode"); CFG.workerCode = getUrlParam("ykCode");
......
...@@ -6,6 +6,7 @@ import { Toast } from "@grace/ui"; ...@@ -6,6 +6,7 @@ import { Toast } from "@grace/ui";
import { ModalCtrl } from "@/core/ctrls/ModalCtrl"; import { ModalCtrl } from "@/core/ctrls/ModalCtrl";
import {Axios} from 'axios'; import {Axios} from 'axios';
import Selectmodal from "../selectmodal/selectmodal.jsx"; import Selectmodal from "../selectmodal/selectmodal.jsx";
import { LOG_KEY, MatterShareOpt, MatterViewOpt, pageView, sensorLog,MatterViewDuration } from '../../utils/sensors';
const apiAxios = new Axios({ const apiAxios = new Axios({
timeout: 10000, timeout: 10000,
}); });
...@@ -26,14 +27,21 @@ class FillAddress extends React.Component { ...@@ -26,14 +27,21 @@ class FillAddress extends React.Component {
} }
componentDidMount() { componentDidMount() {
// this.initSensor(); this.initSensor();
const { projectId, saveAddresUrl, getPrize, recordId, agentCode, prizeProjectId} = this.props; const { projectId, saveAddresUrl, getPrize, recordId, agentCode, prizeProjectId} = this.props;
console.log('projectId',projectId) console.log('projectId',projectId)
} }
initSensor(){ initSensor(){
pageView("b14310", {
page_name: "地址填写页"
});
sensorLog(LOG_KEY.exposure, "b14310", "d14311", {
page_name: "地址填写页",
button_name: "提交信息按钮",
});
} }
ClickClose = () => { ClickClose = () => {
...@@ -87,10 +95,10 @@ class FillAddress extends React.Component { ...@@ -87,10 +95,10 @@ class FillAddress extends React.Component {
} }
clickSubmit = _throttle(async () => { clickSubmit = _throttle(async () => {
// sensorLog(LOG_KEY.click, "b7391", "d7393", { sensorLog(LOG_KEY.click, "b14310", "d14311", {
// page_name: "地址填写页", page_name: "地址填写页",
// button_name: "提交信息按钮", button_name: "提交信息按钮",
// }); });
const { const {
name, mobile, name, mobile,
......
...@@ -7,10 +7,10 @@ import { unwatchPageVisibility, watchPageVisibility } from '@/core/page-visibili ...@@ -7,10 +7,10 @@ import { unwatchPageVisibility, watchPageVisibility } from '@/core/page-visibili
// import { handleLogClick, handleLogExposure } from '../../../MD'; // import { handleLogClick, handleLogExposure } from '../../../MD';
// import { RES_PATH } from '../../../sparkrc'; // import { RES_PATH } from '../../../sparkrc';
import { _throttle } from '../../utils/utils.ts'; import { _throttle } from '../../utils/utils.ts';
import { TASK_CODE,CHANNEL_PARAMS } from '../../utils/constants.ts'; import { TASK_CODE,CHANNEL_PARAMS, extranceName } from '../../utils/constants.ts';
import { setCookies } from '../../store/fetcher.ts'; import { setCookies } from '../../store/fetcher.ts';
import taskStore from '../../store/task.ts'; import taskStore from '../../store/task.ts';
// import { LOG_KEY, MatterShareOpt, MatterViewOpt, pageView, sensorLog } from '../../utils/sensors'; import { LOG_KEY, MatterShareOpt, MatterViewOpt, pageView, sensorLog,MatterViewDuration } from '../../utils/sensors';
import { ModalCtrl } from '@/core/ctrls/ModalCtrl'; import { ModalCtrl } from '@/core/ctrls/ModalCtrl';
import { Button } from '@grace/ui'; import { Button } from '@grace/ui';
...@@ -18,6 +18,7 @@ import { Button } from '@grace/ui'; ...@@ -18,6 +18,7 @@ import { Button } from '@grace/ui';
class Taskpop extends React.Component { class Taskpop extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.startTime = +new Date();
} }
async componentDidMount() { async componentDidMount() {
...@@ -35,23 +36,30 @@ class Taskpop extends React.Component { ...@@ -35,23 +36,30 @@ class Taskpop extends React.Component {
initSensor() { initSensor() {
// pageView("b10875", { MatterViewOpt("b14312", {
// page_name: "赚次数任务页", page_name: "做任务,赚次数弹窗",
// }); entrance: extranceName[CFG.channel],
});
// sensorLog(LOG_KEY.exposure,"b7870","d8729");
// sensorLog(LOG_KEY.exposure, "b10875", "d10877", { sensorLog(LOG_KEY.exposure, "b14312", "d14314", {
// page_name: "赚次数任务页", page_name: "做任务,赚次数弹窗",
// button_name: "领取奖励按钮", button_name: "领取奖励按钮",
// }); });
// sensorLog(LOG_KEY.exposure, "b10875", "d10876", { sensorLog(LOG_KEY.exposure, "b14312", "d14313", {
// page_name: "赚次数任务页", page_name: "做任务,赚次数弹窗",
// button_name: "去完成按钮", button_name: "去完成按钮",
// }); });
sensorLog(LOG_KEY.exposure, "b14312", "d14315", {
page_name: "做任务,赚次数弹窗",
button_name: "关闭按钮",
});
} }
componentWillUnmount() { componentWillUnmount() {
unwatchPageVisibility(this.onPageVisibilityChange); unwatchPageVisibility(this.onPageVisibilityChange);
MatterViewDuration("b14312", +new Date() - this.startTime, {
page_name: "做任务,赚次数弹窗",
});
} }
onPageVisibilityChange = async (visible) => { onPageVisibilityChange = async (visible) => {
...@@ -67,29 +75,29 @@ class Taskpop extends React.Component { ...@@ -67,29 +75,29 @@ class Taskpop extends React.Component {
// if(code == TASK_CODE.INVITE){ // if(code == TASK_CODE.INVITE){
// MatterShareOpt(LOG_KEY.click,"b7870","d8729") // MatterShareOpt(LOG_KEY.click,"b7870","d8729")
// } // }
// sensorLog(LOG_KEY.click, "b10875", "d10876", { sensorLog(LOG_KEY.click, "b14312", "d14313", {
// page_name: "赚次数任务页", page_name: "做任务,赚次数弹窗",
// button_name: "去完成按钮", button_name: "去完成按钮",
// }); });
await taskStore.doTask(item); await taskStore.doTask(item);
}) })
/** 领奖 */ /** 领奖 */
taskPrizeHandle = _throttle(async (item) => { taskPrizeHandle = _throttle(async (item) => {
const { code, taskStatus } = item || {}; const { code, taskStatus } = item || {};
// sensorLog(LOG_KEY.click, "b10875", "d10877", { sensorLog(LOG_KEY.click, "b14312", "d14314", {
// page_name: "赚次数任务页", page_name: "做任务,赚次数弹窗",
// button_name: "领取奖励按钮", button_name: "领取奖励按钮",
// }); });
await taskStore.getTaskPrize(item); await taskStore.getTaskPrize(item);
}) })
close = () => { close = () => {
// sensorLog(LOG_KEY.click, "b7394", "d7398", { sensorLog(LOG_KEY.click, "b14312", "d14315", {
// page_name: "做任务赚骰子页", page_name: "做任务,赚次数弹窗",
// button_name: "关闭按钮", button_name: "关闭按钮",
// }); });
ModalCtrl.closeModal() ModalCtrl.closeModal()
// store.getHomeInfo() // store.getHomeInfo()
......
...@@ -92,16 +92,16 @@ export const initSensors = (uid) => { ...@@ -92,16 +92,16 @@ export const initSensors = (uid) => {
{ {
currentUrl: location.href, currentUrl: location.href,
referrer: document.referrer, referrer: document.referrer,
theme_name: "非遗大冒险", theme_name: "谁是最强大脑",
act_name: "非遗大冒险", act_name: "谁是最强大脑",
avtivity_name: "非遗大冒险", avtivity_name: "谁是最强大脑",
source_entry: CHANNEL_MAP[CFG.channel], source_entry: CHANNEL_MAP[CFG.channel],
source: CHANNEL_MAP[CFG.channel], source: CHANNEL_MAP[CFG.channel],
platform_name: extranceName[CFG.channel], platform_name: extranceName[CFG.channel],
platform_type: platformType[CFG.channel], platform_type: platformType[CFG.channel],
requirement_id: 1375, requirement_id: 1669,
is_login: uid ? "是" : "否", is_login: uid ? "是" : "否",
operation_name: "非遗大冒险", operation_name: "谁是最强大脑",
source_platform: CHANNEL_MAP?.[CFG.channel] || CFG.channel, source_platform: CHANNEL_MAP?.[CFG.channel] || CFG.channel,
entrance: extranceName[CFG.channel], entrance: extranceName[CFG.channel],
}, },
...@@ -126,7 +126,7 @@ export const sensorLog = (logKey, bid, did, options) => { ...@@ -126,7 +126,7 @@ export const sensorLog = (logKey, bid, did, options) => {
// console.log(`%c type: ${logKey} track_sign: ${`aL06Activity.${bid}.${did}.${logKey}.${EVENT_NAME[logKey]}`}`, "font-size: 20px; color: rgb(244, 123, 93)"); // console.log(`%c type: ${logKey} track_sign: ${`aL06Activity.${bid}.${did}.${logKey}.${EVENT_NAME[logKey]}`}`, "font-size: 20px; color: rgb(244, 123, 93)");
sensors.track(EVENT_NAME[logKey], { sensors.track(EVENT_NAME[logKey], {
track_sign: `aL06Activity.${bid}.${did}.${logKey}.${EVENT_NAME[logKey]}`, track_sign: `aL06Activity.${bid}.${did}.${logKey}.${EVENT_NAME[logKey]}`,
avtivity_name: "非遗大冒险", avtivity_name: "谁是最强大脑",
operation_id: CFG.operationId, operation_id: CFG.operationId,
act_type: "客经", act_type: "客经",
location_type: "活动", location_type: "活动",
...@@ -146,7 +146,7 @@ export const pageViewD = (bid, did, options) => { ...@@ -146,7 +146,7 @@ export const pageViewD = (bid, did, options) => {
sensors.track(EVENT_NAME[LOG_KEY.pageview], { sensors.track(EVENT_NAME[LOG_KEY.pageview], {
track_sign: `aL06Activity.${bid}.${did}.${LOG_KEY.pageview}.${EVENT_NAME[LOG_KEY.pageview]}`, track_sign: `aL06Activity.${bid}.${did}.${LOG_KEY.pageview}.${EVENT_NAME[LOG_KEY.pageview]}`,
operation_id: CFG.operationId, operation_id: CFG.operationId,
avtivity_name: "非遗大冒险", avtivity_name: "谁是最强大脑",
act_type: "客经", act_type: "客经",
location_type: "活动", location_type: "活动",
agent_code: store.homeInfo?.agentCode, agent_code: store.homeInfo?.agentCode,
...@@ -170,7 +170,7 @@ export const pageView = (bid, options) => { ...@@ -170,7 +170,7 @@ export const pageView = (bid, options) => {
sensors.track(EVENT_NAME[LOG_KEY.pageview], { sensors.track(EVENT_NAME[LOG_KEY.pageview], {
track_sign: `aL06Activity.${bid}.${LOG_KEY.pageview}.${EVENT_NAME[LOG_KEY.pageview]}`, track_sign: `aL06Activity.${bid}.${LOG_KEY.pageview}.${EVENT_NAME[LOG_KEY.pageview]}`,
operation_id: CFG.operationId, operation_id: CFG.operationId,
avtivity_name: "非遗大冒险", avtivity_name: "谁是最强大脑",
act_type: "客经", act_type: "客经",
location_type: "活动", location_type: "活动",
agent_code: store.homeInfo?.agentCode, agent_code: store.homeInfo?.agentCode,
...@@ -194,7 +194,7 @@ export const MatterViewOpt = (bid, options) => { ...@@ -194,7 +194,7 @@ export const MatterViewOpt = (bid, options) => {
location_type: "活动", location_type: "活动",
entrance: extranceName[CFG.channel], entrance: extranceName[CFG.channel],
sales_id: CFG.workerCode || store.homeInfo?.agentCode, // todo sales_id: CFG.workerCode || store.homeInfo?.agentCode, // todo
avtivity_name: "非遗大冒险", avtivity_name: "谁是最强大脑",
...options ...options
}); });
...@@ -215,7 +215,7 @@ export const MatterShareOpt = (bid, did, options) => { ...@@ -215,7 +215,7 @@ export const MatterShareOpt = (bid, did, options) => {
location_type: "活动", location_type: "活动",
entrance: extranceName[CFG.channel], entrance: extranceName[CFG.channel],
sales_id: CFG.workerCode || store.homeInfo?.agentCode, // todo sales_id: CFG.workerCode || store.homeInfo?.agentCode, // todo
avtivity_name: "非遗大冒险", avtivity_name: "谁是最强大脑",
...options ...options
}); });
...@@ -236,7 +236,7 @@ export const MatterViewDuration = (bid, time, options) => { ...@@ -236,7 +236,7 @@ export const MatterViewDuration = (bid, time, options) => {
location_type: "活动", location_type: "活动",
entrance: extranceName[CFG.channel], entrance: extranceName[CFG.channel],
sales_id: CFG.workerCode || store.homeInfo?.agentCode, // todo sales_id: CFG.workerCode || store.homeInfo?.agentCode, // todo
avtivity_name: "非遗大冒险", avtivity_name: "谁是最强大脑",
$event_duration: time, $event_duration: time,
...options ...options
}); });
......
...@@ -4,8 +4,8 @@ import { ...@@ -4,8 +4,8 @@ import {
callShare, callShare,
Weixin, Weixin,
} from "@spark/share" } from "@spark/share"
/** /**
* @description: 小程序跳转 * @description: 小程序跳转
* @param {*} * @param {*}
...@@ -20,7 +20,7 @@ import { ...@@ -20,7 +20,7 @@ import {
export function isIos() { export function isIos() {
return navigator.userAgent.match(/iphone|ipod|ipad/gi) return navigator.userAgent.match(/iphone|ipod|ipad/gi)
} }
/** 判断微信环境 */ /** 判断微信环境 */
export function isWeChat() { export function isWeChat() {
const ua = window.navigator.userAgent.toLowerCase() const ua = window.navigator.userAgent.toLowerCase()
...@@ -29,7 +29,7 @@ import { ...@@ -29,7 +29,7 @@ import {
/** /**
* 初始化分享 * 初始化分享
*/ */
export async function onInitShare(cb) { export async function onInitShare(cb?) {
await start([Weixin], function (success) { await start([Weixin], function (success) {
console.log("share result:----", success) console.log("share result:----", success)
cb && cb() cb && cb()
...@@ -83,7 +83,6 @@ import { ...@@ -83,7 +83,6 @@ import {
} }
}); });
} }
\ No newline at end of file
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