index.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  1. <template>
  2. <div class="container">
  3. <div class="header">
  4. <span>中德全国校区</span>
  5. <div class="right">
  6. <div class="submit-area">
  7. <div class="label">加盟申请</div>
  8. <div class="phone-num">
  9. <img src="http://res.training.luojigou.vip/FmUjRlN7yn8o8HkXV21yOAJt-2C0?imageView2/0/q/50|imageslim" alt="" />
  10. <div class="num">400-6807300</div>
  11. </div>
  12. <div class="form">
  13. <el-form :model="form" :rules="rules" ref="ruleForm">
  14. <el-form-item prop="name">
  15. <el-input placeholder="姓名" v-model="form.name"></el-input>
  16. </el-form-item>
  17. <el-form-item prop="phone">
  18. <el-input placeholder="手机号" v-model="form.phone"></el-input>
  19. </el-form-item>
  20. <el-form-item prop="email">
  21. <el-input placeholder="邮箱地址" v-model="form.email"></el-input>
  22. </el-form-item>
  23. <el-form-item prop="city">
  24. <el-input placeholder="加盟城市" v-model="form.city"></el-input>
  25. </el-form-item>
  26. <el-form-item prop="project">
  27. <el-select placeholder="合作项目" v-model="form.project">
  28. <el-option
  29. v-for="(item, index) in projectList"
  30. :key="index"
  31. :label="item.title"
  32. :value="item.title">
  33. </el-option>
  34. </el-select>
  35. </el-form-item>
  36. <div class="submit" @click="handleSubmit('ruleForm')">提交申请</div>
  37. </el-form>
  38. </div>
  39. </div>
  40. </div>
  41. <!-- <div class="form channel">
  42. <div class="text control">加盟申请</div>
  43. <div class="info control">
  44. <img src="~assets/images/campus/phone.png" alt="">
  45. <div class="phone">400-6807300</div>
  46. </div>
  47. <div class="control-input">
  48. <input type="text" placeholder="姓名">
  49. </div>
  50. <div class="control-input">
  51. <input type="text" placeholder="手机号">
  52. </div>
  53. <div class="control-input">
  54. <input type="text" placeholder="邮箱地址">
  55. </div>
  56. <div class="control-input">
  57. <input type="text" placeholder="加盟城市">
  58. </div>
  59. <div class="submit">提交申请</div>
  60. </div> -->
  61. </div>
  62. <!-- 全国校区 -->
  63. <div class="campus">
  64. <div class="title-content">
  65. <div class="c-title title-zh title-content wow animate__animated animate__fadeInDown">
  66. <div class="title-en">NATIONWIDE</div>
  67. 全国校区
  68. </div>
  69. </div>
  70. <div class="c-content w1200">
  71. <div class="list-wrap">
  72. <ul class="list">
  73. <li class="campus-item" v-for="(item, index) in campusList" :key="index">
  74. <img :src="item.imgUrl" alt="">
  75. <div class="info">
  76. <div class="area">{{ item.area }}</div>
  77. <div class="name">{{ item.name }}</div>
  78. <div class="address">
  79. <div class="icon"><img :src="iconAddr" :srcset="`${iconAddrSet[0]} 1x, ${iconAddrSet[1]} 2x`" alt=""></div>
  80. <p>{{ item.address }}</p>
  81. </div>
  82. <div class="phone">
  83. <div class="icon"><img :src="iconPhone" :srcset="`${iconPhoneSet[0]} 1x, ${iconPhoneSet[1]} 2x`" alt=""></div>
  84. <p>{{ item.phone }}</p>
  85. </div>
  86. <div class="detail">
  87. <!-- to="{name:'news-category',params:{category: indexFirstNewsList.articleCategoryId}} -->
  88. <nuxt-link :to="{ name: 'campus-type', params: { type: item.id } }">
  89. 查看详情
  90. </nuxt-link>
  91. </div>
  92. </div>
  93. </li>
  94. </ul>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. </template>
  100. <script>
  101. import axios from "axios";
  102. if (process.browser) {
  103. var {WOW} = require('wowjs')
  104. }
  105. export default {
  106. data() {
  107. return {
  108. form: {},
  109. iconAddr: require('~/assets/images/campus/icon_address.png'),
  110. iconAddrSet: [require('~/assets/images/campus/icon_address.png'), require('~/assets/images/campus/icon_adderss@2x.png')],
  111. iconPhone: require('~/assets/images/campus/icon_phone.png'),
  112. iconPhoneSet: [require('~/assets/images/campus/icon_phone.png'), require('~/assets/images/campus/icon_phone@2x.png')],
  113. campusList: [
  114. {
  115. id: 1,
  116. // imgUrl: 'http://zaojiao.net/public/static/index/images/xq/xq1-1.jpg',
  117. imgUrl: require('~/assets/images/campus/xq1-1.jpg'),
  118. address: '盈港东路8300弄佳乐苑社区商铺',
  119. phone: '4007288000',
  120. name: '襄阳校区',
  121. area: '上海市·上海市市辖区·青浦区'
  122. },
  123. {
  124. id: 2,
  125. imgUrl: require('~/assets/images/campus/xq2-1.jpg'),
  126. address: '盈港东路8300弄佳乐苑社区商铺',
  127. phone: '4007288000',
  128. name: '武汉校区',
  129. area: '上海市·上海市市辖区·青浦区'
  130. },
  131. {
  132. id: 3,
  133. imgUrl: require('~/assets/images/campus/xq3-1.jpg'),
  134. address: '盈港东路8300弄佳乐苑社区商铺',
  135. phone: '4007288000',
  136. name: '唐山校区',
  137. area: '上海市·上海市市辖区·青浦区'
  138. },
  139. {
  140. id: 4,
  141. imgUrl: require('~/assets/images/campus/xq4-1.jpg'),
  142. address: '盈港东路8300弄佳乐苑社区商铺',
  143. phone: '4007288000',
  144. name: '莆田校区',
  145. area: '上海市·上海市市辖区·青浦区'
  146. }
  147. ],
  148. rules: {
  149. name: [{ required: true, message: "请输入姓名", trigger: "blur" }],
  150. phone: [
  151. { required: true, message: "请输入手机号", trigger: "blur" },
  152. {
  153. pattern: /^1[345789]\d{9}$/,
  154. message: "请输入正确手机号",
  155. trigger: "blur",
  156. },
  157. ],
  158. // email: [
  159. // { required: true, message: "请输入邮箱地址", trigger: "blur" },
  160. // {
  161. // type: "email",
  162. // message: "请输入正确的邮箱地址",
  163. // trigger: ["blur", "change"],
  164. // },
  165. // ],
  166. city: [{ required: true, message: "请输入加盟城市", trigger: "blur" }],
  167. },
  168. // 1-家庭(专柜)1-逻辑狗思维游戏HOME&PLUS馆 2-思维芯游戏室 2-“思维芯”四大课程体系 4-逻辑狗·探索小镇
  169. projectList: [
  170. {
  171. id: 1,
  172. value: 1,
  173. title: '家庭(专柜)'
  174. },
  175. {
  176. id: 2,
  177. value: 1,
  178. title: '逻辑狗思维游戏HOME&PLUS馆'
  179. },
  180. {
  181. id: 3,
  182. value: 2,
  183. title: '思维芯游戏室'
  184. },
  185. {
  186. id: 4,
  187. value: 2,
  188. title: '“思维芯”四大课程体系'
  189. },
  190. {
  191. id: 5,
  192. value: 4,
  193. title: '逻辑狗·探索小镇'
  194. }
  195. ],
  196. }
  197. },
  198. head() {
  199. return {
  200. title: "逻辑狗官网-中德智慧教育",
  201. meta: [
  202. {
  203. name: "keywords",
  204. hid: "keywords",
  205. content: `逻辑狗官网、逻辑狗教材、 幼儿园教材、逻辑狗课程、逻辑狗思维训练课程、儿童思维教育、0-12岁儿童`,
  206. },
  207. {
  208. name: "description",
  209. hid: "description",
  210. content: `逻辑狗官方网站,专为0-12岁儿童设计的思维训练课程,中德智慧教育,全球优质教育内容输出平台`,
  211. },
  212. ],
  213. };
  214. },
  215. created() {
  216. },
  217. mounted() {
  218. if (process.browser) {
  219. new WOW({
  220. offset: 0,
  221. live: true
  222. }).init()
  223. }
  224. },
  225. methods: {
  226. async handleSubmit(formName) {
  227. this.$refs[formName].validate(async (valid) => {
  228. if (valid) {
  229. // const index = this.projectList.findIndex(item => {
  230. // return item.id === this.form.project;
  231. // })
  232. // if(index == -1) {
  233. // this.$notify({
  234. // title: '失败',
  235. // message: '选择数据有误',
  236. // type: 'info'
  237. // });
  238. // }
  239. const { data } = await axios.post(`${this.$store.state.wordpressAPI}/official-api/joinIn`,{
  240. ...this.form
  241. });
  242. if(data.status == 200 ) {
  243. this.$notify({
  244. title: '成功',
  245. message: '提交成功',
  246. type: 'success'
  247. });
  248. this.$refs[formName].resetFields();
  249. } else {
  250. this.$notify({
  251. title: '失败',
  252. message: '提交失败',
  253. type: 'info'
  254. });
  255. }
  256. // this.$message.success('提交成功');
  257. } else {
  258. console.log('err');
  259. return false;
  260. }
  261. });
  262. }
  263. }
  264. }
  265. </script>
  266. <style lang="scss">
  267. @import "~static/common/style.sass";
  268. .title-content {
  269. position: relative;
  270. text-align: center;
  271. }
  272. .title-en {
  273. position: absolute;
  274. font-size: 56px;
  275. font-family: PingFangSC-Semibold, sans-serif;
  276. font-weight: 600;
  277. color:rgba(35,106,250,1);
  278. opacity: 0.16;
  279. }
  280. .title-zh {
  281. position: relative;
  282. display: inline-block;
  283. font-size: 46px;
  284. font-family: PingFangSC-Semibold, sans-serif;
  285. font-weight: 600;
  286. color:#333333;
  287. text-align: center;
  288. }
  289. .header {
  290. position: relative;
  291. background-image: url('~assets/images/campus/header.png');
  292. background-repeat: no-repeat;
  293. // background-size: cover;
  294. background-size: 100% 100%;
  295. // height: 882px;
  296. height: 595px;
  297. // padding: 446px 0 0 302px;
  298. padding: 230px 0 0 15%;
  299. background-position: center;
  300. span {
  301. font-size: 66px;
  302. font-family: PingFangSC-Semibold, sans-serif;
  303. font-weight: 600;
  304. color:#ffffff;
  305. line-height: 112px;
  306. }
  307. .right {
  308. font-size: 16px;
  309. position: absolute;
  310. right: 13.8%;
  311. top: 50%;
  312. transform: translateY(-50%);
  313. // bottom: 124px;
  314. width: 327px;
  315. height: 450px;
  316. background-color: #fff;
  317. padding: 34px 38px 12px 39px;
  318. border-radius: 3px;
  319. .submit-area {
  320. .label {
  321. font-size: 14px;
  322. font-family: PingFangSC-Regular, sans-serif;
  323. font-weight: 400;
  324. color: rgba(91, 95, 93, 1);
  325. margin-bottom: 7px;
  326. }
  327. .phone-num {
  328. display: flex;
  329. align-items: center;
  330. img {
  331. width: 22px;
  332. height: 22px;
  333. display: block;
  334. margin-right: 15px;
  335. }
  336. .num {
  337. font-size: 26px;
  338. font-family: PingFangSC-Medium, sans-serif;
  339. font-weight: bold;
  340. color: rgba(0, 0, 0, 1);
  341. }
  342. }
  343. .form {
  344. margin-top: 20px;
  345. display: flex;
  346. flex-direction: column;
  347. justify-content: space-between;
  348. align-items: center;
  349. .el-input {
  350. width: 250px;
  351. height: 44px;
  352. }
  353. .el-form-item__error {
  354. color: #cd2026;
  355. // left: 124px;
  356. }
  357. .el-form-item {
  358. &.is-error {
  359. .el-input__inner {
  360. border-color: #dcdfe6;
  361. }
  362. }
  363. }
  364. .submit {
  365. cursor: pointer;
  366. margin: 0 auto;
  367. text-align: center;
  368. font-size: 14px;
  369. width: 148px;
  370. height: 27px;
  371. line-height: 27px;
  372. background: linear-gradient(
  373. 180deg,
  374. rgba(88, 144, 251, 1) 0%,
  375. rgba(51, 117, 252, 1) 100%
  376. );
  377. box-shadow: 0px 7px 14px 0px rgba(136, 176, 254, 0.79);
  378. border-radius: 3px;
  379. color: #ffffff;
  380. }
  381. img {
  382. width: 176px;
  383. height: 55px;
  384. }
  385. }
  386. }
  387. }
  388. // .form {
  389. // font-size: 16px;
  390. // position: absolute;
  391. // right: 13.8%;
  392. // bottom: 124px;
  393. // width: 327px;
  394. // height: 450px;
  395. // background:#FFFFFF;
  396. // border-radius: 3px;
  397. // padding: 34px 0 12px;
  398. // div.text {
  399. // font-size:14px;
  400. // line-height:20px;
  401. // font-family:PingFangSC-Regular, sans-serif;
  402. // font-weight:400;
  403. // color: #5B5F5D;
  404. // margin-bottom: 7px;
  405. // }
  406. // div.info {
  407. // display: flex;
  408. // align-items: center;
  409. // margin-bottom: 20px;
  410. // .phone {
  411. // font-size: 26px;
  412. // font-family: PingFangSC-Medium, sans-serif;
  413. // font-weight: 500;
  414. // margin-left: 15px;
  415. // }
  416. // }
  417. // .control {
  418. // width:250px;
  419. // margin: 0 auto;
  420. // }
  421. // .control-input {
  422. // margin: 0 auto;
  423. // width:250px;
  424. // border-radius: 3px;
  425. // border: 1px solid rgba(151,151,151,1);
  426. // margin-bottom: 23px;
  427. // input {
  428. // width: 100%;
  429. // height:44px;
  430. // line-height: 44px;
  431. // padding: 0 13px ;
  432. // background: none;
  433. // outline: none;
  434. // border: 0px;
  435. // &::-webkit-input-placeholder {
  436. // color: #A4A6A5;
  437. // }
  438. // }
  439. // }
  440. // .submit {
  441. // margin: 0 auto;
  442. // text-align: center;
  443. // font-size:14px;
  444. // width: 148px;
  445. // height: 27px;
  446. // line-height: 27px;
  447. // background: linear-gradient(180deg,rgba(88,144,251,1) 0%,rgba(51,117,252,1) 100%);
  448. // box-shadow: 0px 7px 14px 0px rgba(136,176,254,0.79);
  449. // border-radius: 3px;
  450. // color: #ffffff;
  451. // }
  452. // }
  453. }
  454. .campus {
  455. padding: 192px 0 206px;
  456. .title-en {
  457. top: -40px;
  458. left: 50%;
  459. transform: translate(-50%);
  460. }
  461. .c-content {
  462. margin-top: 130px;
  463. ul {
  464. li.campus-item {
  465. display: inline-block;
  466. width: 374px;
  467. background:#FFFFFF;
  468. box-shadow: 0px 9px 13px 0px rgba(123,166,252,0.13);
  469. border-radius: 10px;
  470. margin: 0 38px 42px 0;
  471. transition: transform .3s ease-in-out;
  472. &:nth-child(3n) {
  473. margin-right: 0;
  474. }
  475. &:hover {
  476. transform: translate3d(0,-8px,0);
  477. }
  478. img {
  479. width: 100%;
  480. border-radius: 18px 18px 0 0;
  481. }
  482. .info {
  483. height: 175px;
  484. color: #898A8C;
  485. padding: 15px 20px 15px;
  486. .icon {
  487. margin-right: 8px;
  488. img {
  489. width: 10px;
  490. height: 12px;
  491. }
  492. }
  493. }
  494. .area {
  495. font-size:14px;
  496. font-family: PingFangSC-Regular, sans-serif;
  497. font-weight: 400;
  498. color:#898A8C;
  499. line-height: 20px;
  500. }
  501. .name {
  502. font-size:22px;
  503. font-family: PingFangSC-Medium, sans-serif;
  504. font-weight:500;
  505. color:#1F241E;
  506. line-height:30px;
  507. margin-top: 5px;
  508. }
  509. .address {
  510. display: flex;
  511. align-items: center;
  512. margin-top: 9px;
  513. p {
  514. font-size: 12px;
  515. font-family: PingFangSC-Regular, sans-serif;
  516. font-weight: 400;
  517. color:#898A8C;
  518. }
  519. }
  520. .phone {
  521. display: flex;
  522. align-items: center;
  523. margin-top: 2px;
  524. p {
  525. color:#898A8C;
  526. font-size: 12px;
  527. font-family: PingFangSC-Regular, sans-serif;
  528. font-weight: 400;
  529. }
  530. }
  531. .detail {
  532. width: 85px;
  533. line-height: 26px;
  534. border-radius: 4px;
  535. font-size: 10px;
  536. text-align: center;
  537. margin: 17px auto 0;
  538. background: linear-gradient(180deg, #5890FB 0%, #3375FC 100%);
  539. box-shadow: 0px 7px 14px 0px rgba(136, 176, 254, 0.79);
  540. border-radius: 4px;
  541. a {
  542. color: #ffffff;
  543. }
  544. }
  545. }
  546. }
  547. }
  548. }
  549. </style>