setNewPassword.js 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. exports.ids = [74];
  2. exports.modules = {
  3. /***/ 249:
  4. /***/ (function(module, exports) {
  5. // Exports
  6. module.exports = {
  7. };
  8. /***/ }),
  9. /***/ 301:
  10. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  11. "use strict";
  12. __webpack_require__.r(__webpack_exports__);
  13. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_setNewPassword_vue_vue_type_style_index_0_id_7d6b25ac_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(249);
  14. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_setNewPassword_vue_vue_type_style_index_0_id_7d6b25ac_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_setNewPassword_vue_vue_type_style_index_0_id_7d6b25ac_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  15. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_setNewPassword_vue_vue_type_style_index_0_id_7d6b25ac_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_setNewPassword_vue_vue_type_style_index_0_id_7d6b25ac_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  16. /***/ }),
  17. /***/ 350:
  18. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  19. "use strict";
  20. // ESM COMPAT FLAG
  21. __webpack_require__.r(__webpack_exports__);
  22. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/setNewPassword.vue?vue&type=template&id=7d6b25ac&scoped=true
  23. var render = function render() {
  24. var _vm = this,
  25. _c = _vm._self._c;
  26. return _c('div', {
  27. staticClass: "com-main com-width-1400 com-margin-auto"
  28. }, [_vm._ssrNode("<div class=\"resetPassword\" data-v-7d6b25ac>", "</div>", [_vm._ssrNode("<div data-v-7d6b25ac>", "</div>", [_vm._ssrNode("<p class=\"title\" data-v-7d6b25ac>Set New Password</p> <p class=\"tip\" data-v-7d6b25ac>Fill in your new password</p> "), _vm._ssrNode("<div class=\"userInfo\" data-v-7d6b25ac>", "</div>", [_c('el-form', {
  29. ref: "ruleForm",
  30. staticClass: "demo-ruleForm",
  31. attrs: {
  32. "model": _vm.ruleForm,
  33. "rules": _vm.rules
  34. }
  35. }, [_c('el-form-item', {
  36. attrs: {
  37. "prop": "password"
  38. }
  39. }, [_c('label', {
  40. attrs: {
  41. "for": ""
  42. }
  43. }, [_vm._v("Password")]), _vm._v(" "), _c('el-input', {
  44. attrs: {
  45. "type": _vm.flag ? 'text' : 'password'
  46. },
  47. model: {
  48. value: _vm.ruleForm.password,
  49. callback: function ($$v) {
  50. _vm.$set(_vm.ruleForm, "password", $$v);
  51. },
  52. expression: "ruleForm.password"
  53. }
  54. }, [!_vm.flag ? _c('i', {
  55. staticClass: "el-input__icon iconfont",
  56. staticStyle: {
  57. "font-size": "22px"
  58. },
  59. attrs: {
  60. "slot": "suffix"
  61. },
  62. on: {
  63. "click": _vm.showPassword
  64. },
  65. slot: "suffix"
  66. }, [_vm._v("")]) : _c('i', {
  67. staticClass: "el-input__icon iconfont",
  68. staticStyle: {
  69. "font-size": "22px"
  70. },
  71. attrs: {
  72. "slot": "suffix"
  73. },
  74. on: {
  75. "click": _vm.showPassword
  76. },
  77. slot: "suffix"
  78. }, [_vm._v("")])])], 1), _vm._v(" "), _c('el-form-item', {
  79. attrs: {
  80. "prop": "confirm_password"
  81. }
  82. }, [_c('label', {
  83. attrs: {
  84. "for": ""
  85. }
  86. }, [_vm._v(" Comfirm Password")]), _vm._v(" "), _c('el-input', {
  87. attrs: {
  88. "type": _vm.confirm_flag ? 'text' : 'password'
  89. },
  90. model: {
  91. value: _vm.ruleForm.confirm_password,
  92. callback: function ($$v) {
  93. _vm.$set(_vm.ruleForm, "confirm_password", $$v);
  94. },
  95. expression: "ruleForm.confirm_password"
  96. }
  97. }, [!_vm.confirm_flag ? _c('i', {
  98. staticClass: "el-input__icon iconfont",
  99. staticStyle: {
  100. "font-size": "22px"
  101. },
  102. attrs: {
  103. "slot": "suffix"
  104. },
  105. on: {
  106. "click": _vm.showPassword
  107. },
  108. slot: "suffix"
  109. }, [_vm._v("")]) : _c('i', {
  110. staticClass: "el-input__icon iconfont",
  111. staticStyle: {
  112. "font-size": "22px"
  113. },
  114. attrs: {
  115. "slot": "suffix"
  116. },
  117. on: {
  118. "click": _vm.showPassword
  119. },
  120. slot: "suffix"
  121. }, [_vm._v("")])])], 1)], 1)], 1), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"submitBtn\" data-v-7d6b25ac>", "</div>", [_c('el-button', {
  122. on: {
  123. "click": function ($event) {
  124. return _vm.submit('ruleForm');
  125. }
  126. }
  127. }, [_vm._v("SUBMIT")])], 1)], 2)]), _vm._ssrNode(" "), _c('dialog-XX-success', {
  128. attrs: {
  129. "visible": _vm.xxContentVisible,
  130. "content": _vm.xxContent
  131. },
  132. on: {
  133. "update:visible": function ($event) {
  134. _vm.xxContentVisible = $event;
  135. },
  136. "notify-parent": _vm.handleNotification
  137. }
  138. })], 2);
  139. };
  140. var staticRenderFns = [];
  141. // CONCATENATED MODULE: ./pages/setNewPassword.vue?vue&type=template&id=7d6b25ac&scoped=true
  142. // EXTERNAL MODULE: external "vuex"
  143. var external_vuex_ = __webpack_require__(6);
  144. // EXTERNAL MODULE: ./components/DIalogXXSuccess.vue + 4 modules
  145. var DIalogXXSuccess = __webpack_require__(30);
  146. // EXTERNAL MODULE: ./plugins/AES.js
  147. var AES = __webpack_require__(32);
  148. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/setNewPassword.vue?vue&type=script&lang=js
  149. /* harmony default export */ var setNewPasswordvue_type_script_lang_js = ({
  150. components: {
  151. 'dialog-XX-success': DIalogXXSuccess["default"]
  152. },
  153. middleware: "checkTimestamp",
  154. data() {
  155. return {
  156. xxContentVisible: false,
  157. xxContent: 'success',
  158. flag: false,
  159. confirm_flag: false,
  160. email: '',
  161. ruleForm: {
  162. password: '',
  163. confirm_password: ''
  164. },
  165. rules: {
  166. // email: [{ required: true, message: "请输入", trigger: "blur" }],
  167. password: [{
  168. required: true,
  169. message: 'Please enter your password',
  170. trigger: 'blur'
  171. }, {
  172. min: 6,
  173. max: 16,
  174. message: 'Password length only allows 6-16 bits',
  175. trigger: 'blur'
  176. }],
  177. confirm_password: [{
  178. required: true,
  179. message: 'Please confirm your password',
  180. trigger: 'blur'
  181. }]
  182. }
  183. };
  184. },
  185. created() {
  186. const str = AES["a" /* default */].decrypt(this.$route.query.email);
  187. const parts = str.split("&t=");
  188. this.email = parts[0];
  189. },
  190. methods: {
  191. handleNotification() {
  192. this.$router.push('/');
  193. this.$store.dispatch('logout');
  194. this.openDialog();
  195. },
  196. submit(formName) {
  197. this.$refs[formName].validate(valid => {
  198. if (valid) {
  199. if (this.ruleForm.password !== this.ruleForm.confirm_password) {
  200. this.$message({
  201. message: 'The second password is inconsistent',
  202. type: 'error'
  203. });
  204. } else {
  205. this.$axios.post('/uk-api/uk/reset', {
  206. // email: this.ruleForm.email,
  207. email: this.email,
  208. password: this.ruleForm.password,
  209. confirm_password: this.ruleForm.confirm_password
  210. }).then(res => {
  211. this.xxContentVisible = true;
  212. this.xxContent = "Password Reset Successful";
  213. }).catch(() => {
  214. // this.$message.error(error.response.data.msg)
  215. });
  216. }
  217. } else {
  218. console.log('error submit!!');
  219. return false;
  220. }
  221. });
  222. },
  223. ...Object(external_vuex_["mapMutations"])(['openDialog']),
  224. showPassword() {
  225. this.flag = !this.flag;
  226. this.confirm_flag = !this.confirm_flag;
  227. }
  228. }
  229. });
  230. // CONCATENATED MODULE: ./pages/setNewPassword.vue?vue&type=script&lang=js
  231. /* harmony default export */ var pages_setNewPasswordvue_type_script_lang_js = (setNewPasswordvue_type_script_lang_js);
  232. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  233. var componentNormalizer = __webpack_require__(2);
  234. // CONCATENATED MODULE: ./pages/setNewPassword.vue
  235. function injectStyles (context) {
  236. var style0 = __webpack_require__(301)
  237. if (style0.__inject__) style0.__inject__(context)
  238. }
  239. /* normalize component */
  240. var component = Object(componentNormalizer["a" /* default */])(
  241. pages_setNewPasswordvue_type_script_lang_js,
  242. render,
  243. staticRenderFns,
  244. false,
  245. injectStyles,
  246. "7d6b25ac",
  247. "0df45a5f"
  248. )
  249. /* harmony default export */ var setNewPassword = __webpack_exports__["default"] = (component.exports);
  250. /***/ })
  251. };;
  252. //# sourceMappingURL=setNewPassword.js.map