From bd6ff8feb4f3a7579fac0bcae7d6d8bd748635a2 Mon Sep 17 00:00:00 2001 From: Eason010212 <1371033826@qq.com> Date: Sat, 25 Feb 2023 10:53:16 +0800 Subject: [PATCH] Fix bug: ip localization Fix bug: prevent default submit event of projectCreationForm --- pkg_tools/linux-arm64-pkg.sh | 5 +++-- src/ejs/host.ejs | 3 --- src/ejs/observe.ejs | 3 --- src/ejs/projects.ejs | 3 --- src/js/MixIO.js | 18 ++---------------- src/js/projects.js | 7 +++++++ 6 files changed, 12 insertions(+), 27 deletions(-) diff --git a/pkg_tools/linux-arm64-pkg.sh b/pkg_tools/linux-arm64-pkg.sh index 9e5b1ad..2182d75 100644 --- a/pkg_tools/linux-arm64-pkg.sh +++ b/pkg_tools/linux-arm64-pkg.sh @@ -13,7 +13,7 @@ mkdir logs cd ../ chmod -R 777 mixio cd mixio -cd node_modules/cliff/node_modules/linuxston/lib/linuxston +cd node_modules/cliff/node_modules/winston/lib/winston find -name 'common.js' | xargs perl -pi -e 's|target.padLevels|false|g' cd ../../../../../../ cd src @@ -28,4 +28,5 @@ cd ../ pkg -t node16-linux-arm64 package.json mv -f mixio ../mixio_linux_arm64/mixio cd ../ -chmod -R 777 mixio_linux_arm64 \ No newline at end of file +chmod -R 777 mixio_linux_arm64 +tar -pzcvf mixio_linux_arm64.tar.gz mixio_linux_arm64 \ No newline at end of file diff --git a/src/ejs/host.ejs b/src/ejs/host.ejs index 76c3b27..4639045 100644 --- a/src/ejs/host.ejs +++ b/src/ejs/host.ejs @@ -36,9 +36,6 @@ - <% if (configs['OFFLINE_MODE']==false) { %> - - <% } %> diff --git a/src/ejs/observe.ejs b/src/ejs/observe.ejs index 0769b57..c86074b 100644 --- a/src/ejs/observe.ejs +++ b/src/ejs/observe.ejs @@ -36,9 +36,6 @@ - <% if (configs['OFFLINE_MODE']==false) { %> - - <% } %> diff --git a/src/ejs/projects.ejs b/src/ejs/projects.ejs index 08cd2b4..3771f0a 100644 --- a/src/ejs/projects.ejs +++ b/src/ejs/projects.ejs @@ -46,9 +46,6 @@ - <% if (configs['OFFLINE_MODE']==false) { %> - - <% } %> diff --git a/src/js/MixIO.js b/src/js/MixIO.js index 0bb6180..348a37d 100644 --- a/src/js/MixIO.js +++ b/src/js/MixIO.js @@ -4,22 +4,8 @@ * @Version 2.9.5 */ -curlong = undefined -curlati = undefined - -if(!OFFLINE_MODE) -{ - $(function(){ - $.ajax('//api.map.baidu.com/location/ip?ip='+returnCitySN.cip+'&ak='+BAIDU_MAP_AK+'&coor=bd09ll', - { - dataType: "jsonp", //指定服务器返回的数据类型 - success: function (res) { - curlong = res.content.point.x - curlati = res.content.point.y - } - }) - }) -} +curlong = 0 +curlati = 0 function MixIOLogicError(message){ this.message = message diff --git a/src/js/projects.js b/src/js/projects.js index a2e3730..4e76a59 100644 --- a/src/js/projects.js +++ b/src/js/projects.js @@ -2838,6 +2838,13 @@ function add_project() { content.append($("
" + JSLang[lang].createPrj + "
")) var form = $("