Browse Source

判断包月重复

gcz 11 months ago
parent
commit
a8d2608f8a
1 changed files with 12 additions and 0 deletions
  1. 12 0
      pages/handleMonthly/handleMonthly.vue

+ 12 - 0
pages/handleMonthly/handleMonthly.vue

@@ -319,6 +319,18 @@ export default {
       this.$u.api
         .createMonth(params)
         .then((res) => {
+			if(res.data.ifRepeat==1){
+				uni.showModal({
+				  title: '温馨提示',
+				  content: res.data.repeatMsg,
+				  success: res => {
+				    if (res.confirm) {
+				      uni.$u.route('/pages/center/monthly/monthly?type=road', {});
+				    }
+				  }
+				})
+				return
+			}
           if (res.code === 200) {
             this.monthId = res.data.monthId;
             this.orderMoney = (Number(this.form.monthAmount) * Number(this.form.month)).toFixed(2);