index.vue 14 KB

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