瀏覽代碼

增加提示文案

谢杰标 2 年之前
父節點
當前提交
1d142ea6fe
共有 7 個文件被更改,包括 3061 次插入2500 次删除
  1. 9 5
      common/config.js
  2. 36 0
      components/common/ClassTimeTip.vue
  3. 12 3
      pages/index/index.vue
  4. 631 542
      pages2/order/confirm_list.vue
  5. 549 509
      pages2/order/confirm_pay.vue
  6. 1229 985
      pages2/wd/class.vue
  7. 595 456
      pages4/shopping/shoppingCart.vue

+ 9 - 5
common/config.js

@@ -9,15 +9,15 @@ const test = {
     appid: 'wxd3c8ae80cf43a305',
     version: '1.0.2',
     TOP_LOGO: '/static/logo2.png',
-    SCAN_LOGO: '/static/me/logo.png'
+    SCAN_LOGO: '/static/me/logo.png',
 }
-// const index = 0 // 测试环境
+const index = 0 // 测试环境
 // const index = 1 // 祥粤云学堂
 // const index = 2 // 祥粤学堂
-const index = 3 // 勘设云学堂
+// const index = 3 // 勘设云学堂
 // const index = 4 // 中正云学堂
 const set = [
-	test,
+    test,
     // 祥粤云学堂
     {
         BASE_URL: 'https://api.xyyxt.net',
@@ -55,7 +55,11 @@ const set = [
         tenantName: '勘设云学堂',
         version: '1.0.2',
         TOP_LOGO: '/static/logo520.png',
-        SCAN_LOGO: '/static/me/logo520.png'
+        SCAN_LOGO: '/static/me/logo520.png',
+        tips1:
+            "中山勘设云学堂是中山市工程勘察设计行业协会和广东省祥粤建设职业培训学校联合打造的网络教育平台。",
+        tips2:
+            "广东省祥粤建设职业培训学校负责师资与培训资质,为中山学员提供考前、继续教育等培训,出具符合广东省要求的继续教育学时证明。",
     },
     // 中正云学堂
     {

+ 36 - 0
components/common/ClassTimeTip.vue

@@ -0,0 +1,36 @@
+<template>
+  <text style="display: inline-block; color: #ff2d55; font-size: 24rpx;line-height: 30rpx;" v-if="classInfo.gradeId">
+      <text>{{
+        classInfo.classStatus == 0
+          ? "暂未开班"
+          : classInfo.classEndTime
+          ? `有效期至:${$method.timestampToTime(
+              classInfo.classEndTime
+            )},本班还剩${$method.GetRTime(classInfo.classEndTime)}天将结束学习,`
+          : ""
+      }}</text>
+      已报名人数{{ classInfo.studentNumAll }}/{{ classInfo.studentUpper }}人
+  </text>
+</template>
+
+<script>
+export default {
+  props: {
+    classInfo: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    }
+  },
+};
+</script>
+
+<style scoped lang="scss">
+.redTxt {
+  font-size: 24rpx;
+  font-family: PingFang SC;
+  color: #ff2d55;
+  line-height: 30rpx;
+}
+</style>

+ 12 - 3
pages/index/index.vue

@@ -8,7 +8,7 @@
       back-icon-color="#ffffff"
     >
       <view class="slot-wrap">
-        <image :src="logo"></image>
+        <image :src="tenantInfo.TOP_LOGO"></image>
       </view>
     </u-navbar>
     <view class="swiper">
@@ -314,6 +314,8 @@
           <u-empty text="暂无推荐题库" mode="list" margin-top="100"></u-empty>
         </template>
       </view>
+      <view class="bom-tip">{{tenantInfo.tips1}}</view>
+      <view class="bom-tip">{{tenantInfo.tips2}}</view>
     </view>
     <!-- #ifdef MP-WEIXIN -->
     <view :style="{ opacity: opacitys }" class="officials">
@@ -345,7 +347,6 @@ import config from "@/common/config";
 export default {
   data() {
     return {
-      logo: config.TOP_LOGO,
       tabNum: 0,
       infoNums: 0,
       list: [],
@@ -555,6 +556,9 @@ export default {
           : 0;
       return value;
     },
+    tenantInfo() {
+      return config;
+    },
   },
   methods: {
     ...mapActions(["getUserInfo", "appCommonConfig"]),
@@ -1458,7 +1462,12 @@ page {
         }
       }
     }
-
+    .bom-tip{
+      color: #A7B0B8;
+      text-align: center;
+      padding: 0 30rpx;
+      font-size: 26rpx;
+    }
     .filters {
       width: 100%;
       padding: 0rpx 16rpx;

+ 631 - 542
pages2/order/confirm_list.vue

@@ -1,32 +1,71 @@
 <template>
-	<view class="confirms">
-		<nav-bar title="确认订单"></nav-bar>
-		<view class="contents">
-			<!-- <view  > -->
-				<view class="item">
-					<view style="display: flex;justify-content: space-between;">
-						<image :src="$method.splitImgHost(detail.coverUrl)" style="height: 120rpx;width: 204rpx;border-radius: 16rpx;"></image>
-						<view class="right_con" style="margin-left: 20rpx;">
-							<view style="color: #333333;font-size: 30rpx;font-weight: bold;">
-								{{detail.goodsName}}
-							</view>
-							<view class="priceTag">
-								¥ {{detail.standPrice}}
-							</view>
-
-							<view class="input_c" v-if="detail.templateType!=null&&detail.goodsType==1">
-								<view v-if="detail.templateType=='class'" style="display: flex;justify-content: space-between;align-items: center;height: 56rpx;padding:8rpx;border-radius: 8rpx;" @click="openPopup(0)">
-									<view style="color: #666666;font-size: 24rpx;">{{gradeIndex < 0 ?'选择班级':gradeList[gradeIndex].className}}</view>
-									<view><u-icon name="arrow-down" color="#999999" size="28"></u-icon></view>
-								</view>
-								<view v-if="detail.templateType=='apply'"  style="display: flex;justify-content: space-between;align-items: center;height: 56rpx;padding:8rpx;border-radius: 8rpx;" @click="openPopup(1)">
-									<view style="color: #666666;font-size: 24rpx;" >{{!applyAreas.areaName?'报考地区':examDate.examineName+'-'+applyAreas.areaName+'-'+applyAreas.cityName}}</view>
-									<view><u-icon name="arrow-down" color="#999999" size="28"></u-icon></view>
-								</view>
-							</view>
-						</view>
-					</view>
-					<!-- <view v-if="detail.templateType!=null&&detail.goodsType==1">
+  <view class="confirms">
+    <nav-bar title="确认订单"></nav-bar>
+    <view class="contents">
+      <!-- <view  > -->
+      <view class="item">
+        <view style="display: flex; justify-content: space-between">
+          <image
+            :src="$method.splitImgHost(detail.coverUrl)"
+            style="height: 120rpx; width: 204rpx; border-radius: 16rpx"
+          ></image>
+          <view class="right_con" style="margin-left: 20rpx">
+            <view style="color: #333333; font-size: 30rpx; font-weight: bold">
+              {{ detail.goodsName }}
+            </view>
+            <view class="priceTag"> ¥ {{ detail.standPrice }} </view>
+            <view
+              class="input_c"
+              v-if="detail.templateType != null && detail.goodsType == 1"
+            >
+              <view
+                v-if="detail.templateType == 'class'"
+                style="
+                  display: flex;
+                  justify-content: space-between;
+                  align-items: center;
+                  height: 56rpx;
+                  padding: 8rpx;
+                  border-radius: 8rpx;
+                "
+                @click="openPopup(0)"
+              >
+                <view style="color: #666666; font-size: 24rpx">{{
+                  gradeIndex < 0 ? "选择班级" : gradeList[gradeIndex].className
+                }}</view>
+                <view
+                  ><u-icon name="arrow-down" color="#999999" size="28"></u-icon
+                ></view>
+              </view>
+              <view
+                v-if="detail.templateType == 'apply'"
+                style="
+                  display: flex;
+                  justify-content: space-between;
+                  align-items: center;
+                  height: 56rpx;
+                  padding: 8rpx;
+                  border-radius: 8rpx;
+                "
+                @click="openPopup(1)"
+              >
+                <view style="color: #666666; font-size: 24rpx">{{
+                  !applyAreas.areaName
+                    ? "报考地区"
+                    : examDate.examineName +
+                      "-" +
+                      applyAreas.areaName +
+                      "-" +
+                      applyAreas.cityName
+                }}</view>
+                <view
+                  ><u-icon name="arrow-down" color="#999999" size="28"></u-icon
+                ></view>
+              </view>
+            </view>
+          </view>
+        </view>
+        <!-- <view v-if="detail.templateType!=null&&detail.goodsType==1">
 						<u-line color="#D6D6DB" />
 						<view v-if="detail.templateType=='class'" style="display: flex;justify-content: space-between;align-items: center;height: 80rpx;padding:16rpx;" @click="openPopup(0)">
 							<view style="color: #666666;font-size: 24rpx;">{{gradeIndex < 0 ?'选择班级':gradeList[gradeIndex].className}}</view>
@@ -37,244 +76,295 @@
 							<view><u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
 						</view>
 					</view> -->
-				</view>
-			<!-- </view> -->
-		</view>
-		<view class="bottomBox safeArea">
-			<view class="sums">
-				<text class="all_sum">订单金额:</text>
-				<text class="priceTag">¥ {{detail.standPrice}}</text>
-			</view>
-			
-			<view style="display: flex;color: #FFFFFF;align-items: center;">
-				<view class="btn2" :class="{able:isAble()}" @click="goBuy()">确认购买</view>
-			</view>
-		</view>
-		
-		<u-popup v-model="show" mode="bottom" border-radius="40">
-			<view class="popup_box">
-				<view class="check_head">
-					<!-- <view class="line1"></view> -->
-					<view class="grade">选择班级</view>
-					<u-icon name="close" color="#CFCFCF" size="30" @click="closePop(0)"></u-icon>
-				</view>
-				<!-- <u-line color="#D6D6DB" /> -->
-				<view class="check_con">
-					<scroll-view scroll-y="true" style="height: 580rpx;">
-						<view>
-							<u-radio-group v-model="gradeValue" @change="radioGroupChange">
-								<view v-for="(item, index) in gradeList" :key="index" class="items_c">
-									<view class="border_c">
-										<view>
-											<u-radio
-												shape="circle"
-												active-color="#FC3F3F"
-												:name="index"
-												:disabled="item.studentNum > 0 && item.studentNum == item.studentUpper"
-											>
-												<view :class="index==gradeValue?'white-box blue-box':'white-box'" >
-													<view>
-														<view class="blackTxt">{{item.className}}</view>
-														<view class="redTxt" v-if="item.classEndTime">有效期至:{{$method.timestampToTime(item.classEndTime)}}</view>
-														<view class="redTxt" v-if="item.classEndTime">本班还剩{{$method.GetRTime(item.classEndTime)}}天将结束学习</view>
-													</view>
-												</view>
-											</u-radio>
-										</view>
-										
-									</view>
-								</view>
-							</u-radio-group>
-						</view>
-					</scroll-view>
-				</view>
-				<view class="confrim-btn">
-					<view class="okBtn" @click="okPopup(0)">确定</view>
-				</view>
-			</view>
-		</u-popup>
-		<u-popup v-model="show1" mode="bottom" border-radius="40">
-			<view class="popup_box">
-				<view class="check_head">
-					<view class="grade">选择考期/地区</view>
-					<u-icon name="close" color="#CFCFCF" size="30" @click="closePop(1)"></u-icon>
-				</view>
-				
-				<view style="display: flex;height: 550rpx;">
-					<view style="width: 50%;">
-						<view class="topTxt">考期</view>
-						<view>
-							<picker-view  :indicator-style="indicatorStyle" :value="value" @change="bindChangeE" class="picker-view">
-								<picker-view-column>
-									<view class="picker-item" v-for="(item,index) in examine" :key="index">{{item.examineName}}</view>
-								</picker-view-column>
-							</picker-view>
-						</view>
-					</view>
-					<view style="width: 50%;">
-						<view class="topTxt">地区</view>
-						<view>
-							<picker-view  :indicator-style="indicatorStyle" :value="value" @change="bindChange" class="picker-view">
-								<picker-view-column>
-									<view class="picker-item" v-for="(item,index) in provinceList" :key="index">{{item.areaName}}</view>
-								</picker-view-column>
-								<picker-view-column>
-									<view class="picker-item" v-for="(item,index) in cityList" :key="index">{{item.areaName}}</view>
-								</picker-view-column>
-							</picker-view>
-						</view>
-					</view>
-				</view>
-				<view class="confrim-btn">
-					<view class="okBtn" @click="okPopup(1)">确定</view>
-				</view>
-			</view>
-		</u-popup>
-	</view>
+      </view>
+      <!-- </view> -->
+    </view>
+    <view class="bottomBox safeArea">
+      <view class="sums">
+        <text class="all_sum">订单金额:</text>
+        <text class="priceTag">¥ {{ detail.standPrice }}</text>
+      </view>
+
+      <view style="display: flex; color: #ffffff; align-items: center">
+        <view class="btn2" :class="{ able: isAble() }" @click="goBuy()"
+          >确认购买</view
+        >
+      </view>
+    </view>
+
+    <u-popup v-model="show" mode="bottom" border-radius="40">
+      <view class="popup_box">
+        <view class="check_head">
+          <!-- <view class="line1"></view> -->
+          <view class="grade">选择班级</view>
+          <u-icon
+            name="close"
+            color="#CFCFCF"
+            size="30"
+            @click="closePop(0)"
+          ></u-icon>
+        </view>
+        <!-- <u-line color="#D6D6DB" /> -->
+        <view class="check_con">
+          <scroll-view scroll-y="true" style="height: 580rpx">
+            <view>
+              <u-radio-group v-model="gradeValue" @change="radioGroupChange">
+                <view
+                  v-for="(item, index) in gradeList"
+                  :key="index"
+                  class="items_c"
+                >
+                  <view class="border_c">
+                    <view>
+                      <u-radio
+                        shape="circle"
+                        active-color="#FC3F3F"
+                        :name="index"
+                        :disabled="
+                          item.studentNum > 0 &&
+                          item.studentNum == item.studentUpper
+                        "
+                      >
+                        <view
+                          :class="
+                            index == gradeValue
+                              ? 'white-box blue-box'
+                              : 'white-box'
+                          "
+                        >
+                          <view>
+                            <view class="blackTxt">{{ item.className }}</view>
+                            <Class-time-tip :classInfo="item"></Class-time-tip>
+                          </view>
+                        </view>
+                      </u-radio>
+                    </view>
+                  </view>
+                </view>
+              </u-radio-group>
+            </view>
+          </scroll-view>
+        </view>
+        <view class="confrim-btn">
+          <view class="okBtn" @click="okPopup(0)">确定</view>
+        </view>
+      </view>
+    </u-popup>
+    <u-popup v-model="show1" mode="bottom" border-radius="40">
+      <view class="popup_box">
+        <view class="check_head">
+          <view class="grade">选择考期/地区</view>
+          <u-icon
+            name="close"
+            color="#CFCFCF"
+            size="30"
+            @click="closePop(1)"
+          ></u-icon>
+        </view>
+
+        <view style="display: flex; height: 550rpx">
+          <view style="width: 50%">
+            <view class="topTxt">考期</view>
+            <view>
+              <picker-view
+                :indicator-style="indicatorStyle"
+                :value="value"
+                @change="bindChangeE"
+                class="picker-view"
+              >
+                <picker-view-column>
+                  <view
+                    class="picker-item"
+                    v-for="(item, index) in examine"
+                    :key="index"
+                    >{{ item.examineName }}</view
+                  >
+                </picker-view-column>
+              </picker-view>
+            </view>
+          </view>
+          <view style="width: 50%">
+            <view class="topTxt">地区</view>
+            <view>
+              <picker-view
+                :indicator-style="indicatorStyle"
+                :value="value"
+                @change="bindChange"
+                class="picker-view"
+              >
+                <picker-view-column>
+                  <view
+                    class="picker-item"
+                    v-for="(item, index) in provinceList"
+                    :key="index"
+                    >{{ item.areaName }}</view
+                  >
+                </picker-view-column>
+                <picker-view-column>
+                  <view
+                    class="picker-item"
+                    v-for="(item, index) in cityList"
+                    :key="index"
+                    >{{ item.areaName }}</view
+                  >
+                </picker-view-column>
+              </picker-view>
+            </view>
+          </view>
+        </view>
+        <view class="confrim-btn">
+          <view class="okBtn" @click="okPopup(1)">确定</view>
+        </view>
+      </view>
+    </u-popup>
+  </view>
 </template>
 
 <script>
-
-import { mapGetters } from 'vuex';
+import ClassTimeTip from "../../components/common/ClassTimeTip.vue";
+import { mapGetters } from "vuex";
 export default {
-	components: {
-		
-	},
-	data() {
-		return {
-			gradeValue:-1,
-			gradeIndex:-1,
-			id:0,
-			indicatorStyle: `height: 50px;`,
-			showArea:true,
-			show1:false,
-			value1:'',
-			show:false,
-			detail:{},
-			gradeList:[],
-			provinceList:[],
-			cityList:[],
-			pAreaIndex:0,
-			cAreaIndex:0,
-			examine:[],
-			examIndex:0,
-			applyAreas:{},
-			examDate:{},
-			applyObj:{
-				applyAreasJson:null,
-				examDateJson:null
-			},
-			fromCart:'',
-			isBK:'',//是不是补考商品
-		};
-	},
-	onPullDownRefresh(){
-	},
-	onLoad(option) {
-		this.id = option.id;
-		this.isBK = option.isBK
-		if(option.fromCart) {
-			this.fromCart = option.fromCart
-		}
-		
-		this.getDetail()
-	},
-	onShow() {
-		/* if(this.current === 2 && this.$method.isLogin()){
+  components: { ClassTimeTip },
+  data() {
+    return {
+      gradeValue: -1,
+      gradeIndex: -1,
+      id: 0,
+      indicatorStyle: `height: 50px;`,
+      showArea: true,
+      show1: false,
+      value1: "",
+      show: false,
+      detail: {},
+      gradeList: [],
+      provinceList: [],
+      cityList: [],
+      pAreaIndex: 0,
+      cAreaIndex: 0,
+      examine: [],
+      examIndex: 0,
+      applyAreas: {},
+      examDate: {},
+      applyObj: {
+        applyAreasJson: null,
+        examDateJson: null,
+      },
+      fromCart: "",
+      isBK: "", //是不是补考商品
+    };
+  },
+  onPullDownRefresh() {},
+  onLoad(option) {
+    this.id = option.id;
+    this.isBK = option.isBK;
+    if (option.fromCart) {
+      this.fromCart = option.fromCart;
+    }
+
+    this.getDetail();
+  },
+  onShow() {
+    /* if(this.current === 2 && this.$method.isLogin()){
 			this.$refs.refMy.init();
 		} */
-	},
-	methods: {
-		getExamine(id) {
-			let self = this
-			this.$api.getExamine({projectId:id}).then(res => {
-				if(res.data.code==200){
-					self.examine = res.data.rows
-				}
-			});
-		},
-		getCityList(id) {
-			let self = this
-			this.$api.getCityList({parentId:id}).then(res => {
-				if(res.data.code==200){
-					self.cityList = res.data.rows
-				}
-			});
-		},
-		getProvinceList() {
-			let self = this
-			if(self.provinceList.length>0){
-				return
-			}
-			this.$api.getProvinceList().then(res => {
-				if(res.data.code==200){
-					self.provinceList = res.data.rows
-					if(self.provinceList.length>0){
-						self.getCityList(self.provinceList[0].areaId)
-					}
-					
-				}
-			});
-		},
-		//弹出框确定
-		okPopup(index){
-			if(index==0){
-				if(!this.checkData()){
-					return
-				}
-				this.gradeIndex = this.gradeValue
-				this.detail.gradObj = this.gradeList[this.gradeIndex]
-				this.show = false
-			}else{
-				if(!this.checkAreaData()){
-					return
-				}
-				this.examDate = this.examine[this.examIndex]
-				let pData = this.provinceList[this.pAreaIndex]
-				let cData = this.cityList[this.cAreaIndex]
-				this.applyAreas = {areaName:pData.areaName,areaId:pData.areaId,cityId:cData.areaId,cityName:cData.areaName}
-				this.applyObj.applyAreasJson = JSON.stringify(this.applyAreas)
-				this.applyObj.examDateJson = JSON.stringify(this.examDate)
-				this.detail.examDate = this.examDate
-				this.detail.applyAreas = this.applyAreas
-				this.show1 = false
-			}
-		},
-		checkAreaData(){
-			if(this.examine.length==0){
-				uni.showModal({
-					title: "提示",
-					content: '请选择考期',
-					showCancel: false
-				})
-				return false
-			}
-			// if(this.provinceList.length==0){
-			// 	uni.showModal({
-			// 		title: "提示",
-			// 		content: '请选择报考地区',
-			// 		showCancel: false
-			// 	})
-			// 	return false
-			// }
-			// if(this.cityList.length==0){
-			// 	uni.showModal({
-			// 		title: "提示",
-			// 		content: '请选择报考地区',
-			// 		showCancel: false
-			// 	})
-			// 	return false
-			// }
-			return true
-		},
-		isAble() {
-			if(this.detail.templateType=='class'&&this.detail.goodsType==1){
-				if(this.gradeValue<0){
-					return false
-				}
-			}
-			else if(this.detail.templateType=='apply'&&this.detail.goodsType==1){
-				/* if(!this.applyObj.examDateJson){
+  },
+  methods: {
+    getExamine(id) {
+      let self = this;
+      this.$api.getExamine({ projectId: id }).then((res) => {
+        if (res.data.code == 200) {
+          self.examine = res.data.rows;
+        }
+      });
+    },
+    getCityList(id) {
+      let self = this;
+      this.$api.getCityList({ parentId: id }).then((res) => {
+        if (res.data.code == 200) {
+          self.cityList = res.data.rows;
+        }
+      });
+    },
+    getProvinceList() {
+      let self = this;
+      if (self.provinceList.length > 0) {
+        return;
+      }
+      this.$api.getProvinceList().then((res) => {
+        if (res.data.code == 200) {
+          self.provinceList = res.data.rows;
+          if (self.provinceList.length > 0) {
+            self.getCityList(self.provinceList[0].areaId);
+          }
+        }
+      });
+    },
+    //弹出框确定
+    okPopup(index) {
+      if (index == 0) {
+        if (!this.checkData()) {
+          return;
+        }
+        this.gradeIndex = this.gradeValue;
+        this.detail.gradObj = this.gradeList[this.gradeIndex];
+        this.show = false;
+      } else {
+        if (!this.checkAreaData()) {
+          return;
+        }
+        this.examDate = this.examine[this.examIndex];
+        let pData = this.provinceList[this.pAreaIndex];
+        let cData = this.cityList[this.cAreaIndex];
+        this.applyAreas = {
+          areaName: pData.areaName,
+          areaId: pData.areaId,
+          cityId: cData.areaId,
+          cityName: cData.areaName,
+        };
+        this.applyObj.applyAreasJson = JSON.stringify(this.applyAreas);
+        this.applyObj.examDateJson = JSON.stringify(this.examDate);
+        this.detail.examDate = this.examDate;
+        this.detail.applyAreas = this.applyAreas;
+        this.show1 = false;
+      }
+    },
+    checkAreaData() {
+      if (this.examine.length == 0) {
+        uni.showModal({
+          title: "提示",
+          content: "请选择考期",
+          showCancel: false,
+        });
+        return false;
+      }
+      // if(this.provinceList.length==0){
+      // 	uni.showModal({
+      // 		title: "提示",
+      // 		content: '请选择报考地区',
+      // 		showCancel: false
+      // 	})
+      // 	return false
+      // }
+      // if(this.cityList.length==0){
+      // 	uni.showModal({
+      // 		title: "提示",
+      // 		content: '请选择报考地区',
+      // 		showCancel: false
+      // 	})
+      // 	return false
+      // }
+      return true;
+    },
+    isAble() {
+      if (this.detail.templateType == "class" && this.detail.goodsType == 1) {
+        if (this.gradeValue < 0) {
+          return false;
+        }
+      } else if (
+        this.detail.templateType == "apply" &&
+        this.detail.goodsType == 1
+      ) {
+        /* if(!this.applyObj.examDateJson){
 					uni.showModal({
 						title: "提示",
 						content: '请选择考期',
@@ -282,30 +372,32 @@ export default {
 					})
 					return false
 				} */
-			}
-			return true;
-		},
-		checkData(){
-			if(this.detail.templateType=='class'&&this.detail.goodsType==1){
-				if(this.gradeValue<0){
-					uni.showModal({
-						title: "提示",
-						content: '请选择班级',
-						showCancel: false
-					})
-					return false
-				}
-			}
-			else if(this.detail.templateType=='apply'&&this.detail.goodsType==1){
-				// if(!this.applyObj.applyAreasJson){
-				// 	uni.showModal({
-				// 		title: "提示",
-				// 		content: '请选择报考地区',
-				// 		showCancel: false
-				// 	})
-				// 	return false
-				// }
-				/* if(!this.applyObj.examDateJson){
+      }
+      return true;
+    },
+    checkData() {
+      if (this.detail.templateType == "class" && this.detail.goodsType == 1) {
+        if (this.gradeValue < 0) {
+          uni.showModal({
+            title: "提示",
+            content: "请选择班级",
+            showCancel: false,
+          });
+          return false;
+        }
+      } else if (
+        this.detail.templateType == "apply" &&
+        this.detail.goodsType == 1
+      ) {
+        // if(!this.applyObj.applyAreasJson){
+        // 	uni.showModal({
+        // 		title: "提示",
+        // 		content: '请选择报考地区',
+        // 		showCancel: false
+        // 	})
+        // 	return false
+        // }
+        /* if(!this.applyObj.examDateJson){
 					uni.showModal({
 						title: "提示",
 						content: '请选择考期',
@@ -313,269 +405,266 @@ export default {
 					})
 					return false
 				} */
-			}
-			return true;
-		},
-		radioGroupChange(e){
-			console.log(e);
-		},
-		goodsGradeList() {
-			let self = this
-			this.$api.goodsGradeList({goodsId:this.id}).then(res => {
-				if(res.data.code==200){
-					self.gradeList = res.data.rows
-					
-					if(self.gradeList.length==0){
-						let item = {
-							className:'系统分班',
-							gradeId:0
-						}
-						self.gradeList.push(item)
-					} else {
-						let isGradeFull = self.gradeList.every(item => (item.studentNum > 0 && item.studentNum == item.studentUpper))
-						//所有班级都满了
-						if(isGradeFull) {
-							let item = {
-								className:'系统分班',
-								gradeId:0
-							}
-							self.gradeList.unshift(item)
-						}
-					}
-				}
-			});
-		},
-		goBuy(){
-			if(!this.checkData()){
-				return
-			}
-			let checkGoodsList = []
-			checkGoodsList.push(this.detail)
-			this.$store.commit('setShoppingCartList', {shoppingCartList  :checkGoodsList});
-			if(this.isBK == '1'){
-				this.$navTo.togo('/pages2/order/confirm_pay',{
-					isBK : '1',
-					fromCart:this.fromCart
-				});
-			}else{
-				this.$navTo.togo('/pages2/order/confirm_pay',{
-					fromCart:this.fromCart
-				});
-			}
-		},
-		getDetail() {
-			let self = this
-			this.$api.commonGoodsDetail(this.id).then(res => {
-				if(res.data.code==200){
-					self.detail = res.data.data
-					self.getExamine(self.detail.projectId)
-				}
-			});
-		},
-		bindChangeE(e){
-			console.log(e.detail.value)
-			this.examIndex = e.detail.value[0]
-		},
-		bindChange(e) {
-			const val = e.detail.value
-			if(this.pAreaIndex!=e.detail.value[0]){
-				this.pAreaIndex = e.detail.value[0]
-				this.getCityList(this.provinceList[this.pAreaIndex].areaId)
-			}
-			if(this.cAreaIndex!=e.detail.value[1]){
-				this.cAreaIndex = e.detail.value[1]
-			}
-			
-		},
-		openPopup(index){
-			if(index==0){
-				this.show = true
-				this.goodsGradeList()
-			}else{
-				this.show1 = true
-				this.getProvinceList()
-			}
-			
-		},
-		closePop(index) {
-			if (index == 0) {
-				this.show = false
-			} else {
-				this.show1 = false
-			}
-		}
-	},
-	onReachBottom() {},
-	computed: { ...mapGetters(['userInfo']) }
+      }
+      return true;
+    },
+    radioGroupChange(e) {
+      console.log(e);
+    },
+    goodsGradeList() {
+      let self = this;
+      this.$api.goodsGradeList({ goodsId: this.id }).then((res) => {
+        if (res.data.code == 200) {
+          self.gradeList = res.data.rows;
+
+          if (self.gradeList.length == 0) {
+            let item = {
+              className: "系统分班",
+              gradeId: 0,
+            };
+            self.gradeList.push(item);
+          } else {
+            let isGradeFull = self.gradeList.every(
+              (item) =>
+                item.studentNum > 0 && item.studentNum == item.studentUpper
+            );
+            //所有班级都满了
+            if (isGradeFull) {
+              let item = {
+                className: "系统分班",
+                gradeId: 0,
+              };
+              self.gradeList.unshift(item);
+            }
+          }
+        }
+      });
+    },
+    goBuy() {
+      if (!this.checkData()) {
+        return;
+      }
+      let checkGoodsList = [];
+      checkGoodsList.push(this.detail);
+      this.$store.commit("setShoppingCartList", {
+        shoppingCartList: checkGoodsList,
+      });
+      if (this.isBK == "1") {
+        this.$navTo.togo("/pages2/order/confirm_pay", {
+          isBK: "1",
+          fromCart: this.fromCart,
+        });
+      } else {
+        this.$navTo.togo("/pages2/order/confirm_pay", {
+          fromCart: this.fromCart,
+        });
+      }
+    },
+    getDetail() {
+      let self = this;
+      this.$api.commonGoodsDetail(this.id).then((res) => {
+        if (res.data.code == 200) {
+          self.detail = res.data.data;
+          self.getExamine(self.detail.projectId);
+        }
+      });
+    },
+    bindChangeE(e) {
+      console.log(e.detail.value);
+      this.examIndex = e.detail.value[0];
+    },
+    bindChange(e) {
+      const val = e.detail.value;
+      if (this.pAreaIndex != e.detail.value[0]) {
+        this.pAreaIndex = e.detail.value[0];
+        this.getCityList(this.provinceList[this.pAreaIndex].areaId);
+      }
+      if (this.cAreaIndex != e.detail.value[1]) {
+        this.cAreaIndex = e.detail.value[1];
+      }
+    },
+    openPopup(index) {
+      if (index == 0) {
+        this.show = true;
+        this.goodsGradeList();
+      } else {
+        this.show1 = true;
+        this.getProvinceList();
+      }
+    },
+    closePop(index) {
+      if (index == 0) {
+        this.show = false;
+      } else {
+        this.show1 = false;
+      }
+    },
+  },
+  onReachBottom() {},
+  computed: { ...mapGetters(["userInfo"]) },
 };
 </script>
 <style >
-	page{
-		background-color: #fff;
-	}
+page {
+  background-color: #fff;
+}
 </style>
 <style scoped lang="scss">
 .confirms {
-    width: 100%;
-    height: 100vh;
-    // background: #fff;
-	.contents {
-		padding: 32rpx 32rpx 132rpx 32rpx;
-	}
-	.right_con {
-		width: 450rpx;
-	}
+  width: 100%;
+  height: 100vh;
+  // background: #fff;
+  .contents {
+    padding: 32rpx 32rpx 132rpx 32rpx;
+  }
+  .right_con {
+    width: 450rpx;
+  }
+}
+.picker-item {
+  height: 50px;
+  align-items: center;
+  justify-content: center;
+  text-align: center;
+}
+.picker-view {
+  width: 100%;
+  height: 420rpx;
+  text-align: center;
+}
+.topTxt {
+  font-size: 30rpx;
+  color: #666666;
+  text-align: center;
+  padding: 20rpx 0;
+}
+.blackTxt {
+  font-size: 30rpx;
+  font-family: PingFang SC;
+  font-weight: bold;
+  color: #333333;
+}
+.blue-box {
+  background: #ebf5ff;
+}
+.white-box {
+  width: 646rpx;
+  border-radius: 24rpx;
+  align-items: center;
+  display: flex;
+  padding-left: 15rpx;
+}
+.okBtn {
+  width: 232rpx;
+  height: 92rpx;
+  line-height: 92rpx;
+  background: #fc3f3f;
+  border-radius: 120rpx;
+  color: #ffffff;
+  text-align: center;
+  font-size: 32rpx;
+  font-weight: 500;
+}
+.confrim-btn {
+  // border-top:1px solid #eee;
+  height: 98rpx;
+  width: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+.grade {
+  // height: 23rpx;
+  font-size: 32rpx;
+  color: #222;
+  // margin: 0 auto;
+  // margin-top: 15rpx;
+  font-weight: 500;
+  text-align: center;
+}
+.line1 {
+  width: 80rpx;
+  height: 8rpx;
+  background: #999999;
+  border-radius: 4rpx;
+  margin: 0 auto;
+  margin-top: 15rpx;
+}
+.popup_box {
+  height: 824rpx;
+  box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
+  border-radius: 28rpx 28rpx 0rpx 0rpx;
+  .check_head {
+    padding: 0rpx 32rpx;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    height: 104rpx;
+    background: #f2f2f2;
+  }
+  .items_c {
+    padding: 0rpx 32rpx;
+  }
+  .border_c {
+    display: flex;
+    align-items: center;
+    padding: 20rpx 0rpx;
+    border-bottom: 1rpx solid #f2f2f2;
+  }
+}
+.item {
+  width: 100%;
+  background: #ffffff;
+  border-radius: 16rpx;
+  margin-bottom: 20rpx;
+}
+.priceTag {
+  font-size: 28rpx;
+  font-family: PingFang SC;
+  font-weight: bold;
+  color: #fc3f3f;
+  margin-top: 6rpx;
+  margin-bottom: 16rpx;
+}
+.input_c {
+  background: #f8f8f8;
+}
+.btn2 {
+  width: 232rpx;
+  height: 92rpx;
+  background: #fc3f3f;
+  border-radius: 120rpx;
+  // width: 200rpx;
+  // height: 64rpx;
+  // background: linear-gradient(0deg, #015EEA, #00C0FA);
+  text-align: center;
+  line-height: 92rpx;
+  &.able {
+    opacity: 1;
+  }
+}
+.bottomBox {
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  left: 0;
+  height: 132rpx;
+  background-color: #ffffff;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  box-sizing: unset;
+  box-shadow: 0px -2px 6px 0px rgba(0, 0, 0, 0.1);
+  > view {
+    margin: 0 30rpx;
+  }
+  .sums {
+    display: flex;
+  }
+  .all_sum {
+    font-size: 28rpx;
+    font-weight: 500;
+    color: #303030;
+  }
 }
-	.picker-item {
-	        height: 50px;
-	        align-items: center;
-	        justify-content: center;
-	        text-align: center;
-	    }
-	.picker-view {
-		width: 100%;
-		height: 420rpx;
-		text-align: center;
-	}
-	.topTxt{
-		font-size: 30rpx;
-		color: #666666;
-		text-align: center;
-		padding: 20rpx 0;
-	}
-	.blackTxt{
-		font-size: 30rpx;
-		font-family: PingFang SC;
-		font-weight: bold;
-		color: #333333;
-	}
-	.redTxt{
-		font-size: 30rpx;
-		font-family: PingFang SC;
-		color: #FF2D55;
-		margin-top: 13rpx;
-	}
-	.blue-box{
-		background: #EBF5FF;
-	}
-	.white-box{
-		width: 646rpx;
-		border-radius: 24rpx;
-		align-items: center;
-		display: flex;
-		padding-left: 15rpx;
-	}
-	.okBtn{
-		width: 232rpx;
-		height: 92rpx;
-		line-height: 92rpx;
-		background: #FC3F3F;
-		border-radius: 120rpx;
-		color: #FFFFFF;
-		text-align: center;
-		font-size: 32rpx;
-		font-weight: 500;
-	}
-	.confrim-btn{
-		// border-top:1px solid #eee;
-		height: 98rpx;
-		width: 100%;
-		display: flex;
-		align-items: center;
-		justify-content:center;
-	}
-	.grade{
-		// height: 23rpx;
-		font-size: 32rpx;
-		color: #222;
-		// margin: 0 auto;
-		// margin-top: 15rpx;
-		font-weight: 500;
-		text-align: center;
-	}
-	.line1{
-		width: 80rpx;
-		height: 8rpx;
-		background: #999999;
-		border-radius: 4rpx;
-		margin: 0 auto;
-		margin-top: 15rpx;
-	}
-	.popup_box {
-		height: 824rpx;
-		box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
-		border-radius: 28rpx 28rpx 0rpx 0rpx;
-		.check_head {
-			padding: 0rpx 32rpx;
-			display: flex;
-			align-items: center;
-			justify-content: space-between;
-			height: 104rpx;
-    		background: #F2F2F2;
-		}
-		.items_c {
-			padding: 0rpx 32rpx;
-		}
-		.border_c {
-			display: flex;
-			align-items: center;
-			padding: 20rpx 0rpx;
-			border-bottom: 1rpx solid #F2F2F2;
-		}
-	}
-	.item{
-		width: 100%;
-		background: #FFFFFF;
-		border-radius: 16rpx;
-		margin-bottom: 20rpx;
-	}
-	.priceTag{
-		font-size: 28rpx;
-		font-family: PingFang SC;
-		font-weight: bold;
-		color: #FC3F3F;
-		margin-top: 6rpx;
-		margin-bottom: 16rpx;
-	}
-	.input_c {
-		background: #F8F8F8;
-	}
-	.btn2{
-		width: 232rpx;
-		height: 92rpx;
-		background: #FC3F3F;
-		border-radius: 120rpx;
-		// width: 200rpx;
-		// height: 64rpx;
-		// background: linear-gradient(0deg, #015EEA, #00C0FA);
-		text-align: center;
-		line-height: 92rpx;
-		&.able {
-			opacity: 1;
-		}
-	}
-	.bottomBox{
-		position: fixed;
-		bottom: 0;
-		width: 100%;
-		left: 0;
-		height: 132rpx ;
-		background-color: #FFFFFF;
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		box-sizing: unset;
-		box-shadow: 0px -2px 6px 0px rgba(0,0,0,0.1000);
-		>view{
-			margin: 0 30rpx;
-		}
-		.sums {
-			display: flex;
-		}
-		.all_sum {
-			font-size: 28rpx;
-			font-weight: 500;
-			color: #303030;
-		}
-	}
 </style>

+ 549 - 509
pages2/order/confirm_pay.vue

@@ -1,11 +1,11 @@
 <template>
-	<view>
-		<nav-bar title="订单支付"></nav-bar>
-		<view>
-			<view>
-				<view class="box2">
-					<view class="title2">支付信息</view>
-					<!-- <view style="padding:10rpx 30rpx;" v-for="(item,index) in shoppingCartList" :key="index">
+  <view>
+    <nav-bar title="订单支付"></nav-bar>
+    <view>
+      <view>
+        <view class="box2">
+          <view class="title2">支付信息</view>
+          <!-- <view style="padding:10rpx 30rpx;" v-for="(item,index) in shoppingCartList" :key="index">
 						<view class="list_title">
 							<view class="txt_left">商品名称</view>
 							<view class="txt_right">{{item.goodsName}}</view>
@@ -15,518 +15,558 @@
 							<view class="txt_right_price">¥ {{item.standPrice}}</view>
 						</view>
 					</view> -->
-					<view v-for="(item,index) in shoppingCartList" :key="index" style="display: flex;justify-content: space-between; margin-bottom: 32rpx;">
-						<image :src="$method.splitImgHost(item.coverUrl)" style="height: 120rpx;width: 204rpx;border-radius: 16rpx;"></image>
-						<view class="right_con" style="margin-left: 20rpx;">
-							<view style="color: #333333;font-size: 30rpx;font-weight: bold;">
-								{{item.goodsName}}
-							</view>
-							<view class="priceTag">
-								¥ {{item.standPrice}}
-							</view>
-						</view>
-					</view>
+          <view
+            v-for="(item, index) in shoppingCartList"
+            :key="index"
+            style="
+              display: flex;
+              justify-content: space-between;
+              margin-bottom: 32rpx;
+            "
+          >
+            <image
+              :src="$method.splitImgHost(item.coverUrl)"
+              style="height: 120rpx; width: 204rpx; border-radius: 16rpx"
+            ></image>
+            <view class="right_con" style="margin-left: 20rpx">
+              <view style="color: #333333; font-size: 30rpx; font-weight: bold">
+                {{ item.goodsName }}
+              </view>
+              <view class="priceTag"> ¥ {{ item.standPrice }} </view>
+              <Class-time-tip
+                v-if="item.gradObj.gradeId"
+                :classInfo="item.gradObj"
+              ></Class-time-tip>
+            </view>
+          </view>
 
-					<view class="info_right" >
-						<!-- <u-line color="#D6D6DB" /> -->
-						<view class="list_item">
-							<view class="txt_left">应付总金额</view>
-							<view class="txt_right_price">¥ {{totalPrice}}</view>
-						</view>
-					</view>
-				</view>
-				<view class="box3">
-					<view class="title2">支付方式</view>
-					
-					<view>
-						<u-radio-group v-model="value" @change="radioGroupChange">
-						<view class="list_item">
-							<view class="txt_left_pay"><image src="/static/wepay.png" class="pay_icon"></image>微信支付</view>
-							<view ><u-radio @change="radioChange" name="wepay"></u-radio></view>
-						</view>
-						<view class="list_item" v-if="false">
-							<view class="txt_left_pay"><image src="/static/unipay.png" class="pay_icon"></image>云闪付</view>
-							<view ><u-radio @change="radioChange" name="unipay"></u-radio></view>
-						</view>
-						</u-radio-group>
-					</view>
-					<u-line color="#D6D6DB" />
-				</view>
-			</view>
-		</view>
-		<view class="bottomBox safeArea">
-			<view class="sums">
-				<text class="all_sum">总金额:</text>
-				<text class="priceTag">¥ {{totalPrice}}</text>
-			</view>
-			
-			<view style="display: flex;color: #FFFFFF;align-items: center;">
-				<!-- <view class="btn2" @click="pay()">确认支付</view> -->
-				<button class="btn2" @click="pay()" :disabled="btnNo">确认支付</button>
-			</view>
-		</view>
-		<!-- <button class="bottomBtn" @click="pay()" :disabled="btnNo">确认支付</button> -->
-		
-		<u-modal v-model="showModal" :confirm-text="confirmText" cancel-text="知道了" cancel-color="#666666" confirm-color="rgba(0, 122, 255, 1);" :show-confirm-button="showConfirmButton" :show-cancel-button="true" :content="modalMsg" @cancel="modalCancel()" @confirm="modalConfirm()" ref="uModal" ></u-modal>
-	</view>
-	
+          <view class="info_right">
+            <!-- <u-line color="#D6D6DB" /> -->
+            <view class="list_item">
+              <view class="txt_left">应付总金额</view>
+              <view class="txt_right_price">¥ {{ totalPrice }}</view>
+            </view>
+          </view>
+        </view>
+        <view class="box3">
+          <view class="title2">支付方式</view>
+
+          <view>
+            <u-radio-group v-model="value" @change="radioGroupChange">
+              <view class="list_item">
+                <view class="txt_left_pay"
+                  ><image src="/static/wepay.png" class="pay_icon"></image
+                  >微信支付</view
+                >
+                <view
+                  ><u-radio @change="radioChange" name="wepay"></u-radio
+                ></view>
+              </view>
+              <view class="list_item" v-if="false">
+                <view class="txt_left_pay"
+                  ><image src="/static/unipay.png" class="pay_icon"></image
+                  >云闪付</view
+                >
+                <view
+                  ><u-radio @change="radioChange" name="unipay"></u-radio
+                ></view>
+              </view>
+            </u-radio-group>
+          </view>
+          <u-line color="#D6D6DB" />
+        </view>
+      </view>
+    </view>
+    <view class="bottomBox safeArea">
+      <view class="sums">
+        <text class="all_sum">总金额:</text>
+        <text class="priceTag">¥ {{ totalPrice }}</text>
+      </view>
+
+      <view style="display: flex; color: #ffffff; align-items: center">
+        <!-- <view class="btn2" @click="pay()">确认支付</view> -->
+        <button class="btn2" @click="pay()" :disabled="btnNo">确认支付</button>
+      </view>
+    </view>
+    <!-- <button class="bottomBtn" @click="pay()" :disabled="btnNo">确认支付</button> -->
+
+    <u-modal
+      v-model="showModal"
+      :confirm-text="confirmText"
+      cancel-text="知道了"
+      cancel-color="#666666"
+      confirm-color="rgba(0, 122, 255, 1);"
+      :show-confirm-button="showConfirmButton"
+      :show-cancel-button="true"
+      :content="modalMsg"
+      @cancel="modalCancel()"
+      @confirm="modalConfirm()"
+      ref="uModal"
+    ></u-modal>
+  </view>
 </template>
 
 <script>
-
-import { mapGetters } from 'vuex';
+import { mapGetters } from "vuex";
+import ClassTimeTip from "../../components/common/ClassTimeTip.vue";
 export default {
-	components: {
-		
-	},
-	data() {
-		return {
-			showModal:false,
-			modalMsg:'',
-			list:[
-				{
-					name: '网课'
-				},
-				{
-					name: '题库通'
-				}
-			],
-			array:['全部','建设工程施工管理','机电全科','机电工程管理与实','机电全科','全科'],
-			current:0,
-			menuIndex:0,
-			value:'wepay',
-			btnNo:false,
-			isBK:'',
-			fromCart:'',
-			hasPaying:false,
-			showConfirmButton:false,
-			totalPrice:0,
-			confirmText:''
-		};
-	},
-	onPullDownRefresh(){
-	},
-	onLoad(option) {
-		let self = this
-		this.fromCart = option.fromCart;
-		 console.log(self.shoppingCartList,6)
-		 let list = self.shoppingCartList
-		 this.isBK = option.isBK
-		 for(let i=0;i<list.length;i++){
-			 this.totalPrice+=Number(list[i].standPrice)
-		 }
-		 console.log(this.isBK == '1')
-	},
-	onShow() {
-		
-	},
-	methods: {
-		postOrder(){
-			let list = this.shoppingCartList
-			for(let i=0;i<list.length;i++){
-				let item = list[i];
-					if(item.goodsType==1){
-						if(item.templateType=='class'){
-							delete item.gradObj.goodsList 
-							let goodsInputData = {
-								type:'class',
-								gradeId:item.gradObj.gradeId,
-								gradeJson:JSON.stringify(item.gradObj)
-							}
-							item.goodsInputData = goodsInputData
-						}
-						if(item.templateType=='apply'){
-							let goodsInputData = {
-								type:'apply',
-								applyAreasJson:JSON.stringify(item.applyAreas),
-								examDateJson:JSON.stringify(item.examDate)
-							}
-							item.goodsInputData = goodsInputData
-						}
-					}
-			}
-			let data = {goodsList:list}
-			// #ifdef MP-WEIXIN
-			this.$api.placeSmallOrder(data).then(res => {
-				console.log(res,'res')
-				this.orderResult(res)
-			});
-			// #endif
+  data() {
+    return {
+      showModal: false,
+      modalMsg: "",
+      list: [
+        {
+          name: "网课",
+        },
+        {
+          name: "题库通",
+        },
+      ],
+      array: [
+        "全部",
+        "建设工程施工管理",
+        "机电全科",
+        "机电工程管理与实",
+        "机电全科",
+        "全科",
+      ],
+      current: 0,
+      menuIndex: 0,
+      value: "wepay",
+      btnNo: false,
+      isBK: "",
+      fromCart: "",
+      hasPaying: false,
+      showConfirmButton: false,
+      totalPrice: 0,
+      confirmText: "",
+    };
+  },
+  onPullDownRefresh() {},
+  onLoad(option) {
+    let self = this;
+    this.fromCart = option.fromCart;
+    console.log(self.shoppingCartList, 6);
+    let list = self.shoppingCartList;
+    this.isBK = option.isBK;
+    for (let i = 0; i < list.length; i++) {
+      this.totalPrice += Number(list[i].standPrice);
+    }
+    console.log(this.isBK == "1");
+  },
+  onShow() {},
+  methods: {
+    postOrder() {
+      let list = this.shoppingCartList;
+      for (let i = 0; i < list.length; i++) {
+        let item = list[i];
+        if (item.goodsType == 1) {
+          if (item.templateType == "class") {
+            delete item.gradObj.goodsList;
+            let goodsInputData = {
+              type: "class",
+              gradeId: item.gradObj.gradeId,
+              gradeJson: JSON.stringify(item.gradObj),
+            };
+            item.goodsInputData = goodsInputData;
+          }
+          if (item.templateType == "apply") {
+            let goodsInputData = {
+              type: "apply",
+              applyAreasJson: JSON.stringify(item.applyAreas),
+              examDateJson: JSON.stringify(item.examDate),
+            };
+            item.goodsInputData = goodsInputData;
+          }
+        }
+      }
+      let data = { goodsList: list };
+      // #ifdef MP-WEIXIN
+      this.$api.placeSmallOrder(data).then((res) => {
+        console.log(res, "res");
+        this.orderResult(res);
+      });
+      // #endif
+
+      // #ifdef H5
+      data["url"] = location.href;
+      this.$api.placeGzhOrder(data).then((res) => {
+        console.log(res, "h5支付res");
+        this.orderResult(res);
+      });
+      // #endif
+    },
+    orderResult(res) {
+      if (res.data.code == 200) {
+        uni.setStorageSync("updateCart", 1); //提醒刷新购物车
+        if (this.totalPrice == 0) {
+          //免费商品
+          uni.redirectTo({
+            url: `/pages2/order/confirm_success?sn=${res.data.data.orderSn}&isBk=${this.isBK}`,
+          });
+        } else {
+          let data = res.data.data;
+          uni.showLoading({
+            title: "支付中",
+            mask: true,
+          });
+          // #ifdef MP-WEIXIN
+          uni.requestPayment({
+            provider: data.provider,
+            nonceStr: data.nonceStr,
+            package: data.package,
+            signType: data.signType,
+            paySign: data.sign,
+            timeStamp: String(data.timeStamp),
+            success: (res) => {
+              uni.hideLoading();
+              this.btnNo = false;
+              uni.redirectTo({
+                url: `/pages2/order/confirm_success?sn=${data.orderSn}&isBk=${this.isBK}`,
+              });
+              console.log("success:" + JSON.stringify(res));
+            },
+            fail: (err) => {
+              uni.hideLoading();
+              this.btnNo = false;
+              console.log("fail:" + JSON.stringify(err));
+            },
+          });
+          // #endif
 
-			// #ifdef H5
-			data['url'] = location.href
-			this.$api.placeGzhOrder(data).then(res => {
-				console.log(res,'h5支付res')
-				this.orderResult(res)
-			});
-			// #endif
-		},
-		orderResult(res) {
-			if(res.data.code==200){
-					
-					uni.setStorageSync('updateCart',1) //提醒刷新购物车
-					if(this.totalPrice == 0) { //免费商品
-						uni.redirectTo({
-						    url: `/pages2/order/confirm_success?sn=${res.data.data.orderSn}&isBk=${this.isBK}`
-						});
-					} else {
-						let data = res.data.data
-						uni.showLoading({
-							title:'支付中',
-							mask:true,
-						})
-						// #ifdef MP-WEIXIN
-						uni.requestPayment({
-						    provider: data.provider,
-						    nonceStr: data.nonceStr,
-						    package: data.package,
-						    signType: data.signType,
-						    paySign: data.sign,
-							timeStamp: String(data.timeStamp),
-						    success: (res) => {
-								
-								uni.hideLoading()
-								this.btnNo = false
-								uni.redirectTo({
-								    url: `/pages2/order/confirm_success?sn=${data.orderSn}&isBk=${this.isBK}`
-								});
-						        console.log('success:' + JSON.stringify(res));
-						    },
-						    fail: (err) => {
-								uni.hideLoading()
-								this.btnNo = false
-						        console.log('fail:' + JSON.stringify(err));
-						    }
-						});
-						// #endif
+          // #ifdef H5
+          this.h5_wxpay(data);
+          // #endif
+        }
+      } else if (res.data.code == 510) {
+        //有未支付订单
+        this.hasPaying = true;
+        this.btnNo = false;
+        this.modalMsg = res.data.msg;
+        this.showConfirmButton = true;
+        this.confirmText = "跳转到【我的订单】\n查看未支付订单";
+        this.showModal = true;
+      } else if (res.data.code == 511) {
+        //511 重复购买
+        this.hasPaying = false;
+        this.btnNo = false;
+        this.modalMsg = res.data.msg;
+        this.showConfirmButton = true;
+        this.showModal = true;
 
-						// #ifdef H5
-						this.h5_wxpay(data)
-						// #endif
-					}
-					
-				}else if(res.data.code == 510){ //有未支付订单
-					this.hasPaying = true;
-					this.btnNo = false
-					this.modalMsg = res.data.msg;
-					this.showConfirmButton = true;
-					this.confirmText = "跳转到【我的订单】\n查看未支付订单";
-					this.showModal = true;
-				} else if(res.data.code == 511) { //511 重复购买
-					this.hasPaying = false;
-					this.btnNo = false
-					this.modalMsg = res.data.msg;
-					this.showConfirmButton = true;
-					this.showModal = true;
-					
-					if(this.fromCart) {
-						console.log(this.fromCart)
-						this.confirmText = "返回购物车";
-					} else {
-						let type = '';
-						if(this.shoppingCartList.length == 1) {
-							type = this.shoppingCartList[0].goodsType
-						} else {
-							type = this.shoppingCartList[0].goodsType;
-							
-							if(this.shoppingCartList.find(item => item.goodsType != type)) {
-								type = 3;
-							}
-						}
-						this.confirmText = (type == 1 || type == 6) ? "继续选课" : type == 2 ? "继续选题" : type == 3 ? "继续选购" :"";
-					}
-					
-				} else {
-					this.hasPaying = false;
-					this.btnNo = false
-					this.showConfirmButton = false;
-					this.modalMsg = res.data.msg;
-					this.showModal = true;
-				}
-		},
-		h5_wxpay(data) {
-			console.log('====调起支付状态', data);
-			let self = this
-			function onBridgeReady() {
-				// 加载框
-				WeixinJSBridge.invoke(
-					'getBrandWCPayRequest', {
-						'appId': data.appId, // 公众号名称,由商户传入
-						'timeStamp': data.timeStamp, // 时间戳,自1970年以来的秒数
-						'nonceStr': data.nonceStr, // 随机串
-						'package': data.package,
-						'signType': data.signType, // 微信签名方式:
-						'paySign': data.paySign // 微信签名
-					},
-					function(res) {
-						// 判断支付状态
-						console.log('支付状态',res, 'this:', this, self)
-						if (res.err_msg === 'get_brand_wcpay_request:ok') {
-							self.$u.toast('支付成功')
-							uni.hideLoading()
-							self.btnNo = false
-							uni.redirectTo({
-								url: `/pages2/order/confirm_success?sn=${data.orderSn}&isBk=${self.isBK}`
-							});
-						} else if (res.err_msg === 'get_brand_wcpay_request:cancel') {
-							self.$u.toast('取消支付')
-						} else {
-							uni.hideLoading()
-							self.btnNo = false
-							self.$u.toast('支付失败')
-						}
-					}
-				)
-			}
-			if (typeof WeixinJSBridge === 'undefined') {
-				if (document.addEventListener) {
-					document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false)
-				} else if (document.attachEvent) {
-					document.attachEvent('WeixinJSBridgeReady', onBridgeReady)
-					document.attachEvent('onWeixinJSBridgeReady', onBridgeReady)
-				}
-			} else {
-				onBridgeReady()
-			}
-		},
-		modalCancel() {
-			this.showModal = false;
-		},
-		modalConfirm() {
-			if(this.hasPaying) {
-				uni.navigateTo({
-					url:'/pages2/order/index?current=0'
-				})
-			} else {
-				if(this.fromCart) {
-					
-					uni.navigateTo({
-						url:'/pages4/shopping/shoppingCart'
-					})
-				} else {
-					
-					uni.switchTab({
-						url:'/pages/course/index'
-					})
-				}
-			}
-			
-		},
-		getOpenid(code){
-			let self = this
-			this.$api.wxOpenid({code:code}).then(res => {
-				if(res.data.code==200){
-					self.postOrder()
-				}
-			});
-		},
-		pay(){
-			let self = this
-			this.btnNo = true
-			// #ifdef MP-WEIXIN
-			uni.login({
-				provider: 'weixin',
-				success: function(loginRes) {
-					console.log(loginRes,69)
-					self.getOpenid(loginRes.code)
-					
-				}
-			}); 
-			// #endif
-			
-			// #ifdef H5
-			// 在首页已经请求过接口/gzh_login 提交code了
-			this.postOrder()
-			// #endif
-		},
-		radioChange(e) {
-			// console.log(e);
-		},
-		// 选中任一radio时,由radio-group触发
-		radioGroupChange(e) {
-			// console.log(e);
-		},
-		cMenu(index){
-			this.menuIndex = index;
-		},
-		change(index){
-			this.current = index;
-		}
-	},
-	onReachBottom() {},
-	computed: { ...mapGetters(['userInfo','shoppingCartList']) }
+        if (this.fromCart) {
+          console.log(this.fromCart);
+          this.confirmText = "返回购物车";
+        } else {
+          let type = "";
+          if (this.shoppingCartList.length == 1) {
+            type = this.shoppingCartList[0].goodsType;
+          } else {
+            type = this.shoppingCartList[0].goodsType;
+
+            if (this.shoppingCartList.find((item) => item.goodsType != type)) {
+              type = 3;
+            }
+          }
+          this.confirmText =
+            type == 1 || type == 6
+              ? "继续选课"
+              : type == 2
+              ? "继续选题"
+              : type == 3
+              ? "继续选购"
+              : "";
+        }
+      } else {
+        this.hasPaying = false;
+        this.btnNo = false;
+        this.showConfirmButton = false;
+        this.modalMsg = res.data.msg;
+        this.showModal = true;
+      }
+    },
+    h5_wxpay(data) {
+      console.log("====调起支付状态", data);
+      let self = this;
+      function onBridgeReady() {
+        // 加载框
+        WeixinJSBridge.invoke(
+          "getBrandWCPayRequest",
+          {
+            appId: data.appId, // 公众号名称,由商户传入
+            timeStamp: data.timeStamp, // 时间戳,自1970年以来的秒数
+            nonceStr: data.nonceStr, // 随机串
+            package: data.package,
+            signType: data.signType, // 微信签名方式:
+            paySign: data.paySign, // 微信签名
+          },
+          function (res) {
+            // 判断支付状态
+            console.log("支付状态", res, "this:", this, self);
+            if (res.err_msg === "get_brand_wcpay_request:ok") {
+              self.$u.toast("支付成功");
+              uni.hideLoading();
+              self.btnNo = false;
+              uni.redirectTo({
+                url: `/pages2/order/confirm_success?sn=${data.orderSn}&isBk=${self.isBK}`,
+              });
+            } else if (res.err_msg === "get_brand_wcpay_request:cancel") {
+              self.$u.toast("取消支付");
+            } else {
+              uni.hideLoading();
+              self.btnNo = false;
+              self.$u.toast("支付失败");
+            }
+          }
+        );
+      }
+      if (typeof WeixinJSBridge === "undefined") {
+        if (document.addEventListener) {
+          document.addEventListener(
+            "WeixinJSBridgeReady",
+            onBridgeReady,
+            false
+          );
+        } else if (document.attachEvent) {
+          document.attachEvent("WeixinJSBridgeReady", onBridgeReady);
+          document.attachEvent("onWeixinJSBridgeReady", onBridgeReady);
+        }
+      } else {
+        onBridgeReady();
+      }
+    },
+    modalCancel() {
+      this.showModal = false;
+    },
+    modalConfirm() {
+      if (this.hasPaying) {
+        uni.navigateTo({
+          url: "/pages2/order/index?current=0",
+        });
+      } else {
+        if (this.fromCart) {
+          uni.navigateTo({
+            url: "/pages4/shopping/shoppingCart",
+          });
+        } else {
+          uni.switchTab({
+            url: "/pages/course/index",
+          });
+        }
+      }
+    },
+    getOpenid(code) {
+      let self = this;
+      this.$api.wxOpenid({ code: code }).then((res) => {
+        if (res.data.code == 200) {
+          self.postOrder();
+        }
+      });
+    },
+    pay() {
+      let self = this;
+      this.btnNo = true;
+      // #ifdef MP-WEIXIN
+      uni.login({
+        provider: "weixin",
+        success: function (loginRes) {
+          console.log(loginRes, 69);
+          self.getOpenid(loginRes.code);
+        },
+      });
+      // #endif
+
+      // #ifdef H5
+      // 在首页已经请求过接口/gzh_login 提交code了
+      this.postOrder();
+      // #endif
+    },
+    radioChange(e) {
+      // console.log(e);
+    },
+    // 选中任一radio时,由radio-group触发
+    radioGroupChange(e) {
+      // console.log(e);
+    },
+    cMenu(index) {
+      this.menuIndex = index;
+    },
+    change(index) {
+      this.current = index;
+    },
+  },
+  onReachBottom() {},
+  computed: { ...mapGetters(["userInfo", "shoppingCartList"]) },
+  components: { ClassTimeTip },
 };
 </script>
 <style >
-	::-webkit-scrollbar{
-	 width: 0;
-	 height: 0;
-	 color: transparent
-	}
-	page{
-		background-color: #EAEEF1;
-	}
+::-webkit-scrollbar {
+  width: 0;
+  height: 0;
+  color: transparent;
+}
+page {
+  background-color: #eaeef1;
+}
 </style>
 <style lang="scss" scoped>
-	
-	.txt_left_pay{
-		display: flex;
-		align-items: center;
-		height: 64rpx;
-		font-size: 24rpx;
-		color: #666666;
-	}
-	.pay_icon{
-		width: 64rpx;
-		height: 64rpx;
-		margin-right: 10rpx;
-	}
-	.box3{
-		width: 100%;
-		height: 886rpx;
-		background: #FFFFFF;
-		// border-radius: 16rpx;
-		margin-top: 16rpx;
-		padding: 32rpx 32rpx 0rpx 32rpx;
-	}
-	.tip{
-		font-size: 24rpx;
-		color: #999999;
-		height: 40rpx;
-		line-height: 40rpx;
-	}
-	.txt_right_sn{
-		font-size: 30rpx;
-		font-weight: bold;
-		color: #666666;
-	}
-	.txt_right_price{
-		font-size: 32rpx;
-		font-weight: bold;
-		color: #FF2D55;
-	}
-	.txt_left{
-		font-size: 28rpx;
-		color: #666666;
-	}
-	.txt_right{
-		text-align: right;
-		color: #333333;
-		font-weight: bold;
-		width: 75%;
-	}
-	.list_title {
-		display: flex;
-		justify-content: space-between;
-	}
-	.list_item{
-		display: flex;
-		justify-content: space-between;
-		height: 110rpx;
-		align-items: center;
-	}
-	.title2{
-		font-size: 32rpx;
-		font-weight: bold;
-		color: #333333;
-		// height: 80rpx;
-		// line-height: 80rpx;
-		// margin-left: 30rpx;
-		margin-bottom: 32rpx;
-	}
-	.box2{
-		width: 100%;
-		background: #FFFFFF;
-		// border-radius: 16rpx;
-		padding: 32rpx 32rpx 0rpx 32rpx;
-		.right_con {
-			width: 450rpx;
-		}
-		.priceTag{
-			font-size: 28rpx;
-			font-family: PingFang SC;
-			font-weight: bold;
-			color: #FC3F3F;
-			margin-top: 6rpx;
-			margin-bottom: 16rpx;
-		}
-		.info_right {
-			height: 110rpx;
-			line-height: 110rpx;
-			border-top: 1rpx solid #F2F2F2;
-		}
-	}
-	.box1_t2{
-		font-size: 24rpx;
-		color: #999999;
-		text-align: center;
-	}
-	.box1_t1{
-		font-size: 30rpx;
-		font-weight: bold;
-		color: #333333;
-		height: 70rpx;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-
-	}
-	.box1{
-		width: 100%;
-		height: 120rpx;
-		background: #FFFFFF;
-		border-radius: 16rpx;
-		
-	}
-	.bottomBtn{
-		position: fixed;
-		bottom: 0;
-		width: 100%;
-		height: 98rpx;
-		background: linear-gradient(0deg, #015EEA, #00C0FA);
-		color: #FFFFFF;
-		text-align: center;
-		line-height: 98rpx;
-		font-weight: bold;
-		font-size: 30rpx;
-		border-radius: 0;
-	}
-	.bottomBox{
-		position: fixed;
-		bottom: 0;
-		width: 100%;
-		left: 0;
-		height: 132rpx ;
-		background-color: #FFFFFF;
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		box-sizing: unset;
-		box-shadow: 0px -2px 6px 0px rgba(0,0,0,0.1000);
-		>view{
-			margin: 0 30rpx;
-		}
-		.sums {
-			display: flex;
-		}
-		.all_sum {
-			font-size: 28rpx;
-			font-weight: 500;
-			color: #303030;
-		}
-		.priceTag {
-			font-size: 32rpx;
-			font-weight: 800;
-			color: #FC3F3F;
-		}
-		.btn2{
-			width: 232rpx;
-			height: 92rpx;
-			background: #FC3F3F;
-			border-radius: 120rpx;
-			text-align: center;
-			line-height: 92rpx;
-			color: #fff;
-		}
-	}
+.txt_left_pay {
+  display: flex;
+  align-items: center;
+  height: 64rpx;
+  font-size: 24rpx;
+  color: #666666;
+}
+.pay_icon {
+  width: 64rpx;
+  height: 64rpx;
+  margin-right: 10rpx;
+}
+.box3 {
+  width: 100%;
+  height: 886rpx;
+  background: #ffffff;
+  // border-radius: 16rpx;
+  margin-top: 16rpx;
+  padding: 32rpx 32rpx 0rpx 32rpx;
+}
+.tip {
+  font-size: 24rpx;
+  color: #999999;
+  height: 40rpx;
+  line-height: 40rpx;
+}
+.txt_right_sn {
+  font-size: 30rpx;
+  font-weight: bold;
+  color: #666666;
+}
+.txt_right_price {
+  font-size: 32rpx;
+  font-weight: bold;
+  color: #ff2d55;
+}
+.txt_left {
+  font-size: 28rpx;
+  color: #666666;
+}
+.txt_right {
+  text-align: right;
+  color: #333333;
+  font-weight: bold;
+  width: 75%;
+}
+.list_title {
+  display: flex;
+  justify-content: space-between;
+}
+.list_item {
+  display: flex;
+  justify-content: space-between;
+  height: 110rpx;
+  align-items: center;
+}
+.title2 {
+  font-size: 32rpx;
+  font-weight: bold;
+  color: #333333;
+  // height: 80rpx;
+  // line-height: 80rpx;
+  // margin-left: 30rpx;
+  margin-bottom: 32rpx;
+}
+.box2 {
+  width: 100%;
+  background: #ffffff;
+  // border-radius: 16rpx;
+  padding: 32rpx 32rpx 0rpx 32rpx;
+  .right_con {
+    width: 450rpx;
+  }
+  .priceTag {
+    font-size: 28rpx;
+    font-family: PingFang SC;
+    font-weight: bold;
+    color: #fc3f3f;
+    margin-top: 6rpx;
+    margin-bottom: 10rpx;
+  }
+  .info_right {
+    height: 110rpx;
+    line-height: 110rpx;
+    border-top: 1rpx solid #f2f2f2;
+  }
+}
+.box1_t2 {
+  font-size: 24rpx;
+  color: #999999;
+  text-align: center;
+}
+.box1_t1 {
+  font-size: 30rpx;
+  font-weight: bold;
+  color: #333333;
+  height: 70rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+.box1 {
+  width: 100%;
+  height: 120rpx;
+  background: #ffffff;
+  border-radius: 16rpx;
+}
+.bottomBtn {
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  height: 98rpx;
+  background: linear-gradient(0deg, #015eea, #00c0fa);
+  color: #ffffff;
+  text-align: center;
+  line-height: 98rpx;
+  font-weight: bold;
+  font-size: 30rpx;
+  border-radius: 0;
+}
+.bottomBox {
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  left: 0;
+  height: 132rpx;
+  background-color: #ffffff;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  box-sizing: unset;
+  box-shadow: 0px -2px 6px 0px rgba(0, 0, 0, 0.1);
+  > view {
+    margin: 0 30rpx;
+  }
+  .sums {
+    display: flex;
+  }
+  .all_sum {
+    font-size: 28rpx;
+    font-weight: 500;
+    color: #303030;
+  }
+  .priceTag {
+    font-size: 32rpx;
+    font-weight: 800;
+    color: #fc3f3f;
+  }
+  .btn2 {
+    width: 232rpx;
+    height: 92rpx;
+    background: #fc3f3f;
+    border-radius: 120rpx;
+    text-align: center;
+    line-height: 92rpx;
+    color: #fff;
+  }
+}
 </style>

+ 1229 - 985
pages2/wd/class.vue

@@ -1,107 +1,198 @@
 <template>
-	<view style=" padding:0 30rpx 30rpx;">
-		<nav-bar title="我的网课"></nav-bar>
-		<view class="class" v-for="(item, index) in goodsList" :key="index">
-
-			<view class="class_item" @click.stop="studyIn(item.goodsId,item.gradeId,item,index)">
-				<image :src="$method.splitImgHost(item.coverUrl, true)" class="class_img"></image>
-				<view class="class_text">
-					<view class="class_title">{{ item.goodsName }}</view>
-					<view class="content_box">
-						<image src="/static/icon/wk_icon1.png" class="wk_icon"></image>
-						共
-						<text class="content">{{ item.courseNum }}</text>
-						课程
-						<text class="content">{{ item.secAllNum+item.examNum }}</text>
-						节
-						<text class="content">{{ item.classHours || '-'}}</text>
-						学时
-					</view>
-					<view class="content_box" v-if="item.serviceStartTime && item.serviceEndTime">
-						<image src="/static/icon/wk_icon2.png" class="wk_icon"></image>
-						学习服务期:
-						<text class="content">{{ $method.timestampToTime(item.serviceStartTime,true,true) }} - {{ $method.timestampToTime(item.serviceEndTime,true,true) }}</text>
-					</view>
-				</view>
-
-				<!-- 不在学习服务期 -->
-				<template v-if="item.serviceStartTime && (sysTime < item.serviceStartTime || sysTime > item.serviceEndTime)">
-					<view class="class-warm" v-if="item.gradeId != 0 && item.gradeStatus == 1">
-						<view class="class-warm__text">
-							<view class="date">
-								不在学习服务期,不可以学习了哦
-							</view>
-						</view>
-					</view>
-				</template>
-
-				<template v-else>
-					<!-- 班级有效期过了 -->
-					<template v-if="item.classEndTime && (item.classEndTime < sysTime) ">
-						<view class="class-warm">
-							<u-icon class="class-warm__icon" size="30" color="#FF3B30" name="error-circle-fill">
-							</u-icon>
-							<view class="class-warm__text">
-								<view class="date">班级有效期:{{$method.timestampToTime(item.classStartTime,true,true)}} - {{$method.timestampToTime(item.classEndTime,true,true)}}</view>
-								<view class="state">班级状态:已过期,有疑问请联系 <text @click="call">020-87085982</text></view>
-							</view>
-						</view>
-					</template>
-
-					<!-- 班级有效期之前 -->
-					<template v-else-if="item.classStartTime && (item.classStartTime > sysTime) ">
-						<view class="class-warm">
-							<u-icon class="class-warm__icon" size="30" color="#FF3B30" name="error-circle-fill">
-							</u-icon>
-							<view class="class-warm__text">
-								<view class="date">班级有效期:{{$method.timestampToTime(item.classStartTime,true,true)}} -
-									{{$method.timestampToTime(item.classEndTime,true,true)}}</view>
-								<view class="state">班级状态:未到学习时间,有疑问请联系 <text @click="call">020-87085982</text></view>
-							</view>
-						</view>
-					</template>
-
-					<!-- 在班级有效期之间或者没有班级有效期 -->
-					<template v-else>
-
-						<view class="class-warm"
-							v-if="item.gradeId != 0 && item.gradeStatus == 1 && item.classStatus != null">
-							<view class="class-warm__text">
-								<view class="date">
-									班级状态:
-									<text v-if="item.classStatus == 1">已开班</text>
-									<text v-if="item.classStatus == 0">未开班</text>
-								</view>
-								<view class="state" v-if="item.classStatus == 0">教务处正在为您开通班级,请耐心等待</view>
-								<view class="state"
-									v-if="item.classStatus == 1 && item.classStartTime && item.classEndTime">
-									班级有效期:{{$method.timestampToTime(item.classStartTime,true,true)}}-{{$method.timestampToTime(item.classEndTime,true,true)}}
-								</view>
-							</view>
-						</view>
-						<!-- 学时审核状态不可审核 -->
-						<template v-if="item.periodStatus == -1 || item.periodStatus == 2">
-
-							<view class="class-warm" v-if="item.classStatus == 1 || item.classStatus === null">
-								<view class="class-warm__text">
-									<view class="date">
-										<template
-											v-if="sysTime >= item.serviceStartTime && sysTime <= item.serviceEndTime">
-											学习状态:
-											<text v-if="item.stuAllNum+item.recordNum == 0">未学习</text>
-											<text
-												v-else-if="item.stuAllNum+item.recordNum > 0 && item.stuAllNum+item.recordNum < item.secAllNum+item.examNum">学习中</text>
-											<text v-else-if="item.stuAllNum+item.recordNum >= item.secAllNum+item.examNum">已学完</text>
-										</template>
-										<template v-else>
-											<template v-if="item.serviceStartTime">已过学习服务期,不可以学习了哦!</template>
-											
-										</template>
-									</view>
-								</view>
-							</view>
-
-							<!-- <view class="class-warm" v-if="item.profileTpStatus == 1">
+  <view style="padding: 0 30rpx 30rpx">
+    <nav-bar title="我的网课"></nav-bar>
+    <view class="class" v-for="(item, index) in goodsList" :key="index">
+      <view
+        class="class_item"
+        @click.stop="studyIn(item.goodsId, item.gradeId, item, index)"
+      >
+        <image
+          :src="$method.splitImgHost(item.coverUrl, true)"
+          class="class_img"
+        ></image>
+        <view class="class_text">
+          <view class="class_title">{{ item.goodsName }}</view>
+          <view class="content_box">
+            <image src="/static/icon/wk_icon1.png" class="wk_icon"></image>
+            共
+            <text class="content">{{ item.courseNum }}</text>
+            课程
+            <text class="content">{{ item.secAllNum + item.examNum }}</text>
+            节
+            <text class="content">{{ item.classHours || "-" }}</text>
+            学时
+          </view>
+          <view
+            class="content_box"
+            v-if="item.serviceStartTime && item.serviceEndTime"
+          >
+            <image src="/static/icon/wk_icon2.png" class="wk_icon"></image>
+            学习服务期:
+            <text class="content"
+              >{{ $method.timestampToTime(item.serviceStartTime, true, true) }}
+              -
+              {{
+                $method.timestampToTime(item.serviceEndTime, true, true)
+              }}</text
+            >
+          </view>
+        </view>
+
+        <!-- 不在学习服务期 -->
+        <template
+          v-if="
+            item.serviceStartTime &&
+            (sysTime < item.serviceStartTime || sysTime > item.serviceEndTime)
+          "
+        >
+          <view
+            class="class-warm"
+            v-if="item.gradeId != 0 && item.gradeStatus == 1"
+          >
+            <view class="class-warm__text">
+              <view class="date"> 不在学习服务期,不可以学习了哦 </view>
+            </view>
+          </view>
+        </template>
+
+        <template v-else>
+          <!-- 班级有效期过了 -->
+          <template v-if="item.classEndTime && item.classEndTime < sysTime">
+            <view class="class-warm">
+              <u-icon
+                class="class-warm__icon"
+                size="30"
+                color="#FF3B30"
+                name="error-circle-fill"
+              >
+              </u-icon>
+              <view class="class-warm__text">
+                <view class="date"
+                  >班级有效期:{{
+                    $method.timestampToTime(item.classStartTime, true, true)
+                  }}
+                  -
+                  {{
+                    $method.timestampToTime(item.classEndTime, true, true)
+                  }}</view
+                >
+                <view class="state"
+                  >班级状态:已过期,有疑问请联系
+                  <text @click="call">020-87085982</text></view
+                >
+              </view>
+            </view>
+          </template>
+
+          <!-- 班级有效期之前 -->
+          <template
+            v-else-if="item.classStartTime && item.classStartTime > sysTime"
+          >
+            <view class="class-warm">
+              <u-icon
+                class="class-warm__icon"
+                size="30"
+                color="#FF3B30"
+                name="error-circle-fill"
+              >
+              </u-icon>
+              <view class="class-warm__text">
+                <view class="date"
+                  >班级有效期:{{
+                    $method.timestampToTime(item.classStartTime, true, true)
+                  }}
+                  -
+                  {{
+                    $method.timestampToTime(item.classEndTime, true, true)
+                  }}</view
+                >
+                <view class="state"
+                  >班级状态:未到学习时间,有疑问请联系
+                  <text @click="call">020-87085982</text></view
+                >
+              </view>
+            </view>
+          </template>
+
+          <!-- 在班级有效期之间或者没有班级有效期 -->
+          <template v-else>
+            <view
+              class="class-warm"
+              v-if="
+                item.gradeId != 0 &&
+                item.gradeStatus == 1 &&
+                item.classStatus != null
+              "
+            >
+              <view class="class-warm__text">
+                <view class="date">
+                  班级状态:
+                  <text v-if="item.classStatus == 1">已开班</text>
+                  <text v-if="item.classStatus == 0">未开班</text>
+                </view>
+                <view class="state" v-if="item.classStatus == 0"
+                  >教务处正在为您开通班级,请耐心等待</view
+                >
+                <view
+                  class="state"
+                  v-if="
+                    item.classStatus == 1 &&
+                    item.classStartTime &&
+                    item.classEndTime
+                  "
+                >
+                  班级有效期:{{
+                    $method.timestampToTime(item.classStartTime, true, true)
+                  }}-{{
+                    $method.timestampToTime(item.classEndTime, true, true)
+                  }}
+                </view>
+              </view>
+            </view>
+            <!-- 学时审核状态不可审核 -->
+            <template v-if="item.periodStatus == -1 || item.periodStatus == 2">
+              <view
+                class="class-warm"
+                v-if="item.classStatus == 1 || item.classStatus === null"
+              >
+                <view class="class-warm__text">
+                  <view class="date">
+                    <template
+                      v-if="
+                        sysTime >= item.serviceStartTime &&
+                        sysTime <= item.serviceEndTime
+                      "
+                    >
+                      学习状态:
+                      <text v-if="item.stuAllNum + item.recordNum == 0"
+                        >未学习</text
+                      >
+                      <text
+                        v-else-if="
+                          item.stuAllNum + item.recordNum > 0 &&
+                          item.stuAllNum + item.recordNum <
+                            item.secAllNum + item.examNum
+                        "
+                        >学习中</text
+                      >
+                      <text
+                        v-else-if="
+                          item.stuAllNum + item.recordNum >=
+                          item.secAllNum + item.examNum
+                        "
+                        >已学完</text
+                      >
+                    </template>
+                    <template v-else>
+                      <template v-if="item.serviceStartTime"
+                        >已过学习服务期,不可以学习了哦!</template
+                      >
+                    </template>
+                  </view>
+                </view>
+              </view>
+
+              <!-- <view class="class-warm" v-if="item.profileTpStatus == 1">
 								<view class="class-warm__text">
 									<view class="date">
 										资料审核状态:
@@ -112,893 +203,1046 @@
 									</view>
 								</view>
 							</view> -->
-						</template>
-
-						<!-- 学时审核状态可以审核 -->
-						<template v-if="item.periodStatus != -1">
-							<view class="class-warm">
-								<view class="class-warm__text">
-									<view class="date">
-										<text v-if="item.periodStatus == 0">机构审核:学时审核不通过</text>
-										<!-- <text v-else-if="item.periodStatus == 2">学时待审核</text> -->
-										<text v-else-if="item.periodStatus == 3">学时审核中</text>
-										<text v-else-if="item.periodStatus == 1">
-											<text v-if="item.periodPlush > 0">学时已上报注册中心</text>
-											<text v-else>机构审核:学时审核通过</text>
-
-										</text>
-									</view>
-								</view>
-							</view>
-
-							<view class="class-warm" v-if="item.subscribeId != null && item.periodStatus == 1">
-								<view class="class-warm__text">
-									<view class="date">
-										<view v-if="item.subExamStatus === null">待预约考试</view>
-										<view
-											v-else-if="item.subExamStatus === 0 &&  sysTime < $method.TimeTotimestamp(
-												$method.timestampToTime(item.subApplySiteExamTime, true) +
-													' ' +
-													item.subApplySiteStartTime
-											)">
-											待考试,考试时间:
-											{{
-												$method.timestampToTime(item.subApplySiteExamTime, true) +
-												" " +
-												item.subApplySiteStartTime
-											}}
-                    -
-                    {{
-											$method.timestampToTime(item.subApplySiteExamTime, true) +
-											" " +
-											item.subApplySiteEndTime
-										}}
-										</view>
-										<view v-else-if="item.subExamStatus === 0">待出考试结果</view>
-										<view v-else-if="item.subExamStatus === 1">
-											<text v-if="item.subResult === null">待出考试结果</text>
-											<text v-if="item.subResult === 0">考试结果:不通过,需补考</text>
-											<text
-												v-else-if="item.subResult === 1">考试结果:通过,考试成绩为{{item.subPerformance}}</text>
-										</view>
-										<view v-else-if="item.subExamStatus === 2">缺考,无成绩,需补考</view>
-										<view v-else-if="item.subExamStatus === 3">作弊,无成绩,需补考</view>
-										<view v-else-if="item.subExamStatus === 4">替考,无成绩,需补考</view>
-
-
-									</view>
-								</view>
-							</view>
-						</template>
-
-					</template>
-
-
-				</template>
-
-
-			</view>
-
-
-			<view class="bottomBox">
-				<template
-					v-if="item.gradeStatus == 1 && item.status == 1 && (item.serviceEndTime > sysTime) && (item.serviceStartTime < sysTime) &&  (item.classEndTime && (item.classEndTime < sysTime)) && (item.periodStatus == 0 || item.periodStatus == -1) && item.studyCount > 0">
-					<view class="restart" @click.stop="selectClass(item,index)">
-						选班重学
-					</view>
-				</template>
-
-				<template v-else>
-					<view class="content_box">
-						<image src="/static/icon/wk_icon3.png" class="wk_icon"></image>
-						学习进度:{{ item.stuAllNum+item.recordNum }}/{{ item.secAllNum+item.examNum }}
-					</view>
-					<view class="box_progress">
-						<view style="width: 60%;">
-							<u-line-progress :showText="false" height="22" active-color="#ff9900" :show-percent="false"
-								:percent="((item.stuAllNum+item.recordNum) / (item.secAllNum+item.examNum)) * 100"></u-line-progress>
-						</view>
-
-						<view>
-							<u-button
-								:class="{disabled:(item.serviceStartTime && (sysTime <= item.serviceStartTime || sysTime >= item.serviceEndTime)) || (item.classStartTime && sysTime <= item.classStartTime) || (item.classEndTime && sysTime >= item.classEndTime) || item.learningStatus == 2 || item.classStatus == 0 || (item.learningStatus == 3 && sysTime < item.learningTimeStart)}"
-								type="warning" size="mini" @click.stop="studyIn(item.goodsId,item.gradeId,item,index)">
-								进入学习</u-button>
-						</view>
-					</view>
-					<template v-for="(appoint,appointIndex) in item.examApplyGoodsList">
-						<view class="box_progress" :key="appointIndex" v-if="item.applyStatus === 1 && !( sysTime <= item.serviceStartTime || sysTime >= item.serviceEndTime || (item.classStartTime && sysTime <= item.classStartTime) || (item.classEndTime && sysTime >= item.classEndTime) || item.learningStatus == 2 || item.classStatus == 0 || (item.learningStatus == 3 && sysTime < item.learningTimeStart))">
-							<view style="flex:1;margin-right:10rpx;">
-								<text style="color: #333333;">{{ appoint.applyName }}</text>
-							</view>
-							<view>
-								<u-button :plain="true" type="primary" size="mini" @click.stop="appointment(item,appoint)">预约考试
-								</u-button>
-							</view>
-						</view>
-					</template>
-					<view class="box_progress" v-if="item.beforeStatus === 1 && !( sysTime <= item.serviceStartTime || sysTime >= item.serviceEndTime || (item.classStartTime && sysTime <= item.classStartTime) || (item.classEndTime && sysTime >= item.classEndTime) || item.learningStatus == 2 || item.classStatus == 0 || (item.learningStatus == 3 && sysTime < item.learningTimeStart))">
-						<view style="flex:1;margin-right:10rpx;">
-							<text style="color: #2979ff;">{{ item.beforeName }}</text>
-						</view>
-						<view>
-							<u-button type="primary" size="mini" @click="appBeforeAddress(item.goodsId,item)">进入刷题</u-button>
-						</view>
-					</view>
-				</template>
-
-
-			</view>
-		</view>
-
-		<view v-if="goodsList.length==0">
-			<u-empty text="暂无网课" margin-top="500" mode="list"></u-empty>
-
-		</view>
-		<u-popup v-model="selectClassModal" @close="gradeValue = -1" mode="bottom" border-radius="40">
-			<view class="popup_box">
-				<view style="margin-bottom: 20rpx;">
-					<view class="line1"></view>
-					<view class="grade">选择班级</view>
-				</view>
-				<u-line color="#D6D6DB" />
-				<view>
-					<scroll-view scroll-y="true" style="height: 500rpx;">
-						<view>
-							<u-radio-group v-model="gradeValue" @change="radioGroupChange">
-								<view v-for="(item, index) in gradeList" :key="index">
-									<view style="display: flex;align-items: center;padding: 20rpx;">
-										<view>
-											<u-radio shape="circle" :name="index"
-												:disabled="item.studentNum > 0 && item.studentNum == item.studentUpper">
-												<view :class="item.checked?'white-box blue-box':'white-box'">
-													<view>
-														<view class="blackTxt">{{item.className}}</view>
-														<view class="redTxt" v-if="item.classEndTime">
-															有效期至:{{$method.timestampToTime(item.classEndTime,true,true)}}
-														</view>
-														<view class="redTxt" v-if="item.classEndTime">
-															本班还剩{{$method.GetRTime(item.classEndTime)}}天将结束学习</view>
-													</view>
-												</view>
-											</u-radio>
-										</view>
-
-									</view>
-								</view>
-							</u-radio-group>
-						</view>
-					</scroll-view>
-				</view>
-				<view class="confrim-btn">
-					<view class="okBtn" @click="okPopup()">确定</view>
-				</view>
-			</view>
-		</u-popup>
-		<u-modal v-model="showMark" title="提示" @confirm="markConfirm" confirm-text="复制学习网址" :show-cancel-button="true"
-			cancel-text="关闭">
-			<view class="slot-content">
-				<view>您的学习账号已经开通,请按照步骤操作,进行学习。</view>
-				<view>1.复制学习地址:{{markContent}}</view>
-				<view>2.在【浏览器中】打开复制的学习网址</view>
-				<view>3.打开学习网址后,选择【个人用户】进行登录</view>
-				<view>(1)账号:您个人的身份证号码</view>
-				<view>(2)密码:身份证号码,再加111111</view>
-			</view>
-
-		</u-modal>
-		
-		<u-modal v-model="showUserConfirmInfo" @confirm="confirmUserConfirm"  ref="uModal" :async-close="true" @cancel="cancelUserConfirm" :confirm-text="'确认' + (confirmCount > 0 ? '('+confirmCount+')' : '')" :confirm-color="confirmCount > 0 ? '#999' : '#2979ff'" class="confirm-modal" title="实名验证确认" cancel="取消" :show-cancel-button="true">
-			<view class="slot-content">
-				<view class="content">
-					为避免个人信息不正确导致您的学习时长无效,请认真核对以下信息是否正确,如信息有误请取消当前操作,立刻联系020-38946666
-					
-					<view class="msg-list">
-						<view class="item">
-							<text class="item__left">姓名:</text>
-							<text class="item__right">{{userInfo.realname}}</text>
-						</view>
-						<view class="item">
-							<text class="item__left">手机号:</text>
-							<text class="item__right">{{userInfo.telphone}}</text>
-						</view>
-						<view class="item">
-							<text class="item__left">身份号:</text>
-							<text class="item__right">{{userInfo.idCard}}</text>
-						</view>
-						<view class="item">
-							<u-checkbox v-model="confirmChecked" :label-disabled="false">确认个人信息无误</u-checkbox>
-						</view>
-					</view>
-				</view>
-				
-			</view>
-		</u-modal>
-	</view>
+            </template>
+
+            <!-- 学时审核状态可以审核 -->
+            <template v-if="item.periodStatus != -1">
+              <view class="class-warm">
+                <view class="class-warm__text">
+                  <view class="date">
+                    <text v-if="item.periodStatus == 0"
+                      >机构审核:学时审核不通过</text
+                    >
+                    <!-- <text v-else-if="item.periodStatus == 2">学时待审核</text> -->
+                    <text v-else-if="item.periodStatus == 3">学时审核中</text>
+                    <text v-else-if="item.periodStatus == 1">
+                      <text v-if="item.periodPlush > 0"
+                        >学时已上报注册中心</text
+                      >
+                      <text v-else>机构审核:学时审核通过</text>
+                    </text>
+                  </view>
+                </view>
+              </view>
+
+              <view
+                class="class-warm"
+                v-if="item.subscribeId != null && item.periodStatus == 1"
+              >
+                <view class="class-warm__text">
+                  <view class="date">
+                    <view v-if="item.subExamStatus === null">待预约考试</view>
+                    <view
+                      v-else-if="
+                        item.subExamStatus === 0 &&
+                        sysTime <
+                          $method.TimeTotimestamp(
+                            $method.timestampToTime(
+                              item.subApplySiteExamTime,
+                              true
+                            ) +
+                              ' ' +
+                              item.subApplySiteStartTime
+                          )
+                      "
+                    >
+                      待考试,考试时间:
+                      {{
+                        $method.timestampToTime(
+                          item.subApplySiteExamTime,
+                          true
+                        ) +
+                        " " +
+                        item.subApplySiteStartTime
+                      }}
+                      -
+                      {{
+                        $method.timestampToTime(
+                          item.subApplySiteExamTime,
+                          true
+                        ) +
+                        " " +
+                        item.subApplySiteEndTime
+                      }}
+                    </view>
+                    <view v-else-if="item.subExamStatus === 0"
+                      >待出考试结果</view
+                    >
+                    <view v-else-if="item.subExamStatus === 1">
+                      <text v-if="item.subResult === null">待出考试结果</text>
+                      <text v-if="item.subResult === 0"
+                        >考试结果:不通过,需补考</text
+                      >
+                      <text v-else-if="item.subResult === 1"
+                        >考试结果:通过,考试成绩为{{
+                          item.subPerformance
+                        }}</text
+                      >
+                    </view>
+                    <view v-else-if="item.subExamStatus === 2"
+                      >缺考,无成绩,需补考</view
+                    >
+                    <view v-else-if="item.subExamStatus === 3"
+                      >作弊,无成绩,需补考</view
+                    >
+                    <view v-else-if="item.subExamStatus === 4"
+                      >替考,无成绩,需补考</view
+                    >
+                  </view>
+                </view>
+              </view>
+            </template>
+          </template>
+        </template>
+      </view>
+
+      <view class="bottomBox">
+        <template
+          v-if="
+            item.gradeStatus == 1 &&
+            item.status == 1 &&
+            item.serviceEndTime > sysTime &&
+            item.serviceStartTime < sysTime &&
+            item.classEndTime &&
+            item.classEndTime < sysTime &&
+            (item.periodStatus == 0 || item.periodStatus == -1) &&
+            item.studyCount > 0
+          "
+        >
+          <view class="restart" @click.stop="selectClass(item, index)">
+            选班重学
+          </view>
+        </template>
+
+        <template v-else>
+          <view class="content_box">
+            <image src="/static/icon/wk_icon3.png" class="wk_icon"></image>
+            学习进度:{{ item.stuAllNum + item.recordNum }}/{{
+              item.secAllNum + item.examNum
+            }}
+          </view>
+          <view class="box_progress">
+            <view style="width: 60%">
+              <u-line-progress
+                :showText="false"
+                height="22"
+                active-color="#ff9900"
+                :show-percent="false"
+                :percent="
+                  ((item.stuAllNum + item.recordNum) /
+                    (item.secAllNum + item.examNum)) *
+                  100
+                "
+              ></u-line-progress>
+            </view>
+
+            <view>
+              <u-button
+                :class="{
+                  disabled:
+                    (item.serviceStartTime &&
+                      (sysTime <= item.serviceStartTime ||
+                        sysTime >= item.serviceEndTime)) ||
+                    (item.classStartTime && sysTime <= item.classStartTime) ||
+                    (item.classEndTime && sysTime >= item.classEndTime) ||
+                    item.learningStatus == 2 ||
+                    item.classStatus == 0 ||
+                    (item.learningStatus == 3 &&
+                      sysTime < item.learningTimeStart),
+                }"
+                type="warning"
+                size="mini"
+                @click.stop="studyIn(item.goodsId, item.gradeId, item, index)"
+              >
+                进入学习</u-button
+              >
+            </view>
+          </view>
+          <template v-for="(appoint, appointIndex) in item.examApplyGoodsList">
+            <view
+              class="box_progress"
+              :key="appointIndex"
+              v-if="
+                item.applyStatus === 1 &&
+                !(
+                  sysTime <= item.serviceStartTime ||
+                  sysTime >= item.serviceEndTime ||
+                  (item.classStartTime && sysTime <= item.classStartTime) ||
+                  (item.classEndTime && sysTime >= item.classEndTime) ||
+                  item.learningStatus == 2 ||
+                  item.classStatus == 0 ||
+                  (item.learningStatus == 3 && sysTime < item.learningTimeStart)
+                )
+              "
+            >
+              <view style="flex: 1; margin-right: 10rpx">
+                <text style="color: #333333">{{ appoint.applyName }}</text>
+              </view>
+              <view>
+                <u-button
+                  :plain="true"
+                  type="primary"
+                  size="mini"
+                  @click.stop="appointment(item, appoint)"
+                  >预约考试
+                </u-button>
+              </view>
+            </view>
+          </template>
+          <view
+            class="box_progress"
+            v-if="
+              item.beforeStatus === 1 &&
+              !(
+                sysTime <= item.serviceStartTime ||
+                sysTime >= item.serviceEndTime ||
+                (item.classStartTime && sysTime <= item.classStartTime) ||
+                (item.classEndTime && sysTime >= item.classEndTime) ||
+                item.learningStatus == 2 ||
+                item.classStatus == 0 ||
+                (item.learningStatus == 3 && sysTime < item.learningTimeStart)
+              )
+            "
+          >
+            <view style="flex: 1; margin-right: 10rpx">
+              <text style="color: #2979ff">{{ item.beforeName }}</text>
+            </view>
+            <view>
+              <u-button
+                type="primary"
+                size="mini"
+                @click="appBeforeAddress(item.goodsId, item)"
+                >进入刷题</u-button
+              >
+            </view>
+          </view>
+        </template>
+      </view>
+    </view>
+
+    <view v-if="goodsList.length == 0">
+      <u-empty text="暂无网课" margin-top="500" mode="list"></u-empty>
+    </view>
+    <u-popup
+      v-model="selectClassModal"
+      @close="gradeValue = -1"
+      mode="bottom"
+      border-radius="40"
+    >
+      <view class="popup_box">
+        <view style="margin-bottom: 20rpx">
+          <view class="line1"></view>
+          <view class="grade">选择班级1</view>
+        </view>
+        <u-line color="#D6D6DB" />
+        <view>
+          <scroll-view scroll-y="true" style="height: 500rpx">
+            <view>
+              <u-radio-group v-model="gradeValue" @change="radioGroupChange">
+                <view v-for="(item, index) in gradeList" :key="index">
+                  <view
+                    style="display: flex; align-items: center; padding: 20rpx"
+                  >
+                    <view>
+                      <u-radio
+                        shape="circle"
+                        :name="index"
+                        :disabled="
+                          item.studentNum > 0 &&
+                          item.studentNum == item.studentUpper
+                        "
+                      >
+                        <view
+                          :class="
+                            item.checked ? 'white-box blue-box' : 'white-box'
+                          "
+                        >
+                          <view>
+                            <view class="blackTxt">{{ item.className }}</view>
+                            <Class-time-tip :classInfo="item"></Class-time-tip>
+                          </view>
+                        </view>
+                      </u-radio>
+                    </view>
+                  </view>
+                </view>
+              </u-radio-group>
+            </view>
+          </scroll-view>
+        </view>
+        <view class="confrim-btn">
+          <view class="okBtn" @click="okPopup()">确定</view>
+        </view>
+      </view>
+    </u-popup>
+    <u-modal
+      v-model="showMark"
+      title="提示"
+      @confirm="markConfirm"
+      confirm-text="复制学习网址"
+      :show-cancel-button="true"
+      cancel-text="关闭"
+    >
+      <view class="slot-content">
+        <view>您的学习账号已经开通,请按照步骤操作,进行学习。</view>
+        <view>1.复制学习地址:{{ markContent }}</view>
+        <view>2.在【浏览器中】打开复制的学习网址</view>
+        <view>3.打开学习网址后,选择【个人用户】进行登录</view>
+        <view>(1)账号:您个人的身份证号码</view>
+        <view>(2)密码:身份证号码,再加111111</view>
+      </view>
+    </u-modal>
+
+    <u-modal
+      v-model="showUserConfirmInfo"
+      @confirm="confirmUserConfirm"
+      ref="uModal"
+      :async-close="true"
+      @cancel="cancelUserConfirm"
+      :confirm-text="
+        '确认' + (confirmCount > 0 ? '(' + confirmCount + ')' : '')
+      "
+      :confirm-color="confirmCount > 0 ? '#999' : '#2979ff'"
+      class="confirm-modal"
+      title="实名验证确认"
+      cancel="取消"
+      :show-cancel-button="true"
+    >
+      <view class="slot-content">
+        <view class="content">
+          为避免个人信息不正确导致您的学习时长无效,请认真核对以下信息是否正确,如信息有误请取消当前操作,立刻联系020-38946666
+
+          <view class="msg-list">
+            <view class="item">
+              <text class="item__left">姓名:</text>
+              <text class="item__right">{{ userInfo.realname }}</text>
+            </view>
+            <view class="item">
+              <text class="item__left">手机号:</text>
+              <text class="item__right">{{ userInfo.telphone }}</text>
+            </view>
+            <view class="item">
+              <text class="item__left">身份号:</text>
+              <text class="item__right">{{ userInfo.idCard }}</text>
+            </view>
+            <view class="item">
+              <u-checkbox v-model="confirmChecked" :label-disabled="false"
+                >确认个人信息无误</u-checkbox
+              >
+            </view>
+          </view>
+        </view>
+      </view>
+    </u-modal>
+  </view>
 </template>
 
 <script>
-	import {mapGetters,mapActions} from 'vuex'
-	export default {
-		computed:{
-			...mapGetters(['userInfo'])
-		},
-		data() { 
-			return {
-				activeItem:{},
-				confirmTimer:null,
-				confirmCount:10,
-				confirmChecked:false,
-				showUserConfirmInfo:false,
-				showMark: false,
-				list: [1, 2, 3],
-				goodsList: [],
-				selectClassModal: false,
-				gradeList: [],
-				gradeValue: -1,
-				param: {
-					pageNum: 1,
-					pageSize: 10
-				},
-				total: 0,
-				sysTime: 0,
-				itemIndex: '',
-				selectItem: {}
-			};
-		},
-		onLoad(option) {
-			// this.sysTime = +this.$method.timest();
-			this.courseGoodsList();
-		},
-		async onShow() {
-			this.getUserInfo()
-			if (this.itemIndex !== '') {
-				this.refreshByIndex();
-			}
-			await this.commonSystemTime()
-			this.sysTime = +this.$method.timest();
-		},
-		onReachBottom() {
-			if (this.goodsList.length < this.total) {
-				this.param.pageNum++;
-				this.courseGoodsList();
-			}
-		},
-		methods: {
-			...mapActions(['getUserInfo']),
-			/**
-			 * 复制网址
-			 */
-			markConfirm() {
-				uni.setClipboardData({
-			 	data: this.markContent,
-			  success: function() {
-						console.log('success');
-					}
-				});
-			},
-			/**
-			 * 返回刷新之前进入的课程数据
-			 */
-			refreshByIndex() {
-				let self = this;
-				this.$api.courseGoodsList({
-					pageNum: this.itemIndex + 1,
-					pageSize: 1
-				}).then(res => {
-					if (res.data.code == 200) {
-						this.$set(this.goodsList, this.itemIndex, res.data.rows[0])
-					}
-				});
-			},
-			commonSystemTime() {
-				return new Promise(resolve => {
-					this.$api.commonSystemTime().then(res => {
-						this.sysTime = res.data.data;
-					})
-				})
-			},
-			selectClass(item, index) {
-				console.log(item)
-				this.itemIndex = index;
-				this.selectItem = item;
-				this.selectClassModal = true;
-				this.goodsGradeList(item.goodsId);
-			},
-			radioGroupChange(e) {
-				console.log(e)
-			},
-			userConfirmInfoDetail(){
-				return new Promise(resolve => {
-					this.$api.userConfirmInfoDetail({
-						orderGoodsId:this.activeItem.orderGoodsId,
-					}).then(res => {
-						if(!res.data.data) {
-							clearInterval(this.confirmTimer);
-							this.confirmCount = 10;
-							this.showUserConfirmInfo = true;
-							 this.confirmTimer = setInterval(() => {
-								if(this.confirmCount > 0) {
-									this.confirmCount-- 
-								} else {
-									
-									clearInterval(this.confirmTimer);
-								}
-								
-							},1000)
-						} else {
-							
-							if(res.data.data.pushInfo) {
-								resolve(true)
-							} else {
-								uni.showModal({
-									showCancel:false,
-									title:'提示',
-									content:'开通信息推送不成功,无法进入学习,请联系020-87085982!'
-								})
-								resolve(false)
-							}
-							
-						}
-					})
-				})
-			},
-			confirmUserConfirm() {
-				this.$refs.uModal.clearLoading();
-				if(this.confirmCount <= 0) {
-					if(this.confirmChecked) {
-						let infoJson = {
-							realname:this.userInfo.realname,
-							idCard:this.userInfo.idCard,
-							telphone:this.userInfo.telphone
-						}
-						this.$api.userConfirminfo({
-							orderGoodsId:this.activeItem.orderGoodsId,
-							infoJson:JSON.stringify(infoJson)
-						}).then(res => {
-							if(res.data.data.pushInfo) {
-								uni.showToast({
-									icon:'none',
-									title:'提交成功'
-								})
-							} else {
-								uni.showModal({
-									showCancel:false,
-									title:'提示',
-									content:'开通信息推送不成功,无法进入学习,请联系020-87085982!'
-								})
-							}
-							this.showUserConfirmInfo = false;
-						})
-					} else {
-						uni.showToast({
-							icon:'none',
-							title:'请勾选确认个人信息无误'
-						})
-					}
-				} else {
-					return;
-				}
-			},
-			
-			
-			cancelUserConfirm() {
-				clearInterval(this.confirmTimer)
-			},
-			goodsGradeList(id) {
-				let self = this
-				this.$api.goodsGradeList({
-					goodsId: id
-				}).then(res => {
-					if (res.data.code == 200) {
-						self.gradeList = res.data.rows
-						if (self.gradeList.length == 0) {
-							let item = {
-								className: '系统分班',
-								gradeId: 0
-							}
-							self.gradeList.push(item)
-						} else {
-							let isGradeFull = self.gradeList.every(item => (item.studentNum > 0 && item
-								.studentNum == item.studentUpper))
-							//所有班级都满了
-							if (isGradeFull) {
-								let item = {
-									className: '系统分班',
-									gradeId: 0
-								}
-								self.gradeList.unshift(item)
-							}
-						}
-					}
-				});
-			},
-			appBeforeAddress(goodsId,item) {
-				this.$api.appBeforeAddress({
-					// goodsId,
-					orderGoodsId:item.orderGoodsId
-				}).then(res => {
-					if (res.data.code == 200) {
-						uni.navigateToMiniProgram({
-							appId: res.data.data.url,
-							success(res) {
-								// 打开成功
-					 	}
-						})
-					} else {
-						uni.showModal({
-							title:'提示',
-							content:res.data.msg,
-							showCancel:false,
-						})
-					}
-				})
-			},
-			courseGoodsList() {
-				let self = this;
-				// /course/goodsList 查询用户拥有的商品
-				this.$api.courseGoodsList(this.param).then(res => {
-					if (res.data.code == 200) {
-						self.goodsList.push.apply(self.goodsList, res.data.rows);
-						self.total = res.data.total;
-					}
-				});
-			},
-			async studyIn(v, i, item, index) {
-
-				
-				this.activeItem = item;
-				if (item.interfaceAccountId > 0) { //学习账号已开通
-
-					if (item.learnStatus == 1) { //跳转第三方h5
-						// this.showMark = true;
-						uni.navigateTo({
-							url: `/pages3/polyv/detail?goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}&isOther=1`
-						})
-						return;
-						// uni.navigateTo({
-						// 	url:'/pages/webview/index?url='+item.officialLearningUrl
-						// })
-						// return;
-					} else {
-						uni.showModal({
-							showCancel: false,
-							content: '您的学习账号未开通,请稍后再尝试,有疑问,请联系020-87085982!'
-						});
-						return;
-					}
-
-
-					return;
-				}
-				
-				if (item.serviceStartTime && (this.sysTime <= item.serviceStartTime || this.sysTime >= item.serviceEndTime)) {
-					uni.showToast({
-						icon: 'none',
-						title: '不在学习服务期,不能进入学习'
-					})
-					return;
-				}
-
-				if ((item.classStartTime && this.sysTime <= item.classStartTime) || (item.classEndTime && this
-						.sysTime >= item.classEndTime)) {
-					uni.showToast({
-						icon: 'none',
-						title: '不在班级有效期,不能进入学习'
-					})
-					return
-				}
-
-				if (item.learningStatus == 2) {
-					uni.showToast({
-						icon: 'none',
-						title: '开放学习时间待定,不能进入学习'
-					})
-					return
-				}
-
-				if (item.classStatus == 0) {
-					uni.showToast({
-						icon: 'none',
-						title: '尚未开班,不能进入学习'
-					})
-					return
-				}
-				console.log(this.sysTime, item.learningTimeStart)
-				console.log(this.sysTime < item.learningTimeStart)
-				if (item.learningStatus == 3 && (this.sysTime < item.learningTimeStart)) {
-					uni.showToast({
-						icon: 'none',
-						title: '不在开放学习时间,不能进入学习'
-					})
-					return;
-				}
-				
-				var confirmDetail = true;
-				if (item.educationName == '继续教育') { 
-					if(item.officialName && item.businessName == '二级' && item.projectName == '建造师') { 
-						confirmDetail = await this.userConfirmInfoDetail()
-					}
-				}
-				
-				if(!confirmDetail) {
-					return;
-				}
-				
-				// //内部系统
-				// if (item.interfacePushId > 0 && item.officialStatus != 1) {
-				// 	uni.showModal({
-				// 		showCancel: false,
-				// 		content: '机构正在为您报名中,请耐心等待,有疑问请联系020-87085982!'
-				// 	});
-				// 	return;
-				// }
-
-
-				this.itemIndex = index;
-
-				if (item.gradeStatus == 1 && item.status == 1 && (item.serviceEndTime > this.sysTime) && (item
-						.classEndTime && (item.classEndTime < this.sysTime)) && (item.periodStatus == 0 || item
-						.periodStatus == -1) && item.studyCount > 0) {
-					this.selectClass(item, index);
-					return;
-				}
-
-
-				let rebuildStatus = await this.courseGoodsRebuildStatus(item.goodsId, item.gradeId)
-
-				if (rebuildStatus == 0) {
-					this.$navTo.togo('/pages2/learn/details', {
-						gradeId: item.gradeId,
-						goodsId: item.goodsId,
-						orderGoodsId: item.orderGoodsId,
-					});
-					return;
-				}
-
-				// if (item.educationName == '继续教育') {
-					this.$api.lockLockStatus({
-						action: 'jxjy',
-						uuid:this.$method.getUuid()
-					}).then(res => {
-						if (res.data.code == 200) { //有其他端在操作,不能学习
-							uni.showToast({
-								icon: 'none',
-						  title: res.data.msg,
-								mask: true,
-								duration: 3000
-							})
-						} else if (res.data.code == 500) { //可以学习
-
-							if (item.courseNum == 1) {
-								
-								this.$api.courseCourseList({
-									pageNum: 1,
-									pageSize: 1,
-									goodsId: item.goodsId,
-									gradeId: item.gradeId,
-									orderGoodsId: item.orderGoodsId,
-								}).then(res => {
-									if (res.data.code == 200) {
-										// if(item.officialName && item.businessName == '二级' && item.projectName == '建造师') {
-										// 	this.userConfirmInfoDetail().then(() => {
-										// 			uni.navigateTo({
-										// 					url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}`
-										// 				})
-										// 	})
-										// } else {
-											uni.navigateTo({
-													url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}`
-												})
-										// }
-									
-					  			
-									}
-								});
-								return;
-							}
-							
-							// if(item.officialName && item.businessName == '二级' && item.projectName == '建造师') {
-							// 	// this.userConfirmInfoDetail().then(() => {
-							// 			this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
-							// 	// })
-							// } else {
-								this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
-							// }
-							
-						}
-					})
-				// } else {
-				// 	if (item.courseNum == 1) {
-
-				// 		this.$api.courseCourseList({
-				// 			pageNum: 1,
-				// 			pageSize: 1,
-				// 			goodsId: item.goodsId,
-				// 			gradeId: item.gradeId,
-				// 			orderGoodsId: item.orderGoodsId,
-				// 		}).then(res => {
-				// 			if (res.data.code == 200) {
-				// 				uni.navigateTo({
-				// 						url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}`
-				// 					})
-								
-				// 			}
-				// 		});
-				// 		return;
-				// 	}
-				// 	this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
-					
-				// }
-
-
-			},
-			/**
-			 * @param {Object} goodsId 商品id
-			 * 查询商品重修状态
-			 */
-			courseGoodsRebuildStatus(goodsId, gradeId) {
-				return new Promise(resolve => {
-					this.$api.courseGoodsRebuildStatus({
-						goodsId: goodsId,
-						gradeId: gradeId
-					}).then(res => {
-						resolve(res.data.data)
-					})
-				})
-			},
-			appointment(item,appoint) {
-				var data = {
-					goodsId: item.goodsId,
-					gradeId: item.gradeId,
-					applyId:appoint.applyId,
-					orderGoodsId:item.orderGoodsId
-				};
-				this.$api.getApplysubscribe(data).then(res => {
-					if (res.data.code === 500) {
-						uni.showModal({
-							showCancel: false,
-							content: res.data.msg
-						});
-					}
-					if (res.data.code === 200) {
-						this.$navTo.togo('/pages2/appointment/index', {
-							goodsId: item.goodsId,
-							gradeId: item.gradeId,
-							orderGoodsId: item.orderGoodsId,
-							applyId:appoint.applyId
-						});
-					}
-				});
-			},
-			okPopup() {
-				if (this.gradeValue == -1) {
-					uni.showToast({
-						icon: 'none',
-						title: '请选择班级'
-					})
-					return;
-				}
-				this.$api.changeGrade({
-					goodsId: this.selectItem.goodsId,
-					gradeId: this.gradeValue,
-					oldGradeId: this.selectItem.gradeId,
-					orderGoodsId: this.selectItem.orderGoodsId,
-					userId: this.selectItem.userId
-				}).then(res => {
-					if (res.data.code == 200) {
-						if (this.itemIndex !== '') {
-							this.refreshByIndex();
-						}
-						this.selectClassModal = false;
-						uni.showToast({
-							title: '选班成功'
-						})
-					} else {
-						uni.showToast({
-							icon: 'none',
-							title: res.data.msg
-						})
-					}
-				})
-			},
-			call() {
-				uni.makePhoneCall({
-					phoneNumber: '020-87085982' //仅为示例
-				})
-			}
-		}
-	};
+import { mapGetters, mapActions } from "vuex";
+import ClassTimeTip from "../../components/common/ClassTimeTip.vue";
+export default {
+  computed: {
+    ...mapGetters(["userInfo"]),
+  },
+  data() {
+    return {
+      activeItem: {},
+      confirmTimer: null,
+      confirmCount: 10,
+      confirmChecked: false,
+      showUserConfirmInfo: false,
+      showMark: false,
+      list: [1, 2, 3],
+      goodsList: [],
+      selectClassModal: false,
+      gradeList: [],
+      gradeValue: -1,
+      param: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      total: 0,
+      sysTime: 0,
+      itemIndex: "",
+      selectItem: {},
+    };
+  },
+  onLoad(option) {
+    // this.sysTime = +this.$method.timest();
+    this.courseGoodsList();
+  },
+  async onShow() {
+    this.getUserInfo();
+    if (this.itemIndex !== "") {
+      this.refreshByIndex();
+    }
+    await this.commonSystemTime();
+    this.sysTime = +this.$method.timest();
+  },
+  onReachBottom() {
+    if (this.goodsList.length < this.total) {
+      this.param.pageNum++;
+      this.courseGoodsList();
+    }
+  },
+  methods: {
+    ...mapActions(["getUserInfo"]),
+    /**
+     * 复制网址
+     */
+    markConfirm() {
+      uni.setClipboardData({
+        data: this.markContent,
+        success: function () {
+          console.log("success");
+        },
+      });
+    },
+    /**
+     * 返回刷新之前进入的课程数据
+     */
+    refreshByIndex() {
+      let self = this;
+      this.$api
+        .courseGoodsList({
+          pageNum: this.itemIndex + 1,
+          pageSize: 1,
+        })
+        .then((res) => {
+          if (res.data.code == 200) {
+            this.$set(this.goodsList, this.itemIndex, res.data.rows[0]);
+          }
+        });
+    },
+    commonSystemTime() {
+      return new Promise((resolve) => {
+        this.$api.commonSystemTime().then((res) => {
+          this.sysTime = res.data.data;
+        });
+      });
+    },
+    selectClass(item, index) {
+      console.log(item);
+      this.itemIndex = index;
+      this.selectItem = item;
+      this.selectClassModal = true;
+      this.goodsGradeList(item.goodsId);
+    },
+    radioGroupChange(e) {
+      console.log(e);
+    },
+    userConfirmInfoDetail() {
+      return new Promise((resolve) => {
+        this.$api
+          .userConfirmInfoDetail({
+            orderGoodsId: this.activeItem.orderGoodsId,
+          })
+          .then((res) => {
+            if (!res.data.data) {
+              clearInterval(this.confirmTimer);
+              this.confirmCount = 10;
+              this.showUserConfirmInfo = true;
+              this.confirmTimer = setInterval(() => {
+                if (this.confirmCount > 0) {
+                  this.confirmCount--;
+                } else {
+                  clearInterval(this.confirmTimer);
+                }
+              }, 1000);
+            } else {
+              if (res.data.data.pushInfo) {
+                resolve(true);
+              } else {
+                uni.showModal({
+                  showCancel: false,
+                  title: "提示",
+                  content:
+                    "开通信息推送不成功,无法进入学习,请联系020-87085982!",
+                });
+                resolve(false);
+              }
+            }
+          });
+      });
+    },
+    confirmUserConfirm() {
+      this.$refs.uModal.clearLoading();
+      if (this.confirmCount <= 0) {
+        if (this.confirmChecked) {
+          let infoJson = {
+            realname: this.userInfo.realname,
+            idCard: this.userInfo.idCard,
+            telphone: this.userInfo.telphone,
+          };
+          this.$api
+            .userConfirminfo({
+              orderGoodsId: this.activeItem.orderGoodsId,
+              infoJson: JSON.stringify(infoJson),
+            })
+            .then((res) => {
+              if (res.data.data.pushInfo) {
+                uni.showToast({
+                  icon: "none",
+                  title: "提交成功",
+                });
+              } else {
+                uni.showModal({
+                  showCancel: false,
+                  title: "提示",
+                  content:
+                    "开通信息推送不成功,无法进入学习,请联系020-87085982!",
+                });
+              }
+              this.showUserConfirmInfo = false;
+            });
+        } else {
+          uni.showToast({
+            icon: "none",
+            title: "请勾选确认个人信息无误",
+          });
+        }
+      } else {
+        return;
+      }
+    },
+
+    cancelUserConfirm() {
+      clearInterval(this.confirmTimer);
+    },
+    goodsGradeList(id) {
+      let self = this;
+      this.$api
+        .goodsGradeList({
+          goodsId: id,
+        })
+        .then((res) => {
+          if (res.data.code == 200) {
+            self.gradeList = res.data.rows;
+            if (self.gradeList.length == 0) {
+              let item = {
+                className: "系统分班",
+                gradeId: 0,
+              };
+              self.gradeList.push(item);
+            } else {
+              let isGradeFull = self.gradeList.every(
+                (item) =>
+                  item.studentNum > 0 && item.studentNum == item.studentUpper
+              );
+              //所有班级都满了
+              if (isGradeFull) {
+                let item = {
+                  className: "系统分班",
+                  gradeId: 0,
+                };
+                self.gradeList.unshift(item);
+              }
+            }
+          }
+        });
+    },
+    appBeforeAddress(goodsId, item) {
+      this.$api
+        .appBeforeAddress({
+          // goodsId,
+          orderGoodsId: item.orderGoodsId,
+        })
+        .then((res) => {
+          if (res.data.code == 200) {
+            uni.navigateToMiniProgram({
+              appId: res.data.data.url,
+              success(res) {
+                // 打开成功
+              },
+            });
+          } else {
+            uni.showModal({
+              title: "提示",
+              content: res.data.msg,
+              showCancel: false,
+            });
+          }
+        });
+    },
+    courseGoodsList() {
+      let self = this;
+      // /course/goodsList 查询用户拥有的商品
+      this.$api.courseGoodsList(this.param).then((res) => {
+        if (res.data.code == 200) {
+          self.goodsList.push.apply(self.goodsList, res.data.rows);
+          self.total = res.data.total;
+        }
+      });
+    },
+    async studyIn(v, i, item, index) {
+      this.activeItem = item;
+      if (item.interfaceAccountId > 0) {
+        //学习账号已开通
+
+        if (item.learnStatus == 1) {
+          //跳转第三方h5
+          // this.showMark = true;
+          uni.navigateTo({
+            url: `/pages3/polyv/detail?goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}&isOther=1`,
+          });
+          return;
+          // uni.navigateTo({
+          // 	url:'/pages/webview/index?url='+item.officialLearningUrl
+          // })
+          // return;
+        } else {
+          uni.showModal({
+            showCancel: false,
+            content:
+              "您的学习账号未开通,请稍后再尝试,有疑问,请联系020-87085982!",
+          });
+          return;
+        }
+
+        return;
+      }
+
+      if (
+        item.serviceStartTime &&
+        (this.sysTime <= item.serviceStartTime ||
+          this.sysTime >= item.serviceEndTime)
+      ) {
+        uni.showToast({
+          icon: "none",
+          title: "不在学习服务期,不能进入学习",
+        });
+        return;
+      }
+
+      if (
+        (item.classStartTime && this.sysTime <= item.classStartTime) ||
+        (item.classEndTime && this.sysTime >= item.classEndTime)
+      ) {
+        uni.showToast({
+          icon: "none",
+          title: "不在班级有效期,不能进入学习",
+        });
+        return;
+      }
+
+      if (item.learningStatus == 2) {
+        uni.showToast({
+          icon: "none",
+          title: "开放学习时间待定,不能进入学习",
+        });
+        return;
+      }
+
+      if (item.classStatus == 0) {
+        uni.showToast({
+          icon: "none",
+          title: "尚未开班,不能进入学习",
+        });
+        return;
+      }
+      console.log(this.sysTime, item.learningTimeStart);
+      console.log(this.sysTime < item.learningTimeStart);
+      if (item.learningStatus == 3 && this.sysTime < item.learningTimeStart) {
+        uni.showToast({
+          icon: "none",
+          title: "不在开放学习时间,不能进入学习",
+        });
+        return;
+      }
+
+      var confirmDetail = true;
+      if (item.educationName == "继续教育") {
+        if (
+          item.officialName &&
+          item.businessName == "二级" &&
+          item.projectName == "建造师"
+        ) {
+          confirmDetail = await this.userConfirmInfoDetail();
+        }
+      }
+
+      if (!confirmDetail) {
+        return;
+      }
+
+      // //内部系统
+      // if (item.interfacePushId > 0 && item.officialStatus != 1) {
+      // 	uni.showModal({
+      // 		showCancel: false,
+      // 		content: '机构正在为您报名中,请耐心等待,有疑问请联系020-87085982!'
+      // 	});
+      // 	return;
+      // }
+
+      this.itemIndex = index;
+
+      if (
+        item.gradeStatus == 1 &&
+        item.status == 1 &&
+        item.serviceEndTime > this.sysTime &&
+        item.classEndTime &&
+        item.classEndTime < this.sysTime &&
+        (item.periodStatus == 0 || item.periodStatus == -1) &&
+        item.studyCount > 0
+      ) {
+        this.selectClass(item, index);
+        return;
+      }
+
+      let rebuildStatus = await this.courseGoodsRebuildStatus(
+        item.goodsId,
+        item.gradeId
+      );
+
+      if (rebuildStatus == 0) {
+        this.$navTo.togo("/pages2/learn/details", {
+          gradeId: item.gradeId,
+          goodsId: item.goodsId,
+          orderGoodsId: item.orderGoodsId,
+        });
+        return;
+      }
+
+      // if (item.educationName == '继续教育') {
+      this.$api
+        .lockLockStatus({
+          action: "jxjy",
+          uuid: this.$method.getUuid(),
+        })
+        .then((res) => {
+          if (res.data.code == 200) {
+            //有其他端在操作,不能学习
+            uni.showToast({
+              icon: "none",
+              title: res.data.msg,
+              mask: true,
+              duration: 3000,
+            });
+          } else if (res.data.code == 500) {
+            //可以学习
+
+            if (item.courseNum == 1) {
+              this.$api
+                .courseCourseList({
+                  pageNum: 1,
+                  pageSize: 1,
+                  goodsId: item.goodsId,
+                  gradeId: item.gradeId,
+                  orderGoodsId: item.orderGoodsId,
+                })
+                .then((res) => {
+                  if (res.data.code == 200) {
+                    // if(item.officialName && item.businessName == '二级' && item.projectName == '建造师') {
+                    // 	this.userConfirmInfoDetail().then(() => {
+                    // 			uni.navigateTo({
+                    // 					url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}`
+                    // 				})
+                    // 	})
+                    // } else {
+                    uni.navigateTo({
+                      url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}`,
+                    });
+                    // }
+                  }
+                });
+              return;
+            }
+
+            // if(item.officialName && item.businessName == '二级' && item.projectName == '建造师') {
+            // 	// this.userConfirmInfoDetail().then(() => {
+            // 			this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
+            // 	// })
+            // } else {
+            this.$navTo.togo(
+              `/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`
+            );
+            // }
+          }
+        });
+      // } else {
+      // 	if (item.courseNum == 1) {
+
+      // 		this.$api.courseCourseList({
+      // 			pageNum: 1,
+      // 			pageSize: 1,
+      // 			goodsId: item.goodsId,
+      // 			gradeId: item.gradeId,
+      // 			orderGoodsId: item.orderGoodsId,
+      // 		}).then(res => {
+      // 			if (res.data.code == 200) {
+      // 				uni.navigateTo({
+      // 						url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}`
+      // 					})
+
+      // 			}
+      // 		});
+      // 		return;
+      // 	}
+      // 	this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
+
+      // }
+    },
+    /**
+     * @param {Object} goodsId 商品id
+     * 查询商品重修状态
+     */
+    courseGoodsRebuildStatus(goodsId, gradeId) {
+      return new Promise((resolve) => {
+        this.$api
+          .courseGoodsRebuildStatus({
+            goodsId: goodsId,
+            gradeId: gradeId,
+          })
+          .then((res) => {
+            resolve(res.data.data);
+          });
+      });
+    },
+    appointment(item, appoint) {
+      var data = {
+        goodsId: item.goodsId,
+        gradeId: item.gradeId,
+        applyId: appoint.applyId,
+        orderGoodsId: item.orderGoodsId,
+      };
+      this.$api.getApplysubscribe(data).then((res) => {
+        if (res.data.code === 500) {
+          uni.showModal({
+            showCancel: false,
+            content: res.data.msg,
+          });
+        }
+        if (res.data.code === 200) {
+          this.$navTo.togo("/pages2/appointment/index", {
+            goodsId: item.goodsId,
+            gradeId: item.gradeId,
+            orderGoodsId: item.orderGoodsId,
+            applyId: appoint.applyId,
+          });
+        }
+      });
+    },
+    okPopup() {
+      if (this.gradeValue == -1) {
+        uni.showToast({
+          icon: "none",
+          title: "请选择班级",
+        });
+        return;
+      }
+      this.$api
+        .changeGrade({
+          goodsId: this.selectItem.goodsId,
+          gradeId: this.gradeValue,
+          oldGradeId: this.selectItem.gradeId,
+          orderGoodsId: this.selectItem.orderGoodsId,
+          userId: this.selectItem.userId,
+        })
+        .then((res) => {
+          if (res.data.code == 200) {
+            if (this.itemIndex !== "") {
+              this.refreshByIndex();
+            }
+            this.selectClassModal = false;
+            uni.showToast({
+              title: "选班成功",
+            });
+          } else {
+            uni.showToast({
+              icon: "none",
+              title: res.data.msg,
+            });
+          }
+        });
+    },
+    call() {
+      uni.makePhoneCall({
+        phoneNumber: "020-87085982", //仅为示例
+      });
+    },
+  },
+  components: { ClassTimeTip },
+};
 </script>
 <style>
-	page {
-		background: #eaeef1;
-	}
+page {
+  background: #eaeef1;
+}
 </style>
 <style scope lang="scss">
-	.box_progress {
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		margin-top: 20rpx;
-
-		.disabled {
-			opacity: 0.6;
-		}
-	}
-
-	.bottomBox {
-		background: #ffffff;
-		width: 94%;
-		border-bottom-left-radius: 24rpx;
-		border-bottom-right-radius: 24rpx;
-		margin: 0 auto;
-		padding: 20rpx;
-
-		.restart {
-			margin: 0 auto;
-			text-align: center;
-			line-height: 80rpx;
-			color: #fff;
-			font-size: 30rpx;
-			width: 440rpx;
-			height: 80rpx;
-			background: #FF0000;
-			border-radius: 40rpx 40rpx 40rpx 40rpx;
-		}
-	}
-
-	.content_box {
-		font-size: 24rpx;
-		display: flex;
-		align-items: center;
-		color: #999999;
-		margin-top: 8rpx;
-	}
-
-	.content {
-		color: #000000;
-		margin: 0 8rpx;
-	}
-
-	.wk_icon {
-		width: 24rpx;
-		height: 24rpx;
-		margin-right: 8rpx;
-	}
-
-	.class {
-		margin-bottom: 30rpx;
-
-		.class_item {
-			width: 100%;
-			background: #ffffff;
-			box-shadow: 0rpx 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
-			border-radius: 24rpx;
-			padding: 20rpx;
-			z-index: 999;
-			position: relative;
-
-			.class_img {
-				height: 367rpx;
-				width: 100%;
-				border-radius: 24rpx;
-			}
-
-			.class_text {
-				padding: 0 20rpx;
-
-				.class_title {
-					color: #333333;
-					font-weight: bold;
-					font-size: 32rpx;
-				}
-			}
-
-			.class-warm {
-				padding: 10rpx 20rpx;
-				display: flex;
-				align-items: flex-start;
-
-				&__icon {
-					margin-right: 10rpx;
-				}
-
-				&__text {
-
-					.date {
-						font-size: 24rpx;
-						font-weight: bold;
-						color: #FF3B30;
-					}
-
-					.state {
-						margin-top: 15rpx;
-						font-size: 24rpx;
-						font-weight: bold;
-						color: #FF3B30;
-					}
-				}
-			}
-		}
-	}
-
-
-
-
-	.popup_box {
-		height: 700rpx;
-		box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
-		border-radius: 32rpx 32rpx 0rpx 0rpx;
-
-		.line1 {
-			width: 80rpx;
-			height: 8rpx;
-			background: #999999;
-			border-radius: 4rpx;
-			margin: 0 auto;
-			margin-top: 15rpx;
-		}
-
-
-		.grade {
-			height: 23rpx;
-			font-size: 24rpx;
-			color: #999999;
-			margin: 0 auto;
-			margin-top: 15rpx;
-			text-align: center;
-		}
-
-		.confrim-btn {
-			height: 98rpx;
-			width: 100%;
-			display: flex;
-			align-items: center;
-			justify-content: center;
-
-			.okBtn {
-				width: 200rpx;
-				height: 64rpx;
-				background: linear-gradient(0deg, #015EEA, #00C0FA);
-				border-radius: 32rpx;
-				color: #FFFFFF;
-				text-align: center;
-				line-height: 64rpx;
-			}
-		}
-	}
-
-	.slot-content {
-		padding: 0 20rpx;
-	}
-	
-	.confirm-modal {
-			.slot-content {
-				padding:0 20rpx;
-				.content {
-					color:red;
-					
-					.msg-list {
-						.item {
-							padding:20rpx 0;
-							 
-							 &__left {
-								 color:#666;
-								 margin-right:20rpx;
-							 }
-							 
-							 &__right {
-								 color:#333;
-							 }
-							 
-							
-						}
-						
-					}
-				}
-	}
-	
-		
-	}
+.box_progress {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-top: 20rpx;
+
+  .disabled {
+    opacity: 0.6;
+  }
+}
+
+.bottomBox {
+  background: #ffffff;
+  width: 94%;
+  border-bottom-left-radius: 24rpx;
+  border-bottom-right-radius: 24rpx;
+  margin: 0 auto;
+  padding: 20rpx;
+
+  .restart {
+    margin: 0 auto;
+    text-align: center;
+    line-height: 80rpx;
+    color: #fff;
+    font-size: 30rpx;
+    width: 440rpx;
+    height: 80rpx;
+    background: #ff0000;
+    border-radius: 40rpx 40rpx 40rpx 40rpx;
+  }
+}
+
+.content_box {
+  font-size: 24rpx;
+  display: flex;
+  align-items: center;
+  color: #999999;
+  margin-top: 8rpx;
+}
+
+.content {
+  color: #000000;
+  margin: 0 8rpx;
+}
+
+.wk_icon {
+  width: 24rpx;
+  height: 24rpx;
+  margin-right: 8rpx;
+}
+
+.class {
+  margin-bottom: 30rpx;
+
+  .class_item {
+    width: 100%;
+    background: #ffffff;
+    box-shadow: 0rpx 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
+    border-radius: 24rpx;
+    padding: 20rpx;
+    z-index: 999;
+    position: relative;
+
+    .class_img {
+      height: 367rpx;
+      width: 100%;
+      border-radius: 24rpx;
+    }
+
+    .class_text {
+      padding: 0 20rpx;
+
+      .class_title {
+        color: #333333;
+        font-weight: bold;
+        font-size: 32rpx;
+      }
+    }
+
+    .class-warm {
+      padding: 10rpx 20rpx;
+      display: flex;
+      align-items: flex-start;
+
+      &__icon {
+        margin-right: 10rpx;
+      }
+
+      &__text {
+        .date {
+          font-size: 24rpx;
+          font-weight: bold;
+          color: #ff3b30;
+        }
+
+        .state {
+          margin-top: 15rpx;
+          font-size: 24rpx;
+          font-weight: bold;
+          color: #ff3b30;
+        }
+      }
+    }
+  }
+}
+
+.popup_box {
+  height: 700rpx;
+  box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
+  border-radius: 32rpx 32rpx 0rpx 0rpx;
+
+  .line1 {
+    width: 80rpx;
+    height: 8rpx;
+    background: #999999;
+    border-radius: 4rpx;
+    margin: 0 auto;
+    margin-top: 15rpx;
+  }
+
+  .grade {
+    height: 23rpx;
+    font-size: 24rpx;
+    color: #999999;
+    margin: 0 auto;
+    margin-top: 15rpx;
+    text-align: center;
+  }
+
+  .confrim-btn {
+    height: 98rpx;
+    width: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+
+    .okBtn {
+      width: 200rpx;
+      height: 64rpx;
+      background: linear-gradient(0deg, #015eea, #00c0fa);
+      border-radius: 32rpx;
+      color: #ffffff;
+      text-align: center;
+      line-height: 64rpx;
+    }
+  }
+}
+
+.slot-content {
+  padding: 0 20rpx;
+}
+
+.confirm-modal {
+  .slot-content {
+    padding: 0 20rpx;
+    .content {
+      color: red;
+
+      .msg-list {
+        .item {
+          padding: 20rpx 0;
+
+          &__left {
+            color: #666;
+            margin-right: 20rpx;
+          }
+
+          &__right {
+            color: #333;
+          }
+        }
+      }
+    }
+  }
+}
 </style>

文件差異過大導致無法顯示
+ 595 - 456
pages4/shopping/shoppingCart.vue


部分文件因文件數量過多而無法顯示