chunk-ee623db8.e806ba13.js.map 16 KB

1
  1. {"version":3,"sources":["webpack:///./src/views/user/Recharge.vue?9961","webpack:///src/views/user/Recharge.vue","webpack:///./src/views/user/Recharge.vue?9293","webpack:///./src/views/user/Recharge.vue","webpack:///./src/views/user/Recharge.vue?7037"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","_l","item","index","key","class","active","on","click","$event","navRecharges","_v","_s","directives","name","rawName","value","expression","attrs","type","placeholder","domProps","input","target","composing","money","userInfo","brokerage_price","now_money","recharge","staticRenderFns","Rechargevue_type_script_lang_js_","components","props","data","navRecharge","payType","from","Object","utils","computed","vuex_esm","mounted","methods","_this","that","price","Number","$dialog","toast","mes","confirm","title","opts","txt","color","callback","user","then","res","bc","parseInt","msg","catch","location","replace","mweb_url","$router","path","wechat","finally","user_Rechargevue_type_script_lang_js_","component","componentNormalizer","__webpack_exports__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Recharge_vue_vue_type_style_index_0_id_789370b6_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","__webpack_require__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Recharge_vue_vue_type_style_index_0_id_789370b6_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","n"],"mappings":"kJAAA,IAAAA,EAAA,WAA0B,IAAAC,EAAAC,KAAaC,EAAAF,EAAAG,eAA0BC,EAAAJ,EAAA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CAAAC,IAAA,iBAEAZ,OAAAmB,EAAA,KAAAnB,CAAA,CAAAQ,QAAAT,KAAAQ,EAAAR,OACAqB,KAAA,SAAAC,GACA,IAAAzB,EAAAyB,EAAAzB,KACA,YAAAA,EAAAf,MACA6C,SAAAC,QAAA/B,OAAAgC,UACAtB,EAAAI,QAAAG,QAAA,CACAD,IAAA,OACAG,KAAA,CACA,CACAC,IAAA,MACAC,OAAA,EACAC,SAAA,WACAX,EAAAsB,QAAAF,QAAA,CACAG,KAAA,oBAIA,CACAd,IAAA,OACAC,OAAA,EACAC,SAAA,WACAX,EAAAsB,QAAAF,QAAA,CACAG,KAAA,wBAOA9B,OAAA+B,EAAA,OAAA/B,CAAAJ,QACAoC,QAAA,WACAzB,EAAAjB,UAAAU,OAAAsB,EAAA,KAAAtB,CACAQ,EACAe,SAAAhB,EAAAnB,SAAAE,YAEAiB,EAAAG,QAAAC,MAAA,CAAAC,IAAA,WAEAa,MAAA,WACAlB,EAAAG,QAAAC,MAAA,CAAAC,IAAA,aAIAa,MAAA,SAAAJ,GACAd,EAAAG,QAAAC,MAAA,CAAAC,IAAAS,EAAAG,YC1JiWS,EAAA,0BCQjWC,EAAgBlC,OAAAmC,EAAA,KAAAnC,CACdiC,EACA9E,EACAqC,GACF,EACA,KACA,WACA,MAIe4C,EAAA,WAAAF,6CCnBf,IAAAG,EAAAC,EAAA,QAAAC,EAAAD,EAAAE,EAAAH,GAAsfE,EAAG","file":"h5/js/chunk-ee623db8.e806ba13.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{staticClass:\"recharge\"},[_c('div',{staticClass:\"nav acea-row row-around row-middle\"},_vm._l((_vm.navRecharge),function(item,index){return _c('div',{key:index,staticClass:\"item\",class:_vm.active === index ? 'on' : '',on:{\"click\":function($event){return _vm.navRecharges(index)}}},[_vm._v(\"\\n \"+_vm._s(item)+\"\\n \")])}),0),_c('div',{staticClass:\"info-wrapper\"},[_c('div',{staticClass:\"money\"},[_c('span',[_vm._v(\"¥\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.money),expression:\"money\"}],attrs:{\"type\":\"number\",\"placeholder\":\"0.00\"},domProps:{\"value\":(_vm.money)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.money=$event.target.value}}})]),(!_vm.active)?_c('div',{staticClass:\"tips\"},[_vm._v(\"\\n 提示:当前余额为\"),_c('span',[_vm._v(\"¥\"+_vm._s(_vm.now_money || 0))])]):_c('div',{staticClass:\"tips\"},[_vm._v(\"\\n 提示:当前佣金为\"),_c('span',[_vm._v(\"¥\"+_vm._s(_vm.userInfo.brokerage_price || 0))])]),_c('div',{staticClass:\"pay-btn bg-color-red\",on:{\"click\":_vm.recharge}},[_vm._v(\"\\n \"+_vm._s(_vm.active ? \"立即转入\" : \"立即充值\")+\"\\n \")])])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div>\r\n <div class=\"recharge\">\r\n <div class=\"nav acea-row row-around row-middle\">\r\n <div\r\n class=\"item\"\r\n :class=\"active === index ? 'on' : ''\"\r\n v-for=\"(item, index) in navRecharge\"\r\n :key=\"index\"\r\n @click=\"navRecharges(index)\"\r\n >\r\n {{ item }}\r\n </div>\r\n </div>\r\n <div class=\"info-wrapper\">\r\n <div class=\"money\">\r\n <span>¥</span>\r\n <input type=\"number\" placeholder=\"0.00\" v-model=\"money\" />\r\n </div>\r\n <div class=\"tips\" v-if=\"!active\">\r\n 提示:当前余额为<span>¥{{ now_money || 0 }}</span>\r\n </div>\r\n <div class=\"tips\" v-else>\r\n 提示:当前佣金为<span>¥{{ userInfo.brokerage_price || 0 }}</span>\r\n </div>\r\n <div class=\"pay-btn bg-color-red\" @click=\"recharge\">\r\n {{ active ? \"立即转入\" : \"立即充值\" }}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n<script>\r\nimport { mapGetters } from \"vuex\";\r\nimport { pay } from \"@libs/wechat\";\r\nimport { isWeixin } from \"@utils\";\r\nimport { rechargeWechat } from \"@api/user\";\r\nimport { add, sub } from \"@utils/bc\";\r\n\r\nexport default {\r\n name: \"Recharge\",\r\n components: {},\r\n props: {},\r\n data: function() {\r\n return {\r\n navRecharge: [\"账户充值\", \"佣金导入\"],\r\n active: 0,\r\n payType: [\"weixin\"],\r\n from: isWeixin() ? \"weixin\" : \"weixinh5\",\r\n money: \"\",\r\n now_money: \"\"\r\n };\r\n },\r\n computed: mapGetters([\"userInfo\"]),\r\n mounted: function() {\r\n this.now_money = this.userInfo.now_money;\r\n },\r\n methods: {\r\n navRecharges: function(index) {\r\n this.active = index;\r\n },\r\n recharge: function() {\r\n let that = this,\r\n price = Number(this.money);\r\n if (that.active) {\r\n if (price === 0) {\r\n return that.$dialog.toast({ mes: \"请输入您要转入的金额\" });\r\n } else if (price < 0.01) {\r\n return that.$dialog.toast({ mes: \"转入金额不能低于0.01\" });\r\n }\r\n this.$dialog.confirm({\r\n mes: \"转入余额无法在转出,请确认转入\",\r\n title: \"转入余额\",\r\n opts: [\r\n {\r\n txt: \"确认\",\r\n color: false,\r\n callback: () => {\r\n rechargeWechat({ price: price, from: that.from, type: 1 })\r\n .then(res => {\r\n that.now_money = add(\r\n price,\r\n parseInt(that.userInfo.now_money)\r\n );\r\n that.userInfo.brokerage_price = sub(\r\n that.userInfo.brokerage_price,\r\n price\r\n );\r\n that.money = \"\";\r\n return that.$dialog.toast({ mes: res.msg });\r\n })\r\n .catch(res => {\r\n that.$dialog.toast({ mes: res.msg });\r\n });\r\n }\r\n },\r\n {\r\n txt: \"取消\",\r\n color: false,\r\n callback: () => {\r\n return that.$dialog.toast({ mes: \"已取消\" });\r\n }\r\n }\r\n ]\r\n });\r\n } else {\r\n if (price === 0) {\r\n return that.$dialog.toast({ mes: \"请输入您要充值的金额\" });\r\n } else if (price < 0.01) {\r\n return that.$dialog.toast({ mes: \"充值金额不能低于0.01\" });\r\n }\r\n rechargeWechat({ price: price, from: that.from })\r\n .then(res => {\r\n var data = res.data;\r\n if (data.type == \"weixinh5\") {\r\n location.replace(data.data.mweb_url);\r\n this.$dialog.confirm({\r\n mes: \"充值余额\",\r\n opts: [\r\n {\r\n txt: \"已充值\",\r\n color: false,\r\n callback: () => {\r\n that.$router.replace({\r\n path: \"/user/account\"\r\n });\r\n }\r\n },\r\n {\r\n txt: \"查看余额\",\r\n color: false,\r\n callback: () => {\r\n that.$router.replace({\r\n path: \"/user/account\"\r\n });\r\n }\r\n }\r\n ]\r\n });\r\n } else {\r\n pay(data.data)\r\n .finally(() => {\r\n that.now_money = add(\r\n price,\r\n parseInt(that.userInfo.now_money)\r\n );\r\n that.$dialog.toast({ mes: \"支付成功\" });\r\n })\r\n .catch(function() {\r\n that.$dialog.toast({ mes: \"支付失败\" });\r\n });\r\n }\r\n })\r\n .catch(res => {\r\n that.$dialog.toast({ mes: res.msg });\r\n });\r\n }\r\n }\r\n }\r\n};\r\n</script>\r\n<style scoped>\r\n#iframe {\r\n display: none;\r\n}\r\n.recharge {\r\n width: 7.03rem;\r\n padding: 0.5rem 0.63rem 0.45rem;\r\n background-color: #fff;\r\n margin: 0.2rem auto 0 auto;\r\n border-radius: 0.1rem;\r\n}\r\n.recharge .nav {\r\n height: 0.75rem;\r\n line-height: 0.75rem;\r\n padding: 0 1rem;\r\n}\r\n.recharge .nav .item {\r\n font-size: 0.3rem;\r\n color: #333;\r\n}\r\n.recharge .nav .item.on {\r\n font-weight: bold;\r\n border-bottom: 0.04rem solid #e83323;\r\n}\r\n.recharge .info-wrapper {\r\n text-align: center;\r\n}\r\n.recharge .info-wrapper .money {\r\n margin-top: 0.6rem;\r\n padding-bottom: 0.2rem;\r\n border-bottom: 1px dashed #ddd;\r\n}\r\n.recharge .info-wrapper .money span {\r\n font-size: 0.56rem;\r\n color: #333;\r\n font-weight: bold;\r\n}\r\n.recharge .info-wrapper .money input {\r\n display: inline-block;\r\n width: 3rem;\r\n font-size: 0.84rem;\r\n text-align: center;\r\n color: #282828;\r\n font-weight: bold;\r\n padding-right: 0.7rem;\r\n}\r\n.recharge .info-wrapper .money input::placeholder {\r\n color: #ddd;\r\n}\r\n.recharge .info-wrapper .money input::-webkit-input-placeholder {\r\n color: #ddd;\r\n}\r\n.recharge .info-wrapper .money input:-moz-placeholder {\r\n color: #ddd;\r\n}\r\n.recharge .info-wrapper .money input::-moz-placeholder {\r\n color: #ddd;\r\n}\r\n.recharge .info-wrapper .money input:-ms-input-placeholder {\r\n color: #ddd;\r\n}\r\n.recharge .info-wrapper .tips {\r\n font-size: 0.26rem;\r\n color: #888;\r\n margin: 0.25rem auto 0 auto;\r\n line-height: 1.5;\r\n padding: 0 0.3rem;\r\n}\r\n.recharge .info-wrapper .tips span {\r\n color: #ef4a49;\r\n}\r\n.recharge .info-wrapper .pay-btn {\r\n display: block;\r\n width: 5.5rem;\r\n height: 0.86rem;\r\n margin: 0.5rem auto 0 auto;\r\n line-height: 0.86rem;\r\n text-align: center;\r\n color: #fff;\r\n border-radius: 0.5rem;\r\n font-size: 0.3rem;\r\n font-weight: bold;\r\n}\r\n</style>\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Recharge.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Recharge.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Recharge.vue?vue&type=template&id=789370b6&scoped=true&\"\nimport script from \"./Recharge.vue?vue&type=script&lang=js&\"\nexport * from \"./Recharge.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Recharge.vue?vue&type=style&index=0&id=789370b6&scoped=true&lang=css&\"\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 \"789370b6\",\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Recharge.vue?vue&type=style&index=0&id=789370b6&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Recharge.vue?vue&type=style&index=0&id=789370b6&scoped=true&lang=css&\""],"sourceRoot":""}