Sfoglia il codice sorgente

bugfix 空白页等处理

谢杰标 2 anni fa
parent
commit
fa9c726034
6 ha cambiato i file con 414 aggiunte e 344 eliminazioni
  1. 2 2
      common/config.js
  2. 43 37
      common/httpList/course.js
  3. 2 1
      pages/learn/index.scss
  4. 301 263
      pages/wd/index.vue
  5. 59 40
      pages3/polyv/detail.vue
  6. 7 1
      pages5/scan/recommen.vue

+ 2 - 2
common/config.js

@@ -11,8 +11,8 @@ const test = {
     TOP_LOGO: '/static/logo2.png',
     SCAN_LOGO: '/static/me/logo.png',
 }
-// const index = 0 // 测试环境
-const index = 1 // 祥粤云学堂
+const index = 0 // 测试环境
+// const index = 1 // 祥粤云学堂
 // const index = 2 // 祥粤学堂
 // const index = 3 // 勘设云学堂
 // const index = 4 // 中正云学堂

+ 43 - 37
common/httpList/course.js

@@ -31,7 +31,7 @@ export default {
 		})
 	},
 	reChapterList(data) {
-		
+
 		return myRequest({
 			url: '/course/chapterList',
 			method: 'get',
@@ -45,8 +45,8 @@ export default {
 			data: data
 		})
 	},
-	
-	
+
+
 
 	reMenuList(data) {
 		return myRequest({
@@ -64,16 +64,16 @@ export default {
 		})
 	},
 	chapterList(data) {
-		
+
 		return myRequest({
-			url: '/app/common/course/chapterList/'+data,
+			url: '/app/common/course/chapterList/' + data,
 			method: 'get',
 			noToken: true
 		})
 	},
 	sectionList(data) {
 		return myRequest({
-			url: '/app/common/course/sectionList/'+data,
+			url: '/app/common/course/sectionList/' + data,
 			method: 'get',
 			noToken: true
 		})
@@ -102,98 +102,104 @@ export default {
 	},
 	courseDetail(data) {
 		return myRequest({
-			url: '/course/'+data,
+			url: '/course/' + data,
 			method: 'get'
 		})
 	},
 	courseBusiness(data) {
 		return myRequest({
-			url: '/app/common/course/business/'+data,
+			url: '/app/common/course/business/' + data,
 			method: 'get',
-			noToken:true
+			noToken: true
 		})
 	},
-	
+
 	courseHandouts(data) {
 		return myRequest({
-			url: '/course/handouts/'+data,
+			url: '/course/handouts/' + data,
 			method: 'get'
 		})
 	},
-	
+	getHandoutList(data) {
+		return myRequest({
+			url: '/course/handouts/listByGoods',
+			method: 'get',
+			data: data
+		})
+	},
 	courseGoodsRebuildStatus(data) {
 		return myRequest({
 			url: '/course/goodsRebuildStatus',
 			method: 'get',
-			data:data
+			data: data
 		})
 	},
 	faceCertificationIDCardOCR(data) {
 		return myRequest({
 			url: '/face/certification/IDCardOCR',
 			method: 'post',
-			data:data
+			data: data
 		})
 	},
-	
+
 	facCertificationImageRecognition(data) {
 		return myRequest({
 			url: '/face/certification/ImageRecognition',
 			method: 'post',
-			data:data
+			data: data
 		})
 	},
-	
+
 	faceCertificationIdCardCompareFace(data) {
-			return myRequest({
-				url: '/face/certification/idCardCompareFace',
-				method: 'post',
-				data:data
-			})
-		},
-	
+		return myRequest({
+			url: '/face/certification/idCardCompareFace',
+			method: 'post',
+			data: data
+		})
+	},
+
 	faceCertificationCompareFace(data) {
 		return myRequest({
 			url: '/face/certification/CompareFace',
 			method: 'post',
-			data:data
+			data: data
 		})
 	},
-	
+
 	gradeCheckGoodsStudy(data) {
 		return myRequest({
 			url: '/grade/grade/checkGoodsStudy',
 			method: 'get',
-			data:data
+			data: data
 		})
 	},
-	
-	
-	
+
+
+
 	polyvLiveHistoryChatMsgList(data) {
 		return myRequest({
 			url: '/polyv/live/historyChatMsgList',
 			method: 'get',
-			data:data
+			data: data
 		})
 	},
 	studyRecordQueryLiveLast(data) {
 		return myRequest({
 			url: '/study/record/queryLiveLast',
 			method: 'get',
-			data:data
+			data: data
 		})
 	},
-	
-	courseMajorList (data) {
+
+	courseMajorList(data) {
 		return myRequest({
 			url: '/course/major/list',
 			method: 'get',
-			data:data
+			data: data
 		})
 	},
 	// 学习中心的直播课列表
-	getgoodsLiveList (data) {
+	getgoodsLiveList(data) {
 		return myRequest({
 			url: '/goods/getLiveList',
 			method: 'get',
@@ -202,7 +208,7 @@ export default {
 		})
 	},
 	// 查询用户拥有视频+直播商品
-	listUserVideoLive (data) {
+	listUserVideoLive(data) {
 		return myRequest({
 			url: '/goods/listUserVideoLive',
 			method: 'get',

+ 2 - 1
pages/learn/index.scss

@@ -25,10 +25,11 @@
 }
 .had_courses{
 	width: 100%;
-	padding: 39rpx 24rpx 31rpx;
+	padding: 0 24rpx 31rpx;
 }
 .lives {
 	width: 100%;
+	padding-top: 20rpx;
 	.live_item {
 		position: relative;
 		top: 0;

+ 301 - 263
pages/wd/index.vue

@@ -1,28 +1,44 @@
 <template>
-	<view>
-		<!-- <image mode="widthFix" :src="isLogin ? '/static/wd_bg_login.jpg' : '/static/wd_bg.jpg'" :class="isLogin ? 'login_full_img' : 'full_img'"></image> -->
-		<u-navbar :is-back="false" title="我的" :border-bottom="false"  title-color="#333333" back-icon-color="#ffffff">
-			<view class="slot-wrap">
-				<image :src="logo" style="width: 178rpx;height: 31rpx;margin-left: 30rpx;"></image>
-			</view>
-		</u-navbar>
-		<view v-if="isLogin" class="imgs_bg">
-			<view class="infos">
-				<image :src="userInfo ? $method.splitImgHost(userInfo.avatar, true) : ''" class="avatar"></image>
-				<!-- <view style="margin-left: 20rpx;z-index: 999;"> -->
-				<view style="color: #FFFFFF;font-size: 32rpx;">{{ userInfo.nickname }}</view>
-				<view style="color: #ffffff;font-size: 20rpx;margin-top: 17rpx">{{ userInfo.telphone }}</view>
-				<!-- </view> -->
-			</view>
-			<image src="/static/me/me_bgpic.jpg" class="bg_pic"></image>
-		</view>
-		<view class="login_wrap" v-if="!isLogin">
-			<view class="login_text">您还没有登录哦~</view>
-			<view class="loginBtn" @click="jumpLogin">立即登录/注册</view>
-		</view>
-		<view v-if="isLogin" class="loginBox">
-			<view class="contents">
-			<!-- <view style="width: 100%;height: 40px;background-color: #F0F1F5;position: fixed;top: 150px;z-index: 100;"></view>
+  <view>
+    <!-- <image mode="widthFix" :src="isLogin ? '/static/wd_bg_login.jpg' : '/static/wd_bg.jpg'" :class="isLogin ? 'login_full_img' : 'full_img'"></image> -->
+    <u-navbar
+      :is-back="false"
+      title="我的"
+      :border-bottom="false"
+      title-color="#333333"
+      back-icon-color="#ffffff"
+    >
+      <view class="slot-wrap">
+        <image
+          :src="logo"
+          style="width: 178rpx; height: 31rpx; margin-left: 30rpx"
+        ></image>
+      </view>
+    </u-navbar>
+    <view v-if="isLogin" class="imgs_bg">
+      <view class="infos">
+        <image
+          :src="userInfo ? $method.splitImgHost(userInfo.avatar, true) : ''"
+          class="avatar"
+        ></image>
+        <!-- <view style="margin-left: 20rpx;z-index: 999;"> -->
+        <view style="color: #ffffff; font-size: 32rpx">{{
+          userInfo.nickname
+        }}</view>
+        <view style="color: #ffffff; font-size: 20rpx; margin-top: 17rpx">{{
+          userInfo.telphone
+        }}</view>
+        <!-- </view> -->
+      </view>
+      <image src="/static/me/me_bgpic.jpg" class="bg_pic"></image>
+    </view>
+    <view class="login_wrap" v-if="!isLogin">
+      <view class="login_text">您还没有登录哦~</view>
+      <view class="loginBtn" @click="jumpLogin">立即登录/注册</view>
+    </view>
+    <view v-if="isLogin" class="loginBox">
+      <view class="contents">
+        <!-- <view style="width: 100%;height: 40px;background-color: #F0F1F5;position: fixed;top: 150px;z-index: 100;"></view>
 			<view style="display: flex;height: 160rpx;align-items: center; position: fixed;z-index: 999;top: 110px;" v-if="isLogin">
 				<image :src="userInfo ? $method.splitImgHost(userInfo.avatar, true) : ''" class="avatar"></image>
 				<view style="margin-left: 20rpx;z-index: 999;">
@@ -32,7 +48,7 @@
 				<view style="background-color: #F0F1F5;height:80rpx;"></view>
 			</view>
 			<view style="top: 195px;position: relative;padding-bottom: 30rpx;"> -->
-				<!-- <navigator  hover-class="none" url="/pages2/plan/index" class="menu_box">
+        <!-- <navigator  hover-class="none" url="/pages2/plan/index" class="menu_box">
 					<view class="box_left">
 						<image src="/static/icon/my_icon1.png" class="my_icon"></image>
 						<view>学习计划</view>
@@ -43,7 +59,7 @@
 						个学习任务
 					</view>
 				</navigator> -->
-				<!-- <view class="two_menu">
+        <!-- <view class="two_menu">
 					<navigator  hover-class="none" url="/pages2/wd/class" class="small_menu">
 						<image src="/static/icon/my_icon3.png" class="my_icon"></image>
 						<view>我的网课</view>
@@ -53,7 +69,7 @@
 						<view>我的题库通</view>
 					</view>
 				</view> -->
-				<!-- <navigator  hover-class="none" url="/pages5/liveDetail/list" class="menu_box" >
+        <!-- <navigator  hover-class="none" url="/pages5/liveDetail/list" class="menu_box" >
 					<view class="box_left">
 						<image src="/static/icon/my_icon12.png" class="my_icon"></image>
 						<view>我的直播课</view>
@@ -64,165 +80,188 @@
 						个课程直播中
 					</view>
 				</navigator> -->
-				<navigator  hover-class="none" url="/pages2/learn/my_learn" class="menu_box" >
-					<view class="box_left">
-						<image src="/static/icon/my_icon2.png" class="my_icon"></image>
-						<view>我的学时</view>
-					</view>
-					<view class="box_right">
-						累计
-						<text>{{ userNums.periodSum }}</text>
-						学时未通过
-					</view>
-				</navigator>
-				<navigator  hover-class="none" url="/pages5/exam/index" class="menu_box" >
-					<view class="box_left">
-						<image src="/static/icon/my_icon11.png" class="my_icon"></image>
-						<view>我的模考</view>
-					</view>
-					<view class="box_right">
-						<text>{{ total1 }}</text>
-						个模考预约
-					</view>
-				</navigator>
-				<!--    /pages2/exam/index-->
-				<navigator  hover-class="none" url="/pages2/exam/exam_appointment" class="menu_box" >
-					<view class="box_left">
-						<image src="/static/icon/my_icon10.png" class="my_icon"></image>
-						<view>我的考试</view>
-					</view>
-					<view class="box_right">
-						<text>{{ userNums.subscribeSum }}</text>
-						考试预约
-					</view>
-				</navigator>
-				<navigator  hover-class="none" v-if="!hideBuyState" url="/pages2/order/index" class="menu_box">
-					<view class="box_left">
-						<image src="/static/icon/my_icon7.png" class="my_icon"></image>
-						<view>我的订单</view>
-					</view>
-					<view class="box_right">
-						<text>{{ userNums.orderSum }}</text>
-						笔待支付
-					</view>
-				</navigator>
-				<navigator  hover-class="none" url="/pages2/msg/index" class="menu_box">
-					<view class="box_left">
-						<image src="/static/icon/my_icon8.png" class="my_icon"></image>
-						<view>我的消息</view>
-					</view>
-					<view class="box_right">
-						<text>{{ userNums.informSum }}</text>
-						条未读
-					</view>
-				</navigator>
-				<navigator  hover-class="none" url="/pages2/wd/info" class="menu_box">
-					<view class="box_left">
-						<image src="/static/icon/my_icon9.png" class="my_icon"></image>
-						<view>我的资料</view>
-					</view>
-					<view class="box_right">
-						<u-icon name="arrow-right" color="#999" size="24"></u-icon>
-					</view>
-				</navigator>
-				</view>
-				<view class="logout" @click="logout">退出</view>
-			</view>
-			
+        <navigator
+          hover-class="none"
+          url="/pages2/learn/my_learn"
+          class="menu_box"
+        >
+          <view class="box_left">
+            <image src="/static/icon/my_icon2.png" class="my_icon"></image>
+            <view>我的学时</view>
+          </view>
+          <view class="box_right">
+            累计
+            <text>{{ userNums.periodSum }}</text>
+            学时未通过
+          </view>
+        </navigator>
+        <navigator hover-class="none" url="/pages5/exam/index" class="menu_box">
+          <view class="box_left">
+            <image src="/static/icon/my_icon11.png" class="my_icon"></image>
+            <view>我的模考</view>
+          </view>
+          <view class="box_right">
+            <text>{{ total1 }}</text>
+            个模考预约
+          </view>
+        </navigator>
+        <!--    /pages2/exam/index-->
+        <navigator
+          hover-class="none"
+          url="/pages2/exam/exam_appointment"
+          class="menu_box"
+        >
+          <view class="box_left">
+            <image src="/static/icon/my_icon10.png" class="my_icon"></image>
+            <view>我的考试</view>
+          </view>
+          <view class="box_right">
+            <text>{{ userNums.subscribeSum }}</text>
+            考试预约
+          </view>
+        </navigator>
+        <navigator
+          hover-class="none"
+          v-if="!hideBuyState"
+          url="/pages2/order/index"
+          class="menu_box"
+        >
+          <view class="box_left">
+            <image src="/static/icon/my_icon7.png" class="my_icon"></image>
+            <view>我的订单</view>
+          </view>
+          <view class="box_right">
+            <text>{{ userNums.orderSum }}</text>
+            笔待支付
+          </view>
+        </navigator>
+        <navigator hover-class="none" url="/pages2/msg/index" class="menu_box">
+          <view class="box_left">
+            <image src="/static/icon/my_icon8.png" class="my_icon"></image>
+            <view>我的消息</view>
+          </view>
+          <view class="box_right">
+            <text>{{ userNums.informSum }}</text>
+            条未读
+          </view>
+        </navigator>
+        <navigator hover-class="none" url="/pages2/wd/info" class="menu_box">
+          <view class="box_left">
+            <image src="/static/icon/my_icon9.png" class="my_icon"></image>
+            <view>我的资料</view>
+          </view>
+          <view class="box_right">
+            <u-icon name="arrow-right" color="#999" size="24"></u-icon>
+          </view>
+        </navigator>
+      </view>
+      <view class="logout" @click="logout">退出</view>
+    </view>
 
-		<!-- <u-navbar :is-back="false" title="我的" :border-bottom="false" background="{ background: '#ffffff',opacity:0.4; }" title-color="#ffffff" back-icon-color="#ffffff">
+    <!-- <u-navbar :is-back="false" title="我的" :border-bottom="false" background="{ background: '#ffffff',opacity:0.4; }" title-color="#ffffff" back-icon-color="#ffffff">
 			<view class="slot-wrap"><image src="/static/logo.png" style="width: 178rpx;height: 31rpx;margin-left: 30rpx;"></image></view>
 		</u-navbar> -->
 
-		<!-- <tab-bar v-model="current" :list="tabbarlist" :mid-button="true" :mid-button-size="50" class="tab_items"></tab-bar> -->
-	</view>
+    <!-- <tab-bar v-model="current" :list="tabbarlist" :mid-button="true" :mid-button-size="50" class="tab_items"></tab-bar> -->
+  </view>
 </template>
 
 <script>
 // import { websocket } from '@/common/socket.js';
-import { mapGetters } from 'vuex';
-import config from '@/common/config'
+import { mapGetters } from "vuex";
+import config from "@/common/config";
 export default {
-	data() {
-		return {
-			logo: config.TOP_LOGO,
-			list: [23, 24, 25, 26, 27, 28, 29],
-			content: '此功能暂未开放',
-			show: false,
-			isLogin: false,
-			userNums: {},
-			total1:0,
-			total2:0,
-			current: 4,
-		};
-	},
-	onLoad(option) {
-		// console.log(option,987)
-	},
-	onShow() {
-		this.isLogin = this.$method.isLogin();
-		if(this.isLogin){
-		this.$store.state.allowLoading = false;
-		this.getNums();
-		this.getCount();
-		this.goodsLivingSectionList();
-		this.$store.state.allowLoading = true;
-		}
-		// this.$store.dispatch('changeTabsNum')
-	},
-	methods: {
-		getCount() {
-			this.$api.mockSubscribeListSubscribe({
-				mockStatus:0,
-				pageNum:1,
-				pageSize:1,
-			}).then(res => {
-				this.total1 = res.data.total
-			})
-		},
-		goodsLivingSectionList() {
-			this.$api.goodsLivingSectionList().then(res => {
-				this.total2 = res.data.data.length
-			})
-		},
-		goBank() {
-			this.$api.lockLockStatus({
-			  action:'bank'
-			}).then(res => {
-			  if(res.data.code == 200) { //有其他端在操作,不能学习
-				  uni.showToast({
-					  icon:'none',
-					  title:res.data.msg,
-					  duration:3000,
-				  })
-			  } else if(res.data.code == 500) { //可以学习
-				  
-				uni.navigateTo({
-					url:'/pages2/wd/question_bank'
-				})
-			  }
-			})
-		},
-		getNums() {
-			this.$api.getinfoAttached().then(res => {
-				if (res.data.code === 200) {
-					this.userNums = res.data.data;
-					const nums = res.data.data.informSum + res.data.data.orderSum + res.data.data.periodSum + res.data.data.planSum + res.data.data.subscribeSum;
-					this.$store.commit('tabNum', nums);
-				}
-			});
-		},
-		logout() {
-			// websocket.stop()
-			this.$method.exit();
-			this.isLogin = this.$method.isLogin();
-			
-		},
-		jumpLogin() {
-			this.$navTo.togo('/pages4/login/login');
-		}
-	},
-	computed: { ...mapGetters(['userInfo','hideBuyState']) }
+  data() {
+    return {
+      logo: config.TOP_LOGO,
+      list: [23, 24, 25, 26, 27, 28, 29],
+      content: "此功能暂未开放",
+      show: false,
+      isLogin: false,
+      userNums: {},
+      total1: 0,
+      total2: 0,
+      current: 4,
+    };
+  },
+  onLoad(option) {
+    // console.log(option,987)
+  },
+  onShow() {
+    this.isLogin = this.$method.isLogin();
+    if (this.isLogin) {
+      this.$store.state.allowLoading = false;
+      this.getNums();
+      this.getCount();
+      this.goodsLivingSectionList();
+      this.$store.state.allowLoading = true;
+      !this.userInfo && this.$api.refreshUserInfo();
+    }
+    // this.$store.dispatch('changeTabsNum')
+  },
+  methods: {
+    getCount() {
+      this.$api
+        .mockSubscribeListSubscribe({
+          mockStatus: 0,
+          pageNum: 1,
+          pageSize: 1,
+        })
+        .then((res) => {
+          this.total1 = res.data.total;
+        });
+    },
+    goodsLivingSectionList() {
+      this.$api.goodsLivingSectionList().then((res) => {
+        this.total2 = res.data.data.length;
+      });
+    },
+    goBank() {
+      this.$api
+        .lockLockStatus({
+          action: "bank",
+        })
+        .then((res) => {
+          if (res.data.code == 200) {
+            //有其他端在操作,不能学习
+            uni.showToast({
+              icon: "none",
+              title: res.data.msg,
+              duration: 3000,
+            });
+          } else if (res.data.code == 500) {
+            //可以学习
+
+            uni.navigateTo({
+              url: "/pages2/wd/question_bank",
+            });
+          }
+        });
+    },
+    getNums() {
+      this.$api.getinfoAttached().then((res) => {
+        if (res.data.code === 200) {
+          this.userNums = res.data.data;
+          const nums =
+            res.data.data.informSum +
+            res.data.data.orderSum +
+            res.data.data.periodSum +
+            res.data.data.planSum +
+            res.data.data.subscribeSum;
+          this.$store.commit("tabNum", nums);
+        }
+      });
+    },
+    logout() {
+      // websocket.stop()
+      this.$method.exit();
+      this.isLogin = this.$method.isLogin();
+    },
+    jumpLogin() {
+      this.$navTo.togo("/pages4/login/login");
+    },
+  },
+  computed: { ...mapGetters(["userInfo", "hideBuyState"]) },
 };
 </script>
 <style>
@@ -237,58 +276,57 @@ page {
 </style>
 <style scoped lang="scss">
 .login_wrap {
-	text-align: center;
-	margin-top: 100rpx;
-	
-	.login_text {
-		color: #007AFF;
-		font-size: 36rpx;
-		font-weight: bold;
-	}
-	
-	
-	.loginBtn {
-		width: 526rpx;
-		height: 80rpx;
-		background: linear-gradient(90deg, #015eea, #00c0fa);
-		box-shadow: 0rpx 10rpx 16rpx 4rpx rgba(1, 99, 235, 0.04);
-		border-radius: 40rpx;
-		color: #ffffff;
-		line-height: 80rpx;
-		margin: 0 auto;
-		margin-top: 50rpx;
-	}
+  text-align: center;
+  margin-top: 100rpx;
+
+  .login_text {
+    color: #007aff;
+    font-size: 36rpx;
+    font-weight: bold;
+  }
+
+  .loginBtn {
+    width: 526rpx;
+    height: 80rpx;
+    background: linear-gradient(90deg, #015eea, #00c0fa);
+    box-shadow: 0rpx 10rpx 16rpx 4rpx rgba(1, 99, 235, 0.04);
+    border-radius: 40rpx;
+    color: #ffffff;
+    line-height: 80rpx;
+    margin: 0 auto;
+    margin-top: 50rpx;
+  }
 }
 .imgs_bg {
-	width: 100%;
-	height: 429rpx;
-	position: fixed;
-	z-index: 999;
-	.infos {
-		position: absolute;
-		top: 0;
-		left: 0;
-		width: 100%;
-		z-index: 99;
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-	}
-	.bg_pic {
-		width: 100%;
-		height: 100%;
-		display: block;
-		position: absolute;
-		top: 0;
-		left: 0;
-		z-index: 9;
-	}
+  width: 100%;
+  height: 429rpx;
+  position: fixed;
+  z-index: 999;
+  .infos {
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 100%;
+    z-index: 99;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+  }
+  .bg_pic {
+    width: 100%;
+    height: 100%;
+    display: block;
+    position: absolute;
+    top: 0;
+    left: 0;
+    z-index: 9;
+  }
 }
 .avatar {
-	height: 160rpx;
-	width: 160rpx;
-	border-radius: 50%;
-	margin: 110rpx 0rpx 37rpx 0rpx;
+  height: 160rpx;
+  width: 160rpx;
+  border-radius: 50%;
+  margin: 110rpx 0rpx 37rpx 0rpx;
 }
 .small_menu {
   width: 45%;
@@ -312,46 +350,46 @@ page {
   margin-right: 20rpx;
 }
 .menu_box {
-	height: 130rpx;
-	background: #ffffff;
-	// border-radius: 24rpx;
-	// margin-top: 30rpx;
-	display: flex;
-	align-items: center;
-	// padding: 0 20rpx;
-	justify-content: space-between;
-	color: #666666;
-	font-size: 30rpx;
-	font-weight: 500;
-	border-bottom: 1rpx solid #EEEEEE;
-	.box_left {
-		display: flex;
-		align-items: center;
-	}
-	
-	.box_right {
-		font-size: 32rpx;
-		
-		text {
-			color: #007AFF;
-			margin: 0 5rpx;
-		}
-	}
+  height: 130rpx;
+  background: #ffffff;
+  // border-radius: 24rpx;
+  // margin-top: 30rpx;
+  display: flex;
+  align-items: center;
+  // padding: 0 20rpx;
+  justify-content: space-between;
+  color: #666666;
+  font-size: 30rpx;
+  font-weight: 500;
+  border-bottom: 1rpx solid #eeeeee;
+  .box_left {
+    display: flex;
+    align-items: center;
+  }
+
+  .box_right {
+    font-size: 32rpx;
+
+    text {
+      color: #007aff;
+      margin: 0 5rpx;
+    }
+  }
 }
 .loginBox {
-	position: relative;
-	padding: 0 30rpx 180rpx 30rpx;
-    top: 430rpx;
-	width: 100%;
-	height: 100%;
-	margin-top: 30rpx;
-	.contents {
-		width: 100%;
-		height: 100%;
-		border-radius: 24rpx;
-		background-color: #ffffff;
-		padding: 0rpx 30rpx 0rpx 20rpx;
-	}
+  position: relative;
+  padding: 0 30rpx 180rpx 30rpx;
+  top: 430rpx;
+  width: 100%;
+  height: 100%;
+  margin-top: 30rpx;
+  .contents {
+    width: 100%;
+    height: 100%;
+    border-radius: 24rpx;
+    background-color: #ffffff;
+    padding: 0rpx 30rpx 0rpx 20rpx;
+  }
 }
 .login_full_img {
   display: block;

+ 59 - 40
pages3/polyv/detail.vue

@@ -244,25 +244,31 @@
         </view>
         <!--讲义 -->
         <view v-show="current == 1">
-          <view class="lecture-box" v-if="courseHandoutsData">
-            <view class="title">
-              {{ courseHandoutsData.handoutsName }}
-              <!-- 这是后台配置的讲义标题过长省略这是后台配置的讲义标题过长省略 -->
-            </view>
-            <view class="btn" @click="openDocument">
-              <image
-                v-if="!downLoading"
-                src="/pages3/static/imgs/downLoad.png"
-                style="width: 40rpx; height: 40rpx"
-              ></image>
-              <image
-                v-else
-                src="/pages3/static/imgs/downLoading.png"
-                class="loading_down"
-                style="width: 40rpx; height: 40rpx"
-              ></image>
+          <template v-if="courseHandoutsData.length">
+            <view
+              class="lecture-box"
+              v-for="item in courseHandoutsData"
+              :key="item.handoutsId"
+            >
+              <view class="title">
+                {{ item.handoutsName }}
+              </view>
+              <view class="btn" @click="openDocument(item)">
+                <image
+                  v-if="!downLoading"
+                  src="/pages3/static/imgs/downLoad.png"
+                  style="width: 40rpx; height: 40rpx"
+                ></image>
+                <image
+                  v-else
+                  src="/pages3/static/imgs/downLoading.png"
+                  class="loading_down"
+                  style="width: 40rpx; height: 40rpx"
+                ></image>
+              </view>
             </view>
-          </view>
+          </template>
+          <view v-else style="text-align: center">暂无讲义</view>
         </view>
         <!--笔记 -->
         <view v-show="current == 2">
@@ -542,7 +548,12 @@
         </view>
       </view>
     </u-popup>
-    <u-popup v-model="photoPopup" mode="bottom" border-radius="40" :mask-close-able="false">
+    <u-popup
+      v-model="photoPopup"
+      mode="bottom"
+      border-radius="40"
+      :mask-close-able="false"
+    >
       <!-- 播放前拍照start -->
       <!-- :mask-close-able="false" -->
       <!-- style="bottom: 0; position: fixed; width: 100%; z-index: 999" -->
@@ -583,7 +594,7 @@
               <!-- #endif -->
               <!-- #ifdef H5 -->
               <video
-                :controls='false'
+                :controls="false"
                 id="video"
                 width="400"
                 height="300"
@@ -782,7 +793,7 @@ import courseModule from "@/components/course/courseModule.vue";
 import courseChapter from "@/components/course/courseChapter.vue";
 import courseSection from "@/components/course/courseSection.vue";
 import PopupPhoto from "@/components/popup/index.vue";
-import config from '@/common/config'
+import config from "@/common/config";
 import { mapGetters, mapMutations } from "vuex";
 var polyvPlayerContext = null;
 export default {
@@ -817,7 +828,7 @@ export default {
         isAutoChange: false,
         forceVideo: false,
       },
-      courseHandoutsData: "",
+      courseHandoutsData: [],
       liveDetail: {},
       showSet: false,
       startStatus: false,
@@ -948,8 +959,8 @@ export default {
     this.gradeId = option.gradeId;
     this.isOther = option.isOther;
     if (this.isOther) {
-        this.showMark = true;
-        return;
+      this.showMark = true;
+      return;
     }
     this.option = option;
 
@@ -957,11 +968,10 @@ export default {
     if (option.informId) {
       this.informId = option.informId;
     }
-    
   },
   async onShow() {
     if (this.option.skipPort) {
-      await this.$method.skipLogin(this.option.skipPort)
+      await this.$method.skipLogin(this.option.skipPort);
     }
     if (this.$method.isGoLogin()) {
       // 从公众号消息进来的没登录需要跳到登录页,登录后返回
@@ -970,6 +980,7 @@ export default {
     console.log("onshow返回之后");
     this.courseCourseList();
     this.informId && this.clickOfficial(); // 从公众号消息点击进来上报一次
+    !this.userInfo && this.$api.refreshUserInfo();
     this.$store.getters.dictObj;
   },
   onUnload() {
@@ -1013,7 +1024,6 @@ export default {
           orderGoodsId: this.orderGoodsId,
         })
         .then((res) => {
-
           if (res.data.code == 200) {
             this.courseList.push.apply(this.courseList, res.data.rows);
             // 科目
@@ -2070,9 +2080,14 @@ export default {
      * 获取讲义权限
      */
     courseHandouts() {
-      this.$api.courseHandouts(this.goodsData.handoutsId).then((res) => {
-        this.courseHandoutsData = res.data.data;
-      });
+        this.$api.courseHandouts(this.goodsData.handoutsId).then((res) => {
+          this.courseHandoutsData = [res.data.data];
+        });
+      // this.$api
+      //   .getHandoutList({ handoutsId: this.goodsData.handoutsId })
+      //   .then((res) => {
+      //     this.courseHandoutsData = res.data.rows;
+      //   });
     },
     findMenuNextSection(index) {
       for (let i = index + 1; i < this.reMenuList.length; i++) {
@@ -2842,7 +2857,7 @@ export default {
               resolve();
             },
             fail: (error) => {
-              console.log("h5上传失败:", error)
+              console.log("h5上传失败:", error);
               uni.showToast({
                 title: "上传接口报错,请重新拍照上传" + error,
                 icon: "none",
@@ -3198,7 +3213,7 @@ export default {
         }
         // #endif
       }
-      
+
       // #ifdef MP-WEIXIN
       this.enableAutoRotation = false;
       this.photoPopup = true;
@@ -3346,7 +3361,7 @@ export default {
             }
           })
           .catch((err) => {
-            console.log('拍照记录接口的err', err);
+            console.log("拍照记录接口的err", err);
             uni.showToast({
               title: "上传接口报错,请重新拍照上传" + err,
               icon: "none",
@@ -3658,10 +3673,13 @@ export default {
     change(index) {
       this.current = index;
     },
-    openDocument() {
+    openDocument(item) {
       this.downLoading = true;
-      let url = this.$method.splitImgHost(this.courseHandoutsData.handoutsUrl);
-      // 不确定h5
+      let url = this.$method.splitImgHost(item.handoutsUrl);
+      // #ifdef H5
+      window.location.href = url;
+      // #endif
+      // #ifdef MP-WEIXIN
       uni.downloadFile({
         url: url,
         success: (res) => {
@@ -3669,7 +3687,7 @@ export default {
           // h5不支持
           uni.openDocument({
             filePath: filePath,
-            showMenu: this.courseHandoutsData.canDownload == 1 ? true : false,
+            showMenu: item.canDownload == 1 ? true : false,
             success: (res) => {
               this.downLoading = false;
               uni.setStorageSync("current", this.current);
@@ -3692,6 +3710,7 @@ export default {
           });
         },
       });
+      // #endif
     },
     clickMulu() {
       this.muluStyle = !this.muluStyle;
@@ -3870,10 +3889,10 @@ export default {
 
       this.$nextTick(() => {
         const video = document.querySelector("video");
-        console.log('video:', video);
+        console.log("video:", video);
         video.srcObject = stream;
         video.play();
-      })
+      });
     },
     photographError(err) {
       console.log("没有摄像头:", err);
@@ -4001,7 +4020,7 @@ export default {
   height: 80rpx;
   background: #ffffff;
   border-radius: 16rpx 16rpx 16rpx 16rpx;
-
+  margin-bottom: 20rpx;
   .title {
     padding: 10rpx;
     flex: 1;

+ 7 - 1
pages5/scan/recommen.vue

@@ -28,6 +28,7 @@
         </view>
       </view>
     </view>
+    <view class="tip">温馨提示:在线课程属虚拟商品,活动期间购买不予退款,请按需购买</view>
   </view>
 </template>
 
@@ -47,7 +48,7 @@ export default {
       for (let i = 0; i < arrs.length; i++) {
         optObj[arrs[i].split("=")[0]] = arrs[i].split("=")[1];
       }
-      uni.setStorageSync("sac",optObj.sac);
+      uni.setStorageSync("sac", optObj.sac);
       this.getCourseList(optObj.sharekey);
       this.shareActivityCode(optObj.sac);
     }
@@ -220,5 +221,10 @@ export default {
       }
     }
   }
+  .tip {
+    text-align: center;
+    color: #A7B0B8;
+    padding: 16rpx 30rpx 0;
+  }
 }
 </style>