目录
- 方法1
- 方法2
- 最后
方法1
submitServie(){let self = this;if (!self.resultData.item && !self.resultData.subItem) {uni.showToast({title: '请选择服务分类',duration: 1000,icon: 'none'});return false;}uni.showModal({title: '提示',content: '确定提交?',cancelText: "取消", // 取消按钮的文字 confirmText: "确认", // 确认按钮的文字 showCancel: true, // 是否显示取消按钮,默认为 truesuccess: (res) => {if (res.confirm) {let flag = paramss;if (flag) {paramss.product_id = self.product_id;let url = 'supplier.Product/add';let param = {product_id: paramss.product_id,params: JSON.stringify(paramss)};if (self.product_id) {url = 'supplier.Product/edit';}self._post(url, param, res => {// uni.navigateBack();self.back();return;});}} else {// console.log('cancel') //点击取消之后执行的代码return;}}})}
方法2
submitServie(){let self = this;if (!self.isRead) {uni.showToast({title: '请同意并勾选协议内容',duration: 2000,icon: 'none'});return;}wx.showModal({title: '提示',content: '您确认开通吗?',success: function(o) {if (o.confirm) {uni.showLoading({title: '正在处理'});self._post('supplier.order/delivery', {order_id: item.order_id,express_id: item.express_id,express_no: item.express_no},function(res) {uni.hideLoading();self.showSuccess(res.msg);self.getData();});}}});}
最后
感觉文章好的话记得点个心心和关注和收藏,有错的地方麻烦指正一下,如果需要转载,请标明出处,多谢!!!