index.vue 14 KB

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