Browse Source

修复bug

chenxiong 3 years ago
parent
commit
21fd241d28
2 changed files with 6 additions and 6 deletions
  1. 1 1
      pages/index/index.vue
  2. 5 5
      pages2/plan/create.vue

+ 1 - 1
pages/index/index.vue

@@ -374,7 +374,7 @@ export default {
 		userPlanSeven() {
 			let self = this;
 			this.$api.userPlanSeven().then(result => {
-				if (result.data.data.length>0) {
+				if (result.data.data && result.data.data.length>0) {
 					
 					self.workList = result.data.data
 					self.planGoodsList = self.workList[0].goodsVos;

+ 5 - 5
pages2/plan/create.vue

@@ -270,11 +270,11 @@ export default {
 					if (result.data.code == 200) {
 						this.studyNums = result.data.data.studyCourseKnob;
 					} else {
-						uni.showToast({
-							title: result.data.msg,
-							icon: 'none',
-							duration: 2000
-						});
+						uni.showModal({
+							title:'提示',
+							content:result.data.msg,
+							showCancel:false,
+						})
 					}
 				});
 			} else {