token支持环境变量输入 XM_SPORT_TOKEN

This commit is contained in:
lxk0301
2021-04-22 14:35:59 +08:00
parent 386286e226
commit d4181dba66

View File

@ -2,7 +2,7 @@
* @Author: LXK9301 https://github.com/LXK9301 * @Author: LXK9301 https://github.com/LXK9301
* @Date: 2020-11-01 13:43:28 * @Date: 2020-11-01 13:43:28
* @Last Modified by: LXK9301 * @Last Modified by: LXK9301
* @Last Modified time: 2020-11-03 13:43:28 * @Last Modified time: 2021-4-22 13:43:28
*/ */
/* /*
小米运动修改微信支付宝运动步数 小米运动修改微信支付宝运动步数
@ -54,7 +54,7 @@ function getToken() {
} }
async function start() { async function start() {
login_token = $.getdata('xmSportsToken') ? $.getdata('xmSportsToken') : login_token; login_token = $.isNode() ? (process.env.XM_SPORT_TOKEN ? process.env.XM_SPORT_TOKEN : login_token) : ($.getdata('xmSportsToken') ? $.getdata('xmSportsToken') : login_token);
// console.log(`login_token:::${login_token}`) // console.log(`login_token:::${login_token}`)
if (login_token) { if (login_token) {
await get_app_token(login_token); await get_app_token(login_token);