Commit 419adba5 authored by wildfirecode13's avatar wildfirecode13

1

parent e75acff8
...@@ -8,8 +8,12 @@ ...@@ -8,8 +8,12 @@
"tb": "spark build --type taobao" "tb": "spark build --type taobao"
}, },
"dependencies": { "dependencies": {
"@spark/api-base": "^1.0.11",
"@spark/projectx": "^1.0.3",
"@spark/share": "^1.0.29",
"axios": "^0.19.2", "axios": "^0.19.2",
"css-loader": "^3.6.0", "css-loader": "^3.6.0",
"duiba-utils": "^1.0.2",
"fyge-tbmini": "^1.3.1", "fyge-tbmini": "^1.3.1",
"postcss-loader": "^3.0.0", "postcss-loader": "^3.0.0",
"prettier": "^2.0.5", "prettier": "^2.0.5",
...@@ -19,11 +23,8 @@ ...@@ -19,11 +23,8 @@
"react-redux": "^5.0.7", "react-redux": "^5.0.7",
"redux": "^4.0.0", "redux": "^4.0.0",
"redux-thunk": "^2.3.0", "redux-thunk": "^2.3.0",
"style-loader": "^1.2.1",
"spark-utils": "^0.0.12", "spark-utils": "^0.0.12",
"duiba-utils": "^1.0.2", "style-loader": "^1.2.1"
"@spark/api-base": "^1.0.11",
"@spark/projectx": "^1.0.3"
}, },
"devDependencies": { "devDependencies": {
"mockjs": "^1.1.0" "mockjs": "^1.1.0"
......
...@@ -11,7 +11,14 @@ ...@@ -11,7 +11,14 @@
<script src="//yun.duiba.com.cn/js-libs/rem/1.1.0/rem.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 src="//yun.duiba.com.cn/h5/lib/zepto.min.js"></script>
<script> <script>
window.url = 'https://baidu.com' window.url = 'https://baidu.com';
window.shareimg = 'https://yun.duiba.com.cn/spark/assets/e7bec756134eaca143ea54e9f6856b6a6e10d33f.png';
window.sharetitle = '欢趣专区全新升级,快来看看吧';
window.sharedesc = '养鸡养牛还能兑换更多好礼';
function getApp() { function getApp() {
return { return {
cloud: {}, cloud: {},
......
...@@ -7,6 +7,21 @@ import MD from '../MD'; ...@@ -7,6 +7,21 @@ import MD from '../MD';
MD(); MD();
//此处为spark-cli动态生成 //此处为spark-cli动态生成
import Share from "./pages/share/share.jsx"; import Share from "./pages/share/share.jsx";
import {Weixin,start,updateShare} from '@spark/share'
start([Weixin], (success)=>{
//分享结果回调, success为是否成功
});
//更新分享内容,多用于被动式分享,比如微信
updateShare({
title: window.sharetitle, //分享标题
content: window.sharedesc, //分享内容
url: location.href, //分享链接
thumbnail: window.shareimg, //分享缩略图
});
class App extends Component { class App extends Component {
render() { render() {
......
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