shaogen1995 3 年 前
コミット
2702932cc9

BIN
houtai/public/favicon.ico


+ 1 - 1
houtai/public/index.html

@@ -5,7 +5,7 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
-    <title><%= htmlWebpackPlugin.options.title %></title>
+    <title>温岭社教活动管理后台</title>
   </head>
   <body>
     <noscript>

+ 3 - 3
houtai/src/utils/request.js

@@ -1,8 +1,8 @@
 import axios from 'axios'
 const service = axios.create({
-  baseURL: 'http://192.168.20.55:8018', // 本地调试
-  // baseURL: 'http://project.4dage.com:8017', // 线上调试
-  // baseURL: '', // build
+  // baseURL: 'http://192.168.20.55:8018', // 本地调试
+  // baseURL: 'http://project.4dage.com:8018', // 线上调试
+  baseURL: '', // build
   timeout: 5000
 })
 // 请求拦截器

+ 1 - 1
houtai/src/views/Layout.vue

@@ -2,7 +2,7 @@
 <template>
   <div
     class="Layout"
-    :style="`background: url('/data/${$route.meta.myBac}.png');background-size: 100% 100%;`"
+    :style="`background: url('data/${$route.meta.myBac}.png');background-size: 100% 100%;`"
   >
     <div class="top">
       <div class="topL">温岭社教活动管理后台</div>

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

@@ -131,13 +131,12 @@
             <div>
               <span>活动时间:</span>
               <el-date-picker
+                style="width:350px"
                 :picker-options="pickerOptions"
                 value-format="yyyy-MM-dd"
-                v-model="time1"
-                type="daterange"
-                range-separator="-"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
+                v-model="ruleForm.startDay"
+                type="date"
+                placeholder="选择日期"
               >
               </el-date-picker>
             </div>
@@ -249,7 +248,6 @@ export default {
       imgUpList1: [],
       imgUpList2: [],
       // 关于照片墙 👆
-      time1: "",
       timeArr: [{ id: Date.now(), time: "", num: "" }],
       //关于活动时间 👆
       age1: 7,
@@ -309,7 +307,7 @@ export default {
         return this.$message.warning("图片封面不能为空!");
       if (this.ruleForm.filePath === "")
         return this.$message.warning("活动顶部配图不能为空!");
-      if (!this.time1) return this.$message.warning("请选择活动时间!");
+      if (!this.ruleForm.startDay) return this.$message.warning("请选择活动时间!");
       let timeFlag = false;
       let numFlag = false;
       let startTimeArr = [];
@@ -350,8 +348,8 @@ export default {
         age: `${this.age1},${this.age2}`,
         content: this.editor.txt.html(),
         emcee: this.ruleForm.emcee,
-        startDay: this.time1[0],
-        endDay: this.time1[1],
+        startDay: this.ruleForm.startDay,
+        endDay: this.ruleForm.startDay,
         filePath: this.ruleForm.filePath,
         name: this.ruleForm.name,
         thumb: this.ruleForm.thumb,
@@ -510,8 +508,8 @@ export default {
       // 参与活动年龄段回显
       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.time1 = [res.data.startDay, res.data.endDay];
       this.timeArr = [];
       res.data.timeBuckets.forEach((v) => {
         this.timeArr.push({

+ 1 - 1
houtai/src/views/tab1/index.vue

@@ -65,7 +65,7 @@
           <el-table-column prop="emcee" label="活动主持人"> </el-table-column>
           <el-table-column label="活动时间" width="200">
             <template #default="{ row }">
-              {{ row.startDay }}至{{ row.endDay }}
+              {{ row.startDay }}
             </template>
           </el-table-column>
           <el-table-column prop="updateTime" label="发布时间">

+ 3 - 0
houtai/vue.config.js

@@ -0,0 +1,3 @@
+module.exports = {
+  publicPath: './'
+}

BIN
web/public/favicon.ico


+ 1 - 1
web/public/index.html

@@ -5,7 +5,7 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
-    <title><%= htmlWebpackPlugin.options.title %></title>
+    <title>温岭预约展示端</title>
   </head>
   <body>
     <noscript>

+ 3 - 3
web/src/utlis/request.js

@@ -1,8 +1,8 @@
 import axios from 'axios'
 const service = axios.create({
-  baseURL: 'http://192.168.20.55:8018', // 本地调试
-  // baseURL: 'http://project.4dage.com:8017', // 线上调试
-  // baseURL: '', // build
+  // baseURL: 'http://192.168.20.55:8018', // 本地调试
+  // baseURL: 'http://project.4dage.com:8018', // 线上调试
+  baseURL: '', // build
   timeout: 5000
 })
 // // 请求拦截器

+ 1 - 1
web/src/views/Home.vue

@@ -29,7 +29,7 @@
         </div>
         <div class="rowR">
           <h3>{{ item.name }}</h3>
-          <p>活动时间:<br />{{ item.startDay }}-{{ item.endDay }}</p>
+          <p>活动时间:{{ item.startDay }}</p>
         </div>
       </div>
     </div>

+ 55 - 47
web/src/views/Info.vue

@@ -8,10 +8,10 @@
     <!-- 活动时间 -->
     <div class="time">
       <p>
-        活动时间 &emsp;<span>{{ data.startDay }}-{{ data.endDay }}</span>
+        活动时间 &emsp;<span>{{ data.startDay }}</span>
       </p>
       <div class="week">
-        <div class="weekBox" :style="`width:${week.length * 100 + 50}px`">
+        <div class="weekBox weekBox1">
           <div
             v-for="(item, index) in week"
             :key="index"
@@ -61,7 +61,7 @@
       <p>个人信息</p>
       <div class="from">
         <div class="row">
-          <div class="name">姓&emsp;&emsp;名:</div>
+          <div class="name">姓名:</div>
           <input
             @blur="nameBlur"
             maxlength="10"
@@ -82,7 +82,7 @@
           <div class="tit" v-show="fromFlag.identity">请输入正确的身份证号</div>
         </div>
         <div class="row">
-          <div class="name">手&nbsp;&nbsp;&nbsp;&nbsp;号:</div>
+          <div class="name">手机号:</div>
           <input
             type="text"
             @blur="blurPhone"
@@ -92,7 +92,7 @@
           <div class="tit" v-show="fromFlag.phone">请输入正确的手机号</div>
         </div>
         <div class="row">
-          <div class="name">人&emsp;&emsp;数:</div>
+          <div class="name">人数:</div>
           <input type="text" disabled v-model="from.num" />
           <div class="numChange">
             <van-icon
@@ -108,7 +108,7 @@
           </div>
         </div>
         <div class="row">
-          <div class="name">年&emsp;&emsp;龄:</div>
+          <div class="name">年龄:</div>
           <input type="text" disabled v-model="from.age" />
           <div class="tit" v-if="fromFlag.age">
             您的年龄不符合要求({{ data.age.split(",")[0] }}岁-{{
@@ -147,12 +147,12 @@ export default {
       timeFlag: false,
       from: {
         activityId: "", //活动id
-        name: "说说", //姓名
+        name: "", //姓名
         age: "", //年龄
-        identity: "421083199504071212", //身份证号
+        identity: "", //身份证号
         joinTime: "", //参加时间,yyyy-MM-dd
         num: 1, //参加人数, 最多3人
-        phone: "18702020202", //手机号
+        phone: "", //手机号
         timeBucket: "", //活动时间段
         timeBucketId: "", //活动时间段id
       },
@@ -171,9 +171,9 @@ export default {
   watch: {},
   //方法集合
   methods: {
-    nameBlur(){
-      this.from.name=this.from.name.replace(/[^a-zA-Z\u4e00-\u9fa5]/g,'')
-      if(this.from.name!=='') this.fromFlag.name=false
+    nameBlur() {
+      this.from.name = this.from.name.replace(/[^a-zA-Z\u4e00-\u9fa5]/g, "");
+      if (this.from.name !== "") this.fromFlag.name = false;
     },
     async save() {
       if (this.weekId === null) {
@@ -333,12 +333,12 @@ export default {
       // ---------------活动时间处理
       // 开始日期的时间戳
       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 day =
+      //   (new Date(res.data.endDay) - new Date(res.data.startDay)) /
+      //   1000 /
+      //   60 /
+      //   60 /
+      //   24;
       let timeChange = {
         1: "周一",
         2: "周二",
@@ -349,33 +349,33 @@ export default {
         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,
-          });
-        }
-      }
+      // let temp = Date.now();
+      // for (let i = 0; i <= day; i++) {
+      //   // 之后的每一天的时间戳
+      let tt = Statime;
+      //   // 时间戳转换成年月日
+      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 = Date.now() < tt;
+      //   if (temp - tt < 86400000) {
+      tempArr.push({
+        name: d,
+        num: b,
+        tempFlag,
+        date,
+      });
+      //   }
+      // }
       this.week = tempArr;
       this.$nextTick(() => {
         setTimeout(() => {
@@ -463,6 +463,13 @@ export default {
           }
         }
       }
+      .weekBox1 {
+        width: 100%;
+        justify-content: center;
+        & > div {
+          margin-right: 0px;
+        }
+      }
     }
     .week::-webkit-scrollbar {
       width: 0;
@@ -555,11 +562,12 @@ export default {
       }
       .name {
         height: 40px;
-        line-height: 40px;
         font-size: 20px;
         width: 100px;
         min-width: 100px;
-        text-align: right;
+        display: flex;
+        justify-content: center;
+        align-items: center;
       }
       input {
         height: 40px;

+ 1 - 1
web/src/views/Inquire.vue

@@ -18,7 +18,7 @@ export default {
   data() {
     //这里存放数据
     return {
-      value: "421083199504071212",
+      value: "",
       tit: true,
     };
   },

+ 2 - 2
web/src/views/detail.vue

@@ -11,7 +11,7 @@
           <span>{{ data.visit }}次浏览</span>
         </div>
         <div class="txtt">
-          活动时间:{{ data.startDay }} - {{ data.endDay }}
+          活动时间:{{ data.startDay }}
         </div>
         <div class="txtt">活动地点:{{ data.address }}</div>
         <div class="xian"></div>
@@ -27,7 +27,7 @@
           <div class="txtt" v-if="data.age">
             参与活动年龄段:{{ data.age.replace(",", "-") }}岁
           </div>
-          <div class="txtt">剩余预约名额:{{ "??" }}个</div>
+          <div class="txtt">剩余预约名额:{{ data.residueQuota }}个</div>
           <div class="state" v-if="data.status == 3">已结束</div>
           <div class="state" v-else-if="data.status == 1">未开始</div>
           <div

+ 3 - 0
web/vue.config.js

@@ -0,0 +1,3 @@
+module.exports = {
+  publicPath: './'
+}