zx/public/static/js/pages-users-user_payment-in...

1 line
14 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-users-user_payment-index"],{"11bc":function(t,e,i){var a=i("a62f");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=i("967d").default;n("8c1e1598",a,!0,{sourceMap:!1,shadowMode:!1})},"1a59":function(t,e,i){"use strict";var a=i("11bc"),n=i.n(a);n.a},"3a60":function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.arrivalSubscribe=function(){var t=n();return o([t.PRODUCT_INCREASE])},e.auth=n,e.openEextractSubscribe=function(){var t=n();return o([t.EXTRACT_NOTICE])},e.openExtrctSubscribe=function(){var t=n();return o([t.EXTRACT_NOTICE])},e.openOrderRefundSubscribe=function(){var t=n();return o([t.REFUND_CONFORM_CODE])},e.openOrderSubscribe=function(){var t=n();return o([t.ORDER_DELIVER_SUCCESS,t.DELIVER_GOODS_CODE])},e.openPaySubscribe=function(){var t=n();return o([t.DELIVER_GOODS_CODE,t.ORDER_DELIVER_SUCCESS,t.ORDER_PAY_SUCCESS])},e.openRechargeSubscribe=function(){var t=n();return o([t.USER_BALANCE_CHANGE])},e.subscribe=o,i("bf0f");var a=i("d838");function n(){var t,e=uni.getStorageSync(a.SUBSCRIBE_MESSAGE);return t=e||{},t}function o(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){}})}))}},"3e5e":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:"digit",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)}}})],1)},n=[]},7494:function(t,e,i){"use strict";i.r(e);var a=i("baff"),n=i.n(a);for(var o in a)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(o);e["default"]=n.a},a62f:function(t,e,i){var a=i("c86c");e=a(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */uni-page-body[data-v-0b2a5cf9]{width:100%;height:100%;background-color:#fff}body.?%PAGE?%[data-v-0b2a5cf9]{background-color:#fff}.payment[data-v-0b2a5cf9]{position:relative;top:%?-60?%;width:100%;padding-bottom:%?50?%;background-color:#fff;border-radius:%?10?%;padding-top:%?25?%;border-top-right-radius:%?40?%;border-top-left-radius:%?40?%}.payment .nav[data-v-0b2a5cf9]{height:%?75?%;line-height:%?75?%;padding:0 %?100?%}.payment .nav .item[data-v-0b2a5cf9]{font-size:%?30?%;color:#333}.payment .nav .item.on[data-v-0b2a5cf9]{font-weight:700;border-bottom:%?4?% solid var(--view-theme)}.t-color[data-v-0b2a5cf9]{color:var(--view-theme)}.payment .input[data-v-0b2a5cf9]{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-0b2a5cf9]{padding-left:%?106?%}.payment .input uni-input[data-v-0b2a5cf9]{padding-right:%?106?%;width:%?300?%;height:%?94?%;text-align:center;font-size:%?70?%}.payment .placeholder[data-v-0b2a5cf9]{color:#d0d0d0;height:100%;line-height:%?94?%}.payment .tip[data-v-0b2a5cf9]{font-size:%?26?%;color:#888;padding:0 %?30?%;margin-top:%?25?%}.payment .but[data-v-0b2a5cf9]{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)}.container[data-v-0b2a5cf9]{position:relative;background-color:var(--view-theme);border-radius:0 0 %?40?% %?40?%}.container .fixed-head[data-v-0b2a5cf9]{position:absolute;left:0;top:20px;width:100%;z-index:10}.container .fixed-head .icon-xiangzuo[data-v-0b2a5cf9]{margin-right:%?40?%;margin-left:%?20?%;font-size:%?40?%;color:#fff}.payment-top[data-v-0b2a5cf9]{width:100%;height:%?350?%;position:relative;background-color:var(--view-theme)}.payment-top .name[data-v-0b2a5cf9]{font-size:%?26?%;color:hsla(0,0%,100%,.8);margin-top:%?-38?%;margin-bottom:%?30?%}.payment-top .pic[data-v-0b2a5cf9]{font-size:%?32?%;color:#fff}.payment-top .pic-font[data-v-0b2a5cf9]{font-size:%?78?%;color:#fff}.picList[data-v-0b2a5cf9]{display:flex;flex-wrap:wrap;margin:%?30?% 0}.picList .pic-box[data-v-0b2a5cf9]{width:32%;height:auto;border-radius:%?20?%;margin-top:%?21?%;padding:%?20?% 0;margin-right:%?12?%}.picList .pic-box[data-v-0b2a5cf9]:nth-child(3n){margin-right:0}.picList .pic-box-color[data-v-0b2a5cf9]{background-color:#f4f4f4;color:#656565}.picList .pic-number[data-v-0b2a5cf9]{font-size:%?22?%}.picList .pic-number-pic[data-v-0b2a5cf9]{font-size:%?38?%;margin-right:%?10?%;text-align:center}.picList .pic-box-color-active[data-v-0b2a5cf9]{background-color:var(--view-theme);color:#fff}.tips-box .tips[data-v-0b2a5cf9]{font-size:%?28?%;color:#333;font-weight:800;margin-bottom:%?14?%;margin-top:%?20?%}.tips-box .tips-samll[data-v-0b2a5cf9]{font-size:%?24?%;color:#333;margin-bottom:%?14?%}.tips-title[data-v-0b2a5cf9]{margin-top:%?20?%;font-size:%?24?%;color:#333}',""]),t.exports=e},baff:function(t,e,i){"use strict";i("6a54");var a=i("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("c9b5"),i("bf0f"),i("ab80"),i("e838"),i("64aa"),i("c223");var n=i("672a"),o=i("8f59"),r=a(i("82d1")),c=(i("3a60"),uni.getSystemInfoSync().statusBarHeight+"px"),s={components:{payment:r.default},data:function(){return{otherValue:"其他",now_money:0,navRecharge:["账户充值","佣金转入"],active:0,number:"",from:"",userinfo:{},placeholder:"0.00",picList:[],activePic:0,money:"",numberPic:"",rechar_id:"0",rechargeAttention:[],delta:1,statusBarHeight:c,pay_close:!1,totalPrice:"0",payMode:[{name:"微信支付",icon:"icon-weixinzhifu",value:this.$wechat.isWeixin()?"weixin":"h5",title:"微信快捷支付",payStatus:!0},{name:"支付宝支付",icon:"icon-zhifubao",value:"alipay",title:"支付宝支付",payStatus:!0}]}},computed:(0,o.mapGetters)(["viewColor","isLogin"]),onLoad:function(t){this.delta=t.delta||1,this.isLogin?(this.getUserInfo(),this.getRecharge()):toLogin()},onUnload:function(){uni.navigateBack({delta:this.delta})},methods:{goBack:function(){uni.navigateBack()},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})}))},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){e.$util.Tips({title:"转入成功",icon:"success"}),uni.navigateTo({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,o="/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:o});case"success":return uni.hideLoading(),e.seckillId?e.$util.Tips({title:t.message,icon:"success"},{tab:4,url:o}):e.$util.Tips({title:t.message,icon:"success"},{tab:5,url:o});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:o})})).catch((function(t){if("chooseWXPay:cancel"==t.errMsg)return e.$util.Tips({title:"取消支付"},{tab:5,url:o})}));break;case"balance":return uni.hideLoading(),e.$util.Tips({title:t.message},{tab:5,url:o});case"h5":var r=window.location.protocol+"//"+window.location.host,c="".concat(r,"/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},e331:function(t,e,i){"use strict";i.r(e);var a=i("3e5e"),n=i("7494");for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);i("1a59");var r=i("828b"),c=Object(r["a"])(n["default"],a["b"],a["c"],!1,null,"0b2a5cf9",null,!1,a["a"],void 0);e["default"]=c.exports}}]);