SdkForm.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511
  1. <template>
  2. <Fragment>
  3. <div v-if="postSuccess" class="success-modal">
  4. <img src="http://cn-file.17pdf.com/website/sdk/ic_store_success.png" alt="success">
  5. <div class="title">感谢您与我们联系。</div>
  6. <div class="desc">您的信息已成功发送。</div>
  7. </div>
  8. <div v-else class="modal-body">
  9. <h4 class="modal-title">
  10. 联系信息
  11. </h4>
  12. <div class="name info-container">
  13. <div class="first-name"><input v-model="form.first_name" type="text" placeholder="姓氏">
  14. <div v-show="emptyItems.includes('first_name')" class="err">请输入姓氏</div>
  15. </div>
  16. <div class="last-name"><input v-model="form.last_name" type="text" placeholder="名字">
  17. <div v-show="emptyItems.includes('last_name')" class="err">请输入名字</div>
  18. </div>
  19. </div>
  20. <div class="email info-container"><input v-model="form.email" type="email" placeholder="电子邮箱">
  21. <div v-show="emptyItems.includes('email')" class="err">请输入电子邮箱</div>
  22. <div v-show="emptyItems.includes('right-email')" class="err-email">请输入正确的电子邮箱</div>
  23. </div>
  24. <div class="job-phone info-container">
  25. <div class="job-title"><input v-model="form.job_title" type="text" placeholder="职位" >
  26. <div v-show="emptyItems.includes('job_title')" class="err">请输入职位</div>
  27. </div>
  28. <div class="phone-number"><input v-model="form.phone" type="text" placeholder="电话号码">
  29. <div v-show="emptyItems.includes('phone')" class="err">请输入电话号码</div>
  30. </div>
  31. </div>
  32. <div class="company info-container"><input v-model="form.company" type="text" placeholder="企业名称">
  33. <div v-show="emptyItems.includes('company')" class="err">请输入企业名称</div>
  34. </div>
  35. <div class="website info-container"><input v-model="form.website" type="text" placeholder="企业网站">
  36. <div v-show="emptyItems.includes('website')" class="err">请输入企业网站</div>
  37. </div>
  38. <div class="country info-container">
  39. <label>国家/地区*</label>
  40. <select v-model="form.country" onChange="this.blur();">
  41. <option value="Afghanistan">Afghanistan</option>
  42. <option value="Åland Islands">Åland Islands</option>
  43. <option value="Albania">Albania</option>
  44. <option value="Algeria">Algeria</option>
  45. <option value="American Samoa">American Samoa</option>
  46. <option value="Andorra">Andorra</option>
  47. <option value="Angola">Angola</option>
  48. <option value="Anguilla">Anguilla</option>
  49. <option value="Antarctica">Antarctica</option>
  50. <option value="Antigua and Barbuda">Antigua and Barbuda</option>
  51. <option value="Argentina">Argentina</option>
  52. <option value="Armenia">Armenia</option>
  53. <option value="Aruba">Aruba</option>
  54. <option value="Australia">Australia</option>
  55. <option value="Austria">Austria</option>
  56. <option value="Azerbaijan">Azerbaijan</option>
  57. <option value="Bahamas">Bahamas</option>
  58. <option value="Bahrain">Bahrain</option>
  59. <option value="Bangladesh">Bangladesh</option>
  60. <option value="Barbados">Barbados</option>
  61. <option value="Belarus">Belarus</option>
  62. <option value="Belgium">Belgium</option>
  63. <option value="Belize">Belize</option>
  64. <option value="Benin">Benin</option>
  65. <option value="Bermuda">Bermuda</option>
  66. <option value="Bhutan">Bhutan</option>
  67. <option value="Bolivia, Plurinational State of">Bolivia, Plurinational State of</option>
  68. <option value="Bonaire, Sint Eustatius and Saba">Bonaire, Sint Eustatius and Saba</option>
  69. <option value="Bosnia and Herzegovina">Bosnia and Herzegovina</option>
  70. <option value="Botswana">Botswana</option>
  71. <option value="Bouvet Island">Bouvet Island</option>
  72. <option value="Brazil">Brazil</option>
  73. <option value="British Indian Ocean Territory">British Indian Ocean Territory</option>
  74. <option value="Brunei Darussalam">Brunei Darussalam</option>
  75. <option value="Bulgaria">Bulgaria</option>
  76. <option value="Burkina Faso">Burkina Faso</option>
  77. <option value="Burundi">Burundi</option>
  78. <option value="Cambodia">Cambodia</option>
  79. <option value="Cameroon">Cameroon</option>
  80. <option value="Canada">Canada</option>
  81. <option value="Cape Verde">Cape Verde</option>
  82. <option value="Cayman Islands">Cayman Islands</option>
  83. <option value="Central African Republic">Central African Republic</option>
  84. <option value="Chad">Chad</option>
  85. <option value="Chile">Chile</option>
  86. <option value="China">China</option>
  87. <option value="Christmas Island">Christmas Island</option>
  88. <option value="Cocos (Keeling) Islands">Cocos (Keeling) Islands</option>
  89. <option value="Colombia">Colombia</option>
  90. <option value="Comoros">Comoros</option>
  91. <option value="Congo">Congo</option>
  92. <option value="Congo, the Democratic Republic of the">Congo, the Democratic Republic of the</option>
  93. <option value="Cook Islands">Cook Islands</option>
  94. <option value="Costa Rica">Costa Rica</option>
  95. <option value="Côte d'Ivoire">Côte d'Ivoire</option>
  96. <option value="Croatia">Croatia</option>
  97. <option value="Cuba">Cuba</option>
  98. <option value="Curaçao">Curaçao</option>
  99. <option value="Cyprus">Cyprus</option>
  100. <option value="Czech Republic">Czech Republic</option>
  101. <option value="Denmark">Denmark</option>
  102. <option value="Djibouti">Djibouti</option>
  103. <option value="Dominica">Dominica</option>
  104. <option value="Dominican Republic">Dominican Republic</option>
  105. <option value="Ecuador">Ecuador</option>
  106. <option value="Egypt">Egypt</option>
  107. <option value="El Salvador">El Salvador</option>
  108. <option value="Equatorial Guinea">Equatorial Guinea</option>
  109. <option value="Eritrea">Eritrea</option>
  110. <option value="Estonia">Estonia</option>
  111. <option value="Ethiopia">Ethiopia</option>
  112. <option value="Falkland Islands (Malvinas)">Falkland Islands (Malvinas)</option>
  113. <option value="Faroe Islands">Faroe Islands</option>
  114. <option value="Fiji">Fiji</option>
  115. <option value="Finland">Finland</option>
  116. <option value="France">France</option>
  117. <option value="French Guiana">French Guiana</option>
  118. <option value="French Polynesia">French Polynesia</option>
  119. <option value="French Southern Territories">French Southern Territories</option>
  120. <option value="Gabon">Gabon</option>
  121. <option value="Gambia">Gambia</option>
  122. <option value="Georgia">Georgia</option>
  123. <option value="Germany">Germany</option>
  124. <option value="Ghana">Ghana</option>
  125. <option value="Gibraltar">Gibraltar</option>
  126. <option value="Greece">Greece</option>
  127. <option value="Greenland">Greenland</option>
  128. <option value="Grenada">Grenada</option>
  129. <option value="Guadeloupe">Guadeloupe</option>
  130. <option value="Guam">Guam</option>
  131. <option value="Guatemala">Guatemala</option>
  132. <option value="Guernsey">Guernsey</option>
  133. <option value="Guinea">Guinea</option>
  134. <option value="Guinea-Bissau">Guinea-Bissau</option>
  135. <option value="Guyana">Guyana</option>
  136. <option value="Haiti">Haiti</option>
  137. <option value="Heard Island and McDonald Islands">Heard Island and McDonald Islands</option>
  138. <option value="Holy See (Vatican City State)">Holy See (Vatican City State)</option>
  139. <option value="Honduras">Honduras</option>
  140. <option value="Hong Kong">Hong Kong</option>
  141. <option value="Hungary">Hungary</option>
  142. <option value="Iceland">Iceland</option>
  143. <option value="India">India</option>
  144. <option value="Indonesia">Indonesia</option>
  145. <option value="Iran, Islamic Republic of">Iran, Islamic Republic of</option>
  146. <option value="Iraq">Iraq</option>
  147. <option value="Ireland">Ireland</option>
  148. <option value="Isle of Man">Isle of Man</option>
  149. <option value="Israel">Israel</option>
  150. <option value="Italy">Italy</option>
  151. <option value="Jamaica">Jamaica</option>
  152. <option value="Japan">Japan</option>
  153. <option value="Jersey">Jersey</option>
  154. <option value="Jordan">Jordan</option>
  155. <option value="Kazakhstan">Kazakhstan</option>
  156. <option value="Kenya">Kenya</option>
  157. <option value="Kiribati">Kiribati</option>
  158. <option value="Korea, Democratic People's Republic of">Korea, Democratic People's Republic of</option>
  159. <option value="Korea, Republic of">Korea, Republic of</option>
  160. <option value="Kuwait">Kuwait</option>
  161. <option value="Kyrgyzstan">Kyrgyzstan</option>
  162. <option value="Lao People's Democratic Republic">Lao People's Democratic Republic</option>
  163. <option value="Latvia">Latvia</option>
  164. <option value="Lebanon">Lebanon</option>
  165. <option value="Lesotho">Lesotho</option>
  166. <option value="Liberia">Liberia</option>
  167. <option value="Libya">Libya</option>
  168. <option value="Liechtenstein">Liechtenstein</option>
  169. <option value="Lithuania">Lithuania</option>
  170. <option value="Luxembourg">Luxembourg</option>
  171. <option value="Macao">Macao</option>
  172. <option value="Macedonia, the Former Yugoslav Republic of">Macedonia, the Former Yugoslav Republic of</option>
  173. <option value="Madagascar">Madagascar</option>
  174. <option value="Malawi">Malawi</option>
  175. <option value="Malaysia">Malaysia</option>
  176. <option value="Maldives">Maldives</option>
  177. <option value="Mali">Mali</option>
  178. <option value="Malta">Malta</option>
  179. <option value="Marshall Islands">Marshall Islands</option>
  180. <option value="Martinique">Martinique</option>
  181. <option value="Mauritania">Mauritania</option>
  182. <option value="Mauritius">Mauritius</option>
  183. <option value="Mayotte">Mayotte</option>
  184. <option value="Mexico">Mexico</option>
  185. <option value="Micronesia, Federated States of">Micronesia, Federated States of</option>
  186. <option value="Moldova, Republic of">Moldova, Republic of</option>
  187. <option value="Monaco">Monaco</option>
  188. <option value="Mongolia">Mongolia</option>
  189. <option value="Montenegro">Montenegro</option>
  190. <option value="Montserrat">Montserrat</option>
  191. <option value="Morocco">Morocco</option>
  192. <option value="Mozambique">Mozambique</option>
  193. <option value="Myanmar">Myanmar</option>
  194. <option value="Namibia">Namibia</option>
  195. <option value="Nauru">Nauru</option>
  196. <option value="Nepal">Nepal</option>
  197. <option value="Netherlands">Netherlands</option>
  198. <option value="New Caledonia">New Caledonia</option>
  199. <option value="New Zealand">New Zealand</option>
  200. <option value="Nicaragua">Nicaragua</option>
  201. <option value="Niger">Niger</option>
  202. <option value="Nigeria">Nigeria</option>
  203. <option value="Niue">Niue</option>
  204. <option value="Norfolk Island">Norfolk Island</option>
  205. <option value="Northern Mariana Islands">Northern Mariana Islands</option>
  206. <option value="Norway">Norway</option>
  207. <option value="Oman">Oman</option>
  208. <option value="Pakistan">Pakistan</option>
  209. <option value="Palau">Palau</option>
  210. <option value="Palestine, State of">Palestine, State of</option>
  211. <option value="Panama">Panama</option>
  212. <option value="Papua New Guinea">Papua New Guinea</option>
  213. <option value="Paraguay">Paraguay</option>
  214. <option value="Peru">Peru</option>
  215. <option value="Philippines">Philippines</option>
  216. <option value="Pitcairn">Pitcairn</option>
  217. <option value="Poland">Poland</option>
  218. <option value="Portugal">Portugal</option>
  219. <option value="Puerto Rico">Puerto Rico</option>
  220. <option value="Qatar">Qatar</option>
  221. <option value="Réunion">Réunion</option>
  222. <option value="Romania">Romania</option>
  223. <option value="Russian Federation">Russian Federation</option>
  224. <option value="Rwanda">Rwanda</option>
  225. <option value="Saint Barthélemy">Saint Barthélemy</option>
  226. <option value="Saint Helena, Ascension and Tristan da Cunha">Saint Helena, Ascension and Tristan da Cunha</option>
  227. <option value="Saint Kitts and Nevis">Saint Kitts and Nevis</option>
  228. <option value="Saint Lucia">Saint Lucia</option>
  229. <option value="Saint Martin (French part)">Saint Martin (French part)</option>
  230. <option value="Saint Pierre and Miquelon">Saint Pierre and Miquelon</option>
  231. <option value="Saint Vincent and the Grenadines">Saint Vincent and the Grenadines</option>
  232. <option value="Samoa">Samoa</option>
  233. <option value="San Marino">San Marino</option>
  234. <option value="Sao Tome and Principe">Sao Tome and Principe</option>
  235. <option value="Saudi Arabia">Saudi Arabia</option>
  236. <option value="Senegal">Senegal</option>
  237. <option value="Serbia">Serbia</option>
  238. <option value="Seychelles">Seychelles</option>
  239. <option value="Sierra Leone">Sierra Leone</option>
  240. <option value="Singapore">Singapore</option>
  241. <option value="Sint Maarten (Dutch part)">Sint Maarten (Dutch part)</option>
  242. <option value="Slovakia">Slovakia</option>
  243. <option value="Slovenia">Slovenia</option>
  244. <option value="Solomon Islands">Solomon Islands</option>
  245. <option value="Somalia">Somalia</option>
  246. <option value="South Africa">South Africa</option>
  247. <option value="South Georgia and the South Sandwich Islands">South Georgia and the South Sandwich Islands</option>
  248. <option value="South Sudan">South Sudan</option>
  249. <option value="Spain">Spain</option>
  250. <option value="Sri Lanka">Sri Lanka</option>
  251. <option value="Sudan">Sudan</option>
  252. <option value="Suriname">Suriname</option>
  253. <option value="Svalbard and Jan Mayen">Svalbard and Jan Mayen</option>
  254. <option value="Swaziland">Swaziland</option>
  255. <option value="Sweden">Sweden</option>
  256. <option value="Switzerland">Switzerland</option>
  257. <option value="Syrian Arab Republic">Syrian Arab Republic</option>
  258. <option value="Taiwan">Taiwan</option>
  259. <option value="Tajikistan">Tajikistan</option>
  260. <option value="Tanzania, United Republic of">Tanzania, United Republic of</option>
  261. <option value="Thailand">Thailand</option>
  262. <option value="Timor-Leste">Timor-Leste</option>
  263. <option value="Togo">Togo</option>
  264. <option value="Tokelau">Tokelau</option>
  265. <option value="Tonga">Tonga</option>
  266. <option value="Trinidad and Tobago">Trinidad and Tobago</option>
  267. <option value="Tunisia">Tunisia</option>
  268. <option value="Turkey">Turkey</option>
  269. <option value="Turkmenistan">Turkmenistan</option>
  270. <option value="Turks and Caicos Islands">Turks and Caicos Islands</option>
  271. <option value="Tuvalu">Tuvalu</option>
  272. <option value="Uganda">Uganda</option>
  273. <option value="Ukraine">Ukraine</option>
  274. <option value="United Arab Emirates">United Arab Emirates</option>
  275. <option value="United Kingdom">United Kingdom</option>
  276. <option value="United States">United States</option>
  277. <option value="United States Minor Outlying Islands">United States Minor Outlying Islands</option>
  278. <option value="Uruguay">Uruguay</option>
  279. <option value="Uzbekistan">Uzbekistan</option>
  280. <option value="Vanuatu">Vanuatu</option>
  281. <option value="Venezuela, Bolivarian Republic of">Venezuela, Bolivarian Republic of</option>
  282. <option value="Viet Nam">Viet Nam</option>
  283. <option value="Virgin Islands, British">Virgin Islands, British</option>
  284. <option value="Virgin Islands, U.S.">Virgin Islands, U.S.</option>
  285. <option value="Wallis and Futuna">Wallis and Futuna</option>
  286. <option value="Western Sahara">Western Sahara</option>
  287. <option value="Yemen">Yemen</option>
  288. <option value="Zambia">Zambia</option>
  289. <option value="Zimbabwe">Zimbabwe</option>
  290. </select>
  291. <i class="icon"></i>
  292. </div>
  293. <div class="number-application info-container">
  294. <label for="">集成此SDK的应用程序数量 *</label>
  295. <select v-model="form.number" onChange="this.blur();">
  296. <option value="1">1</option>
  297. <option value="2">2</option>
  298. <option value="3">3</option>
  299. <option value="4">4</option>
  300. <option value="5">5</option>
  301. <option value="6">6</option>
  302. <option value="7">7</option>
  303. <option value="8">8</option>
  304. <option value="9">9</option>
  305. <option value="10">10</option>
  306. <option value=">10">>10</option>
  307. </select>
  308. <i class="icon"></i>
  309. </div>
  310. <div class="platforms info-container">
  311. <label for="">您的应用程序将支持哪些平台?*</label>
  312. <select v-model="form.platform" onChange="this.blur();">
  313. <option value="Android">Android</option>
  314. <option value="iOS">iOS</option>
  315. <option value="Windows 10">Windows 10</option>
  316. </select>
  317. <i class="icon"></i>
  318. </div>
  319. <div class="feature info-container">
  320. <label for="">您对哪些功能感兴趣?*</label>
  321. <select v-model="form.feature" onChange="this.blur();">
  322. <option value="PDF阅读">PDF阅读</option>
  323. <option value="PDF注释">PDF注释</option>
  324. <option value="PDF签名">PDF签名</option>
  325. <option value="PDF水印">PDF水印</option>
  326. <option value="OCR">OCR</option>
  327. <option value="文本编辑">文本编辑</option>
  328. <option value="表单填写">表单填写</option>
  329. </select>
  330. <i class="icon"></i>
  331. </div>
  332. <div class="submit" @click="handlerSubmit"><span>提交</span></div>
  333. </div>
  334. </Fragment>
  335. </template>
  336. <script>
  337. export default {
  338. data() {
  339. return {
  340. form: {
  341. first_name: '',
  342. last_name:'',
  343. email:'',
  344. job_title: '',
  345. phone: '',
  346. company: '',
  347. website: '',
  348. feature:'PDF阅读',
  349. platform: 'Android',
  350. number: '1',
  351. country:'Afghanistan'
  352. },
  353. postSuccess: false
  354. }
  355. },
  356. computed: {
  357. emptyItems() {
  358. const validataItems = ['first_name','last_name','email','job_title','phone','company','website']
  359. const emptyItems = []
  360. validataItems.forEach(item =>{
  361. if(this.form[item] === '') {
  362. emptyItems.push(item)
  363. }
  364. })
  365. const regEmail = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/
  366. if(!emptyItems.includes('email') && !regEmail.test(this.form.email)) {
  367. emptyItems.push('right-email')
  368. }
  369. return emptyItems
  370. }
  371. },
  372. methods: {
  373. handlerResetStatus() {
  374. this.postSuccess = false
  375. },
  376. handlerSubmit() {
  377. if(this.emptyItems.length === 0) {
  378. this.postSuccess = true
  379. }
  380. }
  381. }
  382. }
  383. </script>
  384. <style lang="scss" scoped>
  385. .success-modal {
  386. text-align: center;
  387. img {
  388. width: 87px;
  389. display: inline-block;
  390. }
  391. .title {
  392. margin-top: 16px;
  393. margin-bottom: 2px;
  394. font-size: 28px;
  395. font-family: Helvetica-Bold,Helvetica;
  396. font-weight: bold;
  397. color: #1d2023;
  398. line-height: 44px;
  399. }
  400. .desc {
  401. font-size: 16px;
  402. color: #606972;
  403. line-height: 22px;
  404. }
  405. }
  406. .modal-title {
  407. font-size: 20px;
  408. font-weight: bold;
  409. color: #3F454B;
  410. line-height: 28px;
  411. }
  412. .modal-body {
  413. padding: 0;
  414. }
  415. .err, .err-email {
  416. color: #FF4F4F;
  417. }
  418. .info-title {
  419. font-size: 20px;
  420. font-weight: bold;
  421. color: rgba(63, 69, 75, 1);
  422. line-height: 28px;
  423. }
  424. input, select {
  425. height: 44px;
  426. padding-left: 12px;
  427. border: 1px solid #ccc;
  428. border-radius: 4px;
  429. font-size: 14px;
  430. color: #3F454B;
  431. &:focus {
  432. border-color: #FF4F4F;
  433. outline: none;
  434. }
  435. }
  436. select {
  437. -webkit-appearance: none;
  438. -moz-appearance: none;
  439. appearance: none;
  440. width: 100%;
  441. }
  442. .name, .job-phone {
  443. display: flex;
  444. justify-content: space-between;
  445. .first-name,
  446. .last-name,
  447. .job-title,
  448. .phone-number {
  449. width: 48.291%;
  450. }
  451. input {
  452. width: 100%;
  453. }
  454. }
  455. .email, .company, .website {
  456. input {
  457. width: 100%;
  458. }
  459. }
  460. label {
  461. display: block;
  462. margin-bottom: 4px;
  463. font-size: 16px;
  464. color: #3f454b;
  465. line-height: 22px;
  466. }
  467. .info-container {
  468. margin-top: 10px;
  469. }
  470. .country, .sdk, .number-application, .platforms, .feature {
  471. position: relative;
  472. i {
  473. position: absolute;
  474. right: 10px;
  475. bottom: 12px;
  476. width: 20px;
  477. height: 20px;
  478. background-image: url(http://cn-file.17pdf.com/website/sdk/xiala.png);
  479. background-size: 20px;
  480. transition: transform ease-out 0.2s;
  481. }
  482. }
  483. select {
  484. &:focus + .icon {
  485. transform: rotate(180deg);
  486. }
  487. }
  488. .submit {
  489. width: 100%;
  490. margin-top: 20px;
  491. padding-top: 12px;
  492. padding-bottom: 12px;
  493. line-height: 22px;
  494. background-color: #FF4F4F;
  495. border-radius: 4px;
  496. cursor: pointer;
  497. text-align: center;
  498. span {
  499. color: #fff;
  500. font-weight: bold;
  501. }
  502. &:hover {
  503. opacity: 0.7;
  504. }
  505. }
  506. </style>