function findGoods(goodsList, id) { // 初始化一个变量来存储找到的商品 var found = null; // 遍历商品列表以查找具有指定ID的商品 for (var i = 0; i < goodsList.length; i++) { if (goodsList[i].id === id) { found = goodsList[i]; break; } } // 如果找到了商品,返回商品的照片 if (found !== null) { return found; } // 如果没有找到,返回undefined return undefined; } module.exports = { findGoods: findGoods, } {{item.name}} 规格:{{item.spec}} {{findGoods.findGoods(goods.goodsList, item.id).orderPayWay!=2?'¥':''}}{{findGoods.findGoods(goods.goodsList, item.id).wisdGoodsSpec.specBulyPrice==null?findGoods.findGoods(goods.goodsList, item.id).wisdGoodsSpec.specPrice:findGoods.findGoods(goods.goodsList, item.id).wisdGoodsSpec.specBulyPrice}}{{findGoods.findGoods(goods.goodsList, item.id).orderPayWay!=2?'':'积分'}} ¥0 x{{item.num}} {{item.goodsName}} 规格:{{item.wisdGoodsSpec.specName}} {{goods.orderPayWay!=2?'¥':''}}{{item.wisdGoodsSpec.specBulyPrice==null?item.wisdGoodsSpec.specPrice:item.wisdGoodsSpec.specBulyPrice}}{{goods.orderPayWay!=2?'':'积分'}} ¥0 x{{item.goodsNum}} 退款金额:{{goods.orderActualPay}} 退款金额:{{goods.orderOtherPay}}积分 退款金额:套餐券1张 退款金额:{{goods.orderActualPay}} {{goods.orderPayWay==4?'现金券':'折扣券'}}:{{goods.orderOtherPay}} {{sq==1?'退货':'换货'}}说明: 上传凭证(不超过4张,长按删除) 提交申请