SdkForm.vue 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797
  1. <template>
  2. <div>
  3. <div v-if="modalShow" 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">您的信息已成功发送,我们将在24小时内回复您。</div>
  7. </div>
  8. <div v-else class="en poppins">
  9. <div class=" contact-container lg:flex lg:justify-between lg:mb-20px">
  10. <div class="w-full">
  11. <!-- 用户产品描述 非必填项 -->
  12. <div class="text-sm font-600 mb-20px text-[#232748]">{{ contactSales.aboutProject }}</div>
  13. <textarea
  14. class="appearance-none w-full p-12px text-14px leading-20px rounded-6px outline-none border-1px border-[#E1E3E8] focus:border-[#396FFA] hover:border-[#396FFA] resize-y"
  15. v-model.trim="description"
  16. placeholder="您的项目使用场景是什么?(什么情况下需要用到什么功能)"
  17. rows="6"
  18. @input="handleInfo('description')"
  19. ></textarea>
  20. <!-- SDK构建的产品是对内/对外 -->
  21. <div class="mt-30px mb-20px text-sm text-[#232748] font-600 "><i class="text-[#FF5050] mt-10px">*</i> {{ contactSales.whoBuildFor }}</div>
  22. <div class="relative">
  23. <select class="w-full h-44px px-12px rounded-6px appearance-none border-1px border-[#E1E3E8] outline-none focus:border-[#396FFA] hover:border-[#396FFA]" v-model="building" name="building" @change="handleInfo('building', $event)">
  24. <option value="公司内部">{{ contactSales.forCustomers }}</option>
  25. <option value="公司产品的终端用户">{{ contactSales.forInternalUse }}</option>
  26. <option value="另一家公司的产品">{{ contactSales.forAnotherCompany }}</option>
  27. </select>
  28. <Arrow class="absolute bottom-18px right-18px z-2 w-14px h-8px pointer-events-none " />
  29. </div>
  30. <!-- 平台 -->
  31. <div class="mt-30px mb-16px text-sm font-600 text-[#232748]"><i class="text-[#FF5050] mt-10px">*</i> {{ contactSales.whatDeploy }}</div>
  32. <div class="grid gap-y-24px grid-cols-3">
  33. <label class="flex items-center">
  34. <input v-model="platforms" type="checkbox" value="Windows" @change="handleCheckBox('platforms')">
  35. <CheckBox v-if="platforms.includes('Windows')" />
  36. <span v-else class="box"></span>
  37. <span class="ml-8px text-brand-0"><Windows class="w-24px h-24px" /></span>
  38. <span class="text-sm text-[#52555F] ml-6px">Windows</span>
  39. </label>
  40. <label class="flex items-center">
  41. <input v-model="platforms" type="checkbox" value="Web" @change="handleCheckBox('platforms')">
  42. <CheckBox v-if="platforms.includes('Web')" />
  43. <span v-else class="box"></span>
  44. <span class="ml-8px text-brand-0"><Web class="w-24px h-24px" /></span>
  45. <span class="text-sm text-[#52555F] ml-6px">Web</span>
  46. </label>
  47. <label class="flex items-center">
  48. <input v-model="platforms" type="checkbox" value="Android" @change="handleCheckBox('platforms')">
  49. <CheckBox v-if="platforms.includes('Android')" />
  50. <span v-else class="box"></span>
  51. <span class="ml-8px text-brand-0"><Android class="w-24px h-24px" /></span>
  52. <span class="text-sm text-[#52555F] ml-6px ">Android</span>
  53. </label>
  54. <label class="flex items-center">
  55. <input v-model="platforms" type="checkbox" value="iOS" @change="handleCheckBox('platforms')">
  56. <CheckBox v-if="platforms.includes('iOS')" />
  57. <span v-else class="box"></span>
  58. <span class="ml-8px text-brand-0"><iOS class="w-24px h-24px" /></span>
  59. <span class="text-sm text-[#52555F] ml-6px">iOS</span>
  60. </label>
  61. <label class="flex items-center">
  62. <input v-model="platforms" type="checkbox" value="Mac Catalyst" @change="handleCheckBox('platforms')">
  63. <CheckBox v-if="platforms.includes('Mac Catalyst')" />
  64. <span v-else class="box"></span>
  65. <span class="ml-8px text-brand-0"><Mac class="w-24px h-24px" /></span>
  66. <span class="text-sm text-[#52555F] ml-6px">Mac Catalyst</span>
  67. </label>
  68. <label class="flex items-center">
  69. <input v-model="platforms" type="checkbox" value="Linux" @change="handleCheckBox('platforms')">
  70. <CheckBox v-if="platforms.includes('Linux')" />
  71. <span v-else class="box"></span>
  72. <span class="ml-8px text-brand-0"><Linux class="w-24px h-24px" /></span>
  73. <span class="text-sm text-[#52555F] ml-6px">Linux</span>
  74. </label>
  75. <label class="flex items-center">
  76. <input v-model="platforms" type="checkbox" value="ComPDFKit API" @change="handleCheckBox('platforms')">
  77. <CheckBox v-if="platforms.includes('ComPDFKit API')" />
  78. <span v-else class="box"></span>
  79. <span class="ml-8px text-brand-0"><Compdf class="w-24px h-24px" /></span>
  80. <span class="text-sm text-[#52555F] ml-6px whitespace-nowrap">API 解决方案</span>
  81. </label>
  82. </div>
  83. <div v-show="platforms_err && submitted" class="text-[#FF5050] mt-10px">{{ platforms_err }}</div>
  84. <!-- 功能 -->
  85. <div class="mt-27px mb-20px text-sm font-600 "><i class="text-[#FF5050] mt-10px">*</i> {{ contactSales.whichFeatures }}</div>
  86. <div class="grid gap-y-24px grid-cols-3">
  87. <label class="flex items-center">
  88. <input v-model="features" type="checkbox" value="PDF查看" @change="handleCheckBox('features')">
  89. <CheckBox v-if="features.includes('PDF查看')" />
  90. <span v-else class="box"></span>
  91. <span class="text-sm text-[#232748] ml-9px ">{{ contactSales.platforms.viewer }}</span>
  92. </label>
  93. <label class="flex items-center">
  94. <input v-model="features" type="checkbox" value="PDF批注" @change="handleCheckBox('features')">
  95. <CheckBox v-if="features.includes('PDF批注')" />
  96. <span v-else class="box"></span>
  97. <span class="text-sm text-[#232748] ml-9px ">PDF批注</span>
  98. </label>
  99. <label class="flex items-center">
  100. <input v-model="features" type="checkbox" value="PDF签名" @change="handleCheckBox('features')">
  101. <CheckBox v-if="features.includes('PDF签名')" />
  102. <span v-else class="box"></span>
  103. <span class="text-sm text-[#232748] ml-9px">PDF签名</span>
  104. </label>
  105. <label class="flex items-center">
  106. <input v-model="features" type="checkbox" value="PDF内容编辑" @change="handleCheckBox('features')">
  107. <CheckBox v-if="features.includes('PDF内容编辑')" />
  108. <span v-else class="box"></span>
  109. <span class="text-sm text-[#232748] ml-9px ">PDF内容编辑</span>
  110. </label>
  111. <label class="flex items-center">
  112. <input v-model="features" type="checkbox" value="PDF表单" @change="handleCheckBox('features')">
  113. <CheckBox v-if="features.includes('PDF表单')" />
  114. <span v-else class="box"></span>
  115. <span class="text-sm text-[#232748] ml-9px ">PDF表单</span>
  116. </label>
  117. <label class="flex items-center">
  118. <input v-model="features" type="checkbox" value="OCR识别" @change="handleCheckBox('features')">
  119. <CheckBox v-if="features.includes('OCR识别')" />
  120. <span v-else class="box"></span>
  121. <span class="text-sm text-[#232748] ml-9px ">OCR识别</span>
  122. </label>
  123. <label class="flex items-center">
  124. <input v-model="features" type="checkbox" value="PDF页面管理" @change="handleCheckBox('features')">
  125. <CheckBox v-if="features.includes('PDF页面管理')" />
  126. <span v-else class="box"></span>
  127. <span class="text-sm text-[#232748] ml-9px ">{{ contactSales.platforms.documentEditor }}</span>
  128. </label>
  129. <label class="flex items-center">
  130. <input v-model="features" type="checkbox" value="文档转换" @change="handleCheckBox('features')">
  131. <CheckBox v-if="features.includes('文档转换')" />
  132. <span v-else class="box"></span>
  133. <span class="text-sm text-[#232748] ml-9px ">文档转换</span>
  134. </label>
  135. <label class="flex items-center">
  136. <input v-model="features" type="checkbox" value="PDF安全保护" @change="handleCheckBox('features')">
  137. <CheckBox v-if="features.includes('PDF安全保护')" />
  138. <span v-else class="box"></span>
  139. <span class="text-sm text-[#232748] ml-9px ">PDF安全保护</span>
  140. </label>
  141. <label class="flex items-center">
  142. <input v-model="features" type="checkbox" value="标记密文" @change="handleCheckBox('features')">
  143. <CheckBox v-if="features.includes('标记密文')" />
  144. <span v-else class="box"></span>
  145. <span class="text-sm text-[#232748] ml-9px ">标记密文</span>
  146. </label>
  147. <label class="flex items-center">
  148. <input v-model="features" type="checkbox" value="PDF文档对比" @change="handleCheckBox('features')">
  149. <CheckBox v-if="features.includes('PDF文档对比')" />
  150. <span v-else class="box"></span>
  151. <span class="text-sm text-[#232748] ml-9px ">PDF文档对比</span>
  152. </label>
  153. <label class="flex items-center">
  154. <input v-model="features" type="checkbox" value="文档压缩" @change="handleCheckBox('features')">
  155. <CheckBox v-if="features.includes('文档压缩')" />
  156. <span v-else class="box"></span>
  157. <span class="text-sm text-[#232748] ml-9px ">文档压缩</span>
  158. </label>
  159. </div>
  160. <div v-show="features_err && submitted" class="text-[#FF5050] mt-10px ">{{ features_err }}</div>
  161. <!-- 用户数量 非必填项 -->
  162. <div class="mt-27px mb-16px text-sm text-[#232748] font-600 ">{{ contactSales.numberOfUsers }}</div>
  163. <div class="relative">
  164. <select class="w-full h-44px px-12px rounded-6px appearance-none border-1px border-[#E1E3E8] outline-none focus:border-[#396FFA] hover:border-[#396FFA]" v-model="number" name="number" @change="handleInfo('number', $event)">
  165. <option value="0-100">0-100</option>
  166. <option value="101-1000">101-1000</option>
  167. <option value="1001-5000">1001-5000</option>
  168. <option value="5001-10000">5001-10000</option>
  169. <option value="10000+">10000+</option>
  170. </select>
  171. <Arrow class="absolute bottom-18px right-18px z-2 w-14px h-8px pointer-events-none" />
  172. </div>
  173. <!-- 姓名 -->
  174. <div class="info-content">
  175. <div class="flex">
  176. <div class="name flex-1 ">
  177. <div>
  178. <span class="inline-block mt-25px mb-16px text-sm text-[#232748] font-600 "><i class="text-[#FF5050] mt-10px">*</i> 姓名</span>
  179. <input class="w-full h-44px px-12px rounded-6px !border-1px !border-[#E1E3E8] border-solid !focus:border-[#396FFA] !hover:border-[#396FFA]" v-model.trim="firstName" type="text" placeholder="请输入名字" @input="handleInfo('firstName')">
  180. </div>
  181. <div v-if="firstName_err" class="text-[#FF5050] mt-10px ">{{ firstName_err }}</div>
  182. </div>
  183. </div>
  184. </div>
  185. <!-- 公司邮箱 -->
  186. <div class="info-content">
  187. <div class="email">
  188. <span class="inline-block mt-25px mb-16px text-sm text-[#232748] font-600 "><i class="text-[#FF5050] mt-10px">*</i> 公司邮箱地址</span>
  189. <input class="w-full h-44px px-12px rounded-6px !border-1px !border-[#E1E3E8] border-solid !focus:border-[#396FFA] !hover:border-[#396FFA]" v-model.trim="email" type="text" placeholder="name@company.com" @input="handleEmail">
  190. </div>
  191. <div v-if="email_err" class="text-[#FF5050] mt-10px ">{{ email_err }}</div>
  192. </div>
  193. <!-- 公司网站 非必填项-->
  194. <!-- <div class="info-content">
  195. <div class="website">
  196. <span class="inline-block mt-25px mb-16px text-sm text-[#232748] font-600 ">Company website</span>
  197. <input class="w-full h-44px px-12px rounded-6px !border-1px !border-[#E1E3E8] border-solid !focus:border-[#396FFA] !hover:border-[#396FFA]" v-model.trim="website" type="text" placeholder="Enter website" @input="handleInfo('website')">
  198. </div>
  199. </div> -->
  200. <!-- 电话 非必填项 -->
  201. <!-- <div class="info-content">
  202. <div class="phone">
  203. <span class="inline-block mt-25px mb-16px text-sm text-[#232748] font-600 ">Phone number</span>
  204. <input class="w-full h-44px px-12px rounded-6px !border-1px !border-[#E1E3E8] border-solid !focus:border-[#396FFA] !hover:border-[#396FFA]" v-model.trim="phone" type="text" placeholder="Phone number">
  205. </div>
  206. </div>
  207. <div class="mt-30px <mt-24px mb-20px <mb-8px text-sm text-[#232748] font-600 "> {{ contactSales.industry }}</div>
  208. <div class="relative">
  209. <select
  210. class="w-full h-44px px-12px rounded-6px appearance-none border-1px border-[#E1E3E8] outline-none focus:border-[#396FFA] hover:border-[#396FFA]"
  211. :class="industry ? 'text-[#232748]' : 'text-[#CCCCCC]'"
  212. v-model="industry"
  213. name="Industry"
  214. @change="handleInfo('industry', $event)"
  215. >
  216. <option selected disabled value="">Please select or enter the industry of your business</option>
  217. <option value="advertising">{{ contactSales.advertising }}</option>
  218. <option value="aerospaceIindustry">{{ contactSales.aerospaceIindustry }}</option>
  219. <option value="armsIndustry">{{ contactSales.armsIndustry }}</option>
  220. <option value="automotiveIndustry">{{ contactSales.automotiveIndustry }}</option>
  221. <option value="broadcasting">{{ contactSales.broadcasting }}</option>
  222. <option value="chemicalIndustry">{{ contactSales.chemicalIndustry }}</option>
  223. <option value="computerIndustry">{{ contactSales.computerIndustry }}</option>
  224. <option value="constructionIndustry">{{ contactSales.constructionIndustry }}</option>
  225. <option value="creative">{{ contactSales.creative }}</option>
  226. <option value="culturalIndustry">{{ contactSales.culturalIndustry }}</option>
  227. <option value="dataProcessingOutsourcedServices">{{ contactSales.dataProcessingOutsourcedServices }}</option>
  228. <option value="defenseIndustry">{{ contactSales.defenseIndustry }}</option>
  229. <option value="educationIndustry">{{ contactSales.educationIndustry }}</option>
  230. <option value="electricPowerIndustry">{{ contactSales.electricPowerIndustry }}</option>
  231. <option value="electronicsIndustry">{{ contactSales.electronicsIndustry }}</option>
  232. <option value="energyIndustry">{{ contactSales.energyIndustry }}</option>
  233. <option value="entertainment">{{ contactSales.entertainment }}</option>
  234. <option value="entertainmentIndustry">{{ contactSales.entertainmentIndustry }}</option>
  235. <option value="fashion">{{ contactSales.fashion }}</option>
  236. <option value="filmIndustry">{{ contactSales.filmIndustry }}</option>
  237. <option value="financialServicesIndustry">{{ contactSales.financialServicesIndustry }}</option>
  238. <option value="fishingIndustry">{{ contactSales.fishingIndustry }}</option>
  239. <option value="floral">{{ contactSales.floral }}</option>
  240. <option value="foodIndustry">{{ contactSales.foodIndustry }}</option>
  241. <option value="gamblingIndustry">{{ contactSales.gamblingIndustry }}</option>
  242. <option value="healthcareIndustry">{{ contactSales.healthcareIndustry }}</option>
  243. <option value="horticultureIndustry">{{ contactSales.horticultureIndustry }}</option>
  244. <option value="hospitalityIndustry">{{ contactSales.hospitalityIndustry }}</option>
  245. <option value="humanResourceEmploymentServices">{{ contactSales.humanResourceEmploymentServices }}</option>
  246. <option value="industrialRobotIndustry">{{ contactSales.industrialRobotIndustry }}</option>
  247. <option value="informationIndustry">{{ contactSales.informationIndustry }}</option>
  248. <option value="insuranceIndustry">{{ contactSales.insuranceIndustry }}</option>
  249. <option value="internet">{{ contactSales.internet }}</option>
  250. <option value="leisureIndustry">{{ contactSales.leisureIndustry }}</option>
  251. <option value="lowTechnologyIndustry">{{ contactSales.lowTechnologyIndustry }}</option>
  252. <option value="massMedia">{{ contactSales.massMedia }}</option>
  253. <option value="meat">{{ contactSales.meat }}</option>
  254. <option value="meatPacking">{{ contactSales.meatPacking }}</option>
  255. <option value="mining">{{ contactSales.mining }}</option>
  256. <option value="musicIndustry">{{ contactSales.musicIndustry }}</option>
  257. <option value="newsMedia">{{ contactSales.newsMedia }}</option>
  258. <option value="oilShale">{{ contactSales.oilShale }}</option>
  259. <option value="petroleumIndustry">{{ contactSales.petroleumIndustry }}</option>
  260. <option value="pharmaceuticalIndustry">{{ contactSales.pharmaceuticalIndustry }}</option>
  261. <option value="professionalServices">{{ contactSales.professionalServices }}</option>
  262. <option value="publishing">{{ contactSales.publishing }}</option>
  263. <option value="publicAdministration">{{ contactSales.publicAdministration }}</option>
  264. <option value="pulpAndPaperIndustry">{{ contactSales.pulpAndPaperIndustry }}</option>
  265. <option value="realEstateIndustry">{{ contactSales.realEstateIndustry }}</option>
  266. <option value="researchConsultingServices">{{ contactSales.researchConsultingServices }}</option>
  267. <option value="retailIndustry">{{ contactSales.retailIndustry }}</option>
  268. <option value="semiconductorIndustry">{{ contactSales.semiconductorIndustry }}</option>
  269. <option value="shipbuildingIndustry">{{ contactSales.shipbuildingIndustry }}</option>
  270. <option value="softwareIndustry">{{ contactSales.softwareIndustry }}</option>
  271. <option value="sportIndustry">{{ contactSales.sportIndustry }}</option>
  272. <option value="telecommunicationsIndustry">{{ contactSales.telecommunicationsIndustry }}</option>
  273. <option value="textileIndustry">{{ contactSales.textileIndustry }}</option>
  274. <option value="tobaccoIndustry">{{ contactSales.tobaccoIndustry }}</option>
  275. <option value="transportIndustry">{{ contactSales.transportIndustry }}</option>
  276. <option value="videoGameIndustry">{{ contactSales.videoGameIndustry }}</option>
  277. <option value="waterIndustry">{{ contactSales.waterIndustry }}</option>
  278. <option value="woodIndustry">{{ contactSales.woodIndustry }}</option>
  279. </select>
  280. <Arrow class="absolute bottom-18px right-18px z-2 w-14px h-8px pointer-events-none <(bottom-10px right-8px)" />
  281. </div> -->
  282. <!-- 国家 非必填项-->
  283. <!-- <div class="info-content">
  284. <div class="country relative">
  285. <span class="inline-block mt-24px mb-16px font-600 <mt-16px <mb-8px text-sm">Country</span>
  286. <select
  287. v-model="country"
  288. class="w-full h-44px px-12px rounded-6px appearance-none border-1px border-[#E1E3E8] outline-none focus:border-[#396FFA] hover:border-[#396FFA]"
  289. :class="country ? 'text-[#232748]' : 'text-[#CCCCCC]'"
  290. @change="handleInfo('country', $event)"
  291. >
  292. <option value="" disabled>Select a country</option>
  293. <option
  294. v-for="(item, index) in countryList"
  295. :key="index"
  296. :value="item.name"
  297. >
  298. {{ item.name }}
  299. </option>
  300. </select>
  301. <Arrow class="absolute bottom-18px right-18px z-2 w-14px h-8px pointer-events-none <(bottom-10px right-8px)" />
  302. </div>
  303. </div> -->
  304. <div class="lg:hover:bg-[#548CF9] w-full lg:max-w-380px mt-40px text-sm py-15px text-center mx-auto rounded-8px font-500 bg-[#396FFA] text-white cursor-pointer" @click="submit">{{ submitText }}</div>
  305. </div>
  306. </div>
  307. </div>
  308. </div>
  309. </template>
  310. <script>
  311. import checkEmail from '~/utils/checkemail'
  312. import { country } from "~/utils/country.js"
  313. import iOSCN from '~/assets/images/icons/apple.svg?inline'
  314. import MacCN from '~/assets/images/icons/macos.svg?inline'
  315. import AndroidCN from '~/assets/images/icons/android.svg?inline'
  316. import WindowsCN from '~/assets/images/icons/windows.svg?inline'
  317. import WebCN from '~/assets/images/icons/web.svg?inline'
  318. import CheckBox from '~/assets/images/icons/check_box.svg?inline'
  319. import EmailCN from '~/assets/images/icons/email.svg?inline'
  320. import Dot from '~/assets/images/icons/dot.svg?inline'
  321. import ArrowCN from '~/assets/images/icons/arrow.svg?inline'
  322. import LinuxCN from '~/assets/images/icons/linux.svg?inline'
  323. import iOS from '~/assets/images/icons/apple_black.svg?inline'
  324. import Mac from '~/assets/images/icons/mac_black.svg?inline'
  325. import Android from '~/assets/images/icons/android_black.svg?inline'
  326. import Windows from '~/assets/images/icons/windows_black.svg?inline'
  327. import Web from '~/assets/images/icons/web_black.svg?inline'
  328. import Linux from '~/assets/images/icons/linux_black.svg?inline'
  329. import Compdf from '~/assets/images/icons/compdf_api_black.svg?inline'
  330. import Arrow from '~/assets/images/icons/downarrow.svg?inline'
  331. import Email from '~/assets/images/icons/email_new.svg?inline'
  332. import Tech from '~/assets/images/icons/tech_support.svg?inline'
  333. export default {
  334. components: {
  335. CheckBox,
  336. iOSCN,
  337. MacCN,
  338. AndroidCN,
  339. WindowsCN,
  340. WebCN,
  341. LinuxCN,
  342. Dot,
  343. ArrowCN,
  344. EmailCN,
  345. iOS,
  346. Mac,
  347. Android,
  348. Windows,
  349. Web,
  350. Linux,
  351. Compdf,
  352. Arrow,
  353. Email,
  354. Tech
  355. },
  356. data() {
  357. return {
  358. modalShow: false,
  359. submitted: false,
  360. fieldsNum: 0,
  361. submitText: '提交',
  362. errText: '',
  363. building: '公司内部',
  364. number: '0-100',
  365. number_cn: 1,
  366. platforms: [],
  367. platforms_err: null,
  368. features: [],
  369. features_err: null,
  370. description: '',
  371. description_err: null,
  372. firstName: null,
  373. firstName_err: null,
  374. lastName: null,
  375. lastName_err: null,
  376. name: null,
  377. name_err: null,
  378. email: null,
  379. email_err: null,
  380. phone: '',
  381. phone_err: null,
  382. company: null,
  383. company_err: null,
  384. website: '',
  385. website_err: null,
  386. industry: '',
  387. country: '',
  388. countryList: [],
  389. country_err: null,
  390. err: {
  391. // description: this.$t('contactSales.errDescription'),
  392. platforms: '请选择开发平台',
  393. features: '请勾选所需功能',
  394. firstName: '请输入您的姓名',
  395. lastName: 'Enter your last name',
  396. name: '请输入您的姓名',
  397. // phone_cn: this.$t('contactSales.errPhone'),
  398. // phone: {
  399. // err: 'Enter your phone number',
  400. // correct: 'Wrong phone format'
  401. // },
  402. email: {
  403. err: '请输入您公司的邮箱地址',
  404. correct: '请填写正确格式的邮箱地址',
  405. business: 'Please enter a non generic email address'
  406. },
  407. // company: this.$t('contactSales.errCompany'),
  408. // website: this.$t('contactSales.errWebsite'),
  409. // country: 'Please select your country'
  410. },
  411. checkbox: false,
  412. contactSales: {
  413. "contactUs": "免费试用&获取报价",
  414. "getConnect": "请填写以下表单, 提供贵公司项目的详细信息获得免费试用和报价。ComPDFKit团队将在一个工作日内,以邮件的形式与您取得联系。",
  415. "aboutProject": "项目描述",
  416. "aboutProjectDesc": "您的项目使用场景是什么?您需要什么功能?您期望在哪些方面与ComPDFKit进行合作?\r\n详细的信息,有利于我们了解您的需求,并提供合适的解决方案以及精准的报价。",
  417. "whoBuildFor": "您的应用程序将用于:",
  418. "forCustomers": "公司内部",
  419. "forInternalUse": "公司产品的终端用户",
  420. "forAnotherCompany": "另一家公司的产品",
  421. "whatDeploy": "您期望支持部署到哪些开发平台?",
  422. "whichFeatures": "选择您的项目需要的功能",
  423. "numberOfUsers": "终端用户人数",
  424. "name": "姓名",
  425. "namePlaceholder": "您的全名",
  426. "businessEmail": "公司邮箱地址",
  427. "phoneNumber": "电话",
  428. "phoneNumberPlaceholder": "请输入您的联系电话",
  429. "companyName": "公司名称",
  430. "companyNamePlaceholder": "填写您的公司名称",
  431. "website": "公司网站",
  432. "websitePlaceholder": "请留下您公司官网网址",
  433. "submit": "提交",
  434. "errDescription": "请描述贵公司的项目",
  435. "errName": "请输入您的姓名",
  436. "errPhone": "请填写正确的联系电话",
  437. "errEmailEmpty": "请输入您公司的邮箱地址",
  438. "errEmailWrong": "请填写正确格式的邮箱地址",
  439. "errCompany": "请填写您的公司名称",
  440. "errWebsite": "请留下您公司官网网址",
  441. "errSubmit": "请完成必选项的填写",
  442. "modelThank": "感谢您的联系!",
  443. "modelSuccess": "您的信息已成功发送给ComPDFKit团队,我们将在一个工作日内,以邮件或电话的方式与您取得联系。",
  444. "commentOneText": "考虑到我们的用户在阅读和学习的时候想要添加注释。我试图处理PDF文件并重新开发所有的功能,但我很快意识到我需要的是如何解决业务问题的方法,而不是开发PDF处理软件。在ComPDFKit 的帮助下,我们不必在开发过程中浪费太多时间。",
  445. "commentOneJob": "信息技术 运营总监",
  446. "commentTwoText": "非常感谢 ComPDFKit。我们公司想为客户提供一种简单、快速又安全的方式来签署和填写PDF表格,ComPDFKit做到了,满足我们公司的所有需求。这就是为什么PDF Technologies 多年来一直是我们的合作伙伴的原因。",
  447. "commentTwoJob": "现代服务业 产品经理",
  448. "platforms": {
  449. "viewer": "PDF查看",
  450. "annotations": "PDF批注",
  451. "signatures": "PDF签名",
  452. "forms": "PDF表单填写",
  453. "documentEditor": "PDF页面管理",
  454. "editPDF": "PDF内容编辑",
  455. "security": "PDF安全保护",
  456. "conversion": "标记密文",
  457. "documentComparison": "PDF文档对比",
  458. "ocr": "OCR识别",
  459. "redaction": "文档转换"
  460. }
  461. }
  462. }
  463. },
  464. mounted () {
  465. this.countryList = country()
  466. },
  467. watch: {
  468. fieldsNum(val) {
  469. if (((val > 8 ) || (val > 7 )) && !this.errText) {
  470. this.errText = ''
  471. }
  472. },
  473. checkbox(val) {
  474. if (val && this.errText !== 'Please fill in the missing fields.') {
  475. this.errText = ''
  476. }
  477. }
  478. },
  479. props: ["labelText"],
  480. methods: {
  481. doClose() {
  482. setTimeout(() => {
  483. this.modalShow = false
  484. }, 500);
  485. this.platforms = []
  486. this.features = []
  487. this.description = ''
  488. this.firstName = null
  489. this.lastName = null
  490. this.name = null
  491. this.email = null
  492. this.company = null
  493. this.website = ''
  494. this.phone = ''
  495. this.country = ''
  496. this.fieldsNum = 0
  497. this.submitText = '提交'
  498. },
  499. handleCheckBox(arg) {
  500. if (!this[arg].length) {
  501. if (!this[arg + '_err']) {
  502. this[arg + '_err'] = this.err[arg]
  503. if (this.fieldsNum > 0) {
  504. this.fieldsNum--
  505. }
  506. }
  507. return false
  508. } else {
  509. if (this[arg + '_err']) {
  510. this[arg + '_err'] = false
  511. this.fieldsNum++
  512. }
  513. return true
  514. }
  515. },
  516. handleErr(flag, errMessage, origin) {
  517. if (!this[flag]) {
  518. if (!this[flag + '_err']) {
  519. this[flag + '_err'] = errMessage
  520. if (this.fieldsNum > 0) {
  521. this.fieldsNum--
  522. }
  523. }
  524. return false
  525. } else {
  526. if (this[flag + '_err']) {
  527. this[flag + '_err'] = origin
  528. this.fieldsNum++
  529. }
  530. return true
  531. }
  532. },
  533. handleEmail() {
  534. if (!this.email) {
  535. if (!this.email_err) {
  536. this.email_err = this.err.email.err
  537. if (this.fieldsNum > 0) {
  538. this.fieldsNum--
  539. }
  540. }
  541. return false
  542. }
  543. if (!checkEmail(this.email)) {
  544. if (!this.email_err) {
  545. if (this.fieldsNum > 0) {
  546. this.fieldsNum--
  547. }
  548. }
  549. this.email_err = this.err.email.correct
  550. return false
  551. }
  552. if (this.email_err) {
  553. this.email_err = null
  554. this.fieldsNum++
  555. }
  556. return true
  557. },
  558. handleInfo(message, $event) {
  559. $event && $event.target.blur()
  560. if (message === 'phone') return this.handleErr('phone', this.err['phone_cn'], null)
  561. return this.handleErr(message, this.err[message], null)
  562. },
  563. // handlePhone () {
  564. // const reg = /[^0-9-]+/
  565. // if (!this.phone) {
  566. // if (!this.phone_err) {
  567. // this.phone_err = this.err.phone.err
  568. // if (this.fieldsNum > 0) {
  569. // this.fieldsNum--
  570. // }
  571. // }
  572. // return false
  573. // }
  574. // if (reg.test(this.phone)) {
  575. // if (!this.phone_err) {
  576. // if (this.fieldsNum > 0) {
  577. // this.fieldsNum--
  578. // }
  579. // }
  580. // this.phone_err = this.err.phone.correct
  581. // return false
  582. // }
  583. // if (this.phone_err) {
  584. // this.phone_err = null
  585. // this.fieldsNum++
  586. // }
  587. // return true
  588. // },
  589. submit() {
  590. this.submitted = true
  591. let i = 0
  592. if (this.handleCheckBox('platforms')) i++
  593. if (this.handleCheckBox('features')) i++
  594. // if (this.handleInfo('description')) i++
  595. if (this.handleEmail()) i++
  596. if (this.handleInfo('firstName')) i++
  597. // if (this.handlePhone()) i++
  598. // if (this.handleInfo('country')) i++
  599. // if (this.handleInfo('website')) i++
  600. this.fieldsNum = i
  601. if (this.fieldsNum < 4 ) {
  602. this.errText = this.contactSales.errSubmit
  603. return
  604. }
  605. this.errText = ''
  606. const self = this
  607. this.$axios({
  608. method: 'POST',
  609. url: this.$config.pdfDomain + '/api/contact',
  610. data: {
  611. 'detail[platform]': self.platforms.join(', '),
  612. 'detail[feature]': self.features.join(', '),
  613. 'detail[description]': self.description,
  614. 'contact_email[user_name]': self.firstName,
  615. 'contact_email[email]': self.email,
  616. 'contact_email[product_name]': '17PDF',
  617. 'contact_email[email_subject]': 'Contact for SDK Plan',
  618. 'detail[building]': self.building,
  619. 'detail[phone]': self.phone,
  620. 'detail[number]': self.number,
  621. 'detail[website]': self.website,
  622. 'detail[industry]': self.industry,
  623. 'detail[country]': self.country,
  624. 'detail[label]': self.labelText
  625. },
  626. transformRequest: [function (data) {
  627. let ret = ''
  628. for (let item in data) {
  629. ret += encodeURIComponent(item) + '=' + encodeURIComponent(data[item]) + '&'
  630. }
  631. ret = ret.substr(0, ret.length - 1)
  632. return ret
  633. }]
  634. })
  635. .then((res) => {
  636. console.log(res)
  637. const { data } = res
  638. if (data.status === 'success') {
  639. console.log('Replace the success Flag')
  640. setTimeout(function () {
  641. self.submitText = 'Success'
  642. self.modalShow = true
  643. }, 0)
  644. } else {
  645. alert('The email fails to send.')
  646. }
  647. })
  648. .catch((err) => {
  649. console.log(err)
  650. alert('The email fails to send.')
  651. })
  652. }
  653. }
  654. }
  655. </script>
  656. <style lang="scss" scoped>
  657. .poppins {
  658. font-family: 'Poppins';
  659. }
  660. .contact-container {
  661. label {
  662. input {
  663. position: absolute;
  664. border: 0px;
  665. clip: rect(0px, 0px, 0px, 0px);
  666. height: 1px;
  667. width: 1px;
  668. margin: -1px;
  669. padding: 0px;
  670. overflow: hidden;
  671. white-space: nowrap;
  672. }
  673. svg {
  674. flex-shrink: 0;
  675. color: #1460F3;
  676. }
  677. }
  678. .box {
  679. flex-shrink: 0;
  680. display: inline-block;
  681. width: 22px;
  682. height: 22px;
  683. border: 2px solid #A6B2BF;
  684. border-radius: 2px;
  685. }
  686. .comment-item {
  687. &::before {
  688. content: '';
  689. display: block;
  690. width: 60px;
  691. height: 2px;
  692. margin-bottom: 18px;
  693. background-color: rgba(20, 96, 243, 0.1);
  694. }
  695. & + .comment-item {
  696. margin-top: 30px;
  697. }
  698. }
  699. }
  700. .en {
  701. .contact-container .contact-box .box {
  702. border-radius: 4px;
  703. }
  704. select,
  705. input {
  706. font-size: 14px;
  707. line-height: 40px;
  708. }
  709. select option {
  710. color: #000;
  711. }
  712. input::-webkit-input-placeholder,
  713. textarea::-webkit-input-placeholder {
  714. /* WebKit browsers,webkit内核浏览器 */
  715. color: #CCCCCC;
  716. }
  717. input:-moz-placeholder,
  718. textarea:-moz-placeholder {
  719. /* Mozilla Firefox 4 to 18 */
  720. color: #CCCCCC;
  721. }
  722. input::-moz-placeholder,
  723. textarea::-moz-placeholder {
  724. /* Mozilla Firefox 19+ */
  725. color: #CCCCCC;
  726. }
  727. input:-ms-input-placeholder,
  728. textarea:-ms-input-placeholder {
  729. /* Internet Explorer 10+ */
  730. color: #CCCCCC;
  731. }
  732. .nowrap {
  733. white-space: nowrap;
  734. }
  735. .privacy-box {
  736. flex-shrink: 0;
  737. display: inline-block;
  738. width: 16px;
  739. height: 16px;
  740. border: 1px solid #CCCCCC;
  741. border-radius: 2px;
  742. }
  743. .privacy-box-active {
  744. min-width: 16px;
  745. max-width: 16px;
  746. height: 16px;
  747. color: #1460F3;
  748. }
  749. }
  750. @media screen and (min-width: 930px) {
  751. .cn .contact-container {
  752. .contact-box {
  753. box-shadow: 0px 4px 35px rgba(129, 149, 200, 0.18);
  754. }
  755. }
  756. .en {
  757. .container {
  758. padding-left: 0;
  759. padding-right: 0;
  760. }
  761. .contact-container .contact-box {
  762. box-shadow: 0px 4px 35px rgba(0, 41, 146, 0.1);
  763. }
  764. }
  765. }
  766. .success-modal {
  767. text-align: center;
  768. padding-bottom: 30px;
  769. img {
  770. width: 87px;
  771. display: inline-block;
  772. }
  773. .title {
  774. margin-top: 16px;
  775. margin-bottom: 2px;
  776. font-size: 28px;
  777. font-family: Helvetica-Bold,Helvetica;
  778. font-weight: bold;
  779. color: #1d2023;
  780. line-height: 44px;
  781. }
  782. .desc {
  783. font-size: 16px;
  784. color: #606972;
  785. line-height: 22px;
  786. }
  787. }
  788. </style>