You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
6.2 KiB
1 lines
6.2 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["user/pages/cash-out"],{"04d3":function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){}));var a=function(){var t=this,e=t.$createElement;t._self._c;t._isMounted||(t.e0=function(e){return e.stopPropagation(),t.$util.goUrl({url:"/user/pages/alipay-account"})})},r=[]},1148:function(t,e,n){"use strict";n.r(e);var a=n("57b1"),r=n.n(a);for(var i in a)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(i);e["default"]=r.a},"57b1":function(t,e,n){"use strict";var a=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=a(n("7eb4")),i=a(n("7ca3")),c=a(n("ee10")),o=n("8f59");function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){(0,i.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var l={components:{},data:function(){return{options:{},isLoad:!1,payList:[],payInd:0,detail:{},balance:"",cash:"",apply_price:"",text:"",type:1,lockTap:!1}},computed:(0,o.mapState)({primaryColor:function(t){return t.config.configInfo.primaryColor},subColor:function(t){return t.config.configInfo.subColor},configInfo:function(t){return t.config.configInfo},userInfo:function(t){return t.user.userInfo},coachInfo:function(t){return t.user.coachInfo}}),onLoad:function(t){var e=this;return(0,c.default)(r.default.mark((function n(){return r.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.$util.showLoading(),e.options=t,n.next=4,e.initIndex();case 4:case"end":return n.stop()}}),n)})))()},methods:s(s({},(0,o.mapActions)(["getConfigInfo","getUserInfo","getCoachInfo"])),{},{initIndex:function(){var t=arguments,e=this;return(0,c.default)(r.default.mark((function n(){var a,i,c,o,u,s,l,f,p,d,h,b,g,v,y,m,_,k,x;return r.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return t.length>0&&void 0!==t[0]&&t[0],n.next=3,Promise.all([e.getConfigInfo(),e.getUserInfo()]);case 3:a=e.configInfo,i=a.wechat_transfer,a.alipay_transfer,c=a.under_transfer,o=[],1==i&&o.push({id:1,title:"微信零钱包"}),1==c&&o.push({id:0,title:"线下转账"}),e.payList=o,u=e.options.type,n.t0=u,n.next="technician"===n.t0?12:"carfee"===n.t0?21:"distribution"===n.t0?27:"channel"===n.t0||"agent"===n.t0||"salesman"===n.t0?34:41;break;case 12:return n.next=14,e.$util.getPage(-1);case 14:return s=n.sent,l=s.detail,f=l.cap_cash,p=void 0===f?0:f,d=l.coach_level.balance,h=void 0===d?0:d,e.balance=100-h,e.cash=p,n.abrupt("break",41);case 21:if(b=e.coachInfo.id,g=void 0===b?0:b,g){n.next=25;break}return n.next=25,e.getCoachInfo();case 25:return e.cash=e.coachInfo.car_price,n.abrupt("break",41);case 27:return n.next=29,e.$util.getPage(-1).detail;case 29:return v=n.sent,y=v.new_cash,m=void 0===y?0:y,e.cash=m,n.abrupt("break",41);case 34:return n.next=36,e.$util.getPage(-1).detail;case 36:return _=n.sent,k=_.cash,x=void 0===k?0:k,e.cash=x,n.abrupt("break",41);case 41:e.$util.setNavigationBarColor({bg:e.primaryColor}),e.$util.hideAll(),e.isLoad=!0;case 44:case"end":return n.stop()}}),n)})))()},initRefresh:function(){this.initIndex(!0)},toChangeItem:function(t){this.payInd=t,this.lockTap=!1},withAll:function(){this.apply_price=this.cash},checkInput:function(t,e){var n=this,a=this.$util.formatMoney(t.detail.value);this.$nextTick((function(){n[e]=a}))},submit:function(){var t=this;return(0,c.default)(r.default.mark((function e(){var n,a,i,c,o,u,s,l,f,p,d,h,b,g,v,y;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("0.0"==t.apply_price&&t.$nextTick((function(){t.apply_price="0"})),n=t.cash,a=t.apply_price,i=t.text,c=t.payList,o=t.payInd,u=t.userInfo,s=u.alipay_number,l=void 0===s?"":s,f=u.alipay_name,p=void 0===f?"":f,d=c[o].id,2!=d||l&&p){e.next=7;break}return t.$util.showToast({title:l?"请先绑定支付宝账户姓名":"请先绑定支付宝账户"}),e.abrupt("return");case 7:if(h=t.configInfo.cash_mini,i=i?i.replace(/(^\s*)|(\s*$)/g,""):"",(0!=d||i)&&a){e.next=12;break}return t.$util.showToast({title:0!=d||i?"请输入提现金额":"请输入到账信息"}),e.abrupt("return");case 12:if(!(parseFloat(a)<parseFloat(h))){e.next=15;break}return t.$util.showToast({title:"提现金额不能低于最低提现金额".concat(h)}),e.abrupt("return");case 15:if(!(parseFloat(a)>parseFloat(n))){e.next=18;break}return t.$util.showToast({title:"提现金额不能大于可提现金额".concat(n)}),e.abrupt("return");case 18:if(!t.lockTap){e.next=20;break}return e.abrupt("return");case 20:return t.lockTap=!0,t.$util.showLoading(),e.prev=22,b=t.options.type,g={technician:"technician",carfee:"technician",distribution:"mine",channel:"channel",agent:"agent",salesman:"salesman"},v=g[b],y={apply_price:a,text:i,apply_transfer:d},"technician"!=b&&"carfee"!==b||(y.type="technician"==b?1:2),e.next=30,t.$api[v].applyWallet(y);case 30:t.$util.hideAll(),t.$util.showToast({title:"提交成功"}),setTimeout((function(){t.$util.back(),t.$util.goUrl({url:1,openType:"navigateBack"})}),1e3),e.next=38;break;case 35:e.prev=35,e.t0=e["catch"](22),setTimeout((function(){t.lockTap=!1,t.$util.hideAll()}),2e3);case 38:case"end":return e.stop()}}),e,null,[[22,35]])})))()}})};e.default=l},9224:function(t,e,n){"use strict";var a=n("9dfd"),r=n.n(a);r.a},9840:function(t,e,n){"use strict";(function(t,e){var a=n("47a9");n("7043");a(n("3240"));var r=a(n("ae35"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(r.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"9dfd":function(t,e,n){},ae35:function(t,e,n){"use strict";n.r(e);var a=n("04d3"),r=n("1148");for(var i in r)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(i);n("9224");var c=n("828b"),o=Object(c["a"])(r["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],void 0);e["default"]=o.exports}},[["9840","common/runtime","common/vendor"]]]); |