bihuisong 1 year ago
parent
commit
7663c61c12
1 changed files with 12 additions and 13 deletions
  1. 12 13
      pages/index/index.vue

+ 12 - 13
pages/index/index.vue

@@ -556,22 +556,21 @@
 					userId: getApp().globalData.userId,
 					scoreNum: item.integral
 				};
-				verifyScore(params).then((res) => {
-					console.log(res)
-					if (!res.data) {
-						uni.showToast({
-							title: '您的积分不足'
-						})
-					} else {
-						if (item.purchaseStatus !== "1") {
+				if (item.purchaseStatus != "1") {
+					verifyScore(params).then((res) => {
+						if (!res.data) {
+							uni.showToast({
+								title: '您的积分不足'
+							})
+						} else {
 							this.reduceScore(item)
 							this.addScore(item)
+							uni.navigateTo({
+								url: '/pages/highServer/knowledgeDetails/knowledgeDetails?id=' + item.id,
+							});
 						}
-						uni.navigateTo({
-							url: '/pages/highServer/knowledgeDetails/knowledgeDetails?id=' + item.id,
-						});
-					}
-				});
+					});
+				}
 			},
 			/**
 			 * 减少积分