Commit 629a0b7a authored by wildfirecode13's avatar wildfirecode13

u

parent 4fbaa156
......@@ -29,7 +29,7 @@ init(window['CFG'].projectId, null,{
const isShare = () => {
const query = getQueryParams();
console.log('query', query);
return query && query.sxbankIsSharePage == 1;
return query && query.code;
};
/**
......@@ -92,7 +92,6 @@ export class Main {
const alreadyAcquiredResult = await sendWebNet(WebNetName.alreadyAcquired)
if (!alreadyAcquiredResult.data) {
updateShareFunc('inNewbieScene', '');
showWaiting();
await RES.loadGroup("svga");
console.log("svga加载完成");
......
......@@ -12,3 +12,5 @@ export const getShareUrl = (queryParams) => {
export const getAutoPrizeUrl = () => {
return getShareUrl({autoprize:1})
}
export const getHomePage=()=>{return base}
\ No newline at end of file
......@@ -56,10 +56,24 @@ export class IndexScene extends Scene {
onclick_index_drawBtn() {
showWaiting();
getPxTokenSave().then(token => {
sendWebNet(WebNetName.withDraw, { token: token }).then(res => {
sendWebNet(WebNetName.withDraw, { token: token },null,true).then(res => {
hideWaiting();
if (res.success)
showPanel(DrawPanel, res.data);
else{
switch (res.code) {
case '200017':
showToast('已提现过了');
break;
case '200010':
showToast('收益未满7天不能提现');
break;
default:
showToast(res.message||'网络异常~')
break;
}
}
});
});
}
......
......@@ -10,6 +10,7 @@ import Mask from "../common/Mask";
import { hideShareMask } from "../common/ShareMask";
import { PrizePanel } from "../panels/prize";
import { RulePanel } from "../panels/rule";
import updateShareFunc from "../share";
import { getPxTokenSave, sendWebNet, WebNetName } from "../WebNet";
import { IndexScene } from "./IndexScene";
let prize;
......@@ -29,7 +30,7 @@ export class NewbieScene extends Scene {
async start(data) {
super.start();
updateShareFunc('inNewbieScene', '');
window['__loading__'].over();
const query = getQueryParams();
......
......@@ -4,22 +4,27 @@
// }
import { start, WeixinMini,updateShare } from '@spark/share'
import { getShareUrl } from './getShareUrl';
let ready=0;
import { start, WeixinMini, updateShare } from '@spark/share'
import { getHomePage, getShareUrl } from './getShareUrl';
let ready = 0;
start([WeixinMini], (way, success, payload) => {
console.log('分享' + success ? '成功' : '失败');
ready=1;
ready = 1;
});
const updateShareFunc=(type, code )=>{
if(ready==0)
const updateShareFunc = (type, code) => {
if (ready == 0)
console.log('分享组件没有准备成功');
console.log('updateShare', 'type=', type, 'ready=',ready,'url=', getShareUrl({code:code,sxbankIsSharePage:1}));
let url = getHomePage();
if(code) {
url = getShareUrl({ code: code })
}
console.log('updateShare', 'type=', type, 'ready=', ready, 'url=', url);
updateShare({
title: 'title', //分享标题
content: 'content', //分享内容
url: 'url', //分享链接
url: url, //分享链接
thumbnail: 'thumbnail', //分享缩略图
});
......
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