shaogen1995 hace 3 años
padre
commit
691fc73902

+ 42 - 9
houtai/src/views/tab1/add.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tab1Add">
+  <div class="tab1Add" :class="{ none: look }">
     <div class="top">
       <div class="tit"></div>
       活动发布
@@ -15,7 +15,7 @@
             label-width="140px"
             class="demo-ruleForm"
           >
-            <el-form-item label="活动名称:" prop="name">
+            <el-form-item label="活动名称:" prop="name" :class="{wanQuan:look}">
               <el-input
                 placeholder="请输入"
                 v-model="ruleForm.name"
@@ -23,7 +23,7 @@
                 show-word-limit
               ></el-input>
             </el-form-item>
-            <el-form-item label="活动地点:" prop="address">
+            <el-form-item label="活动地点:" prop="address" :class="{wanQuan:look}">
               <el-input
                 placeholder="请输入"
                 v-model="ruleForm.address"
@@ -39,7 +39,7 @@
                 show-word-limit
               ></el-input>
             </el-form-item>
-            <div class="row">
+            <div class="row" :class="{none:look}">
               <el-form-item label="参与活动年龄段:">
                 <span class="biaoshi biaoshi3">*</span>
                 <el-select
@@ -126,11 +126,12 @@
           </el-form>
         </div>
         <div class="mainTit1 mainTit2">活动时间</div>
-        <div class="mainBox">
+        <div class="mainBox" :class="{ none: look }">
           <div class="row2">
             <div>
               <span>活动时间:</span>
               <el-date-picker
+                :picker-options="pickerOptions"
                 value-format="yyyy-MM-dd"
                 v-model="time1"
                 type="daterange"
@@ -174,12 +175,14 @@
                 class="addTime"
                 v-if="index === 0"
                 @click="addTime(item.time, item.num)"
+                v-show="!look"
               >
                 增加时间段+
               </div>
               <div
                 class="addTime el-icon-close"
                 v-else
+                v-show="!look"
                 @click="delTime(item.id)"
               ></div>
             </div>
@@ -192,6 +195,7 @@
             <div class="tttit">活动正文:</div>
             <!-- 富文本上传图片 -->
             <el-upload
+              v-show="!look"
               :headers="{ token }"
               :action="baseURL + '/cms/activity/upload'"
               :data="{ type: 'img' }"
@@ -211,7 +215,7 @@
       <!-- 底部按钮 -->
       <div class="bottomBtn">
         <el-button @click="back">返 回</el-button>&emsp;&emsp;
-        <el-button type="primary" @click="save">{{
+        <el-button type="primary" @click="save" v-if="!look">{{
           ruleForm.id ? "编 辑" : "新 增"
         }}</el-button>
       </div>
@@ -233,6 +237,11 @@ export default {
   data() {
     //这里存放数据
     return {
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() < Date.now();
+        },
+      },
       token: "",
       baseURL: "",
       dialogImageUrl: "",
@@ -243,7 +252,7 @@ export default {
       time1: "",
       timeArr: [{ id: Date.now(), time: "", num: "" }],
       //关于活动时间 👆
-      age1: 18,
+      age1: 7,
       age2: 60,
       ruleForm: {
         name: "", //活动名称
@@ -268,6 +277,8 @@ export default {
         address: [{ required: true, message: "不能为空", trigger: "blur" }],
         emcee: [{ required: true, message: "不能为空", trigger: "blur" }],
       },
+      // 点击查看进入页面
+      look: false,
     };
   },
   //监听属性 类似于data概念
@@ -497,8 +508,8 @@ export default {
       this.imgUpList1 = [{ url: this.baseURL + res.data.thumb }];
       this.imgUpList2 = [{ url: this.baseURL + res.data.filePath }];
       // 参与活动年龄段回显
-      this.age1 =Number(res.data.age.split(',')[0])
-      this.age2 =Number(res.data.age.split(',')[1])
+      this.age1 = Number(res.data.age.split(",")[0]);
+      this.age2 = Number(res.data.age.split(",")[1]);
       // 活动时间回显
       this.time1 = [res.data.startDay, res.data.endDay];
       this.timeArr = [];
@@ -512,6 +523,11 @@ export default {
       // 富文本回显
       this.editor.txt.html(res.data.content);
     }
+    // 如果是查看
+    if (this.$route.query.flag == 1) {
+      this.look = true;
+      this.editor.disable()
+      }
   },
   beforeCreate() {}, //生命周期 - 创建之前
   beforeMount() {}, //生命周期 - 挂载之前
@@ -523,6 +539,17 @@ export default {
 };
 </script>
 <style lang='less' scoped>
+.none {
+  /deep/input {
+    pointer-events: none !important;
+  }
+  /deep/.el-upload-list__item-delete {
+    display: none !important;
+  }
+  /deep/.el-input__suffix{
+    display: none !important;
+  }
+}
 .tab1Add {
   width: 100%;
   height: 100%;
@@ -565,6 +592,12 @@ export default {
       .mainTit2 {
         background-color: #ece3d4;
       }
+      .none {
+        pointer-events: none !important;
+      }
+      .wanQuan{
+        width: 100% !important;
+      }
       .mainBox {
         width: 1200px;
         padding-left: 35px;

+ 16 - 7
houtai/src/views/tab1/index.vue

@@ -81,13 +81,22 @@
               <el-button
                 type="text"
                 v-if="row.display == 0"
-                @click="activityPublish(row.id, 1)"
+                @click="activityPublish(row.id, 1, '发布')"
                 >发布</el-button
               >
-              <el-button type="text" v-else @click="activityPublish(row.id, 0)"
+              <el-button
+                type="text"
+                v-else
+                @click="activityPublish(row.id, 0, '取消发布')"
                 >取消发布</el-button
               >
-              <el-button type="text" @click="toEdit(row.id)">编辑</el-button>
+              <el-button
+                type="text"
+                @click="toEdit(row.id, 0)"
+                v-if="row.display == 0"
+                >编辑</el-button
+              >
+              <el-button type="text" @click="toEdit(row.id, 1)">查看</el-button>
               <el-button type="text" @click="activityRemove(row.id)"
                 >删除</el-button
               >
@@ -162,10 +171,10 @@ export default {
   //方法集合
   methods: {
     // 点击发布
-    async activityPublish(id, display) {
+    async activityPublish(id, display, txt) {
       let res = await activityPublish(id, display);
       if (res.code === 0) {
-        this.$message.success("发布成功!");
+        this.$message.success(txt + "成功!");
         this.getList(this.formData);
       } else this.$message.warning(res.msg);
     },
@@ -208,10 +217,10 @@ export default {
       });
     },
     // 点击编辑
-    toEdit(id) {
+    toEdit(id, flag) {
       this.$router.push({
         path: "/layout/tab1Add",
-        query: { k: this.formData.pageNum, id },
+        query: { k: this.formData.pageNum, id, flag },
       });
     },
     // 切换 全部--草稿……

+ 13 - 1
web/src/assets/base.css

@@ -85,4 +85,16 @@ html, body {
 body {
     -webkit-text-size-adjust: none;
     -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-}
+}
+input::-webkit-input-placeholder{
+    color:#ccc;
+  }
+  input::-moz-placeholder{   /* Mozilla Firefox 19+ */
+    color:#ccc;
+  }
+  input:-moz-placeholder{    /* Mozilla Firefox 4 to 18 */
+    color:#ccc;
+  }
+  input:-ms-input-placeholder{  /* Internet Explorer 10-11 */ 
+    color:#ccc;
+  }

+ 17 - 2
web/src/components/Back.vue

@@ -33,9 +33,24 @@ export default {
 </script>
 <style lang='less' scoped>
 .Back {
+  width: 30px;
+  height: 30px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  background-color: rgba(0,0,0,.8);
+  border-radius: 50%;
+  color: #fff;
   font-size: 22px;
-  position: absolute;
+  position: fixed;
+  z-index: 999;
   top: 20px;
-  left: 20px;
+  left: 10px;
 }
+  @media screen and (min-width: 500px) {
+    .Back {
+      left: 50%;
+      transform: translateX(-230px);
+    }
+  }
 </style>

+ 1 - 1
web/src/components/ToIndex.vue

@@ -43,7 +43,7 @@ export default {
   height: 40px;
   background-color: rgba(0, 0, 0, 0.8);
   position: fixed;
-  z-index: 9999;
+  z-index: 999;
   bottom: 0;
   left: 50%;
   transform: translateX(-50%);

+ 2 - 2
web/src/main.js

@@ -3,13 +3,13 @@ import App from './App.vue'
 import router from './router'
 
 // 图片懒加载
-import { Lazyload, Icon,  } from 'vant';
+import { Lazyload, Icon  } from 'vant';
 Vue.use(Lazyload, {
   lazyComponent: true,
   error: require('@/assets/img/IMGerror.png'),
   loading: require('@/assets/img/loading.gif')
 })
-Vue.use(Icon);
+Vue.use(Icon );
 import 'vant/lib/index.css';
 
 import './assets/base.css'

+ 13 - 0
web/src/router/index.js

@@ -9,11 +9,24 @@ const routes = [
     name: 'Home',
     component: () => import('../views/Home.vue')
   },
+  // 身份证查询预约页面
   {
     path: '/Inquire',
     name: 'Inquire',
     component: () => import('../views/Inquire.vue')
   },
+  // 社交活动详情(报名)
+  {
+    path: '/Info/:id',
+    name: 'Info',
+    component: () => import('../views/Info.vue')
+  },
+  // 预约成功的页面
+  {
+    path: '/succOrder',
+    name: 'succOrder',
+    component: () => import('../views/succOrder.vue')
+  },
 ]
 
 const router = new VueRouter({

+ 24 - 2
web/src/utlis/api.js

@@ -1,8 +1,30 @@
 import axios from './request'
-// 获取活动列表
-export const webListApi = (status="") => {
+// 获取社交活动列表
+export const webListApi = (status = "") => {
   return axios({
     method: 'get',
     url: `/show/activity/webList/${status}`,
   })
 }
+// 社交活动详情
+export const webDetailApi = (activityId) => {
+  return axios({
+    method: 'get',
+    url: `/show/activity/detail/${activityId}`,
+  })
+}
+// 活动-时间段详情
+export const timeBucketDetail = (activityId,date) => {
+  return axios({
+    method: 'get',
+    url: `/show/activity/timeBucketDetail/${activityId}/${date}`,
+  })
+}
+// 预约
+export const activityApply = (data) => {
+  return axios({
+    method: 'post',
+    url: '/show/activity/apply',
+    data
+  })
+}

+ 27 - 8
web/src/views/Home.vue

@@ -13,11 +13,17 @@
     </div>
     <!-- 下面主要内容 -->
     <div class="main">
-      <div class="none" v-if="data.length===0">
-        <img src="../assets/img/none.png" alt="">
+      <div class="none" v-if="data.length === 0">
+        <img src="../assets/img/none.png" alt="" />
         <p>暂无社交活动</p>
       </div>
-      <div class="row" v-for="item in data" :key="item.id" v-else>
+      <div
+        class="row"
+        v-for="item in data"
+        :key="item.id"
+        v-else
+        @click="toInfo(item.id)"
+      >
         <div class="rowL">
           <img v-lazy="baseURL + item.thumb" alt="" />
         </div>
@@ -63,6 +69,15 @@ export default {
     },
   },
   methods: {
+    toInfo(id) {
+      let sroll =
+        window.pageYOffset ||
+        document.documentElement.scrollTop ||
+        document.body.scrollTop;
+      this.$route.meta.sroolBack = sroll;
+      this.$router.push(`/Info/${id}`);
+    },
+
     async getList(data) {
       let res = await webListApi(data);
       this.data = res.data;
@@ -73,6 +88,11 @@ export default {
     // 获取服务器前缀地址
     this.baseURL = axios.defaults.baseURL;
     this.getList();
+    if (this.$route.meta.sroolBack) {
+      setTimeout(() => {
+        window.scrollTo({ top: this.$route.meta.sroolBack });
+      }, 200);
+    }
   },
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {},
@@ -115,22 +135,21 @@ export default {
   }
   .main {
     margin-top: 20px;
-    .none{
+    .none {
       margin-top: 100px;
       width: 100%;
       text-align: center;
-      &>img{
+      & > img {
         width: 200px;
       }
-      &>p{
+      & > p {
         padding-left: 20px;
-        color: #858B6B;
+        color: #858b6b;
         margin-top: 15px;
         text-align: center;
       }
     }
     .row {
-      z-index: 9999;
       background-color: #fff;
       width: 100%;
       border-radius: 5px;

+ 561 - 0
web/src/views/Info.vue

@@ -0,0 +1,561 @@
+<template>
+  <div class="Info">
+    <Back />
+    <div class="topImg">
+      <img :src="baseURL + data.filePath" alt="" />
+    </div>
+    <div class="name">{{ data.name }}</div>
+    <!-- 活动时间 -->
+    <div class="time">
+      <p>
+        活动时间 &emsp;<span>{{ data.startDay }}-{{ data.endDay }}</span>
+      </p>
+      <div class="week">
+        <div class="weekBox" :style="`width:${week.length * 100 + 50}px`">
+          <div
+            v-for="(item, index) in week"
+            :key="index"
+            :class="{ active: weekId === index }"
+            @click="selectWeek(index, item.tempFlag, item.date)"
+          >
+            <div class="one">{{ item.name }}</div>
+            <div>{{ item.num }}</div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="xian"></div>
+    <!-- 活动时段 -->
+    <div class="section time">
+      <p>活动时段</p>
+      <div class="week">
+        <div class="weekBox" :style="`width:${section.length * 170 + 50}px`">
+          <div
+            v-for="(item, index) in section"
+            :key="index"
+            :class="{ active: sectionId === index, dis: timeFlag && item.dis }"
+            @click="selectSection(index, item.startTime, item.endTime, item.id)"
+          >
+            <div class="one">{{ item.startTime }}-{{ item.endTime }}</div>
+            <div v-if="timeFlag && item.dis">已结束预约</div>
+            <div v-else>剩余:{{ item.quota }}</div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="xian"></div>
+    <!-- 个人信息 -->
+    <div class="time">
+      <p>个人信息</p>
+      <div class="from">
+        <div class="row">
+          <div class="name">姓&emsp;&emsp;名:</div>
+          <input
+            onblur="value=value.replace(/[^a-zA-Z\u4e00-\u9fa5]/g,'')"
+            maxlength="10"
+            type="text"
+            v-model="from.name"
+            placeholder="请输入参与活动者的姓名"
+          />
+          <div class="tit" v-show="fromFlag.name">请输入正确的姓名</div>
+        </div>
+        <div class="row">
+          <div class="name">身份证号:</div>
+          <input
+            @blur="blurInput"
+            type="text"
+            v-model="from.identity"
+            placeholder="请输入参与活动者的身份证号"
+          />
+          <div class="tit" v-show="fromFlag.identity">请输入正确的身份证号</div>
+        </div>
+        <div class="row">
+          <div class="name">手&nbsp;&nbsp;机&nbsp;&nbsp;号:</div>
+          <input
+            type="text"
+            @blur="blurPhone"
+            v-model="from.phone"
+            placeholder="请输入手机号"
+          />
+          <div class="tit" v-show="fromFlag.phone">请输入正确的手机号</div>
+        </div>
+        <div class="row">
+          <div class="name">人&emsp;&emsp;数:</div>
+          <input type="text" disabled v-model="from.num" />
+          <div class="numChange">
+            <van-icon
+              name="minus"
+              :class="{ none: from.num > 1 }"
+              @click.native="from.num--"
+            />
+            <van-icon
+              name="plus"
+              :class="{ none: from.num < 3 }"
+              @click.native="from.num++"
+            />
+          </div>
+        </div>
+        <div class="row">
+          <div class="name">年&emsp;&emsp;龄:</div>
+          <input type="text" disabled v-model="from.age" />
+          <div class="tit" v-if="fromFlag.age">
+            您的年龄不符合要求({{ data.age.split(",")[0] }}岁-{{
+              data.age.split(",")[1]
+            }}岁)
+          </div>
+        </div>
+      </div>
+      <!-- 按钮 -->
+      <div class="btn" @click="save">立即预约</div>
+    </div>
+    <ToIndex />
+  </div>
+</template>
+
+<script>
+import { Dialog } from "vant";
+import Back from "../components/Back.vue";
+import ToIndex from "../components/ToIndex.vue";
+import axios from "@/utlis/request";
+import { webDetailApi, timeBucketDetail, activityApply } from "../utlis/api";
+export default {
+  name: "Info",
+  components: { Back, ToIndex },
+  data() {
+    //这里存放数据
+    return {
+      baseURL: "",
+      data: {},
+      // 活动时间
+      week: [],
+      weekId: null,
+      // 活动时段
+      section: [],
+      sectionId: null,
+      timeFlag: false,
+      from: {
+        activityId: "", //活动id
+        name: "说说", //姓名
+        age: "", //年龄
+        identity: "421083199504071211", //身份证号
+        joinTime: "", //参加时间,yyyy-MM-dd
+        num: 1, //参加人数, 最多3人
+        phone: "18702020202", //手机号
+        timeBucket: "", //活动时间段
+        timeBucketId: "", //活动时间段id
+      },
+      fromFlag: {
+        name: false,
+        identity: false,
+        phone: false,
+        age: false,
+      },
+    };
+  },
+  //监听属性 类似于data概念
+  computed: {},
+  //监控data中的数据变化
+  watch: {},
+  //方法集合
+  methods: {
+    async save() {
+      if (this.weekId === null) {
+        Dialog.alert({
+          message: "请选择活动时间!",
+        }).then(() => {
+          // on close
+        });
+        return;
+      }
+      if (this.sectionId === null) {
+        Dialog.alert({
+          message: "请选择活动时段!",
+        }).then(() => {
+          // on close
+        });
+        return;
+      }
+
+      if (this.from.name.trim() === "") {
+        this.fromFlag.name = true;
+        return;
+      } else this.fromFlag.name = false;
+      this.blurInput();
+      this.blurPhone();
+      let ageArr = this.data.age.split(",");
+      if (
+        this.from.age < Number(ageArr[0]) ||
+        this.from.age > Number(ageArr[1])
+      ) {
+        this.fromFlag.age = true;
+        return;
+      } else this.fromFlag.age = false;
+      if (this.fromFlag.identity || this.fromFlag.phone) return;
+
+      // 发送请求
+      let res = await activityApply(this.from);
+      if (res.code === 0) {
+        this.$router.push({
+          path: "/succOrder",
+          query: {
+            name: this.data.name,
+            time: this.from.joinTime,
+            time2: this.from.timeBucket,
+            num: this.from.num,
+            nowTime: res.timestamp,
+          },
+        });
+      } else {
+        Dialog.alert({
+          message: res.msg,
+        }).then(() => {
+          // on close
+        });
+      }
+      console.log(res);
+    },
+    // 检查身份证格式
+    blurInput() {
+      let idcardReg =
+        /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/;
+      let temp = idcardReg.test(this.from.identity);
+      this.fromFlag.identity = !temp;
+      // 根据身份证,自动算年龄
+      let userCard = this.from.identity;
+      if (temp) {
+        let yearBirth, monthBirth, dayBirth;
+        if (userCard.length == 15) {
+          let org_birthday = userCard.substring(6, 12);
+          //获取出生年月日
+          yearBirth = "19" + org_birthday.substring(0, 2);
+          monthBirth = org_birthday.substring(2, 4);
+          dayBirth = org_birthday.substring(4, 6);
+        } else if (userCard.length == 18) {
+          //获取出生年月日
+          yearBirth = userCard.substring(6, 10);
+          monthBirth = userCard.substring(10, 12);
+          dayBirth = userCard.substring(12, 14);
+        }
+        //获取当前年月日并计算年龄
+        let myDate = new Date();
+        let monthNow = myDate.getMonth() + 1;
+        let dayNow = myDate.getDate();
+        let age = myDate.getFullYear() - yearBirth;
+        if (
+          monthNow < monthBirth ||
+          (monthNow == monthBirth && dayNow < dayBirth)
+        ) {
+          age--;
+        }
+        //返回年龄
+        this.from.age = age;
+      }
+      let ageArr = this.data.age.split(",");
+      if (
+        this.from.age < Number(ageArr[0]) ||
+        this.from.age > Number(ageArr[1])
+      ) {
+        this.fromFlag.age = true;
+      } else this.fromFlag.age = false;
+    },
+    // 手机号验证
+    blurPhone() {
+      let idcardReg = /^1[3-9]\d{9}$/;
+      this.fromFlag.phone = !idcardReg.test(this.from.phone);
+    },
+    selectWeek(index, flag, date) {
+      this.weekId = index;
+      this.sectionId = null;
+      this.from.joinTime = date;
+      this.timeBucketDetail(this.from.activityId, date);
+      if (flag) this.timeFlag = false;
+      else this.timeFlag = true;
+    },
+    selectSection(index, startTime, endTime, id) {
+      this.sectionId = index;
+      this.from.timeBucket = `${startTime}-${endTime}`;
+      this.from.timeBucketId = id;
+    },
+    // 封装一个获取时间段详情的方法
+    async timeBucketDetail(id, date) {
+      let res = await timeBucketDetail(id, date);
+      // --------------活动时段处理
+      let tempHH = new Date().getHours();
+      let temp = [];
+      res.data.forEach((v) => {
+        let hh = v.endTime.substring(0, 2);
+        let dis = true;
+        if (Number(hh) - Number(tempHH) > 3) {
+          dis = false;
+        }
+        temp.push({ ...v, dis });
+      });
+      this.section = temp;
+    },
+  },
+  //生命周期 - 创建完成(可以访问当前this实例)
+  async created() {
+    // 获取服务器前缀地址
+    this.baseURL = axios.defaults.baseURL;
+
+    let id = this.$route.params.id;
+    if (id) {
+      id = Number(id);
+      this.from.activityId = id;
+      let res = await webDetailApi(id);
+      this.data = res.data;
+      // ---------------活动时间处理
+      // 开始日期的时间戳
+      let Statime = new Date(res.data.startDay).getTime();
+      let day =
+        (new Date(res.data.endDay) - new Date(res.data.startDay)) /
+        1000 /
+        60 /
+        60 /
+        24;
+      let timeChange = {
+        1: "周一",
+        2: "周二",
+        3: "周三",
+        4: "周四",
+        5: "周五",
+        6: "周六",
+        0: "周日",
+      };
+      let tempArr = [];
+      let temp = Date.now();
+      for (let i = 0; i <= day; i++) {
+        // 之后的每一天的时间戳
+        let tt = Statime + 86400000 * i;
+        // 时间戳转换成年月日
+        let toDou = (n) => (n < 10 ? `0${n}` : `${n}`);
+        let ttS = new Date(tt);
+        let date = `${ttS.getFullYear()}-${toDou(ttS.getMonth() + 1)}-${toDou(
+          ttS.getDate()
+        )}`;
+        // 之后的每一天是几号
+        let a = new Date(tt);
+        let b = a.getDate();
+        // 之后的每一天的星期几
+        let c = a.getDay();
+        let d = timeChange[c];
+        // 判断在今天之前
+        let tempFlag = temp < tt;
+        if (temp - tt < 86400000) {
+          tempArr.push({
+            name: d,
+            num: b,
+            tempFlag,
+            date,
+          });
+        }
+      }
+      this.week = tempArr;
+
+      this.timeBucketDetail(id, res.data.startDay);
+
+      console.log(123, res);
+    }
+  },
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {},
+  beforeCreate() {}, //生命周期 - 创建之前
+  beforeMount() {}, //生命周期 - 挂载之前
+  beforeUpdate() {}, //生命周期 - 更新之前
+  updated() {}, //生命周期 - 更新之后
+  beforeDestroy() {}, //生命周期 - 销毁之前
+  destroyed() {}, //生命周期 - 销毁完成
+  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
+};
+</script>
+<style lang='less' scoped>
+.Info {
+  padding-bottom: 100px;
+  .topImg {
+    margin-bottom: 30px;
+    & > img {
+      width: 100%;
+    }
+  }
+  .name {
+    color: #6f774f;
+    font-weight: 700;
+    font-size: 24px;
+    text-align: center;
+    margin-bottom: 20px;
+  }
+  .time {
+    padding: 0 24px;
+    color: #6f774f;
+    & > p {
+      font-size: 22px;
+      font-weight: 700;
+      & > span {
+        font-size: 14px;
+      }
+    }
+    .week {
+      margin-top: 30px;
+      width: 100%;
+      height: 80px;
+      overflow-x: auto;
+      overflow-y: hidden;
+      .weekBox {
+        height: 70px;
+        display: flex;
+        & > div {
+          margin-right: 20px;
+          width: 80px;
+          height: 70px;
+          border: 1px solid #6f774f;
+          border-radius: 3px;
+          & > div {
+            color: #858b6b;
+            text-align: center;
+            height: 40px;
+            line-height: 40px;
+            font-size: 22px;
+          }
+          .one {
+            font-size: 20px;
+            height: 30px;
+            line-height: 29px;
+            border-bottom: 1px solid #858b6b;
+          }
+        }
+        .active {
+          background-color: #6f774f;
+          pointer-events: none;
+          & > div {
+            color: #fff;
+          }
+          .one {
+            border-bottom: 1px solid #fff;
+          }
+        }
+      }
+    }
+    .week::-webkit-scrollbar {
+      width: 0;
+      height: 0;
+    }
+  }
+  .xian {
+    width: 100%;
+    height: 4px;
+    background-color: #f8f8f8;
+    margin: 30px 0;
+  }
+  .section {
+    padding: 0 24px;
+    color: #6f774f;
+    & > p {
+      font-size: 22px;
+      font-weight: 700;
+    }
+    .week {
+      .weekBox {
+        & > div {
+          width: 150px;
+          height: 70px;
+          border: 1px solid #6f774f;
+          border-radius: 3px;
+          & > div {
+            color: #858b6b;
+            text-align: center;
+            height: 35px;
+            line-height: 25px;
+            font-size: 20px;
+          }
+          .one {
+            font-size: 20px;
+            height: 35px;
+            line-height: 40px;
+            border-bottom: none;
+          }
+        }
+        .active {
+          background-color: #6f774f;
+          & > div {
+            color: #fff;
+          }
+          .one {
+            border-bottom: none;
+          }
+        }
+        .dis {
+          border: none;
+          background-color: #f8f8f8;
+          pointer-events: none;
+        }
+      }
+    }
+  }
+  .from {
+    margin-top: 35px;
+    .row {
+      position: relative;
+      margin-bottom: 24px;
+      display: flex;
+      height: 40px;
+      .numChange {
+        z-index: 99;
+        font-size: 20px;
+        color: #858b6b;
+        position: absolute;
+        right: 10px;
+        top: 0;
+        height: 100%;
+        width: 80px;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        /deep/.van-icon {
+          opacity: 0;
+          pointer-events: none;
+        }
+        .none {
+          opacity: 1;
+          pointer-events: initial;
+        }
+      }
+      .name {
+        height: 40px;
+        line-height: 40px;
+        font-size: 20px;
+        width: 100px;
+        min-width: 100px;
+        text-align: right;
+      }
+      input {
+        height: 40px;
+        padding: 0 5px;
+        border: 1px solid #c7c7c7;
+        border-radius: 5px;
+        flex: 1;
+      }
+      input:disabled {
+        background-color: #c9c9c9;
+      }
+      .tit {
+        color: #be9c6c;
+        font-size: 12px;
+        position: absolute;
+        bottom: -18px;
+        left: 100px;
+      }
+    }
+  }
+  .btn {
+    background-color: #858b6b;
+    color: #fff;
+    width: 100%;
+    height: 40px;
+    border-radius: 20px;
+    line-height: 40px;
+    font-size: 18px;
+    font-weight: 700;
+    text-align: center;
+  }
+}
+</style>

+ 8 - 3
web/src/views/Inquire.vue

@@ -1,9 +1,9 @@
 <template>
   <div class="Inquire">
     <Back />
-    <div class="num">
+    <div class="num" @keyup.enter="toSearch">
       <h3>身份证号</h3>
-      <input type="text" v-model="value" @blur="blurInput" />
+      <input type="text" class="IDInput" v-model="value" @blur="blurInput" />
       <div class="tit" :class="{ opcNone: tit }">身份证号有误,请重新输入!</div>
       <div class="btn" @click="toSearch">预约查询</div>
     </div>
@@ -44,7 +44,12 @@ export default {
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {},
   //生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {},
+  mounted() {
+    this.$nextTick(()=>{
+      let dom =document.querySelector('.IDInput')
+      dom.focus()
+    })
+  },
   beforeCreate() {}, //生命周期 - 创建之前
   beforeMount() {}, //生命周期 - 挂载之前
   beforeUpdate() {}, //生命周期 - 更新之前

+ 54 - 0
web/src/views/succOrder.vue

@@ -0,0 +1,54 @@
+<template>
+<div class='succOrder'>
+  <Back />
+  <div class="main"></div>
+</div>
+</template>
+
+<script>
+import Back from "../components/Back.vue";
+export default {
+name:'succOrder',
+components: {Back},
+data() {
+//这里存放数据
+return {
+
+};
+},
+//监听属性 类似于data概念
+computed: {},
+//监控data中的数据变化
+watch: {},
+//方法集合
+methods: {
+
+},
+//生命周期 - 创建完成(可以访问当前this实例)
+created() {
+
+},
+//生命周期 - 挂载完成(可以访问DOM元素)
+mounted() {
+
+},
+beforeCreate() {}, //生命周期 - 创建之前
+beforeMount() {}, //生命周期 - 挂载之前
+beforeUpdate() {}, //生命周期 - 更新之前
+updated() {}, //生命周期 - 更新之后
+beforeDestroy() {}, //生命周期 - 销毁之前
+destroyed() {}, //生命周期 - 销毁完成
+activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
+}
+</script>
+<style lang='less' scoped>
+.succOrder{
+  padding: 20px 30px;
+  .main{
+    width: 100%;
+    height: 300px;
+    background-color: #ededed;
+  }
+}
+
+</style>