(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-users-user_payment-index"],{"031a":function(t,e,i){"use strict";i.r(e);var a=i("7a80"),n=i.n(a);for(var r in a)["default"].indexOf(r)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(r);e["default"]=n.a},"107c6":function(t,e,i){"use strict";i("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.arrivalSubscribe=function(){var t=n();return r([t.PRODUCT_INCREASE])},e.auth=n,e.openEextractSubscribe=function(){var t=n();return r([t.EXTRACT_NOTICE])},e.openExtrctSubscribe=function(){var t=n();return r([t.EXTRACT_NOTICE])},e.openOrderRefundSubscribe=function(){var t=n();return r([t.REFUND_CONFORM_CODE])},e.openOrderSubscribe=function(){var t=n();return r([t.ORDER_DELIVER_SUCCESS,t.DELIVER_GOODS_CODE])},e.openPaySubscribe=function(){var t=n();return r([t.DELIVER_GOODS_CODE,t.ORDER_DELIVER_SUCCESS,t.ORDER_PAY_SUCCESS])},e.openRechargeSubscribe=function(){var t=n();return r([t.USER_BALANCE_CHANGE])},e.subscribe=r,i("d3b7");var a=i("8a31");function n(){var t,e=uni.getStorageSync(a.SUBSCRIBE_MESSAGE);return t=e||{},t}function r(t){wx;return new Promise((function(e,i){uni.requestSubscribeMessage({tmplIds:t,success:function(t){return e(t)},fail:function(t){return e(t)},complete:function(t){}})}))}},"4b2f":function(t,e,i){"use strict";var a=i("e935"),n=i.n(a);n.a},"7a80":function(t,e,i){"use strict";i("7a82");var a=i("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("d401"),i("d3b7"),i("25f0"),i("acd8"),i("a9e3"),i("99af");var n=i("33b4"),r=i("26cb"),o=a(i("104c")),c=a(i("7c0a")),s=(i("107c6"),{components:{authorize:o.default,payment:c.default},data:function(){return{otherValue:"其他",now_money:0,navRecharge:["账户充值","佣金转入"],active:0,number:"",from:"",userinfo:{},placeholder:"0.00",isAuto:!1,isShowAuth:!1,picList:[],activePic:0,money:"",numberPic:"",rechar_id:"0",rechargeAttention:[],pay_close:!1,totalPrice:"0",payMode:[{name:"微信支付",icon:"icon-weixinzhifu",value:this.$wechat.isWeixin()?"weixin":"h5",title:"微信快捷支付",payStatus:!0}]}},computed:(0,r.mapGetters)(["isLogin","viewColor"]),onLoad:function(t){this.isLogin?(this.getUserInfo(),this.getRecharge()):(this.isAuto=!0,this.isShowAuth=!0)},methods:{picCharge:function(t,e){this.activePic=t,void 0===e?(this.rechar_id="0",this.numberPic="",this.otherValue=""):(this.otherValue="其他",this.money="",this.rechar_id=e.id.toString(),this.numberPic=e.data.price)},getRecharge:function(){var t=this;(0,n.getRechargeApi)().then((function(e){t.picList=e.data.recharge_quota,t.picList[0]&&(t.rechar_id=t.picList[0].id.toString(),t.numberPic=t.picList[0].data.price),t.rechargeAttention=e.data.recharge_attention||[]})).catch((function(e){t.$dialog.toast({mes:e})}))},onLoadFun:function(){this.isShowAuth=!1,this.getUserInfo(),this.getRecharge()},authColse:function(t){this.isShowAuth=t},navRecharges:function(t){this.active=t},getUserInfo:function(){var t=this;(0,n.spreadInfo)().then((function(e){t.$set(t,"userinfo",e.data)}))},payClose:function(){this.pay_close=!1},payCheck:function(t){this.createOrder(t)},submitSub:function(t){var e=this,i=t.detail.value.number;if(e.active){if(parseFloat(i)<0||NaN==parseFloat(i)||void 0==i||""==i)return e.$util.Tips({title:"请输入金额"});if(parseFloat(i)>e.userinfo.brokerage_price)return e.$util.Tips({title:"剩余可用佣金不足"+parseFloat(i)});uni.showModal({title:"转入余额",content:"转入余额后无法再次转出,确认是否转入余额",success:function(t){if(t.confirm)(0,n.rechargeBrokerage)({brokerage:parseFloat(i)}).then((function(t){return e.$util.Tips({title:"转入成功",icon:"success"},{tab:5,url:"/pages/users/user_money/index"})})).catch((function(t){return e.$util.Tips({title:t})}));else if(t.cancel)return e.$util.Tips({title:"已取消"})}})}else{if(0==this.rechar_id){if(0===parseFloat(e.money))return e.$util.Tips({title:"充值金额金额不能为0!"});if(!e.money)return e.$util.Tips({title:"请填写充值金额!"});if(!Number(e.money))return e.$util.Tips({title:"请填写正确的金额!"})}this.pay_close=!0}},createOrder:function(t){var e=this,i={price:0==e.rechar_id?e.money:e.numberPic,recharge_id:e.rechar_id,type:t,return_url:location.port?location.protocol+"//"+location.hostname+":"+location.port+"/pages/users/user_payment/index":location.protocol+"//"+location.hostname+"/pages/users/user_payment/index"};(0,n.rechargeWechat)(i).then((function(t){e.callPay(t)})).catch((function(t){uni.showToast({title:t,icon:"none"})}))},callPay:function(t){var e=this,i=t.data.type,a=(t.data.recharge_id,t.data.pay_key),n=t.data.config,r="/pages/users/user_payment/index";switch(i){case"ORDER_EXIST":case"EXTEND_ORDER":case"PAY_ERROR":case"error":return uni.hideLoading(),e.$util.Tips({title:t.message},{tab:5,url:r});case"success":return uni.hideLoading(),e.seckillId?e.$util.Tips({title:t.message,icon:"success"},{tab:4,url:r}):e.$util.Tips({title:t.message,icon:"success"},{tab:5,url:r});case"alipay":case"alipayQr":return uni.hideLoading(),e.$emit("onChangeFun",{action:"payClose"}),void uni.navigateTo({url:"/pages/order_pay_back/index?keyCode="+a+"&url="+n+"&type=10"});case"wechat":case"weixin":case"weixinApp":n.timeStamp=n.timestamp,e.$wechat.pay(n).then((function(t){return e.$util.Tips({title:t.message,icon:"success"},{tab:4,url:r})})).catch((function(t){if("chooseWXPay:cancel"==t.errMsg)return e.$util.Tips({title:"取消支付"},{tab:5,url:r})}));break;case"balance":return uni.hideLoading(),e.$util.Tips({title:t.msg},{tab:5,url:r});case"h5":var o=window.location.protocol+"//"+window.location.host,c="".concat(o,"/pages/users/user_payment/index"),s=encodeURIComponent(c),u=n.mweb_url||n.h5_url,l="".concat(u,"&redirect_url=").concat(s);setTimeout((function(){location.href=l}),100);break}},onChangeFun:function(t){var e=t,i=e.action||null,a=void 0!=e.value?e.value:null;i&&this[i]&&this[i](a)}}});e.default=s},"7da6":function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */uni-page-body[data-v-10245847]{width:100%;height:100%;background-color:#fff}body.?%PAGE?%[data-v-10245847]{background-color:#fff}.payment[data-v-10245847]{position:relative;top:%?-60?%;width:100%;background-color:#fff;border-radius:%?10?%;padding-top:%?25?%;border-top-right-radius:%?39?%;border-top-left-radius:%?39?%}.payment .nav[data-v-10245847]{height:%?75?%;line-height:%?75?%;padding:0 %?100?%}.payment .nav .item[data-v-10245847]{font-size:%?30?%;color:#333}.payment .nav .item.on[data-v-10245847]{font-weight:700;border-bottom:%?4?% solid var(--view-theme)}.t-color[data-v-10245847]{color:var(--view-theme)}.payment .input[data-v-10245847]{display:flex;align-items:center;justify-content:center;border-bottom:1px dashed #ddd;margin:%?60?% auto 0 auto;padding-bottom:%?20?%;font-size:%?56?%;color:#333;flex-wrap:nowrap}.payment .input uni-text[data-v-10245847]{padding-left:%?106?%}.payment .input uni-input[data-v-10245847]{padding-right:%?106?%;width:%?300?%;height:%?94?%;text-align:center;font-size:%?70?%}.payment .placeholder[data-v-10245847]{color:#d0d0d0;height:100%;line-height:%?94?%}.payment .tip[data-v-10245847]{font-size:%?26?%;color:#888;padding:0 %?30?%;margin-top:%?25?%}.payment .but[data-v-10245847]{color:#fff;font-size:%?30?%;width:%?700?%;height:%?86?%;border-radius:%?50?%;margin:%?46?% auto 0 auto;line-height:%?86?%;background-color:var(--view-theme)}.payment-top[data-v-10245847]{width:100%;height:%?350?%;background-color:var(--view-theme)}.payment-top .name[data-v-10245847]{font-size:%?26?%;color:hsla(0,0%,100%,.8);margin-top:%?-38?%;margin-bottom:%?30?%}.payment-top .pic[data-v-10245847]{font-size:%?32?%;color:#fff}.payment-top .pic-font[data-v-10245847]{font-size:%?78?%;color:#fff}.picList[data-v-10245847]{display:flex;flex-wrap:wrap;margin:%?30?% 0}.picList .pic-box[data-v-10245847]{width:32%;height:auto;border-radius:%?20?%;margin-top:%?21?%;padding:%?20?% 0;margin-right:%?12?%}.picList .pic-box[data-v-10245847]:nth-child(3n){margin-right:0}.picList .pic-box-color[data-v-10245847]{background-color:#f4f4f4;color:#656565}.picList .pic-number[data-v-10245847]{font-size:%?22?%}.picList .pic-number-pic[data-v-10245847]{font-size:%?38?%;margin-right:%?10?%;text-align:center}.picList .pic-box-color-active[data-v-10245847]{background-color:var(--view-theme);color:#fff}.tips-box .tips[data-v-10245847]{font-size:%?28?%;color:#333;font-weight:800;margin-bottom:%?14?%;margin-top:%?20?%}.tips-box .tips-samll[data-v-10245847]{font-size:%?24?%;color:#333;margin-bottom:%?14?%}.tips-box .tip-box[data-v-10245847]{margin-top:%?30?%}.tips-title[data-v-10245847]{margin-top:%?20?%;font-size:%?24?%;color:#333}',""]),t.exports=e},"8d00":function(t,e,i){"use strict";i.r(e);var a=i("ee2f"),n=i("031a");for(var r in n)["default"].indexOf(r)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(r);i("4b2f");var o=i("f0c5"),c=Object(o["a"])(n["default"],a["b"],a["c"],!1,null,"10245847",null,!1,a["a"],void 0);e["default"]=c.exports},e935:function(t,e,i){var a=i("7da6");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=i("4f06").default;n("3e420ea2",a,!0,{sourceMap:!1,shadowMode:!1})},ee2f:function(t,e,i){"use strict";i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return n})),i.d(e,"a",(function(){}));var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{style:t.viewColor},[i("v-uni-form",{attrs:{"report-submit":"true"},on:{submit:function(e){arguments[0]=e=t.$handleEvent(e),t.submitSub.apply(void 0,arguments)}}},[i("v-uni-view",{staticClass:"payment-top acea-row row-column row-center-wrapper"},[i("span",{staticClass:"name"},[t._v("我的余额")]),i("v-uni-view",{staticClass:"pic"},[t._v("¥"),i("span",{staticClass:"pic-font"},[t._v(t._s(t.userinfo.now_money||0))])])],1),i("v-uni-view",{staticClass:"payment"},[i("v-uni-view",{staticClass:"nav acea-row row-around row-middle"},t._l(t.navRecharge,(function(e,a){return i("v-uni-view",{key:a,staticClass:"item",class:t.active==a?"on":"",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.navRecharges(a)}}},[t._v(t._s(e))])})),1),t.active?i("v-uni-view",{staticClass:"tip"},[i("v-uni-view",{staticClass:"input"},[i("v-uni-text",[t._v("¥")]),i("v-uni-input",{attrs:{placeholder:"0.00",type:"number","placeholder-class":"placeholder",value:t.number,name:"number"}})],1),i("v-uni-view",{staticClass:"tips-title"},[i("v-uni-view",{staticStyle:{"font-weight":"bold","font-size":"26rpx"}},[t._v("提示:")]),i("v-uni-view",{staticStyle:{"margin-top":"10rpx"}},[t._v("当前佣金为"),i("v-uni-text",{staticClass:"t-color"},[t._v("¥"+t._s(t.userinfo.brokerage_price||0))])],1)],1),i("v-uni-view",{staticClass:"tips-box"},[i("v-uni-view",{staticClass:"tips mt-30"},[t._v("注意事项:")]),t._l(t.rechargeAttention,(function(e){return i("v-uni-view",{key:e,staticClass:"tips-samll"},[t._v(t._s(e))])}))],2)],1):i("v-uni-view",{staticClass:"tip picList"},[t._l(t.picList,(function(e,a){return i("v-uni-view",{key:a,staticClass:"pic-box pic-box-color acea-row row-center-wrapper row-column",class:t.activePic==a?"pic-box-color-active":"",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.picCharge(a,e)}}},[i("v-uni-view",{staticClass:"pic-number-pic"},[t._v(t._s(e.data.price)),i("span",{staticClass:"pic-number"},[t._v("元")])]),i("v-uni-view",{staticClass:"pic-number"},[t._v("赠送:"+t._s(e.data.give)+" 元")])],1)})),i("v-uni-view",{staticClass:"pic-box pic-box-color acea-row row-center-wrapper",class:0==t.rechar_id?"pic-box-color-active":"",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.picCharge(t.picList.length)}}},[i("v-uni-input",{staticClass:"pic-box-money pic-number-pic",class:0==t.rechar_id?"pic-box-color-active":"",attrs:{type:"number",placeholder:t.otherValue},model:{value:t.money,callback:function(e){t.money=e},expression:"money"}})],1),i("v-uni-view",{staticClass:"tips-box"},[i("v-uni-view",{staticClass:"tips mt-30"},[t._v("注意事项:")]),t._l(t.rechargeAttention,(function(e){return i("v-uni-view",{key:e,staticClass:"tips-samll"},[t._v(t._s(e))])}))],2)],2),i("v-uni-button",{staticClass:"but",attrs:{formType:"submit"}},[t._v(t._s(t.active?"立即转入":"立即充值"))])],1)],1),i("payment",{attrs:{payMode:t.payMode,order_id:t.rechar_id,pay_close:t.pay_close,"is-call":!0,totalPrice:t.totalPrice},on:{onChangeFun:function(e){arguments[0]=e=t.$handleEvent(e),t.onChangeFun.apply(void 0,arguments)}}}),i("authorize",{attrs:{isAuto:t.isAuto,isShowAuth:t.isShowAuth},on:{onLoadFun:function(e){arguments[0]=e=t.$handleEvent(e),t.onLoadFun.apply(void 0,arguments)},authColse:function(e){arguments[0]=e=t.$handleEvent(e),t.authColse.apply(void 0,arguments)}}})],1)},n=[]}}]);