Commit 44dbc707 authored by haiyoucuv's avatar haiyoucuv

music

parent 4aabc4ea
......@@ -3,87 +3,46 @@
import React from 'react';
import { observer } from 'mobx-react';
import './sharepage.less';
import { _throttle, dateFormatter, getUrlParam, windowJumpUrl } from '@src/utils/utils';
import { accessLog } from 'duiba-utils';
import store from '@src/store';
import API from '@src/api';
import { extranceName, PAGE_MAP } from '@src/utils/constants';
import modalStore from '@src/store/modal';
import { handleLogClick, handleLogExposure } from '../../../MD';
import { _throttle } from '@src/utils/utils';
import { extranceName } from '@src/utils/constants';
import shareStore from '@src/store/share';
import { LOG_KEY, MatterShareOpt, MatterViewOpt, sensorLog } from '@src/utils/sensors';
// wxjTODO 换皮 客经页面
import { Button } from "@src/components/Button";
@observer
class AgentSharepage extends React.Component {
constructor(props) {
super(props);
this.state = {
shareInfo: {}
}
this.shareRef = null;
}
async componentDidMount() {
MatterViewOpt("b12112", {
MatterViewOpt("b12850", {
page_name: "分享落地页",
});
sensorLog(LOG_KEY.exposure, "b12112", "d12115", {
sensorLog(LOG_KEY.exposure, "b12850", "d12853", {
button_name: "分享活动按钮",
page_name: "分享落地页",
entrance: extranceName[CFG.channel],
});
}
getShareInfo = async () => {
const { success, data } = await API.coop_getLoadingInfo();
if (success && data) {
this.setState({
shareInfo: data
})
}
}
/** 跳转微信端活动 */
toWeActHandle = () => {
CFG.workerCode = getUrlParam("ykCode");
let url = CFG.domain + CFG.indexUrl + '&channel=' + CFG.channel + `${!!getUrlParam("inviteCode") ? ("&inviteCode=" + getUrlParam("inviteCode")) : ""}` + `${!!CFG.workerCode ? `&ykCode=${CFG.workerCode}` : ""}`
location.href = url
}
handleShareAct = _throttle(() => {
MatterShareOpt("b12112", "d12115", {
MatterShareOpt("b12850", "d12853", {
button_name: "分享活动按钮",
page_name: "分享落地页",
entrance: extranceName[CFG.channel],
});
shareStore.doShare()
shareStore.doShare();
})
render() {
// const { actStartTimestamp, actEndTimestamp } = this.state?.shareInfo || {};
return (
<div className="agentsharepage_wrap" ref={r => this.shareRef = r}>
<div className="sharepage modal_center">
<span className="bg"></span>
{/* <span className="title"></span> */}
<span className="normal_btn md51" onClick={this.handleShareAct}></span>
{/* <span className="time">活动时间:{dateFormatter(actStartTimestamp, "yyyy年MM月dd日")}-{dateFormatter(actEndTimestamp, "MM月dd日")}</span> */}
{/* {
getUrlParam("inviteCode") ?
<span className="assist_btn" ></span>
:
<span className="normal_btn"></span>
} */}
{/* <span className="click_area" onClick={() => this.toWeActHandle()}></span> */}
{/* <span className="hand"></span> */}
{/* <span className="logo"></span> */}
<Button className="normal_btn md32" onClick={this.handleShareAct}></Button>
</div>
</div>
);
......
......@@ -11,55 +11,26 @@
.sharepage {
width: 750px;
height: 1624px;
left: 0px;
left: 0;
top: 0;
position: absolute;
.bg {
width: 750px;
height: 1624px;
left: 0px;
top: 0px;
position: absolute;
.sparkBg("sharePage/agentBg.png");
}
.time {
width: 600px;
height: 40px;
left: calc(50% - 300px);
top: 380px;
position: absolute;
color: #fff;
font-size: 24px;
font-weight: 600;
text-align: center;
}
.title {
left: 93px;
top: 236px;
width: 559px;
height: 198px;
position: absolute;
.sparkBg("homePage/title.png");
}
.enter_btn {
width: 417px;
height: 131px;
left: 167px;
top: 1258px;
.invite_text{
position: absolute;
.sparkBg("sharePage/btn.png");
left: 197px;
top: 1020px;
width: 339px;
height: 107px;
.sparkBg("sharePage/assist_text.png");
}
.assist_btn {
width: 417px;
height: 131px;
left: 167px;
top: 1258px;
.bg {
width: 750px;
height: 1624px;
left: 0;
top: 0;
position: absolute;
.sparkBg("sharePage/assist_btn.png");
.sparkBg("sharePage/bg.jpg");
}
.normal_btn {
......@@ -68,35 +39,8 @@
left: 146px;
top: 1286px;
position: absolute;
.sparkBg("sharePage/share_btn.png");
}
.click_area {
left: 112px;
top: 1290px;
width: 513px;
height: 115px;
position: absolute;
.sparkBg("sharePage/分享活动.png");
}
.hand {
position: absolute;
left: 557px;
top: 1352px;
width: 121px;
height: 94px;
.sparkBg("sharePage/hand.png");
pointer-events: none;
}
.logo {
width: 318px;
height: 31px;
left: calc(50% - 159px);
top: 190px;
position: absolute;
.sparkBg("homePage/logo.png");
}
}
}
\ No newline at end of file
}
......@@ -16,7 +16,7 @@ const store = makeAutoObservable({
frontVariable: {},
/** 当前页面 */
curPage: {
curPage: (CFG.agentShare == "1" ? PAGE_MAP.AGENT_SHARE_PAGE : null) || {
// TODO 举例子,自定义页面,因为mng更新原因原数字id会对应一个新的字符串id
"5055": "sharePage",
Did1NDA0NDc: "sharePage",
......
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