chenxiong před 3 roky
rodič
revize
69eb48626b
6 změnil soubory, kde provedl 198 přidání a 111 odebrání
  1. 2 2
      common/request.js
  2. 3 3
      pages/index/index.vue
  3. 20 1
      pages/wd/index.vue
  4. 27 27
      pages2/wd/class.vue
  5. 145 77
      pages3/polyv/detail.vue
  6. 1 1
      pages4/login/login.vue

+ 2 - 2
common/request.js

@@ -5,8 +5,8 @@ import api from './api.js'
 var num = 1
 var num = 1
 //接口api   
 //接口api   
 // export const BASE_URL = 'https://api.xyyxt.net'   //release
 // export const BASE_URL = 'https://api.xyyxt.net'   //release
-// export const BASE_URL = 'https://test.xyyxt.net'   //预发布
-export const BASE_URL = 'http://42.192.164.187:19005'    //test
+export const BASE_URL = 'https://test.xyyxt.net'   //预发布
+// export const BASE_URL = 'http://42.192.164.187:19005'    //test
 // export const BASE_URL = 'http://192.168.1.222:5055'    //dev
 // export const BASE_URL = 'http://192.168.1.222:5055'    //dev
 
 
  //图片上传api
  //图片上传api

+ 3 - 3
pages/index/index.vue

@@ -39,21 +39,21 @@
 			</view>
 			</view>
 			<u-tabs class="tabs" :current="tabCurrent" @change="tab" :list="menu" :activeStyle="{fontSize:'36rpx'}" :inactiveStyle="{color:'#EAEEF1',fontSize:'30rpx'}" sticky></u-tabs>
 			<u-tabs class="tabs" :current="tabCurrent" @change="tab" :list="menu" :activeStyle="{fontSize:'36rpx'}" :inactiveStyle="{color:'#EAEEF1',fontSize:'30rpx'}" sticky></u-tabs>
 			<view class="menuSel" v-if="tabCurrent== 0"> 
 			<view class="menuSel" v-if="tabCurrent== 0"> 
-				<picker class="picker" @change="cMenu" :value="paramList[0].subjectId" range-key='subjectName' :range="sList">
+				<picker class="picker" @change="cMenu" range-key='subjectName' :range="sList">
 					<view class="uni-input">{{paramList[0].name}}</view>
 					<view class="uni-input">{{paramList[0].name}}</view>
 				</picker>
 				</picker>
 				<u-icon name="arrow-down"></u-icon>
 				<u-icon name="arrow-down"></u-icon>
 			 
 			 
 			</view>
 			</view>
 			<view class="menuSel" v-if="tabCurrent==1">
 			<view class="menuSel" v-if="tabCurrent==1">
-				<picker class="picker" @change="cMenu1" :value="paramList[1].subjectId" range-key='subjectName' :range="sList">
+				<picker class="picker" @change="cMenu1" range-key='subjectName' :range="sList">
 					<view class="uni-input">{{paramList[1].name}}</view>
 					<view class="uni-input">{{paramList[1].name}}</view>
 				</picker>
 				</picker>
 				<u-icon name="arrow-down"></u-icon>
 				<u-icon name="arrow-down"></u-icon>
 			  
 			  
 			</view>
 			</view>
 			<view class="menuSel" v-if="tabCurrent==2">
 			<view class="menuSel" v-if="tabCurrent==2">
-				<picker class="picker" @change="cMenu2" :value="paramList[2].subjectId" range-key='subjectName' :range="sList">
+				<picker class="picker" @change="cMenu2"  range-key='subjectName' :range="sList">
 					<view class="uni-input">{{paramList[2].name}}</view>
 					<view class="uni-input">{{paramList[2].name}}</view>
 				</picker>
 				</picker>
 				<u-icon name="arrow-down"></u-icon>
 				<u-icon name="arrow-down"></u-icon>

+ 20 - 1
pages/wd/index.vue

@@ -78,7 +78,9 @@
           class="menu_box"
           class="menu_box"
         >
         >
           <view class="box_left">
           <view class="box_left">
-            <image src="/static/icon/my_icon12.png" class="my_icon"></image>
+            <image src="/static/icon/my_icon12.png" class="my_icon">
+						</image>
+						<view class="point" v-if="total2 > 0"></view>
             <view>我的直播课</view>
             <view>我的直播课</view>
           </view>
           </view>
           <view class="box_right">
           <view class="box_right">
@@ -93,6 +95,7 @@
         >
         >
           <view class="box_left">
           <view class="box_left">
             <image src="/static/icon/my_icon2.png" class="my_icon"></image>
             <image src="/static/icon/my_icon2.png" class="my_icon"></image>
+						<view class="point" v-if="userNums.periodSum > 0"></view>
             <view>我的学时</view>
             <view>我的学时</view>
           </view>
           </view>
           <view class="box_right">
           <view class="box_right">
@@ -104,6 +107,7 @@
         <navigator hover-class="none" url="/pages5/exam/index" class="menu_box">
         <navigator hover-class="none" url="/pages5/exam/index" class="menu_box">
           <view class="box_left">
           <view class="box_left">
             <image src="/static/icon/my_icon11.png" class="my_icon"></image>
             <image src="/static/icon/my_icon11.png" class="my_icon"></image>
+						<view class="point" v-if="total1 > 0"></view>
             <view>我的模考</view>
             <view>我的模考</view>
           </view>
           </view>
           <view class="box_right">
           <view class="box_right">
@@ -114,6 +118,7 @@
         <navigator hover-class="none" url="/pages2/exam/index" class="menu_box">
         <navigator hover-class="none" url="/pages2/exam/index" class="menu_box">
           <view class="box_left">
           <view class="box_left">
             <image src="/static/icon/my_icon10.png" class="my_icon"></image>
             <image src="/static/icon/my_icon10.png" class="my_icon"></image>
+						<view class="point" v-if="userNums.subscribeSum > 0"></view>
             <view>我的考试</view>
             <view>我的考试</view>
           </view>
           </view>
           <view class="box_right">
           <view class="box_right">
@@ -129,6 +134,7 @@
         >
         >
           <view class="box_left">
           <view class="box_left">
             <image src="/static/icon/my_icon7.png" class="my_icon"></image>
             <image src="/static/icon/my_icon7.png" class="my_icon"></image>
+						<view class="point" v-if="userNums.orderSum > 0"></view>
             <view>我的订单</view>
             <view>我的订单</view>
           </view>
           </view>
           <view class="box_right">
           <view class="box_right">
@@ -139,6 +145,7 @@
         <navigator hover-class="none" url="/pages2/msg/index" class="menu_box">
         <navigator hover-class="none" url="/pages2/msg/index" class="menu_box">
           <view class="box_left">
           <view class="box_left">
             <image src="/static/icon/my_icon8.png" class="my_icon"></image>
             <image src="/static/icon/my_icon8.png" class="my_icon"></image>
+						<view class="point" v-if="userNums.informSum > 0"></view>
             <view>我的消息</view>
             <view>我的消息</view>
           </view>
           </view>
           <view class="box_right">
           <view class="box_right">
@@ -328,6 +335,7 @@ page {
   height: 56rpx;
   height: 56rpx;
   margin-right: 20rpx;
   margin-right: 20rpx;
 }
 }
+
 .menu_box {
 .menu_box {
   height: 104rpx;
   height: 104rpx;
   background: #ffffff;
   background: #ffffff;
@@ -343,6 +351,17 @@ page {
   .box_left {
   .box_left {
     display: flex;
     display: flex;
     align-items: center;
     align-items: center;
+		position:relative;
+		
+		.point {
+			width:16rpx;
+			height:16rpx;
+			border-radius:50%;
+			background: red;
+			position:absolute;
+			left:50rpx;
+			top:0;
+		}
   }
   }
 
 
   .box_right {
   .box_right {

+ 27 - 27
pages2/wd/class.vue

@@ -918,32 +918,32 @@ export default {
           } else if (res.data.code == 500) {
           } else if (res.data.code == 500) {
             //可以学习
             //可以学习
 
 
-            if (item.courseNum == 1) {
-              this.$api
-                .courseCourseList({
-                  pageNum: 1,
-                  pageSize: 1,
-                  goodsId: item.goodsId,
-                  gradeId: item.gradeId,
-                  orderGoodsId: item.orderGoodsId,
-                })
-                .then((res) => {
-                  if (res.data.code == 200) {
-                    // if(item.officialName && item.businessName == '二级' && item.projectName == '建造师') {
-                    // 	this.userConfirmInfoDetail().then(() => {
-                    // 			uni.navigateTo({
-                    // 					url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}`
-                    // 				})
-                    // 	})
-                    // } else {
-                    uni.navigateTo({
-                      url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}`,
-                    });
-                    // }
-                  }
-                });
-              return;
-            }
+            // if (item.courseNum == 1) {
+            //   this.$api
+            //     .courseCourseList({
+            //       pageNum: 1,
+            //       pageSize: 1,
+            //       goodsId: item.goodsId,
+            //       gradeId: item.gradeId,
+            //       orderGoodsId: item.orderGoodsId,
+            //     })
+            //     .then((res) => {
+            //       if (res.data.code == 200) {
+            //         // if(item.officialName && item.businessName == '二级' && item.projectName == '建造师') {
+            //         // 	this.userConfirmInfoDetail().then(() => {
+            //         // 			uni.navigateTo({
+            //         // 					url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}`
+            //         // 				})
+            //         // 	})
+            //         // } else {
+            //         uni.navigateTo({
+            //           url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}`,
+            //         });
+            //         // }
+            //       }
+            //     });
+            //   return;
+            // }
 
 
             // if(item.officialName && item.businessName == '二级' && item.projectName == '建造师') {
             // if(item.officialName && item.businessName == '二级' && item.projectName == '建造师') {
             // 	// this.userConfirmInfoDetail().then(() => {
             // 	// this.userConfirmInfoDetail().then(() => {
@@ -951,7 +951,7 @@ export default {
             // 	// })
             // 	// })
             // } else {
             // } else {
             this.$navTo.togo(
             this.$navTo.togo(
-              `/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`
+              `/pages3/polyv/detail?goodsId=${item.goodsId}&gid=${i}&orderGoodsId=${item.orderGoodsId}`
             );
             );
             // }
             // }
           }
           }

+ 145 - 77
pages3/polyv/detail.vue

@@ -88,6 +88,10 @@
           </u-col>
           </u-col>
         </u-row>
         </u-row>
       </view>
       </view>
+			<view class="course-list" v-if="courseList.length > 1">
+				<picker class="picker"  @change="courseChange2" range-key='courseName' :range="courseList">{{courseName}}</picker>
+				<u-icon name="arrow-down"></u-icon>
+			</view>
       <u-line color="#D6D6DB" />
       <u-line color="#D6D6DB" />
       <view>
       <view>
         <view
         <view
@@ -555,6 +559,7 @@ export default {
   },
   },
   data() {
   data() {
     return {
     return {
+			courseName:'',
       markContent: "http://admin.zhujianpeixun.com/",
       markContent: "http://admin.zhujianpeixun.com/",
       showMark: false,
       showMark: false,
       hasStart: false,
       hasStart: false,
@@ -622,6 +627,7 @@ export default {
       placeholder: "您可以在这里输入答疑内容",
       placeholder: "您可以在这里输入答疑内容",
       ctxValue: "",
       ctxValue: "",
       noteList: [],
       noteList: [],
+			courseList:[],
       noteValue: "",
       noteValue: "",
       noteId: 0,
       noteId: 0,
       recordObj: 0,
       recordObj: 0,
@@ -687,7 +693,7 @@ export default {
     // 	this.studyRecordQueryLiveLast();
     // 	this.studyRecordQueryLiveLast();
     // }
     // }
   },
   },
-  onShow() {
+  async onShow() {
     var self = this;
     var self = this;
     //相机授权
     //相机授权
     // this.userConfirmInfoDetail().then(res => {
     // this.userConfirmInfoDetail().then(res => {
@@ -698,39 +704,37 @@ export default {
       this.showMark = true;
       this.showMark = true;
       return;
       return;
     }
     }
-    this.getbaseprofiletplists().then((res) => {
-      this.courseDetail();
-      this.getGoodsDetail();
-      this.getAnswerList();
-      this.studyRecordMenuAllList();
-      this.answerTimer = setInterval(() => {
-        this.getAnswerList();
-      }, 5000);
-      let noteSecond = Number(this.option.noteSecond);
-      if (noteSecond > 0) {
-        //我的消息跳过来,播放节
-        let item = {
-          sectionId: Number(this.option.sectionId),
-          recordingUrl: this.option.recordingUrl,
-          noteSecond: noteSecond,
-          studyDuration: noteSecond,
-        };
-        let playNextId = `moduleId${this.option.moduleId}chapterId${
-          this.option.chapterId
-        }sectionId${this.option.sectionId}${
-          this.option.isRebuild ? "isRebuild" : ""
-        }`;
-        this.$store.commit("setPlaySectionId", {
-          playSectionId: item.sectionId,
-        });
-        this.$store.commit("setPlayVID", { playVID: item.recordingUrl });
-        this.$store.commit("updatePlayNextId", playNextId);
-        console.log("this.playNoteVideo");
-
-        this.playNoteVideo(item);
-      } else {
-        this.studyRecordQueryLiveLast();
-      }
+		await this.getGoodsDetail();
+    this.getbaseprofiletplists().then(async (res) => {
+			await this.courseCourseList();
+			if(this.option.recordingUrl) {
+				let noteSecond = Number(this.option.noteSecond);
+				if (noteSecond > 0) {
+				  //我的消息跳过来,播放节
+				  let item = {
+				    sectionId: Number(this.option.sectionId),
+				    recordingUrl: this.option.recordingUrl,
+				    noteSecond: noteSecond,
+				    studyDuration: noteSecond,
+				  };
+				  let playNextId = `moduleId${this.option.moduleId}chapterId${
+				    this.option.chapterId
+				  }sectionId${this.option.sectionId}${
+				    this.option.isRebuild ? "isRebuild" : ""
+				  }`;
+				  this.$store.commit("setPlaySectionId", {
+				    playSectionId: item.sectionId,
+				  });
+				  this.$store.commit("setPlayVID", { playVID: item.recordingUrl });
+				  this.$store.commit("updatePlayNextId", playNextId);
+				  console.log("this.playNoteVideo");
+				
+				  this.playNoteVideo(item);
+				} else {
+				  this.studyRecordQueryLiveLast();
+				}
+			}
+      
     });
     });
 
 
     console.log(this.gradeId, 7512);
     console.log(this.gradeId, 7512);
@@ -821,6 +825,51 @@ export default {
         delta: 1,
         delta: 1,
       });
       });
     },
     },
+		courseCourseList() {
+			return new Promise((resolve) => {
+				this.$api.courseCourseList({
+					gradeId:this.gradeId,
+					goodsId:this.goodsId,
+					pageSize:10,
+					pageNum:1,
+				}).then(async (res) => {
+					this.courseList.push(...res.data.rows);
+					if (!this.courseId) {
+						this.courseId = this.courseList[0].courseId;
+						this.courseName =  this.courseList[0].courseName;
+					} else {
+						this.courseName =  this.courseList.find(item => item.courseId == this.courseId).courseName;
+					}
+					await this.courseChange();
+
+					resolve();
+				});
+			});
+		},
+		courseChange2(e) {
+			this.courseId = this.courseList[e.detail.value].courseId;
+			this.courseName =  this.courseList[e.detail.value].courseName;
+			this.courseChange();
+		},
+		/**
+		 * 切换科目
+		 */
+		courseChange() {
+			return new Promise((resolve) => {
+				
+				this.courseDetail();
+				this.getAnswerList();
+				this.studyRecordMenuAllList();
+				this.getNoteList();
+				this.getMenuList();
+				this.getReMenuList(); //获取重修目录
+				clearTimeout(this.answerTimer)
+				this.answerTimer = setInterval(() => {
+				  this.getAnswerList();
+				}, 5000);
+				resolve();
+			});
+		},
     markConfirm() {
     markConfirm() {
       uni.setClipboardData({
       uni.setClipboardData({
         data: this.markContent,
         data: this.markContent,
@@ -1684,7 +1733,6 @@ export default {
       }
       }
       this.startStatus = true;
       this.startStatus = true;
       //获取节笔记
       //获取节笔记
-      this.getNoteList();
     },
     },
     //正常播放视频
     //正常播放视频
     async playVideo(item) {
     async playVideo(item) {
@@ -2320,48 +2368,51 @@ export default {
       }
       }
     },
     },
     getGoodsDetail() {
     getGoodsDetail() {
-      let self = this;
-      this.$api.goodsDetail(this.goodsId).then((res) => {
-        self.goodsData = res.data.data;
-        if (self.goodsData.buyNote) {
-          this.baseHandoutTipList();
-        }
-        self.gradeId = self.goodsData.gradeId;
-        console.log(self.gradeId, "班级ID");
-        this.courseBusiness();
-        this.courseHandouts();
-        self.getMenuList();
-        self.getReMenuList(); //获取重修目录
-        setTimeout(function () {
-          if (!self.needProfileModal) {
-            self.getGradeInfo();
-          }
-        }, 500);
-
-        //获取节笔记
-        this.getNoteList();
-        if (self.goodsData.goodsPlayConfig) {
-          self.goodsPlayConfig = JSON.parse(self.goodsData.goodsPlayConfig);
-          if (self.goodsPlayConfig.autoPlay > 0) {
-            self.autoplay = true;
-          }
-          if (self.goodsPlayConfig.drag > 0) {
-            self.isAllowSeek = "yes";
-          }
-          if (self.goodsPlayConfig.speed > 0) {
-            self.playbackRate = [0.5, 0.8, 1.0, 1.25, 1.5, 2.0];
-          }
-        }
-        if (self.goodsData.goodsPhotographConfig) {
-          self.goodsPhotographConfig = JSON.parse(
-            self.goodsData.goodsPhotographConfig
-          );
-          if (self.goodsPhotographConfig.photoNum > 0) {
-            self.photoNum = self.goodsPhotographConfig.photoNum;
-            console.log(self.photoNum, 777777);
-          }
-        }
-      });
+			return new Promise(resolve => {
+				let self = this;
+				this.$api.goodsDetail(this.goodsId).then((res) => {
+				  self.goodsData = res.data.data;
+				  if (self.goodsData.buyNote) {
+				    this.baseHandoutTipList();
+				  }
+				  self.gradeId = self.goodsData.gradeId;
+				  console.log(self.gradeId, "班级ID");
+				  this.courseBusiness();
+				  this.courseHandouts();
+				  setTimeout(function () {
+				    if (!self.needProfileModal) {
+				      self.getGradeInfo();
+				    }
+				  }, 500);
+				
+				  //获取节笔记
+				  this.getNoteList();
+				  if (self.goodsData.goodsPlayConfig) {
+				    self.goodsPlayConfig = JSON.parse(self.goodsData.goodsPlayConfig);
+				    if (self.goodsPlayConfig.autoPlay > 0) {
+				      self.autoplay = true;
+				    }
+				    if (self.goodsPlayConfig.drag > 0) {
+				      self.isAllowSeek = "yes";
+				    }
+				    if (self.goodsPlayConfig.speed > 0) {
+				      self.playbackRate = [0.5, 0.8, 1.0, 1.25, 1.5, 2.0];
+				    }
+				  }
+				  if (self.goodsData.goodsPhotographConfig) {
+				    self.goodsPhotographConfig = JSON.parse(
+				      self.goodsData.goodsPhotographConfig
+				    );
+				    if (self.goodsPhotographConfig.photoNum > 0) {
+				      self.photoNum = self.goodsPhotographConfig.photoNum;
+				      console.log(self.photoNum, 777777);
+				    }
+				  }
+					
+					resolve()
+				});
+			})
+      
     },
     },
     startVideo() {
     startVideo() {
       this.startStatus = true;
       this.startStatus = true;
@@ -2572,6 +2623,23 @@ export default {
     .desc {
     .desc {
     }
     }
   }
   }
+	
+}
+
+.course-list {
+	padding:0 24rpx;
+	margin:24rpx 0;
+	width: 100%;
+	height: 70rpx;
+	background: #fff;
+	display: flex;
+	align-items: center;
+	background:#fff;
+	border-radius: 16rpx;
+	
+	.picker {
+		flex:1;
+	}
 }
 }
 .polyv_detail {
 .polyv_detail {
   display: flex;
   display: flex;

+ 1 - 1
pages4/login/login.vue

@@ -2,7 +2,7 @@
   <view style="height: 100%">
   <view style="height: 100%">
     <image
     <image
       mode="widthFix"
       mode="widthFix"
-      src="/pages5/static/login_bg.jpg"
+      src="/pages4/static/login_bg.jpg"
       class="full_img"
       class="full_img"
     ></image>
     ></image>
     <u-navbar
     <u-navbar