Commit c4fdb88a authored by wildfirecode13's avatar wildfirecode13

u

parent 8ca3aed9
{ {
"code": null, "code": null,
"data": 1, "data": 0,
"message": null, "message": null,
"success": true "success": true
} }
\ No newline at end of file
...@@ -9,7 +9,7 @@ import { IndexScene } from "./scenes/IndexScene"; ...@@ -9,7 +9,7 @@ import { IndexScene } from "./scenes/IndexScene";
import { NewbieScene } from "./scenes/NewbieScene"; import { NewbieScene } from "./scenes/NewbieScene";
import { ShareScene } from "./scenes/ShareScene"; import { ShareScene } from "./scenes/ShareScene";
import { SkinJson } from "./SkinJson"; import { SkinJson } from "./SkinJson";
import updateShare from "./share"; import updateShareFunc from "./share";
import { destroyWebNetData, sendWebNet, WebNetName } from "./WebNet"; import { destroyWebNetData, sendWebNet, WebNetName } from "./WebNet";
...@@ -78,7 +78,7 @@ export class Main { ...@@ -78,7 +78,7 @@ export class Main {
const alreadyAcquiredResult = await sendWebNet(WebNetName.alreadyAcquired) const alreadyAcquiredResult = await sendWebNet(WebNetName.alreadyAcquired)
if (!alreadyAcquiredResult.data) { if (!alreadyAcquiredResult.data) {
updateShare('inNewbieScene', ''); updateShareFunc('inNewbieScene', '');
changeScene(NewbieScene); changeScene(NewbieScene);
} }
else { else {
......
...@@ -5,7 +5,7 @@ import getObject from "../common/getObject"; ...@@ -5,7 +5,7 @@ import getObject from "../common/getObject";
import { ProgressBarS } from "../common/ProgressBarS"; import { ProgressBarS } from "../common/ProgressBarS";
import { showShareMask } from "../common/ShareMask"; import { showShareMask } from "../common/ShareMask";
import { IndexScene } from "../scenes/IndexScene"; import { IndexScene } from "../scenes/IndexScene";
import updateShare from "../share"; import updateShareFunc from "../share";
import { getPxTokenSave, sendWebNet, WebNetName } from "../WebNet"; import { getPxTokenSave, sendWebNet, WebNetName } from "../WebNet";
export class PrizePanel extends Panel { export class PrizePanel extends Panel {
amountTxt: FYGE.TextField; amountTxt: FYGE.TextField;
...@@ -43,7 +43,7 @@ export class PrizePanel extends Panel { ...@@ -43,7 +43,7 @@ export class PrizePanel extends Panel {
getPxTokenSave().then(token => { getPxTokenSave().then(token => {
sendWebNet(WebNetName.createItem,{token:token}).then(createItemResult => { sendWebNet(WebNetName.createItem,{token:token}).then(createItemResult => {
updateShare('inPrizePanel', createItemResult.data) updateShareFunc('inPrizePanel', createItemResult.data)
}); });
}) })
......
...@@ -14,7 +14,7 @@ import { DrawPanel } from '../panels/draw'; ...@@ -14,7 +14,7 @@ import { DrawPanel } from '../panels/draw';
import { RulePanel } from '../panels/rule'; import { RulePanel } from '../panels/rule';
import { ShareFailPanel } from '../panels/share_fail'; import { ShareFailPanel } from '../panels/share_fail';
import { ShareSuccessPanel } from '../panels/share_success'; import { ShareSuccessPanel } from '../panels/share_success';
import updateShare from '../share'; import updateShareFunc from '../share';
import { getPxTokenSave, getWebData, sendWebNet, WebNetName } from '../WebNet'; import { getPxTokenSave, getWebData, sendWebNet, WebNetName } from '../WebNet';
export class IndexScene extends Scene { export class IndexScene extends Scene {
...@@ -96,7 +96,7 @@ export class IndexScene extends Scene { ...@@ -96,7 +96,7 @@ export class IndexScene extends Scene {
// }, 1000); // }, 1000);
sendWebNet(WebNetName.carouselInfo).then(res => { sendWebNet(WebNetName.carouselInfo).then(res => {
console.log('carouselInfo ', res);
const template = '{phone}邀请1位好友,获得了{amount}体验金'; const template = '{phone}邀请1位好友,获得了{amount}体验金';
const datas = res.data.map(item => { const datas = res.data.map(item => {
...@@ -115,7 +115,7 @@ export class IndexScene extends Scene { ...@@ -115,7 +115,7 @@ export class IndexScene extends Scene {
this.updateIndexUI(myWalletResult.data); this.updateIndexUI(myWalletResult.data);
getPxTokenSave().then(token => { getPxTokenSave().then(token => {
sendWebNet(WebNetName.createItem, { token: token }).then(createItemResult => { sendWebNet(WebNetName.createItem, { token: token }).then(createItemResult => {
updateShare('inIndexScene', createItemResult.data,) updateShareFunc('inIndexScene', createItemResult.data)
}); });
}) })
......
...@@ -60,7 +60,6 @@ export class NewbieScene extends Scene { ...@@ -60,7 +60,6 @@ export class NewbieScene extends Scene {
super.initUi(); super.initUi();
sendWebNet(WebNetName.carouselInfo).then(res => { sendWebNet(WebNetName.carouselInfo).then(res => {
console.log('carouselInfo ', res);
const template = '{phone}邀请了1位好友,获得了{amount}体验金'; const template = '{phone}邀请了1位好友,获得了{amount}体验金';
const datas = res.data.map(item => { const datas = res.data.map(item => {
......
...@@ -33,8 +33,7 @@ export class ShareScene extends Scene { ...@@ -33,8 +33,7 @@ export class ShareScene extends Scene {
const query = getQueryParams(); const query = getQueryParams();
sendWebNet(WebNetName.carouselInfo).then(res => { sendWebNet(WebNetName.carouselInfo).then(res => {
console.log('carouselInfo ', res);
const template = '{phone}邀请1位好友,获得了{amount}体验金'; const template = '{phone}邀请1位好友,获得了{amount}体验金';
const datas = res.data.map(item => { const datas = res.data.map(item => {
let str = template.replace('{phone}', item.nickname); let str = template.replace('{phone}', item.nickname);
......
...@@ -4,12 +4,21 @@ ...@@ -4,12 +4,21 @@
// } // }
import { start, WeixinMini } from '@spark/share' import { start, WeixinMini,updateShare } from '@spark/share'
start([WeixinMini], (way, success, payload) => { start([WeixinMini], (way, success, payload) => {
console.log('分享' + success ? '成功' : '失败') console.log('分享' + success ? '成功' : '失败')
}) });
const updateShare=(...args)=>{} const updateShareFunc=(type, code)=>{
export default updateShare console.log('updateShare', 'type=', type, 'code=', code)
\ No newline at end of file updateShare({
title: 'title', //分享标题
content: 'content', //分享内容
url: 'url', //分享链接
thumbnail: 'thumbnail', //分享缩略图
});
}
export default updateShareFunc;
\ No newline at end of file
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