提交 03beddee 编写于 作者: AndroidLeaves's avatar AndroidLeaves

update

上级 1f5737cf
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
// icon-color: pink; icon-glyph: feather-alt; // icon-color: pink; icon-glyph: feather-alt;
/** /**
* Author:LSP * Author:LSP
* Date:2023-02-13 * Date:2023-03-03
*/ */
// ------------------------------------------------------- // -------------------------------------------------------
// 是否是开发环境,配合手机端调试使用,正式发布设置为false // 是否是开发环境,配合手机端调试使用,正式发布设置为false
const isDev = false; const isDev = false;
const dependencyLSP = '20230204'; const dependencyLSP = '20230228';
console.log(`开发环境 👉👉👉👉👉 ${isDev ? 'DEV' : 'RELEASE'}`); console.log(`开发环境 👉👉👉👉👉 ${isDev ? 'DEV' : 'RELEASE'}`);
console.log(`----------------------------------------`); console.log(`----------------------------------------`);
// 分支 // 分支
...@@ -200,6 +200,7 @@ class Widget extends BaseWidget { ...@@ -200,6 +200,7 @@ class Widget extends BaseWidget {
this.jdNum = this.useFileManager().readStringCache('jdBean'); this.jdNum = this.useFileManager().readStringCache('jdBean');
this.jdNumChange = true; this.jdNumChange = true;
this.vSpacer = 0; this.vSpacer = 0;
this.useFruitInfoCache = true;
} }
async getAppViewOptions() { async getAppViewOptions() {
...@@ -1157,6 +1158,7 @@ class Widget extends BaseWidget { ...@@ -1157,6 +1158,7 @@ class Widget extends BaseWidget {
fruitInfoFun = async () => { fruitInfoFun = async () => {
const url = 'https://api.m.jd.com/client.action?functionId=initForFarm'; const url = 'https://api.m.jd.com/client.action?functionId=initForFarm';
const options = { const options = {
useCache: this.useFruitInfoCache,
body: 'body=version:4&appid=wh5&clientVersion=9.1.0', body: 'body=version:4&appid=wh5&clientVersion=9.1.0',
headers: { headers: {
...this.defaultHeaders ...this.defaultHeaders
...@@ -1169,9 +1171,11 @@ class Widget extends BaseWidget { ...@@ -1169,9 +1171,11 @@ class Widget extends BaseWidget {
const { treeState, name, goodsImage, treeTotalEnergy, treeEnergy, simpleName } = farmUserPro; const { treeState, name, goodsImage, treeTotalEnergy, treeEnergy, simpleName } = farmUserPro;
let percent = '--'; let percent = '--';
if (treeState == 2 || treeState == 3) { if (treeState == 2 || treeState == 3) {
this.useFruitInfoCache = true;
percent = "100%"; percent = "100%";
this.notify('东东农场', `⊱${simpleName}⊰可以兑换啦~`); this.notify('东东农场', `⊱${simpleName}⊰可以兑换啦~`);
} else { } else {
this.useFruitInfoCache = false;
percent = Math.floor((treeEnergy / treeTotalEnergy) * 100) + "%"; percent = Math.floor((treeEnergy / treeTotalEnergy) * 100) + "%";
} }
this.fruit = { this.fruit = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册