liukang 2 年之前
父节点
当前提交
d1643c08fc
共有 100 个文件被更改,包括 585 次插入230 次删除
  1. 4 1
      jxtxkj/pages/index/course/buy.vue
  2. 34 12
      jxtxkj/pages/index/course/detail.vue
  3. 57 10
      jxtxkj/pages/index/exam/exam.vue
  4. 14 1
      jxtxkj/pages/index/exam/submit.vue
  5. 16 7
      jxtxkj/pages/index/index.vue
  6. 32 5
      jxtxkj/pages/index/search/search.vue
  7. 1 0
      jxtxkj/pages/integral/integral.vue
  8. 13 4
      jxtxkj/pages/mine/allCourse.vue
  9. 38 30
      jxtxkj/pages/mine/certificate.vue
  10. 8 2
      jxtxkj/pages/mine/collect.vue
  11. 7 3
      jxtxkj/pages/mine/comment.vue
  12. 6 1
      jxtxkj/pages/mine/exam/exam.vue
  13. 23 5
      jxtxkj/pages/mine/mine.vue
  14. 5 1
      jxtxkj/pages/mine/order/apply.vue
  15. 16 20
      jxtxkj/pages/mine/order/order.vue
  16. 15 12
      jxtxkj/pages/mine/password/editPassword.vue
  17. 27 16
      jxtxkj/pages/mine/personal.vue
  18. 二进制
      jxtxkj/static/images/mine/code.png
  19. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map
  20. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-avatar/u-avatar.js.map
  21. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-badge/u-badge.js.map
  22. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-button/u-button.js.map
  23. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-checkbox-group/u-checkbox-group.js.map
  24. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-checkbox/u-checkbox.js.map
  25. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-code/u-code.js.map
  26. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-count-down/u-count-down.js.map
  27. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-form-item/u-form-item.js.map
  28. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-icon/u-icon.js.map
  29. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-image/u-image.js.map
  30. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-input/u-input.js.map
  31. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-line-progress/u-line-progress.js.map
  32. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-line/u-line.js.map
  33. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-link/u-link.js.map
  34. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-loading-icon/u-loading-icon.js.map
  35. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-modal/u-modal.js.map
  36. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-navbar/u-navbar.js.map
  37. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-overlay/u-overlay.js.map
  38. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-parse/node/node.js.map
  39. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-parse/u-parse.js.map
  40. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-popup/u-popup.js.map
  41. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-radio-group/u-radio-group.js.map
  42. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-radio/u-radio.js.map
  43. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-safe-bottom/u-safe-bottom.js.map
  44. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-status-bar/u-status-bar.js.map
  45. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-swiper-indicator/u-swiper-indicator.js.map
  46. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-swiper/u-swiper.js.map
  47. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-tabs/u-tabs.js.map
  48. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-text/u-text.js.map
  49. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-transition/u-transition.js.map
  50. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/course/buy.js.map
  51. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/course/detail.js.map
  52. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/declare/declare.js.map
  53. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/declare/declare_success.js.map
  54. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/exam/exam.js.map
  55. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/exam/parse.js.map
  56. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/exam/submit.js.map
  57. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map
  58. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/search/search.js.map
  59. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/integral/integral.js.map
  60. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/choose.js.map
  61. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/forget.js.map
  62. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/login.js.map
  63. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/register.js.map
  64. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/allCourse.js.map
  65. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/certificate.js.map
  66. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/change.js.map
  67. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/collect.js.map
  68. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/comment.js.map
  69. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/exam/exam.js.map
  70. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/exam/wrong.js.map
  71. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/mine.js.map
  72. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/order/apply.js.map
  73. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/order/detail.js.map
  74. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/order/order.js.map
  75. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/password/editPassword.js.map
  76. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/password/success.js.map
  77. 0 0
      jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/personal.js.map
  78. 4 1
      jxtxkj/unpackage/dist/dev/mp-weixin/pages/index/course/buy.js
  79. 46 24
      jxtxkj/unpackage/dist/dev/mp-weixin/pages/index/course/detail.js
  80. 0 0
      jxtxkj/unpackage/dist/dev/mp-weixin/pages/index/course/detail.wxml
  81. 61 14
      jxtxkj/unpackage/dist/dev/mp-weixin/pages/index/exam/exam.js
  82. 3 3
      jxtxkj/unpackage/dist/dev/mp-weixin/pages/index/exam/exam.wxss
  83. 11 2
      jxtxkj/unpackage/dist/dev/mp-weixin/pages/index/exam/submit.js
  84. 0 0
      jxtxkj/unpackage/dist/dev/mp-weixin/pages/index/exam/submit.wxml
  85. 15 6
      jxtxkj/unpackage/dist/dev/mp-weixin/pages/index/index.js
  86. 0 0
      jxtxkj/unpackage/dist/dev/mp-weixin/pages/index/index.wxml
  87. 30 3
      jxtxkj/unpackage/dist/dev/mp-weixin/pages/index/search/search.js
  88. 0 0
      jxtxkj/unpackage/dist/dev/mp-weixin/pages/index/search/search.wxml
  89. 1 0
      jxtxkj/unpackage/dist/dev/mp-weixin/pages/integral/integral.wxss
  90. 11 2
      jxtxkj/unpackage/dist/dev/mp-weixin/pages/mine/allCourse.js
  91. 0 0
      jxtxkj/unpackage/dist/dev/mp-weixin/pages/mine/allCourse.wxml
  92. 33 34
      jxtxkj/unpackage/dist/dev/mp-weixin/pages/mine/certificate.js
  93. 1 1
      jxtxkj/unpackage/dist/dev/mp-weixin/pages/mine/certificate.wxml
  94. 10 0
      jxtxkj/unpackage/dist/dev/mp-weixin/pages/mine/certificate.wxss
  95. 8 2
      jxtxkj/unpackage/dist/dev/mp-weixin/pages/mine/collect.js
  96. 7 3
      jxtxkj/unpackage/dist/dev/mp-weixin/pages/mine/comment.js
  97. 6 1
      jxtxkj/unpackage/dist/dev/mp-weixin/pages/mine/exam/exam.js
  98. 9 4
      jxtxkj/unpackage/dist/dev/mp-weixin/pages/mine/mine.js
  99. 0 0
      jxtxkj/unpackage/dist/dev/mp-weixin/pages/mine/mine.wxml
  100. 13 0
      jxtxkj/unpackage/dist/dev/mp-weixin/pages/mine/mine.wxss

+ 4 - 1
jxtxkj/pages/index/course/buy.vue

@@ -88,6 +88,7 @@
 			}
 		},
 		onLoad(options) {
+			console.log(options);
 			this.order_no = options.order_no
 			this.id = options.id
 			this.getData(this.id)
@@ -153,6 +154,8 @@
 						  ...payment,
 						  success (res) {
 							console.log('pay success', res)
+							$api.info('支付成功')
+							$api.jump('/pages/index/course/detail?id=' + that.id)
 						  },
 						  fail (err) {
 							console.error('pay fail', err)
@@ -174,7 +177,7 @@
 				}, function(res) {
 					$api.info(res.msg)
 					that.showPay = false
-					$api.jump('/pages/index/course/detail/id=' + that.good.id,1)
+					$api.jump('/pages/index/course/detail?id=' + that.good.id,1)
 				})
 			}
 		}

+ 34 - 12
jxtxkj/pages/index/course/detail.vue

@@ -103,6 +103,9 @@
 						</view>
 					</view>
 				</block>
+				<view class="box3 hflex acenter jbetween text_style2" v-if="course.is_questions == 1"  @click="openExam">
+					在线考试
+				</view>
 			</u-checkbox-group>
 		</view>
 		<view class="content" v-else-if="active == 2">
@@ -128,7 +131,7 @@
 		<view class="bottom hflex acenter jcenter">
 			<u-button v-if="course.is_buy == 0" @click="buyCourse">立即参加</u-button>
 			<view class="hflex acenter" v-else-if="active == 2">
-				<u-input placeholder="说点什么吧" v-model="commentValue">
+				<u-input placeholder="说点什么吧" v-model="commentValue" :adjustPosition="false">
 					<template slot="suffix">
 						<image src="/static/images/index/commentIcon.png" mode="widthFix" style="width: 44rpx;padding-top: 10rpx;"></image>
 					</template>
@@ -138,11 +141,11 @@
 			<view class="" v-else-if="active == 0">
 				<u-button v-if="course.study_class_count == course.period" @click="openExam">开始考试</u-button>
 				<!-- <u-button v-else-if="course.study_class_count !== 0">继续学习</u-button> -->
-				<u-button v-else-if="course.is_buy == 1" @click="startStudy(1)">开始学习</u-button>
+				<u-button v-else-if="course.is_buy == 1" @click="startStudy(catalog[0].id)">开始学习</u-button>
 			</view>
 		</view>
 		<!-- 考试须知 -->
-		<u-modal :show="exam.show" title="考试须知" confirmText="开始考试" @confirm="startExam">
+		<u-modal :show="exam.show" title="考试须知" confirmText="开始考试" @confirm="startExam" :closeOnClickOverlay="true" @close="close">
 			<view class="slot-content">
 				<rich-text :nodes="exam.content"></rich-text>
 			</view>
@@ -391,7 +394,7 @@
 					console.log(res)
 					if(res.code == 1) {
 						that.catalog[index].selected = true
-						that.getData(id)
+						that.getData(that.course.id)
 					}
 				})
 			},			
@@ -432,8 +435,18 @@
 			},
 			// 开始考试
 			startExam() {
-				$api.jump('/pages/index/exam/exam?id=' + this.course.id)
-				this.exam.show = false
+				if (this.progress == 100) {
+					if (this.course.can_test == 1) {
+						$api.jump('/pages/index/exam/exam?id=' + this.course.id)
+						this.exam.show = false
+					} else {
+						$api.info('未到时间')
+					}
+				} else {
+					$api.info("请先学习所有课程")
+				}
+				
+				
 				/* var that = this
 				$api.req({
 					url: '/api/User/startQuestions',
@@ -464,12 +477,21 @@
 			// 打开考试须知
 			openExam() {
 				var that = this
-				$api.req({
-					url: '/api/Publics/config_info'
-				}, function(res) {
-					that.exam.show = true
-					that.exam.content = res.data.test_instructions 
-				})
+				if(that.course.is_buy == 1) {
+					$api.req({
+						url: '/api/Publics/config_info'
+					}, function(res) {
+						that.exam.show = true
+						that.exam.content = res.data.test_instructions 
+					})
+				} else {
+					$api.info('请先购买课程')
+				}
+				
+			},
+			// 关闭
+			close() {
+				this.exam.show = false
 			}
 		}
 	}

+ 57 - 10
jxtxkj/pages/index/exam/exam.vue

@@ -126,6 +126,9 @@
 						that.id = res.data.course_id
 						that.log_id = res.data.log_id
 						that.getQuestions()
+					} else {
+						$api.info(res.msg)
+						$api.jump(-1)
 					}
 				})
 			},
@@ -168,13 +171,13 @@
 				if (that.examPaper[index].type !== 2) {
 					that.choice = that.examPaper[index].items[option].ladder_title
 					that.values = {
-						id: that.index,
+						id: that.examPaper[index].id,
 						answer: that.choice
 					}
 				} else {
 					that.choice = that.choice + that.examPaper[index].items[option].ladder_title + '、'
 					that.values = {
-						id: that.index,
+						id: that.examPaper[index].id,
 						answer: that.choice
 					}
 				}
@@ -182,7 +185,8 @@
 			// 去答题卡对应题目
 			toTest(inx) {
 				var that = this
-				that.values = {}
+				that.choice = ''
+				that.values = []
 				that.index = inx + 1
 				that.showSheet = false
 				console.log("values: ",that.values);
@@ -199,6 +203,7 @@
 			// 下一题
 			nextExam() {
 				var that = this
+				console.log(that.values.answer)
 				if (that.values !== {}) {
 					if(that.values.answer.charAt(that.values.answer.length - 1) == '、') {
 						that.values.answer = that.values.answer.substr(0,that.values.answer.length-1);
@@ -214,7 +219,7 @@
 						}
 					}
 					console.log(1111);
-					console.log(that.answer);
+					console.log(that.values);
 					if (that.values.length !== 0) {
 						that.answer.push(that.values)
 					}
@@ -231,24 +236,63 @@
 			},
 			// 最后一题
 			submit() {
-				if(this.values.answer.charAt(this.values.answer.length - 1) == '、') {
+				/* if(this.values.answer.charAt(this.values.answer.length - 1) == '、') {
 					this.values.answer = this.values.answer.substr(0,this.values.answer.length-1);
 				}
 				this.answer.push(this.values)
 				if (this.choice != '') {
 					this.examPaper[this.index - 1].state = true
+				} */
+				var that = this
+				console.log(that.values.answer)
+				if (that.values !== {}) {
+					if(that.values.answer.charAt(that.values.answer.length - 1) == '、') {
+						that.values.answer = that.values.answer.substr(0,that.values.answer.length-1);
+					}
 				}
-				this.choice = ''
-				this.values = []
+				if (that.answer.length > 0) {
+					console.log(that.answer);
+					for (let i = 0;i<that.answer.length;i++) {
+						if (that.values.id == that.answer[i].id) {
+							that.answer[i].answer = that.values.answer
+							that.values = []
+							break;
+						}
+					}
+					console.log(1111);
+					console.log(that.values);
+					if (that.values.length !== 0) {
+						that.answer.push(that.values)
+					}
+					
+				} else {
+					that.answer.push(that.values)
+				}
+				if (that.choice != '') {
+					that.examPaper[that.index - 1].state = true
+				}
+				// this.choice = ''
+				// this.values = []
 				this.open()
 			},
 			// 倒计时结束
 			finish() {
 				console.log("倒计时结束,自动交卷");
+				// this.submitExam()
 			},
 			// 交卷
 			submitExam() {
 				var that = this
+				console.log(typeof(that.answer))
+				let obj = []
+				for (let i=0;i<that.answer.length;i++) {
+					if (obj.indexOf(that.answer[i].id) == -1) {
+						obj.push(that.answer[i].id)
+					} else {
+						that.answer.splice(i,1)
+					}
+				}
+				console.log(that.answer)	
 				that.answer = JSON.stringify(that.answer)
 				$api.req({
 					url: '/api/User/subQuestions',
@@ -260,7 +304,10 @@
 				}, function(res) {
 					if(res.code == 1) {
 						$api.jump('/pages/index/exam/submit?data=' + JSON.stringify(res.data) + '&log_id=' + that.log_id, 1)
+					} else {
+						$api.info(res.msg)
 					}
+					
 				})
 			}
 		}
@@ -273,13 +320,13 @@
 		.u-navbar {
 			width: 100%;
 			box-sizing: border-box;
-			padding: 36px 16px 58rpx 0;
+			padding: 36px 16px 100rpx 0;
 		}
 		.top {
 			width: 100%;
-			margin: 14rpx 0;
+			margin: 14rpx 0 14rpx;
 			box-sizing: border-box;
-			padding: 16rpx 30rpx;
+			padding: 16rpx 30rpx 16rpx;
 			background: #FFFFFF;
 		}
 		.name {

+ 14 - 1
jxtxkj/pages/index/exam/submit.vue

@@ -6,7 +6,7 @@
 			<view class="box vflex acenter jcenter">
 				<view v-if="course.is_pass == 0" class="title">考试未合格</view>
 				<view v-else class="title">
-					<image :src="course.certificate" mode="widthFix" style="width: 660rpx;"></image>
+					<image :src="course.certificate" mode="widthFix" style="width: 660rpx;" @click="clickImg"></image>
 				</view>
 				<view class="hflex aend">
 					<view v-if="course.is_pass == 0" class="score">{{course.score}}</view>
@@ -104,6 +104,19 @@
 			// 查看解析
 			parse(state) {
 				$api.jump('/pages/index/exam/parse?state=' + state + '&log_id=' + this.log_id)
+			},
+			clickImg() {
+				var that = this
+				uni.previewImage({
+					urls: [that.course.certificate],
+					current: '',
+					success:function(res){
+						
+					},
+					fail:function(res){
+						
+					}
+				})
 			}
 		}
 	}

+ 16 - 7
jxtxkj/pages/index/index.vue

@@ -12,11 +12,14 @@
 			<image :src="banner" mode="widthFix" style="width: 100%;border-radius: 12px;" @click="declare"></image>
 		</view>
 		<view class="tabs hflex acenter jaround">
-			<block v-for="(item,index) in tabs" :key="index">
-				<view class="tabs_item" :class="index == active ? 'active' : ''" @click="changeTabs(index)"> 
-					{{item.name}}
-				</view>
-			</block>
+			<scroll-view scroll-x="true" :scroll-left="scrollLeft" :scroll-with-animation="true">
+				<block v-for="(item,index) in tabs" :key="index">
+					<view class="tabs_item" :class="index == active ? 'active' : ''" @click="changeTabs(index)"> 
+						{{item.name}}
+					</view>
+				</block>
+			</scroll-view>
+			
 		</view>
 		<view class="list vflex acenter jcenter" v-if="product.length == 0">
 			<image src="/static/images/index/empty-list.png" mode="aspectFill"></image>
@@ -138,8 +141,14 @@
 				}, function(res) {
 					console.log(res);
 					if(res.code == 1) {
-						that.total = res.data.count
-						that.product = that.product.concat(res.data.list)
+						if (that.page == 1) {
+							that.total = res.data.count
+							that.product = res.data.list
+						} else {
+							that.total = res.data.count
+							that.product = that.product.concat(res.data.list)
+						}
+						
 					}
 				})
 			},

+ 32 - 5
jxtxkj/pages/index/search/search.vue

@@ -25,7 +25,7 @@
 		</view>
 		<view class="content" v-else-if="product.length>0">
 			<block v-for="(item,index) in product" :key="index">
-				<view class="item2 hflex" @click="detail(index)">
+				<view class="item2 hflex" @tap="detail(index)">
 					<u--image :src="item.img" width="322rpx" height="182rpx" radius="8"></u--image>
 					<view class="item_right">
 						<view class="title">
@@ -39,8 +39,8 @@
 						</view>
 						<view class="hflex acenter jbetween">
 							<view class="price">¥{{item.price}}</view>
-							<!-- <u-icon v-if="item.is_collection" name="star-fill" color="#FA6400" size="28" @click="collect(index)"></u-icon>
-							<u-icon v-else name="star" color="#FA6400" size="28" @click="collect(index)"></u-icon> -->
+							<u-icon v-if="item.is_collection == 1" name="star-fill" color="#FA6400" size="28" @tap.stop="collect(index)"></u-icon>
+							<u-icon v-else name="star" color="#FA6400" size="28" @tap.stop="collect(index)"></u-icon>
 						</view>
 					</view>
 				</view>
@@ -96,8 +96,14 @@
 					}
 				}, function(res) {
 					if(res.code == 1) {
-						that.product = res.data.list
-						that.total = res.data.count
+						if(that.page == 1) {
+							that.product = res.data.list
+							that.total = res.data.count
+						} else {
+							that.total = res.data.count
+							that.product = that.product.concat(res.data.list)
+						}
+						
 					}
 				})
 			},
@@ -158,6 +164,27 @@
 					this.change()
 				}
 			},
+			// 收藏
+			collect(index) {
+				var that = this
+				if (that.product[index].is_collection == 0) {
+					that.product[index].is_collection = 1
+				} else {
+					that.product[index].is_collection = 0
+				}
+				$api.req({
+					url: '/api/Index/collectionCancelCourse',
+					data: {
+						id: that.product[index].id,
+						type: that.product[index].is_collection
+					}
+				}, function(res) {
+					console.log("收藏=",res);
+					if (res.code == 1) {
+						$api.info(res.msg)
+					}
+				})
+			},
 		}
 	}
 </script>

+ 1 - 0
jxtxkj/pages/integral/integral.vue

@@ -324,6 +324,7 @@
 			font-weight: 400;
 			color: #999999;
 			font-size: 32rpx;
+			margin-right: 36rpx;
 		}
 		.active {
 			position: relative;

+ 13 - 4
jxtxkj/pages/mine/allCourse.vue

@@ -7,7 +7,7 @@
 		</view>
 		<view class="list" v-if="active == 0">
 			<block v-for="(item,index) in course" :key="index">
-				<view class="list_item hflex acenter">
+				<view class="list_item hflex acenter" @click="toDetail(index)">
 					<image :src="item.img" mode="widthFix" style="width: 322rpx;border-radius: 16rpx;"></image>
 					<view class="img_right vflex">
 						<view class="img_title">
@@ -25,7 +25,7 @@
 		</view>
 		<view class="list" v-if="active == 1">
 			<block v-for="(item,index) in course" :key="index">
-				<view class="list_item hflex acenter">
+				<view class="list_item hflex acenter" @click="toDetail(index)">
 					<image :src="item.img" mode="widthFix" style="width: 322rpx;border-radius: 16rpx;"></image>
 					<view class="img_right vflex">
 						<view class="img_title">
@@ -85,8 +85,12 @@
 				}, function(res) {
 					console.log("我的课程",res);
 					if (res.code == 1) {
-						that.course = res.data.list
-						that.total = rea.data.count
+						if(that.page == 1) {
+							that.course = res.data.list
+							that.total = res.data.count
+						} else {
+							that.course = that.course.concat(res.data.list)
+						}
 						that.totalProgress()
 					}
 				})
@@ -104,6 +108,7 @@
 				for(var i = 0; i<course.length;i++) {
 					course[i].progress = course[i].study_class_count / course[i].class_count * 100
 				}
+				console.log(course)
 				this.course = course
 			},
 			// 触底事件
@@ -119,6 +124,10 @@
 					this.getCourse(this.type)
 				}
 			},
+			// 进入课程详情
+			toDetail(index) {
+				$api.jump('/pages/index/course/detail?id=' + this.course[index].id)
+			}
 		}
 	}
 </script>

+ 38 - 30
jxtxkj/pages/mine/certificate.vue

@@ -2,20 +2,26 @@
 	<view class="web_box">
 		<!-- <u-navbar height="44" leftIcon="arrow-left" leftIconColor="#000" leftText="我的证书" @leftClick="leftClick" :autoBack="true" bgColor="#fff">
 		</u-navbar> -->
-		<view class="list">
+		<view class="list" v-if="certificateList.length > 0">
 			<block v-for="(item,index) in certificateList" :key="index">
 				<view class="list_item hflex acenter">
-					<u-image :src="item.img" width="320rpx" height="232rpx"></u-image>
+					<u-image :src="item.certificate" width="320rpx" height="232rpx" @click="clickimg(index)"></u-image>
 					<view class="img_right vflex jbetween">
 						<view class="name">证书名称:{{item.name}}</view>
 						<view>
-							<view class="text_style1">证书编号:{{item.number}}</view>
-							<view class="text_style1">颁发时间:{{item.date}}</view>
+							<view class="text_style1">证书编号:{{item.certificate_number}}</view>
+							<view class="text_style1">颁发时间:{{item.create_at}}</view>
 						</view>
 					</view>
 				</view>
 			</block>
 		</view>
+		<view class="list vflex acenter jcenter" v-else>
+			<image src="../../static/images/common/collect_none.png" class="img_none"></image>
+			<view class="text_none">
+				暂无证书
+			</view>
+		</view>
 	</view>
 </template>
 
@@ -25,30 +31,7 @@
 		data() {
 			return {
 				certificateList: [
-					/* {
-						img: '/static/images/mine/certificate.jpg',
-						name: '城市桥梁工程',
-						number: '4524165434424415',
-						date: '2022-07-05'
-					},
-					{
-						img: '/static/images/mine/certificate.jpg',
-						name: '道路建筑材料(沥青、钢材及其他新型材料)',
-						number: '4524165434424415',
-						date: '2022-07-05'
-					},
-					{
-						img: '/static/images/mine/certificate.jpg',
-						name: '城市桥梁工程',
-						number: '4524165434424415',
-						date: '2022-07-05'
-					},
-					{
-						img: '/static/images/mine/certificate.jpg',
-						name: '城市桥梁工程',
-						number: '4524165434424415',
-						date: '2022-07-05'
-					} */
+					
 				],
 				page: 1,
 				limit: 10,
@@ -73,8 +56,13 @@
 					}
 				}, function(res) {
 					if (res.code == 1) {
-						that.certificateList = res.data.list
-						that.total = res.data.count
+						if(that.page == 1) {
+							that.certificateList = res.data.list
+							that.total = res.data.count
+						} else {
+							that.certificateList = that.certificateList.concat(res.data.list)
+						}
+						
 					}
 				})
 			},
@@ -88,6 +76,16 @@
 					this.page++
 					this.getCertificateList()
 				}
+			},
+			clickimg(index) {
+				var that = this
+				uni.previewImage({
+					urls: [that.certificateList[index].certificate],
+					current: '',
+					success:function(res){
+						
+					}
+				})
 			}
 		}
 	}
@@ -126,5 +124,15 @@
 			font-weight: 400;
 			color: #333333;
 		}
+		.text_none {
+			font-size: 32rpx;
+			color: #333333;
+			margin-top: 44rpx;
+		}
+		.img_none {
+			margin-top: 300rpx;
+			width: 570rpx;
+			height: 328rpx;
+		}
 	}
 </style>

+ 8 - 2
jxtxkj/pages/mine/collect.vue

@@ -60,8 +60,14 @@
 				}, function(res) {
 					console.log("我的课程",res);
 					if (res.code == 1) {
-						that.collectList = res.data.list
-						that.total = res.data.count
+						if(that.page == 1) {
+							that.collectList = res.data.list
+							that.total = res.data.count
+						} else {
+							that.collectList = that.collectList.concat(res.data.list)
+							that.total = res.data.count
+						}
+						
 					}
 				})
 			},

+ 7 - 3
jxtxkj/pages/mine/comment.vue

@@ -66,9 +66,13 @@
 				}, function(res) {
 					console.log(res)
 					if (res.code == 1) {
-						that.total = res.data.count
-						that.commentList = that.commentList.concat(res.data.list)
-						console.log(that.commentList);
+						if (that.page == 1) {
+							that.total = res.data.count
+							that.commentList = res.data.list
+						} else {
+							that.total = res.data.count
+							that.commentList = that.commentList.concat(res.data.list)
+						}
 					}
 				})
 			},

+ 6 - 1
jxtxkj/pages/mine/exam/exam.vue

@@ -110,7 +110,12 @@
 			},
 			// 考试详情
 			toDetail(index) {
-				
+				if (this.record[index].can_test == 1) {
+					$api.jump('/pages/index/exam/exam?id=' + this.record[index].course_id)
+					this.exam.show = false
+				} else {
+					$api.info('未到时间')
+				}
 			},
 			wrong(id) {
 				$api.jump('/pages/mine/exam/wrong?id=' + id)

+ 23 - 5
jxtxkj/pages/mine/mine.vue

@@ -18,8 +18,10 @@
 					<u-avatar :src="user.headimg?user.headimg:avatar" size="128rpx"></u-avatar>
 					<view class="text_style1" style="padding-left: 20rpx;">{{user.user_name}}</view>
 				</view>
-				<view @click="toInvite">
-					<image src="/static/images/mine/invite.png" mode="widthFix" style="width: 180rpx;"></image>
+				<view @click="toInvite" class="invite hflex acenter jbetween">
+					<image src="/static/images/mine/code.png" style="width: 32rpx;height: 32rpx;"></image>
+					<view class="invite_text">邀请码</view>
+					<!-- <image src="/static/images/mine/invite.png" mode="widthFix" style="width: 180rpx;"></image> -->
 				</view>
 			</view>
 			<view class="hflex acenter jaround" style="margin: 40rpx 0 54rpx;">
@@ -46,7 +48,7 @@
 			<view class="box_content hflex acenter jcenter" v-if="login" >
 				<view class="hflex acenter" v-if="Object.keys(myCourse).length !== 0">
 					<image :src="myCourse.img" mode="widthFix" style="width: 322rpx;border-radius: 16rpx;"></image>
-					<view class="img_right vflex">
+					<view class="img_right vflex" @click="toCourse(myCourse.id)">
 						<view class="img_title">
 							{{myCourse.name}}
 						</view>
@@ -88,8 +90,8 @@
 						<view class="text_style2" style="font-size: 24rpx;">邀请ID:{{user.invite_code}}</view>
 					</view>
 				</view>
-				<view class="qrimg hflex acenter jcenter" style="width: 100%;height: 400rpx;">
-					<image :src="user.invite_img" show-menu-by-longpress='1' @longpress="_saveCode"></image>
+				<view class="qrimg hflex acenter jcenter" style="width: 100%;height: 440rpx;">
+					<image :src="user.invite_img" show-menu-by-longpress='1' @longpress="_saveCode" style="width: 440rpx; height: 440rpx;"></image>
 				</view>
 				<view class="vflex acenter jcenter" style="margin-top:50rpx">
 					<view class="text_style3">扫一扫 加入拓新</view>
@@ -229,6 +231,9 @@
 			allCourse() {
 				$api.jump('/pages/mine/allCourse')
 			},
+			toCourse(id) {
+				$api.jump('/pages/index/course/detail?id=' + id)
+			},
 			// 打开详情页
 			toDeail(index) {
 				var url = ''
@@ -289,6 +294,19 @@
 			color: #FFFFFF;
 			padding-top: 8rpx;
 		}
+		.invite {
+			width: 180rpx;
+			height: 60rpx;
+			background: rgba(43,94,182,0.4);
+			border-radius: 40rpx;
+			border: 1px solid rgba(151,151,151,0.2);
+			box-sizing: border-box;
+			padding: 0 24rpx;
+		}
+		.invite_text {
+			font-size: 28rpx;
+			color: #FFFFFF;
+		}
 		.collect_num {
 			font-size: 40rpx;
 			color: #FFFFFF;

+ 5 - 1
jxtxkj/pages/mine/order/apply.vue

@@ -155,7 +155,11 @@
 					url: '/api/User/submitInvoice',
 					data: data
 				}, function(res) {
-					console.log(res);
+					if (res.code == 1) {
+						$api.info(res.msg)
+						$api.jump(-1)
+					}
+					
 				})
 			},
 			// 不开发票

+ 16 - 20
jxtxkj/pages/mine/order/order.vue

@@ -17,11 +17,11 @@
 							<view class="text_style1">讲师:{{item.course_info.lecturer}}</view>
 							<view class="hflex acenter jbetween" v-if="item.status == 0">
 								<view class="order_price">¥{{item.course_info.price}}</view>
-								<u-button @tap="toPay(index)">继续付款</u-button>
+								<u-button @tap.stop="toPay(index)">继续付款</u-button>
 							</view>
 							<view class="hflex acenter jbetween" v-else>
-								<view class="order_apply" @tap="toApply(index)">申请发票</view>
-								<u-button @tap="toStudy(item.course_id)">前往学习</u-button>
+								<view class="order_apply" @tap.stop="toApply(index)">申请发票</view>
+								<u-button @tap.stop="toStudy(item.course_id)">前往学习</u-button>
 							</view>
 						</view>
 					</view>
@@ -67,38 +67,34 @@
 				}, function(res) {
 					console.log(res);
 					if (res.code == 1) {
-						that.orderList = res.data.list
-						that.total = res.data.count
+						if (that.page == 1) {
+							that.orderList = res.data.list
+							that.total = res.data.count
+						}else {
+							that.orderList = that.orderList.concat(res.data.list)
+							that.total = res.data.count
+						}
 					}
 				})
 			},
 			// 继续付款
 			toPay(index) {
-				$api.jump('/pages/index/course/buy?order_no = ' + this.orderList[index].order_no + '&id=' + this.orderList[index].course_id)
-				// uni.navigateTo({
-				// 	url: '/pages/index/course/buy?index = ' + index
-				// })
+				$api.jump('/pages/index/course/buy?order_no=' + this.orderList[index].order_no + '&id=' + this.orderList[index].course_id)
 			},
 			// 继续学习
 			toStudy(id) {
-				$api.jump('/pages/index/course/detail?id= ' + id)
+				$api.jump('/pages/index/course/detail?id=' + id)
 			},
 			// 申请发票
 			toApply(index) {
-				$api.jump('/pages/mine/order/apply?order_no= ' + this.orderList[index].order_no + '&course_id=' + this.orderList[index].course_id)
+				$api.jump('/pages/mine/order/apply?order_no=' + this.orderList[index].id + '&course_id=' + this.orderList[index].course_id)
 			},
 			// 查看详情
 			toDetail(index) {
-				if(this.orderList[index].status == '未付款') {
-					$api.jump('/pages/index/course/buy?order_no = ' + this.orderList[index].order_no + '&id=' + this.orderList[index].course_id)
-					// uni.navigateTo({
-					// 	url: '/pages/index/course/buy?order_no = ' + this.orderList[index].order_no
-					// })
+				if(this.orderList[index].status == 0) {
+					$api.jump('/pages/index/course/buy?order_no=' + this.orderList[index].order_no + '&id=' + this.orderList[index].course_id)
 				} else {
-					$api.jump('/pages/mine/order/detail?order_no = ' + this.orderList[index].order_no)
-					// uni.navigateTo({
-					// 	url: '/pages/mine/order/detail?order_no = ' + this.orderList[index].order_no
-					// })
+					$api.jump('/pages/mine/order/detail?order_no=' + this.orderList[index].order_no)
 				}
 			},
 			// 触底事件

+ 15 - 12
jxtxkj/pages/mine/password/editPassword.vue

@@ -58,18 +58,21 @@
 			// 确定修改
 			edit() {
 				var that = this
-				$api.req({
-					url: '/api/User/updatePass',
-					data: {
-						ver_code: that.code,
-						password: that.password,
-						confirmpassword: that.password2
-					}
-				}, function(res) {
-					if(res.code == 1) {
-						$api.jump('/pages/mine/password/success')
-					}
-				}) 
+				if ($api.formCheck(that.code,"code6") && $api.formCheck(that.password,"pwd") && $api.formCheck(that.password2,"pwd")) {
+					$api.req({
+						url: '/api/User/updatePass',
+						data: {
+							ver_code: that.code,
+							password: that.password,
+							confirmpassword: that.password2
+						}
+					}, function(res) {
+						if(res.code == 1) {
+							$api.jump('/pages/mine/password/success')
+						}
+					}) 
+				}
+				
 			},
 			// 获取手机号
 			getTele() {

+ 27 - 16
jxtxkj/pages/mine/personal.vue

@@ -80,23 +80,12 @@
 		},
 		onLoad(options) {
 			var that = this
-			this.getUser()
-			if(options.data) {
-				var data = JSON.parse(decodeURIComponent(options.data))
-				setTimeout(() =>{
-					if (data.user_name) {
-						that.user.user_name = data.user_name
-						// that.revise = true
-					} else {
-						that.user.work_units = data.work_units
-						// that.revise = true
-					}
-				},500)
-			}
+			this.getUser(options)
+			
 		},
 		methods: {
 			// 获取个人信息 
-			getUser() {
+			getUser(options) {
 				var that = this
 				$api.req({
 					url: '/api/User/userinfo'
@@ -104,6 +93,19 @@
 					console.log("个人信息=",res);
 					if (res.code == 1) {
 						that.user = res.data
+						if(options.data) {
+							var data = JSON.parse(decodeURIComponent(options.data))
+							if (data.user_name) {
+								that.user.user_name = data.user_name
+								// that.revise = true
+							} else {
+								that.user.work_units = data.work_units
+								// that.revise = true
+							}
+							/* setTimeout(() =>{
+								
+							},500) */
+						}
 					}
 				})
 			},
@@ -111,7 +113,7 @@
 			choose() {
 				var that = this
 				uni.chooseImage({
-					count: 6, //默认9
+					count: 1, //默认9
 					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
 					sourceType: ['album'], //从相册选择
 					success: function (res) {
@@ -128,6 +130,14 @@
 								const data = JSON.parse(res.data)
 								if (data.code == 1) {
 									that.user.headimg = data.data.url
+									$api.req({
+										url: '/api/User/edit_user_info',
+										data:{
+											headimg: that.user.headimg,
+										}
+									},function(res) {
+										console.log("修改头像成功");
+									})
 								}
 							}
 						});
@@ -170,8 +180,9 @@
 					}
 				}, function(res) {
 					console.log("保存成功=",res);
+					that.close()
 				})
-				this.close()
+				
 			},
 			close() {
 				// this.show = false

二进制
jxtxkj/static/images/mine/code.png


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-avatar/u-avatar.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-badge/u-badge.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-button/u-button.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-checkbox-group/u-checkbox-group.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-checkbox/u-checkbox.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-code/u-code.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-count-down/u-count-down.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-form-item/u-form-item.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-icon/u-icon.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-image/u-image.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-input/u-input.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-line-progress/u-line-progress.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-line/u-line.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-link/u-link.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-loading-icon/u-loading-icon.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-modal/u-modal.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-navbar/u-navbar.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-overlay/u-overlay.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-parse/node/node.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-parse/u-parse.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-popup/u-popup.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-radio-group/u-radio-group.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-radio/u-radio.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-safe-bottom/u-safe-bottom.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-status-bar/u-status-bar.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-swiper-indicator/u-swiper-indicator.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-swiper/u-swiper.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-tabs/u-tabs.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-text/u-text.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/node-modules/uview-ui/components/u-transition/u-transition.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/course/buy.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/course/detail.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/declare/declare.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/declare/declare_success.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/exam/exam.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/exam/parse.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/exam/submit.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/search/search.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/integral/integral.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/choose.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/forget.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/login.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/register.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/allCourse.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/certificate.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/change.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/collect.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/comment.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/exam/exam.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/exam/wrong.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/mine.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/order/apply.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/order/detail.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/order/order.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/password/editPassword.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/password/success.js.map


文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/personal.js.map


+ 4 - 1
jxtxkj/unpackage/dist/dev/mp-weixin/pages/index/course/buy.js

@@ -266,6 +266,7 @@ var _api = _interopRequireDefault(__webpack_require__(/*! @/static/js/api.js */
 
   },
   onLoad: function onLoad(options) {
+    console.log(options);
     this.order_no = options.order_no;
     this.id = options.id;
     this.getData(this.id);
@@ -331,6 +332,8 @@ var _api = _interopRequireDefault(__webpack_require__(/*! @/static/js/api.js */
           payment), {}, {
             success: function success(res) {
               console.log('pay success', res);
+              _api.default.info('支付成功');
+              _api.default.jump('/pages/index/course/detail?id=' + that.id);
             },
             fail: function fail(err) {
               console.error('pay fail', err);
@@ -352,7 +355,7 @@ var _api = _interopRequireDefault(__webpack_require__(/*! @/static/js/api.js */
       function (res) {
         _api.default.info(res.msg);
         that.showPay = false;
-        _api.default.jump('/pages/index/course/detail/id=' + that.good.id, 1);
+        _api.default.jump('/pages/index/course/detail?id=' + that.good.id, 1);
       });
     } } };exports.default = _default;
 

+ 46 - 24
jxtxkj/unpackage/dist/dev/mp-weixin/pages/index/course/detail.js

@@ -332,6 +332,9 @@ __webpack_require__.r(__webpack_exports__);
 
 
 
+
+
+
 var _api = _interopRequireDefault(__webpack_require__(/*! @/static/js/api.js */ 142));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} //
 //
 //
@@ -484,6 +487,9 @@ var _api = _interopRequireDefault(__webpack_require__(/*! @/static/js/api.js */
 //
 //
 //
+//
+//
+//
 var _default = { data: function data() {return { show: false, course: {}, progress: '', tabs: [{ name: '课程详情' }, { name: '课程目录' }, { name: '学生评价' }], active: 0, study: [], catalog: [], class_id: 1, courseClassDetail: [], videoContext: '', commentList: [], commentValue: '', exam: { show: false, content: '考试须知。' }, currentTime: 0, page: 1, limit: 10, user: {} };}, onLoad: function onLoad(e) {var id = e.id;this.getUser();this.getData(id);this.getClass(id);this.getCommit(id);this.getStudy(id);}, onHide: function onHide() {this.submitTime(this.currentTime);}, onshow: function onshow() {this.getData(id);}, onUnload: function onUnload() {this.submitTime(this.currentTime);}, methods: { // 获取用户信息
     getUser: function getUser() {var that = this;_api.default.req({ url: '/api/User/userinfo' }, function (res) {console.log(res);if (res.code == 1) {that.user = res.data;}});}, // 根据id获取课程信息
     getData: function getData(id) {var that = this;_api.default.req({ url: '/api/Index/courseDetail', data: { id: id } }, function (res) {console.log("课程信息=", res);if (res.code === 1) {that.course = res.data;that.totalProgress();}});}, // 根据id获取课程目录信息
@@ -492,10 +498,7 @@ var _default = { data: function data() {return { show: false, course: {}, progre
     getStudy: function getStudy(id) {var that = this;_api.default.req({ url: '/api/Index/studentsDynamic', data: { page: that.page, limit: that.limit, id: id } }, function (res) {console.log(res);if (res.code == 1) {that.study = res.data.list;}});}, // 计算进度条
     totalProgress: function totalProgress() {var course = this.course;var progress = course.study_class_count / course.period * 100;this.progress = progress;console.log(this.course);}, // 切换tabs
     changeTabs: function changeTabs(e) {var that = this;that.active = e.index;}, // 购买课程
-    buyCourse: function buyCourse() {var that = this;var order_no = '';console.log(that.course.type);if (that.course.type == 1) {_api.default.req({ url: '/api/Index/createOrder', data: { id: that.course.id } }, function (res) {console.log(res);order_no = res.data.order_no;_api.default.jump('/pages/index/course/buy?order_no=' + order_no + '&id=' + that.course.id);});} else {_api.default.req({ url: '/api/Index/createIntergalOrder',
-          data: {
-            id: that.course.id } },
-
+    buyCourse: function buyCourse() {var that = this;var order_no = '';console.log(that.course.type);if (that.course.type == 1) {_api.default.req({ url: '/api/Index/createOrder', data: { id: that.course.id } }, function (res) {console.log(res);order_no = res.data.order_no;_api.default.jump('/pages/index/course/buy?order_no=' + order_no + '&id=' + that.course.id);});} else {_api.default.req({ url: '/api/Index/createIntergalOrder', data: { id: that.course.id } },
         function (res) {
           console.log(res);
           order_no = res.data.order_no;
@@ -572,7 +575,7 @@ var _default = { data: function data() {return { show: false, course: {}, progre
         console.log(res);
         if (res.code == 1) {
           that.catalog[index].selected = true;
-          that.getData(id);
+          that.getData(that.course.id);
         }
       });
     },
@@ -613,20 +616,30 @@ var _default = { data: function data() {return { show: false, course: {}, progre
     },
     // 开始考试
     startExam: function startExam() {
-      _api.default.jump('/pages/index/exam/exam?id=' + this.course.id);
-      this.exam.show = false;
+      if (this.progress == 100) {
+        if (this.course.can_test == 1) {
+          _api.default.jump('/pages/index/exam/exam?id=' + this.course.id);
+          this.exam.show = false;
+        } else {
+          _api.default.info('未到时间');
+        }
+      } else {
+        _api.default.info("请先学习所有课程");
+      }
+
+
       /* var that = this
-                              $api.req({
-                              	url: '/api/User/startQuestions',
-                              	data: {
-                              		id: that.course.id
-                              	}
-                              }, function(res) {
-                              	console.log(res);
-                              	if (res.code == 1) {
-                              		
-                              	}
-                              }) */
+        $api.req({
+        	url: '/api/User/startQuestions',
+        	data: {
+        		id: that.course.id
+        	}
+        }, function(res) {
+        	console.log(res);
+        	if (res.code == 1) {
+        		
+        	}
+        }) */
     },
     // 提交观看时间
     submitTime: function submitTime(time) {
@@ -645,12 +658,21 @@ var _default = { data: function data() {return { show: false, course: {}, progre
     // 打开考试须知
     openExam: function openExam() {
       var that = this;
-      _api.default.req({
-        url: '/api/Publics/config_info' },
-      function (res) {
-        that.exam.show = true;
-        that.exam.content = res.data.test_instructions;
-      });
+      if (that.course.is_buy == 1) {
+        _api.default.req({
+          url: '/api/Publics/config_info' },
+        function (res) {
+          that.exam.show = true;
+          that.exam.content = res.data.test_instructions;
+        });
+      } else {
+        _api.default.info('请先购买课程');
+      }
+
+    },
+    // 关闭
+    close: function close() {
+      this.exam.show = false;
     } } };exports.default = _default;
 /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
 

文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/mp-weixin/pages/index/course/detail.wxml


+ 61 - 14
jxtxkj/unpackage/dist/dev/mp-weixin/pages/index/exam/exam.js

@@ -345,10 +345,13 @@ var _default = { data: function data() {return { id: 1, log_id: 3, examPaper: []
     leave: function leave() {}, // 关闭
     close1: function close1() {this.showLeave = false;}, // 关闭答题卡
     close2: function close2() {this.showSheet = false;}, // 开始考试
-    startExam: function startExam(id) {var that = this;_api.default.req({ url: '/api/User/startQuestions', data: { id: id } }, function (res) {if (res.code == 1) {that.id = res.data.course_id;that.log_id = res.data.log_id;that.getQuestions();}});}, // 获取试题
+    startExam: function startExam(id) {var that = this;_api.default.req({ url: '/api/User/startQuestions', data: { id: id } }, function (res) {if (res.code == 1) {that.id = res.data.course_id;that.log_id = res.data.log_id;that.getQuestions();} else {_api.default.info(res.msg);_api.default.jump(-1);}});}, // 获取试题
     getQuestions: function getQuestions() {var that = this;_api.default.req({ url: '/api/User/questionsList', data: { id: that.id } }, function (res) {if (res.code == 1) {that.examPaper = res.data;}});}, // 获取考试时间
-    getExamTime: function getExamTime(id) {var that = this;_api.default.req({ url: '/api/Index/courseDetail', data: { id: id } }, function (res) {if (res.code == 1) {that.course = res.data;}});}, // 打开答题卡
-    open: function open() {this.showSheet = true;
+    getExamTime: function getExamTime(id) {var that = this;_api.default.req({ url: '/api/Index/courseDetail', data: { id: id } }, function (res) {if (res.code == 1) {that.course = res.data;}});
+    },
+    // 打开答题卡
+    open: function open() {
+      this.showSheet = true;
     },
     // 选择答案
     select: function select(option) {
@@ -357,13 +360,13 @@ var _default = { data: function data() {return { id: 1, log_id: 3, examPaper: []
       if (that.examPaper[index].type !== 2) {
         that.choice = that.examPaper[index].items[option].ladder_title;
         that.values = {
-          id: that.index,
+          id: that.examPaper[index].id,
           answer: that.choice };
 
       } else {
         that.choice = that.choice + that.examPaper[index].items[option].ladder_title + '、';
         that.values = {
-          id: that.index,
+          id: that.examPaper[index].id,
           answer: that.choice };
 
       }
@@ -371,7 +374,8 @@ var _default = { data: function data() {return { id: 1, log_id: 3, examPaper: []
     // 去答题卡对应题目
     toTest: function toTest(inx) {
       var that = this;
-      that.values = {};
+      that.choice = '';
+      that.values = [];
       that.index = inx + 1;
       that.showSheet = false;
       console.log("values: ", that.values);
@@ -388,6 +392,7 @@ var _default = { data: function data() {return { id: 1, log_id: 3, examPaper: []
     // 下一题
     nextExam: function nextExam() {
       var that = this;
+      console.log(that.values.answer);
       if (that.values !== {}) {
         if (that.values.answer.charAt(that.values.answer.length - 1) == '、') {
           that.values.answer = that.values.answer.substr(0, that.values.answer.length - 1);
@@ -403,7 +408,7 @@ var _default = { data: function data() {return { id: 1, log_id: 3, examPaper: []
           }
         }
         console.log(1111);
-        console.log(that.answer);
+        console.log(that.values);
         if (that.values.length !== 0) {
           that.answer.push(that.values);
         }
@@ -420,24 +425,63 @@ var _default = { data: function data() {return { id: 1, log_id: 3, examPaper: []
     },
     // 最后一题
     submit: function submit() {
-      if (this.values.answer.charAt(this.values.answer.length - 1) == '、') {
-        this.values.answer = this.values.answer.substr(0, this.values.answer.length - 1);
+      /* if(this.values.answer.charAt(this.values.answer.length - 1) == '、') {
+                               	this.values.answer = this.values.answer.substr(0,this.values.answer.length-1);
+                               }
+                               this.answer.push(this.values)
+                               if (this.choice != '') {
+                               	this.examPaper[this.index - 1].state = true
+                               } */
+      var that = this;
+      console.log(that.values.answer);
+      if (that.values !== {}) {
+        if (that.values.answer.charAt(that.values.answer.length - 1) == '、') {
+          that.values.answer = that.values.answer.substr(0, that.values.answer.length - 1);
+        }
       }
-      this.answer.push(this.values);
-      if (this.choice != '') {
-        this.examPaper[this.index - 1].state = true;
+      if (that.answer.length > 0) {
+        console.log(that.answer);
+        for (var i = 0; i < that.answer.length; i++) {
+          if (that.values.id == that.answer[i].id) {
+            that.answer[i].answer = that.values.answer;
+            that.values = [];
+            break;
+          }
+        }
+        console.log(1111);
+        console.log(that.values);
+        if (that.values.length !== 0) {
+          that.answer.push(that.values);
+        }
+
+      } else {
+        that.answer.push(that.values);
+      }
+      if (that.choice != '') {
+        that.examPaper[that.index - 1].state = true;
       }
-      this.choice = '';
-      this.values = [];
+      // this.choice = ''
+      // this.values = []
       this.open();
     },
     // 倒计时结束
     finish: function finish() {
       console.log("倒计时结束,自动交卷");
+      // this.submitExam()
     },
     // 交卷
     submitExam: function submitExam() {
       var that = this;
+      console.log(typeof that.answer);
+      var obj = [];
+      for (var i = 0; i < that.answer.length; i++) {
+        if (obj.indexOf(that.answer[i].id) == -1) {
+          obj.push(that.answer[i].id);
+        } else {
+          that.answer.splice(i, 1);
+        }
+      }
+      console.log(that.answer);
       that.answer = JSON.stringify(that.answer);
       _api.default.req({
         url: '/api/User/subQuestions',
@@ -449,7 +493,10 @@ var _default = { data: function data() {return { id: 1, log_id: 3, examPaper: []
       function (res) {
         if (res.code == 1) {
           _api.default.jump('/pages/index/exam/submit?data=' + JSON.stringify(res.data) + '&log_id=' + that.log_id, 1);
+        } else {
+          _api.default.info(res.msg);
         }
+
       });
     } } };exports.default = _default;
 

+ 3 - 3
jxtxkj/unpackage/dist/dev/mp-weixin/pages/index/exam/exam.wxss

@@ -27,13 +27,13 @@
 .web_box.data-v-77cc6aa9 .u-navbar {
   width: 100%;
   box-sizing: border-box;
-  padding: 36px 16px 58rpx 0;
+  padding: 36px 16px 100rpx 0;
 }
 .web_box.data-v-77cc6aa9 .top {
   width: 100%;
-  margin: 14rpx 0;
+  margin: 14rpx 0 14rpx;
   box-sizing: border-box;
-  padding: 16rpx 30rpx;
+  padding: 16rpx 30rpx 16rpx;
   background: #FFFFFF;
 }
 .web_box.data-v-77cc6aa9 .name {

+ 11 - 2
jxtxkj/unpackage/dist/dev/mp-weixin/pages/index/exam/submit.js

@@ -155,7 +155,7 @@ __webpack_require__.r(__webpack_exports__);
 /***/ (function(module, exports, __webpack_require__) {
 
 "use strict";
-Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
+/* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
 
 
 
@@ -266,7 +266,16 @@ var _api = _interopRequireDefault(__webpack_require__(/*! @/static/js/api.js */
 //
 var _default = { data: function data() {return { course: {}, date: '', state: {}, log_id: 0 };}, onLoad: function onLoad(option) {this.state = JSON.parse(option.data);this.log_id = option.log_id;this.sellQuestionsLog();this.getDate();}, methods: { leftClick: function leftClick() {}, sellQuestionsLog: function sellQuestionsLog() {var that = this;_api.default.req({ url: '/api/User/sellQuestionsLog', data: { log_id: that.log_id, state: 1 } }, function (res) {console.log("试卷成绩", res);if (res.code == 1) {that.course = res.data;}});}, // 获取当前时间
     getDate: function getDate() {var nowDate = new Date();var date = { year: nowDate.getFullYear(), month: nowDate.getMonth() + 1, date: nowDate.getDate() };var newmonth = date.month >= 10 ? date.month : '0' + date.month;var day = date.date >= 10 ? date.date : '0' + date.date;this.date = date.year + '-' + newmonth + '-' + day;console.log("当前时间:", this.date);}, // 查看解析
-    parse: function parse(state) {_api.default.jump('/pages/index/exam/parse?state=' + state + '&log_id=' + this.log_id);} } };exports.default = _default;
+    parse: function parse(state) {_api.default.jump('/pages/index/exam/parse?state=' + state + '&log_id=' + this.log_id);}, clickImg: function clickImg() {var that = this;uni.previewImage({ urls: [that.course.certificate], current: '',
+        success: function success(res) {
+
+        },
+        fail: function fail(res) {
+
+        } });
+
+    } } };exports.default = _default;
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
 
 /***/ }),
 

文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/mp-weixin/pages/index/exam/submit.wxml


+ 15 - 6
jxtxkj/unpackage/dist/dev/mp-weixin/pages/index/index.js

@@ -208,6 +208,9 @@ __webpack_require__.r(__webpack_exports__);
 
 
 
+
+
+
 var _api = _interopRequireDefault(__webpack_require__(/*! @/static/js/api.js */ 142));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} //
 //
 //
@@ -254,15 +257,15 @@ var _api = _interopRequireDefault(__webpack_require__(/*! @/static/js/api.js */
 //
 //
 //
+//
+//
+//
 var _default = { data: function data() {return { swiperList: [], swiperListId: [], banner: '/static/images/index/banner.png', tabs: [], active: 0, product: [], page: 1, pageSize: 10, total: 0 };}, onLoad: function onLoad() {var that = this;that.getBanner();that.coursecate();}, methods: { // 切换tabs
     changeTabs: function changeTabs(index) {this.active = index;this.getCourseTabsList(this.tabs[index].id);}, // 点击搜索
     search: function search() {uni.navigateTo({ url: '/pages/index/search/search' });}, // 点击进入申报专区
     declare: function declare() {_api.default.jump('/pages/index/declare/declare');}, // 点击进入课程详情
     detail: function detail(id) {var login = uni.getStorageSync('token');if (login) {_api.default.jump('/pages/index/course/detail?id=' + id);} else {_api.default.info('请先登录');}}, // 获取首页banner 
-    getBanner: function getBanner() {var that = this;_api.default.req({ url: '/api/Index/banner_list' },
-      function (res) {
-        if (res.code == 1) {
-          for (var i = 0; i < res.data.length; i++) {
+    getBanner: function getBanner() {var that = this;_api.default.req({ url: '/api/Index/banner_list' }, function (res) {if (res.code == 1) {for (var i = 0; i < res.data.length; i++) {
             that.swiperList.push(res.data[i].img);
             that.swiperListId.push(res.data[i].course_id);
           }
@@ -301,8 +304,14 @@ var _default = { data: function data() {return { swiperList: [], swiperListId: [
       function (res) {
         console.log(res);
         if (res.code == 1) {
-          that.total = res.data.count;
-          that.product = that.product.concat(res.data.list);
+          if (that.page == 1) {
+            that.total = res.data.count;
+            that.product = res.data.list;
+          } else {
+            that.total = res.data.count;
+            that.product = that.product.concat(res.data.list);
+          }
+
         }
       });
     },

文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/mp-weixin/pages/index/index.wxml


+ 30 - 3
jxtxkj/unpackage/dist/dev/mp-weixin/pages/index/search/search.js

@@ -281,10 +281,16 @@ var _default = { data: function data() {return { value: '', history: [], result:
     // 	this.product[index].collect = !this.product[index].collect
     // },
     change: function change(e) {console.log(e);this.value = e;}, // 开始搜索
-    search: function search() {var that = this;that.result = true;_api.default.req({ url: '/api/Index/courselist', data: { page: that.page, limit: that.limit, keywords: that.value } }, function (res) {if (res.code == 1) {that.product = res.data.list;that.total = res.data.count;}});}, // 获得搜索记录
+    search: function search() {var that = this;that.result = true;_api.default.req({ url: '/api/Index/courselist', data: { page: that.page, limit: that.limit, keywords: that.value } }, function (res) {if (res.code == 1) {if (that.page == 1) {that.product = res.data.list;that.total = res.data.count;} else {that.total = res.data.count;that.product = that.product.concat(res.data.list);}}});}, // 获得搜索记录
     getHistory: function getHistory() {var that = this;uni.getStorage({ key: 'history', success: function success(res) {console.log("缓存", res);that.history.push(res.data);console.log("缓存记录", that.history);} });}, // 取消
-    cancel: function cancel() {this.result = false;this.value = '';}, // 删除记录
-    detele: function detele() {uni.removeStorage({ key: 'history',
+    cancel: function cancel() {
+      this.result = false;
+      this.value = '';
+    },
+    // 删除记录
+    detele: function detele() {
+      uni.removeStorage({
+        key: 'history',
         success: function success(res) {
         } });
 
@@ -320,6 +326,27 @@ var _default = { data: function data() {return { value: '', history: [], result:
         this.page++;
         this.change();
       }
+    },
+    // 收藏
+    collect: function collect(index) {
+      var that = this;
+      if (that.product[index].is_collection == 0) {
+        that.product[index].is_collection = 1;
+      } else {
+        that.product[index].is_collection = 0;
+      }
+      _api.default.req({
+        url: '/api/Index/collectionCancelCourse',
+        data: {
+          id: that.product[index].id,
+          type: that.product[index].is_collection } },
+
+      function (res) {
+        console.log("收藏=", res);
+        if (res.code == 1) {
+          _api.default.info(res.msg);
+        }
+      });
     } } };exports.default = _default;
 /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
 

文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/mp-weixin/pages/index/search/search.wxml


+ 1 - 0
jxtxkj/unpackage/dist/dev/mp-weixin/pages/integral/integral.wxss

@@ -62,6 +62,7 @@
   font-weight: 400;
   color: #999999;
   font-size: 32rpx;
+  margin-right: 36rpx;
 }
 .web_box.data-v-4e58b806 .active {
   position: relative;

+ 11 - 2
jxtxkj/unpackage/dist/dev/mp-weixin/pages/mine/allCourse.js

@@ -252,8 +252,12 @@ var _api = _interopRequireDefault(__webpack_require__(/*! @/static/js/api.js */
 //
 //
 var _default = { data: function data() {return { tabs: [{ name: '在修课程' }, { name: '已修课程' }], active: 0, course: [], page: 1, limit: 10, total: 0, type: 1 };}, onLoad: function onLoad() {var type = this.type;this.getCourse(type);}, methods: { leftClick: function leftClick() {}, // 获取课程信息
-    getCourse: function getCourse(type) {var that = this;_api.default.req({ url: '/api/User/myCourseList', data: { page: that.page, limit: that.limit, type: type } }, function (res) {console.log("我的课程", res);if (res.code == 1) {that.course = res.data.list;that.total = rea.data.count;that.totalProgress();}});}, // 切换tabs
-    changeTab: function changeTab(e) {this.active = e.index;
+    getCourse: function getCourse(type) {var that = this;_api.default.req({ url: '/api/User/myCourseList', data: { page: that.page, limit: that.limit, type: type } }, function (res) {console.log("我的课程", res);if (res.code == 1) {if (that.page == 1) {that.course = res.data.list;that.total = res.data.count;} else {that.course = that.course.concat(res.data.list);}that.totalProgress();}
+      });
+    },
+    // 切换tabs
+    changeTab: function changeTab(e) {
+      this.active = e.index;
       this.course = [];
       this.page = 0;
       this.getCourse(this.active + 1);
@@ -264,6 +268,7 @@ var _default = { data: function data() {return { tabs: [{ name: '在修课程' }
       for (var i = 0; i < course.length; i++) {
         course[i].progress = course[i].study_class_count / course[i].class_count * 100;
       }
+      console.log(course);
       this.course = course;
     },
     // 触底事件
@@ -278,6 +283,10 @@ var _default = { data: function data() {return { tabs: [{ name: '在修课程' }
         this.page++;
         this.getCourse(this.type);
       }
+    },
+    // 进入课程详情
+    toDetail: function toDetail(index) {
+      _api.default.jump('/pages/index/course/detail?id=' + this.course[index].id);
     } } };exports.default = _default;
 
 /***/ }),

文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/mp-weixin/pages/mine/allCourse.wxml


+ 33 - 34
jxtxkj/unpackage/dist/dev/mp-weixin/pages/mine/certificate.js

@@ -155,7 +155,13 @@ __webpack_require__.r(__webpack_exports__);
 /***/ (function(module, exports, __webpack_require__) {
 
 "use strict";
-Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
+/* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
+
+
+
+
+
+
 
 
 
@@ -198,40 +204,22 @@ var _api = _interopRequireDefault(__webpack_require__(/*! @/static/js/api.js */
 //
 //
 //
-var _default = { data: function data() {return { certificateList: [/* {
-                                                                   	img: '/static/images/mine/certificate.jpg',
-                                                                   	name: '城市桥梁工程',
-                                                                   	number: '4524165434424415',
-                                                                   	date: '2022-07-05'
-                                                                   },
-                                                                   {
-                                                                   	img: '/static/images/mine/certificate.jpg',
-                                                                   	name: '道路建筑材料(沥青、钢材及其他新型材料)',
-                                                                   	number: '4524165434424415',
-                                                                   	date: '2022-07-05'
-                                                                   },
-                                                                   {
-                                                                   	img: '/static/images/mine/certificate.jpg',
-                                                                   	name: '城市桥梁工程',
-                                                                   	number: '4524165434424415',
-                                                                   	date: '2022-07-05'
-                                                                   },
-                                                                   {
-                                                                   	img: '/static/images/mine/certificate.jpg',
-                                                                   	name: '城市桥梁工程',
-                                                                   	number: '4524165434424415',
-                                                                   	date: '2022-07-05'
-                                                                   } */], page: 1, limit: 10, total: 0 };}, onLoad: function onLoad() {this.getCertificateList();}, methods: { leftClick: function leftClick() {}, // 获取证书列表
-    getCertificateList: function getCertificateList() {var that = this;_api.default.req({
-        url: '/api/User/myCertificate',
-        data: {
-          page: that.page,
-          limit: that.limit } },
-
-      function (res) {
+//
+//
+//
+//
+//
+//
+var _default = { data: function data() {return { certificateList: [], page: 1, limit: 10, total: 0 };}, onLoad: function onLoad() {this.getCertificateList();}, methods: { leftClick: function leftClick() {}, // 获取证书列表
+    getCertificateList: function getCertificateList() {var that = this;_api.default.req({ url: '/api/User/myCertificate', data: { page: that.page, limit: that.limit } }, function (res) {
         if (res.code == 1) {
-          that.certificateList = res.data.list;
-          that.total = res.data.count;
+          if (that.page == 1) {
+            that.certificateList = res.data.list;
+            that.total = res.data.count;
+          } else {
+            that.certificateList = that.certificateList.concat(res.data.list);
+          }
+
         }
       });
     },
@@ -245,7 +233,18 @@ var _default = { data: function data() {return { certificateList: [/* {
         this.page++;
         this.getCertificateList();
       }
+    },
+    clickimg: function clickimg(index) {
+      var that = this;
+      uni.previewImage({
+        urls: [that.certificateList[index].certificate],
+        current: '',
+        success: function success(res) {
+
+        } });
+
     } } };exports.default = _default;
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
 
 /***/ }),
 

+ 1 - 1
jxtxkj/unpackage/dist/dev/mp-weixin/pages/mine/certificate.wxml

@@ -1 +1 @@
-<view class="web_box data-v-95391658"><view class="list data-v-95391658"><block wx:for="{{certificateList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><block class="data-v-95391658"><view class="list_item hflex acenter data-v-95391658"><u-image vue-id="{{'11e8b29c-1-'+index}}" src="{{item.img}}" width="320rpx" height="232rpx" class="data-v-95391658" bind:__l="__l"></u-image><view class="img_right vflex jbetween data-v-95391658"><view class="name data-v-95391658">{{"证书名称:"+item.name}}</view><view class="data-v-95391658"><view class="text_style1 data-v-95391658">{{"证书编号:"+item.number}}</view><view class="text_style1 data-v-95391658">{{"颁发时间:"+item.date}}</view></view></view></view></block></block></view></view>
+<view class="web_box data-v-95391658"><block wx:if="{{certificateList.length>0}}"><view class="list data-v-95391658"><block wx:for="{{certificateList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><block class="data-v-95391658"><view class="list_item hflex acenter data-v-95391658"><u-image vue-id="{{'11e8b29c-1-'+index}}" src="{{item.certificate}}" width="320rpx" height="232rpx" data-event-opts="{{[['^click',[['clickimg',[index]]]]]}}" bind:click="__e" class="data-v-95391658" bind:__l="__l"></u-image><view class="img_right vflex jbetween data-v-95391658"><view class="name data-v-95391658">{{"证书名称:"+item.name}}</view><view class="data-v-95391658"><view class="text_style1 data-v-95391658">{{"证书编号:"+item.certificate_number}}</view><view class="text_style1 data-v-95391658">{{"颁发时间:"+item.create_at}}</view></view></view></view></block></block></view></block><block wx:else><view class="list vflex acenter jcenter data-v-95391658"><image class="img_none data-v-95391658" src="../../static/images/common/collect_none.png"></image><view class="text_none data-v-95391658">暂无证书</view></view></block></view>

+ 10 - 0
jxtxkj/unpackage/dist/dev/mp-weixin/pages/mine/certificate.wxss

@@ -56,4 +56,14 @@
   font-weight: 400;
   color: #333333;
 }
+.web_box.data-v-95391658 .text_none {
+  font-size: 32rpx;
+  color: #333333;
+  margin-top: 44rpx;
+}
+.web_box.data-v-95391658 .img_none {
+  margin-top: 300rpx;
+  width: 570rpx;
+  height: 328rpx;
+}
 

+ 8 - 2
jxtxkj/unpackage/dist/dev/mp-weixin/pages/mine/collect.js

@@ -217,8 +217,14 @@ var _api = _interopRequireDefault(__webpack_require__(/*! @/static/js/api.js */
 //
 //
 var _default = { data: function data() {return { collectList: [], page: 1, limit: 10, total: 0, show: true };}, onLoad: function onLoad() {this.getList();}, methods: { leftClick: function leftClick() {}, // 获取我的收藏
-    getList: function getList() {var that = this;_api.default.req({ url: '/api/User/myCourseList', data: { page: that.page, limit: that.limit, type: 3 } }, function (res) {console.log("我的课程", res);if (res.code == 1) {that.collectList = res.data.list;
-          that.total = res.data.count;
+    getList: function getList() {var that = this;_api.default.req({ url: '/api/User/myCourseList', data: { page: that.page, limit: that.limit, type: 3 } }, function (res) {console.log("我的课程", res);if (res.code == 1) {if (that.page == 1) {
+            that.collectList = res.data.list;
+            that.total = res.data.count;
+          } else {
+            that.collectList = that.collectList.concat(res.data.list);
+            that.total = res.data.count;
+          }
+
         }
       });
     },

+ 7 - 3
jxtxkj/unpackage/dist/dev/mp-weixin/pages/mine/comment.js

@@ -200,9 +200,13 @@ var _default = { data: function data() {return { user_name: '', commentList: [],
       function (res) {
         console.log(res);
         if (res.code == 1) {
-          that.total = res.data.count;
-          that.commentList = that.commentList.concat(res.data.list);
-          console.log(that.commentList);
+          if (that.page == 1) {
+            that.total = res.data.count;
+            that.commentList = res.data.list;
+          } else {
+            that.total = res.data.count;
+            that.commentList = that.commentList.concat(res.data.list);
+          }
         }
       });
     },

+ 6 - 1
jxtxkj/unpackage/dist/dev/mp-weixin/pages/mine/exam/exam.js

@@ -274,7 +274,12 @@ var _default = { data: function data() {return { tabs: [{ name: '考试记录' }
     // 获取考试数据
     getExam: function getExam(type) {var that = this;_api.default.req({ url: '/api/User/myExaminationApplet', data: { page: that.page, limit: that.limit, type: type } }, function (res) {console.log("我的考试:", res);if (res.code == 1) {if (that.type == 1) {that.record = res.data.list;} else {that.collect = res.data.list;}}});}, // 切换tabs
     changeTab: function changeTab(e) {this.active = e.index;this.type = this.active + 1;this.getExam(this.type);}, // 考试详情
-    toDetail: function toDetail(index) {}, wrong: function wrong(id) {_api.default.jump('/pages/mine/exam/wrong?id=' + id);} } };exports.default = _default;
+    toDetail: function toDetail(index) {if (this.record[index].can_test == 1) {_api.default.jump('/pages/index/exam/exam?id=' + this.record[index].course_id);this.exam.show = false;} else {_api.default.info('未到时间');
+      }
+    },
+    wrong: function wrong(id) {
+      _api.default.jump('/pages/mine/exam/wrong?id=' + id);
+    } } };exports.default = _default;
 
 /***/ }),
 

+ 9 - 4
jxtxkj/unpackage/dist/dev/mp-weixin/pages/mine/mine.js

@@ -280,6 +280,8 @@ __webpack_require__.r(__webpack_exports__);
 
 
 
+
+
 var _api = _interopRequireDefault(__webpack_require__(/*! @/static/js/api.js */ 142));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} //
 //
 //
@@ -383,6 +385,8 @@ var _api = _interopRequireDefault(__webpack_require__(/*! @/static/js/api.js */
 //
 //
 //
+//
+//
 var _default = { data: function data() {return { login: false, user: {}, avatar: '/static/images/logo.jpg', myCourse: {}, list: [{ src: '/static/images/mine/icon1.png', title: '我的考试' }, { src: '/static/images/mine/icon2.png', title: '我的订单' }, { src: '/static/images/mine/icon3.png', title: '我的评论' }, { src: '/static/images/mine/icon4.png', title: '我的收藏' }, { src: '/static/images/mine/icon5.png', title: '修改密码' }, { src: '/static/images/mine/icon6.png', title: '我的证书' }], showInvite: false, page: 1, limit: 1 };}, onLoad: function onLoad() {this.getCourse(); // this.totalProgress()
   }, onShow: function onShow() {this.getUser(); // 判断是否登录
     this.isLogin();}, methods: { // 获取个人信息
@@ -390,10 +394,8 @@ var _default = { data: function data() {return { login: false, user: {}, avatar:
     getCourse: function getCourse() {var that = this;_api.default.req({ url: '/api/User/myCourseList', data: { page: that.page, limit: that.limit, type: 1 } }, function (res) {console.log("我的课程", res);if (res.code == 1) {that.myCourse = res.data.list[0];if (res.data.count !== 0) {that.totalProgress();}}});}, // 去登录
     toLogin: function toLogin() {_api.default.jump('/pages/login/choose');}, isLogin: function isLogin() {var that = this;var token = uni.getStorageSync("token");console.log(token);if (token.token) {that.login = true;} else {_api.default.info('请先登录');}}, // 计算进度条
     totalProgress: function totalProgress() {var myCourse = this.myCourse;myCourse.progress = myCourse.study_class_count / myCourse.class_count * 100;this.myCourse = myCourse;}, // 长按保存图片
-    _saveCode: function _saveCode() {console.log("长按保存图片到相册");},
-    // 去个人资料
-    personalInfo: function personalInfo() {
-      _api.default.jump('/pages/mine/personal');
+    _saveCode: function _saveCode() {console.log("长按保存图片到相册");}, // 去个人资料
+    personalInfo: function personalInfo() {_api.default.jump('/pages/mine/personal');
     },
     // 去邀请
     toInvite: function toInvite() {
@@ -407,6 +409,9 @@ var _default = { data: function data() {return { login: false, user: {}, avatar:
     allCourse: function allCourse() {
       _api.default.jump('/pages/mine/allCourse');
     },
+    toCourse: function toCourse(id) {
+      _api.default.jump('/pages/index/course/detail?id=' + id);
+    },
     // 打开详情页
     toDeail: function toDeail(index) {
       var url = '';

文件差异内容过多而无法显示
+ 0 - 0
jxtxkj/unpackage/dist/dev/mp-weixin/pages/mine/mine.wxml


+ 13 - 0
jxtxkj/unpackage/dist/dev/mp-weixin/pages/mine/mine.wxss

@@ -44,6 +44,19 @@
   color: #FFFFFF;
   padding-top: 8rpx;
 }
+.web_box.data-v-dcbcfe34 .invite {
+  width: 180rpx;
+  height: 60rpx;
+  background: rgba(43, 94, 182, 0.4);
+  border-radius: 40rpx;
+  border: 1px solid rgba(151, 151, 151, 0.2);
+  box-sizing: border-box;
+  padding: 0 24rpx;
+}
+.web_box.data-v-dcbcfe34 .invite_text {
+  font-size: 28rpx;
+  color: #FFFFFF;
+}
 .web_box.data-v-dcbcfe34 .collect_num {
   font-size: 40rpx;
   color: #FFFFFF;

部分文件因为文件数量过多而无法显示