chunk-2d0c4d6c.8c4e5a08.js.map 12 KB

1
  1. {"version":3,"sources":["webpack:///./src/views/user/BindingPhone.vue?1044","webpack:///src/views/user/BindingPhone.vue","webpack:///./src/views/user/BindingPhone.vue?ad76","webpack:///./src/views/user/BindingPhone.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","directives","name","rawName","value","expression","attrs","domProps","on","$event","target","composing","phone","captcha","class","disabled","code","_v","_s","text","codeVal","again","codeUrl","_e","confirm","staticRenderFns","components","props","data","keyCode","isShowCode","mixins","computed","mounted","getCode","methods","component"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,kBAAkB,CAACF,EAAG,MAAM,CAACE,YAAY,QAAQ,CAACF,EAAG,MAAM,CAACE,YAAY,QAAQ,CAACF,EAAG,QAAQ,CAACG,WAAW,CAAC,CAACC,KAAK,QAAQC,QAAQ,UAAUC,MAAOV,EAAS,MAAEW,WAAW,UAAUC,MAAM,CAAC,KAAO,SAAS,YAAc,UAAUC,SAAS,CAAC,MAASb,EAAS,OAAGc,GAAG,CAAC,MAAQ,SAASC,GAAWA,EAAOC,OAAOC,YAAqBjB,EAAIkB,MAAMH,EAAOC,OAAON,aAAYN,EAAG,MAAM,CAACE,YAAY,qCAAqC,CAACF,EAAG,QAAQ,CAACG,WAAW,CAAC,CAACC,KAAK,QAAQC,QAAQ,UAAUC,MAAOV,EAAW,QAAEW,WAAW,YAAYL,YAAY,WAAWM,MAAM,CAAC,KAAO,OAAO,YAAc,SAASC,SAAS,CAAC,MAASb,EAAW,SAAGc,GAAG,CAAC,MAAQ,SAASC,GAAWA,EAAOC,OAAOC,YAAqBjB,EAAImB,QAAQJ,EAAOC,OAAON,WAAUN,EAAG,SAAS,CAACE,YAAY,sBAAsBc,OAAuB,IAAjBpB,EAAIqB,SAAoB,KAAO,GAA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I,QAdJ,iLAeA,OACA,kCAhBA,kBAkBA,EACA,YACA,OACA,uCACA,kCAEA,SACA,sCACA,uCAEA,wBACA,CACA,sCACA,8CACA,uCAEA,KAEA,wCApCA,mFAsCA,sBAtCA,QAwCA,gBACA,iBACA,qBACA,oBAEA,uBACA,2BACA,mBACA,UACA,MACA,CACA,WACA,SACA,oBACA,gBACA,cACA,kBACA,SAEA,kBACA,0CACA,+CAGA,mBACA,wCACA,iDAKA,CACA,SACA,SACA,oBACA,0CACA,iDAOA,0CACA,+CAIA,mBACA,0BAzFA,iHA4FI,KA5FJ,sKA6FA,OACA,UA9FA,kBAgGA,EACA,YACA,OACA,uCACA,oCAGA,oBAvGA,mFAyGA,sBAzGA,QA4GA,uDACA,kBACA,yBACA,gBAEA,mBACA,sBACA,kEACA,iBAEA,0BAtHA,mHCnEyc,I,YCOrcE,EAAY,eACd,EACA3C,EACAgC,GACA,EACA,KACA,KACA,MAIa,aAAAW,E","file":"h5/js/chunk-2d0c4d6c.8c4e5a08.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"ChangePassword\"},[_c('div',{staticClass:\"list\"},[_c('div',{staticClass:\"item\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.phone),expression:\"phone\"}],attrs:{\"type\":\"number\",\"placeholder\":\"填写手机号码\"},domProps:{\"value\":(_vm.phone)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.phone=$event.target.value}}})]),_c('div',{staticClass:\"item acea-row row-between-wrapper\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.captcha),expression:\"captcha\"}],staticClass:\"codeIput\",attrs:{\"type\":\"text\",\"placeholder\":\"填写验证码\"},domProps:{\"value\":(_vm.captcha)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.captcha=$event.target.value}}}),_c('button',{staticClass:\"code font-color-red\",class:_vm.disabled === true ? 'on' : '',attrs:{\"disabled\":_vm.disabled},on:{\"click\":_vm.code}},[_vm._v(\"\\n \"+_vm._s(_vm.text)+\"\\n \")])]),(_vm.isShowCode)?_c('div',{staticClass:\"item\"},[_c('div',{staticClass:\"align-left\"},[_c('svg',{staticClass:\"icon\",attrs:{\"aria-hidden\":\"true\"}},[_c('use',{attrs:{\"xlink:href\":\"#icon-code_\"}})]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.codeVal),expression:\"codeVal\"}],staticClass:\"codeIput\",attrs:{\"type\":\"text\",\"placeholder\":\"填写验证码\"},domProps:{\"value\":(_vm.codeVal)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.codeVal=$event.target.value}}}),_c('div',{staticClass:\"code\",on:{\"click\":_vm.again}},[_c('img',{attrs:{\"src\":_vm.codeUrl}})])])]):_vm._e()]),_c('div',{staticClass:\"confirmBnt bg-color-red\",on:{\"click\":_vm.confirm}},[_vm._v(\"确认绑定\")])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div class=\"ChangePassword\">\r\n <div class=\"list\">\r\n <div class=\"item\">\r\n <input type=\"number\" placeholder=\"填写手机号码\" v-model=\"phone\" />\r\n </div>\r\n <div class=\"item acea-row row-between-wrapper\">\r\n <input\r\n type=\"text\"\r\n placeholder=\"填写验证码\"\r\n class=\"codeIput\"\r\n v-model=\"captcha\"\r\n />\r\n <button\r\n class=\"code font-color-red\"\r\n :disabled=\"disabled\"\r\n :class=\"disabled === true ? 'on' : ''\"\r\n @click=\"code\"\r\n >\r\n {{ text }}\r\n </button>\r\n </div>\r\n <div class=\"item\" v-if=\"isShowCode\">\r\n <div class=\"align-left\">\r\n <svg class=\"icon\" aria-hidden=\"true\">\r\n <use xlink:href=\"#icon-code_\"></use>\r\n </svg>\r\n <input\r\n type=\"text\"\r\n placeholder=\"填写验证码\"\r\n class=\"codeIput\"\r\n v-model=\"codeVal\"\r\n />\r\n <div class=\"code\" @click=\"again\"><img :src=\"codeUrl\" /></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"confirmBnt bg-color-red\" @click=\"confirm\">确认绑定</div>\r\n </div>\r\n</template>\r\n<script>\r\nimport { mapGetters } from \"vuex\";\r\nimport sendVerifyCode from \"@mixins/SendVerifyCode\";\r\nimport attrs, { required, alpha_num, chs_phone } from \"@utils/validate\";\r\nimport { validatorDefaultCatch } from \"@utils/dialog\";\r\nimport { registerVerify, bindingPhone, getCodeApi } from \"@api/user\";\r\nimport { VUE_APP_API_URL } from \"@utils\";\r\n\r\nexport default {\r\n name: \"BindingPhone\",\r\n components: {},\r\n props: {},\r\n data: function() {\r\n return {\r\n captcha: \"\",\r\n phone: \"\", //手机号\r\n keyCode: \"\",\r\n codeUrl: \"\",\r\n codeVal: \"\",\r\n isShowCode: false\r\n };\r\n },\r\n mixins: [sendVerifyCode],\r\n computed: mapGetters([\"userInfo\"]),\r\n mounted: function() {\r\n this.getCode();\r\n },\r\n methods: {\r\n again() {\r\n this.codeUrl =\r\n VUE_APP_API_URL + \"/captcha?\" + this.keyCode + Date.parse(new Date());\r\n },\r\n getCode() {\r\n getCodeApi()\r\n .then(res => {\r\n this.keyCode = res.data.key;\r\n })\r\n .catch(res => {\r\n this.$dialog.error(res.msg);\r\n });\r\n },\r\n async confirm() {\r\n let that = this;\r\n const { phone, captcha, codeVal } = that;\r\n try {\r\n await that\r\n .$validator({\r\n phone: [\r\n chs_phone(chs_phone.message(\"手机号码\")),\r\n alpha_num(alpha_num.message())\r\n ],\r\n captcha: [\r\n required(required.message(\"验证码\")),\r\n alpha_num(alpha_num.message(\"验证码\"))\r\n ],\r\n codeVal: this.isShowCode\r\n ? [\r\n required(required.message(\"验证码\")),\r\n attrs.length(4, attrs.length.message(\"验证码\")),\r\n alpha_num(alpha_num.message(\"验证码\"))\r\n ]\r\n : []\r\n })\r\n .validate({ phone, captcha, codeVal });\r\n } catch (e) {\r\n return validatorDefaultCatch(e);\r\n }\r\n bindingPhone({\r\n phone: this.phone,\r\n captcha: this.captcha,\r\n code: this.codeVal\r\n })\r\n .then(res => {\r\n if (res.data !== undefined && res.data.is_bind) {\r\n that.$dialog.confirm({\r\n mes: res.msg,\r\n opts: [\r\n {\r\n txt: \"确认绑定\",\r\n color: false,\r\n callback: () => {\r\n bindingPhone({\r\n phone: this.phone,\r\n captcha: this.captcha,\r\n step: 1\r\n })\r\n .then(res => {\r\n that.$dialog.success(res.msg).then(() => {\r\n that.$router.replace({ name: \"PersonalData\" });\r\n });\r\n })\r\n .catch(res => {\r\n that.$dialog.error(res.msg).then(() => {\r\n that.$router.replace({ name: \"PersonalData\" });\r\n });\r\n });\r\n }\r\n },\r\n {\r\n txt: \"取消\",\r\n color: false,\r\n callback: () => {\r\n that.$dialog.error(\"已取消绑定\").then(() => {\r\n that.$router.replace({ name: \"PersonalData\" });\r\n });\r\n }\r\n }\r\n ]\r\n });\r\n } else {\r\n that.$dialog.success(res.msg).then(() => {\r\n that.$router.replace({ name: \"PersonalData\" });\r\n });\r\n }\r\n })\r\n .catch(res => {\r\n that.$dialog.error(res.msg);\r\n });\r\n },\r\n async code() {\r\n let that = this;\r\n const { phone } = that;\r\n try {\r\n await that\r\n .$validator({\r\n phone: [\r\n required(required.message(\"手机号码\")),\r\n chs_phone(chs_phone.message())\r\n ]\r\n })\r\n .validate({ phone });\r\n } catch (e) {\r\n return validatorDefaultCatch(e);\r\n }\r\n\r\n registerVerify({ phone: phone, key: that.keyCode, code: that.codeVal })\r\n .then(res => {\r\n that.$dialog.success(res.msg);\r\n that.sendCode();\r\n })\r\n .catch(res => {\r\n if (res.data.status === 402) {\r\n that.codeUrl = `${VUE_APP_API_URL}/sms_captcha?key=${that.keyCode}`;\r\n that.isShowCode = true;\r\n }\r\n that.$dialog.error(res.msg);\r\n });\r\n }\r\n }\r\n};\r\n</script>\r\n","import mod from \"-!../../../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/_thread-loader@2.1.3@thread-loader/dist/cjs.js!../../../node_modules/_babel-loader@8.0.6@babel-loader/lib/index.js!../../../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/_vue-loader@15.9.0@vue-loader/lib/index.js??vue-loader-options!./BindingPhone.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/_thread-loader@2.1.3@thread-loader/dist/cjs.js!../../../node_modules/_babel-loader@8.0.6@babel-loader/lib/index.js!../../../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/_vue-loader@15.9.0@vue-loader/lib/index.js??vue-loader-options!./BindingPhone.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./BindingPhone.vue?vue&type=template&id=03abf1ba&\"\nimport script from \"./BindingPhone.vue?vue&type=script&lang=js&\"\nexport * from \"./BindingPhone.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/_vue-loader@15.9.0@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":""}