faq.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484
  1. <template>
  2. <div class="m-0 p-0 bg-[#f2f2f2]">
  3. <!-- 主页面 -->
  4. <div v-show="!showSearch" class="q_and_a w-900px my-0 mx-auto">
  5. <div class="banner_wrap w-full h-290px relative bg-[#ccc]">
  6. <div class="search_bg"></div>
  7. <div class="search w-710px h-40px absolute bottom-30px left-[25%] ml-[-135px] rounded-20px opacity-50">
  8. <input
  9. id="index_search" type="text" name="search" placeholder="大家都在问" class="w-full h-full text-center text-[#fff] text-[14px] absolute top-0 left-0 rounded-20px bg-[#000000] border-none outline-solid-none"
  10. @focus="changeShowSearch">
  11. <span class="w-15px h-14px absolute top-14px left-[50%] ml-[-60px]">
  12. <img src="~/assets/images/faq/ic_search.png" class="absolute left-0 top-0 ">
  13. </span>
  14. </div>
  15. </div>
  16. <div class="pro_solve w-full">
  17. <dl>
  18. <dt>
  19. <span></span>
  20. <h3>格式转换</h3>
  21. </dt>
  22. <dd>
  23. <h4 id="format_type"><span></span>支持哪些格式转换?</h4>
  24. <p>支持PDF to Word、PPT、Excel、TXT、JPG/PNG无限次数转换。</p>
  25. </dd>
  26. <dd>
  27. <h4 id="where_format"><span></span>从哪里可以找到转档后的文件?</h4>
  28. <p>1. 在主页点击格式转换;</p>
  29. <p>2. 点击右上角转换任务,即可看到转换中 / 转换成功 / 转换失败三种状态;</p>
  30. <p>3. 滑动到转换成功,点击文件,即可直接进入到17PDF的 Converted文件夹。</p>
  31. </dd>
  32. </dl>
  33. <dl>
  34. <dt>
  35. <span></span>
  36. <h3>账号绑定</h3>
  37. </dt>
  38. <dd>
  39. <h4 id="file_scanning"><span></span>QQ / 微信账号绑定手机号时,为什么会显示 “手机账号已绑定其他账户,请更换 绑定方式”?</h4>
  40. <p>说明该手机号已注册并使用过,请更换号码重新绑定噢!</p>
  41. </dd>
  42. </dl>
  43. <dl>
  44. <dt>
  45. <span></span>
  46. <h3>文件扫描</h3>
  47. </dt>
  48. <dd>
  49. <h4 id="files_scanning"><span></span>如何使用PDF扫描&amp;转档功能?</h4>
  50. <p>
  51. 点击相机快速扫描文件<br>
  52. 点击分享和保存到PDF将扫描文件保存为PDF文件<br>
  53. 转档后可对文件进行编辑
  54. </p>
  55. </dd>
  56. </dl>
  57. <dl>
  58. <dt>
  59. <span></span>
  60. <h3>文件注释</h3>
  61. </dt>
  62. <dd>
  63. <h4 id="how_white"><span></span>如何使用手绘&amp;手写?</h4>
  64. <p>
  65. 点击注释按钮可使用、退出该功能<br>
  66. 点击并长按图标调整颜色、笔刷大小和透明度
  67. </p>
  68. </dd>
  69. <dd>
  70. <h4 id="how_notes"><span></span>如何移除PDF文件注释?</h4>
  71. <p>
  72. 点击选择需要移除的注释<br>
  73. 点击弹出对话框中 “清除” 选项去除注释
  74. </p>
  75. </dd>
  76. </dl>
  77. <dl>
  78. <dt>
  79. <span></span>
  80. <h3>文件阅读</h3>
  81. </dt>
  82. <dd>
  83. <h4 id="eye_model"><span></span>是否支持护眼模式</h4>
  84. <p>目前有三种阅读模式:日间模式、夜间模式、柔和模式,满足用户在不同环境下看书的需求,有效缓解眼睛疲劳,保护视力。</p>
  85. </dd>
  86. <dd>
  87. <h4 id="words_model"><span></span>如何使用纯文字模式(文字转语音TTS)?</h4>
  88. <p>
  89. 打开PDF文档,点击右上角More按钮<br>
  90. 点击选择 TTS 即可转换文本模式为语音模式;<br>
  91. 该功能需要手机自带语音引擎才能使用,<br>
  92. 如无语音引擎需到外部下载第三方语音引擎即可使用。
  93. </p>
  94. </dd>
  95. </dl>
  96. </div>
  97. </div>
  98. <!--搜索页面-->
  99. <div v-show="showSearch" class="search_wrap w-900px my-0 mx-auto">
  100. <!-- 搜索框 -->
  101. <div class="search_ipt">
  102. <div class="search_txt w-[90%] h-40px my-0 mx-auto ">
  103. <input id="search" v-model="inputValue" type="search" placeholder="你想问啥?" @input="search">
  104. <a
  105. id="return" href="javascript:;" class="float-right text-[#fff] text-[14px] leading-[40px] no-underline "
  106. @click="changeShowSearch">取消</a>
  107. </div>
  108. </div>
  109. <!-- 热点问题 -->
  110. <dl v-show="showHot" class="hot w-[98%] bg-[#fff] my-0 mx-auto pt-12px px-0 pb-20px">
  111. <dt class="w-full text-[#333] text-[14px]">
  112. <span class="w-4px h-12px bg-[#ff4948] inline-block mr-10px ml-12px"></span>
  113. 热点问题
  114. </dt>
  115. <dd class="ml-26px text-[12px] leading-[26px] mt-7px">
  116. <span class="h-4px w-4px bg-[#333] rounded-4px inline-block mr-6px"></span>
  117. <a href="javascript:;" class="text-[#333] no-underline" @click="skip('#format_type',350)">支持哪些格式转换?</a>
  118. </dd>
  119. <dd class="ml-26px text-[12px] leading-[26px] mt-7px">
  120. <span class="h-4px w-4px bg-[#333] rounded-4px inline-block mr-6px"></span>
  121. <a href="javascript:;" class="text-[#333] no-underline" @click="skip('#where_format',450)">从哪里可以找到转档后的文件?</a>
  122. </dd>
  123. </dl>
  124. <!-- 搜索展示区 -->
  125. <div v-show="!showHot" class="search_list w-[98%] bg-[#fff] my-0 mx-auto py-12px">
  126. <ul class="m-0 pl-26px">
  127. <li class="m-0 p-0 text-[#333] text-[14px] leading-[40px] list-none"><a
  128. v-show="x0" href="javascript:;"
  129. @click="skip( '#format_type' , 350)" v-html="questions[0]"></a>
  130. </li>
  131. <li class="m-0 p-0 text-[#333] text-[14px] leading-[40px] list-none"><a
  132. v-show="x1" href="javascript:;"
  133. @click="skip( '#where_format' , 450)" v-html="questions[1]"></a>
  134. </li>
  135. <li class="m-0 p-0 text-[#333] text-[14px] leading-[40px] list-none"><a
  136. v-show="x2" href="javascript:;"
  137. @click="skip( '#file_scanning' , 750)" v-html="questions[2]"></a>
  138. </li>
  139. <li class="m-0 p-0 text-[#333] text-[14px] leading-[40px] list-none"><a
  140. v-show="x3" href="javascript:;"
  141. @click="skip( '#files_scanning' , 950)" v-html="questions[3]"></a>
  142. </li>
  143. <li class="m-0 p-0 text-[#333] text-[14px] leading-[40px] list-none"><a
  144. v-show="x4" href="javascript:;"
  145. @click="skip( '#files_scanning' , 1200)" v-html="questions[4]"></a>
  146. </li>
  147. <li class="m-0 p-0 text-[#333] text-[14px] leading-[40px] list-none"><a
  148. v-show="x5" href="javascript:;"
  149. @click="skip( '#files_scanning' , 1300)" v-html="questions[5]"></a>
  150. </li>
  151. <li class="m-0 p-0 text-[#333] text-[14px] leading-[40px] list-none"><a
  152. v-show="x6" href="javascript:;"
  153. @click="skip ( '#files_scanning' , 1500)" v-html="questions[6]"></a>
  154. </li>
  155. <li class="m-0 p-0 text-[#333] text-[14px] leading-[40px] list-none"><a
  156. v-show="x7" href="javascript:;"
  157. @click="skip( '#files_scanning' , 1650 )" v-html="questions[7]"></a>
  158. </li>
  159. </ul>
  160. </div>
  161. </div>
  162. </div>
  163. </template>
  164. <script>
  165. import { ref } from 'vue';
  166. export default {
  167. layout: "custom",
  168. setup(props) {
  169. // 控制搜索区展示
  170. const showSearch = ref(false)
  171. function changeShowSearch() {
  172. showSearch.value = !showSearch.value
  173. }
  174. // 用户输入
  175. const inputValue = ref("")
  176. // 控制热点问题展示
  177. const showHot = ref(true)
  178. // 对应问题展示
  179. const x0 = ref(false)
  180. const x1 = ref(false)
  181. const x2 = ref(false)
  182. const x3 = ref(false)
  183. const x4 = ref(false)
  184. const x5 = ref(false)
  185. const x6 = ref(false)
  186. const x7 = ref(false)
  187. // 搜索问题
  188. const questions = [
  189. "支持哪些格式转换?",
  190. "从哪里可以找到转档后的文件?",
  191. "QQ / 微信账号绑定手机号时,为什么会显示'手机账号已绑定其他账户,请更换绑定方式'?",
  192. "如何使用PDF扫描;转档功能?",
  193. "如何使用手绘&amp;手写?",
  194. "如何移除PDF文件注释?",
  195. "文件阅读是否支持护眼模式",
  196. "如何使用纯文字模式(文字转语音TTS)?"]
  197. // 搜索功能
  198. function search() {
  199. // 初始化
  200. questions[0] = "支持哪些格式转换?"
  201. questions[1] = "从哪里可以找到转档后的文件?"
  202. questions[2] = "QQ / 微信账号绑定手机号时,为什么会显示'手机账号已绑定其他账户,请更换绑定方式'?"
  203. questions[3] = "如何使用PDF扫描;转档功能?"
  204. questions[4] = "如何使用手绘&amp;手写?"
  205. questions[5] = "如何移除PDF文件注释?"
  206. questions[6] = "文件阅读是否支持护眼模式"
  207. questions[7] = "如何使用纯文字模式(文字转语音TTS)?"
  208. // 控制热点问题展示
  209. if (!inputValue.value == "") {
  210. showHot.value = false
  211. const lastStr=inputValue.value.slice(-1)
  212. // 展示搜索问题
  213. questions.forEach((item, index) => {
  214. if (item.includes(lastStr)) {
  215. show(index)
  216. } else {
  217. unshow(index)
  218. }
  219. })
  220. } else {
  221. showHot.value = true
  222. }
  223. // 展示问题
  224. function show(index) {
  225. switch (index) {
  226. case 0:
  227. x0.value = true;
  228. questions[0] = brightenKeyword(questions[0], inputValue.value)
  229. break;
  230. case 1:
  231. x1.value = true;
  232. questions[1] = brightenKeyword(questions[1], inputValue.value)
  233. break;
  234. case 2:
  235. x2.value = true;
  236. questions[2] = brightenKeyword(questions[2], inputValue.value)
  237. break;
  238. case 3:
  239. x3.value = true;
  240. questions[3] = brightenKeyword(questions[3], inputValue.value)
  241. break;
  242. case 4:
  243. x4.value = true;
  244. questions[4] = brightenKeyword(questions[4], inputValue.value)
  245. break;
  246. case 5:
  247. x5.value = true;
  248. questions[5] = brightenKeyword(questions[5], inputValue.value)
  249. break;
  250. case 6:
  251. x6.value = true;
  252. questions[6] = brightenKeyword(questions[6], inputValue.value)
  253. break;
  254. case 7:
  255. x7.value = true;
  256. questions[7] = brightenKeyword(questions[7], inputValue.value)
  257. break;
  258. }
  259. }
  260. // 隐藏已经过时的问题
  261. function unshow(index) {
  262. switch (index) {
  263. case 0:
  264. x0.value = false;
  265. break;
  266. case 1:
  267. x1.value = false;
  268. break;
  269. case 2:
  270. x2.value = false;
  271. break;
  272. case 3:
  273. x3.value = false;
  274. break;
  275. case 4:
  276. x4.value = false;
  277. break;
  278. case 5:
  279. x5.value = false;
  280. break;
  281. case 6:
  282. x6.value = false;
  283. break;
  284. case 7:
  285. x7.value = false;
  286. break;
  287. }
  288. }
  289. function brightenKeyword(val, keyword) {
  290. const allStr=keyword.split("")
  291. let res = val;
  292. allStr.forEach((item)=>{
  293. if (val.includes(item)) {
  294. res = val.replace(item, '<font color="#ff4948">' + item + '</font>')
  295. }
  296. })
  297. return res
  298. }
  299. }
  300. // 问题跳转
  301. function skip(value,num){
  302. changeShowSearch()
  303. const position = document.querySelector(value);
  304. const positionValue=position.getBoundingClientRect().top
  305. const top = num;
  306. let x=1;
  307. function run() {
  308. x=x+50
  309. window.scrollTo(0,x)
  310. run.timer = requestAnimationFrame(run);
  311. if (x>top) {
  312. cancelAnimationFrame(run.timer);
  313. }
  314. }
  315. requestAnimationFrame(run);
  316. }
  317. return {
  318. showSearch,
  319. changeShowSearch,
  320. showHot,
  321. search,
  322. inputValue,
  323. x0,
  324. x1,
  325. x2,
  326. x3,
  327. x4,
  328. x5,
  329. x6,
  330. x7,
  331. questions,
  332. skip,
  333. }
  334. }
  335. }
  336. </script>
  337. <style >
  338. /* 设置body */
  339. body{
  340. background-color:#f2f2f2 ;
  341. min-width: 0px
  342. }
  343. /* 主页面背景图 */
  344. .search_bg {
  345. width: 100%;
  346. height: 100%;
  347. background: rgba(0, 0, 0, 0.5) url(http://cn-file.17pdf.com/website/common/searcg_bg.png) no-repeat;
  348. }
  349. input {
  350. outline: none;
  351. }
  352. /* 主页面下dl等样式 */
  353. .pro_solve dl {
  354. width: 100%;
  355. zoom: 1;
  356. background: #fff;
  357. border-radius: 4px;
  358. box-shadow: 0px 1px 5px rgb(0 0 0 / 10%);
  359. padding: 38px 0px;
  360. margin: 8px 0px;
  361. }
  362. .pro_solve dl:after {
  363. visibility: hidden;
  364. display: block;
  365. font-size: 0;
  366. content: " ";
  367. clear: both;
  368. height: 0;
  369. }
  370. .pro_solve dl dt {
  371. width: 33%;
  372. float: left;
  373. }
  374. .pro_solve dl dt span {
  375. width: 110px;
  376. height: 4px;
  377. display: block;
  378. background: #ff4948;
  379. border-radius: 4px;
  380. margin-left: 85px;
  381. }
  382. .pro_solve dl dt h3 {
  383. font-size: 20px;
  384. color: #333;
  385. margin: 20px 0px 20px 85px;
  386. font-weight: bold;
  387. }
  388. .pro_solve dl dd {
  389. width: 67%;
  390. float: right;
  391. margin: 0px;
  392. font-size: 16px;
  393. margin: 10px 0px;
  394. }
  395. .pro_solve dl dd h4 {
  396. color: #333;
  397. margin: 0px;
  398. line-height: 24px;
  399. font-weight: bold;
  400. }
  401. .pro_solve dl dd h4 span {
  402. display: inline-block;
  403. width: 6px;
  404. height: 6px;
  405. border-radius: 100%;
  406. background: #333;
  407. margin-right: 14px;
  408. }
  409. .pro_solve dl dd p {
  410. color: #636363;
  411. padding-left: 20px;
  412. margin: 16px 0px;
  413. line-height: 24px;
  414. width: 520px;
  415. }
  416. /* 搜索页面背景图 */
  417. .search_ipt {
  418. width: 100%;
  419. /* height: 40px; */
  420. background: url(http://cn-file.17pdf.com/website/common/search_label.png) no-repeat;
  421. background-size: 100% 100%;
  422. padding: 33px 0px;
  423. }
  424. .search_txt input {
  425. width: 94%;
  426. height: 100%;
  427. background: rgba(0, 0, 0, 0.5) url(http://cn-file.17pdf.com/website/common/ic_search.png) no-repeat 16px 12px;
  428. border-radius: 60px;
  429. border: 0px;
  430. outline: none;
  431. padding-left: 40px;
  432. font-size: 14px;
  433. color: #fff;
  434. float: left;
  435. }
  436. .hot {
  437. border-radius: 0px 0px 4px 4px;
  438. }
  439. .search_list {
  440. border-radius: 0px 0px 4px 4px;
  441. }
  442. .search_list ul li:last-of-type {
  443. border-bottom: 0px;
  444. }
  445. .search_list ul li {
  446. border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  447. }
  448. .hot dd a:hover {
  449. color: #ff4948;
  450. }
  451. .search_list ul li a:hover {
  452. color: #ff4948;
  453. }
  454. </style>