caichengyu 8 bulan lalu
induk
melakukan
ecd64ca935

+ 8 - 0
src/apis/order.js

@@ -269,5 +269,13 @@ export default {
 			params: data
 		})
 	},
+	//补考订单线下审核
+	subscribesaveoffline(data) {
+		return request({
+			url: '/user/subscribe/save/offline',
+			method: 'post',
+			data: data
+		})
+	},
 	
 }

+ 65 - 8
src/pages/home1/index.vue

@@ -4,8 +4,9 @@
       <div class="header__header">
         <div class="container">
           <div class="text-list" v-if="!userInfo">
-            <a @click="go('/login', { state: 1 })">登录</a>
-            <a @click="go('/login', { state: 2 })">注册</a>
+            <!-- <a @click="go('/login', { state: 1 })">登录</a>
+            <a @click="go('/login', { state: 2 })">注册</a> -->
+            <a style="border-left: unset;"  @click="$refs.login.openBox()">登录/注册</a>
           </div>
 
           <div class="icon-list" v-else>
@@ -35,6 +36,7 @@
                 <i style="font-size: 18px;cursor:pointer;" class="el-icon-close" @click="clearMsg"></i>
               </div>
             </el-tooltip> -->
+
             <el-dropdown @command="handleCommand">
               <span class="el-dropdown-link">
                 <i
@@ -94,7 +96,7 @@
 
     <section class="section">
       <div class="container">
-        <div class="tabs">
+        <div class="tabs" :style="showNav(nav).length>6?'width: 1100px':''">
           <template v-for="(item, index) in showNav(nav)">
             <a class="tab" @click="go(item.path)" :key="index">{{
               item.name
@@ -321,9 +323,15 @@
             </swiper>
           </div>
         </template>
-          <div class="right-box">
-            <div class="bg"></div>
-            <div class="no-login" v-if="!userInfo">
+          <div class="right-box login1">
+            <!-- <div class="bg"></div> -->
+            <template v-if="!userInfo">
+          <h2 class="title">账号登录注册</h2>
+          <p class="value">获取海量优质课程</p>
+          <img class="ggImg" src="@/assets/new1/zshktj.png" alt="" />
+          <div class="btn" @click="$refs.login.openBox()">登录/注册</div>
+        </template>
+            <!-- <div class="no-login" v-if="!userInfo">
               <template v-if="loginType == 1">
                 <el-form :model="loginForm" ref="loginForm" :rules="loginRules">
                   <div class="input">
@@ -441,7 +449,7 @@
                   </div>
                 </el-form>
               </template>
-            </div>
+            </div> -->
 
             <div class="has-login" v-else>
               <div class="userinfo">
@@ -732,7 +740,7 @@
     <ToolBar></ToolBar>
     <Footer></Footer>
     <wx-login ref="wxLogin" @wxLoginBack="wxLoginBack"></wx-login>
-
+    <login ref="login"></login>
     <RebuildModal
       ref="rebuildModal"
       @rebuildSubmit="rebuildSubmit($event)"
@@ -751,6 +759,7 @@
 </template>
 
 <script>
+import login from "@/components/login";
 import RebuildModal from "@/components/rebuildModal";
 import wxLogin from "@/components/wxLogin/index";
 import Footer from "@/components/footer/index";
@@ -763,6 +772,7 @@ import "swiper/swiper-bundle.css";
 export default {
   name: "Home",
   components: {
+    login,
     swiper,
     swiperSlide,
     Footer,
@@ -2710,4 +2720,51 @@ export default {
     display: flex;
   }
 }
+.login1 {
+      margin-left: 20px;
+      border-radius: 4px;
+      overflow: hidden;
+      background-color: rgba(0, 0, 0, 0.5);
+      backdrop-filter: blur(10px);
+      width: 300px;
+      height: 100%;
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      .title {
+        font-size: 18px;
+        font-weight: bold;
+        color: #fff;
+        margin-top: 50px;
+        margin-bottom: 20px;
+      }
+      .value {
+        font-size: 14px;
+        color: #fff;
+        margin-bottom: 20px;
+      }
+      .ggImg {
+        border-radius: 14px;
+        overflow: hidden;
+        margin-bottom: 20px;
+        width: 211px;
+        height: 120px;
+        background-color: #fff;
+      }
+      .btn {
+        user-select: none;
+        cursor: pointer;
+        width: 211px;
+        border-radius: 100px;
+        color: #fff;
+        background-color: rgb(0, 122, 255);
+        text-align: center;
+        height: 30px;
+        line-height: 30px;
+        transition: all 0.2s;
+        &:hover {
+          background-color: rgb(2, 106, 244);
+        }
+      }
+    }
 </style>

+ 55 - 30
src/pages/person-center/my-course/components/dialogForm.vue

@@ -45,7 +45,7 @@
               :label="item.name"
               v-if="
                 listData.applyStatus &&
-                  listData.applyStatus.indexOf(item.name) !== -1
+                listData.applyStatus.indexOf(item.name) !== -1
               "
               >{{ item.label }}</el-radio
             >
@@ -54,14 +54,14 @@
         <div class="invoice-content__footer">
           <div class="btns">
             <el-button
-              style="width:120px"
+              style="width: 120px"
               round
               size="small"
               @click="isShow = false"
               >取消</el-button
             >
             <el-button
-              style="width:120px"
+              style="width: 120px"
               round
               size="small"
               @click="submit"
@@ -81,29 +81,29 @@ export default {
   props: {
     dialogVisible: {
       type: Boolean,
-      default: false
+      default: false,
     },
     info: {
       type: Object,
       default: () => {
         return {};
-      }
+      },
     },
     listData: {
       type: Object,
       default: () => {
         return {};
-      }
-    }
+      },
+    },
   },
   data() {
     return {
       loading: false,
       radiolist: [
         { name: "1", label: "非补考学员" },
-        { name: "2", label: "补考学员" }
+        { name: "2", label: "补考学员" },
       ],
-      radio: ""
+      radio: "",
     };
   },
 
@@ -115,24 +115,26 @@ export default {
       this.radio = "";
     },
     submit() {
+      // this.closedialog();
       if (!this.radio) {
         this.$message({
           type: "warning",
-          message: "请选择您的考试身份"
+          message: "请选择您的考试身份",
         });
         return;
       }
+      var that = this;
       let data = JSON.parse(JSON.stringify(this.info));
       data.applyStatus = this.radio;
       this.loading = true;
       this.$request
         .getApplysubscribeNext(data)
-        .then(res => {
+        .then((res) => {
           if (res.data === 1 || res.data === 2) {
             data.studentType = this.radio;
             this.$request
               .addApply(data)
-              .then(res => {
+              .then((res) => {
                 if (res.code == 200) {
                   this.$bus.$emit("getNewGoodsList");
                   this.$message.success("预约成功");
@@ -144,7 +146,7 @@ export default {
                   this.$message.warning(res.msg || "预约失败,请重新预约");
                 }
               })
-              .catch(err => {
+              .catch((err) => {
                 this.$message.warning(err.msg || "预约失败,请重新预约");
               })
               .finally(() => {
@@ -156,9 +158,9 @@ export default {
               .goodsList({
                 makeGoodsId: data.goodsId,
                 goodsType: 3,
-                orderGoodsId: data.orderGoodsId
+                orderGoodsId: data.orderGoodsId,
               })
-              .then(res => {
+              .then((res) => {
                 if (res.rows.length) {
                   var goodsIdBK = res.rows[0].goodsId;
                 }
@@ -172,17 +174,17 @@ export default {
                     "机会。",
                   "提示",
                   {
-                    confirmButtonText: "缴费",
-                    cancelButtonText: "知道了"
+                    confirmButtonText: "线上缴费",
+                    cancelButtonText: "线下申请",
                   }
                 )
-                  .then(_ => {
+                  .then((_) => {
                     if (!goodsIdBK) {
                       this.$message.warning("请联系管理员配置补考商品");
                     } else {
                       this.$request
                         .commonGoodsDetail(goodsIdBK)
-                        .then(result => {
+                        .then((result) => {
                           let detail = result.data;
                           detail.learnOrderGoodsId = data.orderGoodsId;
                           detail.learnGradeId = data.gradeId;
@@ -198,8 +200,8 @@ export default {
                           this.$router.push({
                             path: "/payment",
                             query: {
-                              isBK: "1"
-                            }
+                              isBK: "1",
+                            },
                           });
                         });
                     }
@@ -207,9 +209,32 @@ export default {
                     //   path: "/payment-success",
                     // });
                   })
-                  .catch(_ => {});
+                  .catch(() => {
+                    //点击了取消按钮
+                    this.$request
+                      .subscribesaveoffline({
+                        appId: data.applyId,
+                        orderGoodsId: data.orderGoodsId,
+                      })
+                      .then((result) => {
+                        console.log(result);
+                        if (result.code == 200) {
+                          this.$message.warning("申请成功,请等待管理员审核");
+                        } else {
+                          this.$message.warning(result.msg);
+                        }
+                      })
+                      .catch((err) => {
+                        this.$message.warning(err.msg);
+                      })
+                      .finally(() => {
+                        this.$parent.cancel();
+                        this.isShow = false;
+                      });
+                  })
+                  .finally(() => {});
               })
-              .catch(err => {
+              .catch((err) => {
                 this.$message.warning(err.msg);
               })
               .finally(() => {
@@ -217,11 +242,11 @@ export default {
               });
           }
         })
-        .catch(err => {
+        .catch((err) => {
           this.loading = false;
           this.$message({
             type: "warning",
-            message: err.msg
+            message: err.msg,
           });
         });
     },
@@ -242,9 +267,9 @@ export default {
         <p>考试成绩:提交试卷后即刻显示成绩,60 分以上合格。</p>
         <p>学校咨询电话:${this.$store.state.userInfo.eduPhone}</p>
         <br />
-        <p>注意事项:考试当天请学员携带本人身份证提前 30 分钟到达考场,迟到将不得进入考场,并被认定为缺考处理。 `
+        <p>注意事项:考试当天请学员携带本人身份证提前 30 分钟到达考场,迟到将不得进入考场,并被认定为缺考处理。 `,
       });
-    }
+    },
   },
   computed: {
     isShow: {
@@ -256,9 +281,9 @@ export default {
       },
       set(val) {
         this.$emit("update:dialogVisible", false);
-      }
-    }
-  }
+      },
+    },
+  },
 };
 </script>