模拟器正常,手机进入开发版出错,使用的是miniprogramCI的方式发布新版本,报错如下
"(in promise) MiniProgramError\nCan't find variable: _i\nReferenceError: Can't find variable: _i\nat i (subPackages/subPackages/products/index/sna-detail/widgets/trend/index.js:580:48)\nat L (app-service.js:8276:4386)\nat (app-service.js:8276:4171)\nat L (app-service.js:8276:4386)\nat O (app-service.js:8276:5313)\nat (app-service.js:8276:3948)\nat asyncGeneratorStep (app-service.js:8228:58)\nat c (app-service.js:8228:295)\nat (WASubContext.js:1:48390)\nat n (WASubContext.js:1:24725)\nat (WASubContext.js:1:35176)\nat E (WASubContext.js:1:34908)\nat (WASubContext.js:1:34946)\nat f (WASubContext.js:1:123018)\nat (WASubContext.js:1:90292)\nat (WASubContext.js:1:118487)\nat p (WAServiceMainContext.js:1:121366)\nat (WAServiceMainContext.js:1:109651)\n_onNativeTimer@\nglobal code@"
一个方法里面多个for 循环遍历里面定义的i或者item变量相同导致的,换一下变量命名j就行了
通过定位,只在使用miniprogram-ci编译时出现报错