index.vue 15 KB

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