var imglist=JSON.parse(input.imglist?input.imglist:'[]');
//正则匹配文件名
var backgroundImageRegex=/(?<=attname=).+(?=&e)/;
var test="";
//文件名字拼接
for( var key in imglist){
test+=decodeURI(imglist[key].match(backgroundImageRegex))+"#";;
}
output={imgurl_star:test}
收藏了
可以用,配置的时候,要把获取动态的地方先注释了,不然后面的节点获取不到这个 JS 的值。
ASH 2022-08-17 13:27:35我这边测试,是不是我的版本低了
代码错误
(node:890) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token T in JSON at position 0 at JSON.parse (
) at API (api.js:3:18) at Object. (api.js:12:1) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) at startup (internal/bootstrap/node.js:283:19)(node:890) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)(node:890) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
测试的话换位静态参数测试 ["http://xxx.com?attname=xxx.jpg&e=1600000000000"]
我这边测试,是不是我的版本低了
代码错误
(node:890) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token T in JSON at position 0 at JSON.parse (
代码错误
(node:890) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token T in JSON at position 0 at JSON.parse (