| 1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([[59,20,25],{498:function(e,t,r){var content=r(502);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,r(21).default)("1df0c15c",content,!0,{sourceMap:!1})},499:function(e,t,r){"use strict";r(22),r(65);t.a={head:function(){var e=this.$store.getters.headerMeta;return{title:e.title,link:[{rel:"icon",type:"image/x-icon",href:e.ico}],meta:[{hid:"description",name:"description",content:e.description},{hid:"keywords",name:"keywords",content:e.keywords}]}}}},500:function(e,t,r){"use strict";r.r(t);r(309);var n={data:function(){return{priceSlice:{}}},components:{},props:{firstSize:{type:Number,default:14},secondSize:{type:Number,default:14},color:{type:String},weight:{type:[String,Number],default:400},price:{type:[String,Number],default:""},showSubscript:{type:Boolean,default:!0},subscriptSize:{type:Number,default:14},lineThrough:{type:Boolean,default:!1}},created:function(){this.priceFormat()},watch:{price:function(e){this.priceFormat()}},methods:{priceFormat:function(){var e=this.price,t={};null!==e&&(e=parseFloat(e),e=String(e).split("."),t.first=e[0],t.second=e[1],this.priceSlice=t)}}},c=(r(501),r(9)),component=Object(c.a)(n,(function(){var e=this,t=e._self._c;return t("span",{class:(e.lineThrough?"line-through":"")+"price-format",style:{color:e.color,"font-weight":e.weight}},[e.showSubscript?t("span",{style:{"font-size":e.subscriptSize+"px","margin-right":"1px"}},[e._v("¥")]):e._e(),e._v(" "),t("span",{style:{"font-size":e.firstSize+"px","margin-right":"1px"}},[e._v(e._s(e.priceSlice.first))]),e._v(" "),e.priceSlice.second?t("span",{style:{"font-size":e.secondSize+"px"}},[e._v("."+e._s(e.priceSlice.second))]):e._e()])}),[],!1,null,null,null);t.default=component.exports},501:function(e,t,r){"use strict";r(498)},502:function(e,t,r){var n=r(20)((function(i){return i[1]}));n.push([e.i,".price-format{align-items:baseline;display:flex}",""]),n.locals={},e.exports=n},513:function(e,t,r){"use strict";var n=r(2),c=r(88).find,l=r(205),o="find",d=!0;o in[]&&Array(1)[o]((function(){d=!1})),n({target:"Array",proto:!0,forced:d},{find:function(e){return c(this,e,arguments.length>1?arguments[1]:void 0)}}),l(o)},544:function(e,t,r){var content=r(567);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,r(21).default)("d891cea4",content,!0,{sourceMap:!1})},566:function(e,t,r){"use strict";r(544)},567:function(e,t,r){var n=r(20)((function(i){return i[1]}));n.push([e.i,".user-wallet-table .el-table{color:#222}.user-wallet-table .el-table .el-button--text{color:#222;font-weight:400}.user-wallet-table .el-table th{background-color:#f2f2f2}.user-wallet-table .el-table thead{color:#555;font-weight:400}",""]),n.locals={},e.exports=n},584:function(e,t,r){"use strict";r.r(t);var n={props:{list:{type:Array,default:function(){return[]}},type:{type:String,default:"all"}},methods:{}},c=(r(566),r(9)),component=Object(c.a)(n,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"user-wallet-table"},[t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.list}},[t("el-table-column",{attrs:{prop:"type_desc",label:"类型"}}),e._v(" "),t("el-table-column",{attrs:{prop:"change_amount_desc",label:"金额"},scopedSlots:e._u([{key:"default",fn:function(r){return t("div",{class:{primary:1!=r.row.action}},[e._v("\n "+e._s(r.row.change_amount_desc)+"\n ")])}}])}),e._v(" "),t("el-table-column",{attrs:{prop:"create_time",label:"时间"}})],1)],1)}),[],!1,null,null,null);t.default=component.exports},607:function(e,t,r){var content=r(681);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,r(21).default)("2e5367cc",content,!0,{sourceMap:!1})},680:function(e,t,r){"use strict";r(607)},681:function(e,t,r){var n=r(20)((function(i){return i[1]}));n.push([e.i,".user-wallet-container[data-v-67ff5997]{padding:10px 10px 60px}.user-wallet-container .user-wallet-header[data-v-67ff5997]{border-bottom:1px solid #e5e5e5;padding:10px 5px}.user-wallet-container .user-wallet-content[data-v-67ff5997]{margin-top:17px}.user-wallet-container .user-wallet-content .wallet-info-box[data-v-67ff5997]{background:linear-gradient(87deg,#007b44,#ff9e2c);padding:24px}.user-wallet-container .user-wallet-content .wallet-info-box .user-wallet-info .title[data-v-67ff5997]{color:#ffdcd7;margin-bottom:8px}.charge[data-v-67ff5997]{cursor:pointer}.charge-container[data-v-67ff5997]{border:1px solid #e6e6e6;border-radius:5px;cursor:pointer;height:80px;margin-left:20px;margin-top:20px;padding:20px;text-align:center;width:144px}.active[data-v-67ff5997]{background-color:#ffe9ee;border:1px solid #fd6785}.pay-way[data-v-67ff5997]{border:1px dashed hsla(0,0%,90%,.898);cursor:pointer;height:68px;margin-right:32px;width:200px}.pay-way img[data-v-67ff5997]{height:30px;width:30px}",""]),n.locals={},e.exports=n},733:function(e,t,r){"use strict";r.r(t);r(32);var n=r(7),c=r(10),l=(r(513),r(13),r(66),r(48),r(584)),o={mixins:[r(499).a],components:{UserWalletTable:l.default},layout:"user-layout",data:function(){return Object(c.a)(Object(c.a)({showWxpay:!1,hascomfirm:!1,payInfo:{config:{code_url:"",order_amount:0}},order_id:"",payWayArr:[],rechargeMoney:"",visible:!1,activeIndex:-1,charge:!1,activeName:"bnw"},"payWayArr",[]),"userWallet",[{type:"bnw",lists:[],name:"全部记录",count:0,page:1},{type:"bnw_inc",lists:[],name:"收入记录",count:0,page:1},{type:"bnw_dec",lists:[],name:"消费记录",count:0,page:1}])},asyncData:function(e){return Object(n.a)(regeneratorRuntime.mark((function t(){var r,n,c,l,o,d;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.$get,e.query,n={},c=[],t.next=5,r("recharge/rechargeTemplateLists");case 5:return l=t.sent,t.next=8,r("user/wallet");case 8:return o=t.sent,t.next=11,r("account_log/lists",{params:{page_no:1,page_size:10,type:"bnw"}});case 11:return d=t.sent,1==o.code&&(console.log(o),n=o.data),console.log(d),1==d.code&&(c=d.data),t.abrupt("return",{wallet:n,recodeList:c,rechargeTemplateList:l});case 16:case"end":return t.stop()}}),t)})))()},fetch:function(){this.handleClick()},methods:{handleClick:function(){this.getRecodeList()},handlecomfirm:function(){var e=this;return Object(n.a)(regeneratorRuntime.mark((function t(){var r,data,n,code,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e.rechargeMoney<e.wallet.recharge_min_amount)){t.next=2;break}return t.abrupt("return",e.$message({message:"充值金额最低".concat(e.wallet.recharge_min_amount,"元起"),type:"error"}));case 2:return e.hascomfirm=!0,t.next=5,e.$post("recharge/recharge",{money:e.rechargeMoney,pay_way:2});case 5:return r=t.sent,data=r.data,e.order_id=data.order_id,t.next=10,e.$get("pay/payway",{params:{from:data.from,order_id:data.order_id,scene:4}});case 10:if(n=t.sent,code=n.code,c=n.data,1!=code){t.next=17;break}if(e.payWayArr=c.lists,e.payWayArr.length){t.next=17;break}return t.abrupt("return",e.$message({message:"请联系管理员配置支付方式",type:"error"}));case 17:e.visible=!1;case 18:case"end":return t.stop()}}),t)})))()},handlecharge:function(e,t){var r=this;return Object(n.a)(regeneratorRuntime.mark((function n(){var c,l,data,o,code,d;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r.activeIndex=e,-1==e){n.next=19;break}return n.next=4,r.$post("recharge/recharge",{pay_way:2,template_id:t});case 4:if(c=n.sent,l=c.code,data=c.data,l){n.next=9;break}return n.abrupt("return");case 9:return r.order_id=data.order_id,n.next=12,r.$get("pay/payway",{params:{from:data.from,order_id:data.order_id,scene:4}});case 12:if(o=n.sent,code=o.code,d=o.data,1!=code){n.next=19;break}if(r.payWayArr=d.lists,r.payWayArr.length){n.next=19;break}return n.abrupt("return",r.$message({message:"请联系管理员配置支付方式",type:"error"}));case 19:case"end":return n.stop()}}),n)})))()},orderPay:function(e){var t=this;return Object(n.a)(regeneratorRuntime.mark((function r(){var n,c,data,code,l,div;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=t.$loading({lock:!0,text:"请稍后...",spinner:"el-icon-loading"}),r.prev=1,r.next=4,t.$post("pay/prepay",{order_id:t.order_id,pay_way:e,from:"recharge"});case 4:c=r.sent,data=c.data,code=c.code,c.msg,n.close(),1==code&&2==data.pay_way?(t.payInfo=data,t.showWxpay=!0,t.createTimer()):1==code&&3==data.pay_way&&((l=document.getElementsByTagName("divform")).length&&document.body.removeChild(l[0]),(div=document.createElement("divform")).innerHTML=data.config,document.body.appendChild(div),document.forms[0].submit()),r.next=15;break;case 12:r.prev=12,r.t0=r.catch(1),n.close();case 15:case"end":return r.stop()}}),r,null,[[1,12]])})))()},clearTimer:function(){clearInterval(this.timer)},createTimer:function(){var e=this;this.timer&&clearInterval(this.timer),this.timer=setInterval((function(){e.getOrder()}),2e3)},getOrder:function(){var e=this;return Object(n.a)(regeneratorRuntime.mark((function t(){var r,data,code;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$get("pay/payStatus",{params:{from:"recharge",order_id:e.order_id}});case 2:r=t.sent,data=r.data,code=r.code,r.msg,1==code&&(e.order=data,1==data.pay_status&&(clearInterval(e.timer),e.showWxpay=!1,e.$message({message:"支付成功",type:"success"})));case 7:case"end":return t.stop()}}),t)})))()},changePage:function(e){var t=this;this.userWallet.some((function(r){r.type==t.activeName&&(r.page=e)})),this.getRecodeList()},getRecodeList:function(){var e=this;return Object(n.a)(regeneratorRuntime.mark((function t(){var r,n,c,l,o,d,f;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.activeName,n=e.userWallet,c=n.find((function(e){return e.type==r})),t.next=4,e.$get("account_log/lists",{params:{page_size:10,page_no:c.page,type:r}});case 4:l=t.sent,o=l.data,d=o.lists,f=o.count,1==l.code&&(e.recodeList={lists:d,count:f});case 10:case"end":return t.stop()}}),t)})))()}},watch:{recodeList:{immediate:!0,handler:function(e){var t=this;this.userWallet.some((function(r){if(r.type==t.activeName)return Object.assign(r,e),!0}))}}}},d=(r(680),r(9)),component=Object(d.a)(o,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"user-wallet-container"},[e.charge?[t("div",{staticClass:"user-wallet-header lg"},[e._v("充值")]),e._v(" "),t("div",{staticClass:"user-wallet-content m-l-20"},[e._v("\n 可用余额\n "),t("span",{staticClass:"m-l-20"},[e._v("¥"+e._s(e.wallet.user_money||0))])]),e._v(" "),t("div",{staticClass:"user-wallet-content m-l-20"},[e._v("充值金额")]),e._v(" "),t("div",{staticClass:"flex"},[e._l(e.rechargeTemplateList.data.lists,(function(r,n){return t("div",{key:r.id,staticClass:"charge-container",class:{active:e.activeIndex==n},on:{click:function(t){return e.handlecharge(n,r.id)}}},[t("div",[t("div",{staticClass:"bold lg"},[e._v(e._s(r.money)+"元")]),e._v(" "),t("div",{staticClass:"xs m-t-5"},[e._v("\n "+e._s(r.tips)+"\n ")])])])})),e._v(" "),t("el-popover",{attrs:{placement:"bottom",width:"300",trigger:"click"},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[t("el-input",{attrs:{placeholder:"请输入充值金额"},model:{value:e.rechargeMoney,callback:function(t){e.rechargeMoney=t},expression:"rechargeMoney"}},[t("template",{slot:"prepend"},[e._v("¥")])],2),e._v(" "),t("div",{staticStyle:{"text-align":"right","margin-top":"5px"}},[t("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(t){e.visible=!1}}},[e._v("取消")]),e._v(" "),t("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.handlecomfirm}},[e._v("确定")])],1),e._v(" "),t("div",{staticClass:"charge-container",class:{active:-1==e.activeIndex},attrs:{slot:"reference"},on:{click:function(t){return e.handlecharge(-1)}},slot:"reference"},[e.hascomfirm?t("div",{staticClass:"bold lg"},[e._v(e._s(e.rechargeMoney)+"元")]):t("div",{staticClass:"bold lg"},[e._v("自定义金额")]),e._v(" "),e.hascomfirm?t("div",{staticClass:"xs m-t-5",staticStyle:{color:"red"}},[e._v("\n 修改\n ")]):t("div",{staticClass:"xs m-t-5"},[e._v("\n 最低"+e._s(e.wallet.recharge_min_amount)+"元起\n ")])])],1)],2),e._v(" "),e.payWayArr.length?t("div",{staticClass:"user-wallet-content m-l-20 title lg bold"},[e._v("\n 请选择支付方式\n ")]):e._e(),e._v(" "),t("div",{staticClass:"flex m-t-16 m-l-20"},e._l(e.payWayArr,(function(r,n){return t("div",{key:n},[t("div",{staticClass:"pay-way flex row-center",on:{click:function(t){return e.orderPay(r.pay_way)}}},[t("img",{attrs:{src:r.icon,alt:""}}),e._v(" "),t("span",{staticClass:"m-l-16 xxl"},[e._v(e._s(r.name))])])])})),0)]:[t("div",{staticClass:"user-wallet-header lg"},[e._v("我的钱包")]),e._v(" "),t("div",{staticClass:"user-wallet-content"},[t("div",{staticClass:"wallet-info-box flex"},[t("div",{staticClass:"user-wallet-info"},[t("div",{staticClass:"xs title"},[e._v("我的余额")]),e._v(" "),t("div",{staticClass:"nr white flex",staticStyle:{"font-weight":"500","align-items":"baseline"}},[e._v("\n ¥"),t("label",{staticStyle:{"font-size":"24px"}},[e._v(e._s(e.wallet.user_money||0))]),e._v(" "),t("span",{staticClass:"m-l-10 charge",on:{click:function(t){e.charge=!0}}},[e._v("\n 充值\n ")])])]),e._v(" "),t("div",{staticClass:"user-wallet-info",staticStyle:{"margin-left":"144px"}},[t("div",{staticClass:"xs title"},[e._v("累计消费")]),e._v(" "),t("div",{staticClass:"nr white flex",staticStyle:{"font-weight":"500","align-items":"baseline"}},[e._v("\n ¥"),t("label",{staticStyle:{"font-size":"24px"}},[e._v(e._s(e.wallet.total_order_amount||0))])])])]),e._v(" "),t("el-tabs",{staticClass:"mt10",on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},e._l(e.userWallet,(function(r,n){return t("el-tab-pane",{key:n,attrs:{label:r.name,name:r.type}},[t("user-wallet-table",{attrs:{type:r.type,list:r.lists}}),e._v(" "),r.count?t("div",{staticClass:"pagination row-center m-t-10"},[t("el-pagination",{attrs:{"hide-on-single-page":"",background:"",layout:"prev, pager, next","prev-text":"上一页","next-text":"下一页","page-size":10,total:r.count},on:{"current-change":e.changePage}})],1):e._e()],1)})),1)],1)],e._v(" "),t("el-dialog",{attrs:{title:"微信支付",visible:e.showWxpay,width:"700px",center:""},on:{"update:visible":function(t){e.showWxpay=t},close:e.clearTimer}},[t("div",{staticClass:"flex flex-col row-center black"},[t("vue-qr",{staticClass:"bicode",attrs:{logoScale:20,margin:0,dotScale:1,text:e.payInfo.config.code_url}}),e._v(" "),t("div",{staticClass:"m-t-8",staticStyle:{"font-size":"18px"}},[e._v("\n 微信扫一扫,完成支付\n ")]),e._v(" "),t("div",{staticClass:"pay-money flex"},[t("span",[e._v("需支付金额:")]),e._v(" "),t("span",{staticClass:"primary"},[t("price-formate",{attrs:{price:e.payInfo.config.order_amount,"subscript-size":18,"first-size":28,"second-size":28}})],1)])],1)])],2)}),[],!1,null,"67ff5997",null);t.default=component.exports;installComponents(component,{UserWalletTable:r(584).default,PriceFormate:r(500).default})}}]);
|