index.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495
  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: 600;
  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. height: 595px;
  242. // padding: 446px 0 0 302px;
  243. padding: 230px 0 0 15%;
  244. span {
  245. font-size: 66px;
  246. font-family: PingFangSC-Semibold,PingFang SC;
  247. font-weight: 600;
  248. color:#ffffff;
  249. line-height: 112px;
  250. }
  251. .right {
  252. font-size: 16px;
  253. position: absolute;
  254. right: 13.8%;
  255. top: 50%;
  256. transform: translateY(-50%);
  257. // bottom: 124px;
  258. width: 327px;
  259. height: 450px;
  260. background-color: #fff;
  261. padding: 34px 38px 12px 39px;
  262. border-radius: 3px;
  263. .submit-area {
  264. .label {
  265. font-size: 14px;
  266. font-family: PingFangSC-Regular, PingFang SC;
  267. font-weight: 400;
  268. color: rgba(91, 95, 93, 1);
  269. margin-bottom: 7px;
  270. }
  271. .phone-num {
  272. display: flex;
  273. align-items: center;
  274. img {
  275. width: 22px;
  276. height: 22px;
  277. display: block;
  278. margin-right: 15px;
  279. }
  280. .num {
  281. font-size: 26px;
  282. font-family: PingFangSC-Medium, PingFang SC;
  283. font-weight: bold;
  284. color: rgba(0, 0, 0, 1);
  285. }
  286. }
  287. .form {
  288. margin-top: 20px;
  289. display: flex;
  290. flex-direction: column;
  291. justify-content: space-between;
  292. align-items: center;
  293. .el-input {
  294. width: 250px;
  295. height: 44px;
  296. }
  297. .el-form-item__error {
  298. color: #cd2026;
  299. // left: 124px;
  300. }
  301. .el-form-item {
  302. &.is-error {
  303. .el-input__inner {
  304. border-color: #dcdfe6;
  305. }
  306. }
  307. }
  308. .submit {
  309. cursor: pointer;
  310. margin: 0 auto;
  311. text-align: center;
  312. font-size: 14px;
  313. width: 148px;
  314. height: 27px;
  315. line-height: 27px;
  316. background: linear-gradient(
  317. 180deg,
  318. rgba(88, 144, 251, 1) 0%,
  319. rgba(51, 117, 252, 1) 100%
  320. );
  321. box-shadow: 0px 7px 14px 0px rgba(136, 176, 254, 0.79);
  322. border-radius: 3px;
  323. color: #ffffff;
  324. }
  325. img {
  326. width: 176px;
  327. height: 55px;
  328. }
  329. }
  330. }
  331. }
  332. // .form {
  333. // font-size: 16px;
  334. // position: absolute;
  335. // right: 13.8%;
  336. // bottom: 124px;
  337. // width: 327px;
  338. // height: 450px;
  339. // background:#FFFFFF;
  340. // border-radius: 3px;
  341. // padding: 34px 0 12px;
  342. // div.text {
  343. // font-size:14px;
  344. // line-height:20px;
  345. // font-family:PingFangSC-Regular,PingFang SC;
  346. // font-weight:400;
  347. // color: #5B5F5D;
  348. // margin-bottom: 7px;
  349. // }
  350. // div.info {
  351. // display: flex;
  352. // align-items: center;
  353. // margin-bottom: 20px;
  354. // .phone {
  355. // font-size: 26px;
  356. // font-family: PingFangSC-Medium,PingFang SC;
  357. // font-weight: 500;
  358. // margin-left: 15px;
  359. // }
  360. // }
  361. // .control {
  362. // width:250px;
  363. // margin: 0 auto;
  364. // }
  365. // .control-input {
  366. // margin: 0 auto;
  367. // width:250px;
  368. // border-radius: 3px;
  369. // border: 1px solid rgba(151,151,151,1);
  370. // margin-bottom: 23px;
  371. // input {
  372. // width: 100%;
  373. // height:44px;
  374. // line-height: 44px;
  375. // padding: 0 13px ;
  376. // background: none;
  377. // outline: none;
  378. // border: 0px;
  379. // &::-webkit-input-placeholder {
  380. // color: #A4A6A5;
  381. // }
  382. // }
  383. // }
  384. // .submit {
  385. // margin: 0 auto;
  386. // text-align: center;
  387. // font-size:14px;
  388. // width: 148px;
  389. // height: 27px;
  390. // line-height: 27px;
  391. // background: linear-gradient(180deg,rgba(88,144,251,1) 0%,rgba(51,117,252,1) 100%);
  392. // box-shadow: 0px 7px 14px 0px rgba(136,176,254,0.79);
  393. // border-radius: 3px;
  394. // color: #ffffff;
  395. // }
  396. // }
  397. }
  398. .campus {
  399. padding: 192px 0 206px;
  400. .title-en {
  401. top: -40px;
  402. left: 50%;
  403. transform: translate(-50%);
  404. }
  405. .c-content {
  406. margin-top: 130px;
  407. ul {
  408. li.campus-item {
  409. display: inline-block;
  410. width: 374px;
  411. background:#FFFFFF;
  412. box-shadow: 0px 9px 13px 0px rgba(123,166,252,0.13);
  413. border-radius: 10px;
  414. margin: 0 38px 42px 0;
  415. transition: transform .3s ease-in-out;
  416. &:nth-child(3n) {
  417. margin-right: 0;
  418. }
  419. &:hover {
  420. transform: translate3d(0,-8px,0);
  421. }
  422. img {
  423. width: 100%;
  424. border-radius: 18px 18px 0 0;
  425. }
  426. .info {
  427. height: 175px;
  428. color: #898A8C;
  429. padding: 15px 20px 15px;
  430. .icon {
  431. margin-right: 8px;
  432. }
  433. }
  434. .area {
  435. font-size:14px;
  436. font-family: PingFangSC-Regular,PingFang SC;
  437. font-weight: 400;
  438. color:#898A8C;
  439. line-height: 20px;
  440. }
  441. .name {
  442. font-size:22px;
  443. font-family: PingFangSC-Medium,PingFang SC;
  444. font-weight:500;
  445. color:#1F241E;
  446. line-height:30px;
  447. margin-top: 5px;
  448. }
  449. .address {
  450. display: flex;
  451. align-items: center;
  452. font-size: 12px;
  453. font-family: PingFangSC-Regular,PingFang SC;
  454. font-weight: 400;
  455. line-height: 17px;
  456. margin-top: 9px;
  457. }
  458. .phone {
  459. display: flex;
  460. align-items: center;
  461. font-size: 12px;
  462. font-family: PingFangSC-Regular,PingFang SC;
  463. font-weight: 400;
  464. line-height: 17px;
  465. margin-top: 2px;
  466. }
  467. .detail {
  468. width: 85px;
  469. height: 26px;
  470. line-height: 26px;
  471. border-radius: 4px;
  472. border: 1px solid #4B86FB;
  473. font-size: 10px;
  474. text-align: center;
  475. color: #1B1616;
  476. margin: 17px auto 0;
  477. }
  478. }
  479. }
  480. }
  481. }
  482. </style>