glhcp/server/public/_nuxt/79fd49c.js

1 line
5.5 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[59],{517:function(e,t,l){"use strict";var n=l(2),r=l(110).find,c=l(194),o="find",d=!0;o in[]&&Array(1)[o]((function(){d=!1})),n({target:"Array",proto:!0,forced:d},{find:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),c(o)},598:function(e,t,l){var content=l(688);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,l(18).default)("c98a7b32",content,!0,{sourceMap:!1})},687:function(e,t,l){"use strict";l(598)},688:function(e,t,l){var n=l(17)((function(i){return i[1]}));n.push([e.i,".user-wallet-container[data-v-7421fc7d]{padding:10px 10px 60px;width:980px}.user-wallet-container .user-wallet-header[data-v-7421fc7d]{border-bottom:1px solid #e5e5e5;padding:10px 5px}.user-wallet-container[data-v-7421fc7d] .el-tabs__header{margin-left:5px}.user-wallet-container[data-v-7421fc7d] .el-tabs .el-tabs__nav-scroll{padding:0}.user-wallet-container .user-wallet-content[data-v-7421fc7d]{margin-top:17px}.user-wallet-container .user-wallet-content .wallet-info-box[data-v-7421fc7d]{background:linear-gradient(87deg,#ff2c3c,#ff9e2c);padding:24px}.user-wallet-container .user-wallet-content .wallet-info-box .user-wallet-info .title[data-v-7421fc7d]{color:#ffdcd7;margin-bottom:8px}.user-wallet-container .user-wallet-table[data-v-7421fc7d]{background-color:#f2f2f2}.user-wallet-container .user-wallet-table[data-v-7421fc7d] .el-table{color:#222}.user-wallet-container .user-wallet-table[data-v-7421fc7d] .el-table .el-button--text{color:#222;font-weight:400}.user-wallet-container .user-wallet-table[data-v-7421fc7d] .el-table th{background-color:#f2f2f2}.user-wallet-container .user-wallet-table[data-v-7421fc7d] .el-table thead{color:#555;font-weight:400}",""]),n.locals={},e.exports=n},738:function(e,t,l){"use strict";l.r(t);l(30);var n=l(8),r=(l(12),l(517),l(56),{head:function(){return{title:this.$store.getters.headTitle,link:[{rel:"icon",type:"image/x-icon",href:this.$store.getters.favicon}]}},layout:"user",data:function(){return{activeName:"all",userWallet:[{type:"all",list:[],name:"全部记录",count:0,page:1},{type:"output",list:[],name:"收入记录",count:0,page:1},{type:"income",list:[],name:"消费记录",count:0,page:1}]}},asyncData:function(e){return Object(n.a)(regeneratorRuntime.mark((function t(){var l,n,r,c,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return l=e.$get,e.query,n={},r=[],t.next=5,l("user/myWallet");case 5:return c=t.sent,t.next=8,l("user/accountLog",{params:{page_no:1,page_size:10,source:1,type:0}});case 8:return o=t.sent,1==c.code&&(n=c.data),1==o.code&&(r=o.data.list),t.abrupt("return",{wallet:n,recodeList:r});case 12:case"end":return t.stop()}}),t)})))()},fetch:function(){this.handleClick()},methods:{handleClick:function(){this.getRecodeList()},changePage:function(e){var t=this;this.userWallet.some((function(l){l.type==t.activeName&&(l.page=e)})),this.getRecodeList()},getRecodeList:function(){var e=this;return Object(n.a)(regeneratorRuntime.mark((function t(){var l,n,r,c,o,d,f,v;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return l=e.activeName,n=e.userWallet,r="all"==l?0:"income"==l?2:1,c=n.find((function(e){return e.type==l})),t.next=5,e.$get("user/accountLog",{params:{page_size:10,page_no:c.page,type:r,source:1}});case 5:o=t.sent,d=o.data,f=d.list,v=d.count,1==o.code&&(e.recodeList={list:f,count:v});case 11:case"end":return t.stop()}}),t)})))()}},watch:{recodeList:{immediate:!0,handler:function(e){var t=this;console.log("val:",e),this.userWallet.some((function(l){if(l.type==t.activeName)return Object.assign(l,e),!0}))}}}}),c=(l(687),l(9)),component=Object(c.a)(r,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"user-wallet-container"},[t("div",{staticClass:"user-wallet-header lg"},[e._v("\n 我的钱包\n ")]),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("¥"),t("label",{staticStyle:{"font-size":"24px"}},[e._v(e._s(e.wallet.user_money||0))])])]),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("¥"),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(l,n){return t("el-tab-pane",{key:n,attrs:{label:l.name,name:l.type}},[t("div",{staticClass:"user-wallet-table"},[t("el-table",{staticStyle:{width:"100%"},attrs:{data:l.list}},[t("el-table-column",{attrs:{prop:"source_type",label:"类型"}}),e._v(" "),t("el-table-column",{attrs:{prop:"change_amount",label:"金额"},scopedSlots:e._u([{key:"default",fn:function(l){return t("div",{class:{primary:1==l.row.change_type}},[e._v("\n "+e._s(l.row.change_amount)+"\n ")])}}],null,!0)}),e._v(" "),t("el-table-column",{attrs:{prop:"create_time",label:"时间"}})],1)],1)])})),1)],1)])}),[],!1,null,"7421fc7d",null);t.default=component.exports}}]);