Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
jdFruitShareCodes.js 2.00 KB
Copy Edit Raw Blame History
lxk0301 authored 2021-02-22 11:37 . update
/*
东东农场互助码
此文件为Node.js专用。其他用户请忽略
支持京东N个账号
*/
//云服务器腾讯云函数等NOde.js用户在此处填写京东东农场的好友码。
// 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例
// 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2
let FruitShareCodes = [
'0a74407df5df4fa99672a037eec61f7e@dbb21614667246fabcfd9685b6f448f3@6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6@56db8e7bc5874668ba7d5195230d067a',//账号一的好友shareCode,不同好友中间用@符号隔开
'6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6@9c52670d52ad4e1a812f894563c746ea@8175509d82504e96828afc8b1bbb9cb3',//账号二的好友shareCode,不同好友中间用@符号隔开
]
// 从日志获取互助码
const logShareCodes = require('./utils/jdShareCodes');
if (logShareCodes.FRUITSHARECODES.length > 0 && !process.env.FRUITSHARECODES) {
process.env.FRUITSHARECODES = logShareCodes.FRUITSHARECODES.join('&');
}
// 判断github action里面是否有东东农场互助码
if (process.env.FRUITSHARECODES) {
if (process.env.FRUITSHARECODES.indexOf('&') > -1) {
console.log(`您的东东农场互助码选择的是用&隔开\n`)
FruitShareCodes = process.env.FRUITSHARECODES.split('&');
} else if (process.env.FRUITSHARECODES.indexOf('\n') > -1) {
console.log(`您的东东农场互助码选择的是用换行隔开\n`)
FruitShareCodes = process.env.FRUITSHARECODES.split('\n');
} else {
FruitShareCodes = process.env.FRUITSHARECODES.split();
}
} else if (process.env.JD_COOKIE) {
console.log(`由于您环境变量(FRUITSHARECODES)里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`)
}
for (let i = 0; i < FruitShareCodes.length; i++) {
const index = (i + 1 === 1) ? '' : (i + 1);
exports['FruitShareCode' + index] = FruitShareCodes[i];
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化