Commit 9a938ae8 authored by 徐士卿's avatar 徐士卿

md

parent d47469f2
......@@ -48,7 +48,7 @@ export default [
],
"hasChallengeDay": 5,
"latestChallengeSuccessTime": 5,
"boolNeedResign": false,
"boolNeedResign": true,
"boolNeedResignPop": false,
"taskInfoList": [
{
......
......@@ -29,7 +29,7 @@ MDAuto({
click: MDList, // 点击
});
export function handleLogExposure(id: number | string, id2: number | string = 0) {
export function handleLogExposure(id: number | string, id2: number | string = 1) {
logExposure({
dpm: `${appId}.110.${id}.${id2}`,
dcm,
......@@ -38,7 +38,7 @@ export function handleLogExposure(id: number | string, id2: number | string = 0)
});
}
export function handleLogClick(id: number | string, id2: number | string = 0) {
export function handleLogClick(id: number | string, id2: number | string = 1) {
logClick({
dpm: `${appId}.110.${id}.${id2}`,
dcm,
......
......@@ -9,6 +9,7 @@ import { ModalCtrl } from "@/core/ctrls/ModalCtrl";
import store from "../../store/store.ts";
import { toJS } from "mobx";
import API from "../../api/index.ts";
import { handleLogExposure, handleLogClick } from "@/MD";
@observer
class Choice_challenge extends React.Component {
......@@ -24,11 +25,11 @@ class Choice_challenge extends React.Component {
};
handlechallenge = async (id) => {
//todo
handleLogClick(15);
const { success } = await API.getChooseChallenge({
challengeId: id,
});
console.log(id)
console.log(id);
if (success) {
store.getTaskInfo();
ModalCtrl.closeModal();
......@@ -40,6 +41,7 @@ class Choice_challenge extends React.Component {
// }
render() {
handleLogExposure(15);
const { activeIndex } = this.state;
const { challengeConfigList = [] } = store?.taskInfo || {};
// console.log(toJS(store?.taskInfo), 111);
......@@ -77,7 +79,7 @@ class Choice_challenge extends React.Component {
<span className="title"></span>
<span className="tip"></span>
<Button
className="challenge md15"
className="challenge"
onClick={() => this.handlechallenge(selectedItem?.challengeId)}
/>
<span className="ditu"></span>
......
......@@ -10,6 +10,7 @@ import Finish_task from "../finish_task/finish_task";
import API from "../../../src/api/index";
import store from "../../../src/store/store.ts";
import { pre_reduce_score } from "../../store/credits.js";
import { handleLogExposure, handleLogClick } from "@/MD";
@observer
class Consume_credits extends React.Component {
......@@ -18,6 +19,7 @@ class Consume_credits extends React.Component {
}
handleclock = async (n, code) => {
handleLogClick(16)
await pre_reduce_score(
{
toPlaywayId: "challenge",
......@@ -44,6 +46,7 @@ class Consume_credits extends React.Component {
render() {
const { n = 0, code, title } = this.props;
handleLogExposure(16)
return (
<div className="consume_credits modal_center">
<span className="bg"></span>
......@@ -52,7 +55,7 @@ class Consume_credits extends React.Component {
<span className="tip2">完成打卡</span>
<Button className="close" onClick={this.handleclose} />
<Button
className="clock md16"
className="clock"
onClick={() => this.handleclock(n, code, title)}
/>
<span className="icon"></span>
......
......@@ -9,6 +9,7 @@ import { ModalCtrl } from "@/core/ctrls/ModalCtrl";
import Finish_task from "../finish_task/finish_task";
import API from "../../../src/api/index";
import store from "../../../src/store/store.ts";
import { handleLogExposure, handleLogClick } from "@/MD";
@observer
class Consume_qg extends React.Component {
......@@ -17,7 +18,8 @@ class Consume_qg extends React.Component {
}
handleclock = async (code) => {
const {success } = await API.getChallenegeComplate({ taskCode: code });
handleLogClick(17);
const { success } = await API.getChallenegeComplate({ taskCode: code });
if (success) {
ModalCtrl.closeModal();
}
......@@ -30,6 +32,7 @@ class Consume_qg extends React.Component {
render() {
const { n = 0, code, title } = this.props;
handleLogExposure(17);
return (
<div className="consume_qg modal_center">
<span className="bg"></span>
......@@ -37,7 +40,7 @@ class Consume_qg extends React.Component {
<span className="tip1">消耗{n}青果</span>
<span className="tip2">完成打卡</span>
<Button className="close" onClick={this.handleclose} />
<Button className="clock md17" onClick={() => this.handleclock(code)} />
<Button className="clock" onClick={this.handleclock} />
<span className="icon"></span>
<span className="ditu"></span>
</div>
......
......@@ -10,6 +10,7 @@ import API from "../../../src/api/index";
import store from "../../../src/store/store.ts";
import { pre_reduce_score } from "../../store/credits.js";
import Finish_resign from "../finish_resign/finish_resign.jsx";
import { handleLogExposure, handleLogClick } from "@/MD";
@observer
class Renewmodule extends React.Component {
constructor(props) {
......@@ -32,6 +33,7 @@ class Renewmodule extends React.Component {
};
handleUse = async (activeChoice, inferQg, inferJf, resignJf) => {
handleLogClick(18)
if (activeChoice === "credits") {
// 执行积分续签逻辑 todo
ModalCtrl.closeModal();
......@@ -68,6 +70,7 @@ class Renewmodule extends React.Component {
};
render() {
handleLogExposure(18)
const { activeChoice } = this.state;
const { hasChallengeDay, resignJf, resignQg } = this.props;
const { jfNum, qgNum } = store?.baseInfo || {};
......@@ -79,11 +82,11 @@ class Renewmodule extends React.Component {
// bg1、bg3 是红色背景 bg2、bg4是白色背景
return (
<div className="renewmodule modal_center">
<div className="renewmodule">
<span className="bg"></span>
<span className="headline"></span>
<Button
className="use md18"
className="use"
onClick={() =>
this.handleUse(activeChoice, inferQg, inferJf, resignJf)
}
......
......@@ -4,7 +4,7 @@
width: 750px;
height: 1624px;
left: 0px;
top: 0px;
top: calc(100vh - 1624px);
position: absolute;
.bg {
......
......@@ -13,7 +13,7 @@ import Consume_credits from '../../../components/consume_credits/consume_credits
import Renewmodule from '../../../components/renewmodule/renewmodule';
import { unwatchPageVisibility, watchPageVisibility } from '@/core/page-visibility-notify';
import { initWx } from '@/built-in/share/weixin/weixin';
import { logClick, logExposure, MDAuto } from "@grace/built-in";
import { handleLogExposure, handleLogClick } from "@/MD";
@observer
class Check extends React.Component<any, any> {
......@@ -67,7 +67,9 @@ class Check extends React.Component<any, any> {
};
handlegosign = _asyncThrottle((hasChallengeDay, resignJf, resignQg) => {
handlegosign = _asyncThrottle((hasChallengeDay, resignJf, resignQg, type) => {
// if (type === 'task') handleLogClick(5)
// else if (type === 'calendar') handleLogClick(6)
ModalCtrl.showModal(Renewmodule, { hasChallengeDay, resignJf, resignQg });
});
......@@ -158,7 +160,7 @@ class Check extends React.Component<any, any> {
const renderActionButton = (code, completedSize, intervalLimitSize) => {
// 先判断是否为续签状态
if (boolNeedResign) {
return <Button className="gosign" onClick={() => this.handlegosign(hasChallengeDay, resignJf, resignQg)} />
return <Button className="gosign md5" onClick={() => this.handlegosign(hasChallengeDay, resignJf, resignQg, 'task')} />
} else if (completedSize < intervalLimitSize) {
switch (true) {
// 签到
......@@ -270,7 +272,7 @@ class Check extends React.Component<any, any> {
<span className="done"></span>
)}
{boolNeedResign && dayIndex === hasChallengeDay && (
<Button className="renew" onClick={() => this.handlegosign(hasChallengeDay, resignJf, resignQg)} />
<Button className="renew md6" onClick={() => this.handlegosign(hasChallengeDay, resignJf, resignQg, 'calendar')} />
)}
{dayIndex !== challengeTotalDay - 1 && (
<span className="day-number">{dayIndex + 1}</span>
......
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