// pages/voyageManage/myBills/myBills.js const app = getApp() const { postApi } = require("../../../apis/api") Page({ data: { medias: [], voyageId: 0, trans: '', }, check(e) { let arr = this.data.currentBillItem.shipownerUploadFiles let { index } = e.currentTarget.dataset arr[index].checked = arr[index].checked ? false : true this.data.currentBillItem.shipownerUploadFiles = arr this.setData({ currentBillItem: this.data.currentBillItem }) }, onLoad(options) { let currentBillItem = app.globalData.currentBillItem this.setData({ currentBillItem, voyageId: options.id }) }, isTrue() { }, examineMedia() { let arr = this.data.currentBillItem.shipownerUploadFiles if (!arr.some((e) => { return e.checked })) { wx.showToast({ title: '至少选择一张单据', icon: "error" }) return } wx.navigateTo({ url: `/pages/voyageManage/myBills/examine/examine?id=${this.data.voyageId}`, }) }, onShareAppMessage() { } })