withdrawal.js 4.7 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/user/withdrawal"],{"10d3":function(e,n,a){"use strict";(function(e,n){var t=a("4ea4");a("3e39");t(a("66fd"));var i=t(a("d6bd"));e.__webpack_require_UNI_MP_PLUGIN__=a,n(i.default)}).call(this,a("bc2e")["default"],a("543d")["createPage"])},2535:function(e,n,a){"use strict";a.r(n);var t=a("e694"),i=a.n(t);for(var o in t)["default"].indexOf(o)<0&&function(e){a.d(n,e,(function(){return t[e]}))}(o);n["default"]=i.a},9370:function(e,n,a){},9467:function(e,n,a){"use strict";a.d(n,"b",(function(){return t})),a.d(n,"c",(function(){return i})),a.d(n,"a",(function(){}));var t=function(){var e=this,n=e.$createElement,a=(e._self._c,e._f("getMoneyStyle")(e.money));e._isMounted||(e.e0=function(n){e.withdrawal=e.money}),e.$mp.data=Object.assign({},{$root:{f0:a}})},i=[]},d5b8:function(e,n,a){"use strict";var t=a("9370"),i=a.n(t);i.a},d6bd:function(e,n,a){"use strict";a.r(n);var t=a("9467"),i=a("2535");for(var o in i)["default"].indexOf(o)<0&&function(e){a.d(n,e,(function(){return i[e]}))}(o);a("d5b8");var r=a("f0c5"),c=Object(r["a"])(i["default"],t["b"],t["c"],!1,null,null,null,!1,t["a"],void 0);n["default"]=c.exports},e694:function(e,n,a){"use strict";(function(e){var t=a("4ea4");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=t(a("2eee")),o=t(a("c973")),r=t(a("9523")),c=a("97a2"),u=a("79e0"),l=a("5635"),p=a("26cb");function f(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),a.push.apply(a,t)}return a}function d(e){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?f(Object(a),!0).forEach((function(n){(0,r.default)(e,n,a[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):f(Object(a)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(a,n))}))}return e}var s={filters:{getMoneyStyle:c.getMoneyStyle},components:{uniNoticeBar:function(){a.e("components/uni-notice-bar/uni-notice-bar").then(function(){return resolve(a("70e1"))}.bind(null,a)).catch(a.oe)}},computed:d({},(0,p.mapState)("user",["userInfo","orderInfo","hasLogin"])),data:function(){return{ali_people:"",loading:!1,phone:"",weixin_no:"",type:"bank",money:"0.00",freeze:"0.0",withdrawal:"",minPrice:"",aliData:{},bankData:{},weixin:{},alipay_code:"",alipay_name:"",bank_code:"",bank_people:"",bank_name:"",bank_belonging:"",jftype:0,isSh:1}},onLoad:function(e){this.loadData()},methods:d(d({},(0,p.mapMutations)("user",["setUserInfo","setOrderInfo"])),{},{getBank:function(){var e=this;(0,u.getBank)().then((function(n){n.data.zfb.name&&(e.ali_people=n.data.zfb.name,e.alipay_code=n.data.zfb.payment),n.data.bank.name&&(e.bank_people=n.data.bank.name,e.bank_code=n.data.bank.payment,e.phone=n.data.bank.phone,e.bank_name=n.data.bank.bank)}))},loadData:function(){var e=this;return(0,o.default)(i.default.mark((function n(){return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:(0,u.extractBank)({}).then((function(n){var a=n.data;console.log(a,"data+++++++++"),e.minPrice=a.minPrice,e.money=a.brokerage_price})),(0,l.version)({}).then((function(n){var a=n.data;e.isSh=a.status,console.log(a,"123456")}));case 2:case"end":return n.stop()}}),n)})))()},navTo:function(n){e.navigateTo({url:n})},tabRadio:function(e){this.type=e.detail.value},confirm:function(){var n=this;if(!n.loading){var a={extract_type:this.type,money:this.withdrawal,type:0};if(this.withdrawal<this.minPrice)e.showToast({title:"提现金额不可少于"+this.minPrice,duration:2e3,mask:!1,icon:"none"});else{if("alipay"==n.type){if(""==n.ali_people)return n.$api.msg("请输入姓名");if(""==n.alipay_code)return n.$api.msg("请输入支付宝账号");a.name=n.ali_people,a.alipay_code=n.alipay_code}if("bank"==n.type){if(""==n.bank_people)return n.$api.msg("请输入姓名");if(""==n.phone)return n.$api.msg("请输入手机号码");if(""==n.bank_name)return n.$api.msg("请输入所属银行");if(""==n.bank_code)return n.$api.msg("请输入银行卡号");a.name=n.bank_people,a.phone=n.phone,a.bankname=n.bank_name,a.cardnum=n.bank_code}"weixin"==this.type&&(console.log("weixin"),a.weixin="123456"),n.loading=!0,(0,u.extractCash)(a).then((function(a){n.loadData(),n.withdrawal="",n.loading=!1,e.showToast({title:"提交成功",duration:2e3,position:"top"}),(0,u.setBank)({type:"alipay"==n.type?2:3,name:"alipay"==n.type?n.ali_people:n.bank_people,phone:n.phone,payment:"alipay"==n.type?n.alipay_code:n.bank_code,bank:n.bank_name}).then((function(e){}))})).catch((function(e){n.loading=!1}))}}}})};n.default=s}).call(this,a("543d")["default"])}},[["10d3","common/runtime","common/vendor"]]]);