resetPsw.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. <template>
  2. <div class="family text-[14px] leading-[1.42857143] text-[#333] bg-[#fff]">
  3. <div class="header h-80px">
  4. <nav
  5. class="nav-header-password col-md-12 leading-[80px] relative min-h-1px px-15px"
  6. >
  7. <div class="logo p-0">
  8. <!-- 此处a需不需要改 -->
  9. <nuxt-link to="/" class="text-[#666] text-[24px] no-underline bg-transparent">
  10. <span class="logo-img m-0 py-20px pl-170px"></span>
  11. <span>17PDF Reader</span>
  12. </nuxt-link>
  13. </div>
  14. </nav>
  15. </div>
  16. <div class="pc-container px-15px mx-auto sm:w-750px">
  17. <section class="password-reset-form py-72px px-0">
  18. <div class="px-15px mx-auto sm:w-750px">
  19. <div class="row mx-[-15px]">
  20. <div class="col-md-3 relative min-h-1px px-15px"></div>
  21. <div class="col-md-6 relative min-h-1px px-15px tiny:w-[70%] tiny:my-0 tiny:mx-auto">
  22. <h2 class="text-center text-[#00bbd3] text-[30px] mb-32px text-center mt-20px leading-[1.1] font-medium">
  23. 设置新密码
  24. </h2>
  25. </div>
  26. </div>
  27. <div class="row form-wrapper mx-[-15px]">
  28. <div class="col-md-3 relative min-h-1px px-15px"></div>
  29. <div class="col-md-6 relative min-h-1px px-15px tiny:w-[70%] tiny:my-0 tiny:mx-auto">
  30. <h3 v-show = " showError " class="warning text-[24px] mt-20px mb-10px font-medium laeding-[1.1]">
  31. 密码重置失败,请确认两次密码一致!
  32. </h3>
  33. <input type="hidden" name="_method" value="put" /><input
  34. type="hidden"
  35. name="authenticity_token"
  36. value="QBgQOkuMzY9y68DxLhdc/7SYTXa5vCi1AOwaPmWairZQEy8t4DnUteFfBA8cJWji/bkgBGwDpQrcSnHum6baJQ=="
  37. />
  38. <div class="form-group mb-34px">
  39. <label
  40. for="password"
  41. class="text-[#333] text-[14px] font-normal max-w-full mb-5px"
  42. >请输入新密码</label
  43. >
  44. <input
  45. id="password"
  46. v-model="newPassword"
  47. type="password"
  48. class="form-control h-40px w-full py-6px px-12px text-[14px] leading-[1.42857143] text-[#555] bg-[#fff] border border-solid border-gray-[#ccc] m-0"
  49. @input="changeErr"
  50. @keydown="keydown($event)"
  51. />
  52. </div>
  53. <div class="form-group mb-34px">
  54. <label
  55. for="password-confirmation"
  56. class="text-[#666] text-[14px] font-normal max-w-full mb-5px"
  57. >请再次输入新密码</label
  58. >
  59. <input
  60. id="password-confirmation"
  61. v-model="confirm_newPassword"
  62. type="password"
  63. class="form-control h-40px w-full py-6px px-12px text-[14px] leading-[1.42857143] text-[#555] bg-[#fff] border border-solid border-gray-[#ccc] m-0"
  64. @input="changeErr"
  65. @keydown="keydown($event)"
  66. />
  67. </div>
  68. <div v-show="errMsg !== ''" class="error-mess error-mess-signup mb-5px">
  69. <span id="error-message error-tip ">{{errMsg}}</span>
  70. </div>
  71. <button
  72. class="btn btn-block bg-[#fdc656] text-[#fff] h-50px w-full py-6px px-12px mb-0 text-[14px] m-0 font-normal leading-[1.42857143] text-center whitespace-nowrap align-middle cursor-pointer border border-solid border-transparent"
  73. type="submit"
  74. @click="resetPassword"
  75. >
  76. 确认修改
  77. </button>
  78. </div>
  79. </div>
  80. </div>
  81. </section>
  82. </div>
  83. <footer class="footer-password">
  84. <div
  85. class="container-password footer-container w-full bg-[#222] text-[#fff] text-[18px] text-center px-15px mx-auto"
  86. >
  87. <div class="row footer-row py-50px px-100px text-left mx-[-15px]">
  88. <div
  89. class="col-xs-2 w-[16.66666667%] float-left relative min-h-1px px-15px"
  90. ></div>
  91. <div class="col-xs-3 w-[25%] float-left relative min-h-1px px-15px">
  92. <h4 class="title text-[18px] my-10px font-medium leading-[1.1]">
  93. PDF
  94. </h4>
  95. <ul class="p-0 mt-0 mb-10px">
  96. <li class="list-none text-[16px] mt-24px">
  97. <nuxt-link to="/" class="opacity-30 text-[#fff] no-underline bg-transparent">产品</nuxt-link>
  98. </li>
  99. <li class="list-none text-[16px] mt-24px">
  100. <nuxt-link to="/sdk" class="opacity-30 text-[#fff] no-underline bg-transparent">SDK介绍</nuxt-link>
  101. </li>
  102. </ul>
  103. </div>
  104. <div class="col-xs-3 w-[25%] float-left relative min-h-1px px-15px">
  105. <h4 class="title text-[18px] my-10px font-medium leading-[1.1]">
  106. 下载
  107. </h4>
  108. <ul class="p-0 mt-0 mb-10px">
  109. <li class="list-none text-[16px] mt-24px">
  110. <a
  111. target="_blank"
  112. href="https://www.kdanmobile.com/zh-cn/pdf-reader/"
  113. class="opacity-30 text-[#fff] no-underline bg-transparent"
  114. >PDF Reader</a
  115. >
  116. </li>
  117. <li class="list-none text-[16px] mt-24px">
  118. <a
  119. target="_blank"
  120. href="https://markups.kdanmobile.com/"
  121. class="opacity-30 text-[#fff] no-underline bg-transparent"
  122. >Markup</a
  123. >
  124. </li>
  125. <li class="list-none text-[16px] mt-24px">
  126. <a
  127. target="_blank"
  128. href="https://www.kdanmobile.com/zh-cn/pdf-reader/"
  129. class="opacity-30 text-[#fff] no-underline bg-transparent"
  130. >Connoisser</a
  131. >
  132. </li>
  133. <li class="list-none text-[16px] mt-24px">
  134. <a
  135. target="_blank"
  136. href="https://chrome.google.com/webstore/detail/pdf-markup-my-web-markups/cbjngbfjehiofmihfpodinolkcokdojp"
  137. class="opacity-30 text-[#fff] no-underline bg-transparent"
  138. >网页插件</a
  139. >
  140. </li>
  141. </ul>
  142. </div>
  143. <div class="col-xs-3 w-[25%] float-left relative min-h-1px px-15px">
  144. <h4 class="title text-[18px] my-10px font-medium leading-[1.1]">
  145. 联系我们
  146. </h4>
  147. <div class="icon mt-28px">
  148. <a
  149. class="call mt-20px mr-20px no-underline"
  150. title="0731-84225961"
  151. ></a>
  152. <a
  153. target="_blank"
  154. href="http://weibo.com/kdanmobilesoftware"
  155. class="weibo mt-20px mr-20px no-underline"
  156. ></a>
  157. <a
  158. class="qq mt-20px mr-20px no-underline"
  159. href="tencent://message/?uin=231368992&amp;Site"
  160. ></a>
  161. </div>
  162. </div>
  163. </div>
  164. <p class="text-muted text-[14px] text-[#777] mb-10px mt-0 mx-0">
  165. <a target="_blank" href="/terms" class="text-muted"
  166. >服务条款</a
  167. >
  168. |
  169. <a target="_blank" href="/privacy" class="text-muted"
  170. >隐私政策</a
  171. >
  172. | ©2022 Kdanmobile All Rights Reserved.
  173. </p>
  174. <p class="text-muted text-[14px] text-[#777] mb-10px mt-0 mx-0">
  175. 凯钿公司 版权所有
  176. </p>
  177. </div>
  178. </footer>
  179. </div>
  180. </template>
  181. <script>
  182. import qs from 'qs'
  183. export default {
  184. layout(){
  185. return 'custom'
  186. },
  187. middleware:'user',
  188. head(){
  189. return {
  190. title:'17PDF Reader - 账号管理'
  191. }
  192. },
  193. data() {
  194. return {
  195. confirm_newPassword: '',
  196. newPassword: '',
  197. showError: false,
  198. errMsg: ''
  199. }
  200. },
  201. methods: {
  202. resetPassword() {
  203. if(this.newPassword === '' || this.confirm_newPassword !== this.newPassword || this.newPassword.length < 6) {
  204. this.showError = true
  205. return
  206. }
  207. const data = qs.parse(location.href.split('?')[1])
  208. const params = {
  209. account: data.account,
  210. verifyCode: data.verifyCode,
  211. type: '0',
  212. newPassword: this.newPassword
  213. }
  214. this.$axios.post('members/resetPassword', params).then((res) => {
  215. if(res.code === 200) {
  216. this.$router.push('/')
  217. }
  218. })
  219. },
  220. changeErr(){
  221. this.errMsg = ''
  222. },
  223. keydown(event){
  224. if(event.keyCode == 32){
  225. event.returnValue = false
  226. this.errMsg = '请勿输入空格'
  227. }
  228. },
  229. }
  230. }
  231. </script>
  232. <style>
  233. /* 字体 */
  234. .family {
  235. font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  236. }
  237. /* 头部边框 */
  238. .nav-header-password {
  239. border-bottom: 1px solid #dadada;
  240. }
  241. /* logo背景图 */
  242. .logo-img {
  243. background: url(~/assets/images/password/logo_pdf_top_red-f4311f231ebc70c4ba5ac8e1e6af907a48ea69f1f159c501a277ade70dfd7022.png)
  244. no-repeat 85% 50%;
  245. }
  246. /* input被focus */
  247. .form-control:focus {
  248. border-color: #66afe9;
  249. outline: 0;
  250. -webkit-box-shadow: inset 0 1px 1px rgb(0 0 0 / 8%),
  251. 0 0 8px rgb(102 175 233 / 60%);
  252. box-shadow: inset 0 1px 1px rgb(0 0 0 / 8%), 0 0 8px rgb(102 175 233 / 60%);
  253. }
  254. .btn:hover {
  255. background-color: #fab93d;
  256. }
  257. .container-password::before,
  258. .container-password::after,
  259. .row::before,
  260. .row::after {
  261. content: ' ';
  262. display: table;
  263. clear: both;
  264. }
  265. /* windi css不能实现的 */
  266. .form-control {
  267. -webkit-box-shadow: inset 0 1px 1px rgb(0 0 0 / 8%);
  268. box-shadow: inset 0 1px 1px rgb(0 0 0 / 8%);
  269. -webkit-transition: border-color ease-in-out 0.15s,
  270. -webkit-box-shadow ease-in-out 0.15s;
  271. -o-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
  272. transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
  273. }
  274. /* 确认按钮 */
  275. .btn {
  276. -ms-touch-action: manipulation;
  277. touch-action: manipulation;
  278. -webkit-user-select: none;
  279. -moz-user-select: none;
  280. -ms-user-select: none;
  281. user-select: none;
  282. }
  283. /* 底部图标 */
  284. .call:before {
  285. content: url(~/assets/images/password/ic_foot_phone_normal-6c4b69f54ec3fd9ba9c181a1a776c0ea4695c2c4f26c134b88f41796d14c72af.png);
  286. }
  287. .weibo:before {
  288. content: url(~/assets/images/password/ic_foot_weibo_normal-c0b566a8cc73aa0577487c8f179327856e74b0572a787211917c3a2e671f8628.png);
  289. }
  290. .qq:before {
  291. content: url(~/assets/images/password/ic_foot_qq_normal-e67510e549266f75e77757d308306b01185370fffc5a105438d91601b6a486ec.png);
  292. }
  293. .error-mess {
  294. position: relative;
  295. font-size: 14px;
  296. text-align: center;
  297. }
  298. .error-mess-signup {
  299. position: initial;
  300. clear: both;
  301. margin-top: 15px;
  302. }
  303. .error-mess span{
  304. display: inline-block;
  305. background: #808080;
  306. color: rgb(255, 255, 255);
  307. padding: 5px 15px;
  308. border-radius: 4px;
  309. }
  310. </style>