1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/app_admin/index/index"],{"3ddb":function(e,a,t){"use strict";t.r(a);var n=t("e36a"),i=t("71af");for(var s in i)"default"!==s&&function(e){t.d(a,e,(function(){return i[e]}))}(s);t("c292");var o,r=t("f0c5"),d=Object(r["a"])(i["default"],n["b"],n["c"],!1,null,"1eed00b6",null,!1,n["a"],o);a["default"]=d.exports},"3ead":function(e,a,t){},"49e5":function(e,a,t){"use strict";(function(e){Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var n,i=o(t("a8ff")),s=t("2f62");function o(e){return e&&e.__esModule?e:{default:e}}function r(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var a=1;a<arguments.length;a++){var t=null!=arguments[a]?arguments[a]:{};a%2?r(Object(t),!0).forEach((function(a){c(e,a,t[a])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach((function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(t,a))}))}return e}function c(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}var u=null,l={data:function(){return{info:{comment:0,mch:0,share:0},plugins_list:[],status:[{name:"支付金额",sign:"total_pay_price"},{name:"支付订单数",sign:"order_num"},{name:"支付人数",sign:"user_num"},{name:"支付件数",sign:"goods_num"}],plugins_active:{name:"全部",sign:"all"},canvas_plugins:{name:"全部",sign:"all"},pay_active:{name:"支付金额",sign:"total_pay_price"},_num:"0",_date:"0",choose_list:[],new_msg_num:null,all_data:[],index:[0],newIndex:0,dialog:!1,today:"",yesterday:"",weekday:"",monthday:"",area:null,id:null,iphone_x:!1,is_scan_code_pay:0,cWidth:"",cHeight:"",pixelRatio:1}},computed:d({},(0,s.mapState)({theme:function(e){return e.mallConfig.theme},mall:function(e){return e.mallConfig.mall},adminImg:function(e){return e.mallConfig.__wxapp_img.app_admin},userInfo:function(e){return e.user.info}})),methods:{bindChange:function(e){this.newIndex=e.detail.value[0]},toggle:function(e,a){var t,n,i,s=this;switch(e?s.area=a:t=a,s._num){case"0":n="";break;case"1":n=s.today;break;case"2":n=s.yesterday;break;case"3":n=s.weekday;break;case"4":n=s.monthday;break}switch(s._date){case"0":i=s.today;break;case"1":i=s.yesterday;break;case"2":i=s.weekday;break;case"3":i=s.monthday;break}3==s.area?(s.index=s.status.indexOf(s.pay_active),s.choose_list=s.status,s.dialog=!s.dialog):s.area<3&&(1==s.area?s.index=s.plugins_list.indexOf(s.plugins_active):2==s.area&&(s.index=s.plugins_list.indexOf(s.canvas_plugins)),s.choose_list=s.plugins_list,s.dialog=!s.dialog),setTimeout((function(){t>0&&(1==t?3==s.area?(console.log(s.status,s.newIndex),s.pay_active=s.status[s.newIndex],s.dialog=!1,s.getCanvas(i)):1==s.area?(s.plugins_active=s.plugins_list[s.newIndex],s.getInfo(n)):2==s.area?(s.canvas_plugins=s.plugins_list[s.newIndex],s.dialog=!1,s.getCanvas(i)):s.dialog=!1:(s.newIndex=0,s.dialog=!1))}),500)},tablist:function(e){var a=this;switch(a._date=e.toString(),a._date){case"0":a.getCanvas(a.today);break;case"1":a.getCanvas(a.yesterday);break;case"2":a.getCanvas(a.weekday);break;case"3":a.getCanvas(a.monthday);break}a.$forceUpdate()},tab:function(e){switch(this._num=e.toString(),this._num){case"0":this.getInfo();break;case"1":this.getInfo(this.today);break;case"2":this.getInfo(this.yesterday);break;case"3":this.getInfo(this.weekday);break;case"4":this.getInfo(this.monthday);break}this.$forceUpdate()},toRedirect:function(a){e.redirectTo({url:a})},toPayment:function(){e.navigateTo({url:"/pages/app_admin/payment-code/payment-code"})},toMessage:function(){e.navigateTo({url:"/pages/app_admin/order-message/order-message"})},toReview:function(){e.navigateTo({url:"/pages/app_admin/review-message/review-message?mch="+this.info.mch+"&share="+this.info.share+"&bonus="+this.info.bonus+"&stock="+this.info.stock})},toCash:function(){e.navigateTo({url:"/pages/app_admin/cash/cash?mch="+this.info.mch+"&share="+this.info.share+"&bonus="+this.info.bonus+"&stock="+this.info.stock})},toComment:function(){e.navigateTo({url:"/pages/app_admin/comment/comment"})},toUser:function(){e.navigateTo({url:"/pages/app_admin/user/user?share="+this.info.share})},getDate:function(){var e=new Date,a=e.getFullYear(),t=e.getMonth()+1;t>=1&&t<=9&&(t="0"+t);var n=e.getDate();this.today=a+"-"+t+"-"+n;var i=Date.parse(new Date),s=1e3*(i/1e3-86400),o=new Date(s),r=o.getFullYear(),d=o.getMonth()+1;d>=1&&d<=9&&(d="0"+d);var c=o.getDate();this.yesterday=r+"-"+d+"-"+c;var u=1e3*(i/1e3-604800),l=new Date(u),g=l.getFullYear(),f=l.getMonth()+1;f>=1&&f<=9&&(f="0"+f);var h=l.getDate();this.weekday=g+"-"+f+"-"+h;var _=1e3*(i/1e3-2592e3),p=new Date(_),m=p.getFullYear(),v=p.getMonth()+1;v>=1&&v<=9&&(v="0"+v);var y=p.getDate();this.monthday=m+"-"+v+"-"+y},getInfo:function(a){var t=this;e.showLoading({title:"加载中..."});var n=t.today;a==t.yesterday&&(n=t.yesterday),a||(t._num="0"),t.$request({url:t.$api.app_admin.index,data:{date_start:a||"",date_end:n,sign:t.plugins_active.sign},method:"post"}).then((function(a){if(e.hideLoading(),t.$hideLoading(),0==a.code){var n=[];t.info=a.data.admin_info,t.plugins_list=n.concat(a.data.plugins_list),t.new_msg_num=a.data.new_msg_num,t.all_data=a.data.all_data,t.is_scan_code_pay=a.data.is_scan_code_pay}else e.showToast({title:a.msg,icon:"none",duration:1e3})})).catch((function(a){e.hideLoading(),t.$hideLoading()}))},getCanvas:function(a,t){var n=this,i=n.today;a==n.yesterday&&(i=n.yesterday),n.$request({url:n.$api.app_admin.table,data:{date_start:a,date_end:i,sign:n.canvas_plugins.sign},method:"post"}).then((function(a){if(n.$hideLoading(),0==a.code){var t=a.data.list,i={categories:[],series:[{name:"",data:[]}]};"total_pay_price"==n.pay_active.sign?(i.series[0].name="支付金额",t.forEach((function(e,a){var s=t[a].created_at;n._date<2&&(s=t[a].created_at+"时");var o={value:t[a].total_pay_price,index:t[a].created_at};i.series[0].data.push(o),i.categories.push(s)}))):"order_num"==n.pay_active.sign?(i.series[0].name="支付订单数",t.forEach((function(e,a){var s=t[a].created_at;n._date<2&&(s=t[a].created_at+"时");var o={value:t[a].order_num,index:t[a].created_at};i.series[0].data.push(o),i.categories.push(s)}))):"goods_num"==n.pay_active.sign?(i.series[0].name="支付件数",t.forEach((function(e,a){var s=t[a].created_at;n._date<2&&(s=t[a].created_at+"时");var o={value:t[a].goods_num,index:t[a].created_at};i.series[0].data.push(o),i.categories.push(s)}))):"user_num"==n.pay_active.sign&&(i.series[0].name="支付人数",t.forEach((function(e,a){var s=t[a].created_at;n._date<2&&(s=t[a].created_at+"时");var o={value:t[a].user_num,index:t[a].created_at};i.series[0].data.push(o),i.categories.push(s)})));var s=[15,15,4,0];switch(n._date){case"0":i.categories.forEach((function(e,a){i.categories[a]=a%4==0?i.categories[a]:""})),i.categories.push("24"),s=[15,15,4,-25];break;case"1":i.categories.forEach((function(e,a){a%4!=0&&(i.categories[a]="")})),i.categories.push("24"),s=[15,15,4,-25];break;case"2":i.categories.forEach((function(e,a){i.categories[a]=i.categories[a].substring(5)}));break;case"3":i.categories.forEach((function(e,a){i.categories[a]=i.categories[a].substring(5),a%4!=0&&(i.categories[a]="")}));break}n.showColumn("canvasColumn",i,s)}else e.showToast({title:a.msg,icon:"none",duration:1e3})}))},touchIt:function(e){var a=this;u.showToolTip(e,{format:function(e,t){return e.color="rgba(0,0,0,0)",0==a._date?t=a.today+" "+e.data.index+"时 ":1==a._date?t=a.yesterday+" "+e.data.index+"时 ":2!=a._date&&3!=a._date||(t=e.data.index),"支付金额"==e.name?t+" "+e.name+"¥"+e.data.value+" ":t+" "+e.name+" "+e.data.value+" "}})},showColumn:function(e,a,t){u=new i.default({$this:n,canvasId:e,type:"area",legend:{show:!1},fontSize:9,background:"#FFFFFF",colors:["#446DFD"],padding:t,pixelRatio:this.pixelRatio,categories:a.categories,series:a.series,xAxis:{disableGrid:!0},yAxis:{gridType:"dash",data:{disabled:!0}},dataLabel:!1,dataPointShape:!1,width:this.cWidth*this.pixelRatio,height:this.cHeight*this.pixelRatio,extra:{area:{type:"curve",addLine:!0},tooltip:{bgColor:"#000000",bgOpacity:.7}}})}},onLoad:function(a){var t=this;t.$store.dispatch("user/refreshInfo"),t.getDate(),t._date="0",e.getSystemInfo({success:function(e){(e.model.indexOf("iPhone X")>-1||e.model.indexOf("iPhone 11")>-1||e.model.indexOf("iPhone11")>-1||e.model.indexOf("iPhone12")>-1||e.model.indexOf("Unknown Device")>-1)&&(t.iphone_x=!0)}}),t.cWidth=e.upx2px(640),t.cHeight=e.upx2px(220)},onReady:function(){var a=this,t=setInterval((function(){a.userInfo&&(a.$showLoading({type:"global",text:"加载中..."}),clearInterval(t),0==a.userInfo.identity.is_admin?(a.$hideLoading(),e.showModal({title:"提示",content:"该帐号无管理员权限",showCancel:!1,success:function(a){e.redirectTo({url:"/pages/index/index"})}})):a.$request({url:a.$api.app_admin.index,data:{date_start:"",date_end:a.today,sign:"all"},method:"post"}).then((function(t){if(0==t.code){var n=[];a.info=t.data.admin_info,a.plugins_list=n.concat(t.data.plugins_list),a.new_msg_num=t.data.new_msg_num,a.all_data=t.data.all_data,a.is_scan_code_pay=t.data.is_scan_code_pay,a.getCanvas(a.today)}else e.showToast({title:t.msg,icon:"none",duration:1e3})})).catch((function(t){a.$hideLoading(),e.showModal({title:"提示",content:"该帐号无管理员权限",showCancel:!1,success:function(a){e.redirectTo({url:"/pages/index/index"})}})})))}),500)}};a.default=l}).call(this,t("543d")["default"])},"71af":function(e,a,t){"use strict";t.r(a);var n=t("49e5"),i=t.n(n);for(var s in n)"default"!==s&&function(e){t.d(a,e,(function(){return n[e]}))}(s);a["default"]=i.a},c292:function(e,a,t){"use strict";var n=t("3ead"),i=t.n(n);i.a},e184:function(e,a,t){"use strict";(function(e){t("8748");n(t("66fd"));var a=n(t("3ddb"));function n(e){return e&&e.__esModule?e:{default:e}}e(a.default)}).call(this,t("543d")["createPage"])},e36a:function(e,a,t){"use strict";var n,i=function(){var e=this,a=e.$createElement;e._self._c},s=[];t.d(a,"b",(function(){return i})),t.d(a,"c",(function(){return s})),t.d(a,"a",(function(){return n}))}},[["e184","common/runtime","common/vendor"]]]);
|