Commit 52af2663 authored by wildfirecode13's avatar wildfirecode13

1

parent 6d7894fc
{"view":{"children":[{"name":"share","properties":{"style":{"width":750,"height":1624,"position":"absolute"},"attrs":{},"className":""},"uuid":"56b8468a-451e-423d-bc93-843f74e35170","nodeType":"Div","children":[{"name":"bg","properties":{"style":{"width":750,"height":1624,"position":"absolute"},"attrs":{"source":"asset://64bd0c7b-cf6a-45da-847a-846866120f06"},"className":""},"uuid":"9c7a49b1-a443-4e35-a5e1-2939349f09e7","nodeType":"Image"},{"name":"share_btn","properties":{"style":{"width":446,"height":99,"left":152,"top":1136,"position":"absolute"},"attrs":{"source":"asset://53ff7051-7b71-49ad-ac7f-d35df1e135f0"},"className":""},"uuid":"566aad1b-c581-4e3c-87c6-c3a051656ec8","nodeType":"Image"}],"viewType":"Page"}]},"assets":[{"name":"bg","ext":".png","uuid":"64bd0c7b-cf6a-45da-847a-846866120f06","url":"https://yun.duiba.com.cn/spark/assets/f22ffa96142c33ea321a5d3bec383c2a6e09cee4.png"},{"name":"share_btn","ext":".png","uuid":"53ff7051-7b71-49ad-ac7f-d35df1e135f0","url":"https://yun.duiba.com.cn/spark/assets/eeea9e26e6010babeb918efe6595cf59ee774d18.png"}],"animations":[],"dependencies":{},"customModules":{},"type":"save dsljson"}
node_modules
dist
\ No newline at end of file
import MD from 'spark-utils/out/md/index.js';
let appId = CFG.appID;
const dcm = '202.' + CFG.projectId + '.0.0';
const domain = '//embedlog.duiba.com.cn';
let MDList = [
{
ele: `.test-md1`,
data: {
dpm: `${appId}.110.5.1`,
dcm,
domain,
appId
},
once: false
}
];
export default () =>
MD({
show: MDList, // 曝光
click: MDList // 点击
});
export const join = {
"success": true,
"data": {
message: "参与成功"
}
};
export * from './rule';
import { Random } from 'mockjs';
export const rule = {
"success": true,
"data": `活动规则: ${Random.cparagraph(20, 40)}`
};
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
},
post: {
[`/projectx/${projectId}/join.do`]: collect_0722.join
}
};
\ No newline at end of file
{
"name": "sparkproject-1608343653108",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@babel/runtime": {
"version": "7.12.5",
"resolved": "http://npm.dui88.com:80/@babel%2fruntime/-/runtime-7.12.5.tgz",
"integrity": "sha1-QQ5+SHRB4bNgwpvnFdhw2bmFiC4=",
"requires": {
"regenerator-runtime": "^0.13.4"
}
},
"@spark/api-base": {
"version": "1.0.23",
"resolved": "http://npm.dui88.com:80/@spark%2fapi-base/-/api-base-1.0.23.tgz",
"integrity": "sha512-tYDYq1aNQBNwBc8cFtd35yzb80qjBSQIibuF8ZImx4S1Z7cDcHLncrktcfg2nyqa6m+Z19h4UsJzWbvbPVv5UQ==",
"requires": {
"@spark/utils": "^1.0.22",
"@types/react": "^16.9.56",
"add": "^2.0.6",
"crypto-js": "^4.0.0",
"spark-wrapper-fyge": "^1.0.4",
"yarn": "^1.22.10"
}
},
"@spark/projectx": {
"version": "1.0.6",
"resolved": "http://npm.dui88.com:80/@spark%2fprojectx/-/projectx-1.0.6.tgz",
"integrity": "sha512-T8p/MnO2dcaL5V1muC2IM5+Qu/MsSv5EK3aIsb4IUh7Q1FlxLeVmaFLjihFIe0g+7sDdQZMQIuwKluGgxiETjg==",
"requires": {
"@types/react": "^16.9.56",
"spark-wrapper-fyge": "^1.0.4"
}
},
"@spark/utils": {
"version": "1.0.30",
"resolved": "http://npm.dui88.com:80/@spark%2futils/-/utils-1.0.30.tgz",
"integrity": "sha512-gS5wyIIIbDQw4I+pLB2KMMF9Gvdo2Gz/BCfpw3LoJUVfuEkhJdqtej/9xF+XozcU2YML7bWGRNAYf8CJLZxwgQ==",
"requires": {
"@types/crypto-js": "^4.0.1",
"@types/react": "^16.9.56",
"crypto-js": "^4.0.0",
"html2canvas": "^1.0.0-rc.7",
"spark-wrapper-fyge": "^1.0.4"
}
},
"@types/crypto-js": {
"version": "4.0.1",
"resolved": "http://npm.dui88.com:80/@types%2fcrypto-js/-/crypto-js-4.0.1.tgz",
"integrity": "sha1-OkvSRRiw5sWUDaTiZZ7rLvCAaWM="
},
"@types/json-schema": {
"version": "7.0.6",
"resolved": "http://npm.dui88.com:80/@types%2fjson-schema/-/json-schema-7.0.6.tgz",
"integrity": "sha1-9MfsQ+gbMZqYFRFQMXCfJph4kfA="
},
"@types/prop-types": {
"version": "15.7.3",
"resolved": "http://npm.dui88.com:80/@types%2fprop-types/-/prop-types-15.7.3.tgz",
"integrity": "sha1-KrDV2i5YFflLC51LldHl8kOrLKc="
},
"@types/react": {
"version": "16.14.2",
"resolved": "http://npm.dui88.com:80/@types%2freact/-/react-16.14.2.tgz",
"integrity": "sha1-hdzAlH0GRTSZI8BMzvYBihq3U4w=",
"requires": {
"@types/prop-types": "*",
"csstype": "^3.0.2"
}
},
"add": {
"version": "2.0.6",
"resolved": "http://npm.dui88.com:80/add/-/add-2.0.6.tgz",
"integrity": "sha1-JI8Kn25aUo7yKV2+7DBTITCuIjU="
},
"ajv": {
"version": "6.12.6",
"resolved": "http://npm.dui88.com:80/ajv/-/ajv-6.12.6.tgz",
"integrity": "sha1-uvWmLoArB9l3A0WG+MO69a3ybfQ=",
"requires": {
"fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2"
}
},
"ajv-errors": {
"version": "1.0.1",
"resolved": "http://npm.dui88.com:80/ajv-errors/-/ajv-errors-1.0.1.tgz",
"integrity": "sha1-81mGrOuRr63sQQL72FAUlQzvpk0="
},
"ajv-keywords": {
"version": "3.5.2",
"resolved": "http://npm.dui88.com:80/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
"integrity": "sha1-MfKdpatuANHC0yms97WSlhTVAU0="
},
"ansi-styles": {
"version": "3.2.1",
"resolved": "http://npm.dui88.com:80/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=",
"requires": {
"color-convert": "^1.9.0"
}
},
"argparse": {
"version": "1.0.10",
"resolved": "http://npm.dui88.com:80/argparse/-/argparse-1.0.10.tgz",
"integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=",
"requires": {
"sprintf-js": "~1.0.2"
}
},
"axios": {
"version": "0.19.2",
"resolved": "http://npm.dui88.com:80/axios/-/axios-0.19.2.tgz",
"integrity": "sha1-PqNsXYgY0NX4qKl6bTa4bNwAyyc=",
"requires": {
"follow-redirects": "1.5.10"
}
},
"base64-arraybuffer": {
"version": "0.2.0",
"resolved": "http://npm.dui88.com:80/base64-arraybuffer/-/base64-arraybuffer-0.2.0.tgz",
"integrity": "sha1-S5RPrAGRqlkHr+LYyZnMxXzoD0U="
},
"big.js": {
"version": "5.2.2",
"resolved": "http://npm.dui88.com:80/big.js/-/big.js-5.2.2.tgz",
"integrity": "sha1-ZfCvOC9Xi83HQr2cKB6cstd2gyg="
},
"caller-callsite": {
"version": "2.0.0",
"resolved": "http://npm.dui88.com:80/caller-callsite/-/caller-callsite-2.0.0.tgz",
"integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=",
"requires": {
"callsites": "^2.0.0"
}
},
"caller-path": {
"version": "2.0.0",
"resolved": "http://npm.dui88.com:80/caller-path/-/caller-path-2.0.0.tgz",
"integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=",
"requires": {
"caller-callsite": "^2.0.0"
}
},
"callsites": {
"version": "2.0.0",
"resolved": "http://npm.dui88.com:80/callsites/-/callsites-2.0.0.tgz",
"integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA="
},
"camelcase": {
"version": "5.3.1",
"resolved": "http://npm.dui88.com:80/camelcase/-/camelcase-5.3.1.tgz",
"integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA="
},
"chalk": {
"version": "2.4.2",
"resolved": "http://npm.dui88.com:80/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=",
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
},
"dependencies": {
"supports-color": {
"version": "5.5.0",
"resolved": "http://npm.dui88.com:80/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=",
"requires": {
"has-flag": "^3.0.0"
}
}
}
},
"color-convert": {
"version": "1.9.3",
"resolved": "http://npm.dui88.com:80/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=",
"requires": {
"color-name": "1.1.3"
}
},
"color-name": {
"version": "1.1.3",
"resolved": "http://npm.dui88.com:80/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
},
"commander": {
"version": "6.2.1",
"resolved": "http://npm.dui88.com:80/commander/-/commander-6.2.1.tgz",
"integrity": "sha1-B5LraC37wyWZm7K4T93duhEKxzw=",
"dev": true
},
"cosmiconfig": {
"version": "5.2.1",
"resolved": "http://npm.dui88.com:80/cosmiconfig/-/cosmiconfig-5.2.1.tgz",
"integrity": "sha1-BA9yaAnFked6F8CjYmykW08Wixo=",
"requires": {
"import-fresh": "^2.0.0",
"is-directory": "^0.3.1",
"js-yaml": "^3.13.1",
"parse-json": "^4.0.0"
}
},
"crypto-js": {
"version": "4.0.0",
"resolved": "http://npm.dui88.com:80/crypto-js/-/crypto-js-4.0.0.tgz",
"integrity": "sha1-KQSrJnep0EKFai6i74DekuSjbcw="
},
"css-line-break": {
"version": "1.1.1",
"resolved": "http://npm.dui88.com:80/css-line-break/-/css-line-break-1.1.1.tgz",
"integrity": "sha1-1em90peEAJnrBQPHMQ/TSSegJu8=",
"requires": {
"base64-arraybuffer": "^0.2.0"
}
},
"css-loader": {
"version": "3.6.0",
"resolved": "http://npm.dui88.com:80/css-loader/-/css-loader-3.6.0.tgz",
"integrity": "sha1-Lkssfm4tJ/jI8o9hv/zS5ske9kU=",
"requires": {
"camelcase": "^5.3.1",
"cssesc": "^3.0.0",
"icss-utils": "^4.1.1",
"loader-utils": "^1.2.3",
"normalize-path": "^3.0.0",
"postcss": "^7.0.32",
"postcss-modules-extract-imports": "^2.0.0",
"postcss-modules-local-by-default": "^3.0.2",
"postcss-modules-scope": "^2.2.0",
"postcss-modules-values": "^3.0.0",
"postcss-value-parser": "^4.1.0",
"schema-utils": "^2.7.0",
"semver": "^6.3.0"
}
},
"cssesc": {
"version": "3.0.0",
"resolved": "http://npm.dui88.com:80/cssesc/-/cssesc-3.0.0.tgz",
"integrity": "sha1-N3QZGZA7hoVl4cCep0dEXNGJg+4="
},
"csstype": {
"version": "3.0.5",
"resolved": "http://npm.dui88.com:80/csstype/-/csstype-3.0.5.tgz",
"integrity": "sha1-f97GoopnrhhkfFFmip/5W7L6e7g="
},
"debug": {
"version": "3.1.0",
"resolved": "http://npm.dui88.com:80/debug/-/debug-3.1.0.tgz",
"integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=",
"requires": {
"ms": "2.0.0"
}
},
"duiba-utils": {
"version": "1.0.4",
"resolved": "http://npm.dui88.com:80/duiba-utils/-/duiba-utils-1.0.4.tgz",
"integrity": "sha512-l3l5qW1I+qJfBiJ5Fttyl7VRyd1Q0m0K9ujoCg0mteFsVAqjCqwDwipj+ABeemOoR1QvVA3F/Aqi9az9pmYuSg=="
},
"emojis-list": {
"version": "3.0.0",
"resolved": "http://npm.dui88.com:80/emojis-list/-/emojis-list-3.0.0.tgz",
"integrity": "sha1-VXBmIEatKeLpFucariYKvf9Pang="
},
"error-ex": {
"version": "1.3.2",
"resolved": "http://npm.dui88.com:80/error-ex/-/error-ex-1.3.2.tgz",
"integrity": "sha1-tKxAZIEH/c3PriQvQovqihTU8b8=",
"requires": {
"is-arrayish": "^0.2.1"
}
},
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "http://npm.dui88.com:80/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
},
"esprima": {
"version": "4.0.1",
"resolved": "http://npm.dui88.com:80/esprima/-/esprima-4.0.1.tgz",
"integrity": "sha1-E7BM2z5sXRnfkatph6hpVhmwqnE="
},
"fast-deep-equal": {
"version": "3.1.3",
"resolved": "http://npm.dui88.com:80/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
"integrity": "sha1-On1WtVnWy8PrUSMlJE5hmmXGxSU="
},
"fast-json-stable-stringify": {
"version": "2.1.0",
"resolved": "http://npm.dui88.com:80/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
"integrity": "sha1-h0v2nG9ATCtdmcSBNBOZ/VWJJjM="
},
"follow-redirects": {
"version": "1.5.10",
"resolved": "http://npm.dui88.com:80/follow-redirects/-/follow-redirects-1.5.10.tgz",
"integrity": "sha1-e3qfmuov3/NnhqlP9kPtB/T/Xio=",
"requires": {
"debug": "=3.1.0"
}
},
"fyge": {
"version": "2.0.12",
"resolved": "http://npm.dui88.com:80/fyge/-/fyge-2.0.12.tgz",
"integrity": "sha512-83Mp6oKVNiEqrgzb1sq+XI7vzlicNAku276808n+OlpClOT4tFRLCVHDL0SORUQfC+mMEzXnQ2KCJ/3q+IoM6g==",
"requires": {
"duiba-utils": "^1.0.0"
}
},
"fyge-tbmini": {
"version": "1.4.8",
"resolved": "http://npm.dui88.com:80/fyge-tbmini/-/fyge-tbmini-1.4.8.tgz",
"integrity": "sha1-4qC9decrE6N7dWJPcB3BYJ7b7G8="
},
"has-flag": {
"version": "3.0.0",
"resolved": "http://npm.dui88.com:80/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
},
"hoist-non-react-statics": {
"version": "3.3.2",
"resolved": "http://npm.dui88.com:80/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",
"integrity": "sha1-7OCsr3HWLClpwuxZ/v9CpLGoW0U=",
"requires": {
"react-is": "^16.7.0"
}
},
"html2canvas": {
"version": "1.0.0-rc.7",
"resolved": "http://npm.dui88.com:80/html2canvas/-/html2canvas-1.0.0-rc.7.tgz",
"integrity": "sha1-cMFZzg5jlUqRFpUxiU0IrVYnrJg=",
"requires": {
"css-line-break": "1.1.1"
}
},
"icss-utils": {
"version": "4.1.1",
"resolved": "http://npm.dui88.com:80/icss-utils/-/icss-utils-4.1.1.tgz",
"integrity": "sha1-IRcLU3ie4nRHwvR91oMIFAP5pGc=",
"requires": {
"postcss": "^7.0.14"
}
},
"import-cwd": {
"version": "2.1.0",
"resolved": "http://npm.dui88.com:80/import-cwd/-/import-cwd-2.1.0.tgz",
"integrity": "sha1-qmzzbnInYShcs3HsZRn1PiQ1sKk=",
"requires": {
"import-from": "^2.1.0"
}
},
"import-fresh": {
"version": "2.0.0",
"resolved": "http://npm.dui88.com:80/import-fresh/-/import-fresh-2.0.0.tgz",
"integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=",
"requires": {
"caller-path": "^2.0.0",
"resolve-from": "^3.0.0"
}
},
"import-from": {
"version": "2.1.0",
"resolved": "http://npm.dui88.com:80/import-from/-/import-from-2.1.0.tgz",
"integrity": "sha1-M1238qev/VOqpHHUuAId7ja387E=",
"requires": {
"resolve-from": "^3.0.0"
}
},
"indexes-of": {
"version": "1.0.1",
"resolved": "http://npm.dui88.com:80/indexes-of/-/indexes-of-1.0.1.tgz",
"integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc="
},
"intersection-observer": {
"version": "0.11.0",
"resolved": "http://npm.dui88.com:80/intersection-observer/-/intersection-observer-0.11.0.tgz",
"integrity": "sha1-9OoGcHAyb2g5PuFhzAospMAEDG8="
},
"invariant": {
"version": "2.2.4",
"resolved": "http://npm.dui88.com:80/invariant/-/invariant-2.2.4.tgz",
"integrity": "sha1-YQ88ksk1nOHbYW5TgAjSP/NRWOY=",
"requires": {
"loose-envify": "^1.0.0"
}
},
"is-arrayish": {
"version": "0.2.1",
"resolved": "http://npm.dui88.com:80/is-arrayish/-/is-arrayish-0.2.1.tgz",
"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0="
},
"is-directory": {
"version": "0.3.1",
"resolved": "http://npm.dui88.com:80/is-directory/-/is-directory-0.3.1.tgz",
"integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE="
},
"js-tokens": {
"version": "4.0.0",
"resolved": "http://npm.dui88.com:80/js-tokens/-/js-tokens-4.0.0.tgz",
"integrity": "sha1-GSA/tZmR35jjoocFDUZHzerzJJk="
},
"js-yaml": {
"version": "3.14.1",
"resolved": "http://npm.dui88.com:80/js-yaml/-/js-yaml-3.14.1.tgz",
"integrity": "sha1-2ugS/bOCX6MGYJqHFzg8UMNqBTc=",
"requires": {
"argparse": "^1.0.7",
"esprima": "^4.0.0"
}
},
"json-parse-better-errors": {
"version": "1.0.2",
"resolved": "http://npm.dui88.com:80/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
"integrity": "sha1-u4Z8+zRQ5pEHwTHRxRS6s9yLyqk="
},
"json-schema-traverse": {
"version": "0.4.1",
"resolved": "http://npm.dui88.com:80/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA="
},
"json5": {
"version": "1.0.1",
"resolved": "http://npm.dui88.com:80/json5/-/json5-1.0.1.tgz",
"integrity": "sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=",
"requires": {
"minimist": "^1.2.0"
}
},
"loader-utils": {
"version": "1.4.0",
"resolved": "http://npm.dui88.com:80/loader-utils/-/loader-utils-1.4.0.tgz",
"integrity": "sha1-xXm140yzSxp07cbB+za/o3HVphM=",
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^1.0.1"
}
},
"loose-envify": {
"version": "1.4.0",
"resolved": "http://npm.dui88.com:80/loose-envify/-/loose-envify-1.4.0.tgz",
"integrity": "sha1-ce5R+nvkyuwaY4OffmgtgTLTDK8=",
"requires": {
"js-tokens": "^3.0.0 || ^4.0.0"
}
},
"minimist": {
"version": "1.2.5",
"resolved": "http://npm.dui88.com:80/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI="
},
"mockjs": {
"version": "1.1.0",
"resolved": "http://npm.dui88.com:80/mockjs/-/mockjs-1.1.0.tgz",
"integrity": "sha1-5qDDeOkZBtuv8gkRzAJzs8fXWwY=",
"dev": true,
"requires": {
"commander": "*"
}
},
"ms": {
"version": "2.0.0",
"resolved": "http://npm.dui88.com:80/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"normalize-path": {
"version": "3.0.0",
"resolved": "http://npm.dui88.com:80/normalize-path/-/normalize-path-3.0.0.tgz",
"integrity": "sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU="
},
"object-assign": {
"version": "4.1.1",
"resolved": "http://npm.dui88.com:80/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
},
"parse-json": {
"version": "4.0.0",
"resolved": "http://npm.dui88.com:80/parse-json/-/parse-json-4.0.0.tgz",
"integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
"requires": {
"error-ex": "^1.3.1",
"json-parse-better-errors": "^1.0.1"
}
},
"postcss": {
"version": "7.0.35",
"resolved": "http://npm.dui88.com:80/postcss/-/postcss-7.0.35.tgz",
"integrity": "sha1-0r4AuZj38hHYonaXQHny6SuXDiQ=",
"requires": {
"chalk": "^2.4.2",
"source-map": "^0.6.1",
"supports-color": "^6.1.0"
}
},
"postcss-load-config": {
"version": "2.1.2",
"resolved": "http://npm.dui88.com:80/postcss-load-config/-/postcss-load-config-2.1.2.tgz",
"integrity": "sha1-xepQTyxK7zPHNZo03jVzdyrXUCo=",
"requires": {
"cosmiconfig": "^5.0.0",
"import-cwd": "^2.0.0"
}
},
"postcss-loader": {
"version": "3.0.0",
"resolved": "http://npm.dui88.com:80/postcss-loader/-/postcss-loader-3.0.0.tgz",
"integrity": "sha1-a5eUPkfHLYRfqeA/Jzdz1OjdbC0=",
"requires": {
"loader-utils": "^1.1.0",
"postcss": "^7.0.0",
"postcss-load-config": "^2.0.0",
"schema-utils": "^1.0.0"
},
"dependencies": {
"schema-utils": {
"version": "1.0.0",
"resolved": "http://npm.dui88.com:80/schema-utils/-/schema-utils-1.0.0.tgz",
"integrity": "sha1-C3mpMgTXtgDUsoUNH2bCo0lRx3A=",
"requires": {
"ajv": "^6.1.0",
"ajv-errors": "^1.0.0",
"ajv-keywords": "^3.1.0"
}
}
}
},
"postcss-modules-extract-imports": {
"version": "2.0.0",
"resolved": "http://npm.dui88.com:80/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz",
"integrity": "sha1-gYcZoa4doyX5gyRGsBE27rSTzX4=",
"requires": {
"postcss": "^7.0.5"
}
},
"postcss-modules-local-by-default": {
"version": "3.0.3",
"resolved": "http://npm.dui88.com:80/postcss-modules-local-by-default/-/postcss-modules-local-by-default-3.0.3.tgz",
"integrity": "sha1-uxTgzHgnnVBNvcv9fgyiiZP/u7A=",
"requires": {
"icss-utils": "^4.1.1",
"postcss": "^7.0.32",
"postcss-selector-parser": "^6.0.2",
"postcss-value-parser": "^4.1.0"
}
},
"postcss-modules-scope": {
"version": "2.2.0",
"resolved": "http://npm.dui88.com:80/postcss-modules-scope/-/postcss-modules-scope-2.2.0.tgz",
"integrity": "sha1-OFyuATzHdD9afXYC0Qc6iequYu4=",
"requires": {
"postcss": "^7.0.6",
"postcss-selector-parser": "^6.0.0"
}
},
"postcss-modules-values": {
"version": "3.0.0",
"resolved": "http://npm.dui88.com:80/postcss-modules-values/-/postcss-modules-values-3.0.0.tgz",
"integrity": "sha1-W1AA1uuuKbQlUwG0o6VFdEI+fxA=",
"requires": {
"icss-utils": "^4.0.0",
"postcss": "^7.0.6"
}
},
"postcss-selector-parser": {
"version": "6.0.4",
"resolved": "http://npm.dui88.com:80/postcss-selector-parser/-/postcss-selector-parser-6.0.4.tgz",
"integrity": "sha1-VgdaE4CgRgTDiwY+p3Z6Epr1wrM=",
"requires": {
"cssesc": "^3.0.0",
"indexes-of": "^1.0.1",
"uniq": "^1.0.1",
"util-deprecate": "^1.0.2"
}
},
"postcss-value-parser": {
"version": "4.1.0",
"resolved": "http://npm.dui88.com:80/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz",
"integrity": "sha1-RD9qIM7WSBor2k+oUypuVdeJoss="
},
"prettier": {
"version": "2.2.1",
"resolved": "http://npm.dui88.com:80/prettier/-/prettier-2.2.1.tgz",
"integrity": "sha1-eVoaeN1S8HPaDNQrIfnJE4GSP/U="
},
"prop-types": {
"version": "15.7.2",
"resolved": "http://npm.dui88.com:80/prop-types/-/prop-types-15.7.2.tgz",
"integrity": "sha1-UsQedbjIfnK52TYOAga5ncv/psU=",
"requires": {
"loose-envify": "^1.4.0",
"object-assign": "^4.1.1",
"react-is": "^16.8.1"
}
},
"punycode": {
"version": "2.1.1",
"resolved": "http://npm.dui88.com:80/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha1-tYsBCsQMIsVldhbI0sLALHv0eew="
},
"qs": {
"version": "6.9.4",
"resolved": "http://npm.dui88.com:80/qs/-/qs-6.9.4.tgz",
"integrity": "sha1-kJCykNH5FyjTwi5UhDykSupatoc="
},
"react": {
"version": "16.14.0",
"resolved": "http://npm.dui88.com:80/react/-/react-16.14.0.tgz",
"integrity": "sha1-lNd23dCqo32j7aj8W2sYpMmjEU0=",
"requires": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
"prop-types": "^15.6.2"
}
},
"react-dom": {
"version": "16.14.0",
"resolved": "http://npm.dui88.com:80/react-dom/-/react-dom-16.14.0.tgz",
"integrity": "sha1-etg47Cmnd/s8dcOhkPZhz5Kri4k=",
"requires": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
"prop-types": "^15.6.2",
"scheduler": "^0.19.1"
}
},
"react-is": {
"version": "16.13.1",
"resolved": "http://npm.dui88.com:80/react-is/-/react-is-16.13.1.tgz",
"integrity": "sha1-eJcppNw23imZ3BVt1sHZwYzqVqQ="
},
"react-lifecycles-compat": {
"version": "3.0.4",
"resolved": "http://npm.dui88.com:80/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz",
"integrity": "sha1-TxonOv38jzSIqMUWv9p4+HI1I2I="
},
"react-redux": {
"version": "5.1.2",
"resolved": "http://npm.dui88.com:80/react-redux/-/react-redux-5.1.2.tgz",
"integrity": "sha1-sZz54h1pRCJye/eY6TSpFsQID1c=",
"requires": {
"@babel/runtime": "^7.1.2",
"hoist-non-react-statics": "^3.3.0",
"invariant": "^2.2.4",
"loose-envify": "^1.1.0",
"prop-types": "^15.6.1",
"react-is": "^16.6.0",
"react-lifecycles-compat": "^3.0.0"
}
},
"redux": {
"version": "4.0.5",
"resolved": "http://npm.dui88.com:80/redux/-/redux-4.0.5.tgz",
"integrity": "sha1-TbXeWBbheJHeioDEJCMtBvBR2T8=",
"requires": {
"loose-envify": "^1.4.0",
"symbol-observable": "^1.2.0"
}
},
"redux-thunk": {
"version": "2.3.0",
"resolved": "http://npm.dui88.com:80/redux-thunk/-/redux-thunk-2.3.0.tgz",
"integrity": "sha1-UcLBmhhe1Rh6qpotCLZm0NZGdiI="
},
"regenerator-runtime": {
"version": "0.13.7",
"resolved": "http://npm.dui88.com:80/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
"integrity": "sha1-ysLazIoepnX+qrrriugziYrkb1U="
},
"resolve-from": {
"version": "3.0.0",
"resolved": "http://npm.dui88.com:80/resolve-from/-/resolve-from-3.0.0.tgz",
"integrity": "sha1-six699nWiBvItuZTM17rywoYh0g="
},
"scheduler": {
"version": "0.19.1",
"resolved": "http://npm.dui88.com:80/scheduler/-/scheduler-0.19.1.tgz",
"integrity": "sha1-Tz4u0sGn1laB9MhU+oxaHMtA8ZY=",
"requires": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1"
}
},
"schema-utils": {
"version": "2.7.1",
"resolved": "http://npm.dui88.com:80/schema-utils/-/schema-utils-2.7.1.tgz",
"integrity": "sha1-HKTzLRskxZDCA7jnpQvw6kzTlNc=",
"requires": {
"@types/json-schema": "^7.0.5",
"ajv": "^6.12.4",
"ajv-keywords": "^3.5.2"
}
},
"semver": {
"version": "6.3.0",
"resolved": "http://npm.dui88.com:80/semver/-/semver-6.3.0.tgz",
"integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0="
},
"source-map": {
"version": "0.6.1",
"resolved": "http://npm.dui88.com:80/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM="
},
"spark-utils": {
"version": "0.0.12",
"resolved": "http://npm.dui88.com:80/spark-utils/-/spark-utils-0.0.12.tgz",
"integrity": "sha512-30/JxohR2DlgT0cyBWvt+3w2Zz9JLHh8uMQd2q/Ufjhtb+QXHT0x0meuwUh7s6pHwHovI+ZqzepCcKs2OxR7LA==",
"requires": {
"intersection-observer": "^0.11.0",
"spark-wrapper-fyge": "^1.0.2"
}
},
"spark-wrapper-fyge": {
"version": "1.0.20",
"resolved": "http://npm.dui88.com:80/spark-wrapper-fyge/-/spark-wrapper-fyge-1.0.20.tgz",
"integrity": "sha512-dK4lNFkVdpEFpB5al/Gw/wzm0l1VoFIl8t7NheclFoWM71x8u3bAXTNBxP2enNeEwWrLkzCsjeplcryhNDYy1Q==",
"requires": {
"fyge": "^2.0.12"
}
},
"sprintf-js": {
"version": "1.0.3",
"resolved": "http://npm.dui88.com:80/sprintf-js/-/sprintf-js-1.0.3.tgz",
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
},
"style-loader": {
"version": "1.3.0",
"resolved": "http://npm.dui88.com:80/style-loader/-/style-loader-1.3.0.tgz",
"integrity": "sha1-gotKOzt+eqWEfOe66eh0USEUJJ4=",
"requires": {
"loader-utils": "^2.0.0",
"schema-utils": "^2.7.0"
},
"dependencies": {
"json5": {
"version": "2.1.3",
"resolved": "http://npm.dui88.com:80/json5/-/json5-2.1.3.tgz",
"integrity": "sha1-ybD3+pIzv+WAf+ZvzzpWF+1ZfUM=",
"requires": {
"minimist": "^1.2.5"
}
},
"loader-utils": {
"version": "2.0.0",
"resolved": "http://npm.dui88.com:80/loader-utils/-/loader-utils-2.0.0.tgz",
"integrity": "sha1-5MrOW4FtQloWa18JfhDNErNgZLA=",
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
}
}
},
"supports-color": {
"version": "6.1.0",
"resolved": "http://npm.dui88.com:80/supports-color/-/supports-color-6.1.0.tgz",
"integrity": "sha1-B2Srxpxj1ayELdSGfo0CXogN+PM=",
"requires": {
"has-flag": "^3.0.0"
}
},
"symbol-observable": {
"version": "1.2.0",
"resolved": "http://npm.dui88.com:80/symbol-observable/-/symbol-observable-1.2.0.tgz",
"integrity": "sha1-wiaIrtTqs83C3+rLtWFmBWCgCAQ="
},
"uniq": {
"version": "1.0.1",
"resolved": "http://npm.dui88.com:80/uniq/-/uniq-1.0.1.tgz",
"integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8="
},
"uri-js": {
"version": "4.4.0",
"resolved": "http://npm.dui88.com:80/uri-js/-/uri-js-4.4.0.tgz",
"integrity": "sha1-qnFCYd55PoqCNHp7zJznTobyhgI=",
"requires": {
"punycode": "^2.1.0"
}
},
"util-deprecate": {
"version": "1.0.2",
"resolved": "http://npm.dui88.com:80/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
},
"yarn": {
"version": "1.22.10",
"resolved": "http://npm.dui88.com:80/yarn/-/yarn-1.22.10.tgz",
"integrity": "sha1-yZ2qBiV8gPj6LD8UkHJOOUwmsYw="
}
}
}
{
"name": "sparkproject-1608343653108",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "spark dev --type h5",
"prod": "spark build --type h5 --env prod",
"tb": "spark build --type taobao"
},
"dependencies": {
"axios": "^0.19.2",
"css-loader": "^3.6.0",
"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",
"style-loader": "^1.2.1",
"spark-utils": "^0.0.12",
"duiba-utils": "^1.0.2",
"@spark/api-base": "^1.0.11",
"@spark/projectx": "^1.0.3"
},
"devDependencies": {
"mockjs": "^1.1.0"
}
}
<!DOCTYPE html>
<html lang="zh">
<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>React App</title>
<script src="getTokenKey" id="scriptkey"></script>
<script id="scriptjs" src="//yun.duiba.com.cn/js-libs/px-token/0.0.4/px-token.min.js"></script>
<script src="//yun.duiba.com.cn/js-libs/rem/1.1.0/rem.min.js"></script>
<script src="//yun.duiba.com.cn/h5/lib/zepto.min.js"></script>
<script>
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 = '${APPID}';
if (!getUrlParam("appID")) {
alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。")
}
</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: true,
PX2REM: true
};
const apiCfg = {
getRule:`projectRule.query`,
doJoin: {
uri: `join.do`,
method: "post"
},
}
export default apiCfg;
import apiCfg from './apicfg';
import {getPxToken} from "@spark/projectx";
import {callApi} from '@spark/api-base'
import {isFromShare, newUser} from 'duiba-utils';
let mergeData = {
user_type: newUser ? '0' : '1',
is_from_share: isFromShare ? '0' : '1',
}
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', headers, withToken, secret, secretKey} = value;
return {
uri,
method,
headers,
withToken,
secret,
secretKey,
}
} else {
console.error('getRequestParams: 传参有误');
}
}
function generateAPI(apiList) {
const api = {};
for (let key in apiList) {
let value = apiList[key];
const {method, uri, headers: mHeaders, withToken, secret, secretKey} = getRequestParams(value);
api[key] = async (params = {}, headers) => {
let token;
if (withToken) {
const {type, payload} = await getPxToken();
switch (type) {
case 'success':
token = payload.token;
break;
case 'failed':
location.reload();
break;
}
}
let mergedHeaders = {...mHeaders, ...headers}
if (withToken && token) {
params.token = token;
}
params = {...params, ...mergeData};
const result = await callApi(uri, params, method, mergedHeaders, false, secret, secretKey);
if (result.type === 'success') {
return result.payload;
}
throw new Error(result.payload);
}
}
return api;
}
import Qs from "qs";
import axios from "axios";
// 分享召回工具类
import { isFromShare, newUser } from 'duiba-utils';
let mergeData = {
user_type: newUser ? '0' : '1',
is_from_share: isFromShare ? '0' : '1',
_t: Date.now()
}
const TIMEOUT = 10000;
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 "./app.less";
import { MOCK_STATUS } from '../sparkrc';
MOCK_STATUS && (require('../mock/index'));
import MD from '../MD';
MD();
//此处为spark-cli动态生成
import Share from "./pages/share/share.jsx";
class App extends Component {
render() {
return (
<Share>请在app.jsx中指定首页</Share>
);
}
}
ReactDOM.render(<App />, document.getElementById("root"));
* {
margin: 0;
padding: 0;
}
html,
body {
font-size: 24px;
width: 100%;
height: 100%;
}
'use strict';
import React, { Component } from 'react';
import resList from '../../resconfig/resList';
//import API from '../../api';
import './share.less';
class Share extends Component {
constructor(props) {
super(props);
this.state = { resList: resList };
}
render() {
return (
<div className="share " uuid="56b8468a-451e-423d-bc93-843f74e35170">
<img
className="bg "
uuid="9c7a49b1-a443-4e35-a5e1-2939349f09e7"
src={this.state.resList['64bd0c7b-cf6a-45da-847a-846866120f06'].url}
/>
<img
className="share_btn "
uuid="566aad1b-c581-4e3c-87c6-c3a051656ec8"
src={this.state.resList['53ff7051-7b71-49ad-ac7f-d35df1e135f0'].url}
/>
</div>
);
}
}
export default Share;
.share {
width: 750px;
height: 1624px;
position: absolute;
.bg {
width: 750px;
height: 1624px;
position: absolute;
}
.share_btn {
width: 446px;
height: 99px;
left: 152px;
top: 1136px;
position: absolute;
}
}
/**
* 目前没有用到
* @param {*} resList
* @param {*} uuid
*/
const getSrcByUuid = (resList, uuid) => {
resList = resList || [];
for (let i = 0; i < resList.length; i++) {
if (resList[i].uuid == uuid) {
return resList[i].url
}
}
}
module.exports = {
getSrcByUuid
}
\ No newline at end of file
const resList = {
'64bd0c7b-cf6a-45da-847a-846866120f06': {
name: 'bg',
ext: '.png',
uuid: '64bd0c7b-cf6a-45da-847a-846866120f06',
url: 'https://yun.duiba.com.cn/spark/assets/f22ffa96142c33ea321a5d3bec383c2a6e09cee4.png',
},
'53ff7051-7b71-49ad-ac7f-d35df1e135f0': {
name: 'share_btn',
ext: '.png',
uuid: '53ff7051-7b71-49ad-ac7f-d35df1e135f0',
url: 'https://yun.duiba.com.cn/spark/assets/eeea9e26e6010babeb918efe6595cf59ee774d18.png',
},
};
export default resList;
{"proName":"icbcrpgshare1","proDesc":"","proPath":"/Users/wanghongyuan/icbcrpgshare1","createTime":1608343633642}
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