| @@ -7,7 +7,7 @@ | |||
| <div class="tiemBox"> | |||
| <div class="taolIconBox"> | |||
| <div class="taolIconText"> | |||
| {{ characters == 1 ? "关注我们" : "follow Us" }} | |||
| {{ characters == 1 ? '关注我们' : 'follow Us' }} | |||
| </div> | |||
| <div class="iconBox"> | |||
| <img src="../../assets/img/f.png" alt /> | |||
| @@ -19,7 +19,7 @@ | |||
| <div class="contentBox"> | |||
| <div class="taolIconText"> | |||
| {{ characters == 1 ? "联系我们" : "Contact us" }} | |||
| {{ characters == 1 ? '联系我们' : 'Contact us' }} | |||
| </div> | |||
| <div class="contentInput"> | |||
| <!-- <input type="text" :placeholder="characters ==1?'姓名':'Name'" v-model="userName"> --> | |||
| @@ -44,7 +44,7 @@ | |||
| ></el-input> | |||
| </div> | |||
| <div class="subBtn" @click="submit()"> | |||
| {{ characters == 1 ? "提交" : "Submit" }} | |||
| {{ characters == 1 ? '提交' : 'Submit' }} | |||
| </div> | |||
| </div> | |||
| @@ -53,8 +53,8 @@ | |||
| <div class="site"> | |||
| {{ | |||
| characters == 1 | |||
| ? "北京市海淀区中关村南大街12号农业科学院信息楼311室" | |||
| : "311, Information Building, Academy of Agricultural Sciences, No. 12 Zhongguancun South Street, Haidian District, Beijing" | |||
| ? '北京市海淀区中关村南大街12号农业科学院信息楼311室' | |||
| : '311, Information Building, Academy of Agricultural Sciences, No. 12 Zhongguancun South Street, Haidian District, Beijing' | |||
| }} | |||
| </div> | |||
| <div class="rqCodeTiemBox"> | |||
| @@ -75,73 +75,75 @@ | |||
| </div> | |||
| <div class="tailText"> | |||
| © 2021 Copyright 北京邃芒科技有限公司 版权所有 京ICP备2021007416号 | |||
| <!-- © 2021 Copyright 北京邃芒科技有限公司 版权所有 京ICP备2021007416号 --> | |||
| © 2021 Copyright 北京邃芒科技有限公司 版权所有 | |||
| <a href="https://beian.miit.gov.cn">京ICP备2023005136号-1</a> | |||
| </div> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { mapState } from "vuex"; | |||
| import { mapState } from 'vuex' | |||
| export default { | |||
| data() { | |||
| return { | |||
| userName: "", | |||
| phone: "", | |||
| email: "", | |||
| }; | |||
| userName: '', | |||
| phone: '', | |||
| email: '' | |||
| } | |||
| }, | |||
| methods: { | |||
| submit() { | |||
| let phone = /^1[35789]\d{9}$/; | |||
| if (this.userName == "") { | |||
| let phone = /^1[35789]\d{9}$/ | |||
| if (this.userName == '') { | |||
| this.$message.error( | |||
| this.characters == 1 ? "请输入姓名" : "Please enter your name" | |||
| ); | |||
| return; | |||
| this.characters == 1 ? '请输入姓名' : 'Please enter your name' | |||
| ) | |||
| return | |||
| } else if (!phone.test(this.phone)) { | |||
| this.$message.error( | |||
| this.characters == 1 | |||
| ? "请输入手机号" | |||
| : "Please enter your mobile phone number" | |||
| ); | |||
| return; | |||
| } else if (this.email == "") { | |||
| ? '请输入手机号' | |||
| : 'Please enter your mobile phone number' | |||
| ) | |||
| return | |||
| } else if (this.email == '') { | |||
| this.$message.error( | |||
| this.characters == 1 ? "请输入邮箱" : "Please enter email address" | |||
| ); | |||
| return; | |||
| this.characters == 1 ? '请输入邮箱' : 'Please enter email address' | |||
| ) | |||
| return | |||
| } | |||
| let params = { | |||
| mallName: this.email, //邮箱 | |||
| applicant: this.userName, //姓名 | |||
| phone: this.phone, //电话 | |||
| }; | |||
| phone: this.phone //电话 | |||
| } | |||
| this.$axios({ | |||
| method: "post", | |||
| url: "/api/callback/wxMallApply/add", | |||
| method: 'post', | |||
| url: '/api/callback/wxMallApply/add', | |||
| headers: { | |||
| "Content-Type": "application/json;charset=UTF-8", | |||
| 'Content-Type': 'application/json;charset=UTF-8' | |||
| }, | |||
| data: params, | |||
| data: params | |||
| }) | |||
| .then((res) => { | |||
| this.email = ""; | |||
| this.userName = ""; | |||
| this.phone = ""; | |||
| this.email = '' | |||
| this.userName = '' | |||
| this.phone = '' | |||
| this.$message.success( | |||
| this.characters == 1 ? "提交成功" : "submit successfully" | |||
| ); | |||
| this.characters == 1 ? '提交成功' : 'submit successfully' | |||
| ) | |||
| }) | |||
| .catch((err) => { | |||
| this.$message.error(err.message); | |||
| }); | |||
| }, | |||
| this.$message.error(err.message) | |||
| }) | |||
| } | |||
| }, | |||
| computed: { | |||
| ...mapState({ | |||
| characters: (state) => state.publicObj.characters, | |||
| }), | |||
| }, | |||
| }; | |||
| characters: (state) => state.publicObj.characters | |||
| }) | |||
| } | |||
| } | |||
| </script> | |||
| <style lang="scss" scoped> | |||
| @@ -306,6 +308,17 @@ export default { | |||
| color: #191919; | |||
| line-height: 62px; | |||
| opacity: 0.5; | |||
| a { | |||
| text-decoration: none; | |||
| color: #333; | |||
| } | |||
| a:hover, | |||
| a:visited, | |||
| a:link, | |||
| a:active { | |||
| color: #333; | |||
| // 设置使所有a标签的四种状态都和本身颜色保持一致,样式代码自己写 | |||
| } | |||
| } | |||
| } | |||
| ::-webkit-input-placeholder { | |||