获得过 0 次赞
回答过的问题获得 0 次赞
分享过的文章/案例获得 0 次赞
评论与回复获得 0 次赞
可以用throw new Error(); Object.keys(data).map(item => { if (!data[item]) throw new Error('参数不全'); })
在小程序WXML的JS文件开发时使用return不能够停止运行吗?await wx.cloud.callFunction({ name: 'create', data: { type: 'product', city: this.data.city, district: this.data.district } }).then(r => { console.log(r) order_id = r.result return <--------- }).catch(e => { modal.showCreateError() return <--------- }) 两个return测试都没法stop,程序一样照运行下去,有什麽方式强制stop呢? 因为我想控制条件然後强制stop呀!!!
2021-07-12