Commit 1c02ebf9 authored by wildfirecode13's avatar wildfirecode13

u

parent 90c7686e
...@@ -37,6 +37,7 @@ function uploadSingleJs(url) { ...@@ -37,6 +37,7 @@ function uploadSingleJs(url) {
//单js文件上传 //单js文件上传
co(function* () { co(function* () {
const originPath = `/db_games/${url}/output.js`; const originPath = `/db_games/${url}/output.js`;
var client = new OSS({ var client = new OSS({
region: 'oss-cn-hangzhou', region: 'oss-cn-hangzhou',
accessKeyId: 'LTAI4Fw25WcfcGv7FvcHoiHK', accessKeyId: 'LTAI4Fw25WcfcGv7FvcHoiHK',
...@@ -51,6 +52,17 @@ function uploadSingleJs(url) { ...@@ -51,6 +52,17 @@ function uploadSingleJs(url) {
} }
if (originFile.status === 404) if (originFile.status === 404)
yield client.put(originPath, "./output.js"); yield client.put(originPath, "./output.js");
const originPath2 = `/db_games/${url}/output.js.map`;
var originFile2;
try {
originFile2 = yield client.head(originPath2);
} catch (error) {
originFile2 = error;
}
if (originFile2.status === 404)
yield client.put(originPath2, "./output.js.map");
}) })
} }
......
...@@ -18,7 +18,7 @@ import updateShareFunc from '../share'; ...@@ -18,7 +18,7 @@ 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 {
updateIndexUI({ experienceAmount, yesterdayIncome, sumIncome, sevenDayAnnualization, assistFriendNum, otherExperienceAmount,canWithdraw }) { updateIndexUI({ experienceAmount, yesterdayIncome, sumIncome, sevenDayAnnualization, assistFriendNum, otherExperienceAmount, canWithdraw }) {
getObject(this, 'index_experienceAmountTips').text = experienceAmount || "0"; getObject(this, 'index_experienceAmountTips').text = experienceAmount || "0";
getObject(this, 'index_sumIncomeTips').text = sumIncome || '0'; getObject(this, 'index_sumIncomeTips').text = sumIncome || '0';
getObject(this, 'index_sevenDayAnnualizationTips').text = sevenDayAnnualization; getObject(this, 'index_sevenDayAnnualizationTips').text = sevenDayAnnualization;
...@@ -47,7 +47,7 @@ export class IndexScene extends Scene { ...@@ -47,7 +47,7 @@ export class IndexScene extends Scene {
FYGE.Tween.get(__tmp__, { FYGE.Tween.get(__tmp__, {
loop: false, onChange: (param) => { loop: false, onChange: (param) => {
index_experienceAmountTips.text = Math.ceil(experienceAmount * __tmp__.a) + ''; index_experienceAmountTips.text = Math.ceil(experienceAmount * __tmp__.a) + '';
progressBar.value =percent*__tmp__.a; progressBar.value = percent * __tmp__.a;
} }
}).to({ a: 1 }, 700) }).to({ a: 1 }, 700)
} }
...@@ -102,16 +102,8 @@ export class IndexScene extends Scene { ...@@ -102,16 +102,8 @@ export class IndexScene extends Scene {
data = data || {}; data = data || {};
const { action, from } = data; const { action, from } = data;
console.log('IndexScene from=', from, 'action=', action); console.log('IndexScene from=', from, 'action=', action);
if (action == 'showSharePanel') {
this.showSharePanel();
}
// setTimeout(() => {
// showPanel(DrawPanel)
// }, 1000);
sendWebNet(WebNetName.carouselInfo).then(res => { sendWebNet(WebNetName.carouselInfo).then(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);
...@@ -129,7 +121,10 @@ export class IndexScene extends Scene { ...@@ -129,7 +121,10 @@ 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 => {
updateShareFunc('inIndexScene', createItemResult.data) updateShareFunc('inIndexScene', createItemResult.data);
if (action == 'showSharePanel') {
this.showSharePanel();
}
}); });
}) })
......
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