Tang пре 3 година
родитељ
комит
4bc0257b7a
7 измењених фајлова са 309 додато и 197 уклоњено
  1. 5 1
      common/api.js
  2. 62 0
      common/httpList/apply.js
  3. 54 0
      common/httpList/systemPlan.js
  4. 1 1
      common/request.js
  5. 1 29
      package-lock.json
  6. 86 67
      pages2/appointment/index.vue
  7. 100 99
      pages2/wd/class.vue

+ 5 - 1
common/api.js

@@ -9,6 +9,8 @@ import business from './httpList/business.js'
 import course from './httpList/course.js'
 import grade from './httpList/grade.js'
 import base from './httpList/base.js'
+import apply from './httpList/apply.js'
+import systemPlan from './httpList/systemPlan.js'
 export default {
 	...login,
 	...polyvVideo,
@@ -20,5 +22,7 @@ export default {
 	...business,
 	...course,
 	...grade,
-	...base
+	...base,
+	...apply,
+	...systemPlan,
 }

+ 62 - 0
common/httpList/apply.js

@@ -0,0 +1,62 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	//新增用户预约考试
+	addApply(data) {
+		return myRequest({
+			url: '/apply',
+			method: 'post',
+			data: data
+		})
+	},
+	//修改用户预约考试
+	editApply(data) {
+		return myRequest({
+			url: '/apply/edit',
+			method: 'post',
+			data: data
+		})
+	},
+	//查询报考数据列表
+	getApplylist(data) {
+		return myRequest({
+			url: '/apply/list',
+			method: 'get',
+			data: data
+		})
+	},
+	//点击预约报考按钮
+	getApplysubscribe(data) {
+		return myRequest({
+			url: '/apply/subscribe',
+			method: 'get',
+			data: data
+		})
+	},
+	//获得考试的考试地点
+	getApplysubscribeApplySite(data) {
+		return myRequest({
+			url: '/apply/subscribeApplySite',
+			method: 'get',
+			data: data
+		})
+	},
+	//获得考试的考培地点
+	getApplysubscribeApplySiteTrain(data) {
+		return myRequest({
+			url: '/apply/subscribeApplySiteTrain',
+			method: 'get',
+			data: data
+		})
+	},
+	//预约报考下一步按钮 1 进入有考陪有考试地点得预约考试 2进入无考陪有考试地点预约考试 3无考试次数购买商品
+	getApplysubscribeNext(data) {
+		return myRequest({
+			url: '/apply/subscribeNext',
+			method: 'get',
+			data: data
+		})
+	}
+	
+}

+ 54 - 0
common/httpList/systemPlan.js

@@ -0,0 +1,54 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	//新增学习计划
+	addsystemplan(data) {
+		return myRequest({
+			url: '/system/plan',
+			method: 'post',
+			data: data
+		})
+	},
+	//修改学习计划
+	editsystemplan(data) {
+		return myRequest({
+			url: '/system/plan',
+			method: 'post',
+			data: data
+		})
+	},
+	//查询学习计划列表
+	getsystemplanlist(data) {
+		return myRequest({
+			url: '/system/plan/list',
+			method: 'get',
+			data: data
+		})
+	},
+	//查询学员拥有商品能生成学习计划的商品
+	getsystemplanlistGoods(data) {
+		return myRequest({
+			url: '/system/plan/listGoods',
+			method: 'get',
+			data: data
+		})
+	},
+	//获得展示的日历学习计划,不添加到数据库
+	getsystemplanlistPlan(data) {
+		return myRequest({
+			url: '/system/plan/listPlan',
+			method: 'get',
+			data: data
+		})
+	},
+	//获取学习计划详细信息
+	systemplanInfo(data) {
+		return myRequest({
+			url: '/system/plan/' + data,
+			method: 'post',
+			data: data
+		})
+	}
+
+}

+ 1 - 1
common/request.js

@@ -4,7 +4,7 @@
 import store from '@/store/index.js'
 import api from './api.js'
 var num = 1
-export const BASE_URL = 'http://42.192.164.187:19005'//接口api
+export const BASE_URL = 'http://192.168.1.222:5055'//接口api
 export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'//图片上传api  'https://file.xyyxt.net/
 export const tenantId = '867735392558919680'
 export const myRequest = (options) => {

+ 1 - 29
package-lock.json

@@ -1,36 +1,8 @@
 {
   "name": "zz-applet",
   "version": "1.0.0",
-  "lockfileVersion": 2,
+  "lockfileVersion": 1,
   "requires": true,
-  "packages": {
-    "": {
-      "name": "zz-applet",
-      "version": "1.0.0",
-      "license": "ISC",
-      "dependencies": {
-        "jweixin-module": "^1.6.0",
-        "tki-qrcode": "^0.1.6",
-        "uview-ui": "^1.8.3"
-      },
-      "devDependencies": {}
-    },
-    "node_modules/jweixin-module": {
-      "version": "1.6.0",
-      "resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz",
-      "integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w=="
-    },
-    "node_modules/tki-qrcode": {
-      "version": "0.1.6",
-      "resolved": "https://registry.npmjs.org/tki-qrcode/-/tki-qrcode-0.1.6.tgz",
-      "integrity": "sha512-EnnlS8psowC7PsW3MDYcxvJYkuklX3WAZ/BYanR4TdBHTu74GfjTBX8Y16REP+AeDENiVtBPh4jtTRL2P736hQ=="
-    },
-    "node_modules/uview-ui": {
-      "version": "1.8.3",
-      "resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.8.3.tgz",
-      "integrity": "sha512-DqKc+qRrOZLPcyfWv4b0HspSS9n1Cd6BbgKiYEv9rjTAnWoqJV7rXsvWqZdr5iKGP5EMNbNS741GLNw4sIHbpw=="
-    }
-  },
   "dependencies": {
     "jweixin-module": {
       "version": "1.6.0",

+ 86 - 67
pages2/appointment/index.vue

@@ -2,48 +2,50 @@
 	<view class="safeArea">
 		<view class="appointment">
 			<view class="appointmentItem appointmentHead">
-				<view class="imgBox">
-					<image src="/static/login_bg.jpg"></image>
-				</view>
+				<view class="imgBox"><image :src="$method.splitImgHost(listData.splitImgHost)"></image></view>
 				<u-line color="#EEEEEE" />
-				<view class="title">这是一个考试标题过长换行过长换行过长换行过长换行过长换行</view>
+				<view class="title">{{ listData.applyName }}</view>
 			</view>
 			<view class="appointmentItem appointmentTime">
 				<view class="item">
 					<view class="labelName">报名时间:</view>
-					<view class="valName">2021/12/1 ~ 2021/12/31</view>
+					<view class="valName">{{ $method.timestampToTime(listData.applyStartTime) }} ~ {{ $method.timestampToTime(listData.applyEndTime) }}</view>
 				</view>
 				<u-line color="#EEEEEE" />
 				<view class="item">
 					<view class="labelName">温馨提示:</view>
-					<view class="valName">预约开放期登录CCMS,进入主页,显示预核准的已报科目考试,点击预约考试科目,按流程选择考试考点、具体考试时间,提交完成。</view>
+					<view class="valName">{{ listData.applyIntroduce }}</view>
 				</view>
 			</view>
 			<view class="appointmentItem appointmentMajor">
 				<view class="top">
 					<view class="labelName">报考专业:</view>
-					<view class="valName">XXX专业名称XXX</view>
+					<view class="valName">{{ listData.major }}</view>
 				</view>
 			</view>
 			<view class="appointmentItem appointmentInfo">
-				<view class="item"><text class="labelName">姓<text style="opacity: 0;">姓</text>名:</text>倪虹洁</view>
+				<view class="item">
+					<text class="labelName">
+						姓
+						<text style="opacity: 0;">姓</text>
+						名:
+					</text>
+					{{ listData.realname }}
+				</view>
 				<u-line color="#EEEEEE" />
-				<view class="item"><text class="labelName">身份证:</text>44046354687236685698</view>
+				<view class="item">
+					<text class="labelName">身份证:</text>
+					{{ listData.idCard }}
+				</view>
 			</view>
 			<view class="appointmentItem appointmentType">
 				<view class="item">
 					<view class="labelName">学员类型:</view>
 					<u-radio-group placement="column">
-					   <u-radio
-					     :customStyle="{marginBottom: '8px'}"
-					     v-for="(item, index) in radiolist"
-					     :key="index"
-					     :label="item.name"
-					     :name="item.name"
-					     @change="radioChange"
-					   >{{item.name}}
-					   </u-radio>
-					 </u-radio-group>
+						<u-radio :customStyle="{ marginBottom: '8px' }" v-for="(item, index) in radiolist" :key="index" :label="item.label" :name="item.name" @change="radioChange">
+							{{ item.name }}
+						</u-radio>
+					</u-radio-group>
 				</view>
 			</view>
 			<view class="btn" @click="next">下一步</view>
@@ -59,7 +61,7 @@
 					<view class="item">请先购买补考机会。</view>
 				</view>
 				<view class="btn">
-					<view class="btn1 cancel" @click="showTip=false">知道了</view>
+					<view class="btn1 cancel" @click="showTip = false">知道了</view>
 					<view class="btn1 submit" @click="submit">马上缴费</view>
 				</view>
 			</view>
@@ -73,47 +75,64 @@ export default {
 	data() {
 		return {
 			showTip: false,
-			radiolist: [{name: '非补考学员'},{name: '补考学员'}]
+			radiolist: [{ name: '非补考学员', label: '1' }, { name: '补考学员', label: '2' }],
+			goodsId: 0,
+			gradeId: 0,
+			applyStatus:'',
+			listData: {} //页面数据
 		};
 	},
-	onLoad(option) {},
+	onLoad(option) {
+		this.goodsId = Number(option.goodsId);
+		this.gradeId = Number(option.gradeId);
+		this.getInfo();
+	},
 	methods: {
-		radioChange(e){
-			console.log(e)
+		getInfo() {
+			var data = {
+				goodsId: this.goodsId,
+				gradeId: this.gradeId
+			};
+			this.$api.getApplysubscribe(data).then(res => {
+				console.log(res.data, 123);
+				this.listData = res.data.data;
+			});
+		},
+		radioChange(e) {
+			console.log(e);
 		},
-		next(){
-			this.showTip = true
+		next() {
+			this.showTip = true;
 		},
-		submit(){
+		submit() {
 			this.$navTo.togo('/pages2/appointment/order');
 		}
-	},
-
+	}
 };
 </script>
-<style >
-page{
-	background-color: #EAEEF1;
+<style>
+page {
+	background-color: #eaeef1;
 }
-.appointmentType .u-radio__label{
-	margin-left:16rpx!important;
-	margin-right: 116rpx!important;;
+.appointmentType .u-radio__label {
+	margin-left: 16rpx !important;
+	margin-right: 116rpx !important;
 }
-.tipModel .u-mode-center-box{
-	background-color: transparent!important;
+.tipModel .u-mode-center-box {
+	background-color: transparent !important;
 }
 </style>
 <style scoped lang="scss">
-.appointment{
+.appointment {
 	padding: 16rpx;
-	.appointmentItem{
-		background: #FFFFFF;
+	.appointmentItem {
+		background: #ffffff;
 		border-radius: 16rpx;
 		margin-bottom: 16rpx;
-		.item{
+		.item {
 			padding: 24rpx 0;
 		}
-		.labelName{
+		.labelName {
 			font-size: 28rpx;
 			font-family: PingFang SC;
 			font-weight: 500;
@@ -121,97 +140,97 @@ page{
 			margin-bottom: 16rpx;
 			line-height: 1;
 		}
-		.valName{
+		.valName {
 			font-size: 30rpx;
 			font-family: PingFang SC;
 			font-weight: 500;
 			color: #333333;
 		}
 	}
-	.appointmentHead{
+	.appointmentHead {
 		padding-top: 16rpx;
-		.imgBox{
+		.imgBox {
 			width: 590rpx;
 			height: 232rpx;
 			margin: 0 auto;
 			background: #ccc;
 			overflow: hidden;
 		}
-		.title{
-			padding:24rpx 28rpx 31rpx 31rpx;
+		.title {
+			padding: 24rpx 28rpx 31rpx 31rpx;
 			font-size: 30rpx;
 			font-weight: bold;
 			font-family: PingFang SC;
 			color: #333333;
 		}
 	}
-	.appointmentTime{
+	.appointmentTime {
 		padding: 10rpx 30rpx 0;
 	}
-	.appointmentMajor{
+	.appointmentMajor {
 		padding: 34rpx 30rpx 24rpx;
 	}
-	.appointmentInfo{
+	.appointmentInfo {
 		padding: 8rpx 30rpx;
 	}
-	.appointmentType{
+	.appointmentType {
 		padding: 8rpx 30rpx 4rpx;
-		.u-radio__label{
-			margin-left:16rpx;
+		.u-radio__label {
+			margin-left: 16rpx;
 			margin-right: 116rpx;
 		}
 	}
-	.btn{
+	.btn {
 		width: 526rpx;
 		height: 80rpx;
 		line-height: 80rpx;
-		background: #007AFF;
+		background: #007aff;
 		border-radius: 40rpx;
 		font-size: 30rpx;
 		font-family: PingFang SC;
 		font-weight: bold;
-		color: #FFFFFF;
+		color: #ffffff;
 		margin: 40rpx auto;
 		text-align: center;
 	}
 }
-.tipBox{
+.tipBox {
 	width: 640rpx;
 	padding: 30rpx 36rpx 40rpx;
-	background: #FFFFFF;
+	background: #ffffff;
 	border-radius: 24rpx;
 	font-family: PingFang SC;
-	.title{
+	.title {
 		text-align: center;
 		font-size: 30rpx;
 		font-weight: bold;
 		color: #333333;
 		margin-bottom: 40rpx;
 	}
-	.main{
+	.main {
 		font-size: 30rpx;
 		font-weight: 500;
 		color: #666666;
 		line-height: 48rpx;
 		margin-bottom: 40rpx;
 	}
-	.btn{
+	.btn {
 		display: flex;
 		justify-content: center;
-		.btn1{
+		.btn1 {
 			width: 200rpx;
 			height: 80rpx;
 			line-height: 80rpx;
 			text-align: center;
-			background: #F5F5F5;
+			background: #f5f5f5;
 			border-radius: 40px;
 			font-size: 30rpx;
 			font-weight: bold;
-			color: #007AFF;
+			color: #007aff;
 			margin: 0 20rpx;
-			&.submit{
-				background: #007AFF;
-				color:#fff;
+			&.submit {
+				background: #007aff;
+				color: #fff;
 			}
 		}
 	}

+ 100 - 99
pages2/wd/class.vue

@@ -3,17 +3,21 @@
 		<navigator url="/pages2/class/detail" v-for="(item, index) in goodsList" :key="index" style="margin-bottom: 30rpx;">
 			<view class="class_item">
 				<image :src="$method.splitImgHost(item.coverUrl, true)" style="height: 316rpx;width: 100%;border-radius: 24rpx;"></image>
-				<view style="color: #333333;font-weight: bold;font-size: 32rpx;">
-					{{item.goodsName}}
-				</view>
+				<view style="color: #333333;font-weight: bold;font-size: 32rpx;">{{ item.goodsName }}</view>
 				<view class=".content_box">
 					<image src="/static/icon/wk_icon1.png" class="wk_icon"></image>
-					共<text class="content"> 3 </text>科<text class="content"> 120</text> 节
-					<text class="content"> 60 </text>学时
+					共
+					<text class="content">3</text>
+					科
+					<text class="content">120</text>
+					节
+					<text class="content">60</text>
+					学时
 				</view>
 				<view class=".content_box">
 					<image src="/static/icon/wk_icon2.png" class="wk_icon"></image>
-					学习有效期:<text class="content"> {{$method.timestampToTime(item.validityStartTime)}} - {{$method.timestampToTime(item.validityEndTime)}} </text>
+					学习有效期:
+					<text class="content">{{ $method.timestampToTime(item.validityStartTime) }} - {{ $method.timestampToTime(item.validityEndTime) }}</text>
 				</view>
 			</view>
 			<view class="bottomBox">
@@ -22,115 +26,112 @@
 					学习进度:26/120
 				</view>
 				<view class="box_progress">
-					<view style="width: 60%;">
-						<u-line-progress active-color="#ff9900" :percent="70"></u-line-progress>
-					</view>
-					<view>
-						<u-button type="warning" size="mini" @click.stop="studyIn">进入学习</u-button>
-					</view>
+					<view style="width: 60%;"><u-line-progress active-color="#ff9900" :percent="70"></u-line-progress></view>
+					<view><u-button type="warning" size="mini" @click.stop="studyIn">进入学习</u-button></view>
 				</view>
 				<view class="box_progress">
-					<view style="width: 60%;">
-						<text style="color: #333333;white-space: nowrap;text-overflow: ellipsis;">这是一个考试标题</text>
-					</view>
-					<view>
-						<u-button :plain="true" type="primary" size="mini" @click.stop="appointment">预约考试</u-button>
-					</view>
+					<view style="width: 60%;"><text style="color: #333333;white-space: nowrap;text-overflow: ellipsis;">这是一个考试标题</text></view>
+					<view><u-button :plain="true" type="primary" size="mini" @click.stop="appointment(item)">预约考试</u-button></view>
 				</view>
 				<view class="box_progress" v-if="false">
-					<view style="width: 60%;">
-						<text style="color: #2979ff;white-space: nowrap;text-overflow: ellipsis;">【机电全科】2021年一建黄金A</text>
-					</view>
-					<view>
-						<u-button type="primary" size="mini">进入刷题</u-button>
-					</view>
+					<view style="width: 60%;"><text style="color: #2979ff;white-space: nowrap;text-overflow: ellipsis;">【机电全科】2021年一建黄金A</text></view>
+					<view><u-button type="primary" size="mini">进入刷题</u-button></view>
 				</view>
 			</view>
-			
 		</navigator>
 	</view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				list:[
-					1,2,3
-				],
-				goodsList:[]
-				
-			}
-		},
-		onLoad(option) {
-			 this.courseGoodsList()
-		},
-		onShow(){
-			
+export default {
+	data() {
+		return {
+			list: [1, 2, 3],
+			goodsList: []
+		};
+	},
+	onLoad(option) {
+		this.courseGoodsList();
+	},
+	onShow() {},
+	methods: {
+		courseGoodsList() {
+			let self = this;
+			this.$api.courseGoodsList().then(res => {
+				if (res.data.code == 200) {
+					self.goodsList = res.data.rows;
+				}
+			});
 		},
-		methods: {
-			courseGoodsList() {
-				let self = this
-				this.$api.courseGoodsList().then(res => {
-					if(res.data.code==200){
-						self.goodsList = res.data.rows
-					}
-				});
-			},
-			studyIn(){
-				this.$navTo.togo('/pages2/verify/input');
-			},
-			appointment(){
-				this.$navTo.togo('/pages2/appointment/index');
-			}
+		studyIn() {
+			this.$navTo.togo('/pages2/verify/input');
 		},
-		
+		appointment(item) {
+			var data = {
+				goodsId: item.goodsId,
+				gradeId: item.gradeId
+			};
+			this.$api.getApplysubscribe(data).then(res => {
+				if (res.data.code === 500) {
+					uni.showModal({
+						showCancel: false,
+						content: res.data.msg
+					});
+				}
+				if (res.data.code === 200) {
+					this.$navTo.togo('/pages2/appointment/index', {
+						goodsId: item.goodsId,
+						gradeId: item.gradeId
+					});
+				}
+			});
+		}
 	}
+};
 </script>
-<style >
-	page {
-			background: #EAEEF1;
-		}
+<style>
+page {
+	background: #eaeef1;
+}
 </style>
 <style scope>
-	
-	.box_progress{
-		display: flex;
-		justify-content:space-between;
-		align-items: center;
-		margin-top: 20rpx;
-	}
-	.bottomBox{
-		background: #FFFFFF;
-		width: 94%;
-		border-bottom-left-radius: 24rpx;
-		border-bottom-right-radius: 24rpx;
-		margin: 0 auto;
-		padding: 20rpx;
-	}
-	.content_box{
-		display: flex;
-		align-items: center;
-		color: #999999;
-		margin-top: 8rpx;
-	}
-	.content{
-		color: #000000;
-		margin: 0 8rpx;
-	}
-	.wk_icon{
-		width: 24rpx;
-		height: 24rpx;
-		margin-right: 8rpx;
-	}
+.box_progress {
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+	margin-top: 20rpx;
+}
+.bottomBox {
+	background: #ffffff;
+	width: 94%;
+	border-bottom-left-radius: 24rpx;
+	border-bottom-right-radius: 24rpx;
+	margin: 0 auto;
+	padding: 20rpx;
+}
+.content_box {
+	display: flex;
+	align-items: center;
+	color: #999999;
+	margin-top: 8rpx;
+}
+.content {
+	color: #000000;
+	margin: 0 8rpx;
+}
+.wk_icon {
+	width: 24rpx;
+	height: 24rpx;
+	margin-right: 8rpx;
+}
 
-	.class_item{
-		width: 100%;
-		background: #FFFFFF;
-		box-shadow: 0rpx 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
-		border-radius: 24rpx;
-		padding: 20rpx;
-		z-index: 999;
-		position: relative;
-	}
+.class_item {
+	width: 100%;
+	background: #ffffff;
+	box-shadow: 0rpx 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
+	border-radius: 24rpx;
+	padding: 20rpx;
+	z-index: 999;
+	position: relative;
+}
 </style>