Skip to content

Commit

Permalink
update info
Browse files Browse the repository at this point in the history
  • Loading branch information
rainfu committed May 31, 2023
1 parent aaf5de3 commit f6e7bad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/panacea/version.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"version": "1.6.5",
"description": {
"en": "- Add backtest module\n- Opti trade\n- Bug fix",
"cn": "- 添加回测模块\n- 交易优化\n- Bug修复"
"en": "<ul><li>Add backtest module</li><li>Opti trade</li><li>Bug fix</li></ul>",
"cn": "<ul><li>添加回测模块</li><li>交易优化</li><li>Bug修复</li><ul>"
},
"downloadLink": "https://www.ciiat.com/download",
"enforce":true
Expand Down
3 changes: 3 additions & 0 deletions extensions/output/panacea/api/panacea.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const checkVersion = (message, cb) => {
let versionObj = require("../../../../data/panacea/version.json");
console.log("checkVersion", message);
function versionCompare(oldVer, newVer) {
let v1s = oldVer.split(".");
let v2s = newVer.split(".");
Expand All @@ -8,11 +9,13 @@ const checkVersion = (message, cb) => {
return newV > oldV;
}
let hasNewVersion = versionCompare(message.data.version, versionObj.version);
console.log("hasNewVersion", hasNewVersion);
if (!hasNewVersion) return;
let data = {
action: message.action,
data: versionObj,
};
console.log("checkVersion ok", data);
if (cb) cb(data);
};
module.exports = {
Expand Down

0 comments on commit f6e7bad

Please sign in to comment.