Browse Source

增加商务页面,修改页面bug

夜仔 3 years ago
parent
commit
8aa709d52a
8 changed files with 344 additions and 336 deletions
  1. 2 1
      .gitignore
  2. 18 18
      src/main.js
  3. 3 1
      src/plugins/axios.js
  4. 3 6
      src/views/business-end/index.vue
  5. 267 266
      src/views/home/index.scss
  6. 38 33
      src/views/home/index.vue
  7. 12 10
      src/views/subscribe-info/index.vue
  8. 1 1
      vue.config.js

+ 2 - 1
.gitignore

@@ -1,7 +1,8 @@
 .DS_Store
 node_modules
+.history
 /dist
-
+package-lock.json
 
 # local env files
 .env.local

+ 18 - 18
src/main.js

@@ -7,30 +7,30 @@ import Vant from 'vant';
 import 'vant/lib/index.css';
 import querystring from 'querystring';
 import './plugins/element.js'
-
+document.title = '永天科技邀请函'
 Vue.use(Vant);
 Vue.config.productionTip = false
 Vue.prototype.$qs = querystring
 new Vue({
-  router,
-  store,
-  render: h => h(App)
+    router,
+    store,
+    render: h => h(App)
 }).$mount('#app')
 
 // (new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423
 Date.prototype.Format = function(fmt) {
-  let o = {
-      'M+': this.getMonth() + 1, // 月份
-      'd+': this.getDate(), // 日
-      'h+': this.getHours(), // 小时
-      'm+': this.getMinutes(), // 分
-      's+': this.getSeconds(), // 秒
-      'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
-      'S': this.getMilliseconds() // 毫秒
-  };
-  if (/(y+)/.test(fmt)) { fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length)); }
-  for (let k in o) {
-      if (new RegExp('(' + k + ')').test(fmt)) { fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length))); }
-  }
-  return fmt;
+    let o = {
+        'M+': this.getMonth() + 1, // 月份
+        'd+': this.getDate(), // 日
+        'h+': this.getHours(), // 小时
+        'm+': this.getMinutes(), // 分
+        's+': this.getSeconds(), // 秒
+        'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
+        'S': this.getMilliseconds() // 毫秒
+    };
+    if (/(y+)/.test(fmt)) { fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length)); }
+    for (let k in o) {
+        if (new RegExp('(' + k + ')').test(fmt)) { fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length))); }
+    }
+    return fmt;
 };

+ 3 - 1
src/plugins/axios.js

@@ -1,5 +1,5 @@
 "use strict";
-
+import { Notify } from "vant";
 import Vue from 'vue';
 import axios from "axios";
 // Full config:  https://github.com/axios/axios#request-config
@@ -31,6 +31,8 @@ _axios.interceptors.request.use(
 _axios.interceptors.response.use(
     function(response) {
         // Do something with response data
+        console.log(response.data)
+        if (!response.data.success) Notify({ type: 'danger', message: response.data.message })
         return response;
     },
     function(error) {

+ 3 - 6
src/views/business-end/index.vue

@@ -44,7 +44,7 @@
             :rules="[
               {
                 required: true,
-                pattern: /^1[34578]\d{9}$/,
+                pattern: /^1[345678]\d{9}$/,
                 message: '请输入正确的手机号',
               },
             ]"
@@ -98,7 +98,7 @@ export default {
             ...this.searchForm,
           })
       );
-      if (res) {
+      if (res.data.success) {
           this.tableData = res.data.data
       }
     },
@@ -110,7 +110,7 @@ export default {
             ...this.form,
           })
       );
-      if (res) {
+      if (res.data.success) {
         this.getData();
         this.isLogin = true;
         for (const key in this.form) {
@@ -225,9 +225,6 @@ export default {
             color: #FFF;
             border-color: rgba(0, 250, 251, 0.20);
         }
-        .death {
-            // color: red !important;
-        }
         tr {
             margin-bottom: 1px;
         }

+ 267 - 266
src/views/home/index.scss

@@ -1,290 +1,291 @@
 .home {
-  background-image: url("../../assets/image/bg.png");
-  background-size: 100% 100%;
-  width: 750px;
-  height: 3522px;
-  color: #fff;
-  overflow: hidden;
-  font-family: SourceHanSansCN-Normal, SourceHanSansCN;
-  .title {
-    height: 54px;
-    width: 100%;
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    box-sizing: border-box;
-    margin-top: 44px;
-    padding: 0 30px;
-    .logo {
-      img {
-        width: 109px;
+    background-image: url("../../assets/image/bg.png");
+    background-size: 100% 100%;
+    width: 750px;
+    // height: 3522px;
+    color: #fff;
+    overflow: hidden;
+    font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+    .title {
         height: 54px;
-      }
+        width: 100%;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        box-sizing: border-box;
+        margin-top: 44px;
+        padding: 0 30px;
+        .logo {
+            img {
+                width: 109px;
+                height: 54px;
+            }
+        }
+        .yyInfo {
+            color: #ffc27b;
+            font-size: 24px;
+        }
     }
-    .yyInfo {
-      color: #ffc27b;
-      font-size: 24px;
+    .sh {
+        margin-top: 83px;
+        padding-left: 60px;
+        font-size: 39px;
+        letter-spacing: 1px;
+        font-weight: 400;
     }
-  }
-  .sh {
-    margin-top: 83px;
-    padding-left: 60px;
-    font-size: 39px;
-    letter-spacing: 1px;
-    font-weight: 400;
-  }
-  .gg {
-    font-size: 86px;
-    letter-spacing: 1px;
-    font-weight: bold;
-    text-align: center;
-    margin-top: 23px;
-  }
-  .ggEl {
-    height: 38px;
-    font-size: 34px;
-    font-family: ArialMT;
-    color: #ffffff;
-    line-height: 39px;
-    letter-spacing: 4px;
-    text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
-    text-align: center;
-  }
-  .blh {
-    font-size: 30px;
-    font-family: SourceHanSansCN-Normal, SourceHanSansCN;
-    font-weight: 400;
-    color: #ffffff;
-    line-height: 45px;
-    letter-spacing: 1px;
-    margin-top: 20px;
-    text-align: center;
-  }
-  .yqh {
-    margin-top: 640px;
-    font-size: 52px;
-    text-align: center;
-  }
-  .yqhEl {
-    font-family: FZYOUHS_504L--GB1-0, FZYOUHS_504L--GB1;
-    font-weight: normal;
-    color: #ffffff;
-    line-height: 24px;
-    letter-spacing: 10px;
-    text-align: center;
-    font-size: 22px;
-  }
-  .ghgl {
-    font-size: 30px;
-    font-family: SourceHanSansCN-Light, SourceHanSansCN;
-    font-weight: 300;
-    color: #ffffff;
-    line-height: 61px;
-    letter-spacing: 12px;
-    text-align: center;
-  }
-  .yyfs {
-    font-size: 35px;
-    font-family: PingFangSC-Medium, PingFang SC;
-    font-weight: 500;
-    color: #ffffff;
-    line-height: 49px;
-    text-align: center;
-    color: #ccc;
-    span {
-      color: #fff;
-      margin: 0 20px;
+    .gg {
+        font-size: 86px;
+        letter-spacing: 1px;
+        font-weight: bold;
+        text-align: center;
+        margin-top: 23px;
     }
-  }
-  .yyfsEl {
-    font-size: 20px;
-    text-transform: Uppercase;
-    font-weight: normal;
-    color: #ffffff;
-    line-height: 23px;
-    letter-spacing: 3px;
-    text-align: center;
-  }
-  .formBox {
-    width: 670px;
-    // height: 1069px;
-    background: linear-gradient(360deg, #0f2471 0%, #171f44 100%);
-    box-shadow: 0px 5px 24px -14px #040414;
-    border-radius: 8px;
-    margin: 0 auto;
-    margin-top: 40px;
-    padding: 40px;
-    box-sizing: border-box;
-    .van-form {
-      /deep/ .van-field {
-        margin-top: 25px;
-        background: transparent;
-        border: 1px solid blue;
-        .van-field__label {
-          color: #fff;
-        }
-        &::after {
-          display: none;
-        }
-        input {
-          color: #fff;
-        }
-        .van-field__button {
-          border-left: 1px solid #d8d8d8;
-        }
-        .hqyzm {
-          font-size: 24px;
-          font-weight: 400;
-          color: #ffc27b;
-          line-height: 33px;
-        }
-      }
-      .infoT {
-        font-size: 24px;
-        font-weight: 300;
+    .ggEl {
+        height: 38px;
+        font-size: 34px;
+        font-family: ArialMT;
         color: #ffffff;
-        line-height: 33px;
-        text-align: right;
-        width: 100%;
-        display: block;
-        margin-top: 16px;
-      }
+        line-height: 39px;
+        letter-spacing: 4px;
+        text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
+        text-align: center;
     }
-  }
-  .hdxxInfo {
-    width: 670px;
-    height: 233px;
-    background: linear-gradient(360deg, #0f2471 0%, #171f44 100%);
-    box-shadow: 0px 5px 24px -14px rgba(0, 0, 0, 0.14);
-    border-radius: 4px;
-    border: 1px solid rgba(81, 111, 255, 0.5);
-    border-radius: 8px;
-    margin: 0 auto;
-    margin-top: 40px;
-    padding: 40px;
-    box-sizing: border-box;
-  }
-  .hdxxInfoLable {
-    font-size: 26px;
-    font-weight: 400;
-    color: #ffffff;
-    line-height: 37px;
-    letter-spacing: 2px;
-    margin-bottom: 18px;
-    display: flex;
-    align-items: center;
-    span {
-      width: 1px;
-      height: 28px;
-      background: #ffffff;
-      opacity: 0.5;
-      margin-right: 25px;
-      display: inline-block;
+    .blh {
+        font-size: 30px;
+        font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+        font-weight: 400;
+        color: #ffffff;
+        line-height: 45px;
+        letter-spacing: 1px;
+        margin-top: 20px;
+        text-align: center;
     }
-    .boldColor {
-      color: #ffc27b;
-      font-style: inherit;
-      font-size: 32px;
-      margin: 0 4px;
+    .yqh {
+        margin-top: 640px;
+        font-size: 52px;
+        text-align: center;
     }
-  }
-  .bottomBox {
-    display: flex;
-    justify-content: space-between;
-    padding: 80px 30px;
-    box-sizing: border-box;
-    .bottomBoxL {
-      flex: 1;
-      padding: 0 20px;
-      width: 63%;
-      .title1 {
-        height: 30px;
-        font-size: 22px;
-        font-weight: 300;
+    .yqhEl {
+        font-family: FZYOUHS_504L--GB1-0, FZYOUHS_504L--GB1;
+        font-weight: normal;
         color: #ffffff;
-        line-height: 30px;
-      }
-      .title2 {
-        margin-top: 15px;
-        height: 58px;
-        font-size: 18px;
+        line-height: 24px;
+        letter-spacing: 10px;
+        text-align: center;
+        font-size: 22px;
+    }
+    .ghgl {
+        font-size: 30px;
+        font-family: SourceHanSansCN-Light, SourceHanSansCN;
         font-weight: 300;
         color: #ffffff;
-        line-height: 35px;
-      }
-      .title3 {
-        margin-top: 25px;
-        height: 87px;
-        font-size: 18px;
-        font-weight: 300;
+        line-height: 61px;
+        letter-spacing: 12px;
+        text-align: center;
+    }
+    .yyfs {
+        font-size: 35px;
+        font-family: PingFangSC-Medium, PingFang SC;
+        font-weight: 500;
         color: #ffffff;
-        line-height: 35px;
-      }
+        line-height: 49px;
+        text-align: center;
+        color: #ccc;
+        span {
+            color: #fff;
+            margin: 0 20px;
+        }
     }
-    .bottomBoxR {
-      width: 37%;
-      display: flex;
-      justify-content: flex-end;
-      flex-direction: column;
-      align-items: center;
-      .bottomBoxRT {
-        font-size: 16px;
+    .yyfsEl {
+        font-size: 20px;
+        text-transform: Uppercase;
+        font-weight: normal;
         color: #ffffff;
+        line-height: 23px;
+        letter-spacing: 3px;
         text-align: center;
+    }
+    .formBox {
+        width: 670px;
+        // height: 1069px;
+        background: linear-gradient(360deg, #0f2471 0%, #171f44 100%);
+        box-shadow: 0px 5px 24px -14px #040414;
+        border-radius: 8px;
+        margin: 0 auto;
+        margin-top: 40px;
+        padding: 40px;
+        box-sizing: border-box;
+        .van-form {
+            /deep/ .van-field {
+                margin-top: 25px;
+                background: transparent;
+                border: 1px solid blue;
+                .van-field__label {
+                    color: #fff;
+                }
+                &::after {
+                    display: none;
+                }
+                input {
+                    color: #fff;
+                }
+                .van-field__button {
+                    border-left: 1px solid #d8d8d8;
+                }
+                .hqyzm {
+                    font-size: 24px;
+                    font-weight: 400;
+                    color: #ffc27b;
+                    line-height: 33px;
+                }
+            }
+            .infoT {
+                font-size: 24px;
+                font-weight: 300;
+                color: #ffffff;
+                line-height: 33px;
+                text-align: right;
+                width: 100%;
+                display: block;
+                margin-top: 16px;
+            }
+        }
+    }
+    .hdxxInfo {
+        width: 670px;
+        height: 233px;
+        background: linear-gradient(360deg, #0f2471 0%, #171f44 100%);
+        box-shadow: 0px 5px 24px -14px rgba(0, 0, 0, 0.14);
+        border-radius: 4px;
+        border: 1px solid rgba(81, 111, 255, 0.5);
+        border-radius: 8px;
+        margin: 0 auto;
+        margin-top: 40px;
+        padding: 40px;
+        box-sizing: border-box;
+    }
+    .hdxxInfoLable {
+        font-size: 26px;
+        font-weight: 400;
+        color: #ffffff;
+        line-height: 37px;
+        letter-spacing: 2px;
+        margin-bottom: 18px;
+        display: flex;
+        align-items: center;
         span {
-          font-size: 14px;
+            width: 1px;
+            height: 28px;
+            background: #ffffff;
+            opacity: 0.5;
+            margin-right: 25px;
+            display: inline-block;
+        }
+        .boldColor {
+            color: #ffc27b;
+            font-style: inherit;
+            font-size: 32px;
+            margin: 0 4px;
+        }
+    }
+    .bottomBox {
+        display: flex;
+        justify-content: space-between;
+        padding: 80px 30px;
+        box-sizing: border-box;
+        .bottomBoxL {
+            flex: 1;
+            padding: 0 20px;
+            width: 63%;
+            .title1 {
+                height: 30px;
+                font-size: 22px;
+                font-weight: 300;
+                color: #ffffff;
+                line-height: 30px;
+            }
+            .title2 {
+                margin-top: 15px;
+                height: 58px;
+                font-size: 18px;
+                font-weight: 300;
+                color: #ffffff;
+                line-height: 35px;
+            }
+            .title3 {
+                margin-top: 25px;
+                height: 87px;
+                font-size: 18px;
+                font-weight: 300;
+                color: #ffffff;
+                line-height: 35px;
+            }
+        }
+        .bottomBoxR {
+            width: 37%;
+            display: flex;
+            justify-content: flex-end;
+            flex-direction: column;
+            align-items: center;
+            .bottomBoxRT {
+                font-size: 16px;
+                color: #ffffff;
+                text-align: center;
+                span {
+                    font-size: 14px;
+                }
+            }
+            img {
+                margin-top: 20px;
+                width: 158px;
+                height: 158px;
+            }
         }
-      }
-      img {
-        margin-top: 20px;
-        width: 158px;
-        height: 158px;
-      }
     }
-  }
 }
+
 .successBox {
-  width: 550px;
-  height: 700px;
-  position: fixed;
-  left: 0;
-  top: 0;
-  bottom: 0;
-  right: 0;
-  margin: auto;
-  background: url("../../assets/image/bg1.png");
-  background-size: 100% 100%;
-  padding: 100px 60px 0;
-  box-sizing: border-box;
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  .iconSuccess {
+    width: 550px;
+    height: 700px;
+    position: fixed;
+    left: 0;
+    top: 0;
+    bottom: 0;
+    right: 0;
+    margin: auto;
+    background: url("../../assets/image/bg1.png");
+    background-size: 100% 100%;
+    padding: 100px 60px 0;
+    box-sizing: border-box;
     display: flex;
-    justify-content: center;
+    flex-direction: column;
     align-items: center;
-    font-size: 48px;
-    font-weight: 500;
-    color: #ffffff;
-    line-height: 67px;
-    img {
-      width: 30px;
-      height: 30px;
-      margin-right: 20px;
+    .iconSuccess {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        font-size: 48px;
+        font-weight: 500;
+        color: #ffffff;
+        line-height: 67px;
+        img {
+            width: 30px;
+            height: 30px;
+            margin-right: 20px;
+        }
     }
-  }
-  .tzxx{
-    height: 100px;
-    font-size: 30px;
-    font-weight: 300;
-    color: #FFFFFF;
-    line-height: 50px;
-    letter-spacing: 2px;
-    text-align: center;
-    margin-top: 35px;
-  }
-  .van-button{
-    margin-top: 100px;
-    width: 100%;
-  }
-}
+    .tzxx {
+        height: 100px;
+        font-size: 30px;
+        font-weight: 300;
+        color: #FFFFFF;
+        line-height: 50px;
+        letter-spacing: 2px;
+        text-align: center;
+        margin-top: 35px;
+    }
+    .van-button {
+        margin-top: 100px;
+        width: 100%;
+    }
+}

+ 38 - 33
src/views/home/index.vue

@@ -18,27 +18,27 @@
     <div class="formBox">
       <van-form @submit="onSubmit" validate-trigger="onSubmit" :submit-on-enter="false" ref="formT">
         <van-field v-model="form.name" name="姓名" label="姓名*" type="text" placeholder="请输入你的姓名" :rules="[{ required:true, pattern: /^.{1,10}$/, message: '请输入姓名,不得超过10字' }]"/>
-        <span class="infoT">*请留真实信息,以便商务验证和联系您备份</span>
-        <van-field v-model="form.phone" name="手机" label="手机" type="tel" placeholder="请输入你的手机号" :rules="[{ required:true, pattern: /^1[345678]\d{9}$/, message: '请输入正确的手机号' }]"/>
-        <van-field v-model="form.smcCode" name="验证码" label="验证码" type="tel" placeholder="请输入验证码" :rules="[{ required:true, pattern: /^\d{6}$/, message: '请输入正确的验证码' }]">
+        <span class="infoT">*请留真实信息,以便商务验证和联系您</span>
+        <van-field v-model="form.phone" name="手机*" label="手机" type="tel" placeholder="请输入你的手机号" :rules="[{ required:true, pattern: /^1[345678]\d{9}$/, message: '请输入正确的手机号' }]"/>
+        <van-field v-model="form.smsCode" name="验证码*" label="验证码" type="tel" placeholder="请输入验证码" :rules="[{ required:true, pattern: /^\d{6}$/, message: '请输入正确的验证码' }]">
           <template #button> 
-            <van-loading v-if="smcCodeLoading"  color="#1989fa" />
-            <span class="hqyzm" v-else @click="getsmcCode">{{showsmcCode?'获取验证码':timesmcCode + 's'}}</span> 
+            <van-loading v-if="smsCodeLoading"  color="#1989fa" />
+            <span class="hqyzm" v-else @click="getsmsCode">{{showsmsCode?'获取验证码':timesmsCode + 's'}}</span> 
           </template>
         </van-field>
-        <van-field v-model="form.companyName" name="单位名称" label="单位名称" type="text" placeholder="请输入单位名称" :rules="[{ required:true, pattern: /^.{0,50}$/, message: '内容不得超过50字' }]"/>
+        <van-field v-model="form.companyName" name="单位名称*" label="单位名称" type="text" placeholder="请输入单位名称" :rules="[{ required:true, pattern: /^.{0,50}$/, message: '内容不得超过50字' }]"/>
         <van-field v-model="form.post" name="职务" label="职务" type="text" placeholder="请输入单位职务" :rules="[{ required:false, pattern: /^.{0,30}$/, message: '内容不得超过30字' }]"/>
         <van-field readonly clickable label="省份" :value="form.sf" placeholder="选择省份" @click="showPicker = true"/>
         <van-popup v-model="showPicker" round position="bottom">
           <van-picker show-toolbar :columns="columns" @cancel="showPicker = false" @confirm="onConfirm" />
         </van-popup>
 
-        <van-field readonly clickable name="dateOfVisit" :value="form.dateOfVisit" label="时间选择" placeholder="点击选择时间" @click="showTimePicker = true"/>
+        <van-field readonly clickable name="dateOfVisit" :value="form.dateOfVisit" label="到访日期" placeholder="点击选择到访日期" @click="showTimePicker = true" :rules="[{ required:true, message: '请选择到访日期' }]"/>
         <van-popup v-model="showTimePicker" position="bottom">
           <van-datetime-picker type="datetime" @confirm="onConfirmTime" @cancel="showTimePicker = false" :min-date="minDate" :max-date="maxDate" />
         </van-popup>
 
-        <van-field readonly clickable label="随行人数" :value="form.accompany" placeholder="选择随行人数" validate-trigger="onSubmit" @click="showacCompany = true"/>
+        <van-field readonly clickable label="随行人数" :value="form.accompanys" placeholder="选择随行人数" validate-trigger="onSubmit" @click="showacCompany = true"/>
         <van-popup v-model="showacCompany" round position="bottom">
           <van-picker show-toolbar :columns="columns2" @cancel="showacCompany = false" @confirm="onConfirmCompany" />
         </van-popup>
@@ -49,16 +49,16 @@
       </van-form>
     </div>
     <van-divider dashed class="yyfs" style="margin-top:50px;"><span>活动信息</span></van-divider>
-    <div class="yyfsEl">the Activity informa</div>
+    <div class="yyfsEl">the Activity information</div>
     <div class="hdxxInfo">
-      <div class="hdxxInfoLable"><span></span>时间:2021.8.11-8.13备份</div>
+      <div class="hdxxInfoLable"><span></span>时间:2021.8.11-8.13</div>
       <div class="hdxxInfoLable"><span></span>上海·世博馆<i class="boldColor">1</i> 号馆 展位号<i class="boldColor">E10</i></div>
-      <div class="hdxxInfoLable"><span></span>上海浦东新区国展路1099号备份</div>
+      <div class="hdxxInfoLable"><span></span>上海浦东新区国展路1099号</div>
     </div>
     <div class="bottomBox">
       <div class="bottomBoxL">
         <div class="title1">入场须知:</div>
-        <div class="title2">* 预约成功后将通过手机短息及电话 回访的方式确认,请保持通话顺畅</div>
+        <div class="title2">* 预约成功后将通过手机短信及电话回访的方式确认,请保持通话顺畅</div>
         <div class="title3">* 如有疑问请咨询 :<br/> 电话:021-65376655<br/> 邮箱:yujia.chi@chinausky.com</div>
       </div>
       <div class="bottomBoxR">
@@ -87,7 +87,7 @@ export default {
       form:{
         name: '',//客户姓名
         phone: '',//手机号
-        smcCode: '',//短信验证码
+        smsCode: '',//短信验证码
         companyName: '',//单位名称
         post: '',//职位
         sf: '',//省份
@@ -102,11 +102,11 @@ export default {
       showTimePicker: false,
       showacCompany: false,
       showPicker: false,
-      showsmcCode:true,
-      timesmcCode:60,
+      showsmsCode:true,
+      timesmsCode:60,
       showSuccessBox:false,
-      smcCodeLoading:false,
-      smcCodeInter:null,
+      smsCodeLoading:false,
+      smsCodeInter:null,
       columns: [
         "北京市",
         "天津市",
@@ -144,6 +144,9 @@ export default {
         "澳门特别行政区",
       ],
       columns2: ['1-3人', '3-7人', '7人以上'],
+      infoForm:{
+
+      }
     };
   },
   // components: {
@@ -160,45 +163,47 @@ export default {
       for (const key in this.form) {
         this.form[key] = "";
       }
+      this.$refs.formT.resetValidation()
     },
     async onSubmit(values) {
       console.log('submit', values);
-      let res = await this.$axios.post('/AF/addRegister',{
+      let res = await this.$axios.post('/AF/addRegister' + '?' +this.$qs.stringify({
         ...this.form
-      })
-      if(res){
+      }))
+      if(res.data.success){
         this.showSuccessBox = true;
-        this.$refs.formT.resetValidation()
+        this.infoForm = res.data.data
       }
     },
-    async getsmcCode(){
+    async getsmsCode(){
       if(!this.form.phone || !/^1[345678]\d{9}$/.test(this.form.phone)) return  Notify({ type: 'primary', message: '请输入正确的手机号' });
-      this.smcCodeLoading = true
+      this.smsCodeLoading = true
       let res = await this.$axios.get('/AF/msgTest' + '?' + this.$qs.stringify({
         phone:this.form.phone
       }))
-      if(res){
+      if(res.data.success){
         Notify({ type: 'success', message: '验证码已发送' })
-        this.showsmcCode = !this.showsmcCode
-        this.smcCodeInter = setInterval(()=>{
-          --this.timesmcCode
-          if(this.timesmcCode <= 0 ){
-             clearInterval(this.smcCodeInter)
-             this.showsmcCode = !this.showsmcCode
+        this.showsmsCode = !this.showsmsCode
+        this.smsCodeInter = setInterval(()=>{
+          --this.timesmsCode
+          if(this.timesmsCode <= 0 ){
+             clearInterval(this.smsCodeInter)
+             this.showsmsCode = !this.showsmsCode
           }
         },1000)
       } else{
         Notify({ type: 'primary', message: res.message });
       }
-      this.smcCodeLoading = false
+      this.smsCodeLoading = false
     },
     onConfirm(value) {
       this.showPicker = false;
       this.form.sf = value
     },
-    onConfirmCompany(value) {
+    onConfirmCompany(value,ind) {
       this.showacCompany = false;
-      this.form.accompany = value
+      this.form.accompanys = value
+      this.form.accompany = ind === 1 ? 0 : ind + 1
     },
     onConfirmTime(value) {
       this.showTimePicker = false;

+ 12 - 10
src/views/subscribe-info/index.vue

@@ -15,10 +15,12 @@
           active-icon="stop"
           inactive-icon="stop"
         >
-          <van-step> 接待人:{{infoForm.name || ''}} </van-step>
-          <van-step> 联系方式:{{infoForm.phone || ''}} </van-step>
+          <van-step> 预约人:{{infoForm.name || ''}} </van-step>
+          <van-step> 预约人联系方式:{{infoForm.phone || ''}} </van-step>
           <van-step> 访问日期:{{infoForm.dateOfVisit || ''}} </van-step>
           <van-step> 随行人数:{{infoForm.accompany || ''}} </van-step>
+          <van-step> 接待人:{{infoForm.userName || ''}} </van-step>
+          <van-step> 接待人联系方式:{{infoForm.userPhone || ''}} </van-step>
           <van-step>
             展会地址:上海世博会1号馆 展位号E10
             <span>(上海浦东新区国展路1099号)</span>
@@ -90,7 +92,7 @@ export default {
       let res = await this.$axios.post('/AF/listRegisterInfo' + '?' + this.$qs.stringify({
         ...this.form
       }))
-      if(res){
+      if(res.data.success){
           console.log(res.data)
         this.infoForm = res.data.data[0] || {}
         for (const key in this.form) {
@@ -106,7 +108,7 @@ export default {
       let res = await this.$axios.get('/AF/msgTest' + '?' + this.$qs.stringify({
         phone:this.form.phone
       }))
-      if(res){
+      if(res.data.success){
         Notify({ type: 'success', message: '验证码已发送' })
         this.showcode = !this.showcode
         this.codeInter = setInterval(()=>{
@@ -122,8 +124,8 @@ export default {
       this.codeLoading = false
     },
     callPhone() {
-        if(!this.infoForm.phone) return
-        window.location.href = "tel://" + this.infoForm.phone;
+        if(!this.infoForm.userPhone) return
+        window.location.href = "tel://" + this.infoForm.userPhone;
     },
   },
 };
@@ -187,7 +189,7 @@ export default {
   }
   .infoBox {
     position: absolute;
-    top: 500px;
+    top: 450px;
     left: o;
     padding: 0 50px 0 30px;
     box-sizing: border-box;
@@ -215,7 +217,7 @@ export default {
   }
   .gjsh {
     position: absolute;
-    top: 200px;
+    top: 150px;
     left: 50px;
     height: 43px;
     font-size: 39px;
@@ -226,7 +228,7 @@ export default {
   .ggaq {
     position: absolute;
     left: 50px;
-    top: 260px;
+    top: 210px;
     height: 86px;
     font-size: 86px;
     font-weight: bold;
@@ -236,7 +238,7 @@ export default {
   .ggaqEl {
     position: absolute;
     left: 55px;
-    top: 375px;
+    top: 325px;
     height: 38px;
     font-size: 34px;
     font-family: ArialMT;

+ 1 - 1
vue.config.js

@@ -19,7 +19,7 @@ module.exports = {
         proxy: {
             // 配置多个跨域
             '/': {
-                target: 'http://121.40.217.77:8084/', //跨域接口的地址
+                target: 'http://172.16.120.92:8084/', //跨域接口的地址
                 changeOrigin: false,
                 pathRewrite: {
                     '': '/'