Footer.vue 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. <template>
  2. <footer class="lg:bg-[#272E3A] <lg:bg-[#000000]">
  3. <div class="container flex-row items-center py-80px text-white <lg:py-60px">
  4. <div class="lg:flex <lg:flex-row">
  5. <div class="flex-1">
  6. <ul
  7. class="mobile-ul @lg:w-250px @xl:w-250px <lg:pt-20px <lg:pb-15px <lg:max-h-56px <lg:overflow-hidden"
  8. :class="{ active: show.popular }"
  9. >
  10. <li
  11. class="flex justify-between <lg:items-center font-bold lg:mb-24px <lg:mb-18px <lg:cursor-pointer text-sm"
  12. @click="handleClick('popular')"
  13. >
  14. <span>产品</span><img class="w-20px lg:hidden" src="~assets/images/icons/downarrow.png" alt=""/>
  15. </li>
  16. <li class="mb-16px opacity-60 text-xs">
  17. <a class="hover:underline" href="https://www.compdf.com/pdf-sdk">ComPDFKit PDF SDK</a>
  18. </li>
  19. <li class="mb-16px opacity-60 text-xs">
  20. <a class="hover:underline" href="https://www.compdf.com/pdf-conversion-sdk">ComPDFKit 转档 SDK</a>
  21. </li>
  22. <li class="mb-16px opacity-60 text-xs">
  23. <a class="hover:underline" href="javascript:;">ComPDFKit API</a>
  24. </li>
  25. <li class="mb-16px opacity-60 text-xs">
  26. <a class="hover:underline" href="javascript:;">Document AI</a>
  27. </li>
  28. <li class="mb-16px opacity-60 text-xs">
  29. <a class="hover:underline" href="javascript:;">Document AI Web Viewer</a>
  30. </li>
  31. </ul>
  32. </div>
  33. <div class="flex-1">
  34. <ul
  35. class="mobile-ul <lg:pt-20px <lg:pb-15px <lg:max-h-56px <lg:overflow-hidden"
  36. :class="{ active: show.resources }"
  37. >
  38. <li
  39. class="flex justify-between <lg:items-center font-bold lg:mb-24px <lg:mb-18px <lg:cursor-pointer text-sm"
  40. @click="handleClick('resources')"
  41. >
  42. <span>开发支持</span><img class="w-20px lg:hidden" src="~assets/images/icons/downarrow.png" alt=""/>
  43. </li>
  44. <li class="mb-16px opacity-60 text-xs"><a class="hover:underline" href="javascript:;">联系销售</a></li>
  45. <li class="mb-16px opacity-60 text-xs">
  46. <a class="hover:underline" href="/contact-sales">免费试用</a>
  47. </li>
  48. </ul>
  49. </div>
  50. <div class="flex-1">
  51. <ul
  52. class="
  53. mobile-ul
  54. <lg:pt-20px <lg:pb-15px <lg:max-h-56px <lg:overflow-hidden
  55. "
  56. :class="{ active: show.company }"
  57. >
  58. <li
  59. class="flex justify-between <lg:items-center font-bold lg:mb-24px <lg:mb-18px <lg:cursor-pointer text-sm"
  60. @click="handleClick('company')"
  61. >
  62. <span>公司</span><img class="w-20px lg:hidden" src="~assets/images/icons/downarrow.png" alt="" />
  63. </li>
  64. <li class="mb-16px opacity-60 text-xs">
  65. <a class="hover:underline" href="https://www.compdf.com/privacy-policy">隐私协议</a>
  66. </li>
  67. <li class="mb-16px opacity-60 text-xs">
  68. <a class="hover:underline" href="https://www.compdf.com/terms-of-service">服务条款</a>
  69. </li>
  70. </ul>
  71. </div>
  72. <div class="flex-1">
  73. <ul class="mobile-ul <lg:pt-20px <lg:pb-20px <lg:flex <lg:flex-col-reverse">
  74. <div>
  75. <li class="lg:mb-4px text-sm font-bold <lg:mb-8px"><span>订阅我们</span></li>
  76. <li class="mb-16px opacity-60 text-xs">获取ComPDFKit最新技术、专属定制方案</li>
  77. <li>
  78. <div class="relative mobile-input h-44px w-full lg:min-w-340px <lg:border-2 <lg:border-[#2F2F2F] <lg:flex <lg:items-center">
  79. <input
  80. v-model="email"
  81. type="email"
  82. name="member[email]"
  83. :disabled="sending"
  84. class="w-full h-44px py-6px px-16px lg:rounded-full bg-brand-2 text-brand-4 <lg:bg-[#000] <lg:h-40px lg:focus:border-1px lg:focus:border-white/50 lg:focus:border-solid lg:focus:pl-15px"
  85. placeholder="输入您的邮箱"
  86. @focus="clearText"
  87. />
  88. <button
  89. type="submit"
  90. class="flex items-center absolute lg:top-1px lg:right-1px lg:h-42px py-10px px-20px lg:rounded-full bg-brand-0 text-sm <lg:h-44px <lg:bg-[#1460F3] <lg:top-[-2px] <lg:right-[-2px] hover:bg-[#548CF9]"
  91. @click.prevent="onSubmit"
  92. >
  93. <span class="<lg:hidden">订阅</span>
  94. <Arrow class="w-16px text-white lg:hidden" />
  95. </button>
  96. </div>
  97. </li>
  98. <li>
  99. <span class=" text-[#FF5050]">{{ errText }}</span>
  100. <span class="">{{ succText }}</span>
  101. </li>
  102. </div>
  103. </ul>
  104. <ul>
  105. <li class="pt-28px <lg:pt-22px">
  106. <el-dropdown trigger="click" placement="bottom-start" @command="handleCommand">
  107. <span class="pointer text-white text-16px leading-24px font-700">
  108. 语言切换<i class="el-icon-arrow-down el-icon--right text-12px"></i>
  109. </span>
  110. <el-dropdown-menu slot="dropdown">
  111. <el-dropdown-item command="/" style="color: #1460F3;">中文(简体)</el-dropdown-item>
  112. <el-dropdown-item command="https://www.compdf.com/">English</el-dropdown-item>
  113. </el-dropdown-menu>
  114. </el-dropdown>
  115. </li>
  116. </ul>
  117. </div>
  118. </div>
  119. <div class="flex-row mt-50px <lg:mt-25px">
  120. <div class="flex tiny:justify-center items-center">
  121. <Logo /> <span class="font-bold text-tiny ml-10px">ComPDFKit</span>
  122. </div>
  123. <div class="text-xs tiny:text-center mt-16px opacity-80">© 2014-{{ new Date().getFullYear() }} PDF Technologies, Inc. All Rights Reserved.</div>
  124. </div>
  125. </div>
  126. </footer>
  127. </template>
  128. <script>
  129. import checkEmail from '~/utils/checkemail'
  130. import Logo from "~/assets/images/icons/logo.svg?inline";
  131. import Twitter from "~/assets/images/icons/twitter.svg?inline";
  132. import TwitterHover from "~/assets/images/icons/twitter_hover.svg?inline";
  133. import FaceBook from "~/assets/images/icons/facebook.svg?inline";
  134. import FaceBookHover from "~/assets/images/icons/facebook_hover.svg?inline";
  135. import Arrow from '~/assets/images/icons/arrow.svg?inline'
  136. export default {
  137. components: {
  138. Logo,
  139. Twitter,
  140. TwitterHover,
  141. FaceBook,
  142. FaceBookHover,
  143. Arrow
  144. },
  145. data () {
  146. return {
  147. email: '',
  148. errText: '',
  149. succText: '',
  150. sending: false,
  151. pre: '',
  152. show: {
  153. popular: false,
  154. resources: false,
  155. company: false
  156. }
  157. }
  158. },
  159. methods: {
  160. handleClick (item) {
  161. if (this.pre === item && this.show[item]) {
  162. this.show[item] = false
  163. this.pre = ''
  164. return
  165. }
  166. if (this.pre !== '') {
  167. this.show[this.pre] = !this.show[this.pre]
  168. }
  169. this.pre = item
  170. this.show[item] = !this.show[item]
  171. },
  172. onSubmit() {
  173. if (this.sending) return
  174. if (this.email === '') {
  175. this.errText = 'Please enter the correct email'
  176. return
  177. }
  178. if (!checkEmail(this.email)) {
  179. this.errText = 'Please enter the correct email'
  180. return
  181. }
  182. this.sending = true
  183. this.$axios({
  184. url: '/api/subscription',
  185. method: 'POST',
  186. data: {
  187. 'email': this.email,
  188. 'subscribed': 1
  189. },
  190. transformRequest: [function (data) {
  191. let ret = ''
  192. for (let item in data) {
  193. ret += encodeURIComponent(item) + '=' + encodeURIComponent(data[item]) + '&'
  194. }
  195. ret = ret.substr(0, ret.length - 1)
  196. return ret
  197. }]
  198. })
  199. .then((res) => {
  200. this.sending = false
  201. this.succText = 'Thanks for subscribing!'
  202. })
  203. },
  204. clearText() {
  205. this.errText = ''
  206. this.succText = ''
  207. },
  208. handleCommand(command) {
  209. window.location.href = command
  210. }
  211. }
  212. }
  213. </script>
  214. <style lang="scss" scoped>
  215. a {
  216. color: #ffffff;
  217. }
  218. #tw {
  219. .svg {
  220. display: inline-block;
  221. }
  222. .svg-hover {
  223. display: none;
  224. }
  225. }
  226. #tw:hover {
  227. .svg {
  228. display: none;
  229. }
  230. .svg-hover {
  231. display: inline-block;
  232. }
  233. }
  234. #fa {
  235. .svg {
  236. display: inline-block;
  237. }
  238. .svg-hover {
  239. display: none;
  240. }
  241. }
  242. #fa:hover {
  243. .svg {
  244. display: none;
  245. }
  246. .svg-hover {
  247. display: inline-block;
  248. }
  249. }
  250. ::v-deep.el-dropdown-menu {
  251. padding: 20px 17px 4px;
  252. margin-top: 6px;
  253. }
  254. ::v-deep.el-dropdown-menu__item {
  255. font-size: 16px;
  256. line-height: 24px;
  257. color: #18191B;
  258. padding: 0;
  259. padding-bottom: 16px;
  260. &:last-child {
  261. padding-bottom: 0;
  262. }
  263. }
  264. ::v-deep.el-dropdown-menu__item:focus, .el-dropdown-menu__item:not(.is-disabled):hover {
  265. background-color: unset;
  266. color: unset;
  267. }
  268. ::v-deep.el-popper .popper__arrow {
  269. display: none;
  270. }
  271. @media screen and (max-width: 930px) {
  272. .mobile-ul {
  273. border-bottom: 1px solid #2F2F2F;
  274. .mobile-input {
  275. input {
  276. border-radius: 0px 4px 4px 0px;
  277. }
  278. button {
  279. border-radius: 0px 4px 4px 0px;
  280. }
  281. }
  282. }
  283. .active {
  284. max-height: 508px;
  285. transition: all 0.2s ease-in-out;
  286. img {
  287. transform: rotateZ(180deg);
  288. }
  289. }
  290. }
  291. </style>