Prechádzať zdrojové kódy

update 代码优化

linweizeng 3 rokov pred
rodič
commit
6ba15fc02d
3 zmenil súbory, kde vykonal 12 pridanie a 12 odobranie
  1. 4 3
      pages/jiance/manyi.vue
  2. 1 1
      pages/jiance/order.vue
  3. 7 8
      pages/jiance/tousu.vue

+ 4 - 3
pages/jiance/manyi.vue

@@ -276,14 +276,15 @@
 				let that = this;
 				this.$http.post("ibps/business/v3/bpm/instance/start", para).then(res => {
 					if (res.data.state == 200) {
-						this.$tip.success("提交成功!")
+						this.$methCommon.getPrompt('提交成功', 'success')
 						this.$Router.replace({
 							name: 'index'
 						})
+					} else {
+						this.$methCommon.getPrompt('请求出现错误', 'error')
 					}
 				}).catch((err) => {
-					let msg = ((err.response || {}).data || {}).message || err.data.message || "请求出现错误,请稍后再试"
-					this.$tip.error(msg);
+					this.$methCommon.getPrompt('请求出现错误,请稍后再试', 'error')
 				});
 			},
 			//弹出框显示

+ 1 - 1
pages/jiance/order.vue

@@ -1288,7 +1288,7 @@
 									if (res.data.state == 200) {
 										meth.getPrompt('暂存成功')
 									} else {
-										meth.getPrompt('暂存失败')
+										meth.getPrompt('暂存失败', 'error')
 									}
 								});
 						} else if (res.cancel) {}

+ 7 - 8
pages/jiance/tousu.vue

@@ -489,16 +489,16 @@
 				let that = this;
 				this.$http.post("ibps/business/v3/bpm/instance/start", para).then(res => {
 					if (res.data.state == 200) {
-						this.$tip.success("提交成功!")
+						this.$methCommon.getPrompt('提交成功', 'success')
 						this.$Router.replace({
 							name: 'index'
 						})
+					} else {
+						this.$methCommon.getPrompt('请求出现错误', 'error')
 					}
 				}).catch((err) => {
-					let msg = ((err.response || {}).data || {}).message || err.data.message ||
-						"请求出现错误,请稍后再试"
-					this.$tip.error(msg);
-				});
+					this.$methCommon.getPrompt('请求出现错误,请稍后再试', 'error')
+				})
 			},
 			//签名确定
 			getArgee() {
@@ -520,14 +520,13 @@
 				}
 				this.$http.post("/ibps/business/v3/bpm/task/agree", editData).then(res => {
 					if (res.data.state == 200) {
-						this.$tip.success('提交成功!')
-						// this.getHouSumit(this.form)
+						this.$methCommon.getPrompt('提交成功', 'success')
 						uni.hideLoading();
 						this.$Router.replaceAll({
 							name: 'index'
 						})
 					} else {
-						this.$tip.success('提交异常!')
+						this.$methCommon.getPrompt('提交异常', 'error')
 						this.$Router.replaceAll({
 							name: 'index'
 						})