Commit 681b143e authored by wjf's avatar wjf

l

parent de939ebd
...@@ -108,7 +108,7 @@ export class Tools { ...@@ -108,7 +108,7 @@ export class Tools {
*/ */
public static consumerTools(type: PropType): Promise<boolean> { public static consumerTools(type: PropType): Promise<boolean> {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
sendTbNet(TbNetName.consumerTools, {type}, (s, res) => { sendTbNet(TbNetName.consumerTools, { type }, (s, res) => {
if (s) { if (s) {
//修改道具数量 //修改道具数量
this.gameData.tools = res.data.tools; this.gameData.tools = res.data.tools;
...@@ -153,8 +153,8 @@ export class Tools { ...@@ -153,8 +153,8 @@ export class Tools {
this.gameData.tools = res.data.tools; this.gameData.tools = res.data.tools;
return true;//可根据gameData修改视图 return true;//可根据gameData修改视图
} else { } else {
//如果code积分不足,弹出赚积分弹窗 待写code TODO //如果code积分不足,弹出赚积分弹窗
if (res.code == "") { if (res.code == "730005") {
showPanel(CreditsOutPanel) showPanel(CreditsOutPanel)
} else { } else {
showToast(res.message || "网络开小差了,请重试") showToast(res.message || "网络开小差了,请重试")
...@@ -171,11 +171,11 @@ export class Tools { ...@@ -171,11 +171,11 @@ export class Tools {
var tbMy = my var tbMy = my
if (!tbMy) return; if (!tbMy) return;
//@ts-ignore //@ts-ignore
const {cloud} = getApp(); const { cloud } = getApp();
//测试地址//到时云存储传一个小json,,改路径 //测试地址//到时云存储传一个小json,,改路径
var url = "cloud://B4F0300E5148F478B506DEDC26EA4C6C//butterfly0.svga"; var url = "cloud://B4F0300E5148F478B506DEDC26EA4C6C//butterfly0.svga";
//获取临时地址 //获取临时地址
var urls = await cloud.file.getTempFileURL({fileId: [url]}) var urls = await cloud.file.getTempFileURL({ fileId: [url] })
url = urls[0].url.replace('-internal', ''); url = urls[0].url.replace('-internal', '');
tbMy.downloadFile({ tbMy.downloadFile({
url: url, url: url,
...@@ -184,10 +184,10 @@ export class Tools { ...@@ -184,10 +184,10 @@ export class Tools {
tbMy.getFileSystemManager().readFile({ tbMy.getFileSystemManager().readFile({
filePath: i, filePath: i,
// encoding: "utf8", // encoding: "utf8",
success: function(r) { success: function (r) {
}, },
fail: function(res) { fail: function (res) {
} }
}) })
...@@ -331,11 +331,11 @@ export class Tools { ...@@ -331,11 +331,11 @@ export class Tools {
showTime: number = 300 showTime: number = 300
) { ) {
Tween.get(target) Tween.get(target)
.set({alpha: 0, visible: true}) .set({ alpha: 0, visible: true })
.to({alpha: 1}, showTime, Ease.quadIn) .to({ alpha: 1 }, showTime, Ease.quadIn)
.wait(time) .wait(time)
.to({alpha: 0}, showTime, Ease.quadOut) .to({ alpha: 0 }, showTime, Ease.quadOut)
.set({alpha: 0, visible: false}) .set({ alpha: 0, visible: false })
.call(() => { .call(() => {
call(); call();
}); });
......
...@@ -17,7 +17,7 @@ export class CreditsOutPanel extends Panel { ...@@ -17,7 +17,7 @@ export class CreditsOutPanel extends Panel {
super.initEvents(); super.initEvents();
this.earnBtn.addEventListener(FYGE.MouseEvent.CLICK, () => { this.earnBtn.addEventListener(FYGE.MouseEvent.CLICK, () => {
Tools.btnDelay(this); Tools.btnDelay(this);
sendTbNet(TbNetName.navigateToOutside, { url: "" })//TODO 路径待写 sendTbNet(TbNetName.navigateToOutside, { url: "" })//TODO 赚积分路径待写
}, this) }, this)
} }
removeEvents() { removeEvents() {
......
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