Browse Source

flex:学时审核第三方跳转题库

Tang 3 years ago
parent
commit
91788ecbcc
2 changed files with 26 additions and 5 deletions
  1. 20 4
      pages2/learn/my_learn.vue
  2. 6 1
      pages2/msg/detail.vue

+ 20 - 4
pages2/learn/my_learn.vue

@@ -137,10 +137,7 @@ export default {
 				this.$navTo.togo(`/pages2/appointment/index?goodsId=${v.goodsId}&gradeId=${v.gradeId}`);
 			}
 			if (int === 3) {
-				uni.showModal({
-					content: '待开发',
-					showCancel: false
-				});
+				this.appBeforeAddress(v.goodsId)
 			}
 			if (int === 4) {
 				this.$navTo.togo(`/pages2/learn/details?goodsId=${v.goodsId}&gradeId=${v.gradeId}`);
@@ -156,6 +153,25 @@ export default {
 				}
 			});
 		},
+		appBeforeAddress(goodsId) {
+			this.$api.appBeforeAddress({
+				goodsId
+			}).then(res => {
+				if(res.data.code == 200) {
+					uni.navigateToMiniProgram({
+					  appId: res.data.data.url,
+					  success(res) {
+					    // 打开成功
+					  }
+					})
+				} else {
+					uni.showToast({
+						title: res.data.msg,
+						icon: 'none',
+					})
+				}
+			})
+		},
 		change(index) {
 			this.current = index;
 		}

+ 6 - 1
pages2/msg/detail.vue

@@ -188,6 +188,11 @@ export default {
 						res.data.data.informVo.affiche = res.data.data.informVo.affiche.replace(/<img/gi, '<img style="max-width:100%;"');
 					}
 					this.listData = res.data.data;
+					this.$api.goodsDetail(res.data.data.goodsId).then(rs => {
+						if(rs.data.data.goodsType === 3 && (res.data.data.remindId === 1 || res.data.data.remindId === 3 || res.data.data.remindId === 5 || res.data.data.remindId === 6 || res.data.data.remindId === 7 || res.data.data.remindId === 19 || res.data.data.remindId === 21 || res.data.data.remindId === 22) ){
+							this.statusGO = false
+						}
+					})
 				}
 			});
 		},
@@ -205,7 +210,7 @@ export default {
 				case 19:
 				case 21:
 				case 22:
-					arsty = '立刻学习';
+				arsty = '立刻学习';
 					break;
 				case 2:
 				case 4: