Jelajahi Sumber

模考组卷修复

谢杰标 2 tahun lalu
induk
melakukan
993db83cb2

+ 1 - 0
pages2/bank/questionBank.vue

@@ -1624,6 +1624,7 @@ export default {
         examId: this.id,
         goodsId: this.goodsId,
         orderGoodsId: this.orderGoodsId,
+        from: 2,
       }).then((res) => {
         let data = res.data.data;
         if (this.doMode == 3) {

+ 8 - 6
pages2/bank/questionBankAllExplain.vue

@@ -278,7 +278,7 @@
             </view>
             <!-- v-if="bank.current == ansIndex" -->
             <view v-for="(ansItem, ansIndex) in bank.jsonStr" :key="ansIndex">
-              <template v-if="ansItem.type == 1">
+              <template v-if="ansItem.type == 1 && bank.current == ansIndex">
                 <view class="pad_8 titBox">
                   <view class="leftLetters">
                     <view class="btnType">
@@ -357,7 +357,7 @@
                 </view>
               </template>
 
-              <template v-if="ansItem.type == 2">
+              <template v-if="ansItem.type == 2 && bank.current == ansIndex">
                 <view class="pad_8 titBox">
                   <view class="leftLetters">
                     <view class="btnType">
@@ -366,11 +366,11 @@
                   </view>
                   <view class="titles">
                     <rich-text :nodes="ansItem.content"></rich-text>
-                    <view v-if="option.imgUrl">
+                    <view v-if="ansItem.imgUrl">
                       <image
                         style="width: 600rpx"
                         mode="widthFix"
-                        :src="$method.splitImgHost(option.imgUrl)"
+                        :src="$method.splitImgHost(ansItem.imgUrl)"
                       ></image>
                     </view>
                   </view>
@@ -445,7 +445,7 @@
                 </view>
               </template>
 
-              <template v-if="ansItem.type == 3">
+              <template v-if="ansItem.type == 3 && bank.current == ansIndex">
                 <view class="pad_8 titBox">
                   <view class="leftLetters">
                     <view class="btnType">
@@ -521,7 +521,7 @@
               </template>
 
               <!-- 简答题 -->
-              <template v-if="ansItem.type == 5">
+              <template v-if="ansItem.type == 5 && bank.current == ansIndex">
                 <view class="pad_8 titBox_title">
                   <view class="leftLetters">
                     <view class="btnType">
@@ -679,10 +679,12 @@ export default {
       if (this.courseType == 2) {
         this.$api.bankReportData(this.recordId).then((res) => {
           this.questionList = JSON.parse(res.data.data.historyExamJson);
+          this.questionList.map((e, i) => e.type == 4 && this.tabSelect(0, i));
         });
       } else {
         this.$api.examReport(this.recordId).then((res) => {
           this.questionList = JSON.parse(res.data.data.historyExamJson);
+          this.questionList.map((e, i) => e.type == 4 && this.tabSelect(0, i));
         });
       }
     },

File diff ditekan karena terlalu besar
+ 692 - 509
pages2/class/questionBank.vue


+ 886 - 816
pages5/examAppointList/index.vue

@@ -1,854 +1,924 @@
 <template>
-	<view>
-		<nav-bar title="模考预约" class="nav"></nav-bar>
-		<view class="tabs">
-			<view class="tab" :class="{ active: index == 1 }" data-index="1" @click="tab(1)">
-				<view>{{ businessName}}</view>
-				<u-icon class="icon" :class="index ==1? 'animals':''" name="arrow-down"></u-icon>
-			</view>
-			<view class="tab" :class="{ active: index == 2 }" data-index="2">
-				<view class="dateRange">
-					<picker mode="date" :value="param.startTime" :end="endDate" @change="bindDateFromChange">
-						<view class="uni-input">{{param.startTime || '开始时间'}}</view>
-					</picker>
-					- 
-					<picker mode="date" :value="param.endTime" :end="endDate" @change="bindDateToChange">
-						<view class="uni-input">{{param.endTime || '结束时间'}}</view>
-					</picker></view>
-				<u-icon class="icon" name="calendar"></u-icon>
-			</view>
-		</view>
-		<view class="scroll">
-			<scroll-view scroll-x="true" class="scroll-x" >
-				<view class="content">
-					<view v-for="(item,index) in sList" :key="index" class="scroll-tag" :class="{active:param.majorId == item.id}" @click="tagSelect(item)">{{item.categoryName}}</view>
-				</view>
-				
-			</scroll-view>
-		</view>
-		
-
-		<view class="record">
-			<view class="item" v-for="(item,index) in mockList" :key="index">
-				<view class="item__header">{{item.subjectName}}</view>
-				<view class="item__body">
-					<view class="title">
-						<image class="img" mode="widthFix" src="/pages5/static/time.png"></image>
-						<text>考试时间</text>
-					</view>
-					<view class="desc">{{$method.timestampToTime(item.examTime)}}
-						<view> {{item.startTime}} - {{item.endTime}} </view>
-					</view>
-					<view class="btn" @click="appoint(item)" :class="{disabled: !canApply(item) || !item.isSubscribe }">{{item.isSubscribe?'预约考试' : '已预约'}}</view>
-				</view>
-			</view>
-		</view>
-		
-		
-		<view class="notice" @click="noticeModal=true">
-			<u-icon class="icon" color="#fff" name="info-circle"></u-icon>
-			<view class="text">模考说明</view>
-		</view>
-
-		<view class="modal" :style="{top:modalTop+'px'}" v-if="index == 1">
-			<view class="content">
-				<scroll-view scroll-y="true" style="height:100%">
-					<view class="list">
-						<view class="item" :class="param.businessId == listItem.businessId ? 'activesty' : ''" v-for="(listItem,listIndex) in businesslist" :key="listIndex" @click="testClick(listItem)">
-							{{ listItem.educationName }}:{{ listItem.businessName }}-{{listItem.projectName}}
-						</view>
-					</view>
-				</scroll-view>
-				
-			</view>
-			<view class="modal_wrap" @click="index = 0"></view>
-		</view>
-		
-		
-		<u-popup class="notice__modal" v-model="noticeModal" mode="center" border-radius="24" :mask-close-able="false">
-			<view class="notice__content">
-				<view class="body">
-					<scroll-view scroll-y="true" style="height:700rpx">
-						<view class="content">
-							<view class="bold text">模拟考试说明</view>
-							
-							<view>在您注册过程中,您需要完成我们的注册流程并通过点击“同意并继续”的形式在线签署以下协议及政策,请您务必仔细阅读、充分理解协议中的条款内容后再点击同意(尤其是以粗体标识的条款,因为这些条款可能会明确您应履行的义务或对您的权利有所限制)。
-							</view>
-							
-						</view>
-					</scroll-view>
-				</view>
-				<view class="footer">
-					<view class="btn close" @click="noticeModal = false">我知道了</view>
-				</view>
-			</view>
-		</u-popup>
-		
-		<view class="appoint__modal" v-if="appointModal" mode="center" border-radius="24" :mask-close-able="false">
-			<view class="appoint__content">
-				<view class="body">
-						<image class="img" src="/pages5/static/img-header.png" mode="widthFix"></image>
-						<view class="content">
-							<view class="bold center">模拟考试说明</view>
-							
-							<view>
-								您预约的模拟考试,安排如下: 
-							</view>
-							<view>
-								<text class="bold text">模考场次: </text>
-								<text class="text">{{showItem.applyName}}</text>
-							</view>
-							<view>
-								<text class="bold text">项目:   </text>
-								<text class="text">{{ showItem.businessName }} {{ showItem.projectName }}</text>
-							</view>
-							<view>
-								<text class="bold text">专业:</text>
-								<text class="text">{{showItem.categoryName}}</text>
-							</view>
-							<view>
-								<text class="bold text">科目:</text>
-								<text class="text">{{showItem.subjectName}}</text>
-							</view>
-							<view>
-								<text class="bold text">考试时间:</text>
-								<text class="text">
-									{{ $method.timestampToTime(showItem.examTime) }}
-									{{ showItem.startTime }} - {{ showItem.endTime }}
-								</text>
-							</view>
-							<view>请准时参加考试哦~</view>
-							
-						</view>
-				</view>
-				<view class="footer">
-					<view class="btn close" @click="appointModal = false;openAppoint=true">我知道了</view>
-				</view>
-			</view>
-		</view>
-		
-		<u-popup class="open__modal" v-model="openAppoint" mode="center" border-radius="24" :mask-close-able="false">
-			<view class="open__content">
-				<view class="body">
-						<view class="content">
-							<view class="bold center">开考提醒</view>
-							
-							<view class="center">
-								开考前10分钟提醒入场,不错过实战机会
-							</view>
-							
-						</view>
-				</view>
-				<view class="footer">
-					<view class="btn close" @click="closeNotice()">我知道了</view>
-				</view>
-			</view>
-		</u-popup>
-	</view>
+  <view>
+    <nav-bar title="模考预约" class="nav"></nav-bar>
+    <view class="tabs">
+      <view
+        class="tab"
+        :class="{ active: index == 1 }"
+        data-index="1"
+        @click="tab(1)"
+      >
+        <view>{{ businessName }}</view>
+        <u-icon
+          class="icon"
+          :class="index == 1 ? 'animals' : ''"
+          name="arrow-down"
+        ></u-icon>
+      </view>
+      <view class="tab" :class="{ active: index == 2 }" data-index="2">
+        <view class="dateRange">
+          <picker
+            mode="date"
+            :value="param.startTime"
+            :end="endDate"
+            @change="bindDateFromChange"
+          >
+            <view class="uni-input">{{ param.startTime || "开始时间" }}</view>
+          </picker>
+          -
+          <picker
+            mode="date"
+            :value="param.endTime"
+            :end="endDate"
+            @change="bindDateToChange"
+          >
+            <view class="uni-input">{{ param.endTime || "结束时间" }}</view>
+          </picker></view
+        >
+        <u-icon class="icon" name="calendar"></u-icon>
+      </view>
+    </view>
+    <view class="scroll">
+      <scroll-view scroll-x="true" class="scroll-x">
+        <view class="content">
+          <view
+            v-for="(item, index) in sList"
+            :key="index"
+            class="scroll-tag"
+            :class="{ active: param.majorId == item.id }"
+            @click="tagSelect(item)"
+            >{{ item.categoryName }}</view
+          >
+        </view>
+      </scroll-view>
+    </view>
+
+    <view class="record">
+      <view class="item" v-for="(item, index) in mockList" :key="index">
+        <view class="item__header">{{ item.subjectName }}</view>
+        <view class="item__body">
+          <view class="title">
+            <image
+              class="img"
+              mode="widthFix"
+              src="/pages5/static/time.png"
+            ></image>
+            <text>考试时间</text>
+          </view>
+          <view class="desc"
+            >{{ $method.timestampToTime(item.examTime) }}
+            <view> {{ item.startTime }} - {{ item.endTime }} </view>
+          </view>
+          <view
+            class="btn"
+            @click="appoint(item)"
+            :class="{ disabled: !canApply(item) || !item.isSubscribe }"
+            >{{ item.isSubscribe ? "预约考试" : "已预约" }}</view
+          >
+        </view>
+      </view>
+    </view>
+
+    <view class="notice" @click="noticeModal = true">
+      <u-icon class="icon" color="#fff" name="info-circle"></u-icon>
+      <view class="text">模考说明</view>
+    </view>
+
+    <view class="modal" :style="{ top: modalTop + 'px' }" v-if="index == 1">
+      <view class="content">
+        <scroll-view scroll-y="true" style="height: 100%">
+          <view class="list">
+            <view
+              class="item"
+              :class="
+                param.businessId == listItem.businessId ? 'activesty' : ''
+              "
+              v-for="(listItem, listIndex) in businesslist"
+              :key="listIndex"
+              @click="testClick(listItem)"
+            >
+              {{ listItem.educationName }}:{{ listItem.businessName }}-{{
+                listItem.projectName
+              }}
+            </view>
+          </view>
+        </scroll-view>
+      </view>
+      <view class="modal_wrap" @click="index = 0"></view>
+    </view>
+
+    <u-popup
+      class="notice__modal"
+      v-model="noticeModal"
+      mode="center"
+      border-radius="24"
+      :mask-close-able="false"
+    >
+      <view class="notice__content">
+        <view class="body">
+          <scroll-view scroll-y="true" style="height: 700rpx">
+            <view class="content">
+              <view class="bold text">模拟考试说明</view>
+
+              <view
+                >在您注册过程中,您需要完成我们的注册流程并通过点击“同意并继续”的形式在线签署以下协议及政策,请您务必仔细阅读、充分理解协议中的条款内容后再点击同意(尤其是以粗体标识的条款,因为这些条款可能会明确您应履行的义务或对您的权利有所限制)。
+              </view>
+            </view>
+          </scroll-view>
+        </view>
+        <view class="footer">
+          <view class="btn close" @click="noticeModal = false">我知道了</view>
+        </view>
+      </view>
+    </u-popup>
+
+    <view
+      class="appoint__modal"
+      v-if="appointModal"
+      mode="center"
+      border-radius="24"
+      :mask-close-able="false"
+    >
+      <view class="appoint__content">
+        <view class="body">
+          <image
+            class="img"
+            src="/pages5/static/img-header.png"
+            mode="widthFix"
+          ></image>
+          <view class="content">
+            <view class="bold center">模拟考试说明</view>
+
+            <view> 您预约的模拟考试,安排如下: </view>
+            <view>
+              <text class="bold text">模考场次: </text>
+              <text class="text">{{ showItem.applyName }}</text>
+            </view>
+            <view>
+              <text class="bold text">项目: </text>
+              <text class="text"
+                >{{ showItem.businessName }} {{ showItem.projectName }}</text
+              >
+            </view>
+            <view>
+              <text class="bold text">专业:</text>
+              <text class="text">{{ showItem.categoryName }}</text>
+            </view>
+            <view>
+              <text class="bold text">科目:</text>
+              <text class="text">{{ showItem.subjectName }}</text>
+            </view>
+            <view>
+              <text class="bold text">考试时间:</text>
+              <text class="text">
+                {{ $method.timestampToTime(showItem.examTime) }}
+                {{ showItem.startTime }} - {{ showItem.endTime }}
+              </text>
+            </view>
+            <view>请准时参加考试哦~</view>
+          </view>
+        </view>
+        <view class="footer">
+          <view
+            class="btn close"
+            @click="
+              appointModal = false;
+              openAppoint = true;
+            "
+            >我知道了</view
+          >
+        </view>
+      </view>
+    </view>
+
+    <u-popup
+      class="open__modal"
+      v-model="openAppoint"
+      mode="center"
+      border-radius="24"
+      :mask-close-able="false"
+    >
+      <view class="open__content">
+        <view class="body">
+          <view class="content">
+            <view class="bold center">开考提醒</view>
+
+            <view class="center"> 开考前10分钟提醒入场,不错过实战机会 </view>
+          </view>
+        </view>
+        <view class="footer">
+          <view class="btn close" @click="closeNotice()">我知道了</view>
+        </view>
+      </view>
+    </u-popup>
+  </view>
 </template>
 
 <script>
-	import {mapGetters,mapActions} from 'vuex'
+import { mapGetters, mapActions } from "vuex";
 export default {
-	computed:{
-		...mapGetters(['userInfo','sysTime'])
-	},
-	data() {
-		return {
-			tagActive:'',
-			openAppoint:false,
-			appointModal:false,
-			noticeModal:false,
-			index: 0,
-			list: [],
-			list1: [],
-			mockList: [],
-			businesslist:[],
-			param: {
-				endTime:'',
-				startTime:'',
-				pageNum: 1,
-				pageSize: 10,
-				businessId:'',
-				majorId:''
-			},
-			isRepeat:false,
-			total: 0,
-			activeIndex: '',
-			typeIndex:0,
-			itemIndex:'',
-			modalTop:0,
-			endDate:'',
-			businessName:'',
-			subscribeId:0,
-			nowTime:'',
-			sList:[],
-			showItem:{},
-		};
-	},
-	async onLoad(option) {
-		this.endDate = this.$method.timestampToTime(new Date().getTime() / 1000).replace(/-/g,'/');
-		this.nowTime = +this.$method.timest();
-			await this.setSystemTime();
-		await this.mockApplyListApplyBusiness();
-		
-		this.mockApplyListApply();
-		uni.getSystemInfo({
-			success:(e) => {
-				let info = uni.createSelectorQuery().select(".nav");
-				info.boundingClientRect((navData) => { //data - 各种参数
-				
-					let info = uni.createSelectorQuery().select(".tabs");
-					info.boundingClientRect((tabData) => { //data - 各种参数
-						this.modalTop = navData.height + tabData.height
-					}).exec()
-				}).exec()
-			}
-		})
-	},
-	onPullDownRefresh() {
-		let that = this;
-		this.param.pageNum = 1;
-		this.mockApplyListApply();
-		setTimeout(function() {
-			uni.stopPullDownRefresh();
-		}, 500);
-	},
-	onReachBottom() {
-		if (this.mockList.length < this.total) {
-			this.param.pageNum++;
-			this.mockApplyListApply();
-		}
-	},
-	onShow() {
-		
-	},
-	methods: {
-		...mapActions(['setSystemTime']),
-		closeNotice() {
-			this.mockSubscribeEdit();
-			this.openAppoint = false;
-			this.param.pageNum = 1;
-			this.mockList = [];
-			this.mockApplyListApply()
-		},
-		canApply(item) {
-			console.log(item)
-			let startTime = item.applyStartTime
-			let endTime = item.applyEndTime
-			let examTime = item.examTime
-			
-			if(this.sysTime >= startTime && this.sysTime <= endTime && this.sysTime < examTime) {
-				return true;
-			} else {
-				return false;
-			}
-		},
-		tagSelect(item) {
-			this.param.majorId = item.id;
-			this.mockList = []
-			this.mockApplyListApply()
-		},
-		testClick(item) {
-			if(!item) {
-				this.param.businessId = ''
-				this.businessId = ''
-				this.index = 0;
-				this.mockList = []
-				this.mockApplyListApply();
-				return;
-			}
-			console.log(item,'item')
-			this.param.businessId = item.businessId
-			this.businessName = item.educationName  +':'+item.businessName +'-'+ item.projectName
-			this.index = 0;
-			this.mockList = []
-			this.courseMajorList({businessId:item.businessId,projectId:item.projectId,status:1})
-			this.mockApplyListApply();
-			
-			console.log(this.b)
-		},
-		mockApplyListApplyBusiness() {
-			return new Promise(resolve => {
-				this.$api.mockApplyListApplyBusiness().then(async res => {
-					this.businesslist = res.data.rows;
-					this.param.businessId = res.data.rows[0].businessId;
-					this.businessName = res.data.rows[0].businessName + res.data.rows[0].projectName
-					await this.courseMajorList({businessId:res.data.rows[0].businessId,projectId:res.data.rows[0].projectId,status:1})
-					resolve()
-				})
-			})
-			
-		},
-		mockApplyListApply() {
-			let param = JSON.parse(JSON.stringify(this.param))
-			if(param.endTime) {
-				param.endTime = this.$method.TimeTotimestamp(param.endTime)
-			}
-			
-			if(param.startTime) {
-				param.startTime = this.$method.TimeTotimestamp(param.startTime)
-			}
-			
-			
-			this.$api.mockApplyListApply(param).then(res => {
-				this.mockList.push(...res.data.rows)
-				this.total = res.data.total;
-			})
-		},
-		refreshByIndex() {
-			
-		},
-		courseMajorList(data) {
-			return new Promise(resolve => {
-				
-				let self = this;
-				this.$api.courseMajorList(data).then(res => {
-					if(res.data.code==200){
-						self.sList = res.data.rows
-						let allItem = {id:'',categoryName:'全部'}
-						self.sList.unshift(allItem)
-						this.param.majorId = '';
-						
-						resolve()
-					}
-				});
-			})
-		},
-		
-		appoint(item) {
-			let canApply = this.canApply(item);
-			console.log(canApply)
-			if(!canApply) {
-				uni.showToast({
-					icon:'none',
-					title:'不在预约时间范围'
-				})
-				
-				return;
-			} 
-			
-			if(!item.isSubscribe) {
-				uni.showToast({
-					icon:'none',
-					title:'您已预约'
-				})
-				return;
-			}
-			
-			this.$api.mockSubscribe({
-				applySiteExamTime:item.examTime,
-				applySiteEndTime:item.endTime,
-				applySiteStartTime:item.startTime,
-				applyId:item.applyId,
-				mockMajorSubjectId:item.mockMajorSubjectId,
-				eachExamId:item.eachExamId
-				// applySiteExamTime:1653899220,
-				// applySiteEndTime:"17:27:54",
-				// applySiteStartTime:'16:27:54', 
-				// applyId:26,
-				// mockMajorSubjectId:49
-			}).then(res => {
-				console.log(res)
-				if(res.data.code == 200) {
-					this.showItem = item;
-					this.appointModal = true;
-					this.subscribeId = res.data.data;
-				} else {
-					uni.showToast({
-						icon:'none',
-						title:res.data.msg
-					})
-				}
-				
-				
-			}).catch(err => {
-				uni.showToast({
-					icon:'none',
-					title:err.data.msg
-				})
-			})
-			
-		},
-		tab(index) {
-			console.log(index,this.index)
-			if(this.index == index) {
-				this.index = 0;
-				return;
-			}
-			this.index = index;
-			console.log(this.index);
-		},
-		bindDateFromChange(e) {
-			this.param.startTime = e.detail.value
-			this.param.pageNum = 1;
-			this.mockList = []
-			this.mockApplyListApply();
-		},
-		
-		 mockSubscribeEdit() {
-			this.$api
-				.mockSubscribeEdit({
-					mockRemind: 1,
-					subscribeId: this.subscribeId,
-				})
-				.then((res) => {
-					uni.showToast({
-						icon:'none',
-						title:'开启成功'
-					})
-				});
-		},
-		
-		bindDateToChange(e) {
-			this.param.endTime = e.detail.value
-			this.param.pageNum = 1;
-			this.mockList = []
-			this.mockApplyListApply();
-		}
-	}
+  computed: {
+    ...mapGetters(["userInfo", "sysTime"]),
+  },
+  data() {
+    return {
+      tagActive: "",
+      openAppoint: false,
+      appointModal: false,
+      noticeModal: false,
+      index: 0,
+      list: [],
+      list1: [],
+      mockList: [],
+      businesslist: [],
+      param: {
+        endTime: "",
+        startTime: "",
+        pageNum: 1,
+        pageSize: 10,
+        businessId: "",
+        majorId: "",
+      },
+      isRepeat: false,
+      total: 0,
+      activeIndex: "",
+      typeIndex: 0,
+      itemIndex: "",
+      modalTop: 0,
+      endDate: "",
+      businessName: "",
+      subscribeId: 0,
+      nowTime: "",
+      sList: [],
+      showItem: {},
+    };
+  },
+  async onLoad(option) {
+    this.endDate = this.$method
+      .timestampToTime(new Date().getTime() / 1000)
+      .replace(/-/g, "/");
+    this.nowTime = +this.$method.timest();
+    await this.setSystemTime();
+    await this.mockApplyListApplyBusiness();
+
+    this.mockApplyListApply();
+    uni.getSystemInfo({
+      success: (e) => {
+        let info = uni.createSelectorQuery().select(".nav");
+        info
+          .boundingClientRect((navData) => {
+            //data - 各种参数
+
+            let info = uni.createSelectorQuery().select(".tabs");
+            info
+              .boundingClientRect((tabData) => {
+                //data - 各种参数
+                this.modalTop = navData.height + tabData.height;
+              })
+              .exec();
+          })
+          .exec();
+      },
+    });
+  },
+  onPullDownRefresh() {
+    let that = this;
+    this.param.pageNum = 1;
+    this.mockApplyListApply();
+    setTimeout(function () {
+      uni.stopPullDownRefresh();
+    }, 500);
+  },
+  onReachBottom() {
+    if (this.mockList.length < this.total) {
+      this.param.pageNum++;
+      this.mockApplyListApply();
+    }
+  },
+  onShow() {},
+  methods: {
+    ...mapActions(["setSystemTime"]),
+    closeNotice() {
+      this.mockSubscribeEdit();
+      this.openAppoint = false;
+      this.param.pageNum = 1;
+      this.mockList = [];
+      this.mockApplyListApply();
+    },
+    canApply(item) {
+      console.log(item);
+      let startTime = item.applyStartTime;
+      let endTime = item.applyEndTime;
+      let examTime = item.examTime;
+
+      if (
+        this.sysTime >= startTime &&
+        this.sysTime <= endTime &&
+        this.sysTime < examTime
+      ) {
+        return true;
+      } else {
+        return false;
+      }
+    },
+    tagSelect(item) {
+      this.param.majorId = item.id;
+      this.mockList = [];
+      this.mockApplyListApply();
+    },
+    testClick(item) {
+      if (!item) {
+        this.param.businessId = "";
+        this.businessId = "";
+        this.index = 0;
+        this.mockList = [];
+        this.mockApplyListApply();
+        return;
+      }
+      console.log(item, "item");
+      this.param.businessId = item.businessId;
+      this.businessName =
+        item.educationName + ":" + item.businessName + "-" + item.projectName;
+      this.index = 0;
+      this.mockList = [];
+      this.courseMajorList({
+        businessId: item.businessId,
+        projectId: item.projectId,
+        status: 1,
+      });
+      this.mockApplyListApply();
+
+      console.log(this.b);
+    },
+    mockApplyListApplyBusiness() {
+      return new Promise((resolve) => {
+        this.$api.mockApplyListApplyBusiness().then(async (res) => {
+          this.businesslist = res.data.rows;
+          this.param.businessId = res.data.rows[0].businessId;
+          this.businessName =
+            res.data.rows[0].businessName + res.data.rows[0].projectName;
+          await this.courseMajorList({
+            businessId: res.data.rows[0].businessId,
+            projectId: res.data.rows[0].projectId,
+            status: 1,
+          });
+          resolve();
+        });
+      });
+    },
+    mockApplyListApply() {
+      let param = JSON.parse(JSON.stringify(this.param));
+      if (param.endTime) {
+        param.endTime = this.$method.TimeTotimestamp(param.endTime);
+      }
+
+      if (param.startTime) {
+        param.startTime = this.$method.TimeTotimestamp(param.startTime);
+      }
+
+      this.$api.mockApplyListApply(param).then((res) => {
+        this.mockList.push(...res.data.rows);
+        this.total = res.data.total;
+      });
+    },
+    refreshByIndex() {},
+    courseMajorList(data) {
+      return new Promise((resolve) => {
+        let self = this;
+        this.$api.courseMajorList(data).then((res) => {
+          if (res.data.code == 200) {
+            self.sList = res.data.rows;
+            let allItem = { id: "", categoryName: "全部" };
+            self.sList.unshift(allItem);
+            this.param.majorId = "";
+
+            resolve();
+          }
+        });
+      });
+    },
+
+    appoint(item) {
+      let canApply = this.canApply(item);
+      console.log(canApply);
+    //   if (!canApply) {
+    //     uni.showToast({
+    //       icon: "none",
+    //       title: "不在预约时间范围",
+    //     });
+
+    //     return;
+    //   }
+
+    //   if (!item.isSubscribe) {
+    //     uni.showToast({
+    //       icon: "none",
+    //       title: "您已预约",
+    //     });
+    //     return;
+    //   }
+
+      this.$api
+        .mockSubscribe({
+          applySiteExamTime: item.examTime,
+          applySiteEndTime: item.endTime,
+          applySiteStartTime: item.startTime,
+          applyId: item.applyId,
+          mockMajorSubjectId: item.mockMajorSubjectId,
+          eachExamId: item.eachExamId,
+          goodsId: item.goodsId,
+          orderGoodsId: item.orderGoodsId,
+          // applySiteExamTime:1653899220,
+          // applySiteEndTime:"17:27:54",
+          // applySiteStartTime:'16:27:54',
+          // applyId:26,
+          // mockMajorSubjectId:49
+        })
+        .then((res) => {
+          console.log(res);
+          if (res.data.code == 200) {
+            this.showItem = item;
+            this.appointModal = true;
+            this.subscribeId = res.data.data;
+          } else {
+            uni.showToast({
+              icon: "none",
+              title: res.data.msg,
+            });
+          }
+        })
+        .catch((err) => {
+          uni.showToast({
+            icon: "none",
+            title: err.data.msg,
+          });
+        });
+    },
+    tab(index) {
+      console.log(index, this.index);
+      if (this.index == index) {
+        this.index = 0;
+        return;
+      }
+      this.index = index;
+      console.log(this.index);
+    },
+    bindDateFromChange(e) {
+      this.param.startTime = e.detail.value;
+      this.param.pageNum = 1;
+      this.mockList = [];
+      this.mockApplyListApply();
+    },
+
+    mockSubscribeEdit() {
+      this.$api
+        .mockSubscribeEdit({
+          mockRemind: 1,
+          subscribeId: this.subscribeId,
+        })
+        .then((res) => {
+          uni.showToast({
+            icon: "none",
+            title: "开启成功",
+          });
+        });
+    },
+
+    bindDateToChange(e) {
+      this.param.endTime = e.detail.value;
+      this.param.pageNum = 1;
+      this.mockList = [];
+      this.mockApplyListApply();
+    },
+  },
 };
 </script>
 <style>
 page {
-	background: #eaeef1;
+  background: #eaeef1;
 }
 </style>
 <style lang="scss" scope>
-	.animals{
-		transition: all 0.3s;
-		transform: rotate(180deg);
-	}
+.animals {
+  transition: all 0.3s;
+  transform: rotate(180deg);
+}
 .tabs {
-	position: fixed;
-	left: 0;
-	width: 100%;
-	display: flex;
-	height:80rpx;
-	z-index: 10;
-	.tab {
-		padding:0 18rpx;
-		flex: 1;
-		display: flex;
-		justify-content: space-between;
-		height: 80rpx;
-		line-height: 80rpx;
-		background: #ffffff;
-		font-size: 24rpx;
-		color: #999999;
-		
-		&:nth-of-type(1) {
-			border-right:1px solid #EEEEEE;
-		}
-		
-		.uni-input {
-			text-align: center;
-			width:150rpx;
-		}
-		
-		
-		.dateRange {
-			display: flex;
-			justify-content: space-between;
-		}
-
-		&.active {
-			color: #333333;
-			.icon{
-				transform: rotate(180deg);
-			}
-		}
-	}
+  position: fixed;
+  left: 0;
+  width: 100%;
+  display: flex;
+  height: 80rpx;
+  z-index: 10;
+  .tab {
+    padding: 0 18rpx;
+    flex: 1;
+    display: flex;
+    justify-content: space-between;
+    height: 80rpx;
+    line-height: 80rpx;
+    background: #ffffff;
+    font-size: 24rpx;
+    color: #999999;
+
+    &:nth-of-type(1) {
+      border-right: 1px solid #eeeeee;
+    }
+
+    .uni-input {
+      text-align: center;
+      width: 150rpx;
+    }
+
+    .dateRange {
+      display: flex;
+      justify-content: space-between;
+    }
+
+    &.active {
+      color: #333333;
+      .icon {
+        transform: rotate(180deg);
+      }
+    }
+  }
 }
 
 .scroll {
-	width:100%;
-	margin-top:80rpx;
-	.scroll-x {
-		
-		.content {
-				padding:16rpx;
-				white-space:nowrap;
-				
-				.scroll-tag {
-					display: inline-block;
-					padding:11rpx 17rpx;
-					background: #fff;
-					color:#666666;
-					margin-right:16rpx;
-					border-radius:16rpx;;
-					
-					&.active {
-						background: #007AFF;
-						color:#fff;
-					}
-				}
-		}
-		
-	}
-}
+  width: 100%;
+  margin-top: 80rpx;
+  .scroll-x {
+    .content {
+      padding: 16rpx;
+      white-space: nowrap;
+
+      .scroll-tag {
+        display: inline-block;
+        padding: 11rpx 17rpx;
+        background: #fff;
+        color: #666666;
+        margin-right: 16rpx;
+        border-radius: 16rpx;
 
+        &.active {
+          background: #007aff;
+          color: #fff;
+        }
+      }
+    }
+  }
+}
 
 .record {
-	padding: 16rpx 16rpx;
-	display: flex;
-	flex-wrap: wrap;
-	.item {
-		margin-bottom: 16rpx;
-		width:351rpx;
-		background: #ffffff;
-		border-radius: 16rpx;
-		position: relative;
-		
-		&:nth-of-type(2n) {
-			margin-left:16rpx;
-			
-		}
-
-		&__header {
-			padding:24rpx 16rpx;
-			background: #F2F6FF;
-			font-size: 30rpx;
-			color:#007AFF;
-			
-			&::before {
-				content:'';
-				display: inline-block;
-				width: 4rpx;
-				height: 32rpx;
-				background: #007AFF;
-				margin-right:10rpx;
-				vertical-align: middle;
-			}
-		}
-		
-		&__body {
-			padding:16rpx;
-			
-			.title {
-				font-size: 24rpx;
-				color: #666666;
-				line-height: 48rpx;
-				
-				.img {
-					vertical-align: middle;
-					width:32rpx;
-				}
-			}
-			
-			.desc {
-				margin-top:10rpx;
-				font-size: 28rpx;
-				font-weight: bold;
-				color: #666666;
-				line-height: 36rpx;
-			}
-			
-			.btn {
-				margin-top:30rpx;
-				background: #FFFFFF;
-				border-radius: 16rpx;
-				height: 64rpx;
-				line-height: 62rpx;
-				text-align: center;
-				font-size: 28rpx;
-				
-				border: 1px solid #007AFF;
-				color:#007AFF;
-					
-				
-				&.disabled {
-					border: 1px solid #D9D9D9;
-					color:#D9D9D9;
-				}
-			}
-		}
-	}
+  padding: 16rpx 16rpx;
+  display: flex;
+  flex-wrap: wrap;
+  .item {
+    margin-bottom: 16rpx;
+    width: 351rpx;
+    background: #ffffff;
+    border-radius: 16rpx;
+    position: relative;
+
+    &:nth-of-type(2n) {
+      margin-left: 16rpx;
+    }
+
+    &__header {
+      padding: 24rpx 16rpx;
+      background: #f2f6ff;
+      font-size: 30rpx;
+      color: #007aff;
+
+      &::before {
+        content: "";
+        display: inline-block;
+        width: 4rpx;
+        height: 32rpx;
+        background: #007aff;
+        margin-right: 10rpx;
+        vertical-align: middle;
+      }
+    }
+
+    &__body {
+      padding: 16rpx;
+
+      .title {
+        font-size: 24rpx;
+        color: #666666;
+        line-height: 48rpx;
+
+        .img {
+          vertical-align: middle;
+          width: 32rpx;
+        }
+      }
+
+      .desc {
+        margin-top: 10rpx;
+        font-size: 28rpx;
+        font-weight: bold;
+        color: #666666;
+        line-height: 36rpx;
+      }
+
+      .btn {
+        margin-top: 30rpx;
+        background: #ffffff;
+        border-radius: 16rpx;
+        height: 64rpx;
+        line-height: 62rpx;
+        text-align: center;
+        font-size: 28rpx;
+
+        border: 1px solid #007aff;
+        color: #007aff;
+
+        &.disabled {
+          border: 1px solid #d9d9d9;
+          color: #d9d9d9;
+        }
+      }
+    }
+  }
 }
 
 .notice {
-	position:fixed;
-	right:0;
-	top:50%;
-	width: 48rpx;
-	height: 200rpx;
-	background: #52C41A;
-	box-shadow: 0px 3rpx 16rpx 0rpx rgba(44, 121, 7, 0.5);
-	border-radius: 24rpx;
-	display: flex;
-	flex-direction: column;
-	align-items: center;
-	justify-content: center;
-	padding:10rpx 0;
-	
-	.text {
-		flex:1;
-		color:#fff;
-		text-align: center;
-	}
-}
+  position: fixed;
+  right: 0;
+  top: 50%;
+  width: 48rpx;
+  height: 200rpx;
+  background: #52c41a;
+  box-shadow: 0px 3rpx 16rpx 0rpx rgba(44, 121, 7, 0.5);
+  border-radius: 24rpx;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  padding: 10rpx 0;
 
+  .text {
+    flex: 1;
+    color: #fff;
+    text-align: center;
+  }
+}
 
 .modal {
-	bottom:0;
-	z-index: 199999999;
-	position: fixed;
-	left: 0;
-	width: 100%;
-
-	.content {
-		height:80%;
-		overflow: hidden;
-		position: relative;
-		z-index: 10;
-		background: #fff;
-		padding: 8rpx 12rpx 20rpx;
-		display: flex;
-		flex-wrap: wrap;
-
-		.top {
-			margin: 0 auto;
-			width: 726rpx;
-			height: 80rpx;
-			background: #f5f5f5;
-			color: #666666;
-			border-radius: 16rpx;
-			text-align: center;
-			line-height: 80rpx;
-			font-size: 32rpx;
-		}
-
-		.list {
-			width:100%;
-			margin-top: 16rpx;
-			display: flex;
-			flex-wrap: wrap;
-			justify-content: space-between;
-
-			.item {
-				padding: 25rpx 20rpx;
-				width: 49%;
-				background: #f5f5f5;
-				border-radius: 16rpx;
-				font-size: 32rpx;
-				color: #666666;
-				margin: 8rpx 0;
-			}
-		}
-	}
-
-	.modal_wrap {
-		position: absolute;
-		left: 0;
-		width: 100%;
-		top: 0;
-		height: 100%;
-		background: rgba(0, 0, 0, 0.3);
-	}
-}
+  bottom: 0;
+  z-index: 199999999;
+  position: fixed;
+  left: 0;
+  width: 100%;
+
+  .content {
+    height: 80%;
+    overflow: hidden;
+    position: relative;
+    z-index: 10;
+    background: #fff;
+    padding: 8rpx 12rpx 20rpx;
+    display: flex;
+    flex-wrap: wrap;
 
+    .top {
+      margin: 0 auto;
+      width: 726rpx;
+      height: 80rpx;
+      background: #f5f5f5;
+      color: #666666;
+      border-radius: 16rpx;
+      text-align: center;
+      line-height: 80rpx;
+      font-size: 32rpx;
+    }
+
+    .list {
+      width: 100%;
+      margin-top: 16rpx;
+      display: flex;
+      flex-wrap: wrap;
+      justify-content: space-between;
+
+      .item {
+        padding: 25rpx 20rpx;
+        width: 49%;
+        background: #f5f5f5;
+        border-radius: 16rpx;
+        font-size: 32rpx;
+        color: #666666;
+        margin: 8rpx 0;
+      }
+    }
+  }
+
+  .modal_wrap {
+    position: absolute;
+    left: 0;
+    width: 100%;
+    top: 0;
+    height: 100%;
+    background: rgba(0, 0, 0, 0.3);
+  }
+}
 
 .notice__modal {
-	.notice__content {
-		width: 640rpx;
-		height: 818rpx;
-		background: #FFFFFF;
-		display: flex;
-		flex-direction: column;
-		
-		.body {
-			flex:1;
-			
-			.content {
-				padding:30rpx 40rpx 28rpx;
-				line-height: 40rpx;
-				font-size: 28rpx;
-				color:#666;
-				
-				.bold {
-					color:#333;
-					font-size: 32rpx;
-					font-weight: bold;
-				}
-				
-				.center {
-					text-align: center;
-				}
-			}
-		}
-		
-		.footer {
-			height:140rpx;
-			border-top:1px solid #EEEEEE;
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			
-			.btn {
-				margin:0 12rpx;
-				width: 200rpx;
-				height: 80rpx;
-				color:#007AFF;
-				font-size: 30rpx;
-				text-align: center;
-				line-height: 80rpx;
-				background: #F5F5F5;
-				border-radius: 40rpx 40rpx 40rpx 40rpx;
-				
-				
-				&.close {
-					color:#fff;
-					width: 560rpx;
-					height: 80rpx;
-					background: #007AFF;
-					border-radius: 40rpx 40rpx 40rpx 40rpx;
-				}
-			}
-		}
-	}
+  .notice__content {
+    width: 640rpx;
+    height: 818rpx;
+    background: #ffffff;
+    display: flex;
+    flex-direction: column;
+
+    .body {
+      flex: 1;
+
+      .content {
+        padding: 30rpx 40rpx 28rpx;
+        line-height: 40rpx;
+        font-size: 28rpx;
+        color: #666;
+
+        .bold {
+          color: #333;
+          font-size: 32rpx;
+          font-weight: bold;
+        }
+
+        .center {
+          text-align: center;
+        }
+      }
+    }
+
+    .footer {
+      height: 140rpx;
+      border-top: 1px solid #eeeeee;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+
+      .btn {
+        margin: 0 12rpx;
+        width: 200rpx;
+        height: 80rpx;
+        color: #007aff;
+        font-size: 30rpx;
+        text-align: center;
+        line-height: 80rpx;
+        background: #f5f5f5;
+        border-radius: 40rpx 40rpx 40rpx 40rpx;
+
+        &.close {
+          color: #fff;
+          width: 560rpx;
+          height: 80rpx;
+          background: #007aff;
+          border-radius: 40rpx 40rpx 40rpx 40rpx;
+        }
+      }
+    }
+  }
 }
 
 .open__modal {
-	.open__content {
-		width: 640rpx;
-		background: #FFFFFF;
-		
-		.body {
-			
-			.content {
-				padding:30rpx 40rpx 28rpx;
-				line-height: 40rpx;
-				font-size: 28rpx;
-				color:#666;
-				
-				.bold {
-					color:#333;
-					font-size: 32rpx;
-					font-weight: bold;
-				}
-				
-				.center {
-					text-align: center;
-				}
-			}
-		}
-		
-		.footer {
-			height:140rpx;
-			border-top:1px solid #EEEEEE;
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			
-			.btn {
-				margin:0 12rpx;
-				width: 200rpx;
-				height: 80rpx;
-				color:#007AFF;
-				font-size: 30rpx;
-				text-align: center;
-				line-height: 80rpx;
-				background: #F5F5F5;
-				border-radius: 40rpx 40rpx 40rpx 40rpx;
-				
-				
-				&.close {
-					color:#fff;
-					width: 560rpx;
-					height: 80rpx;
-					background: #007AFF;
-					border-radius: 40rpx 40rpx 40rpx 40rpx;
-				}
-			}
-		}
-	}
+  .open__content {
+    width: 640rpx;
+    background: #ffffff;
+
+    .body {
+      .content {
+        padding: 30rpx 40rpx 28rpx;
+        line-height: 40rpx;
+        font-size: 28rpx;
+        color: #666;
+
+        .bold {
+          color: #333;
+          font-size: 32rpx;
+          font-weight: bold;
+        }
+
+        .center {
+          text-align: center;
+        }
+      }
+    }
+
+    .footer {
+      height: 140rpx;
+      border-top: 1px solid #eeeeee;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+
+      .btn {
+        margin: 0 12rpx;
+        width: 200rpx;
+        height: 80rpx;
+        color: #007aff;
+        font-size: 30rpx;
+        text-align: center;
+        line-height: 80rpx;
+        background: #f5f5f5;
+        border-radius: 40rpx 40rpx 40rpx 40rpx;
+
+        &.close {
+          color: #fff;
+          width: 560rpx;
+          height: 80rpx;
+          background: #007aff;
+          border-radius: 40rpx 40rpx 40rpx 40rpx;
+        }
+      }
+    }
+  }
 }
 
 .appoint__modal {
-	position:fixed;
-	left:0;
-	top:0;
-	z-index: 9999;
-	width:100%;
-	height:100%;
-	background:rgba(0,0,0,0.3);
-	.img {
-		width:280rpx;
-		position:absolute;
-		left:50%;
-		margin-left:-140rpx;
-		top:-70rpx;
-	}
-	.appoint__content {
-		border-radius:20rpx;
-		position:absolute;
-		left:50%;
-		top:50%;
-		transform: translate3D(-50%,-50%,0);
-		width: 640rpx;
-		height: 867rpx;
-		background: #FFFFFF;
-		
-		.body {
-			position: relative;
-			
-			
-			.content {
-				padding:160rpx 40rpx 28rpx;
-				line-height: 60rpx;
-				font-size: 28rpx;
-				color:#666;
-				
-				.bold {
-					color:#333;
-					font-size: 32rpx;
-					font-weight: bold;
-				}
-				
-				.center {
-					text-align: center;
-				}
-				
-				
-				.text {
-					color:#666;
-					font-size: 28rpx;
-				}
-			}
-		}
-		
-		.footer {
-			height:140rpx;
-			border-top:1px solid #EEEEEE;
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			
-			.btn {
-				margin:0 12rpx;
-				width: 200rpx;
-				height: 80rpx;
-				color:#007AFF;
-				font-size: 30rpx;
-				text-align: center;
-				line-height: 80rpx;
-				background: #F5F5F5;
-				border-radius: 40rpx 40rpx 40rpx 40rpx;
-				
-				
-				&.close {
-					color:#fff;
-					width: 560rpx;
-					height: 80rpx;
-					background: #007AFF;
-					border-radius: 40rpx 40rpx 40rpx 40rpx;
-				}
-			}
-		}
-	}
+  position: fixed;
+  left: 0;
+  top: 0;
+  z-index: 9999;
+  width: 100%;
+  height: 100%;
+  background: rgba(0, 0, 0, 0.3);
+  .img {
+    width: 280rpx;
+    position: absolute;
+    left: 50%;
+    margin-left: -140rpx;
+    top: -70rpx;
+  }
+  .appoint__content {
+    border-radius: 20rpx;
+    position: absolute;
+    left: 50%;
+    top: 50%;
+    transform: translate3D(-50%, -50%, 0);
+    width: 640rpx;
+    height: 867rpx;
+    background: #ffffff;
+
+    .body {
+      position: relative;
+
+      .content {
+        padding: 160rpx 40rpx 28rpx;
+        line-height: 60rpx;
+        font-size: 28rpx;
+        color: #666;
+
+        .bold {
+          color: #333;
+          font-size: 32rpx;
+          font-weight: bold;
+        }
+
+        .center {
+          text-align: center;
+        }
+
+        .text {
+          color: #666;
+          font-size: 28rpx;
+        }
+      }
+    }
+
+    .footer {
+      height: 140rpx;
+      border-top: 1px solid #eeeeee;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+
+      .btn {
+        margin: 0 12rpx;
+        width: 200rpx;
+        height: 80rpx;
+        color: #007aff;
+        font-size: 30rpx;
+        text-align: center;
+        line-height: 80rpx;
+        background: #f5f5f5;
+        border-radius: 40rpx 40rpx 40rpx 40rpx;
+
+        &.close {
+          color: #fff;
+          width: 560rpx;
+          height: 80rpx;
+          background: #007aff;
+          border-radius: 40rpx 40rpx 40rpx 40rpx;
+        }
+      }
+    }
+  }
 }
 .activesty {
-	background: #007aff !important;
-	color: #fff !important;
+  background: #007aff !important;
+  color: #fff !important;
 }
 </style>

File diff ditekan karena terlalu besar
+ 349 - 297
pages5/examBank/index.vue


+ 201 - 154
pages5/examCount/index.vue

@@ -1,165 +1,212 @@
 <template>
-	<view class="safeArea">
-		<nav-bar title="模拟考试-一级建造师-管理"></nav-bar>
-		<view class="examWrap">
-			<view class="title">距离管理开考还有</view>
-			<view class="circle">
-				<u-circle-progress class="img" width="448" bg-color="rgba(0,0,0,0)" type="primary" :percent="percent"></u-circle-progress>
-				<view class="time">{{timeText}}</view>
-			</view>
-			
-			<view v-if="mockActivity == 1" class="btn" @click="examBank()">开始考试</view>
-			<view v-else class="btn" @click="examBank()" :class="{disabled:!((nowTime > start) && (nowTime < end ))}">开始考试</view>
-		</view>
-	</view>
+  <view class="safeArea">
+    <nav-bar title="模拟考试-一级建造师-管理"></nav-bar>
+    <view class="examWrap">
+      <view class="title">距离管理开考还有</view>
+      <view class="circle">
+        <u-circle-progress
+          class="img"
+          width="448"
+          bg-color="rgba(0,0,0,0)"
+          type="primary"
+          :percent="percent"
+        ></u-circle-progress>
+        <view class="time">{{ timeText }}</view>
+      </view>
+
+      <view v-if="mockActivity == 1" class="btn" @click="examBank()"
+        >开始考试</view
+      >
+      <view
+        v-else
+        class="btn"
+        @click="examBank()"
+        :class="{ disabled: !(nowTime > start && nowTime < end) }"
+        >开始考试</view
+      >
+    </view>
+  </view>
 </template>
 
 <script>
-import { mapGetters } from 'vuex';
+import { mapGetters } from "vuex";
 export default {
-	components: {
-	},
-	data() {
-		return {
-			mockName:'',
-			state:1,
-			start:0,
-			timer:null,
-			timeText:'',
-			nowTime:0,
-			timeLimit:0,
-			examId:0,
-			eachExamId:0,
-			subscribeId:0,
-			end:0,
-			percent:0,
-			examEndTime:0,
-			mockActivity: 0,
-		};
-	},
-	onLoad(option){
-		this.examEndTime = option.examEndTime;
-		this.mockName = option.mockName || ''
-		this.subscribeId = option.subscribeId
-		this.eachExamId = option.eachExamId
-		this.examId = option.examId
-		this.timeLimit = +option.limit || 0
-		this.start = +option.start;
-		this.mockActivity = option.mockActivity
-		this.end = (this.timeLimit* 60) + this.start ;
-		this.timer = setInterval(() => {
-			this.timeText = this.getDuring()
-		},1000)
-	},
-	onShow() {
-		clearInterval(this.timer)
-		this.timer = setInterval(() => {
-			this.timeText = this.getDuring()
-		},1000)
-	},
-	onUnload() {
-		clearInterval(this.timer)
-	},
-	methods: {
-		getDuring() {
-			this.nowTime = +this.$method.timest();
-			let during = this.start - this.nowTime;
-			console.log('during', during)
-			this.percent = during <= 0 ? 100 : during >= 600 ? 0 :  (600 - during) / 600 * 100;
-			if(during <= 0) {
-				return '00:00'
-			}
-			let minutes = parseInt(during/60) >= 10 ? '0'+ parseInt(during/60) : parseInt(during/60);
-			let seconds = during % 60 >= 10 ? during % 60 :'0'+ during % 60;
-			
-			return minutes+':'+seconds
-		},
-		canTest() {
-			
-		},
-		examBank() {
-			if (this.mockActivity == 1) {
-				uni.redirectTo({
-					url:'../examBank/index?examId='+this.examId+'&eachExamId='+this.eachExamId+'&subscribeId='+this.subscribeId+'&examEndTime='+this.examEndTime+'&examStartTime='+this.start
-				})
-			} else {
-				if(((this.nowTime > this.start) && (this.nowTime < this.end ))) {
-					uni.redirectTo({
-						url:'../examBank/index?examId='+this.examId+'&eachExamId='+this.eachExamId+'&subscribeId='+this.subscribeId+'&examEndTime='+this.examEndTime+'&examStartTime='+this.start
-					})
-				} else {
-					uni.showToast({
-						icon:'none',
-						title:'不在考试时间'
-					})
-				}
-			}
-		}
-	},
-	onReachBottom() {},
-	computed: { ...mapGetters(['userInfo']) }
+  components: {},
+  data() {
+    return {
+      mockName: "",
+      state: 1,
+      start: 0,
+      timer: null,
+      timeText: "",
+      nowTime: 0,
+      timeLimit: 0,
+      examId: 0,
+      eachExamId: 0,
+      subscribeId: 0,
+      end: 0,
+      percent: 0,
+      examEndTime: 0,
+      mockActivity: 0,
+      goodsId: "",
+      orderGoodsId: "",
+    };
+  },
+  onLoad(option) {
+    this.examEndTime = option.examEndTime;
+    this.mockName = option.mockName || "";
+    this.subscribeId = option.subscribeId;
+    this.eachExamId = option.eachExamId;
+    this.examId = option.examId;
+    this.timeLimit = +option.limit || 0;
+    this.start = +option.start;
+    this.mockActivity = option.mockActivity;
+    this.end = this.timeLimit * 60 + this.start;
+	this.goodsId = option.goodsId
+	this.orderGoodsId = option.orderGoodsId
+    this.timer = setInterval(() => {
+      this.timeText = this.getDuring();
+    }, 1000);
+  },
+  onShow() {
+    clearInterval(this.timer);
+    this.timer = setInterval(() => {
+      this.timeText = this.getDuring();
+    }, 1000);
+  },
+  onUnload() {
+    clearInterval(this.timer);
+  },
+  methods: {
+    getDuring() {
+      this.nowTime = +this.$method.timest();
+      let during = this.start - this.nowTime;
+      console.log("during", during);
+      this.percent =
+        during <= 0 ? 100 : during >= 600 ? 0 : ((600 - during) / 600) * 100;
+      if (during <= 0) {
+        return "00:00";
+      }
+      let minutes =
+        parseInt(during / 60) >= 10
+          ? "0" + parseInt(during / 60)
+          : parseInt(during / 60);
+      let seconds = during % 60 >= 10 ? during % 60 : "0" + (during % 60);
+
+      return minutes + ":" + seconds;
+    },
+    canTest() {},
+    examBank() {
+      if (this.mockActivity == 1) {
+        uni.redirectTo({
+          url:
+            "../examBank/index?examId=" +
+            this.examId +
+            "&eachExamId=" +
+            this.eachExamId +
+            "&subscribeId=" +
+            this.subscribeId +
+            "&examEndTime=" +
+            this.examEndTime +
+            "&examStartTime=" +
+            this.start +
+            "&goodsId=" +
+            this.goodsId +
+            "&orderGoodsId=" +
+            this.orderGoodsId,
+        });
+      } else {
+        if (this.nowTime > this.start && this.nowTime < this.end) {
+          uni.redirectTo({
+            url:
+              "../examBank/index?examId=" +
+              this.examId +
+              "&eachExamId=" +
+              this.eachExamId +
+              "&subscribeId=" +
+              this.subscribeId +
+              "&examEndTime=" +
+              this.examEndTime +
+              "&examStartTime=" +
+              this.start +
+              "&goodsId=" +
+              this.goodsId +
+              "&orderGoodsId=" +
+              this.orderGoodsId,
+          });
+        } else {
+          uni.showToast({
+            icon: "none",
+            title: "不在考试时间",
+          });
+        }
+      }
+    },
+  },
+  onReachBottom() {},
+  computed: { ...mapGetters(["userInfo"]) },
 };
 </script>
-<style >
-	page {
-			background: #EAEEF1;
-		}
+<style>
+page {
+  background: #eaeef1;
+}
 </style>
 <style scoped lang="scss">
-.examWrap{
-	padding: 16rpx;
-	
-	.title {
-		margin-top:70rpx;
-		font-size: 32rpx;
-		color: #666666;
-		line-height: 48rpx;
-		text-align: center;
-	}
-	
-	.circle {
-		margin:60rpx auto 0;
-		width:480rpx;
-		height:480rpx;
-		position:relative;
-		background: #fff;
-		border-radius:50%;
-		
-		.img {
-			position:absolute;
-			left:50%;
-			top:50%;
-			transform: translate3D(-50%,-50%,0);
-		}
-		
-		.time {
-			width:100%;
-			height:100%;
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			position:relative;
-			z-index: 999;
-			font-size: 80rpx;
-			text-align: center;
-			font-weight: bold;
-			color: #333333;
-		}
-	}
-	
-	.btn {
-		margin:330rpx auto 0;
-		width: 528rpx;
-		height: 80rpx;
-		background: #007AFF;
-		border-radius: 40rpx;
-		text-align: center;
-		line-height: 80rpx;
-		color:#fff;
-		
-		&.disabled {
-			background:#ccc;
-		}
-	}
+.examWrap {
+  padding: 16rpx;
+
+  .title {
+    margin-top: 70rpx;
+    font-size: 32rpx;
+    color: #666666;
+    line-height: 48rpx;
+    text-align: center;
+  }
+
+  .circle {
+    margin: 60rpx auto 0;
+    width: 480rpx;
+    height: 480rpx;
+    position: relative;
+    background: #fff;
+    border-radius: 50%;
+
+    .img {
+      position: absolute;
+      left: 50%;
+      top: 50%;
+      transform: translate3D(-50%, -50%, 0);
+    }
+
+    .time {
+      width: 100%;
+      height: 100%;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      position: relative;
+      z-index: 999;
+      font-size: 80rpx;
+      text-align: center;
+      font-weight: bold;
+      color: #333333;
+    }
+  }
+
+  .btn {
+    margin: 330rpx auto 0;
+    width: 528rpx;
+    height: 80rpx;
+    background: #007aff;
+    border-radius: 40rpx;
+    text-align: center;
+    line-height: 80rpx;
+    color: #fff;
+
+    &.disabled {
+      background: #ccc;
+    }
+  }
 }
 </style>

+ 777 - 648
pages5/examList/index.vue

@@ -1,674 +1,803 @@
 <template>
-	<view>
-		<nav-bar title="模考预约" class="nav"></nav-bar>
-		<view class="tabs">
-			<view class="tab" :class="{ active: param.mockStatus == 0 }" data-index="1" @click="tab(0)">
-				<view>未考试</view>
-			</view>
-			<view class="tab" :class="{ active:  param.mockStatus == 1 }" data-index="2" @click="tab(1)">
-				<view>已结束</view>
-			</view>
-			<view class="sort" @click="showSort = true">
-				筛选
-			</view>
-		</view>
-		
-		
-		<view class="record">
-			<template v-if=" param.mockStatus == 0">
-				<view v-if="recordList.length">
-				<view class="examList" v-for="(item,index) in recordList" :key="index">
-					<view class="main">
-						<view class="top" @click="showDetails(item)">
-							<view class="subject">{{item.applyName}}</view>
-						</view>
-						<view class="item">
-							<view class="left">项目</view>
-							<view class="right">{{ item.businessName }} {{item.projectName}}</view>
-						</view>
-						<view class="item">
-							<view class="left">专业</view>
-							<view class="right">{{item.categoryName}}</view>
-						</view>
-						<view class="item">
-							<view class="left">科目</view>
-							<view class="right">{{item.subjectName}}</view>
-						</view>
-						<view class="item">
-							<view class="left">考试时间</view>
-							<view v-if="item.mockActivity == 0" class="right">
-								{{ $method.timestampToTime(item.applySiteExamTime) }}
-								{{ item.applySiteStartTime }} - {{ item.applySiteEndTime }}
-							</view>
-						</view>
-						<view class="btn-wrap">
-							<view class="btn-line">
-								<!-- mockActivity 1是活动模考,0否 && (!item.handStatus || item.handStatus == 0)-->
-								<view v-if="item.mockActivity == 1 && (!item.handStatus || item.handStatus == 0) " class="btn"
-									:class="{'test-disabled': !(item.activityStartTime < nowTime) }"
-								 	@click="goExamCount(item,index)">去考试</view>
-								<view v-else>
-								<view class="btn test-disabled" v-if="goTest(item)" @click="goExamCount(item,index)">去考试</view>
-								<view class="btn test-disabled"  v-else-if="item.handStatus">已考试</view>
-								<view class="btn" v-else @click="goExamCount(item,index)">去考试</view>
-								</view>
-							</view>
-						</view>
-					</view>
-				</view>
-				</view>
-				<view v-else class="nodata">暂无相关数据</view>
-			</template>
-			
-			<template v-if=" param.mockStatus == 1">
-				<view v-if="recordList.length">
-				<view class="examList" v-for="(item,index) in recordList" :key="index">
-					<view class="main">
-						<view class="top" @click="showDetails(item)">
-							<view class="subject">{{item.applyName}}</view>
-						</view>
-						<view class="item">
-							<view class="left">项目</view>
-							<view class="right">{{ item.businessName }} {{item.projectName}}</view>
-						</view>
-						<view class="item">
-							<view class="left">专业</view>
-							<view class="right">{{item.categoryName}}</view>
-						</view>
-						<view class="item">
-							<view class="left">科目</view>
-							<view class="right">{{item.subjectName}}</view>
-						</view>
-						<view class="item">
-							<view class="left">考试时间</view>
-							<view class="right">
-								{{ $method.timestampToTime(item.applySiteExamTime) }}
-								{{ item.applySiteStartTime }} - {{ item.applySiteEndTime }}
-							</view>
-						</view>
-						<view class="btn-wrap">
-							<view class="btn-line" v-if="item.reSubscribe == 1">
-								<view class="btn border" @click="reApply(item)">重新预约</view>
-							</view>
-							<template v-else>
-								<view class="btn-line">
-									<view class="text" v-if="item.handStatus">当前报告含主观题需人工阅卷,阅卷完成后显示完整报告</view>
-									<view class="text" v-if="!item.handStatus">由于未按时参加考试,主观题将不会提交至后台进行人工阅卷</view>
-									<view class="btn border" :class="{disabled : item.canDo === 0,'btn--half':item.handStatus}" @click="doQuestion(item)">去做题</view>
-									<view class="btn btn--half border" @click="report(item)" v-if="item.handStatus">查看报告</view>
-								</view>
-								<view class="btn-line" v-if="item.liveEndTime && item.liveStartTime && item.liveUrl">
-									<view class="text-half">
-										<view>模考讲解直播时间</view>
-										<view>{{$method.timestampToTime(item.liveStartTime,false)}} - {{$method.timestampToTime(item.liveEndTime,false)}}</view>
-										
-									</view>
-									<view class="btn btn--half border" @click="goLive(item)">去查看</view>
-								</view>
-							</template>
-							
-						</view>
-						
-					</view>
-				</view>
-				</view>
-				<view v-else class="nodata">暂无相关数据</view>
-			</template>
-			
-		</view>
-		
-		<view class="modal" :style="{top:modalTop+'px'}" v-if="showSort">
-			<view class="content">
-				<view class="item">
-					<view class="item__title">考试时间</view>
-					<view class="item__box">
-						<view class="text">
-							<picker mode="date"  :value="param.startTime" :end="endDate" @change="bindDateFromChange">
-								<view class="uni-input">{{param.startTime || '开始时间'}}</view>
-							</picker>
-							- 
-							<picker mode="date" :value="param.endTime" :end="endDate"  @change="bindDateToChange">
-								<view class="uni-input">{{param.endTime || '结束时间'}}</view>
-							</picker>
-						</view>
-						<u-icon class="icon" name="calendar"></u-icon>
-					</view>
-				</view>
-				
-				<view class="item">
-					<view class="item__title">考试标题</view>
-					<view class="item__box">
-							<picker class="picker" mode="selector" :range="listApplyName" range-key="applyName" :value="param.applyName" @change="bindTitleChange">
-								<view style="width:650rpx;height:40rpx;">{{param.applyName}}</view>
-							</picker>
-						<u-icon class="icon" name="arrow-down"></u-icon>
-					</view>
-				</view>
-				
-			</view>
-			<view class="modal_wrap" @click="showSort = false"></view>
-		</view>
-		
-	</view>
+  <view>
+    <nav-bar title="模考预约" class="nav"></nav-bar>
+    <view class="tabs">
+      <view
+        class="tab"
+        :class="{ active: param.mockStatus == 0 }"
+        data-index="1"
+        @click="tab(0)"
+      >
+        <view>未考试</view>
+      </view>
+      <view
+        class="tab"
+        :class="{ active: param.mockStatus == 1 }"
+        data-index="2"
+        @click="tab(1)"
+      >
+        <view>已结束</view>
+      </view>
+      <view class="sort" @click="showSort = true"> 筛选 </view>
+    </view>
+
+    <view class="record">
+      <template v-if="param.mockStatus == 0">
+        <view v-if="recordList.length">
+          <view
+            class="examList"
+            v-for="(item, index) in recordList"
+            :key="index"
+          >
+            <view class="main">
+              <view class="top" @click="showDetails(item)">
+                <view class="subject">{{ item.applyName }}</view>
+              </view>
+              <view class="item">
+                <view class="left">项目</view>
+                <view class="right"
+                  >{{ item.businessName }} {{ item.projectName }}</view
+                >
+              </view>
+              <view class="item">
+                <view class="left">专业</view>
+                <view class="right">{{ item.categoryName }}</view>
+              </view>
+              <view class="item">
+                <view class="left">科目</view>
+                <view class="right">{{ item.subjectName }}</view>
+              </view>
+              <view class="item">
+                <view class="left">考试时间</view>
+                <view v-if="item.mockActivity == 0" class="right">
+                  {{ $method.timestampToTime(item.applySiteExamTime) }}
+                  {{ item.applySiteStartTime }} - {{ item.applySiteEndTime }}
+                </view>
+              </view>
+              <view class="btn-wrap">
+                <view class="btn-line">
+                  <!-- mockActivity 1是活动模考,0否 && (!item.handStatus || item.handStatus == 0)-->
+                  <view
+                    v-if="
+                      item.mockActivity == 1 &&
+                      (!item.handStatus || item.handStatus == 0)
+                    "
+                    class="btn"
+                    :class="{
+                      'test-disabled': !(item.activityStartTime < nowTime),
+                    }"
+                    @click="goExamCount(item, index)"
+                    >去考试</view
+                  >
+                  <view v-else>
+                    <view
+                      class="btn test-disabled"
+                      v-if="goTest(item)"
+                      @click="goExamCount(item, index)"
+                      >去考试</view
+                    >
+                    <view class="btn test-disabled" v-else-if="item.handStatus"
+                      >已考试</view
+                    >
+                    <view class="btn" v-else @click="goExamCount(item, index)"
+                      >去考试</view
+                    >
+                  </view>
+                </view>
+              </view>
+            </view>
+          </view>
+        </view>
+        <view v-else class="nodata">暂无相关数据</view>
+      </template>
+
+      <template v-if="param.mockStatus == 1">
+        <view v-if="recordList.length">
+          <view
+            class="examList"
+            v-for="(item, index) in recordList"
+            :key="index"
+          >
+            <view class="main">
+              <view class="top" @click="showDetails(item)">
+                <view class="subject">{{ item.applyName }}</view>
+              </view>
+              <view class="item">
+                <view class="left">项目</view>
+                <view class="right"
+                  >{{ item.businessName }} {{ item.projectName }}</view
+                >
+              </view>
+              <view class="item">
+                <view class="left">专业</view>
+                <view class="right">{{ item.categoryName }}</view>
+              </view>
+              <view class="item">
+                <view class="left">科目</view>
+                <view class="right">{{ item.subjectName }}</view>
+              </view>
+              <view class="item">
+                <view class="left">考试时间</view>
+                <view class="right">
+                  {{ $method.timestampToTime(item.applySiteExamTime) }}
+                  {{ item.applySiteStartTime }} - {{ item.applySiteEndTime }}
+                </view>
+              </view>
+              <view class="btn-wrap">
+                <view class="btn-line" v-if="item.reSubscribe == 1">
+                  <view class="btn border" @click="reApply(item)"
+                    >重新预约</view
+                  >
+                </view>
+                <template v-else>
+                  <view class="btn-line">
+                    <view class="text" v-if="item.handStatus"
+                      >当前报告含主观题需人工阅卷,阅卷完成后显示完整报告</view
+                    >
+                    <view class="text" v-if="!item.handStatus"
+                      >由于未按时参加考试,主观题将不会提交至后台进行人工阅卷</view
+                    >
+                    <view
+                      class="btn border"
+                      :class="{
+                        disabled: item.canDo === 0,
+                        'btn--half': item.handStatus,
+                      }"
+                      @click="doQuestion(item)"
+                      >去做题</view
+                    >
+                    <view
+                      class="btn btn--half border"
+                      @click="report(item)"
+                      v-if="item.handStatus"
+                      >查看报告</view
+                    >
+                  </view>
+                  <view
+                    class="btn-line"
+                    v-if="
+                      item.liveEndTime && item.liveStartTime && item.liveUrl
+                    "
+                  >
+                    <view class="text-half">
+                      <view>模考讲解直播时间</view>
+                      <view
+                        >{{
+                          $method.timestampToTime(item.liveStartTime, false)
+                        }}
+                        -
+                        {{
+                          $method.timestampToTime(item.liveEndTime, false)
+                        }}</view
+                      >
+                    </view>
+                    <view class="btn btn--half border" @click="goLive(item)"
+                      >去查看</view
+                    >
+                  </view>
+                </template>
+              </view>
+            </view>
+          </view>
+        </view>
+        <view v-else class="nodata">暂无相关数据</view>
+      </template>
+    </view>
+
+    <view class="modal" :style="{ top: modalTop + 'px' }" v-if="showSort">
+      <view class="content">
+        <view class="item">
+          <view class="item__title">考试时间</view>
+          <view class="item__box">
+            <view class="text">
+              <picker
+                mode="date"
+                :value="param.startTime"
+                :end="endDate"
+                @change="bindDateFromChange"
+              >
+                <view class="uni-input">{{
+                  param.startTime || "开始时间"
+                }}</view>
+              </picker>
+              -
+              <picker
+                mode="date"
+                :value="param.endTime"
+                :end="endDate"
+                @change="bindDateToChange"
+              >
+                <view class="uni-input">{{ param.endTime || "结束时间" }}</view>
+              </picker>
+            </view>
+            <u-icon class="icon" name="calendar"></u-icon>
+          </view>
+        </view>
+
+        <view class="item">
+          <view class="item__title">考试标题</view>
+          <view class="item__box">
+            <picker
+              class="picker"
+              mode="selector"
+              :range="listApplyName"
+              range-key="applyName"
+              :value="param.applyName"
+              @change="bindTitleChange"
+            >
+              <view style="width: 650rpx; height: 40rpx">{{
+                param.applyName
+              }}</view>
+            </picker>
+            <u-icon class="icon" name="arrow-down"></u-icon>
+          </view>
+        </view>
+      </view>
+      <view class="modal_wrap" @click="showSort = false"></view>
+    </view>
+  </view>
 </template>
 
 <script>
-import { mapGetters } from 'vuex';
-import config from '@/common/config'
+import { mapGetters } from "vuex";
+import config from "@/common/config";
 export default {
-	data() {
-		return {
-			showSort:false,
-			index: 0,
-			list: [],
-			list1: [],
-			recordList: [],
-			goodsData: {},
-			param: {
-				pageNum: 1,
-				pageSize: 10,
-				mockStatus:0,
-				endTime:'',
-				startTime:'',
-				applyName:''
-			},
-			nowTime:0,
-			sysTime: Date.now(),
-			dateFrom:'',
-			dateTo:'',
-			isRepeat:false,
-			total: 0,
-			activeIndex: 0,
-			typeIndex:0,
-			itemIndex:'',
-			modalTop:0,
-			endDate:'',
-			titleName:3,
-			listApplyName:[],
-		};
-	},
-	computed:{
-		...mapGetters(['userInfo'])
-	},
-	onLoad(option) {
-		this.param.mockStatus = option.state || 0
-		
-		this.endDate = this.$method.timestampToTime(new Date().getTime() / 1000).replace(/-/g,'/');
-			
-		// this.mockSubscribeListSubscribe();
-		uni.getSystemInfo({
-			success:(e) => {
-				let info = uni.createSelectorQuery().select(".nav");
-				info.boundingClientRect((navData) => { //data - 各种参数
-				
-					let info = uni.createSelectorQuery().select(".tabs");
-					info.boundingClientRect((tabData) => { //data - 各种参数
-						this.modalTop = navData.height + tabData.height
-						console.log(navData) // 获取元素宽度
-						console.log(tabData) // 获取元素宽度
-					}).exec()
-				}).exec()
-			}
-		})
-	},
-	onPullDownRefresh() {
-		let that = this;
-		this.param.pageNum = 1;
-		this.mockSubscribeListSubscribe();
-		setTimeout(function() {
-			uni.stopPullDownRefresh();
-		}, 500);
-	},
-	onReachBottom() {
-		console.log(this.total,'total');
-		console.log(this.recordList.length,'length')
-		if (this.recordList.length < this.total) {
-			this.param.pageNum++;
-			this.mockSubscribeListSubscribe();
-		}
-	},
-	onShow() {
-		
-		this.nowTime = +this.$method.timest();
-		// if(this.itemIndex !== '') {
-		// 	this.refreshByIndex();
-		// }
-		this.recordList = []
-		this.mockSubscribeListSubscribe();
-		
-	},
-	methods: {
-		mockApplyListApplyName() {
-			let param = JSON.parse(JSON.stringify(this.param));
-			if(param.endTime) {
-				param.endTime = this.$method.TimeTotimestamp(param.endTime)
-			}
-			
-			if(param.startTime) {
-				param.startTime = this.$method.TimeTotimestamp(param.startTime)
-			}
-			console.log(param,'param')
-			this.$api.mockApplyListApplyName(param).then((res) => {
-				this.listApplyName = res.data.rows;
-				console.log(this.listApplyName,'listApplyName')
-				this.param.applyName = "";
-				this.mockSubscribeListSubscribe();
-			});
-		},
-		reApply(item){
-			uni.redirectTo({
-				url:'/pages5/examAppointList/index'
-			})
-		},
-		report(item) {
-			uni.navigateTo({
-			  url:
-			    "/pages5/examReport/index?&examId=" +
-			    item.examId +
-			    "&id=" +
-			    item.recordId+
-					"&eachExamId="+item.eachExamId+
-					"&subscribeId="+item.subscribeId
-			});
-		},
-		doQuestion(item) {
-			if(item.canDo === 0) {
-				uni.showToast({
-					icon:'none',
-					msg:'请等待所有科目考试结束后再进入刷题'
-					
-				})
-				return;
-			}
-			
-			uni.navigateTo({
-				url:'../examBank/index?examId='+item.examId+'&eachExamId='+item.eachExamId+'&subscribeId='+item.subscribeId
-			})
-		},
-		goTest(item) {
-			if (item.mockActivity && item.mockActivity == 1) {
-				return false
-			}
-			let startTime = this.$method.TimeTotimestamp(this.$method.timestampToTime(item.applySiteExamTime) + ' ' + item.applySiteStartTime)
-			let canGo = (startTime-this.nowTime) <= (600) && (startTime-this.nowTime) >= (-(item.timeLimit * 60)  || 0)
-			
-			return !canGo
-		},
-		isStart(item) {
-			let startTime = this.$method.TimeTotimestamp(
-				this.$method.timestampToTime(item.applySiteExamTime) +
-					" " +
-					item.applySiteStartTime
-			);
-
-			return startTime - this.nowTime <= 600;
-		},
-		mockSubscribeListSubscribe() {
-			let param = JSON.parse(JSON.stringify(this.param))
-			if(param.endTime) {
-				param.endTime = this.$method.TimeTotimestamp(param.endTime)
-			}
-			
-			if(param.startTime) {
-				param.startTime = this.$method.TimeTotimestamp(param.startTime)
-			}
-			// mock/subscribe/listSubscribe
-			this.$api.mockSubscribeListSubscribe(param).then(res => {
-				
-				this.recordList.push(...res.data.rows)
-				this.total = res.data.total
-			})
-		},
-		refreshByIndex() {
-			let param = JSON.parse(JSON.stringify(this.param))
-			if(param.endTime) {
-				param.endTime = this.$method.TimeTotimestamp(param.endTime)
-			}
-			
-			if(param.startTime) {
-				param.startTime = this.$method.TimeTotimestamp(param.startTime)
-			}
-			param.pageNum = this.itemIndex+1;
-			param.pageSize =  1
-			this.$api.mockSubscribeListSubscribe(param).then(res => {
-				console.log('res.data.rows[0]', res.data.rows[0])
-				this.$set(this.recordList,this.itemIndex,res.data.rows[0])
-				this.itemIndex = ''
-			})
-		},
-		
-		goLive(item) {
-			let uuid = new Date().valueOf() + ""
-      		// buyCourse 是否购买课程:1是 0否
-			let encode = encodeURIComponent(config.WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+'&channelId='
-			+item.liveUrl+'&buyCourse=1'+'&ident='+uuid)
-			uni.navigateTo({
-				url:`../../pages/webview/index?url=`+encode
-			})
-		},
-		async goExamCount(item,index) {
-			if (item.mockActivity && item.mockActivity == 1) {
-				if (!(item.activityStartTime < this.nowTime)) {
-					return
-				}
-				await this.$http({
-					url: '/mock/apply/addMockTime',
-					method: 'post',
-					data: {
-						applyId: item.applyId,
-						duration: item.duration,
-						majorId: item.majorId,
-						subjectId: item.subjectId,
-						mockMajorSubjectId: item.mockMajorSubjectId
-					},
-				}).then((res) => {
-					if (res.data.code == 200) {
-						const { examTime, startTime, endTime, eachExamId, mockActivity} = res.data.data
-						let o_item = {
-							...item,
-							applySiteExamTime: examTime,
-							applySiteStartTime: startTime,
-							applySiteEndTime: endTime,
-							eachExamId: eachExamId,
-							mockActivity: mockActivity
-						}
-						// item.applySiteExamTime = examTime // 当前时间的时间戳
-						// item.applySiteStartTime = startTime
-						// item.applySiteEndTime = endTime
-						// item.eachExamId = eachExamId
-						this.toJump(o_item, index)
-					} else {
-						this.$u.toast(res.data.msg)
-						return
-					}
-					
-				})
-				
-			} else {
-				this.toJump(item, index)
-			
-			}
-		},
-		toJump(item, index) {
-			if(this.goTest(item)) {
-				uni.showToast({
-					icon:'none',
-					title:'不在考试时间'
-				})
-				return;
-			}
-
-			this.itemIndex = index;
-			uni.navigateTo({
-				url:'../examCount/index?start='+this.$method.TimeTotimestamp(this.$method.timestampToTime(item.applySiteExamTime) + ' ' + 
-				item.applySiteStartTime)+'&limit='+item.timeLimit+'&examId='+item.examId+'&eachExamId='+item.eachExamId+'&subscribeId='
-				+item.subscribeId+'&mockName='+item.applyName +'&examEndTime='+this.$method.TimeTotimestamp(this.$method.timestampToTime(item.applySiteExamTime) 
-				+ ' ' + item.applySiteEndTime)+'&mockActivity=' + item.mockActivity
-			})
-		},
-		
-		sort() {
-			
-		},
-		
-		appoint(item) {
-			this.appointModal = true;
-		},
-		tab(state) {
-			if(this.param.mockStatus == state) {
-				return;
-			}
-			this.recordList = [];
-			this.param.endTime = '';
-			this.param.startTime = '';
-			this.param.applyName = '';
-			this.param.pageNum = 1;
-			this.param.mockStatus = state;
-			this.mockSubscribeListSubscribe()
-		},
-		bindDateFromChange(e) {
-			this.param.startTime = e.detail.value
-			this.param.pageNum = 1;
-			this.param.applyName = '';
-			this.recordList = []
-			this.mockApplyListApplyName();
-		},
-		
-		bindDateToChange(e) {
-				this.param.endTime = e.detail.value
-				this.param.pageNum = 1;
-				this.param.applyName = '';
-				this.recordList = []
-				this.mockApplyListApplyName();
-		},
-		
-		bindTitleChange(e) {
-			if (this.listApplyName.length) {
-				let index = e.detail.value;
-				this.param.applyName = this.listApplyName[index].applyName
-				
-			} else {
-				this.param.applyName  =''
-			}
-			this.param.pageNum = 1;
-			this.recordList = []
-			this.mockSubscribeListSubscribe();
-		}
-	}
+  data() {
+    return {
+      showSort: false,
+      index: 0,
+      list: [],
+      list1: [],
+      recordList: [],
+      goodsData: {},
+      param: {
+        pageNum: 1,
+        pageSize: 10,
+        mockStatus: 0,
+        endTime: "",
+        startTime: "",
+        applyName: "",
+      },
+      nowTime: 0,
+      sysTime: Date.now(),
+      dateFrom: "",
+      dateTo: "",
+      isRepeat: false,
+      total: 0,
+      activeIndex: 0,
+      typeIndex: 0,
+      itemIndex: "",
+      modalTop: 0,
+      endDate: "",
+      titleName: 3,
+      listApplyName: [],
+    };
+  },
+  computed: {
+    ...mapGetters(["userInfo"]),
+  },
+  onLoad(option) {
+    this.param.mockStatus = option.state || 0;
+
+    this.endDate = this.$method
+      .timestampToTime(new Date().getTime() / 1000)
+      .replace(/-/g, "/");
+
+    // this.mockSubscribeListSubscribe();
+    uni.getSystemInfo({
+      success: (e) => {
+        let info = uni.createSelectorQuery().select(".nav");
+        info
+          .boundingClientRect((navData) => {
+            //data - 各种参数
+
+            let info = uni.createSelectorQuery().select(".tabs");
+            info
+              .boundingClientRect((tabData) => {
+                //data - 各种参数
+                this.modalTop = navData.height + tabData.height;
+                console.log(navData); // 获取元素宽度
+                console.log(tabData); // 获取元素宽度
+              })
+              .exec();
+          })
+          .exec();
+      },
+    });
+  },
+  onPullDownRefresh() {
+    let that = this;
+    this.param.pageNum = 1;
+    this.mockSubscribeListSubscribe();
+    setTimeout(function () {
+      uni.stopPullDownRefresh();
+    }, 500);
+  },
+  onReachBottom() {
+    console.log(this.total, "total");
+    console.log(this.recordList.length, "length");
+    if (this.recordList.length < this.total) {
+      this.param.pageNum++;
+      this.mockSubscribeListSubscribe();
+    }
+  },
+  onShow() {
+    this.nowTime = +this.$method.timest();
+    // if(this.itemIndex !== '') {
+    // 	this.refreshByIndex();
+    // }
+    this.recordList = [];
+    this.mockSubscribeListSubscribe();
+  },
+  methods: {
+    mockApplyListApplyName() {
+      let param = JSON.parse(JSON.stringify(this.param));
+      if (param.endTime) {
+        param.endTime = this.$method.TimeTotimestamp(param.endTime);
+      }
+
+      if (param.startTime) {
+        param.startTime = this.$method.TimeTotimestamp(param.startTime);
+      }
+      console.log(param, "param");
+      this.$api.mockApplyListApplyName(param).then((res) => {
+        this.listApplyName = res.data.rows;
+        console.log(this.listApplyName, "listApplyName");
+        this.param.applyName = "";
+        this.mockSubscribeListSubscribe();
+      });
+    },
+    reApply(item) {
+      uni.redirectTo({
+        url: "/pages5/examAppointList/index",
+      });
+    },
+    report(item) {
+      uni.navigateTo({
+        url:
+          "/pages5/examReport/index?&examId=" +
+          item.examId +
+          "&id=" +
+          item.recordId +
+          "&eachExamId=" +
+          item.eachExamId +
+          "&subscribeId=" +
+          item.subscribeId,
+      });
+    },
+    doQuestion(item) {
+      if (item.canDo === 0) {
+        uni.showToast({
+          icon: "none",
+          msg: "请等待所有科目考试结束后再进入刷题",
+        });
+        return;
+      }
+
+      uni.navigateTo({
+        url:
+          "../examBank/index?examId=" +
+          item.examId +
+          "&eachExamId=" +
+          item.eachExamId +
+          "&subscribeId=" +
+          item.subscribeId,
+      });
+    },
+    goTest(item) {
+      if (item.mockActivity && item.mockActivity == 1) {
+        return false;
+      }
+      let startTime = this.$method.TimeTotimestamp(
+        this.$method.timestampToTime(item.applySiteExamTime) +
+          " " +
+          item.applySiteStartTime
+      );
+      let canGo =
+        startTime - this.nowTime <= 600 &&
+        startTime - this.nowTime >= (-(item.timeLimit * 60) || 0);
+
+      return !canGo;
+    },
+    isStart(item) {
+      let startTime = this.$method.TimeTotimestamp(
+        this.$method.timestampToTime(item.applySiteExamTime) +
+          " " +
+          item.applySiteStartTime
+      );
+
+      return startTime - this.nowTime <= 600;
+    },
+    mockSubscribeListSubscribe() {
+      let param = JSON.parse(JSON.stringify(this.param));
+      if (param.endTime) {
+        param.endTime = this.$method.TimeTotimestamp(param.endTime);
+      }
+
+      if (param.startTime) {
+        param.startTime = this.$method.TimeTotimestamp(param.startTime);
+      }
+      // mock/subscribe/listSubscribe
+      this.$api.mockSubscribeListSubscribe(param).then((res) => {
+        this.recordList.push(...res.data.rows);
+        this.total = res.data.total;
+      });
+    },
+    refreshByIndex() {
+      let param = JSON.parse(JSON.stringify(this.param));
+      if (param.endTime) {
+        param.endTime = this.$method.TimeTotimestamp(param.endTime);
+      }
+
+      if (param.startTime) {
+        param.startTime = this.$method.TimeTotimestamp(param.startTime);
+      }
+      param.pageNum = this.itemIndex + 1;
+      param.pageSize = 1;
+      this.$api.mockSubscribeListSubscribe(param).then((res) => {
+        console.log("res.data.rows[0]", res.data.rows[0]);
+        this.$set(this.recordList, this.itemIndex, res.data.rows[0]);
+        this.itemIndex = "";
+      });
+    },
+
+    goLive(item) {
+      let uuid = new Date().valueOf() + "";
+      // buyCourse 是否购买课程:1是 0否
+      let encode = encodeURIComponent(
+        config.WEBVIEW_URL +
+          "pages/live/index?token=" +
+          uni.getStorageSync("token") +
+          "&userInfo=" +
+          JSON.stringify(this.userInfo) +
+          "&channelId=" +
+          item.liveUrl +
+          "&buyCourse=1" +
+          "&ident=" +
+          uuid
+      );
+      uni.navigateTo({
+        url: `../../pages/webview/index?url=` + encode,
+      });
+    },
+    async goExamCount(item, index) {
+      if (item.mockActivity && item.mockActivity == 1) {
+        if (!(item.activityStartTime < this.nowTime)) {
+          return;
+        }
+        await this.$http({
+          url: "/mock/apply/addMockTime",
+          method: "post",
+          data: {
+            applyId: item.applyId,
+            duration: item.duration,
+            majorId: item.majorId,
+            subjectId: item.subjectId,
+            mockMajorSubjectId: item.mockMajorSubjectId,
+          },
+        }).then((res) => {
+          if (res.data.code == 200) {
+            const { examTime, startTime, endTime, eachExamId, mockActivity } =
+              res.data.data;
+            let o_item = {
+              ...item,
+              applySiteExamTime: examTime,
+              applySiteStartTime: startTime,
+              applySiteEndTime: endTime,
+              eachExamId: eachExamId,
+              mockActivity: mockActivity,
+            };
+            // item.applySiteExamTime = examTime // 当前时间的时间戳
+            // item.applySiteStartTime = startTime
+            // item.applySiteEndTime = endTime
+            // item.eachExamId = eachExamId
+            this.toJump(o_item, index);
+          } else {
+            this.$u.toast(res.data.msg);
+            return;
+          }
+        });
+      } else {
+        this.toJump(item, index);
+      }
+    },
+    toJump(item, index) {
+        if (this.goTest(item)) {
+          uni.showToast({
+            icon: "none",
+            title: "不在考试时间",
+          });
+          return;
+        }
+      this.itemIndex = index;
+      uni.navigateTo({
+        url:
+          "../examCount/index?start=" +
+          this.$method.TimeTotimestamp(
+            this.$method.timestampToTime(item.applySiteExamTime) +
+              " " +
+              item.applySiteStartTime
+          ) +
+          "&limit=" +
+          item.timeLimit +
+          "&examId=" +
+          item.examId +
+          "&eachExamId=" +
+          item.eachExamId +
+          "&subscribeId=" +
+          item.subscribeId +
+          "&mockName=" +
+          item.applyName +
+          "&examEndTime=" +
+          this.$method.TimeTotimestamp(
+            this.$method.timestampToTime(item.applySiteExamTime) +
+              " " +
+              item.applySiteEndTime
+          ) +
+          "&mockActivity=" +
+          item.mockActivity +
+          "&goodsId=" +
+          (item.goodsId || "") +
+          "&orderGoodsId=" +
+          (item.orderGoodsId || ""),
+      });
+    },
+
+    sort() {},
+
+    appoint(item) {
+      this.appointModal = true;
+    },
+    tab(state) {
+      if (this.param.mockStatus == state) {
+        return;
+      }
+      this.recordList = [];
+      this.param.endTime = "";
+      this.param.startTime = "";
+      this.param.applyName = "";
+      this.param.pageNum = 1;
+      this.param.mockStatus = state;
+      this.mockSubscribeListSubscribe();
+    },
+    bindDateFromChange(e) {
+      this.param.startTime = e.detail.value;
+      this.param.pageNum = 1;
+      this.param.applyName = "";
+      this.recordList = [];
+      this.mockApplyListApplyName();
+    },
+
+    bindDateToChange(e) {
+      this.param.endTime = e.detail.value;
+      this.param.pageNum = 1;
+      this.param.applyName = "";
+      this.recordList = [];
+      this.mockApplyListApplyName();
+    },
+
+    bindTitleChange(e) {
+      if (this.listApplyName.length) {
+        let index = e.detail.value;
+        this.param.applyName = this.listApplyName[index].applyName;
+      } else {
+        this.param.applyName = "";
+      }
+      this.param.pageNum = 1;
+      this.recordList = [];
+      this.mockSubscribeListSubscribe();
+    },
+  },
 };
 </script>
 <style>
 page {
-	background: #eaeef1;
+  background: #eaeef1;
 }
 </style>
 <style lang="scss" scope>
-	.animals{
-		transition: all 0.3s;
-		transform: rotate(180deg);
-	}
+.animals {
+  transition: all 0.3s;
+  transform: rotate(180deg);
+}
 .tabs {
-	position: fixed;
-	left: 0;
-	width: 100%;
-	display: flex;
-	z-index: 10;
-	background: #ffffff;
-	padding:18rpx 0;
-	border-bottom:1px solid #eee;
-	.tab {
-		padding:0 18rpx;
-		flex: 1;
-		background: #ffffff;
-		font-size: 32rpx;
-		color: #999999;
-		text-align: center;
-		position:relative;
-		
-		&:nth-of-type(2) {
-			border-right:1px solid #EEEEEE;
-		}
-
-		&.active {
-			color: #333333;
-			
-			&::before{
-				content:'';
-				position:absolute;
-				width: 24px;
-				height: 4px;
-				background: #007AFF;
-				border-radius: 2px;
-				left:50%;
-				margin-left:-12px;
-				bottom:-18rpx;
-			}
-		}
-	}
-	
-	.sort {
-		width:160rpx;
-		text-align: center;
-		font-size: 32rpx;
-		font-weight: 500;
-		color: #999999;
-	}
+  position: fixed;
+  left: 0;
+  width: 100%;
+  display: flex;
+  z-index: 10;
+  background: #ffffff;
+  padding: 18rpx 0;
+  border-bottom: 1px solid #eee;
+  .tab {
+    padding: 0 18rpx;
+    flex: 1;
+    background: #ffffff;
+    font-size: 32rpx;
+    color: #999999;
+    text-align: center;
+    position: relative;
+
+    &:nth-of-type(2) {
+      border-right: 1px solid #eeeeee;
+    }
+
+    &.active {
+      color: #333333;
+
+      &::before {
+        content: "";
+        position: absolute;
+        width: 24px;
+        height: 4px;
+        background: #007aff;
+        border-radius: 2px;
+        left: 50%;
+        margin-left: -12px;
+        bottom: -18rpx;
+      }
+    }
+  }
+
+  .sort {
+    width: 160rpx;
+    text-align: center;
+    font-size: 32rpx;
+    font-weight: 500;
+    color: #999999;
+  }
 }
 
 .record {
-	margin-top:80rpx;
-	padding: 16rpx 16rpx;
-	.examList {
-		.main {
-			background: #ffffff;
-			border-radius: 16rpx;
-			margin: 20rpx 0;
-		}
-		.top {
-			height: 80rpx;
-			text-align: center;
-			line-height: 80rpx;
-			font-size: 30rpx;
-			color:#333333;
-			font-weight: bold;
-			border-bottom: 1px solid #eeeeee;
-		}
-		.item {
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			margin-left: 31rpx;
-			height: 80rpx;
-			padding-right: 24rpx;
-			border-bottom: 1px solid #eeeeee;
-			font-size: 24rpx;
-			color: #666666;
-			.right {
-				font-size: 28rpx;
-			}
-		}
-		
-		.btn-wrap {
-			padding:24rpx 16rpx ;
-			border-bottom:1px solid #EEEEEE;
-			
-			.btn-line {
-				display: flex;
-				align-items: center;
-				justify-content: center;
-				flex-wrap: wrap;
-			}
-			
-			.text {
-				width:100%;
-				color:#F5222D;
-				font-size: 24rpx;
-				text-align: center;
-			}
-			
-			.text-half {
-				color:#666666;
-				font-size: 24rpx;
-				width:320rpx;
-				margin:8rpx;
-			}
-			
-			.btn {
-				margin:8rpx;
-				width: 528rpx;
-				height: 64rpx;
-				background: #007AFF;
-				border-radius: 16rpx;
-				text-align: center;
-				line-height: 64rpx;
-				color:#fff;
-				
-				&--half {
-					width:320rpx;
-				}
-				
-				
-				&.border {
-					background:#fff;
-					color:#007AFF;
-					border:1px solid #007AFF;
-				}
-				
-				
-				&.disabled {
-					color:#D9D9D9;
-					border-color:#D9D9D9;
-				}
-				
-				&.test-disabled {
-					color:#fff;
-					background:#D9D9D9;
-				}
-			}
-		}
-	}
-}
+  margin-top: 80rpx;
+  padding: 16rpx 16rpx;
+  .examList {
+    .main {
+      background: #ffffff;
+      border-radius: 16rpx;
+      margin: 20rpx 0;
+    }
+    .top {
+      height: 80rpx;
+      text-align: center;
+      line-height: 80rpx;
+      font-size: 30rpx;
+      color: #333333;
+      font-weight: bold;
+      border-bottom: 1px solid #eeeeee;
+    }
+    .item {
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      margin-left: 31rpx;
+      height: 80rpx;
+      padding-right: 24rpx;
+      border-bottom: 1px solid #eeeeee;
+      font-size: 24rpx;
+      color: #666666;
+      .right {
+        font-size: 28rpx;
+      }
+    }
+
+    .btn-wrap {
+      padding: 24rpx 16rpx;
+      border-bottom: 1px solid #eeeeee;
+
+      .btn-line {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        flex-wrap: wrap;
+      }
+
+      .text {
+        width: 100%;
+        color: #f5222d;
+        font-size: 24rpx;
+        text-align: center;
+      }
+
+      .text-half {
+        color: #666666;
+        font-size: 24rpx;
+        width: 320rpx;
+        margin: 8rpx;
+      }
+
+      .btn {
+        margin: 8rpx;
+        width: 528rpx;
+        height: 64rpx;
+        background: #007aff;
+        border-radius: 16rpx;
+        text-align: center;
+        line-height: 64rpx;
+        color: #fff;
 
+        &--half {
+          width: 320rpx;
+        }
+
+        &.border {
+          background: #fff;
+          color: #007aff;
+          border: 1px solid #007aff;
+        }
+
+        &.disabled {
+          color: #d9d9d9;
+          border-color: #d9d9d9;
+        }
+
+        &.test-disabled {
+          color: #fff;
+          background: #d9d9d9;
+        }
+      }
+    }
+  }
+}
 
 .modal {
-	bottom:0;
-	z-index: 199999999;
-	position: fixed;
-	left: 0;
-	width: 100%;
-
-	.content {
-		overflow: hidden;
-		position: relative;
-		z-index: 10;
-		background: #fff;
-		padding: 20rpx 12rpx 16rpx;
-		
-		.item {
-			&__title {
-				padding:16rpx 0;
-				font-size: 28rpx;
-				color: #999999;
-			}
-			
-			&__box {
-				padding:0 16rpx;
-				display: flex;
-				width: 718rpx;
-				height: 80rpx;
-				background: #FFFFFF;
-				border: 1px solid #EEEEEE;
-				border-radius: 16rpx;
-				align-items: center;
-				
-				
-				.text {
-					flex:1;
-					display: flex;
-					align-items: center;
-				}
-			}
-		}
-	}
-
-	.modal_wrap {
-		position: absolute;
-		left: 0;
-		width: 100%;
-		top: 0;
-		height: 100%;
-		background: rgba(0, 0, 0, 0.3);
-	}
+  bottom: 0;
+  z-index: 199999999;
+  position: fixed;
+  left: 0;
+  width: 100%;
+
+  .content {
+    overflow: hidden;
+    position: relative;
+    z-index: 10;
+    background: #fff;
+    padding: 20rpx 12rpx 16rpx;
+
+    .item {
+      &__title {
+        padding: 16rpx 0;
+        font-size: 28rpx;
+        color: #999999;
+      }
+
+      &__box {
+        padding: 0 16rpx;
+        display: flex;
+        width: 718rpx;
+        height: 80rpx;
+        background: #ffffff;
+        border: 1px solid #eeeeee;
+        border-radius: 16rpx;
+        align-items: center;
+
+        .text {
+          flex: 1;
+          display: flex;
+          align-items: center;
+        }
+      }
+    }
+  }
+
+  .modal_wrap {
+    position: absolute;
+    left: 0;
+    width: 100%;
+    top: 0;
+    height: 100%;
+    background: rgba(0, 0, 0, 0.3);
+  }
 }
 
 .activesty {
-	background: #007aff !important;
-	color: #fff !important;
+  background: #007aff !important;
+  color: #fff !important;
 }
 .nodata {
-	text-align: center;
-    margin-top: 100rpx;
-    font-size: 32rpx;
-    color: #222;
+  text-align: center;
+  margin-top: 100rpx;
+  font-size: 32rpx;
+  color: #222;
 }
 </style>

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini