{"version":3,"sources":["webpack:///./src/views/ap/login/Forget.vue?dc2a","webpack:///./src/controllers/ap/login/Forget.ts","webpack:///./src/controllers/ap/login/Forget.ts?ad5b","webpack:///./src/views/ap/login/Forget.vue"],"names":["render","_vm","this","_c","_self","_setupProxy","staticClass","_m","attrs","_v","directives","name","rawName","value","login","expression","modifiers","domProps","on","$event","target","composing","$set","trim","$forceUpdate","errMsg","identification","_s","account","doubleClick","stopPropagation","checkAndSubmit","hintBox","show","hint","closeHint","staticRenderFns","isLoading","Protobuf","Login","create","created","isEmpty","submit","item","toString","console","log","loginQuery","encode","finish","forget","errorCode","ErrorCode","EC_SUCESS","openHint","$router","push","LoginForgetController","components","Loading","Hint","component"],"mappings":"uHAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAUF,EAAIG,MAAMC,YAAY,OAAOF,EAAG,MAAM,CAACG,YAAY,SAAS,CAACL,EAAIM,GAAG,GAAGJ,EAAG,MAAM,CAACG,YAAY,8BAA8B,CAACH,EAAG,MAAM,CAACG,YAAY,SAAS,CAACH,EAAG,OAAO,CAACA,EAAG,MAAM,CAACG,YAAY,WAAW,CAACH,EAAG,QAAQ,CAACK,MAAM,CAAC,IAAM,KAAK,CAACP,EAAIQ,GAAG,aAAaN,EAAG,MAAM,CAACG,YAAY,+BAA+B,CAACH,EAAG,QAAQ,CAACO,WAAW,CAAC,CAACC,KAAK,QAAQC,QAAQ,eAAeC,MAAOZ,EAAIa,MAAoB,eAAEC,WAAW,uBAAuBC,UAAU,CAAC,MAAO,KAAQV,YAAY,2CAA2CE,MAAM,CAAC,KAAO,OAAO,YAAc,aAAa,UAAY,MAAMS,SAAS,CAAC,MAAShB,EAAIa,MAAoB,gBAAGI,GAAG,CAAC,MAAQ,SAASC,GAAWA,EAAOC,OAAOC,WAAiBpB,EAAIqB,KAAKrB,EAAIa,MAAO,iBAAkBK,EAAOC,OAAOP,MAAMU,SAAS,KAAO,SAASJ,GAAQ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GAEa,KAAvBxC,KAAKY,MAAMc,UACX1B,KAAKuB,OAAOG,QAAU,KACtBc,GAAU,GAGVA,EAAgB,CAAP,GAAO,GAEpB,GAAMxC,KAAKyC,U,cAAX,S,YAGU,YAAAA,OAAd,W,qIACSzC,KAAK2B,YAAN,OACA3B,KAAK2B,aAAc,EAGnB3B,KAAKmC,WAAY,EAEXO,EAAO1C,KAAKY,MAClB8B,EAAKhB,QAAU,YAAgB1B,KAAKY,MAAMc,SAASiB,WACnDC,QAAQC,IAAIH,GACNI,EAAa,mBAAcV,SAASC,MAAMU,OAAOL,GAAMM,SAC3C,GAAM,OAAWC,OAAOH,K,OAApCI,EAAY,SAClBN,QAAQC,IAAIK,GACRA,IAAc,mBAAcd,SAASe,UAAUC,WAC/CpD,KAAKqD,SAAS,iBACdrD,KAAKY,MAAMc,QAAU,KAErB1B,KAAKuB,OAAOC,eAAiB,YAC7BxB,KAAKuB,OAAOG,QAAU,UACtB1B,KAAKY,MAAMc,QAAU,IAGzB1B,KAAKmC,WAAY,EAGjBnC,KAAK2B,aAAc,E,mCAKnB,YAAA0B,SAAR,SAAiBrB,GACbhC,KAAK8B,QAAQC,MAAO,EACpB/B,KAAK8B,QAAQE,KAAOA,GAGhB,YAAAC,UAAR,WACIjC,KAAK8B,QAAQC,MAAO,EACpB/B,KAAK8B,QAAQE,KAAO,GACpBhC,KAAKsD,QAAQC,KAAK,WA7ELC,EAAqB,gBANzC,eAAiC,CAC9BC,WAAY,CACRC,QAAO,OACPC,KAAI,WAGSH,GAgFrB,EAhFA,CAAmD,QAA9B,ICbsR,I,YCOvSI,EAAY,eACd,EACA9D,EACAoC,GACA,EACA,KACA,KACA,MAIa,aAAA0B,E","file":"js/chunk-2d22218b.05cb7e66.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('div',{staticClass:\"login\"},[_vm._m(0),_c('div',{staticClass:\"bgBlock col-5 flex--center\"},[_c('div',{staticClass:\"col-9\"},[_c('form',[_c('div',{staticClass:\"col-row\"},[_c('label',{attrs:{\"for\":\"\"}},[_vm._v(\"特店代號/統編\")]),_c('div',{staticClass:\"e-formGroup e-formGroup--12\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model.trim\",value:(_vm.login.identification),expression:\"login.identification\",modifiers:{\"trim\":true}}],staticClass:\"e-formGroup_item e-formGroup_item--login\",attrs:{\"type\":\"text\",\"placeholder\":\"請輸入特店代號/統編\",\"maxlength\":\"20\"},domProps:{\"value\":(_vm.login.identification)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(_vm.login, \"identification\", $event.target.value.trim())},\"blur\":function($event){return _vm.$forceUpdate()}}}),_c('img',{staticClass:\"e-formGroup_icon e-formGroup_icon--l\",attrs:{\"src\":\"/img/user.svg\",\"alt\":\"\"}})]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.errMsg.identification !== ''),expression:\"errMsg.identification !== ''\"}],staticClass:\"e-formGroup_err\"},[_vm._v(_vm._s(_vm.errMsg.identification))])]),_c('div',{staticClass:\"col-row\"},[_c('label',{attrs:{\"for\":\"\"}},[_vm._v(\"使用者代號\")]),_c('div',{staticClass:\"e-formGroup e-formGroup--12\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model.trim\",value:(_vm.login.account),expression:\"login.account\",modifiers:{\"trim\":true}}],staticClass:\"e-formGroup_item e-formGroup_item--login\",attrs:{\"type\":\"text\",\"placeholder\":\"請輸入使用者代號\",\"maxlength\":\"20\"},domProps:{\"value\":(_vm.login.account)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(_vm.login, \"account\", $event.target.value.trim())},\"blur\":function($event){return _vm.$forceUpdate()}}}),_c('img',{staticClass:\"e-formGroup_icon e-formGroup_icon--l\",attrs:{\"src\":\"/img/user.svg\",\"alt\":\"\"}})]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.errMsg.account !== ''),expression:\"errMsg.account !== ''\"}],staticClass:\"e-formGroup_err\"},[_vm._v(_vm._s(_vm.errMsg.account))])]),_c('div',{staticClass:\"col-row flex--center\"},[_c('a',{staticClass:\"e-btn e-btn--primary e-btn--w100\",attrs:{\"disabled\":_vm.doubleClick},on:{\"click\":function($event){$event.stopPropagation();return _vm.checkAndSubmit()}}},[_vm._v(\"送出\")])])]),_vm._m(1)])]),_c('Hint',{attrs:{\"show\":_vm.hintBox.show,\"message\":_vm.hintBox.hint},on:{\"closeHint\":function($event){return _vm.closeHint()}}}),_c('Loading',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.isLoading),expression:\"isLoading\"}]})],1)\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('div',{staticClass:\"col-row flex--center\"},[_c('div',{staticClass:\"l-title\"},[_c('span',[_vm._v(\"忘記密碼\")])])])\n},function (){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('div',{staticClass:\"col-row\"},[_c('label',[_vm._v(\"送出後將由系統發送密碼重置信至特約商店指定信箱\")]),_c('label',[_vm._v(\"如您無法提供以上資訊,仍需重置密碼,請與合作金庫銀行窗口連繫,謝謝\")])])\n}]\n\nexport { render, staticRenderFns }","import { Component, Vue } from \"vue-property-decorator\";\r\n\r\nimport { Loading, Hint } from \"@/components\";\r\nimport { LoginModel } from \"@/models\";\r\nimport { TCBReceiptApi } from \"@/network/pb/proto\";\r\nimport * as CryptoJS from 'crypto-js'\r\n\r\n@Component({\r\n components: {\r\n Loading,\r\n Hint,\r\n },\r\n})\r\nexport default class LoginForgetController extends Vue {\r\n private isLoading = true;\r\n private doubleClick = false;\r\n\r\n private login = TCBReceiptApi.Protobuf.Login.create();\r\n private errMsg: {\r\n identification: string,\r\n account: string,\r\n } = {\r\n identification: \"\",\r\n account: \"\",\r\n };\r\n\r\n // Hint\r\n private hintBox: {show: boolean, hint: string} = {show: false, hint: \"\"};\r\n\r\n public async created() {\r\n this.isLoading = false;\r\n }\r\n\r\n private async checkAndSubmit() {\r\n let isEmpty = false;\r\n this.errMsg.identification = \"\";\r\n this.errMsg.account = \"\";\r\n\r\n if (this.login.identification === \"\") {\r\n this.errMsg.identification = \"必填\";\r\n isEmpty = true;\r\n }\r\n if (this.login.account === \"\") {\r\n this.errMsg.account = \"必填\";\r\n isEmpty = true;\r\n }\r\n\r\n if (isEmpty) return false;\r\n\r\n await this.submit();\r\n }\r\n\r\n private async submit() {\r\n if (!this.doubleClick) {\r\n this.doubleClick = true;\r\n\r\n /* send value */\r\n this.isLoading = true;\r\n\r\n const item = this.login as TCBReceiptApi.Protobuf.Login;\r\n item.account = CryptoJS.SHA256(this.login.account).toString();\r\n console.log(item);\r\n const loginQuery = TCBReceiptApi.Protobuf.Login.encode(item).finish();\r\n const errorCode = await LoginModel.forget(loginQuery);\r\n console.log(errorCode);\r\n if (errorCode === TCBReceiptApi.Protobuf.ErrorCode.EC_SUCESS) {\r\n this.openHint(\"已送出密碼重置信至您的信箱\");\r\n this.login.account = \"\";\r\n } else {\r\n this.errMsg.identification = \"特店代號/統編錯誤\";\r\n this.errMsg.account = \"使用者代號錯誤\";\r\n this.login.account = \"\";\r\n }\r\n\r\n this.isLoading = false;\r\n /* send value */\r\n\r\n this.doubleClick = false;\r\n }\r\n }\r\n\r\n /* Hint */\r\n private openHint(hint: string) {\r\n this.hintBox.show = true;\r\n this.hintBox.hint = hint;\r\n }\r\n\r\n private closeHint() {\r\n this.hintBox.show = false;\r\n this.hintBox.hint = \"\";\r\n this.$router.push(\"/login\");\r\n }\r\n /* Hint */\r\n}","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--14-2!../../../../node_modules/eslint-loader/index.js??ref--13-0!./Forget.ts?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--14-2!../../../../node_modules/eslint-loader/index.js??ref--13-0!./Forget.ts?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./Forget.vue?vue&type=template&id=4bf79c30&\"\nimport script from \"@/controllers/ap/login/Forget?vue&type=script&lang=ts&\"\nexport * from \"@/controllers/ap/login/Forget?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}