main.php 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537
  1. {extend name="public/container"}
  2. {block name="head_top"}
  3. <!-- 全局js -->
  4. <script src="{__PLUG_PATH}echarts/echarts.common.min.js"></script>
  5. <script src="{__PLUG_PATH}echarts/theme/macarons.js"></script>
  6. <script src="{__PLUG_PATH}echarts/theme/westeros.js"></script>
  7. {/block}
  8. {block name="content"}
  9. <div class="row">
  10. <!-- <div class="col-sm-3 ui-sortable">-->
  11. <!-- <div class="ibox float-e-margins">-->
  12. <!-- <div class="ibox-title">-->
  13. <!-- <span class="label label-danger pull-right">急</span>-->
  14. <!-- <h5>订单</h5>-->
  15. <!-- </div>-->
  16. <!-- <div class="ibox-content">-->
  17. <!-- <h1 class="no-margins">{$topData.orderDeliveryNum}</h1>-->
  18. <!-- <small><a href="javascript:;" class="opFrames" data-name="订单管理" data-href="{:Url('order.store_order/index',['status'=>1])}">待发货</a> </small>-->
  19. <!-- </div>-->
  20. <!-- </div>-->
  21. <!-- </div>-->
  22. <!-- <div class="col-sm-3 ui-sortable">-->
  23. <!-- <div class="ibox float-e-margins">-->
  24. <!-- <div class="ibox-title">-->
  25. <!-- <span class="label label-info pull-right">待</span>-->
  26. <!-- <h5>订单</h5>-->
  27. <!-- </div>-->
  28. <!-- <div class="ibox-content">-->
  29. <!-- <h1 class="no-margins">{$topData.orderRefundNum}</h1>-->
  30. <!-- <small><a href="javascript:;" class="opFrames" data-name="订单管理" data-href="{:Url('order.store_order/index',['status'=>-1])}">退换货</a></small>-->
  31. <!-- </div>-->
  32. <!-- </div>-->
  33. <!-- </div>-->
  34. <!-- <div class="col-sm-3 ui-sortable" >-->
  35. <!-- <div class="ibox float-e-margins">-->
  36. <!-- <div class="ibox-title">-->
  37. <!-- <span class="label label-danger pull-right">急</span>-->
  38. <!-- <h5>商品</h5>-->
  39. <!-- </div>-->
  40. <!-- <div class="ibox-content">-->
  41. <!-- <h1 class="no-margins">{$topData.stockProduct}</h1>-->
  42. <!-- <small><a href="javascript:;" class="opFrames" data-name="商品管理" data-href="{:Url('store.store_product/index',array('type'=>5))}">库存预警</a></small>-->
  43. <!-- </div>-->
  44. <!-- </div>-->
  45. <!-- </div>-->
  46. <div class="col-sm-3 ui-sortable">
  47. <div class="ibox float-e-margins">
  48. <div class="ibox-title">
  49. <span class="label label-danger pull-right">待</span>
  50. <h5>待提现</h5>
  51. </div>
  52. <div class="ibox-content">
  53. <h1 class="no-margins">{$topData.treatedExtract}</h1>
  54. <small><a href="javascript:;" class="opFrames" data-name="提现盛情"
  55. data-href="{:Url('finance.user_extract/index')}">待处理提现</a></small>
  56. </div>
  57. </div>
  58. </div>
  59. <div class="col-sm-3 ui-sortable">
  60. <div class="ibox float-e-margins">
  61. <div class="ibox-title">
  62. <span class="label label-danger pull-right">待</span>
  63. <h5>待充值</h5>
  64. </div>
  65. <div class="ibox-content">
  66. <h1 class="no-margins">{$topData.treatedRecharge}</h1>
  67. <small><a href="javascript:;" class="opFrames" data-name="充值申情"
  68. data-href="{:Url('finance.user_recharge/index')}">待处理充值</a></small>
  69. </div>
  70. </div>
  71. </div>
  72. <div class="col-sm-3 ui-sortable">
  73. <div class="ibox float-e-margins">
  74. <div class="ibox-title">
  75. <span class="label label-danger pull-right">待</span>
  76. <h5>实名审核</h5>
  77. </div>
  78. <div class="ibox-content">
  79. <h1 class="no-margins">{$topData.real_name}</h1>
  80. <small><a href="javascript:;" class="opFrames" data-name="实名审核"
  81. data-href="{:Url('user.user/index')}">待处理实名审核</a></small>
  82. </div>
  83. </div>
  84. </div>
  85. <div class="col-sm-3 ui-sortable">
  86. <div class="ibox float-e-margins">
  87. <div class="ibox-title">
  88. <span class="label label-danger pull-right">待</span>
  89. <h5>平台订单</h5>
  90. </div>
  91. <div class="ibox-content">
  92. <h1 class="no-margins">{$topData.treatedSite}</h1>
  93. <small><a href="javascript:;" class="opFrames" data-name="平台订单"
  94. data-href="{:Url('finance.finance/cashTrade')}">待处理交易</a></small>
  95. </div>
  96. </div>
  97. </div>
  98. <!-- <div class="col-sm-3 ui-sortable">-->
  99. <!-- <div class="ibox float-e-margins">-->
  100. <!-- <div class="ibox-title">-->
  101. <!-- <span class="label label-info pull-right">昨</span>-->
  102. <!-- <h5>订单</h5>-->
  103. <!-- </div>-->
  104. <!-- <div class="ibox-content">-->
  105. <!-- <h1 class="no-margins">{$first_line.d_num.data}</h1>-->
  106. <!-- <div class="stat-percent font-bold text-navy">-->
  107. <!-- {$first_line.d_num.percent}%-->
  108. <!-- {if condition='$first_line.d_num.is_plus egt 0'}<i class="fa {if condition='$first_line.d_num.is_plus eq 1'}fa-level-up{else /}fa-level-down{/if}"></i>{/if}-->
  109. <!-- </div>-->
  110. <!-- <small><a href="javascript:;" class="opFrames" data-name="订单管理" data-href="{:Url('order.store_order/index')}?data=yesterday">昨日支付订单数</a></small>-->
  111. <!-- </div>-->
  112. <!-- </div>-->
  113. <!-- </div>-->
  114. <!-- <div class="col-sm-3 ui-sortable">-->
  115. <!-- <div class="ibox float-e-margins">-->
  116. <!-- <div class="ibox-title">-->
  117. <!-- <span class="label label-info pull-right">昨</span>-->
  118. <!-- <h5>交易</h5>-->
  119. <!-- </div>-->
  120. <!-- <div class="ibox-content">-->
  121. <!-- <h1 class="no-margins">{$first_line.d_price.data}</h1>-->
  122. <!-- <div class="stat-percent font-bold text-info">-->
  123. <!-- {$first_line.d_price.percent}%-->
  124. <!-- {if condition='$first_line.d_price.is_plus egt 0'}<i class="fa {if condition='$first_line.d_price.is_plus eq 1'}fa-level-up{else /}fa-level-down{/if}"></i>{/if}-->
  125. <!-- </div>-->
  126. <!-- <small><a href="javascript:;" class="opFrames" data-name="订单管理" data-href="{:Url('order.store_order/index')}?data=yesterday">昨日交易额</a></small>-->
  127. <!-- </div>-->
  128. <!-- </div>-->
  129. <!-- </div>-->
  130. <div class="col-sm-3 ui-sortable">
  131. <div class="ibox float-e-margins">
  132. <div class="ibox-title">
  133. <span class="label label-info pull-right">今</span>
  134. <h5>粉丝</h5>
  135. </div>
  136. <div class="ibox-content">
  137. <h1 class="no-margins">{$first_line.day.data}</h1>
  138. <div class="stat-percent font-bold text-info">
  139. {$first_line.day.percent}%
  140. {if condition='$first_line.day.is_plus egt 0'}<i
  141. class="fa {if condition='$first_line.day.is_plus eq 1'}fa-level-up{else /}fa-level-down{/if}"></i>{/if}
  142. </div>
  143. <small><a href="javascript:;" class="opFrames" data-name="会员管理" data-href="{:Url('user.user/index')}">今日新增粉丝</a></small>
  144. </div>
  145. </div>
  146. </div>
  147. <div class="col-sm-3 ui-sortable">
  148. <div class="ibox float-e-margins">
  149. <div class="ibox-title">
  150. <span class="label label-info pull-right">月</span>
  151. <h5>粉丝</h5>
  152. </div>
  153. <div class="ibox-content">
  154. <h1 class="no-margins">{$first_line.month.data}</h1>
  155. <div class="stat-percent font-bold text-info">
  156. {$first_line.month.percent}%
  157. {if condition='$first_line.month.is_plus egt 0'}<i
  158. class="fa {if condition='$first_line.month.is_plus eq 1'}fa-level-up{else /}fa-level-down{/if}"></i>{/if}
  159. </div>
  160. <small><a href="javascript:;" class="opFrames" data-name="会员管理" data-href="{:Url('user.user/index')}">本月新增粉丝</a></small>
  161. </div>
  162. </div>
  163. </div>
  164. <div class="col-sm-3 ui-sortable">
  165. <div class="ibox float-e-margins">
  166. <div class="ibox-title">
  167. <span class="label label-info pull-right">U</span>
  168. <h5>USDT</h5>
  169. </div>
  170. <div class="ibox-content">
  171. <h1 class="no-margins">{$topData.USDT}</h1>
  172. <div class="stat-percent font-bold text-info">
  173. </div>
  174. <small>平台内USDT</small>
  175. </div>
  176. </div>
  177. </div>
  178. <div class="col-sm-3 ui-sortable">
  179. <div class="ibox float-e-margins">
  180. <div class="ibox-title">
  181. <span class="label label-info pull-right">U</span>
  182. <h5>今日充值</h5>
  183. </div>
  184. <div class="ibox-content">
  185. <h1 class="no-margins">{$topData.recharged}</h1>
  186. <div class="stat-percent font-bold text-info">
  187. </div>
  188. <small>今日充值USDT</small>
  189. </div>
  190. </div>
  191. </div>
  192. <div class="col-sm-3 ui-sortable">
  193. <div class="ibox float-e-margins">
  194. <div class="ibox-title">
  195. <span class="label label-info pull-right">U</span>
  196. <h5>今日提出</h5>
  197. </div>
  198. <div class="ibox-content">
  199. <h1 class="no-margins">{$topData.extracted}</h1>
  200. <div class="stat-percent font-bold text-info">
  201. </div>
  202. <small>今日提出USDT</small>
  203. </div>
  204. </div>
  205. </div>
  206. </div>
  207. <div id="app">
  208. <!-- <div class="row">-->
  209. <!-- <div class="col-lg-12">-->
  210. <!-- <div class="ibox float-e-margins">-->
  211. <!-- <div class="ibox-title">-->
  212. <!-- <h5>订单</h5>-->
  213. <!-- <div class="pull-right">-->
  214. <!-- <div class="btn-group">-->
  215. <!-- <button type="button" class="btn btn-xs btn-white" :class="{'active': active == 'thirtyday'}" v-on:click="getlist('thirtyday')">30天</button>-->
  216. <!-- <button type="button" class="btn btn-xs btn-white" :class="{'active': active == 'week'}" v-on:click="getlist('week')">周</button>-->
  217. <!-- <button type="button" class="btn btn-xs btn-white" :class="{'active': active == 'month'}" v-on:click="getlist('month')">月</button>-->
  218. <!-- <button type="button" class="btn btn-xs btn-white" :class="{'active': active == 'year'}" v-on:click="getlist('year')">年</button>-->
  219. <!-- </div>-->
  220. <!-- </div>-->
  221. <!-- </div>-->
  222. <!-- <div class="ibox-content">-->
  223. <!-- <div class="row">-->
  224. <!-- <div class="col-lg-9">-->
  225. <!-- <div class="flot-chart-content echarts" ref="order_echart" id="flot-dashboard-chart1"></div>-->
  226. <!-- </div>-->
  227. <!-- <div class="col-lg-3">-->
  228. <!-- <ul class="stat-list">-->
  229. <!-- <li>-->
  230. <!-- <h2 class="no-margins ">{{pre_cycleprice}}</h2>-->
  231. <!-- <small>{{precyclename}}销售额</small>-->
  232. <!-- </li>-->
  233. <!-- <li>-->
  234. <!-- <h2 class="no-margins ">{{cycleprice}}</h2>-->
  235. <!-- <small>{{cyclename}}销售额</small>-->
  236. <!-- <div class="stat-percent text-navy" v-if='cycleprice_is_plus ===1'>-->
  237. <!-- {{cycleprice_percent}}%-->
  238. <!-- <i class="fa fa-level-up"></i>-->
  239. <!-- </div>-->
  240. <!-- <div class="stat-percent text-danger" v-else-if='cycleprice_is_plus === -1'>-->
  241. <!-- {{cycleprice_percent}}%-->
  242. <!-- <i class="fa fa-level-down"></i>-->
  243. <!-- </div>-->
  244. <!-- <div class="stat-percent" v-else>-->
  245. <!-- {{cycleprice_percent}}%-->
  246. <!-- </div>-->
  247. <!-- <div class="progress progress-mini">-->
  248. <!-- <div :style="{width:cycleprice_percent+'%'}" class="progress-bar box"></div>-->
  249. <!-- </div>-->
  250. <!-- </li>-->
  251. <!-- <li>-->
  252. <!-- <h2 class="no-margins ">{{pre_cyclecount}}</h2>-->
  253. <!-- <small>{{precyclename}}订单总数</small>-->
  254. <!-- </li>-->
  255. <!-- <li>-->
  256. <!-- <h2 class="no-margins">{{cyclecount}}</h2>-->
  257. <!-- <small>{{cyclename}}订单总数</small>-->
  258. <!-- <div class="stat-percent text-navy" v-if='cyclecount_is_plus ===1'>-->
  259. <!-- {{cyclecount_percent}}%-->
  260. <!-- <i class="fa fa-level-up"></i>-->
  261. <!-- </div>-->
  262. <!-- <div class="stat-percent text-danger" v-else-if='cyclecount_is_plus === -1'>-->
  263. <!-- {{cyclecount_percent}}%-->
  264. <!-- <i class="fa fa-level-down"></i>-->
  265. <!-- </div>-->
  266. <!-- <div class="stat-percent " v-else>-->
  267. <!-- {{cyclecount_percent}}%-->
  268. <!-- </div>-->
  269. <!-- <div class="progress progress-mini">-->
  270. <!-- <div :style="{width:cyclecount_percent+'%'}" class="progress-bar box"></div>-->
  271. <!-- </div>-->
  272. <!-- </li>-->
  273. <!---->
  274. <!---->
  275. <!-- </ul>-->
  276. <!-- </div>-->
  277. <!-- </div>-->
  278. <!-- </div>-->
  279. <!-- </div>-->
  280. <!-- </div>-->
  281. <!-- </div>-->
  282. <div class="row">
  283. <div class="col-lg-12">
  284. <div class="ibox float-e-margins">
  285. <div class="ibox-title">
  286. <h5>用户</h5>
  287. </div>
  288. <div class="ibox-content">
  289. <div class="row">
  290. <div class="col-lg-12">
  291. <div class="flot-chart">
  292. <div class="flot-chart-content" ref="user_echart" id="flot-dashboard-chart2"></div>
  293. </div>
  294. </div>
  295. </div>
  296. </div>
  297. </div>
  298. </div>
  299. </div>
  300. </div>
  301. {/block}
  302. {block name="script"}
  303. <style scoped>
  304. .box {
  305. width: 0px;
  306. }
  307. </style>
  308. <script>
  309. require(['vue', 'axios', 'layer'], function (Vue, axios, layer) {
  310. new Vue({
  311. el: "#app",
  312. data: {
  313. option: {},
  314. myChart: {},
  315. active: 'thirtyday',
  316. cyclename: '最近30天',
  317. precyclename: '上个30天',
  318. cyclecount: 0,
  319. cycleprice: 0,
  320. cyclecount_percent: 0,
  321. cycleprice_percent: 0,
  322. cyclecount_is_plus: 0,
  323. cycleprice_is_plus: 0,
  324. pre_cyclecount: 0,
  325. pre_cycleprice: 0
  326. },
  327. methods: {
  328. info: function () {
  329. var that = this;
  330. axios.get("{:Url('userchart')}").then((res) => {
  331. that.myChart.user_echart.setOption(that.userchartsetoption(res.data.data));
  332. });
  333. },
  334. getlist: function (e) {
  335. var that = this;
  336. var cycle = e != null ? e : 'thirtyday';
  337. axios.get("{:Url('orderchart')}?cycle=" + cycle).then((res) => {
  338. that.myChart.order_echart.clear();
  339. that.myChart.order_echart.setOption(that.orderchartsetoption(res.data.data));
  340. that.active = cycle;
  341. switch (cycle) {
  342. case 'thirtyday':
  343. that.cyclename = '最近30天';
  344. that.precyclename = '上个30天';
  345. break;
  346. case 'week':
  347. that.precyclename = '上周';
  348. that.cyclename = '本周';
  349. break;
  350. case 'month':
  351. that.precyclename = '上月';
  352. that.cyclename = '本月';
  353. break;
  354. case 'year':
  355. that.cyclename = '去年';
  356. that.precyclename = '今年';
  357. break;
  358. default:
  359. break;
  360. }
  361. var data = res.data.data;
  362. if (data) {
  363. that.cyclecount = data.cycle.count.data;
  364. that.cyclecount_percent = data.cycle.count.percent;
  365. that.cyclecount_is_plus = data.cycle.count.is_plus;
  366. that.cycleprice = data.cycle.price.data;
  367. that.cycleprice_percent = data.cycle.price.percent;
  368. that.cycleprice_is_plus = data.cycle.price.is_plus;
  369. that.pre_cyclecount = data.pre_cycle.count.data;
  370. that.pre_cycleprice = data.pre_cycle.price.data;
  371. }
  372. });
  373. },
  374. orderchartsetoption: function (data) {
  375. data = data == undefined ? {} : data;
  376. this.option = {
  377. tooltip: {
  378. trigger: 'axis',
  379. axisPointer: {
  380. type: 'cross',
  381. crossStyle: {
  382. color: '#999'
  383. }
  384. }
  385. },
  386. toolbox: {
  387. feature: {
  388. dataView: {show: true, readOnly: false},
  389. magicType: {show: true, type: ['line', 'bar']},
  390. restore: {show: false},
  391. saveAsImage: {show: true}
  392. }
  393. },
  394. legend: {
  395. data: data.legend || []
  396. },
  397. grid: {
  398. x: 70,
  399. x2: 50,
  400. y: 60,
  401. y2: 50
  402. },
  403. xAxis: [
  404. {
  405. type: 'category',
  406. data: data.xAxis,
  407. axisPointer: {
  408. type: 'shadow'
  409. },
  410. axisLabel: {
  411. interval: 0,
  412. rotate: 40
  413. }
  414. }
  415. ],
  416. yAxis: [{type: 'value'}],
  417. // yAxis: [
  418. // {
  419. // type: 'value',
  420. // name: '',
  421. // min: 0,
  422. // max: data.yAxis.maxprice,
  423. //// interval: 0,
  424. // axisLabel: {
  425. // formatter: '{value} 元'
  426. // }
  427. // },
  428. // {
  429. // type: 'value',
  430. // name: '',
  431. // min: 0,
  432. // max: data.yAxis.maxnum,
  433. // interval: 5,
  434. // axisLabel: {
  435. // formatter: '{value} 个'
  436. // }
  437. // }
  438. // ],
  439. series: data.series
  440. };
  441. return this.option;
  442. },
  443. userchartsetoption: function (data) {
  444. this.option = {
  445. tooltip: {
  446. trigger: 'axis',
  447. axisPointer: {
  448. type: 'cross',
  449. crossStyle: {
  450. color: '#999'
  451. }
  452. }
  453. },
  454. toolbox: {
  455. feature: {
  456. dataView: {show: false, readOnly: false},
  457. magicType: {show: true, type: ['line', 'bar']},
  458. restore: {show: false},
  459. saveAsImage: {show: false}
  460. }
  461. },
  462. legend: {
  463. data: data.legend
  464. },
  465. grid: {
  466. x: 70,
  467. x2: 50,
  468. y: 60,
  469. y2: 50
  470. },
  471. xAxis: [
  472. {
  473. type: 'category',
  474. data: data.xAxis,
  475. axisPointer: {
  476. type: 'shadow'
  477. }
  478. }
  479. ],
  480. yAxis: [
  481. {
  482. type: 'value',
  483. name: '人数',
  484. min: 0,
  485. max: data.yAxis.maxnum,
  486. interval: 5,
  487. axisLabel: {
  488. formatter: '{value} 人'
  489. }
  490. }
  491. ],
  492. // series: data.series
  493. series: [{
  494. name: '人数',
  495. type: 'bar',
  496. barWidth: '50%',
  497. itemStyle: {
  498. normal: {
  499. label: {
  500. show: true, //开启显示
  501. position: 'top', //在上方显示
  502. textStyle: { //数值样式
  503. color: '#666',
  504. fontSize: 12
  505. }
  506. }
  507. }
  508. },
  509. data: data.series
  510. }]
  511. };
  512. return this.option;
  513. },
  514. setChart: function (name, myChartname) {
  515. this.myChart[myChartname] = echarts.init(name, 'macarons');//初始化echart
  516. }
  517. },
  518. mounted: function () {
  519. const self = this;
  520. // this.setChart(self.$refs.order_echart,'order_echart');//订单图表
  521. this.setChart(self.$refs.user_echart, 'user_echart');//用户图表
  522. this.info();
  523. this.getlist();
  524. $('.opFrames').on('click', function () {
  525. parent.addframes($(this).data('href'), '', $(this).data('name'));
  526. });
  527. setTimeout(function () {
  528. window.location.reload()
  529. }, 60000)
  530. }
  531. });
  532. });
  533. </script>
  534. {/block}