Commit 03308905 authored by 汪欢's avatar 汪欢

0930

parents
Pipeline #302232 failed with stages
in 0 seconds
import MD from 'spark-utils/out/md/index.js';
let appId = CFG.appID || '78607';
const dcm = '202.' + CFG.projectId + '.0.0';
const domain = '//embedlog.duiba.com.cn';
let MDList = [
{
ele: `.test-md1`,
data: {
dpm: `${appId}.110.1.1`,
dcm,
domain,
appId
},
once: false
},
{
ele: `.test-md2`,
data: {
dpm: `${appId}.110.2.1`,
dcm,
domain,
appId
},
once: false
},
{
ele: `.test-md3`,
data: {
dpm: `${appId}.110.3.1`,
dcm,
domain,
appId
},
once: false
},
{
ele: `.test-md4`,
data: {
dpm: `${appId}.110.4.1`,
dcm,
domain,
appId
},
once: false
},
{
ele: `.test-md5`,
data: {
dpm: `${appId}.110.5.1`,
dcm,
domain,
appId
},
once: false
},
{
ele: `.test-md6`,
data: {
dpm: `${appId}.110.6.1`,
dcm,
domain,
appId
},
once: false
},
{
ele: `.test-md7`,
data: {
dpm: `${appId}.110.7.1`,
dcm,
domain,
appId
},
once: false
},
{
ele: `.test-md8`,
data: {
dpm: `${appId}.110.8.1`,
dcm,
domain,
appId
},
once: false
},
{
ele: `.test-md9`,
data: {
dpm: `${appId}.110.9.1`,
dcm,
domain,
appId
},
once: false
},
{
ele: `.test-md10`,
data: {
dpm: `${appId}.110.10.1`,
dcm,
domain,
appId
},
once: false
},
{
ele: `.test-md11`,
data: {
dpm: `${appId}.110.11.1`,
dcm,
domain,
appId
},
once: false
},
{
ele: `.test-md12`,
data: {
dpm: `${appId}.110.12.1`,
dcm,
domain,
appId
},
once: false
},
{
ele: `.test-md13`,
data: {
dpm: `${appId}.110.13.1`,
dcm,
domain,
appId
},
once: false
},
{
ele: `.test-md14`,
data: {
dpm: `${appId}.110.14.1`,
dcm,
domain,
appId
},
once: false
},
{
ele: `.test-md15`,
data: {
dpm: `${appId}.110.15.1`,
dcm,
domain,
appId
},
once: false
},
{
ele: `.test-md16`,
data: {
dpm: `${appId}.110.16.1`,
dcm,
domain,
appId
},
once: false
},
{
ele: `.test-md17`,
data: {
dpm: `${appId}.110.17.1`,
dcm,
domain,
appId
},
once: false
},
{
ele: `.test-md18`,
data: {
dpm: `${appId}.110.18.1`,
dcm,
domain,
appId
},
once: false
},
{
ele: `.test-md19`,
data: {
dpm: `${appId}.110.19.1`,
dcm,
domain,
appId
},
once: false
},
{
ele: `.test-md20`,
data: {
dpm: `${appId}.110.20.1`,
dcm,
domain,
appId
},
once: false
},
{
ele: `.test-md21`,
data: {
dpm: `${appId}.110.21.1`,
dcm,
domain,
appId
},
once: false
},
{
ele: `.test-md22`,
data: {
dpm: `${appId}.110.22.1`,
dcm,
domain,
appId
},
once: false
},
{
ele: `.test-md23`,
data: {
dpm: `${appId}.110.23.1`,
dcm,
domain,
appId
},
once: false
},
];
export default () =>
MD({
show: MDList, // 曝光
click: MDList // 点击
});
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><meta name="theme-color" content="#000000"/><title>国庆攒人品,集卡赢好礼</title><script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script><script src="//yun.duiba.com.cn/h5/lib/zepto.min.js"></script><script>!(function (e, i) {
var t = e.documentElement,
n = navigator.userAgent.match(/iphone|ipod|ipad/gi),
a = n ? Math.min(i.devicePixelRatio, 3) : 1,
m =
"orientationchange" in window
? "orientationchange"
: "resize";
t.dataset.dpr = a;
for (
var d, l, c = !1, o = e.getElementsByTagName("meta"), r = 0;
r < o.length;
r++
)
(l = o[r]), "viewport" == l.name && ((c = !0), (d = l));
if (c)
d.content =
"width=device-width,initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0,user-scalable=no";
else {
var o = e.createElement("meta");
(o.name = "viewport"),
(o.content =
"width=device-width,initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0,user-scalable=no"),
t.firstElementChild.appendChild(o);
}
var s = function () {
var e = t.clientWidth;
e / a > 750 && (e = 750 * a),
(window.remScale = e / 750),
(t.style.fontSize = 200 * (e / 750) + "px");
};
s(), e.addEventListener && i.addEventListener(m, s, !1);
})(document, window);</script><script>let shareurl = window.location.href ;
// window.globalShare = 'https://activity.m.duiba.com.cn/wechat/access?apk=23x1RDzqFb6NEiduKuJEFnWn3ZE1&dbredirect='
window.globalShare = 'https://activity.m.duiba.com.cn/wechat/access?apk=23x1RDzqFb6NEiduKuJEFnWn3ZE1&dbredirect='
initWx(shareurl);
//初始化微信分享
function invokeWX(url,title,desc) {
console.log(url,title,desc,'params');
let share = {
title: title,
desc: desc,
url: url,
imgUrl:
"https://yun.duiba.com.cn/spark/assets/sharepicture.63e41f08a37580d12416b719c45d4db8eaea6578.png",
};
wx.onMenuShareTimeline({
title: share.title,
desc: share.desc,
link: share.url,
imgUrl: share.imgUrl,
success: function () {},
cancel: function () {},
});
wx.onMenuShareAppMessage({
title: share.title,
desc: share.desc,
link: share.url,
imgUrl: share.imgUrl,
success: function () {},
cancel: function () {},
});
}
function initWx(url) {
$.ajax({
type: "get",
url: "/wechatShare/getShareInfo/v2",
data: {
wxdebug: false,
url: encodeURIComponent(url),
},
cache: false,
dataType: "json",
success: function (res) {
if (!res.success) {
return;
}
wx.config({
debug: false,
appId: res.wxappid,
timestamp: res.wxtimestamp,
nonceStr: res.wxnonceStr,
signature: res.wxsignature,
jsApiList: [
"checkJsApi",
"onMenuShareTimeline",
"onMenuShareAppMessage",
],
});
wx.error(function (res) {
console.error("wx error", res);
});
// wx.ready(function () {
// invokeWX('https://activity.m.duiba.com.cn/wechat/access?apk=23x1RDzqFb6NEiduKuJEFnWn3ZE1&dbredirect=https%3a%2f%2factivity.m.duiba.com.cn%2fprojectx%2fp30d778bd%2findex.html%3fappID%3d78607',
// '我正在参加“国庆攒人品,集卡赢好礼”,点击帮我助力!','集齐卡片即可直接获得话费大奖,快跟我一起吧'
// );
// });
wx.ready(function () {
invokeWX('https://activity.m.duiba.com.cn/wechat/access?apk=23x1RDzqFb6NEiduKuJEFnWn3ZE1&dbredirect=https%3a%2f%2factivity.m.duiba.com.cn%2fprojectx%2fp7c1b802d%2findex.html%3fappID%3d78607',
'我正在参加“国庆攒人品,集卡赢好礼”,点击帮我助力!','集齐卡片即可直接获得话费大奖,快跟我一起吧'
);
});
},
error: function (err) {},
});
}</script><script>// var shareAssistConfig = {
// sharepicture:'//yun.duiba.com.cn/spark/assets/sharepicture.63e41f08a37580d12416b719c45d4db8eaea6578.png',
// shareTitle:'集齐卡片即可直接获得话费大奖,快跟我一起吧',
// shareSubTitle:'我正在参加“国庆攒人品,集卡赢好礼”,点击帮我助力!',
// }
// varSendShareConfig = {
// sharepicture:'//yun.duiba.com.cn/spark/assets/sharepicture.63e41f08a37580d12416b719c45d4db8eaea6578.png',
// shareTitle:'我送你一张卡片,邀你一起集卡赢好礼!',
// shareSubTitle:'我正在参加“国庆攒人品,集卡赢好礼”,点击帮我助力!',
// }
// varRequestShareConfig = {
// sharepicture:'//yun.duiba.com.cn/spark/assets/sharepicture.63e41f08a37580d12416b719c45d4db8eaea6578.png',
// shareTitle:'我正在集卡赢好礼,向你索要一张卡片!',
// shareSubTitle:'我正在参加“国庆攒人品,集卡赢好礼”,点击帮我助力!',
// }
function getApp() {
return {
cloud: {},
cloudName: "clientTemplate2C",
requestType: "mock",
};
}
var CFG = CFG || {};
CFG.projectId = location.pathname.split("/")[2] || "1";
function getUrlParam(name) {
const search = window.location.search;
const matched = search
.slice(1)
.match(new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"));
return search.length ? matched && matched[2] : null;
}
CFG.appID = getUrlParam("appID") || 1;</script><link href="//yun.duiba.com.cn/spark/v2/sparkproject-1600410659367/styles/main.5fe37c3303442efac839.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script src="//yun.duiba.com.cn/spark/v2/sparkproject-1600410659367/js/runtime-main.4c90535b.js"></script><script src="//yun.duiba.com.cn/spark/v2/sparkproject-1600410659367/js/vendors.c665a21b.js"></script><script src="//yun.duiba.com.cn/spark/v2/sparkproject-1600410659367/js/main.0310da41.js"></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){function r(r){for(var n,a,l=r[0],p=r[1],i=r[2],f=0,s=[];f<l.length;f++)a=l[f],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&s.push(o[a][0]),o[a]=0;for(n in p)Object.prototype.hasOwnProperty.call(p,n)&&(e[n]=p[n]);for(c&&c(r);s.length;)s.shift()();return u.push.apply(u,i||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var p=t[l];0!==o[p]&&(n=!1)}n&&(u.splice(r--,1),e=a(a.s=t[0]))}return e}var n={},o={1:0},u=[];function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.m=e,a.c=n,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,r){if(1&r&&(e=a(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)a.d(t,n,function(r){return e[r]}.bind(null,n));return t},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="//yun.duiba.com.cn/spark/v2/sparkproject-1600410659367";var l=window.webpackJsonp=window.webpackJsonp||[],p=l.push.bind(l);l.push=r,l=l.slice();for(var i=0;i<l.length;i++)r(l[i]);var c=p;t()}([]);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
export const join = {
"success": true,
"data": {
message: "参与成功"
}
};
import { Random } from "mockjs";
export const rule = {
success: true,
data: `活动规则: ${Random.cparagraph(20, 40)}`,
};
export const homeInfo = {
code: null,
data: {
errorCode: 0,
errorMessage: null,
interrupt: false,
raw: {
assistTimesPop: null,
cards: [
{
count: 0,
id: "sp_1",
},
{
count: 1,
id: "sp_2",
},
{
count: 1,
id: "sp_3",
},
{
count: 1,
id: "sp_4",
},
{
count: 2,
id: "sp_5",
},
],
remainingGameTimes: 98,
isSubscribe: true,
},
},
message: null,
success: true,
};
export const join = {
code: null,
data: {
errorCode: 0,
errorMessage: null,
interrupt: false,
raw: {
icon: null,
name: "熬夜不变丑",
prizeId: "sp_2",
url: null,
userRecordId: 14609,
},
},
message: null,
success: true,
};
export const share = {
code: null,
data: {
errorCode: 0,
errorMessage: null,
interrupt: false,
raw: {
shareCode: "89uv5e",
sharePic: "cccc",
shareTitle: "aaaa",
sceneId: 136,
shareSubTitle: "bbbbb",
},
},
message: null,
success: true,
};
export const queryData = {
data: [
{
icon: "//yun.dui88.com/projectxh5/coupon-250-250.png",
id: "o19344ac8",
index: 1,
name: "优惠券奖品",
prizeId: "sss_6",
prizeType: 2,
refId: "35335",
refType: "coupon",
},
{
degree: "50",
icon: "//yun.dui88.com/projectxh5/phonebill-250-250.png",
id: "od18bd4c6",
index: 2,
name: "50元话费",
prizeId: "sss_4",
prizeType: 2,
refId: "1",
refType: "phonebill",
},
{
degree: "10",
icon: "//yun.dui88.com/projectxh5/phonebill-250-250.png",
id: "ofc8c55a2",
index: 3,
name: "10元话费",
prizeId: "sss_3",
prizeType: 2,
refId: "1",
refType: "phonebill",
},
{
icon:
"//yun.duiba.com.cn/db-m/app/turntable/circle/images/prize/谢谢参与_6311f27.png",
id: "thanks",
index: 4,
name: "谢谢参与",
prizeId: "thanks",
prizeType: 0,
},
],
success: true,
};
export const prizeOneCard = {
code: null,
data: {
errorCode: 0,
errorMessage: null,
interrupt: false,
raw: {
remainingGameTimes: 89,
prizeInfo: {
icon: "//yun.dui88.com/projectxh5/phonebill-250-250.png",
name: "20元话费",
prizeId: "sss_2",
url: "/aaw/projectx/takePrize?projectOrderNo=14612",
userRecordId: 14612,
},
},
},
message: null,
success: true,
};
export const assist2 = {
code: null,
data: {
errorCode: 0,
errorMessage: null,
interrupt: false,
raw: null,
},
message: null,
success: true,
};
export const assist = {
code: null,
data: {
errorCode: 0,
errorMessage: null,
interrupt: false,
raw: {
prizeInfo: {
icon: '//yun.duiba.com.cn/spark/assets/q1.720d3ce89baa54ed740ef4277d598f68a2fb1a87.jpg',
name: "脱单不脱发",
prizeId: "sp_4",
url: null,
userRecordId: 14615,
},
},
},
message: null,
success: true,
};
export const giveCard = {
code: null,
data: {
errorCode: 0,
errorMessage: null,
interrupt: false,
raw: {
shareCode: "89uv5edey0d0",
sharePic: "ffff",
shareTitle: "dddd",
shareSubTitle: "eeee",
},
},
message: null,
success: true,
};
export const coop_getGiveCardInfo = {
code: null,
data: {
errorCode: 0,
errorMessage: null,
interrupt: false,
raw: {
inviterNickname: "",
icon: null,
name: "熬夜不变丑",
prizeId: "sp_1",
},
},
message: null,
success: true,
};
export const acceptCard = {
code: null,
data: {
errorCode: null,
errorMessage: null,
interrupt: false,
raw: true,
},
message: null,
success: true,
};
export const sendPrize = {
code: null,
data: {
errorCode: 0,
errorMessage: null,
interrupt: false,
raw: {
icon: "//yun.dui88.com/projectxh5/phonebill-250-250.png",
name: "20元话费",
prizeId: "sss_3",
url: "/aaw/projectx/takePrize?projectOrderNo=14616",
userRecordId: 14616,
},
},
message: null,
success: true,
};
import Mock from 'mockjs';
import proxy from './proxy';
Object.keys(proxy).map(method => {
Object.keys(proxy[method]).map(URI => {
let data = proxy[method][URI];
Mock.mock(new RegExp(URI), method, opt => {
console.log(`%c[mock] 链接:${opt.url} 类型:${method} 参数:${method === 'post' && JSON.stringify(opt.body) || ''}`, "color: rgb(63, 172, 203)", data);
return data
});
})
})
\ No newline at end of file
import * as common from './common';
import * as collect_0722 from './collect_0722';
let projectId = window.CFG.projectId || '';
export default {
get: {
[`/projectx/${projectId}/projectRule.query`]: common.rule,
[`/projectx/${projectId}/clcard/index.do`]:common.homeInfo,
[`/projectx/${projectId}/clcard/join.do`]:common.join,
[`/projectx/${projectId}/clcard/share.do`]:common.share,
[`/projectx/${projectId}/clcard/prizeOneCard.do`]:common.prizeOneCard,
[`/projectx/${projectId}/clcard/assist.do`]:common.assist,
[`/projectx/${projectId}/clcard/giveCard.do`]:common.giveCard,
[`/projectx/${projectId}/clcard/coop_getGiveCardInfo.do`]:common.coop_getGiveCardInfo,
[`/projectx/${projectId}/clcard/acceptCard.do`]:common.acceptCard,
[`/projectx/${projectId}/clcard/sendPrize.do`]:common.sendPrize,
[`/projectx/${projectId}/ru_show.query`]:common.queryData
},
post: {
[`/projectx/${projectId}/join.do`]: collect_0722.join
}
};
\ No newline at end of file
This diff is collapsed.
{
"name": "sparkproject-1600410659367",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "spark dev --type h5 --port 1234",
"prod": "spark build --type h5 --env prod",
"tb": "spark build --type taobao"
},
"dependencies": {
"@mrkwon/svga-player": "^1.0.6",
"axios": "^0.19.2",
"css-loader": "^3.6.0",
"duiba-utils": "git+ssh://git@gitlab2.dui88.com/spark/duiba-utils.git",
"fyge-tbmini": "^1.3.1",
"postcss-loader": "^3.0.0",
"prettier": "^2.0.5",
"qs": "^6.9.4",
"react": "^16.4.1",
"react-dom": "^16.4.1",
"react-redux": "^5.0.7",
"redux": "^4.0.0",
"redux-thunk": "^2.3.0",
"spark-utils": "git+ssh://git@gitlab2.dui88.com:spark/spark-utils.git",
"style-loader": "^1.2.1",
"svgaplayerweb": "^2.3.1"
},
"devDependencies": {
"mockjs": "^1.1.0"
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="theme-color" content="#000000" />
<title>国庆攒人品,集卡赢好礼</title>
<script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"
></script>
<script src="//yun.duiba.com.cn/h5/lib/zepto.min.js"
></script>
<script src="https://yun.duiba.com.cn/db_games/debug/vconsole.min.js"></script>
<script>
// init vConsole
var vConsole = new VConsole();
console.log("Hello world");
</script>
<script>
!(function (e, i) {
var t = e.documentElement,
n = navigator.userAgent.match(/iphone|ipod|ipad/gi),
a = n ? Math.min(i.devicePixelRatio, 3) : 1,
m =
"orientationchange" in window
? "orientationchange"
: "resize";
t.dataset.dpr = a;
for (
var d, l, c = !1, o = e.getElementsByTagName("meta"), r = 0;
r < o.length;
r++
)
(l = o[r]), "viewport" == l.name && ((c = !0), (d = l));
if (c)
d.content =
"width=device-width,initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0,user-scalable=no";
else {
var o = e.createElement("meta");
(o.name = "viewport"),
(o.content =
"width=device-width,initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0,user-scalable=no"),
t.firstElementChild.appendChild(o);
}
var s = function () {
var e = t.clientWidth;
e / a > 750 && (e = 750 * a),
(window.remScale = e / 750),
(t.style.fontSize = 200 * (e / 750) + "px");
};
s(), e.addEventListener && i.addEventListener(m, s, !1);
})(document, window);
</script>
<script >
let shareurl = window.location.href ;
// window.globalShare = 'https://activity.m.duiba.com.cn/wechat/access?apk=23x1RDzqFb6NEiduKuJEFnWn3ZE1&dbredirect='
window.globalShare = 'https://activity.m.duiba.com.cn/wechat/access?apk=23x1RDzqFb6NEiduKuJEFnWn3ZE1&dbredirect='
initWx(shareurl);
//初始化微信分享
function invokeWX(url,title,desc) {
console.log(url,title,desc,'params');
let share = {
title: title,
desc: desc,
url: url,
imgUrl:
"https://yun.duiba.com.cn/spark/assets/sharepicture.63e41f08a37580d12416b719c45d4db8eaea6578.png",
};
wx.onMenuShareTimeline({
title: share.title,
desc: share.desc,
link: share.url,
imgUrl: share.imgUrl,
success: function () {},
cancel: function () {},
});
wx.onMenuShareAppMessage({
title: share.title,
desc: share.desc,
link: share.url,
imgUrl: share.imgUrl,
success: function () {},
cancel: function () {},
});
}
function initWx(url) {
$.ajax({
type: "get",
url: "/wechatShare/getShareInfo/v2",
data: {
wxdebug: false,
url: encodeURIComponent(url),
},
cache: false,
dataType: "json",
success: function (res) {
if (!res.success) {
return;
}
wx.config({
debug: false,
appId: res.wxappid,
timestamp: res.wxtimestamp,
nonceStr: res.wxnonceStr,
signature: res.wxsignature,
jsApiList: [
"checkJsApi",
"onMenuShareTimeline",
"onMenuShareAppMessage",
],
});
wx.error(function (res) {
console.error("wx error", res);
});
wx.ready(function () {
invokeWX('https://activity.m.duiba.com.cn/wechat/access?apk=23x1RDzqFb6NEiduKuJEFnWn3ZE1&dbredirect=https%3a%2f%2factivity.m.duiba.com.cn%2fprojectx%2fp30d778bd%2findex.html%3fappID%3d78607',
'我正在参加“国庆攒人品,集卡赢好礼”,点击帮我助力!','集齐卡片即可直接获得话费大奖,快跟我一起吧'
);
});
// wx.ready(function () {
// invokeWX('https://activity.m.duiba.com.cn/wechat/access?apk=23x1RDzqFb6NEiduKuJEFnWn3ZE1&dbredirect=https%3a%2f%2factivity.m.duiba.com.cn%2fprojectx%2fp7c1b802d%2findex.html%3fappID%3d78607',
// '我正在参加“国庆攒人品,集卡赢好礼”,点击帮我助力!','集齐卡片即可直接获得话费大奖,快跟我一起吧'
// );
// });
},
error: function (err) {},
});
}
</script>
<script >
// var shareAssistConfig = {
// sharepicture:'//yun.duiba.com.cn/spark/assets/sharepicture.63e41f08a37580d12416b719c45d4db8eaea6578.png',
// shareTitle:'集齐卡片即可直接获得话费大奖,快跟我一起吧',
// shareSubTitle:'我正在参加“国庆攒人品,集卡赢好礼”,点击帮我助力!',
// }
// varSendShareConfig = {
// sharepicture:'//yun.duiba.com.cn/spark/assets/sharepicture.63e41f08a37580d12416b719c45d4db8eaea6578.png',
// shareTitle:'我送你一张卡片,邀你一起集卡赢好礼!',
// shareSubTitle:'我正在参加“国庆攒人品,集卡赢好礼”,点击帮我助力!',
// }
// varRequestShareConfig = {
// sharepicture:'//yun.duiba.com.cn/spark/assets/sharepicture.63e41f08a37580d12416b719c45d4db8eaea6578.png',
// shareTitle:'我正在集卡赢好礼,向你索要一张卡片!',
// shareSubTitle:'我正在参加“国庆攒人品,集卡赢好礼”,点击帮我助力!',
// }
function getApp() {
return {
cloud: {},
cloudName: "clientTemplate2C",
requestType: "mock",
};
}
var CFG = CFG || {};
CFG.projectId = location.pathname.split("/")[2] || "1";
function getUrlParam(name) {
const search = window.location.search;
const matched = search
.slice(1)
.match(new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"));
return search.length ? matched && matched[2] : null;
}
CFG.appID = getUrlParam("appID") || 1;
</script>
</head>
<body>
<noscript> You need to enable JavaScript to run this app. </noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
--></body>
</html>
module.exports = {
OUTPUT_DIR: "dist",
SOURCE_DIR: "src",
TEMP_DIR: "./.temp",
ENTRY: "src/app.jsx",
TEMPLATE: "./public/index.html",
MOCK_STATUS: false
};
let projectId = window.CFG.projectId || '';
const apiCfg = {
getRule:`/projectx/${projectId}/projectRule.query`,
doJoin: {
uri: `/projectx/${projectId}/join.do`,
method: "post"
},
sendPrize:`/projectx/${projectId}/clcard/sendPrize.do`, //合成抽奖
homeInfo:`/projectx/${projectId}/clcard/index.do`, //首页信息
join:`/projectx/${projectId}/clcard/join.do`, //抽卡
prizeOneCard:`/projectx/${projectId}/clcard/prizeOneCard.do`, //翻卡抽奖
share:`/projectx/${projectId}/clcard/share.do`, //获取分享码
getInviteList:`/projectx/{peojextId}/clcard/getInviteList.do`,
assist:`/projectx/${projectId}/clcard/assist.do`, //接受助力
giveCard:`/projectx/${projectId}/clcard/giveCard.do`, //发起赠卡
coop_getGiveCardInfo:`/projectx/${projectId}/clcard/coop_getGiveCardInfo.do`, //查询赠卡的卡片信息
acceptCard:`/projectx/${projectId}/clcard/acceptCard.do`, //领取赠卡
requestCard:`/projectx/${projectId}/clcard/requestCard.do`, //发起索卡
coop_getRequestCardInfo:`/projectx/${projectId}/clcard/coop_getRequestCardInfo.do`, //查询索卡的卡片信息
confirmSendCard:`/projectx/${projectId}/clcard/grantCard.do`, //回应索卡
getInviteList:`/projectx/${projectId}/clcard/getInviteList.do`, //邀请记录
getQrcode:`/customActivity/qrcode/getQrcode`, //获取二维码
getQrCodeWithLogo:`/customActivity/qrcode/getQrCodeWithLogo`, //获取携带Logo的二维码
getSceneQrCodeTicket:`/wechat/sceneqrcode/getSceneQrCodeTicket`, //获取带参二维码ticket用于调用微信接口生成二维码
getSceneQrCodeContent:`/wechat/sceneqrcode/getSceneQrCodeContent`, //获取带参二维码里面的内容,用于自己生成二维码
getShareInfo:`/wechatShare/getShareInfo/v2`, //获取分享签名信息
queryData:`/projectx/${projectId}/ru_show.query`
}
export default apiCfg;
\ No newline at end of file
import apiCfg from './apicfg';
import request from './request';
const apiList = {
...apiCfg
}
const API = generateAPI(apiList);
export default API;
function getRequestParams(value) {
if (typeof value === 'string') {
return {
uri: value,
method: 'get'
}
} else if (typeof value === 'object') {
const { uri, method = 'post' } = value;
return {
uri,
method
}
} else {
console.error('getRequestParams: 传参有误');
}
};
function generateAPI(apiList) {
const api = {};
Object.entries(apiList).forEach(([key, value]) => {
let data = getRequestParams(value);
console.log('url data', data);
let { method, uri } =data;
// if(uri.indexOf("getRankingNew.query") == -1){
// uri = 'https://docs.dui88.com/mock/115' + uri;
// }else{
// uri = 'http://ams.dui88.com/sever/index.php?g=Web&c=mock&o=simple&projectID=130&uri=' + uri;
// }
api[key] = params => request[method](uri, method === 'post' ? params : { params });
});
return api;
}
import Qs from "qs";
import axios from "axios";
// 分享召回工具类
import { isFromShare, newUser } from 'duiba-utils';
const TIMEOUT = 10000;
let mergeData = {
user_type: newUser ? '0' : '1',
is_from_share: isFromShare ? '0' : '1',
_t: Date.now()
}
const instance = axios.create({
timeout: TIMEOUT, // 请求超时时间
});
instance.interceptors.request.use(
(config) => {
if (config.method === "get") {
config.data = true;
}
config.method === "post"
? (config.data = Qs.stringify({ ...config.data, ...mergeData }))
: (config.params = { ...config.params, ...mergeData });
config.headers["Content-Type"] = "application/x-www-form-urlencoded";
return config;
},
(error) => {
//请求错误处理
Promise.reject(error);
}
);
// 响应拦截器
instance.interceptors.response.use(
// 请求成功
(res) => {
const { status } = res || -1000;
return (status >= 200 && status <= 400) ? res.data : res
}
);
export default instance;
import React, { Component } from "react";
import ReactDOM from "react-dom";
import Enum from "./util/enum";
import "./app.less";
import { MOCK_STATUS } from "../sparkrc";
import ViewCtrl from "./util/viewCtrl";
import PageIndex from "./pages/pagehe_cheng_qia_ye_mian/pagehe_cheng_qia_ye_mian.jsx";
import InviteRecordPage from "./pages/pageyao_qing_ji_lu_ye_mian1/pageyao_qing_ji_lu_ye_mian1.jsx";
import InviteFriendPage from "./pages/pageyao_qing1/pageyao_qing1.jsx";
import SendOrReceivePage from "./pages/pagezeng_song_ling_qu1/pagezeng_song_ling_qu1.jsx";
MOCK_STATUS && require("../mock/index");
import MD from "../MD";
MD();
//此处为spark-cli动态生成
class App extends Component {
constructor(props) {
super(props);
this.state = {
mainPage: <PageIndex ></PageIndex>,
};
}
componentDidMount(){
document.addEventListener('changePage',(e)=>{this.changePage(e.detail.id,e.detail.data)});
}
changePage(index,data) {
switch (index) {
case Enum.Page.InviteRecordPage:
this.setState({
mainPage: <InviteRecordPage data={data}></InviteRecordPage>,
});
break;
case Enum.Page.InviteFriendPage:
this.setState({
mainPage: <InviteFriendPage data={data}></InviteFriendPage>,
});
break;
case Enum.Page.SendOrReceivePage:
this.setState({
mainPage: <SendOrReceivePage data={data}></SendOrReceivePage>,
});
break;
default:
this.setState({
mainPage: <PageIndex data={data}></PageIndex>,
});
break;
}
}
render() {
let {mainPage} = this.state
return (
mainPage
)
}
}
ReactDOM.render(<App />, document.getElementById("root"));
* {
margin: 0;
padding: 0;
}
html,
body {
font-size: 24px;
width: 100%;
height: 100%;
}
.popcontainer {
position: fixed;
width: 750px;
height: 1624px;
top: 50%;
left: 50%;
margin-left:-375px;
margin-top:-812px;
background: rgba(0, 0, 0, 0.7);
}
.popcontainer_empty {
position: fixed;
width: 750px;
height: 1624px;
top: 50%;
left: 50%;
margin-left:-375px;
margin-top:-812px;
// background: rgba(0, 0, 0, 0.01);
}
'use strict';
import React, { Component } from 'react';
import API from '../../api';
import resList from '../../resconfig/resList';
import util from '../../util/util';
import ViewCtrl from '../../util/viewCtrl';
import dataCenter from '../../util/dataCenter';
import './combagforfriend.less';
class Combagforfriend extends Component {
constructor(props) {
super(props);
this.state = { resList: resList,shareFlag:false };
}
async requestCard(){
let {closeWin,data:{icon:{src,id}}} = this.props;
let srcpic = encodeURIComponent(src);
let token = await util.getProjectXToken();
let {code,message,data,success} = await API.requestCard({token,cardId:id});
let {errorMessage} = data;
if(!success){
ViewCtrl.showToast(message);
return ;
}
this.setState({
shareFlag:true
})
// 索卡
if(data.raw){
let {raw:{shareCode,sharePic,shareTitle,shareSubTitle}} = data;
dataCenter.setData('requestShareCode',shareCode);
let shareContent = {
sharePic,shareTitle,shareSubTitle
}
let globalShare = window['globalShare'];
let uri = 'https://activity.m.duiba.com.cn/projectx/p30d778bd/ff36fb009.html'
let link = globalShare + encodeURIComponent(uri + `?appID=${CFG.appID}`+ `&index=1004` + `&cardsType=receive`+`&shareCode=${shareCode}` + `&sharePic=${srcpic}` + "&is_from_share=0");
window.invokeWX(link,shareTitle,shareSubTitle);
}else{
ViewCtrl.showToast(errorMessage);
}
}
shareover(){
this.setState({
shareFlag:false
})
}
render() {
let {shareFlag} = this.state
let {closeWin,data:{icon:{src,id}}} = this.props;
console.log(this.props,'props');
return (
<div className="bagforfriend ">
{
shareFlag ?
<img className="share" onClick={()=>this.shareover()} src={this.state.resList['d3279d9a-a943-41cb-8368-dbca5fe45e25'].url} />
: null
}
<img className="zu33333 " src={this.state.resList['f28a2e6b-4eb7-4411-a37e-0b7042fcda15'].url} />
{/* <img className="qia_pian33333 " src={this.state.resList['bfa4ab88-9764-4de1-863b-26be899744aa'].url} /> */}
<img className="qia_pian33333 " src={src} />
<img className="dian_ji_chou_qia3333 test-md18" onClick={()=>this.requestCard()} src={this.state.resList['a2908875-da0a-41a7-b76e-0c98b7929258'].url} />
<img className="x3" onClick={closeWin} src={this.state.resList['8f5b5fec-9948-43dc-99da-e915b0571173'].url} />
</div>
);
}
}
export default Combagforfriend;
.bagforfriend {
width: 480px;
height: 1046px;
opacity: 1;
left: 134px;
top: 108px;
position: absolute;
transform-origin: 0px 0px 0px;
.share{
width: 750px;
height: 1800px;
opacity: 1;
z-index: 3;
left: -134px;
top: -100px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.ji_qia_ying_hao_li123 {
width: 402px;
height: 75px;
opacity: 1;
left: 39px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 80px;
color: rgba(255, 220, 129, 1);
}
.zu33333 {
width: 480px;
height: 651px;
opacity: 1;
top: 178px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.qia_pian33333 {
width: 423px;
height: 593px;
opacity: 1;
left: 27px;
top: 203px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.nin_de_hao_youxx_song_nin_yi_zhang_qia_pian {
width: 311px;
height: 27px;
opacity: 1;
left: 85px;
top: 139px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 28px;
color: rgba(180, 20, 21, 1);
}
.ji_qi_qia_pian_dui_huanxx_hao_li123 {
width: 224px;
height: 23px;
opacity: 1;
left: 129px;
top: 175px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 24px;
color: rgba(92, 52, 52, 1);
}
.dian_ji_chou_qia3333 {
width: 456px;
height: 103px;
opacity: 1;
left: 15px;
top: 862px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.x3 {
width: 61px;
height: 61px;
opacity: 1;
left: 211px;
top: 985px;
position: absolute;
transform-origin: 0px 0px 0px;
}
}
'use strict';
import React, { Component } from 'react';
import resList from '../../resconfig/resList';
import util from '../../util/util';
import API from '../../api'
import ViewCtrl from '../../util/viewCtrl'
import './comconfirmsend.less';
class Comconfirmsend extends Component {
constructor(props) {
super(props);
this.state = { resList: resList };
}
async sendCard(){
util.disableClick('dian_ji_chou_qia222');
let {closeWin,data:{shareCode}} = this.props;
let token = await util.getProjectXToken();
let {code,message,data,success} = await API.confirmSendCard({shareCode,token});
let {errorMessage} = data;
if(data.raw){
this.props.closeWin();
this.props.call();
}else{
this.props.closeWin();
this.props.call();
ViewCtrl.showToast(errorMessage);
}
util.enableClick('dian_ji_chou_qia222');
// 回调
// this.props.call();
}
onceAgain(){
this.props.closeWin();
this.props.call();
}
render() {
let {closeWin,data:{shareCode,sharePic,inviterNickname}} = this.props;
console.log(this.props,'1');
return (
<div className="confirmsend ">
{/* <span className="ji_qia_ying_hao_li1 ">集卡赢好礼</span> */}
<img className="zu11122 " src={this.state.resList['67900cda-90f2-4623-a9a1-9a5f9cb0b923'].url} />
{/* <img className="qia_pian22222 " src={this.state.resList['1ee8df3c-0379-4c88-a933-8459901e421b'].url} /> */}
<img className="qia_pian22222 " src={sharePic} />
<span className="hao_youxx_xiang_nin_suo_yao_yi_zhang_qia_pian1 ">好友{inviterNickname}向您索要一张卡片</span>
{/* <span className="ji_qi_qia_pian_dui_huanxx_hao_li12 ">集齐卡片 兑换XX豪礼</span> */}
<img className="dian_ji_chou_qia222 test-md22" onClick={()=>this.sendCard()} src={this.state.resList['78a7bc90-98e9-4c16-b6b6-146cee3358ff'].url} />
<img className="x123 " onClick={()=>this.onceAgain()} src={this.state.resList['fac057fc-386d-4421-b41d-e127997aa5b0'].url} />
</div>
);
}
}
export default Comconfirmsend;
.confirmsend {
width: 480px;
height: 1046px;
opacity: 1;
left: 134px;
top: 83px;
position: absolute;
transform-origin: 0px 0px 0px;
.ji_qia_ying_hao_li1 {
width: 402px;
height: 75px;
opacity: 1;
left: 39px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size:80px;
color: rgba(255, 220, 129, 1);
}
.zu11122 {
width: 480px;
height: 651px;
opacity: 1;
top: 178px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.qia_pian22222 {
width: 423px;
height: 593px;
opacity: 1;
left: 27px;
top: 203px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.hao_youxx_xiang_nin_suo_yao_yi_zhang_qia_pian1 {
width: 520px;
height: 27px;
opacity: 1;
left: 0px;
top: 126px;
text-align: center;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 28px;
// color: rgba(180, 20, 21, 1);
color: white;
}
.ji_qi_qia_pian_dui_huanxx_hao_li12 {
width: 224px;
height: 23px;
opacity: 1;
left: 129px;
top: 175px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 24px;
color: rgba(92, 52, 52, 1);
}
.dian_ji_chou_qia222 {
width: 456px;
height: 103px;
opacity: 1;
left: 15px;
top: 862px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.x123 {
width: 61px;
height: 61px;
opacity: 1;
left: 211px;
top: 985px;
position: absolute;
transform-origin: 0px 0px 0px;
}
}
'use strict';
import React, { Component } from 'react';
import resList from '../../resconfig/resList';
import API from '../../api';
import './comdan_chuang5_yuan_hua_fei_quan1add.less';
import ViewCtrl from '../../util/viewCtrl';
class Comdan_chuang5_yuan_hua_fei_quan1add extends Component {
constructor(props) {
super(props);
this.state = { resList: resList,shareFlag:false };
}
async inviteFriend(){
// console.log('111');
this.setState({
shareFlag:true
})
let {data,code,message,success} = await API.share();
let sceneId
if(data.raw){
let {raw:{shareCode,sharePic,shareTitle,shareSubTitle}} = data;
sceneId = data.raw.sceneId;
let globalShare = window['globalShare'];
const url = globalShare + encodeURIComponent( `https://activity.m.duiba.com.cn/projectx/p30d778bd/ff28a1170.html?sceneId=${sceneId}&shareCode=${shareCode}`);
window.invokeWX(url,shareTitle,shareSubTitle);
}
}
onceAgain(){
this.props.closeWin();
this.props.call();
}
shareover(){
this.setState({
shareFlag:false
})
}
gotoPage(){
this.props.closeWin();
this.props.call();
}
render() {
let {shareFlag} = this.state;
let {data:{icon,name,prizeId,url,userRecordId,remainingGameTimes},call} = this.props;
console.log(this.props);
return (
<div className="dan_chuang5_yuan_hua_fei_quan1add ">
{
shareFlag ?
<img className="share" onClick={()=>this.shareover()} src={this.state.resList['83d1e966-db25-4856-b1d6-4961505354fd'].url} />
: null
}
<img className="gong_xi_nim123 " src={this.state.resList['1eac6156-7a55-4519-9069-c3b9981689fc'].url} />
{
remainingGameTimes > 0 ?
<img className="an_niu1m test-md14" onClick={()=>this.onceAgain()} src={this.state.resList['5b830baa-1ab6-456b-b1d0-6b6f44e3cb32'].url} />
:
<img className="an_niu1m an_niu23 test-md15" onClick={()=>this.inviteFriend()} src={this.state.resList['d456e11d-9357-41ec-8245-5d52246776f8'].url} />
}
{/* 再抽一次按钮 */}
{/* 邀请好友再抽一次 */}
<div className="biao_ti30 ">
<img className="tuo_yuan1_kao_bei5 " src={this.state.resList['2e7fcdb8-9215-4565-99b9-2d2ec58fe1ff'].url} />
{/* <span className="huo_de5_yuan_hua_fei_quan_yi_zhang31 ">获得5元话费券一张</span> */}
<span className="huo_de5_yuan_hua_fei_quan_yi_zhang31 ">获得{name}</span>
</div>
{/* <img className="hua_fei_quan29 " src={this.state.resList['731b1d20-9337-4b10-af1d-bdcb23ee8b95'].url} /> */}
<img className="hua_fei_quan29 " src={icon} />
<img className="x3" onClick={()=>this.gotoPage()} src={this.state.resList['8f5b5fec-9948-43dc-99da-e915b0571173'].url} />
</div>
);
}
}
export default Comdan_chuang5_yuan_hua_fei_quan1add;
.dan_chuang5_yuan_hua_fei_quan1add {
width: 566px;
height: 647px;
opacity: 1;
left: 93px;
top: 367px;
position: absolute;
transform-origin: 0px 0px 0px;
.share{
width: 750px;
height: 1800px;
opacity: 1;
z-index: 3;
left: -93px;
top: -567px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.gong_xi_nim123 {
width: 566px;
height: 647px;
opacity: 1;
position: absolute;
transform-origin: 0px 0px 0px;
}
.an_niu1m {
width: 384px;
height: 81px;
opacity: 1;
left: 90px;
top: 531px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.biao_ti30 {
width: 401px;
height: 46px;
opacity: 1;
left: 81px;
top: 154px;
position: absolute;
transform-origin: 0px 0px 0px;
.tuo_yuan1_kao_bei5 {
width: 401px;
height: 46px;
opacity: 1;
position: absolute;
transform-origin: 0px 0px 0px;
}
.huo_de5_yuan_hua_fei_quan_yi_zhang31 {
width: 312px;
height: 35px;
opacity: 1;
left: 46px;
top: 3px;
position: absolute;
transform-origin: 0px 0px 0px;
font-weight: 600;
text-align: center;
font-size: 35px;
color: rgba(212, 30, 31, 1);
}
}
.hua_fei_quan29 {
width: 218px;
height: 215px;
opacity: 1;
left: 171px;
// top: 254px;
top: 265px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.x3 {
width: 61px;
height: 61px;
opacity: 1;
// left: 211px;
left: 50%;
margin-left: -30.5px;
top: 700px;
position: absolute;
transform-origin: 0px 0px 0px;
}
}
'use strict';
import React, { Component } from 'react';
import resList from '../../resconfig/resList';
import './comdan_chuang5_yuan_hua_fei_quan2add.less';
class Comdan_chuang5_yuan_hua_fei_quan2add extends Component {
constructor(props) {
super(props);
this.state = { resList: resList };
}
render() {
return (
<div className="dan_chuang5_yuan_hua_fei_quan2add ">
<img className="gong_xi_nim12 " src={this.state.resList['9e4e520c-932b-4520-a3ea-8d3da6c5107b'].url} />
<div className="biao_ti27 ">
<img className="biao_ti_bei_jing " src={this.state.resList['2e7fcdb8-9215-4565-99b9-2d2ec58fe1ff'].url} />
<span className="huo_de5_yuan_hua_fei_quan_yi_zhang28 ">获得5元话费券一张</span>
</div>
<img className="hua_fei_quan26 " src={this.state.resList['731b1d20-9337-4b10-af1d-bdcb23ee8b95'].url} />
<img className="an_niu23 " src={this.state.resList['d456e11d-9357-41ec-8245-5d52246776f8'].url} />
</div>
);
}
}
export default Comdan_chuang5_yuan_hua_fei_quan2add;
.dan_chuang5_yuan_hua_fei_quan2add {
width: 566px;
height: 647px;
opacity: 1;
left: 93px;
top: 567px;
position: absolute;
transform-origin: 0px 0px 0px;
.gong_xi_nim12 {
width: 566px;
height: 647px;
opacity: 1;
position: absolute;
transform-origin: 0px 0px 0px;
}
.biao_ti27 {
width: 401px;
height: 46px;
opacity: 1;
left: 81px;
top: 154px;
position: absolute;
transform-origin: 0px 0px 0px;
.biao_ti_bei_jing {
width: 401px;
height: 46px;
opacity: 1;
position: absolute;
transform-origin: 0px 0px 0px;
}
.huo_de5_yuan_hua_fei_quan_yi_zhang28 {
width: 312px;
height: 35px;
opacity: 1;
left: 46px;
top: 3px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 37px;
color: rgba(212, 30, 31, 1);
}
}
.hua_fei_quan26 {
width: 218px;
height: 215px;
opacity: 1;
left: 171px;
top: 254px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.an_niu23 {
width: 384px;
height: 81px;
opacity: 1;
left: 90px;
top: 531px;
position: absolute;
transform-origin: 0px 0px 0px;
}
}
.dan_chuang_gong_xi_ni_qia_pian1add {
// width: 567px;
// height: 647px;
opacity: 1;
// left: 92px;
// top: 581px;
width: 750px;
height: 1448px;
left: 50%;
top: 180px;
margin-left: -375px;
position: absolute;
transform-origin: 0px 0px 0px;
// .canvas{
// opacity: 1;
// // left: 92px;
// // top: 581px;
// width: 750px;
// height: 1448px;
// left: 50%;
// top: 100px;
// margin-left: -375px;
// position: absolute;
// }
.canvas{
width: 750px;
height: 1448px;
top: 0;
opacity: 1;
z-index: 3;
pointer-events: none;
position: absolute;
}
.gong_xi_nim_bei_jing {
width: 567px;
height: 647px;
opacity: 1;
position: absolute;
transform-origin: 0px 0px 0px;
}
.qia_pian1m1 {
width: 448px;
height: 195px;
opacity: 1;
left: 60px;
top: 228px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.fan_kai_qia_pian {
width: 192px;
height: 25px;
opacity: 1;
left: 188px;
top: 445px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.an_nium_fan_kai_qia_pian {
width: 384px;
height: 81px;
opacity: 1;
// left: 91px;
left: 50%;
margin-left: -192px;
top: 980px;
position: absolute;
transform-origin: 0px 0px 0px;
z-index: 2;
}
.biao_ti51 {
width: 302px;
height: 45px;
opacity: 1;
left: 132px;
top: 140px;
position: absolute;
transform-origin: 0px 0px 0px;
}
}
'use strict';
import React, { Component } from 'react';
import resList from '../../resconfig/resList';
import util from '../../util/util';
import './comdan_chuang_gong_xi_nin_zhu_li_cheng_gong.less';
class Comdan_chuang_gong_xi_nin_zhu_li_cheng_gong extends Component {
constructor(props) {
super(props);
this.state = { resList: resList };
}
gotoPage(){
this.props.closeWin();
this.props.call();
}
render() {
let {data:{assistTimesPop}} = this.props;
return (
<div className="dan_chuang_gong_xi_nin_zhu_li_cheng_gong ">
<img className="bei_jing_kuang " src={this.state.resList['eef77741-1162-4201-b803-f80c5d86f660'].url} />
<img className="qu_chou_qia_an_niu test-md10" onClick={()=>this.gotoPage()} src={this.state.resList['20215f88-e1b0-4bec-8ec9-ec1d9f3c25ca'].url} />
<span className="hao_you_wei_ni_zhu_li_cheng_gong_huo_de_yi_ci_mian_fei_chou_qia_ji_hui ">
好友为你助力成功<br /> 获得{assistTimesPop}次免费抽卡机会
</span>
<img
className="zhu_li_cheng_gong_biao_ti "
src={this.state.resList['1c3f2954-d1d6-42a3-9291-5953c8db4f40'].url}
/>
</div>
);
}
}
export default Comdan_chuang_gong_xi_nin_zhu_li_cheng_gong;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{"63/5":function(e,t){e.exports={OUTPUT_DIR:"dist",SOURCE_DIR:"src",TEMP_DIR:"./.temp",ENTRY:"src/app.jsx",TEMPLATE:"./public/index.html",MOCK_STATUS:!1}},GYGG:function(e,t,n){var a=n("LboF"),r=n("a9Pn");"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var c={insert:"head",singleton:!1};a(r,c);e.exports=r.locals||{}},IUt0:function(e,t,n){},a9Pn:function(e,t,n){},k7yg:function(e,t,n){"use strict";n.r(t);var a=n("lwsE"),r=n.n(a),c=n("W8MJ"),o=n.n(c),i=n("7W2i"),s=n.n(i),u=n("a1gu"),d=n.n(u),f=n("Nsbk"),p=n.n(f),l=n("q1tI"),b=n.n(l),m=n("i8i4"),g=n.n(m),h=(n("mPlr"),n("63/5")),y=n("/2d7"),v=n.n(y),_=CFG.appID||"78607",w="202."+CFG.projectId+".0.0",O="//embedlog.duiba.com.cn",k=[{ele:".test-md20",data:{dpm:"".concat(_,".110.20.1"),dcm:w,domain:O,appId:_},once:!1},{ele:".test-md21",data:{dpm:"".concat(_,".110.21.1"),dcm:w,domain:O,appId:_},once:!1}],P=n("o0o1"),j=n.n(P),x=n("yXPU"),E=n.n(x),C={"0200e780-b6ac-4c95-8e5a-8fd7a4bfe846":{name:"领取",ext:".png",uuid:"0200e780-b6ac-4c95-8e5a-8fd7a4bfe846",url:"//yun.duiba.com.cn/spark/assets/ed108cdbed084003cb316f2f93b1c6add78e535c.png"},"d542fb28-5d76-4a4b-81aa-1128d3d4b79b":{name:"按钮d",ext:".png",uuid:"d542fb28-5d76-4a4b-81aa-1128d3d4b79b",url:"//yun.duiba.com.cn/spark/assets/56f8b06aafd4358edf11e3735c53ef48c8ce6a10.png"},"80b5a11f-d662-461c-826a-aa3a81b78607":{name:"背景框a",ext:".png",uuid:"80b5a11f-d662-461c-826a-aa3a81b78607",url:"//yun.duiba.com.cn/spark/assets/94a0b7bf8de371cfbfcd476e2b868f08e3df87e6.png"},"8a8d66b8-ddc3-40a5-a48d-b85072964206":{name:"索要卡片",ext:".png",uuid:"8a8d66b8-ddc3-40a5-a48d-b85072964206",url:"//yun.duiba.com.cn/spark/assets/76b72adb0f27efc9108493c74ebf860eb390ae5a.png"},"8b9b2997-e491-4dee-a123-4dfede27d34b":{name:"赠送按钮",ext:".png",uuid:"8b9b2997-e491-4dee-a123-4dfede27d34b",url:"//yun.duiba.com.cn/spark/assets/8a932e01f6b368c1a9592e6ccd61cb77aad7d327.png"},"d06e587d-0bf1-49c6-998c-44a3b799fb4a":{name:"one",ext:".png",url:"//yun.duiba.com.cn/spark/assets/one.c317e8e270eee4e2baae5afcbe6af28b86c17c9f.png",uuid:"d06e587d-0bf1-49c6-998c-44a3b799fb4a"}},R=n("J4zp"),N=n.n(R),D=n("cDf5"),I=n.n(D),q=n("lSNA"),T=n.n(q),S=window.CFG.projectId||"",U={getRule:"/projectx/".concat(S,"/projectRule.query"),doJoin:{uri:"/projectx/".concat(S,"/join.do"),method:"post"},coop_getGiveCardInfo:"/projectx/".concat(S,"/clcard/coop_getGiveCardInfo.do"),coop_getRequestCardInfo:"/projectx/".concat(S,"/clcard/coop_getRequestCardInfo.do")},G=n("Qyje"),M=n.n(G),L=n("vDqi");function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach((function(t){T()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var J=n.n(L).a.create({timeout:1e4});J.interceptors.request.use((function(e){return"get"===e.method&&(e.data=!0),"post"===e.method?e.data=M.a.stringify(F(F({},e.data),{},{_t:Date.now()})):e.params=F(F({},e.params),{},{_t:Date.now()}),e.headers["Content-Type"]="application/x-www-form-urlencoded",e}),(function(e){Promise.reject(e)})),J.interceptors.response.use((function(e){var t=(e||-1e3).status;return t>=200&&t<=400?e.data:e}));var Q=J;function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}var K,W,Y=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){T()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},U),X=(K=Y,W={},Object.entries(K).forEach((function(e){var t=N()(e,2),n=t[0],a=function(e){if("string"==typeof e)return{uri:e,method:"get"};if("object"===I()(e)){var t=e.uri,n=e.method;return{uri:t,method:void 0===n?"post":n}}console.error("getRequestParams: 传参有误")}(t[1]),r=a.method,c=a.uri;W[n]=function(e){return Q[r](c,"post"===r?e:{params:e})}})),W);n("GYGG");function B(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=p()(e);if(t){var r=p()(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return d()(this,n)}}var Z=function(e){s()(a,e);var t,n=B(a);function a(e){var t;return r()(this,a),(t=n.call(this,e)).state={resList:C,cardsType:"",sharePic:"",shareCode:"",inviterNickname:"",icon:""},t}return o()(a,[{key:"componentDidMount",value:(t=E()(j.a.mark((function e(){var t,n,a,r,c,o,i,s,u,d,f,p,l;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.getQueryString("cardsType"),n=this.getQueryString("shareCode"),a=this.getQueryString("sharePic"),this.setState({sharePic:a,shareCode:n,cardsType:t}),"send"!=t){e.next=16;break}return e.next=7,X.coop_getGiveCardInfo({shareCode:n});case 7:(r=e.sent).code,r.message,c=r.data,r.success,c.errorMessage,o=c.raw,i=o.inviterNickname,s=o.icon,o.prizeId,i.length>=6&&(i=i.substr(0,6)),this.setState({inviterNickname:i,icon:s});case 16:if("receive"!=t){e.next=29;break}return e.next=19,X.coop_getRequestCardInfo({shareCode:n});case 19:(u=e.sent).code,u.message,d=u.data,u.success,d.errorMessage,f=d.raw,p=f.inviterNickname,l=f.icon,f.prizeId,p.length>=6&&(p=p.substr(0,6)),this.setState({inviterNickname:p,icon:l});case 29:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"gotoPage",value:function(){var e=this.state,t=e.cardsType,n=e.sharePic,a=e.shareCode,r=e.inviterNickname,c=(e.icon,encodeURIComponent(n)),o=encodeURIComponent(r),i="https://activity.m.duiba.com.cn/wechat/access?apk=23x1RDzqFb6NEiduKuJEFnWn3ZE1&dbredirect="+encodeURIComponent("https://activity.m.duiba.com.cn/projectx/p30d778bd/index.html?typeOfCard="+"".concat(t)+"&shareCode="+"".concat(a)+"&sharePic="+"".concat(c)+"&inviterNickname="+"".concat(o));location.href=i}},{key:"getQueryString",value:function(e){var t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),n=window.location.href.split("?")[1];if(n){var a=n.match(t);if(null!==a)return decodeURIComponent(a[2])}return""}},{key:"getProjectXToken",value:function(){return top.location.href.indexOf("preview")>=0||top.location.href.indexOf("localhost")>=0?("dev-token","dev-token"):window.getPxToken?new Promise((function(e){window.getPxToken((function(t,n){switch(t){case"net error":case"need login":case"state invalid":e(null);break;default:e(n||null)}}))})):void resolve(null)}},{key:"render",value:function(){var e=this,t=this.state,n=t.cardsType,a=t.sharePic,r=t.inviterNickname;return b.a.createElement("div",{className:"zeng_song_ling_qu1 "},b.a.createElement("img",{className:"ling_qu",src:this.state.resList["d06e587d-0bf1-49c6-998c-44a3b799fb4a"].url}),"send"==n?b.a.createElement("div",{className:"ling_qu_qia_pian "},b.a.createElement("img",{className:"bei_jing_kuang ",src:this.state.resList["80b5a11f-d662-461c-826a-aa3a81b78607"].url}),b.a.createElement("img",{className:"ling_qu_qia_pianq ",src:a}),b.a.createElement("img",{className:"an_niud test-md20",onClick:function(){return e.gotoPage()},src:this.state.resList["d542fb28-5d76-4a4b-81aa-1128d3d4b79b"].url}),b.a.createElement("span",{className:"nin_de_hao_youxx_song_nin_yi_zhang_qia_piany "},"您的好友",r,"送您一张卡片")):null,"receive"==n?b.a.createElement("div",{className:"zeng_song_qia_pian "},b.a.createElement("img",{className:"bei_jing_kuanga ",src:this.state.resList["80b5a11f-d662-461c-826a-aa3a81b78607"].url}),b.a.createElement("img",{className:"suo_yao_qia_pian ",src:a}),b.a.createElement("span",{className:"nin_de_hao_youxx_xiang_nin_suo_yao_yi_zhang_qia_pianwq "},"您的好友",r,"向您索要一张卡片"),b.a.createElement("img",{className:"zeng_song_an_niu test-md21",onClick:function(){return e.gotoPage()},src:this.state.resList["8b9b2997-e491-4dee-a123-4dfede27d34b"].url})):null)}}]),a}(l.Component);function $(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=p()(e);if(t){var r=p()(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return d()(this,n)}}h.MOCK_STATUS&&n(!function(){var e=new Error("Cannot find module '../mock/index'");throw e.code="MODULE_NOT_FOUND",e}()),v()({show:k,click:k});var H=function(e){s()(n,e);var t=$(n);function n(){return r()(this,n),t.apply(this,arguments)}return o()(n,[{key:"render",value:function(){return b.a.createElement(Z,null)}}]),n}(l.Component);g.a.render(b.a.createElement(H,null),document.getElementById("root"))},mPlr:function(e,t,n){var a=n("LboF"),r=n("IUt0");"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var c={insert:"head",singleton:!1};a(r,c);e.exports=r.locals||{}}},[["k7yg",1,2]]]);
\ No newline at end of file
!function(e){function r(r){for(var n,a,l=r[0],p=r[1],i=r[2],f=0,s=[];f<l.length;f++)a=l[f],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&s.push(o[a][0]),o[a]=0;for(n in p)Object.prototype.hasOwnProperty.call(p,n)&&(e[n]=p[n]);for(c&&c(r);s.length;)s.shift()();return u.push.apply(u,i||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var p=t[l];0!==o[p]&&(n=!1)}n&&(u.splice(r--,1),e=a(a.s=t[0]))}return e}var n={},o={1:0},u=[];function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.m=e,a.c=n,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,r){if(1&r&&(e=a(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)a.d(t,n,function(r){return e[r]}.bind(null,n));return t},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="//yun.duiba.com.cn/spark/v2/sparkproject-1600762316494";var l=window.webpackJsonp=window.webpackJsonp||[],p=l.push.bind(l);l.push=r,l=l.slice();for(var i=0;i<l.length;i++)r(l[i]);var c=p;t()}([]);
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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