En route vor 1 Jahr
Ursprung
Commit
32d64dc8ea
5 geänderte Dateien mit 34 neuen und 13 gelöschten Zeilen
  1. 2 2
      common/config.js
  2. 2 2
      common/request.js
  3. 6 2
      pages/learn/index.vue
  4. 18 6
      pages3/polyv/detail.vue
  5. 6 1
      pages5/webview/index.vue

+ 2 - 2
common/config.js

@@ -7,8 +7,8 @@ const test = {
 	tenantId: "867735392558919680", //详粤云学堂
 	appid: "wxd3c8ae80cf43a305", 
 };
-// const index = 0; // 测试环境
-const index = 1; // 祥粤云学堂1 
+const index = 0; // 测试环境
+// const index = 1; // 祥粤云学堂1 
 // const index = 2 // 祥粤学堂
 // const index = 3 // 勘设云学堂1
 // const index = 4 // 中正学堂1

+ 2 - 2
common/request.js

@@ -107,7 +107,7 @@ export const myRequest = (options) => {
 					resolve(res);
 					// #endif
 					// #ifdef H5
-					window.open(res.data.msg)
+					window.location.href = res.data.msg
 					reject();
 					// #endif
 				}
@@ -116,7 +116,7 @@ export const myRequest = (options) => {
 			fail: (err) => {
 				uni.hideLoading();
 				uni.showToast({
-					title: "请求接口失败",
+					title: "系统升级中",
 					icon: "none",
 				});
 				console.log("请求失败err---: ", options.url);

+ 6 - 2
pages/learn/index.vue

@@ -241,6 +241,10 @@
                 ">
 								温馨提示:当前班级正在申请中,正式开班后方可进行学习,请耐心等待
 							</div>
+							<div v-if="item.officialStatus != 1
+							">
+								推送失败原因:{{item.pushFailReason || '请先完善个人信息'}}
+							</div>
 							<div v-if="
                   (item.periodStatus == 0 || item.periodStatus == -1)
                 ">
@@ -660,7 +664,7 @@
 			},
 			goPage(url, type) {
 				if (type == 1) {
-					window.open(url, "_blank");
+					window.location.href = url
 				}
 				if (type == 2) {
 					uni.setClipboardData({
@@ -1359,7 +1363,7 @@
 					data
 				} = await this.$api.courseoldgoodsredirect()
 				if (data.data) {
-					window.open(data.data.h5Url)
+					window.location.href = data.data.h5Url
 					return
 				}
 				// #endif

+ 18 - 6
pages3/polyv/detail.vue

@@ -333,7 +333,7 @@
 					title: "提示",
 					content: "请使用其他浏览器进行学习",
 					showCancel: false,
-					complete:() => {
+					complete: () => {
 						uni.switchTab({
 							url: "/pages/learn/index",
 						});
@@ -914,7 +914,7 @@
 				let chapterId = item.chapterId || 0;
 				let sectionId = item.sectionId || item.menuId;
 				let uuid = new Date().valueOf() + "";
-				if(!this.userInfo){
+				if (!this.userInfo) {
 					await this.$store.dispatch('getUserInfo')
 				}
 				// buyCourse 是否购买课程:1是 0否
@@ -1603,19 +1603,31 @@
 						goodsId: this.goodsId,
 					})
 					.then((res) => {
-						if (res.data.data > 0) {
+						if (res.data.code == 200) {
+							if (res.data.data > 0) {
+								uni.showModal({
+									showCancel: false,
+									confirmText: "确定",
+									content: "该业务层次下有未学完的商品,无法学习新商品!",
+									success: function(resultst) {
+										uni.navigateBack();
+									},
+								});
+								return Promise.reject();
+							}
+							return Promise.resolve();
+						} else {
 							uni.showModal({
 								showCancel: false,
 								confirmText: "确定",
-								content: "该业务层次下有未学完的商品,无法学习新商品!",
+								content: res.data.msg,
 								success: function(resultst) {
 									uni.navigateBack();
 								},
 							});
 							return Promise.reject();
 						}
-						return Promise.resolve();
-					});
+					})
 			},
 			async getGoodsDetail() {
 				let {

+ 6 - 1
pages5/webview/index.vue

@@ -80,6 +80,11 @@
 					this.getParam();
 				}
 			} else {
+				// #ifdef H5
+				window.location.href = decodeURIComponent(decodeURIComponent(this.options.url)) +
+					"&tid=" +
+					tenantId;
+				// #endif
 				this.url =
 					decodeURIComponent(decodeURIComponent(this.options.url)) +
 					"&tid=" +
@@ -164,7 +169,7 @@
 								}
 							})
 							return
-						} else if ((item.liveEndTime + 10800)  < newTime) {
+						} else if ((item.liveEndTime + 10800) < newTime) {
 							//已结束
 							uni.showModal({
 								title: "提示",