Browse Source

添加插件

undefined
v-Brocloni 4 years ago
parent
commit
78d1abc15b
85 changed files with 4106 additions and 6116 deletions
  1. +2
    -0
      a.php
  2. +65
    -0
      addons/epay/Epay.php
  3. +91
    -0
      addons/epay/assets/css/common.css
  4. +20
    -0
      addons/epay/assets/css/epay.css
  5. +100
    -0
      addons/epay/assets/css/wechat.css
  6. BIN
      addons/epay/assets/images/alipay.png
  7. BIN
      addons/epay/assets/images/expired.png
  8. BIN
      addons/epay/assets/images/logo-alipay.png
  9. BIN
      addons/epay/assets/images/logo-wechat.png
  10. BIN
      addons/epay/assets/images/logo.png
  11. BIN
      addons/epay/assets/images/paid.png
  12. BIN
      addons/epay/assets/images/scan.png
  13. BIN
      addons/epay/assets/images/tips.png
  14. BIN
      addons/epay/assets/images/wechat.png
  15. +52
    -0
      addons/epay/assets/js/common.js
  16. +113
    -0
      addons/epay/assets/less/common.less
  17. +28
    -0
      addons/epay/assets/less/epay.less
  18. +0
    -0
      addons/epay/certs/apiclient_cert.pem
  19. +0
    -0
      addons/epay/certs/apiclient_key.pem
  20. +69
    -0
      addons/epay/config.php
  21. +229
    -0
      addons/epay/controller/Api.php
  22. +108
    -0
      addons/epay/controller/Index.php
  23. +8
    -0
      addons/epay/info.ini
  24. +17
    -0
      addons/epay/library/OrderException.php
  25. +267
    -0
      addons/epay/library/Service.php
  26. +107
    -0
      addons/epay/library/Wechat.php
  27. +63
    -0
      addons/epay/library/Yansongda/Pay/Contracts/GatewayInterface.php
  28. +7
    -0
      addons/epay/library/Yansongda/Pay/Exceptions/Exception.php
  29. +28
    -0
      addons/epay/library/Yansongda/Pay/Exceptions/GatewayException.php
  30. +7
    -0
      addons/epay/library/Yansongda/Pay/Exceptions/InvalidArgumentException.php
  31. +291
    -0
      addons/epay/library/Yansongda/Pay/Gateways/Alipay/Alipay.php
  32. +46
    -0
      addons/epay/library/Yansongda/Pay/Gateways/Alipay/AppGateway.php
  33. +47
    -0
      addons/epay/library/Yansongda/Pay/Gateways/Alipay/PosGateway.php
  34. +44
    -0
      addons/epay/library/Yansongda/Pay/Gateways/Alipay/ScanGateway.php
  35. +44
    -0
      addons/epay/library/Yansongda/Pay/Gateways/Alipay/TransferGateway.php
  36. +48
    -0
      addons/epay/library/Yansongda/Pay/Gateways/Alipay/WapGateway.php
  37. +46
    -0
      addons/epay/library/Yansongda/Pay/Gateways/Alipay/WebGateway.php
  38. +50
    -0
      addons/epay/library/Yansongda/Pay/Gateways/Wechat/AppGateway.php
  39. +82
    -0
      addons/epay/library/Yansongda/Pay/Gateways/Wechat/GroupredpackGateway.php
  40. +49
    -0
      addons/epay/library/Yansongda/Pay/Gateways/Wechat/MiniappGateway.php
  41. +47
    -0
      addons/epay/library/Yansongda/Pay/Gateways/Wechat/MpGateway.php
  42. +46
    -0
      addons/epay/library/Yansongda/Pay/Gateways/Wechat/PosGateway.php
  43. +86
    -0
      addons/epay/library/Yansongda/Pay/Gateways/Wechat/RedpackGateway.php
  44. +38
    -0
      addons/epay/library/Yansongda/Pay/Gateways/Wechat/ScanGateway.php
  45. +78
    -0
      addons/epay/library/Yansongda/Pay/Gateways/Wechat/TransferGateway.php
  46. +41
    -0
      addons/epay/library/Yansongda/Pay/Gateways/Wechat/WapGateway.php
  47. +69
    -0
      addons/epay/library/Yansongda/Pay/Gateways/Wechat/WebGateway.php
  48. +354
    -0
      addons/epay/library/Yansongda/Pay/Gateways/Wechat/Wechat.php
  49. +134
    -0
      addons/epay/library/Yansongda/Pay/Pay.php
  50. +147
    -0
      addons/epay/library/Yansongda/Pay/Support/Config.php
  51. +119
    -0
      addons/epay/library/Yansongda/Pay/Traits/HasHttpRequest.php
  52. +86
    -0
      addons/epay/view/api/wechat.html
  53. +212
    -0
      addons/epay/view/index/index.html
  54. +115
    -0
      addons/epay/view/layout/default.html
  55. +2
    -1
      application/extra/addons.php
  56. +91
    -0
      public/assets/addons/epay/css/common.css
  57. +20
    -0
      public/assets/addons/epay/css/epay.css
  58. +100
    -0
      public/assets/addons/epay/css/wechat.css
  59. BIN
      public/assets/addons/epay/images/alipay.png
  60. BIN
      public/assets/addons/epay/images/expired.png
  61. BIN
      public/assets/addons/epay/images/logo-alipay.png
  62. BIN
      public/assets/addons/epay/images/logo-wechat.png
  63. BIN
      public/assets/addons/epay/images/logo.png
  64. BIN
      public/assets/addons/epay/images/paid.png
  65. BIN
      public/assets/addons/epay/images/scan.png
  66. BIN
      public/assets/addons/epay/images/tips.png
  67. BIN
      public/assets/addons/epay/images/wechat.png
  68. +52
    -0
      public/assets/addons/epay/js/common.js
  69. +113
    -0
      public/assets/addons/epay/less/common.less
  70. +28
    -0
      public/assets/addons/epay/less/epay.less
  71. +0
    -4
      runtime/cache/4e/819c837d54a6ed09abc77a8560a66f.php
  72. +0
    -8
      runtime/cache/cb/78ef4a9130f39208ff10858ddd8377.php
  73. +0
    -1954
      runtime/log/202007/10.log
  74. +0
    -624
      runtime/log/202007/11.log
  75. +0
    -1294
      runtime/log/202008/27.log
  76. +0
    -97
      runtime/temp/1c87dbfb971a6c4fcc8d052effdebfe7.php
  77. +0
    -356
      runtime/temp/427a4182b202828e9f9afa9e250c5079.php
  78. +0
    -276
      runtime/temp/483ec8a59636df7a935a0ca16d447796.php
  79. +0
    -124
      runtime/temp/55a3fb71333a8a6df11d7c7ffd74691d.php
  80. +0
    -276
      runtime/temp/7aad3da33b80c4ebe7ec1de4bfed85bb.php
  81. +0
    -64
      runtime/temp/8773a69671c22197200533d7438817af.php
  82. +0
    -446
      runtime/temp/a658c8e92bad5371712d9ec6d59795e1.php
  83. +0
    -73
      runtime/temp/b8797f3ecfee33def8154075325682b4.php
  84. +0
    -73
      runtime/temp/c035fcc57eeb493a20f61e92abb3b3a6.php
  85. +0
    -446
      runtime/temp/fec14a706bf3c25d44c7f6272eec4fa9.php

+ 2
- 0
a.php View File

@@ -0,0 +1,2 @@
<?php
phpinfo();

+ 65
- 0
addons/epay/Epay.php View File

@@ -0,0 +1,65 @@
<?php

namespace addons\epay;

use app\common\library\Menu;
use think\Addons;
use think\Config;
use think\Loader;

/**
* 微信支付宝整合插件
*/
class Epay extends Addons
{

/**
* 插件安装方法
* @return bool
*/
public function install()
{

return true;
}

/**
* 插件卸载方法
* @return bool
*/
public function uninstall()
{

return true;
}

/**
* 插件启用方法
* @return bool
*/
public function enable()
{

return true;
}

/**
* 插件禁用方法
* @return bool
*/
public function disable()
{

return true;
}

/**
* 添加命名空间
*/
public function appInit()
{
//添加支付包的命名空间
Loader::addNamespace('Yansongda', ADDON_PATH . 'epay' . DS . 'library' . DS . 'Yansongda' . DS);
}

}

+ 91
- 0
addons/epay/assets/css/common.css View File

@@ -0,0 +1,91 @@
/*!
* Start Bootstrap - Modern Business (http://startbootstrap.com/)
* Copyright 2013-2016 Start Bootstrap
* Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap/blob/gh-pages/LICENSE)
*/
/* Global Styles */
html,
body {
height: 100%;
}
body {
padding-top: 50px;
/* Required padding for .navbar-fixed-top. Remove if using .navbar-static-top. Change if height of navigation changes. */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.img-addon {
margin-bottom: 10px;
width: 100%;
}
.img-hover:hover {
opacity: 0.8;
}
.display-1 {
font-size: 44px;
}
.display-4 {
font-size: 24px;
line-height: 32px;
}
/* Home Page Carousel */
header.carousel {
height: 50%;
}
header.carousel .item,
header.carousel .item.active,
header.carousel .carousel-inner {
height: 100%;
}
header.carousel .fill {
width: 100%;
height: 100%;
}
.error-404 {
font-size: 100px;
}
/* Pricing Page Styles */
.price {
display: block;
font-size: 50px;
line-height: 50px;
}
.price sup {
top: -20px;
left: 2px;
font-size: 20px;
}
.period {
display: block;
font-style: italic;
}
/* Footer Styles */
footer {
margin: 50px 0;
}
/* Responsive Styles */
@media (max-width: 991px) {
.customer-img,
.img-related {
margin-bottom: 30px;
}
}
@media (max-width: 767px) {
.img-addon {
margin-bottom: 15px;
}
header.carousel .carousel {
height: 70%;
}
}
.carousel-body {
position: absolute;
width: 100%;
top: 25%;
text-align: center;
color: #fff;
}
.addonlist a > p {
margin-bottom: 15px;
}

+ 20
- 0
addons/epay/assets/css/epay.css View File

@@ -0,0 +1,20 @@
@import url("../../../css/bootstrap.min.css");
@import url("../../../libs/font-awesome/css/font-awesome.min.css");
html,
body {
height: 100%;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 400;
overflow-x: hidden;
overflow-y: auto;
background: #f4f6f8;
font-size: 14px;
color: #616161;
}
.container {
max-width: 850px;
margin: 0 auto;
padding: 50px;
}

+ 100
- 0
addons/epay/assets/css/wechat.css View File

@@ -0,0 +1,100 @@
.wechat {
margin-top: 30px;
}

.wechat h2 {
margin: 0 0 15px 0;
padding-bottom: 15px;
border-bottom: 1px solid #eee;
position: relative;
}

.wechat-body {
}

.wechat-qrcode {
margin-bottom: 20px;
position: relative;
}

.wechat-qrcode img {
width: 100%;
border: 1px solid #eee;
}

.wechat-qrcode .expired {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
opacity: .95;
background: #fff url(../images/expired.png) center center no-repeat;
}

.wechat-qrcode .paid {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
opacity: .95;
background: #fff url(../images/paid.png) center center no-repeat;
}

.wechat-scan {
padding: 0;
}

.wechat-scan img {
width: 100%;
}

.wechat-tips {
height: 60px;
padding: 8px 0 8px 125px;
background: #00c800 url(../images/scan.png) 50px 12px no-repeat;
background-size: 36px 36px;
}

.wechat-tips p {
margin: 0;
font-size: 14px;
line-height: 22px;
color: #fff;
font-weight: 700
}

.wechat-time {
font-size: 14px;
margin-bottom: 15px;
position: absolute;
top: 15px;
right: 10px;
font-weight: normal;
display: none;
}

.wechat-time span {
color: red;
}

.wechat-order {
margin-bottom: 5px;
}

.wechat-order em {
font-style: normal;
color: #666;
}

.wechat-order em.wechat-price {
color: #ff3333;
font-weight: bold;
}

@media (max-width: 767px) {
.wechat {
margin-top: 20px;
}
}

BIN
addons/epay/assets/images/alipay.png View File

Before After
Width: 136  |  Height: 48  |  Size: 3.6 KiB

BIN
addons/epay/assets/images/expired.png View File

Before After
Width: 63  |  Height: 48  |  Size: 4.6 KiB

BIN
addons/epay/assets/images/logo-alipay.png View File

Before After
Width: 48  |  Height: 48  |  Size: 1.6 KiB

BIN
addons/epay/assets/images/logo-wechat.png View File

Before After
Width: 48  |  Height: 48  |  Size: 1.7 KiB

BIN
addons/epay/assets/images/logo.png View File

Before After
Width: 440  |  Height: 98  |  Size: 23 KiB

BIN
addons/epay/assets/images/paid.png View File

Before After
Width: 48  |  Height: 48  |  Size: 2.2 KiB

BIN
addons/epay/assets/images/scan.png View File

Before After
Width: 64  |  Height: 64  |  Size: 922 B

BIN
addons/epay/assets/images/tips.png View File

Before After
Width: 329  |  Height: 421  |  Size: 21 KiB

BIN
addons/epay/assets/images/wechat.png View File

Before After
Width: 158  |  Height: 48  |  Size: 22 KiB

+ 52
- 0
addons/epay/assets/js/common.js View File

@@ -0,0 +1,52 @@
$(function () {
$('.carousel').carousel({
interval: 5000 //changes the speed
});
$(".btn-experience").on("click", function () {
location.href = "/addons/epay/index/experience?amount=" + $("input[name=amount]").val() + "&type=" + $(this).data("type") + "&method=" + $("#method").val();
});

var si, xhr;
if (typeof queryParams != 'undefined') {
var queryResult = function () {
xhr && xhr.abort();
xhr = $.ajax({
url: "",
type: "post",
data: queryParams,
dataType: 'json',
success: function (ret) {
if (ret.code == 1) {
var data = ret.data;
console.log(data);
if (typeof data.trade_state != 'undefined') {
if (data.trade_state == 'SUCCESS') {
$(".wechat-qrcode .paid").removeClass("hidden");
$(".wechat-tips p").html("支付成功!<br>3秒后将自动跳转...");
setTimeout(function () {
location.href = queryParams.return_url;
}, 3000);
clearInterval(si);
} else if (data.trade_state == 'REFUND') {
$(".wechat-tips p").html("请求失败!<br>请返回重新发起支付");
clearInterval(si);
} else if (data.trade_state == 'NOTPAY') {
} else if (data.trade_state == 'CLOSED') {
$(".wechat-tips p").html("订单已关闭!<br>请返回重新发起支付");
clearInterval(si);
} else if (data.trade_state == 'USERPAYING') {
} else if (data.trade_state == 'PAYERROR') {
clearInterval(si);
}
}
}
}
});
};
si = setInterval(function () {
queryResult();
}, 3000);
queryResult();
}

});

+ 113
- 0
addons/epay/assets/less/common.less View File

@@ -0,0 +1,113 @@
/*!
* Start Bootstrap - Modern Business (http://startbootstrap.com/)
* Copyright 2013-2016 Start Bootstrap
* Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap/blob/gh-pages/LICENSE)
*/

/* Global Styles */

html,
body {
height: 100%;
}

body {
padding-top: 50px; /* Required padding for .navbar-fixed-top. Remove if using .navbar-static-top. Change if height of navigation changes. */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;

}

.img-addon {
margin-bottom: 10px;
width:100%;
}

.img-hover:hover {
opacity: 0.8;
}

.display-1 {
font-size:44px;
}
.display-4 {
font-size:24px;
line-height:32px;
}

/* Home Page Carousel */

header.carousel {
height: 50%;
}

header.carousel .item,
header.carousel .item.active,
header.carousel .carousel-inner {
height: 100%;
}

header.carousel .fill {
width: 100%;
height: 100%;
}

.error-404 {
font-size: 100px;
}

/* Pricing Page Styles */

.price {
display: block;
font-size: 50px;
line-height: 50px;
}

.price sup {
top: -20px;
left: 2px;
font-size: 20px;
}

.period {
display: block;
font-style: italic;
}

/* Footer Styles */

footer {
margin: 50px 0;
}

/* Responsive Styles */

@media(max-width:991px) {
.customer-img,
.img-related {
margin-bottom: 30px;
}
}

@media(max-width:767px) {
.img-addon {
margin-bottom: 15px;
}

header.carousel .carousel {
height: 70%;
}
}
.carousel-body {
position:absolute;
width: 100%;
top:25%;
text-align:center;
color:#fff;
}

.addonlist a > p{
margin-bottom:15px;
}

+ 28
- 0
addons/epay/assets/less/epay.less View File

@@ -0,0 +1,28 @@
@import (reference) "../../../../public/assets/less/bootstrap-less/mixins.less";
@import (reference) "../../../../public/assets/less/bootstrap-less/variables.less";
@import (reference) "../../../../public/assets/less/fastadmin/mixins.less";
@import (reference) "../../../../public/assets/less/fastadmin/variables.less";
@import "../../../../public/assets/less/lesshat.less";
@import url("../../../css/bootstrap.min.css");
@import url("../../../libs/font-awesome/css/font-awesome.min.css");

html,
body {
height: 100%;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 400;
overflow-x: hidden;
overflow-y: auto;
background: #f4f6f8;
font-size: 14px;
color: #616161;

}

.container {
max-width: 850px;
margin: 0 auto;
padding:50px;
}

+ 0
- 0
addons/epay/certs/apiclient_cert.pem View File


+ 0
- 0
addons/epay/certs/apiclient_key.pem View File


+ 69
- 0
addons/epay/config.php View File

@@ -0,0 +1,69 @@
<?php

return array (
0 =>
array (
'name' => 'wechat',
'title' => '微信',
'type' => 'array',
'content' =>
array (
),
'value' =>
array (
'appid' => '',
'app_id' => '',
'app_secret' => '',
'miniapp_id' => '',
'mch_id' => '',
'key' => '',
'notify_url' => '/addons/epay/api/notifyx/type/wechat',
'cert_client' => '/epay/certs/apiclient_cert.pem',
'cert_key' => '/epay/certs/apiclient_key.pem',
'log' => 1,
),
'rule' => '',
'msg' => '',
'tip' => '微信参数配置',
'ok' => '',
'extend' => '',
),
1 =>
array (
'name' => 'alipay',
'title' => '支付宝',
'type' => 'array',
'content' =>
array (
),
'value' =>
array (
'app_id' => '2016102100728544',
'notify_url' => '/addons/epay/api/notifyx/type/alipay',
'return_url' => '/addons/epay/api/returnx/type/alipay',
'ali_public_key' => 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuWLcTZsd8mWDJ12rPJrog3/0o0toQqOxf8boG9WeVQ+aUyA7AD6j46xFJgdDlTVqMoOn2ywsaa6rnPtQ06rhSmTgGsLKCNHGfkP4FkAQNa/2LGHYhe4dQ/aek75KjzR4Gabnv0QtgMabIMUcM1c4bbQBo2dSHVL8FExFBLK1jiXIRhyFMA+llD2Ir341Q3Mls5DWuXoTmx+NXlcjwOuN2/u7zsSvCdxGWX8wkkY2is+IKMZ5ODUg72toSCMCr76exkWFlzp4b9WsXPtMei3XZpX4jQk6gy0gu8cAo3R7DpYMxIjNaP4YXOL6i/xTj9ps1S5JBnX5VskZSswXVQe55QIDAQAB',
'private_key' => 'MIIEpQIBAAKCAQEAuWLcTZsd8mWDJ12rPJrog3/0o0toQqOxf8boG9WeVQ+aUyA7AD6j46xFJgdDlTVqMoOn2ywsaa6rnPtQ06rhSmTgGsLKCNHGfkP4FkAQNa/2LGHYhe4dQ/aek75KjzR4Gabnv0QtgMabIMUcM1c4bbQBo2dSHVL8FExFBLK1jiXIRhyFMA+llD2Ir341Q3Mls5DWuXoTmx+NXlcjwOuN2/u7zsSvCdxGWX8wkkY2is+IKMZ5ODUg72toSCMCr76exkWFlzp4b9WsXPtMei3XZpX4jQk6gy0gu8cAo3R7DpYMxIjNaP4YXOL6i/xTj9ps1S5JBnX5VskZSswXVQe55QIDAQABAoIBAGV3ZJjdU7C+OuCq9fQ/3Q9MU3uk5DXFHnuPRK8nZnesCI2C0Ig7wLv2KAq+YxEhoTRwtsjRDqXxQmCzdPPFTXXIbJh5ENdu6bNmRDz5Z2XbH2P/UeFMCJyQOQ8oUeq7jxiLL8CR8k3PZkyzVdIL5Qi2Q0dKX7lJGEuLyyLdJV3dA/e0eXTAX7XsihNeNh5maEkzmA/yS51MJM/nd9hl1TTAZpzJyuDwrM9jB88XWqM/URoedIIVZZI47KW1lGqYXwTYa8QV5ADAsXw/lXHjIMy9bvuoN9EqMSQ4NhfuOLvyueFG+Gt+Wwpaf0mmUL5htuGAXIK3AUoXl5K5uiJxIKkCgYEA9QLjpertX3IIyBbDa0p1z98zV/LvRwWh/K7f4EinyqQHRPBm7BIZtpgOztSdZYE6U6QG3cYzvbWEZ2Erq7ltpc1Yi9/Qjwp4zeUlxriuCp1Yb5/oQ9Xl75KJuPlFFFwkxGIjVwHVSPQYeJ5vqpSD9Ks9waDG5fFKW7wYioE4excCgYEAwbNh2624Dz+1SaAbbQ9wP5ursTGbbmTuz/092zNss9sXtfbmZHhiVGBV8DEygNQvW/1Sdyv+R0Q/TyHYBav8t55ON+AGaJ0KLexmeYqR1ksZ93RdN4bo/0zFel07qFdD+qKX+sKiazsh79liKg3yjuv7iKyVzAFqWHuNDDDk4GMCgYEAiTI2+3+TsDCQzkpA32FwmxgnDgaRCjoTPQVHg7Xrj0NOdsIPP/3avC5ljFfuUxqL6K4e0izcaEyueZ0l8SECTyevf5Oym4aHovO/tYlQm80D6m2mh+XMvdxWlmeu0PnP9M/nbh8uqY1V7qT5bpF/WpBRIo2/Ep+MvdWUAGrfj70CgYEAh9PGF0ml++tssIg5MyzURYZfyw1CNRNJ80ddjMxuuWA1LEBKJsHUEd7L5HZbN8OSwirNHQwYbtkIm/Dbjn6f5BJ6Puw1Ej6s2K8g3LGyulZHiyJqC3nrALtQ7xFZuB4ZaTOC5zB8vDzm+02wbFUDdf08kQaUtE15yTo6GgZfOIkCgYEAgv+VQZMX5cENxdUo2jw7FsNNo8jsK99iLkjri0R4wpP6x2OFZKBe0oqXN+bIGXRhAEU8F11uD1l+nnZhnRjB3P6vB16JNn691DjQf0R4SNECQcVU+BDb2DHG9PywwYcIM2x0idvd2QEYMLukJ0CPk5k5cIjzHE0mgblN2ktnhVg=',
'log' => '1',
),
'rule' => 'required',
'msg' => '',
'tip' => '支付宝参数配置',
'ok' => '',
'extend' => '',
),
2 =>
array (
'name' => '__tips__',
'title' => '温馨提示',
'type' => 'array',
'content' =>
array (
),
'value' => '请注意微信支付证书路径位于/addons/epay/certs目录下,请替换成你自己的证书<br>appid:APP的appid<br>app_id:公众号的appid<br>app_secret:公众号的secret<br>miniapp_id:小程序ID<br>mch_id:微信商户ID<br>key:微信商户支付的密钥',
'rule' => '',
'msg' => '',
'tip' => '微信参数配置',
'ok' => '',
'extend' => '',
),
);

+ 229
- 0
addons/epay/controller/Api.php View File

@@ -0,0 +1,229 @@
<?php

namespace addons\epay\controller;

use addons\epay\library\Service;
use addons\epay\library\Wechat;
use Endroid\QrCode\QrCode;
use think\addons\Controller;
use think\Response;
use think\Session;
use Yansongda\Pay\Pay;

/**
* API接口控制器
*
* @package addons\epay\controller
*/
class Api extends Controller
{

protected $layout = 'default';
protected $config = [];

/**
* 默认方法
*/
public function index()
{
$this->error();
}

/**
* 外部提交
*/
public function submit()
{
$out_trade_no = $this->request->request("out_trade_no");
$title = $this->request->request("title");
$amount = $this->request->request('amount');
$type = $this->request->request('type');
$method = $this->request->request('method', 'web');
$openid = $this->request->request('openid', '');
$auth_code = $this->request->request('auth_code', '');
$notifyurl = $this->request->request('notifyurl', '');
$returnurl = $this->request->request('returnurl', '');

if (!$amount || $amount < 0) {
$this->error("支付金额必须大于0");
}

if (!$type || !in_array($type, ['alipay', 'wechat'])) {
$this->error("支付类型错误");
}

$params = [
'type' => $type,
'out_trade_no' => $out_trade_no,
'title' => $title,
'amount' => $amount,
'method' => $method,
'openid' => $openid,
'auth_code' => $auth_code,
'notifyurl' => $notifyurl,
'returnurl' => $returnurl,
];
return Service::submitOrder($params);
}

/**
* 微信支付
* @return string
*/
public function wechat()
{
$config = Service::getConfig('wechat');

$isWechat = stripos($this->request->server('HTTP_USER_AGENT'), 'MicroMessenger') !== false;
$isMobile = $this->request->isMobile();
$this->view->assign("isWechat", $isWechat);
$this->view->assign("isMobile", $isMobile);

if ($isWechat) {
//发起公众号(jsapi支付)
$orderData = Session::get("wechatorderdata");
$openid = Session::get('openid');
//如果没有openid
if (!$openid) {
$wechat = new Wechat($config['wechat']['app_id'], $config['wechat']['app_secret']);
$openid = $wechat->getOpenid();
}

$orderData['method'] = 'mp';
$orderData['openid'] = $openid;
$payData = Service::submitOrder($orderData);
$payData = json_decode($payData, true);
if (!isset($payData['appId'])) {
$this->error("创建订单失败,请返回重试");
}
$type = 'jsapi';
$this->view->assign("orderData", $orderData);
$this->view->assign("payData", $payData);
} else {
//发起PC支付(Native支付)
$body = $this->request->request("body");
$code_url = $this->request->request("code_url");
$out_trade_no = $this->request->request("out_trade_no");
$return_url = $this->request->request("return_url");
$total_fee = $this->request->request("total_fee");

$sign = $this->request->request("sign");

$data = [
'body' => $body,
'code_url' => $code_url,
'out_trade_no' => $out_trade_no,
'return_url' => $return_url,
'total_fee' => $total_fee,
];
if ($sign != md5(implode('', $data) . $config['wechat']['appid'])) {
$this->error("签名不正确");
}

if ($this->request->isAjax()) {
$pay = new Pay($config);
$result = $pay->driver('wechat')->gateway('scan')->find($out_trade_no);
if ($result['return_code'] == 'SUCCESS' && $result['result_code'] == 'SUCCESS') {
$this->success("", "", ['trade_state' => $result['trade_state']]);
} else {
$this->error("查询失败");
}
}
$data['sign'] = $sign;
$type = 'pc';
$this->view->assign("data", $data);
}

$this->view->assign("type", $type);
$this->view->assign("title", "微信支付");
return $this->view->fetch();
}

/**
* 支付成功回调
*/
public function notifyx()
{
$type = $this->request->param('type');
$data = $this->request->request('', null, 'trim');
$config = Service::getConfig($type);
$pay = new Pay($config);
if (!$pay->driver($type)->gateway()->verify($data)) {
echo '签名错误';
return;
}

//你可以在这里你的业务处理逻辑,比如处理你的订单状态、给会员加余额等等功能
//下面这句必须要执行,且在此之前不能有任何输出
echo "success";
return;
}

/**
* 支付成功返回
*/
public function returnx()
{
$type = $this->request->param('type');
$data = $this->request->request('', null, 'trim');
$config = Service::getConfig($type);
$pay = new Pay($config);
if ($type == 'alipay' && !$pay->driver($type)->gateway()->verify($data)) {
echo '签名错误';
return;
}

//你可以在这里定义你的提示信息,但切记不可在此编写逻辑
$this->success("恭喜你!支付成功!", addon_url("epay/index/index"));

return;
}

/**
* 生成二维码
* @return Response
*/
public function qrcode()
{
$text = $this->request->get('text', 'hello world');
$size = $this->request->get('size', 250);
$padding = $this->request->get('padding', 15);
$errorcorrection = $this->request->get('errorcorrection', 'medium');
$foreground = $this->request->get('foreground', "#ffffff");
$background = $this->request->get('background', "#000000");
$logo = $this->request->get('logo');
$logosize = $this->request->get('logosize');
$label = $this->request->get('label');
$labelfontsize = $this->request->get('labelfontsize');
$labelhalign = $this->request->get('labelhalign');
$labelvalign = $this->request->get('labelvalign');

// 前景色
list($r, $g, $b) = sscanf($foreground, "#%02x%02x%02x");
$foregroundcolor = ['r' => $r, 'g' => $g, 'b' => $b];

// 背景色
list($r, $g, $b) = sscanf($background, "#%02x%02x%02x");
$backgroundcolor = ['r' => $r, 'g' => $g, 'b' => $b];

$qrCode = new QrCode();
$qrCode
->setText($text)
->setSize($size)
->setPadding($padding)
->setErrorCorrection($errorcorrection)
->setForegroundColor($foregroundcolor)
->setBackgroundColor($backgroundcolor)
->setLogoSize($logosize)
->setLabelFontPath(ROOT_PATH . 'public/assets/fonts/Times New Roman.ttf')
->setLabel($label)
->setLabelFontSize($labelfontsize)
->setLabelHalign($labelhalign)
->setLabelValign($labelvalign)
->setImageType(QrCode::IMAGE_TYPE_PNG);
//也可以直接使用render方法输出结果
//$qrCode->render();
return new Response($qrCode->get(), 200, ['Content-Type' => $qrCode->getContentType()]);
}

}

+ 108
- 0
addons/epay/controller/Index.php View File

@@ -0,0 +1,108 @@
<?php

namespace addons\epay\controller;

use addons\epay\library\Service;
use fast\Random;
use think\addons\Controller;
use Yansongda\Pay\Log;
use Yansongda\Pay\Pay;
use Exception;

/**
* 微信支付宝插件首页
*
* 此控制器仅用于开发展示说明和体验,建议自行添加一个新的控制器进行处理返回和回调事件,同时删除此控制器文件
*
* Class Index
* @package addons\epay\controller
*/
class Index extends Controller
{

protected $layout = 'default';

protected $config = [];

public function _initialize()
{
parent::_initialize();
}

public function index()
{
$this->view->assign("title", "FastAdmin微信支付宝整合插件");
return $this->view->fetch();
}

/**
* 体验,仅供开发测试
*/
public function experience()
{
$amount = $this->request->request('amount');
$type = $this->request->request('type');
$method = $this->request->request('method');

if (!$amount || $amount < 0) {
$this->error("支付金额必须大于0");
}

if (!$type || !in_array($type, ['alipay', 'wechat'])) {
$this->error("支付类型不能为空");
}

//订单号
$out_trade_no = date("YmdHis") . mt_rand(100000, 999999);

//订单标题
$title = 'FastAdmin测试订单';

//回调链接
$notifyurl = $this->request->root(true) . '/addons/epay/index/notifyx/paytype/' . $type;
$returnurl = $this->request->root(true) . '/addons/epay/index/returnx/paytype/' . $type . '/out_trade_no/' . $out_trade_no;

return Service::submitOrder($amount, $out_trade_no, $type, $title, $notifyurl, $returnurl, $method);
}

/**
* 支付成功,仅供开发测试
*/
public function notifyx()
{
$paytype = $this->request->param('paytype');
$pay = \addons\epay\library\Service::checkNotify($paytype);
if (!$pay) {
echo '签名错误';
return;
}
$data = $pay->verify();
try {
$payamount = $paytype == 'alipay' ? $data['total_amount'] : $data['total_fee'] / 100;
$out_trade_no = $data['out_trade_no'];

//你可以在此编写订单逻辑
} catch (Exception $e) {
}
echo $pay->success();
}

/**
* 支付返回,仅供开发测试
*/
public function returnx()
{
$paytype = $this->request->param('paytype');
$out_trade_no = $this->request->param('out_trade_no');
$pay = \addons\epay\library\Service::checkReturn($paytype);
if (!$pay) {
$this->error('签名错误');
}

//你可以在这里通过out_trade_no去验证订单状态
//但是不可以在此编写订单逻辑!!!

$this->success("请返回网站查看支付结果", addon_url("epay/index/index"));
}

}

+ 8
- 0
addons/epay/info.ini View File

@@ -0,0 +1,8 @@
name = epay
title = 微信支付宝整合
intro = 可用于整合微信、支付宝付款,快速整合FastAdmin的其它模块
author = Karson
website = https://www.fastadmin.net
version = 1.0.5
state = 1
url = /addons/epay.html

+ 17
- 0
addons/epay/library/OrderException.php View File

@@ -0,0 +1,17 @@
<?php

namespace addons\epay\library;


use think\Exception;

class OrderException extends Exception
{
public function __construct($message = "", $code = 0, $data = [])
{
$this->message = $message;
$this->code = $code;
$this->data = $data;
}

}

+ 267
- 0
addons/epay/library/Service.php View File

@@ -0,0 +1,267 @@
<?php

namespace addons\epay\library;

use Exception;
use think\Log;
use think\Response;
use think\Session;
use Yansongda\Pay\Pay;

/**
* 订单服务类
*
* @package addons\epay\library
*/
class Service
{

public static function submitOrder($amount, $orderid = null, $type = null, $title = null, $notifyurl = null, $returnurl = null, $method = null)
{
if (!is_array($amount)) {
$params = [
'amount' => $amount,
'orderid' => $orderid,
'type' => $type,
'title' => $title,
'notifyurl' => $notifyurl,
'returnurl' => $returnurl,
'method' => $method,
];
} else {
$params = $amount;
}
$type = isset($params['type']) && in_array($params['type'], ['alipay', 'wechat']) ? $params['type'] : 'wechat';
$method = isset($params['method']) ? $params['method'] : 'web';
$orderid = isset($params['orderid']) ? $params['orderid'] : date("YmdHis") . mt_rand(100000, 999999);
$amount = isset($params['amount']) ? $params['amount'] : 1;
$title = isset($params['title']) ? $params['title'] : "支付";
$auth_code = isset($params['auth_code']) ? $params['auth_code'] : '';
$openid = isset($params['openid']) ? $params['openid'] : '';

$request = request();
$notifyurl = isset($params['notifyurl']) ? $params['notifyurl'] : $request->root(true) . '/addons/epay/index/' . $type . 'notify';
$returnurl = isset($params['returnurl']) ? $params['returnurl'] : $request->root(true) . '/addons/epay/index/' . $type . 'return/out_trade_no/' . $orderid;
$html = '';
$config = Service::getConfig($type);
$config[$type]['notify_url'] = $notifyurl;
$config[$type]['return_url'] = $returnurl;

if ($type == 'alipay') {
//创建支付对象
$pay = new Pay($config);
//支付宝支付,请根据你的需求,仅选择你所需要的即可
$params = [
'out_trade_no' => $orderid,//你的订单号
'total_amount' => $amount,//单位元
'subject' => $title,
];
//如果是移动端自动切换为wap
$method = $request->isMobile() ? 'wap' : $method;

switch ($method) {
case 'web':
//电脑支付,跳转
$html = $pay->driver($type)->gateway('web')->pay($params);
Response::create($html)->send();
break;
case 'wap':
//手机网页支付,跳转
$html = $pay->driver($type)->gateway('wap')->pay($params);
Response::create($html)->send();
break;
case 'app':
//APP支付,直接返回字符串
$html = $pay->driver($type)->gateway('app')->pay($params);
break;
case 'scan':
//扫码支付,直接返回字符串
$html = $pay->driver($type)->gateway('scan')->pay($params);
break;
case 'pos':
//刷卡支付,直接返回字符串
//刷卡支付必须要有auth_code
$params['auth_code'] = $auth_code;
$html = $pay->driver($type)->gateway('pos')->pay($params);
break;
default:
//其它支付类型请参考:https://docs.pay.yansongda.cn/alipay
}
} else {
//如果是PC支付,判断当前环境,进行跳转
if ($method == 'web') {
if ((strpos($request->server('HTTP_USER_AGENT'), 'MicroMessenger') !== false)) {
Session::delete("openid");
Session::set("wechatorderdata", $params);
$url = addon_url('epay/api/wechat', [], true, true);
header("location:{$url}");
exit;
} elseif ($request->isMobile()) {
$method = 'wap';
}
}

//创建支付对象
$pay = new Pay($config);
$params = [
'out_trade_no' => $orderid,//你的订单号
'body' => $title,
'total_fee' => $amount * 100, //单位分
];
switch ($method) {
case 'web':
//电脑支付,跳转到自定义展示页面(FastAdmin独有)
$html = $pay->driver($type)->gateway('web')->pay($params);
Response::create($html)->send();
break;
case 'mp':
//公众号支付
//公众号支付必须有openid
$params['openid'] = $openid;
$html = $pay->driver($type)->gateway('mp')->pay($params);
break;
case 'wap':
//手机网页支付,跳转
$params['spbill_create_ip'] = $request->ip(0, false);
$html = $pay->driver($type)->gateway('wap')->pay($params);
header("location:{$html}");
exit;
break;
case 'app':
//APP支付,直接返回字符串
$html = $pay->driver($type)->gateway('app')->pay($params);
break;
case 'scan':
//扫码支付,直接返回字符串
$html = $pay->driver($type)->gateway('scan')->pay($params);
break;
case 'pos':
//刷卡支付,直接返回字符串
//刷卡支付必须要有auth_code
$params['auth_code'] = $auth_code;
$html = $pay->driver($type)->gateway('pos')->pay($params);
break;
case 'miniapp':
//小程序支付,直接返回字符串
//小程序支付必须要有openid
$params['openid'] = $openid;
$html = $pay->driver($type)->gateway('miniapp')->pay($params);
break;
default:
}
}
//返回字符串
$html = is_array($html) ? json_encode($html) : $html;
return $html;
}

/**
* 创建支付对象
* @param string $type 支付类型
* @param array $config 配置信息
* @return bool
*/
public static function createPay($type, $config = [])
{
$type = strtolower($type);
if (!in_array($type, ['wechat', 'alipay'])) {
return false;
}
$config = self::getConfig($type);
$config = array_merge($config[$type], $config);
$pay = new Pay($config);
return $pay;
}

/**
* 验证回调是否成功
* @param string $type 支付类型
* @param array $config 配置信息
* @return bool|Pay
*/
public static function checkNotify($type, $config = [])
{
$type = strtolower($type);
if (!in_array($type, ['wechat', 'alipay'])) {
return false;
}
try {
$pay = new Pay(self::getConfig($type));
$data = $type == 'wechat' ? file_get_contents("php://input") : request()->post('', null, 'trim');

$data = $pay->driver($type)->gateway()->verify($data);

if ($type == 'alipay') {
if (in_array($data['trade_status'], ['TRADE_SUCCESS', 'TRADE_FINISHED'])) {
return $pay;
}
} else {
return $pay;
}
} catch (Exception $e) {
return false;
}

return false;
}

/**
* 验证返回是否成功
* @param string $type 支付类型
* @param array $config 配置信息
* @return bool|Pay
*/
public static function checkReturn($type, $config = [])
{
$type = strtolower($type);
if (!in_array($type, ['wechat', 'alipay'])) {
return false;
}
//微信无需验证
if ($type == 'wechat') {
return true;
}
try {
$pay = new Pay(self::getConfig($type));
$data = $type == 'wechat' ? file_get_contents("php://input") : request()->get('', null, 'trim');
$data = $pay->driver($type)->gateway()->verify($data);
if ($data) {
return $pay;
}
} catch (Exception $e) {
return false;
}

return false;
}

/**
* 获取配置
* @param string $type 支付类型
* @return array|mixed
*/
public static function getConfig($type = 'wechat')
{
$config = get_addon_config('epay');
$config = isset($config[$type]) ? $config[$type] : $config['wechat'];
if ($config['log']) {
$config['log'] = [
'file' => LOG_PATH . '/epaylogs/' . $type . '-' . date("Y-m-d") . '.log',
'level' => 'debug'
];
}
if (isset($config['cert_client']) && substr($config['cert_client'], 0, 6) == '/epay/') {
$config['cert_client'] = ADDON_PATH . $config['cert_client'];
}
if (isset($config['cert_key']) && substr($config['cert_key'], 0, 6) == '/epay/') {
$config['cert_key'] = ADDON_PATH . $config['cert_key'];
}

$config['notify_url'] = empty($config['notify_url']) ? addon_url('epay/api/notifyx', [], false) . '/type/' . $type : $config['notify_url'];
$config['notify_url'] = !preg_match("/^(http:\/\/|https:\/\/)/i", $config['notify_url']) ? request()->root(true) . $config['notify_url'] : $config['notify_url'];
$config['return_url'] = empty($config['return_url']) ? addon_url('epay/api/returnx', [], false) . '/type/' . $type : $config['return_url'];
$config['return_url'] = !preg_match("/^(http:\/\/|https:\/\/)/i", $config['return_url']) ? request()->root(true) . $config['return_url'] : $config['return_url'];
return [$type => $config];
}

}

+ 107
- 0
addons/epay/library/Wechat.php View File

@@ -0,0 +1,107 @@
<?php

namespace addons\epay\library;

use fast\Http;
use think\Cache;
use think\Session;

/**
* 微信授权
*
*/
class Wechat
{
private $app_id = '';
private $app_secret = '';
private $scope = 'snsapi_userinfo';

public function __construct($app_id, $app_secret)
{
$this->app_id = $app_id;
$this->app_secret = $app_secret;
}

/**
* 获取微信授权链接
*
* @return string
*/
public function getAuthorizeUrl()
{
$redirect_uri = addon_url('epay/api/wechat', [], true, true);
$redirect_uri = urlencode($redirect_uri);
$state = \fast\Random::alnum();
Session::set('state', $state);
return "https://open.weixin.qq.com/connect/oauth2/authorize?appid={$this->app_id}&redirect_uri={$redirect_uri}&response_type=code&scope={$this->scope}&state={$state}#wechat_redirect";
}

/**
* 获取微信openid
*
* @return mixed|string
*/
public function getOpenid()
{
$openid = Session::get('openid');
if (!$openid) {
if (!isset($_GET['code'])) {
$url = $this->getAuthorizeUrl();

Header("Location: $url");
exit();
} else {
$state = Session::get('state');
if ($state == $_GET['state']) {
$code = $_GET['code'];
$token = $this->getAccessToken($code);
$openid = isset($token['openid']) ? $token['openid'] : '';
if ($openid) {
Session::set("openid", $openid);
}
}
}
}
return $openid;
}

/**
* 获取授权token网页授权
*
* @param string $code
* @return mixed|string
*/
public function getAccessToken($code = '')
{
$params = [
'appid' => $this->app_id,
'secret' => $this->app_secret,
'code' => $code,
'grant_type' => 'authorization_code'
];
$ret = Http::sendRequest('https://api.weixin.qq.com/sns/oauth2/access_token', $params, 'GET');
if ($ret['ret']) {
$ar = json_decode($ret['msg'], true);
return $ar;
}
return [];
}

public function getJsticket()
{
$jsticket = Session::get('jsticket');
if (!$jsticket) {
$token = $this->getAccessToken($code);
$params = [
'access_token' => 'token',
'type' => 'jsapi',
];
$ret = Http::sendRequest('https://api.weixin.qq.com/cgi-bin/ticket/getticket', $params, 'GET');
if ($ret['ret']) {
$ar = json_decode($ret['msg'], true);
return $ar;
}
}
return $jsticket;
}
}

+ 63
- 0
addons/epay/library/Yansongda/Pay/Contracts/GatewayInterface.php View File

@@ -0,0 +1,63 @@
<?php

namespace Yansongda\Pay\Contracts;

interface GatewayInterface
{
/**
* pay a order.
*
* @author yansongda <me@yansongda.cn>
*
* @param array $config_biz
*
* @return mixed
*/
public function pay(array $config_biz);

/**
* refund a order.
*
* @author yansongda <me@yansongda.cn>
*
* @param array|string $config_biz
*
* @return array|bool
*/
public function refund($config_biz);

/**
* close a order.
*
* @author yansongda <me@yansongda.cn>
*
* @param array|string $config_biz
*
* @return array|bool
*/
public function close($config_biz);

/**
* find a order.
*
* @author yansongda <me@yansongda.cn>
*
* @param string $out_trade_no
*
* @return array|bool
*/
public function find($out_trade_no);

/**
* verify notify.
*
* @author yansongda <me@yansongda.cn>
*
* @param mixed $data
* @param string $sign
* @param bool $sync
*
* @return array|bool
*/
public function verify($data, $sign = null, $sync = false);
}

+ 7
- 0
addons/epay/library/Yansongda/Pay/Exceptions/Exception.php View File

@@ -0,0 +1,7 @@
<?php

namespace Yansongda\Pay\Exceptions;

class Exception extends \Exception
{
}

+ 28
- 0
addons/epay/library/Yansongda/Pay/Exceptions/GatewayException.php View File

@@ -0,0 +1,28 @@
<?php

namespace Yansongda\Pay\Exceptions;

class GatewayException extends Exception
{
/**
* error raw data.
*
* @var array
*/
public $raw = [];

/**
* [__construct description].
*
* @author JasonYan <me@yansongda.cn>
*
* @param string $message
* @param string|int $code
*/
public function __construct($message, $code, $raw = [])
{
parent::__construct($message, intval($code));

$this->raw = $raw;
}
}

+ 7
- 0
addons/epay/library/Yansongda/Pay/Exceptions/InvalidArgumentException.php View File

@@ -0,0 +1,7 @@
<?php

namespace Yansongda\Pay\Exceptions;

class InvalidArgumentException extends \InvalidArgumentException
{
}

+ 291
- 0
addons/epay/library/Yansongda/Pay/Gateways/Alipay/Alipay.php View File

@@ -0,0 +1,291 @@
<?php

namespace Yansongda\Pay\Gateways\Alipay;

use Yansongda\Pay\Contracts\GatewayInterface;
use Yansongda\Pay\Exceptions\GatewayException;
use Yansongda\Pay\Exceptions\InvalidArgumentException;
use Yansongda\Pay\Support\Config;
use Yansongda\Pay\Traits\HasHttpRequest;

abstract class Alipay implements GatewayInterface
{
use HasHttpRequest;

/**
* @var string
*/
protected $gateway = 'https://openapi.alipay.com/gateway.do?charset=UTF-8';

/**
* alipay global config params.
*
* @var array
*/
protected $config;

/**
* user's config params.
*
* @var \Yansongda\Pay\Support\Config
*/
protected $user_config;

/**
* [__construct description].
*
* @author yansongda <me@yansongda.cn>
*
* @param array $config [description]
*/
public function __construct(array $config)
{
$this->user_config = new Config($config);

if (is_null($this->user_config->get('app_id'))) {
throw new InvalidArgumentException('Missing Config -- [app_id]');
}

$this->config = [
'app_id' => $this->user_config->get('app_id'),
'method' => '',
'format' => 'JSON',
'charset' => 'UTF-8',
'sign_type' => 'RSA2',
'version' => '1.0',
'return_url' => $this->user_config->get('return_url', ''),
'notify_url' => $this->user_config->get('notify_url', ''),
'timestamp' => date('Y-m-d H:i:s'),
'sign' => '',
'biz_content' => '',
];
}

/**
* pay a order.
*
* @author yansongda <me@yansongda.cn>
*
* @param array $config_biz
*
* @return mixed
*/
public function pay(array $config_biz)
{
$config_biz['product_code'] = $this->getProductCode();

$this->config['method'] = $this->getMethod();
$this->config['biz_content'] = json_encode($config_biz);
$this->config['sign'] = $this->getSign();
}

/**
* refund a order.
*
* @author yansongda <me@yansongda.cn>
*
* @param mixed $config_biz
*
* @return array|bool
*/
public function refund($config_biz, $refund_amount = null)
{
if (!is_array($config_biz)) {
$config_biz = [
'out_trade_no' => $config_biz,
'refund_amount' => $refund_amount,
];
}

return $this->getResult($config_biz, 'alipay.trade.refund');
}

/**
* close a order.
*
* @author yansongda <me@yansongda.cn>
*
* @param array|string $config_biz
*
* @return array|bool
*/
public function close($config_biz)
{
if (!is_array($config_biz)) {
$config_biz = [
'out_trade_no' => $config_biz,
];
}

return $this->getResult($config_biz, 'alipay.trade.close');
}

/**
* find a order.
*
* @author yansongda <me@yansongda.cn>
*
* @param string $out_trade_no
*
* @return array|bool
*/
public function find($out_trade_no = '')
{
$config_biz = [
'out_trade_no' => $out_trade_no,
];

return $this->getResult($config_biz, 'alipay.trade.query');
}

/**
* verify the notify.
*
* @author yansongda <me@yansongda.cn>
*
* @param array $data
* @param string $sign
* @param bool $sync
*
* @return array|bool
*/
public function verify($data, $sign = null, $sync = false)
{
if (is_null($this->user_config->get('ali_public_key'))) {
throw new InvalidArgumentException('Missing Config -- [ali_public_key]');
}

$sign = is_null($sign) ? $data['sign'] : $sign;

$res = "-----BEGIN PUBLIC KEY-----\n".
wordwrap($this->user_config->get('ali_public_key'), 64, "\n", true).
"\n-----END PUBLIC KEY-----";

$toVerify = $sync ? json_encode($data) : $this->getSignContent($data, true);

return openssl_verify($toVerify, base64_decode($sign), $res, OPENSSL_ALGO_SHA256) === 1 ? $data : false;
}

/**
* get method config.
*
* @author yansongda <me@yansongda.cn>
*
* @return string
*/
abstract protected function getMethod();

/**
* get productCode config.
*
* @author yansongda <me@yansongda.cn>
*
* @return string
*/
abstract protected function getProductCode();

/**
* build pay html.
*
* @author yansongda <me@yansongda.cn>
*
* @return string
*/
protected function buildPayHtml()
{
$sHtml = "<form id='alipaysubmit' name='alipaysubmit' action='".$this->gateway."' method='POST'>";
foreach ($this->config as $key => $val) {
$val = str_replace("'", '&apos;', $val);
$sHtml .= "<input type='hidden' name='".$key."' value='".$val."'/>";
}
$sHtml .= "<input type='submit' value='ok' style='display:none;'></form>";
$sHtml .= "<script>document.forms['alipaysubmit'].submit();</script>";

return $sHtml;
}

/**
* get alipay api result.
*
* @author yansongda <me@yansongda.cn>
*
* @param array $config_biz
* @param string $method
*
* @return array|bool
*/
protected function getResult($config_biz, $method)
{
$this->config['biz_content'] = json_encode($config_biz);
$this->config['method'] = $method;
$this->config['sign'] = $this->getSign();

$this->config = array_filter($this->config, function ($value) {
return $value !== '' && !is_null($value);
});

$method = str_replace('.', '_', $method).'_response';

$data = json_decode($this->post($this->gateway, $this->config), true);

if (!isset($data[$method]['code']) || $data[$method]['code'] !== '10000') {
throw new GatewayException(
'get result error:'.$data[$method]['msg'].' - '.$data[$method]['sub_code'],
$data[$method]['code'],
$data);
}

return $this->verify($data[$method], $data['sign'], true);
}

/**
* get sign.
*
* @author yansongda <me@yansongda.cn>
*
* @return string
*/
protected function getSign()
{
if (is_null($this->user_config->get('private_key'))) {
throw new InvalidArgumentException('Missing Config -- [private_key]');
}

$res = "-----BEGIN RSA PRIVATE KEY-----\n".
wordwrap($this->user_config->get('private_key'), 64, "\n", true).
"\n-----END RSA PRIVATE KEY-----";

openssl_sign($this->getSignContent($this->config), $sign, $res, OPENSSL_ALGO_SHA256);

return base64_encode($sign);
}

/**
* get signContent that is to be signed.
*
* @author yansongda <me@yansongda.cn>
*
* @param array $toBeSigned
* @param bool $verify
*
* @return string
*/
protected function getSignContent(array $toBeSigned, $verify = false)
{
ksort($toBeSigned);

$stringToBeSigned = '';
foreach ($toBeSigned as $k => $v) {
if ($verify && $k != 'sign' && $k != 'sign_type') {
$stringToBeSigned .= $k.'='.$v.'&';
}
if (!$verify && $v !== '' && !is_null($v) && $k != 'sign' && '@' != substr($v, 0, 1)) {
$stringToBeSigned .= $k.'='.$v.'&';
}
}
$stringToBeSigned = substr($stringToBeSigned, 0, -1);
unset($k, $v);

return $stringToBeSigned;
}
}

+ 46
- 0
addons/epay/library/Yansongda/Pay/Gateways/Alipay/AppGateway.php View File

@@ -0,0 +1,46 @@
<?php

namespace Yansongda\Pay\Gateways\Alipay;

class AppGateway extends Alipay
{
/**
* get method config.
*
* @author yansongda <me@yansongda.cn>
*
* @return string
*/
protected function getMethod()
{
return 'alipay.trade.app.pay';
}

/**
* get productCode method.
*
* @author yansongda <me@yansongda.cn>
*
* @return string
*/
protected function getProductCode()
{
return 'QUICK_MSECURITY_PAY';
}

/**
* pay a order.
*
* @author yansongda <me@yansongda.cn>
*
* @param array $config_biz
*
* @return string
*/
public function pay(array $config_biz = [])
{
parent::pay($config_biz);

return http_build_query($this->config);
}
}

+ 47
- 0
addons/epay/library/Yansongda/Pay/Gateways/Alipay/PosGateway.php View File

@@ -0,0 +1,47 @@
<?php

namespace Yansongda\Pay\Gateways\Alipay;

class PosGateway extends Alipay
{
/**
* get method config.
*
* @author yansongda <me@yansongda.cn>
*
* @return string
*/
protected function getMethod()
{
return 'alipay.trade.pay';
}

/**
* get productCode config.
*
* @author yansongda <me@yansongda.cn>
*
* @return string
*/
protected function getProductCode()
{
return 'FACE_TO_FACE_PAYMENT';
}

/**
* pay a order.
*
* @author yansongda <me@yansongda.cn>
*
* @param array $config_biz
* @param string $scene
*
* @return array|bool
*/
public function pay(array $config_biz = [], $scene = 'bar_code')
{
$config_biz['scene'] = $scene;

return $this->getResult($config_biz, $this->getMethod());
}
}

+ 44
- 0
addons/epay/library/Yansongda/Pay/Gateways/Alipay/ScanGateway.php View File

@@ -0,0 +1,44 @@
<?php

namespace Yansongda\Pay\Gateways\Alipay;

class ScanGateway extends Alipay
{
/**
* get method config.
*
* @author yansongda <me@yansongda.cn>
*
* @return string
*/
protected function getMethod()
{
return 'alipay.trade.precreate';
}

/**
* get productCode config.
*
* @author yansongda <me@yansongda.cn>
*
* @return string
*/
protected function getProductCode()
{
return '';
}

/**
* pay a order.
*
* @author yansongda <me@yansongda.cn>
*
* @param array $config_biz
*
* @return array|bool
*/
public function pay(array $config_biz = [])
{
return $this->getResult($config_biz, $this->getMethod());
}
}

+ 44
- 0
addons/epay/library/Yansongda/Pay/Gateways/Alipay/TransferGateway.php View File

@@ -0,0 +1,44 @@
<?php

namespace Yansongda\Pay\Gateways\Alipay;

class TransferGateway extends Alipay
{
/**
* get method config.
*
* @author yansongda <me@yansongda.cn>
*
* @return string
*/
protected function getMethod()
{
return 'alipay.fund.trans.toaccount.transfer';
}

/**
* get productCode config.
*
* @author yansongda <me@yansongda.cn>
*
* @return string
*/
protected function getProductCode()
{
return '';
}

/**
* transfer amount to account.
*
* @author yansongda <me@yansongda.cn>
*
* @param array $config_biz
*
* @return array|bool
*/
public function pay(array $config_biz = [])
{
return $this->getResult($config_biz, $this->getMethod());
}
}

+ 48
- 0
addons/epay/library/Yansongda/Pay/Gateways/Alipay/WapGateway.php View File

@@ -0,0 +1,48 @@
<?php

namespace Yansongda\Pay\Gateways\Alipay;

class WapGateway extends Alipay
{
/**
* get method config.
*
* @author yansongda <me@yansongda.cn>
*
* @version 2017-08-10
*
* @return string [description]
*/
protected function getMethod()
{
return 'alipay.trade.wap.pay';
}

/**
* get productCode config.
*
* @author yansongda <me@yansongda.cn>
*
* @return string
*/
protected function getProductCode()
{
return 'QUICK_WAP_WAY';
}

/**
* pay a order.
*
* @author yansongda <me@yansongda.cn>
*
* @param array $config_biz
*
* @return string
*/
public function pay(array $config_biz = [])
{
parent::pay($config_biz);

return $this->buildPayHtml();
}
}

+ 46
- 0
addons/epay/library/Yansongda/Pay/Gateways/Alipay/WebGateway.php View File

@@ -0,0 +1,46 @@
<?php

namespace Yansongda\Pay\Gateways\Alipay;

class WebGateway extends Alipay
{
/**
* get method config.
*
* @author yansongda <me@yansongda.cn>
*
* @return string
*/
protected function getMethod()
{
return 'alipay.trade.page.pay';
}

/**
* get productCode config.
*
* @author yansongda <me@yansongda.cn>
*
* @return string
*/
protected function getProductCode()
{
return 'FAST_INSTANT_TRADE_PAY';
}

/**
* pay a order.
*
* @author yansongda <me@yansongda.cn>
*
* @param array $config_biz
*
* @return string
*/
public function pay(array $config_biz = [])
{
parent::pay($config_biz);

return $this->buildPayHtml();
}
}

+ 50
- 0
addons/epay/library/Yansongda/Pay/Gateways/Wechat/AppGateway.php View File

@@ -0,0 +1,50 @@
<?php

namespace Yansongda\Pay\Gateways\Wechat;

use Yansongda\Pay\Exceptions\InvalidArgumentException;

class AppGateway extends Wechat
{
/**
* get trade type config.
*
* @author yansongda <me@yansongda.cn>
*
* @return string
*/
protected function getTradeType()
{
return 'APP';
}

/**
* pay a order.
*
* @author yansongda <me@yansongda.cn>
*
* @param array $config_biz
*
* @return array
*/
public function pay(array $config_biz = [])
{
if (is_null($this->user_config->get('appid'))) {
throw new InvalidArgumentException('Missing Config -- [appid]');
}

$this->config['appid'] = $this->user_config->get('appid');

$payRequest = [
'appid' => $this->user_config->get('appid'),
'partnerid' => $this->user_config->get('mch_id'),
'prepayid' => $this->preOrder($config_biz)['prepay_id'],
'timestamp' => strval(time()),
'noncestr' => $this->createNonceStr(),
'package' => 'Sign=WXPay',
];
$payRequest['sign'] = $this->getSign($payRequest);

return $payRequest;
}
}

+ 82
- 0
addons/epay/library/Yansongda/Pay/Gateways/Wechat/GroupredpackGateway.php View File

@@ -0,0 +1,82 @@
<?php

/**
* 发放裂变红包
* Class GroupredpackGateway
* Date: 2017/12/21
* Time: 19:23
* Com:萌点云科技(深圳)有限公司.
*
* Author:陈老司机
*
* Email:690712575@qq.com
*/

namespace Yansongda\Pay\Gateways\Wechat;

use Yansongda\Pay\Exceptions\GatewayException;
use Yansongda\Pay\Exceptions\InvalidArgumentException;

class GroupredpackGateway extends Wechat
{
/**
* @var string
*/
protected $gateway_transfer = 'mmpaymkttransfers/sendgroupredpack';

/**
* pay a order.
*
* @author yansongda <me@yansongda.cn>
*
* @param array $config_biz
*
* @return mixed
*/
public function pay(array $config_biz = [])
{
if (is_null($this->user_config->get('app_id'))) {
throw new InvalidArgumentException('Missing Config -- [app_id]');
}
unset($this->config['sign_type']);
unset($this->config['trade_type']);
unset($this->config['notify_url']);
unset($this->config['app_id']);
unset($this->config['appid']);
$this->config = array_merge($this->config, $config_biz);
$this->config['sign'] = $this->getSign($this->config);
$data = $this->fromXml($this->post(
$this->endpoint.$this->gateway_transfer,
$this->toXml($this->config),
[
'cert' => $this->user_config->get('cert_client', ''),
'ssl_key' => $this->user_config->get('cert_key', ''),
]
));
if (!isset($data['return_code']) || $data['return_code'] !== 'SUCCESS' || $data['result_code'] !== 'SUCCESS') {
$error = 'getResult error:'.$data['return_msg'];
$error .= isset($data['err_code_des']) ? ' - '.$data['err_code_des'] : '';
}

if (isset($error)) {
throw new GatewayException(
$error,
20000,
$data);
}

return $data;
}

/**
* get trade type config.
*
* @author yansongda <me@yansongda.cn>
*
* @return string
*/
protected function getTradeType()
{
return '';
}
}

+ 49
- 0
addons/epay/library/Yansongda/Pay/Gateways/Wechat/MiniappGateway.php View File

@@ -0,0 +1,49 @@
<?php

namespace Yansongda\Pay\Gateways\Wechat;

use Yansongda\Pay\Exceptions\InvalidArgumentException;

class MiniappGateway extends Wechat
{
/**
* get trade type config.
*
* @author yansongda <me@yansongda.cn>
*
* @return string [description]
*/
protected function getTradeType()
{
return 'JSAPI';
}

/**
* pay a order.
*
* @author yansongda <me@yansongda.cn>
*
* @param array $config_biz
*
* @return array
*/
public function pay(array $config_biz = [])
{
if (is_null($this->user_config->get('miniapp_id'))) {
throw new InvalidArgumentException('Missing Config -- [miniapp_id]');
}

$this->config['appid'] = $this->user_config->get('miniapp_id');

$payRequest = [
'appId' => $this->user_config->get('miniapp_id'),
'timeStamp' => strval(time()),
'nonceStr' => $this->createNonceStr(),
'package' => 'prepay_id='.$this->preOrder($config_biz)['prepay_id'],
'signType' => 'MD5',
];
$payRequest['paySign'] = $this->getSign($payRequest);

return $payRequest;
}
}

+ 47
- 0
addons/epay/library/Yansongda/Pay/Gateways/Wechat/MpGateway.php View File

@@ -0,0 +1,47 @@
<?php

namespace Yansongda\Pay\Gateways\Wechat;

use Yansongda\Pay\Exceptions\InvalidArgumentException;

class MpGateway extends Wechat
{
/**
* get trade type config.
*
* @author yansongda <me@yansongda.cn>
*
* @return string
*/
protected function getTradeType()
{
return 'JSAPI';
}

/**
* pay a order.
*
* @author yansongda <me@yansongda.cn>
*
* @param array $config_biz
*
* @return array
*/
public function pay(array $config_biz = [])
{
if (is_null($this->user_config->get('app_id'))) {
throw new InvalidArgumentException('Missing Config -- [app_id]');
}

$payRequest = [
'appId' => $this->user_config->get('app_id'),
'timeStamp' => strval(time()),
'nonceStr' => $this->createNonceStr(),
'package' => 'prepay_id='.$this->preOrder($config_biz)['prepay_id'],
'signType' => 'MD5',
];
$payRequest['paySign'] = $this->getSign($payRequest);

return $payRequest;
}
}

+ 46
- 0
addons/epay/library/Yansongda/Pay/Gateways/Wechat/PosGateway.php View File

@@ -0,0 +1,46 @@
<?php

namespace Yansongda\Pay\Gateways\Wechat;

use Yansongda\Pay\Exceptions\InvalidArgumentException;

class PosGateway extends Wechat
{
/**
* @var string
*/
protected $gateway_order = 'pay/micropay';

/**
* get trade type config.
*
* @author yansongda <me@yansongda.cn>
*
* @return string
*/
protected function getTradeType()
{
return 'MICROPAY';
}

/**
* pay a order.
*
* @author yansongda <me@yansongda.cn>
*
* @param array $config_biz
*
* @return array
*/
public function pay(array $config_biz = [])
{
if (is_null($this->user_config->get('app_id'))) {
throw new InvalidArgumentException('Missing Config -- [app_id]');
}

unset($this->config['trade_type']);
unset($this->config['notify_url']);

return $this->preOrder($config_biz);
}
}

+ 86
- 0
addons/epay/library/Yansongda/Pay/Gateways/Wechat/RedpackGateway.php View File

@@ -0,0 +1,86 @@
<?php

/**
* 发放普通红包
* Class RedPackGateway
* Date: 2017/12/21
* Time: 19:23
* Com:萌点云科技(深圳)有限公司.
*
* Author:陈老司机
*
* Email:690712575@qq.com
*/

namespace Yansongda\Pay\Gateways\Wechat;

use Yansongda\Pay\Exceptions\GatewayException;
use Yansongda\Pay\Exceptions\InvalidArgumentException;

class RedpackGateway extends Wechat
{
/**
* @var string
*/
protected $gateway_transfer = 'mmpaymkttransfers/sendredpack';

/**
* pay a order.
*
* @author yansongda <me@yansongda.cn>
*
* @param array $config_biz
*
* @return mixed
*/
public function pay(array $config_biz = [])
{
if (is_null($this->user_config->get('app_id'))) {
throw new InvalidArgumentException('Missing Config -- [app_id]');
}
unset($this->config['sign_type']);
unset($this->config['trade_type']);
unset($this->config['notify_url']);
unset($this->config['app_id']);
unset($this->config['appid']);

$this->config = array_merge($this->config, $config_biz);

$this->config['sign'] = $this->getSign($this->config);

$data = $this->fromXml($this->post(
$this->endpoint.$this->gateway_transfer,
$this->toXml($this->config),
[
'cert' => $this->user_config->get('cert_client', ''),
'ssl_key' => $this->user_config->get('cert_key', ''),
]
));

if (!isset($data['return_code']) || $data['return_code'] !== 'SUCCESS' || $data['result_code'] !== 'SUCCESS') {
$error = 'getResult error:'.$data['return_msg'];
$error .= isset($data['err_code_des']) ? ' - '.$data['err_code_des'] : '';
}

if (isset($error)) {
throw new GatewayException(
$error,
20000,
$data);
}

return $data;
}

/**
* get trade type config.
*
* @author yansongda <me@yansongda.cn>
*
* @return string
*/
protected function getTradeType()
{
return '';
}
}

+ 38
- 0
addons/epay/library/Yansongda/Pay/Gateways/Wechat/ScanGateway.php View File

@@ -0,0 +1,38 @@
<?php

namespace Yansongda\Pay\Gateways\Wechat;

use Yansongda\Pay\Exceptions\InvalidArgumentException;

class ScanGateway extends Wechat
{
/**
* get trade type config.
*
* @author yansongda <me@yansongda.cn>
*
* @return string
*/
protected function getTradeType()
{
return 'NATIVE';
}

/**
* pay a order using modelTWO.
*
* @author yansongda <me@yansongda.cn>
*
* @param array $config_biz
*
* @return string
*/
public function pay(array $config_biz = [])
{
if (is_null($this->user_config->get('app_id'))) {
throw new InvalidArgumentException('Missing Config -- [app_id]');
}

return $this->preOrder($config_biz)['code_url'];
}
}

+ 78
- 0
addons/epay/library/Yansongda/Pay/Gateways/Wechat/TransferGateway.php View File

@@ -0,0 +1,78 @@
<?php

namespace Yansongda\Pay\Gateways\Wechat;

use Yansongda\Pay\Exceptions\GatewayException;
use Yansongda\Pay\Exceptions\InvalidArgumentException;

class TransferGateway extends Wechat
{
/**
* @var string
*/
protected $gateway_transfer = 'mmpaymkttransfers/promotion/transfers';

/**
* get trade type config.
*
* @author yansongda <me@yansongda.cn>
*
* @return string
*/
protected function getTradeType()
{
return '';
}

/**
* pay a order.
*
* @author yansongda <me@yansongda.cn>
*
* @param array $config_biz
*
* @return array
*/
public function pay(array $config_biz = [])
{
if (is_null($this->user_config->get('app_id'))) {
throw new InvalidArgumentException('Missing Config -- [app_id]');
}

$config_biz['mch_appid'] = $this->config['appid'];
$config_biz['mchid'] = $this->config['mch_id'];

unset($this->config['appid']);
unset($this->config['mch_id']);
unset($this->config['sign_type']);
unset($this->config['trade_type']);
unset($this->config['notify_url']);

$this->config = array_merge($this->config, $config_biz);

$this->config['sign'] = $this->getSign($this->config);

$data = $this->fromXml($this->post(
$this->endpoint.$this->gateway_transfer,
$this->toXml($this->config),
[
'cert' => $this->user_config->get('cert_client', ''),
'ssl_key' => $this->user_config->get('cert_key', ''),
]
));

if (!isset($data['return_code']) || $data['return_code'] !== 'SUCCESS' || $data['result_code'] !== 'SUCCESS') {
$error = 'getResult error:'.$data['return_msg'];
$error .= isset($data['err_code_des']) ? ' - '.$data['err_code_des'] : '';
}

if (isset($error)) {
throw new GatewayException(
$error,
20000,
$data);
}

return $data;
}
}

+ 41
- 0
addons/epay/library/Yansongda/Pay/Gateways/Wechat/WapGateway.php View File

@@ -0,0 +1,41 @@
<?php

namespace Yansongda\Pay\Gateways\Wechat;

use Yansongda\Pay\Exceptions\InvalidArgumentException;

class WapGateway extends Wechat
{
/**
* get trade type config.
*
* @author yansongda <me@yansongda.cn>
*
* @return string
*/
protected function getTradeType()
{
return 'MWEB';
}

/**
* pay a order.
*
* @author yansongda <me@yansongda.cn>
*
* @param array $config_biz
*
* @return string
*/
public function pay(array $config_biz = [])
{
if (is_null($this->user_config->get('app_id'))) {
throw new InvalidArgumentException('Missing Config -- [app_id]');
}

$data = $this->preOrder($config_biz);

return is_null($this->user_config->get('return_url')) ? $data['mweb_url'] : $data['mweb_url'].
'&redirect_url='.urlencode($this->user_config->get('return_url'));
}
}

+ 69
- 0
addons/epay/library/Yansongda/Pay/Gateways/Wechat/WebGateway.php View File

@@ -0,0 +1,69 @@
<?php

namespace Yansongda\Pay\Gateways\Wechat;

use Yansongda\Pay\Exceptions\InvalidArgumentException;

class WebGateway extends Wechat
{
/**
* get trade type config.
*
* @author yansongda <me@yansongda.cn>
*
* @return string
*/
protected function getTradeType()
{
return 'NATIVE';
}

/**
* pay a order.
*
* @author yansongda <me@yansongda.cn>
*
* @param array $config_biz
*
* @return string
*/
public function pay(array $config_biz = [])
{
if (is_null($this->user_config->get('app_id'))) {
throw new InvalidArgumentException('Missing Config -- [app_id]');
}

$code_url = $this->preOrder($config_biz)['code_url'];
$params = [
'body' => $config_biz['body'],
'code_url' => $code_url,
'out_trade_no' => $config_biz['out_trade_no'],
'return_url' => $this->user_config->get('return_url'),
'total_fee' => $config_biz['total_fee'],
];
$params['sign'] = md5(implode('', $params) . $this->user_config->get('app_id'));
$endpoint = addon_url("epay/api/wechat");

return $this->buildPayHtml($endpoint, $params);
}

/**
* build pay html.
*
* @author yansongda <me@yansongda.cn>
*
* @return string
*/
protected function buildPayHtml($endpoint, $params)
{
$sHtml = "<form id='alipaysubmit' name='wechatsubmit' action='" . $endpoint . "' method='POST'>";
foreach ($params as $key => $val) {
$val = str_replace("'", '&apos;', $val);
$sHtml .= "<input type='hidden' name='" . $key . "' value='" . $val . "'/>";
}
$sHtml .= "<input type='submit' value='ok' style='display:none;'></form>";
$sHtml .= "<script>document.forms['wechatsubmit'].submit();</script>";

return $sHtml;
}
}

+ 354
- 0
addons/epay/library/Yansongda/Pay/Gateways/Wechat/Wechat.php View File

@@ -0,0 +1,354 @@
<?php

namespace Yansongda\Pay\Gateways\Wechat;

use Yansongda\Pay\Contracts\GatewayInterface;
use Yansongda\Pay\Exceptions\GatewayException;
use Yansongda\Pay\Exceptions\InvalidArgumentException;
use Yansongda\Pay\Support\Config;
use Yansongda\Pay\Traits\HasHttpRequest;

abstract class Wechat implements GatewayInterface
{
use HasHttpRequest;

/**
* @var string
*/
protected $endpoint = 'https://api.mch.weixin.qq.com/';

/**
* @var string
*/
protected $gateway_order = 'pay/unifiedorder';

/**
* @var string
*/
protected $gateway_query = 'pay/orderquery';

/**
* @var string
*/
protected $gateway_close = 'pay/closeorder';

/**
* @var string
*/
protected $gateway_refund = 'secapi/pay/refund';

/**
* @var array
*/
protected $config;

/**
* @var \Yansongda\Pay\Support\Config
*/
protected $user_config;

/**
* [__construct description].
*
* @author yansongda <me@yansongda.cn>
*
* @param array $config
*/
public function __construct(array $config)
{
$this->user_config = new Config($config);

$this->config = [
'appid' => $this->user_config->get('app_id', ''),
'mch_id' => $this->user_config->get('mch_id', ''),
'nonce_str' => $this->createNonceStr(),
'sign_type' => 'MD5',
'notify_url' => $this->user_config->get('notify_url', ''),
'trade_type' => $this->getTradeType(),
];

if ($endpoint = $this->user_config->get('endpoint_url')) {
$this->endpoint = $endpoint;
}
}

/**
* pay a order.
*
* @author yansongda <me@yansongda.cn>
*
* @param array $config_biz
*
* @return mixed
*/
abstract public function pay(array $config_biz = []);

/**
* refund.
*
* @author yansongda <me@yansongda.cn>
*
* @return string|bool
*/
public function refund($config_biz = [])
{
if (isset($config_biz['miniapp'])) {
$this->config['appid'] = $this->user_config->get('miniapp_id');
unset($config_biz['miniapp']);
}

$this->config = array_merge($this->config, $config_biz);

$this->unsetTradeTypeAndNotifyUrl();

return $this->getResult($this->gateway_refund, true);
}

/**
* close a order.
*
* @author yansongda <me@yansongda.cn>
*
* @return array|bool
*/
public function close($out_trade_no = '')
{
$this->config['out_trade_no'] = $out_trade_no;

$this->unsetTradeTypeAndNotifyUrl();

return $this->getResult($this->gateway_close);
}

/**
* find a order.
*
* @author yansongda <me@yansongda.cn>
*
* @param string $out_trade_no
*
* @return array|bool
*/
public function find($out_trade_no = '')
{
$this->config['out_trade_no'] = $out_trade_no;

$this->unsetTradeTypeAndNotifyUrl();

return $this->getResult($this->gateway_query);
}

/**
* verify the notify.
*
* @author yansongda <me@yansongda.cn>
*
* @param string $data
* @param string $sign
* @param bool $sync
*
* @return array|bool
*/
public function verify($data, $sign = null, $sync = false)
{
$data = $this->fromXml($data);

$sign = is_null($sign) ? $data['sign'] : $sign;

return $this->getSign($data) === $sign ? $data : false;
}

/**
* get trade type config.
*
* @author yansongda <me@yansongda.cn>
*
* @return string
*/
abstract protected function getTradeType();

/**
* pre order.
*
* @author yansongda <me@yansongda.cn>
*
* @param array $config_biz
*
* @return array
*/
protected function preOrder($config_biz = [])
{
$this->config = array_merge($this->config, $config_biz);

return $this->getResult($this->gateway_order);
}

/**
* get api result.
*
* @author yansongda <me@yansongda.cn>
*
* @param string $path
* @param bool $cert
*
* @return array
*/
protected function getResult($path, $cert = false)
{
$this->config['sign'] = $this->getSign($this->config);

if ($cert) {
$data = $this->fromXml($this->post(
$this->endpoint.$path,
$this->toXml($this->config),
[
'cert' => $this->user_config->get('cert_client', ''),
'ssl_key' => $this->user_config->get('cert_key', ''),
]
));
} else {
$data = $this->fromXml($this->post($this->endpoint.$path, $this->toXml($this->config)));
}

if (!isset($data['return_code']) || $data['return_code'] !== 'SUCCESS' || $data['result_code'] !== 'SUCCESS') {
$error = 'getResult error:'.$data['return_msg'];
$error .= isset($data['err_code_des']) ? ' - '.$data['err_code_des'] : '';
}

if (!isset($error) && $this->getSign($data) !== $data['sign']) {
$error = 'getResult error: return data sign error';
}

if (isset($error)) {
throw new GatewayException(
$error,
20000,
$data);
}

return $data;
}

/**
* sign.
*
* @author yansongda <me@yansongda.cn>
*
* @param array $data
*
* @return string
*/
protected function getSign($data)
{
if (is_null($this->user_config->get('key'))) {
throw new InvalidArgumentException('Missing Config -- [key]');
}

ksort($data);

$string = md5($this->getSignContent($data).'&key='.$this->user_config->get('key'));

return strtoupper($string);
}

/**
* get sign content.
*
* @author yansongda <me@yansongda.cn>
*
* @param array $data
*
* @return string
*/
protected function getSignContent($data)
{
$buff = '';

foreach ($data as $k => $v) {
$buff .= ($k != 'sign' && $v != '' && !is_array($v)) ? $k.'='.$v.'&' : '';
}

return trim($buff, '&');
}

/**
* create random string.
*
* @author yansongda <me@yansongda.cn>
*
* @param int $length
*
* @return string
*/
protected function createNonceStr($length = 16)
{
$chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';

$str = '';
for ($i = 0; $i < $length; $i++) {
$str .= substr($chars, mt_rand(0, strlen($chars) - 1), 1);
}

return $str;
}

/**
* convert to xml.
*
* @author yansongda <me@yansongda.cn>
*
* @param array $data
*
* @return string
*/
protected function toXml($data)
{
if (!is_array($data) || count($data) <= 0) {
throw new InvalidArgumentException('convert to xml error!invalid array!');
}

$xml = '<xml>';
foreach ($data as $key => $val) {
$xml .= is_numeric($val) ? '<'.$key.'>'.$val.'</'.$key.'>' :
'<'.$key.'><![CDATA['.$val.']]></'.$key.'>';
}
$xml .= '</xml>';

return $xml;
}

/**
* convert to array.
*
* @author yansongda <me@yansongda.cn>
*
* @param string $xml
*
* @return array
*/
protected function fromXml($xml)
{
if (!$xml) {
throw new InvalidArgumentException('convert to array error !invalid xml');
}

libxml_disable_entity_loader(true);

return json_decode(json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA), JSON_UNESCAPED_UNICODE), true);
}

/**
* delete trade_type and notify_url.
*
* @author yansongda <me@yansongda.cn>
*
* @return bool
*/
protected function unsetTradeTypeAndNotifyUrl()
{
unset($this->config['notify_url']);
unset($this->config['trade_type']);

return true;
}
}

+ 134
- 0
addons/epay/library/Yansongda/Pay/Pay.php View File

@@ -0,0 +1,134 @@
<?php

namespace Yansongda\Pay;

use Yansongda\Pay\Exceptions\InvalidArgumentException;
use Yansongda\Pay\Support\Config;

class Pay
{
/**
* @var \Yansongda\Pay\Support\Config
*/
private $config;

/**
* @var string
*/
private $drivers;

/**
* @var \Yansongda\Pay\Contracts\GatewayInterface
*/
private $gateways;

/**
* construct method.
*
* @author JasonYan <me@yansongda.cn>
*
* @param array $config
*/
public function __construct(array $config = [])
{
$this->config = new Config($config);
}

/**
* set pay's driver.
*
* @author JasonYan <me@yansongda.cn>
*
* @param string $driver
*
* @return Pay
*/
public function driver($driver)
{
if (is_null($this->config->get($driver))) {
throw new InvalidArgumentException("Driver [$driver]'s Config is not defined.");
}

$this->drivers = $driver;

return $this;
}

/**
* set pay's gateway.
*
* @author yansongda <me@yansongda.cn>
*
* @param string $gateway
*
* @return \Yansongda\Pay\Contracts\GatewayInterface
*/
public function gateway($gateway = 'web')
{
if (!isset($this->drivers)) {
throw new InvalidArgumentException('Driver is not defined.');
}

$this->gateways = $this->createGateway($gateway);

return $this->gateways;
}

/**
* create pay's gateway.
*
* @author yansongda <me@yansongda.cn>
*
* @param string $gateway
*
* @return \Yansongda\Pay\Contracts\GatewayInterface
*/
protected function createGateway($gateway)
{
if (!file_exists(__DIR__ . '/Gateways/' . ucfirst($this->drivers) . '/' . ucfirst($gateway) . 'Gateway.php')) {
throw new InvalidArgumentException("Gateway [$gateway] is not supported.");
}

$gateway = __NAMESPACE__ . '\\Gateways\\' . ucfirst($this->drivers) . '\\' . ucfirst($gateway) . 'Gateway';

return $this->build($gateway);
}

/**
* build pay's gateway.
*
* @author JasonYan <me@yansongda.cn>
*
* @param string $gateway
*
* @return \Yansongda\Pay\Contracts\GatewayInterface
*/
protected function build($gateway)
{
return new $gateway($this->config->get($this->drivers));
}

public function verify()
{
if ($this->drivers == 'wechat') {
return $this->gateway()->verify(file_get_contents("php://input"));
} else {
$request = request();
$data = $request->get('app_id') && $request->get('out_trade_no') ? $request->get('', null, 'trim') : $request->post('', null, 'trim');
return $this->gateway()->verify($data);
}
}

public function success()
{
if ($this->drivers == 'wechat') {
echo '<xml>
<return_code><![CDATA[SUCCESS]]></return_code>
<return_msg><![CDATA[OK]]></return_msg>
</xml>';
} else {
echo 'success';
}
return;
}
}

+ 147
- 0
addons/epay/library/Yansongda/Pay/Support/Config.php View File

@@ -0,0 +1,147 @@
<?php

namespace Yansongda\Pay\Support;

use ArrayAccess;
use Yansongda\Pay\Exceptions\InvalidArgumentException;

class Config implements ArrayAccess
{
/**
* @var array
*/
protected $config;

/**
* Config constructor.
*
* @param array $config
*/
public function __construct(array $config = [])
{
$this->config = $config;
}

/**
* get a config.
*
* @author JasonYan <me@yansongda.cn>
*
* @param string $key
* @param string $default
*
* @return mixed
*/
public function get($key = null, $default = null)
{
$config = $this->config;

if (is_null($key)) {
return $config;
}

if (isset($config[$key])) {
return $config[$key];
}

foreach (explode('.', $key) as $segment) {
if (!is_array($config) || !array_key_exists($segment, $config)) {
return $default;
}
$config = $config[$segment];
}

return $config;
}

/**
* set a config.
*
* @author JasonYan <me@yansongda.cn>
*
* @param string $key
* @param array $value
*/
public function set(string $key, $value)
{
if ($key == '') {
throw new InvalidArgumentException('Invalid config key.');
}

// 只支持三维数组,多余无意义
$keys = explode('.', $key);
switch (count($keys)) {
case '1':
$this->config[$key] = $value;
break;
case '2':
$this->config[$keys[0]][$keys[1]] = $value;
break;
case '3':
$this->config[$keys[0]][$keys[1]][$keys[2]] = $value;
break;

default:
throw new InvalidArgumentException('Invalid config key.');
}

return $this->config;
}

/**
* [offsetExists description].
*
* @author JasonYan <me@yansongda.cn>
*
* @param string $offset
*
* @return bool
*/
public function offsetExists($offset)
{
return array_key_exists($offset, $this->config);
}

/**
* [offsetGet description].
*
* @author JasonYan <me@yansongda.cn>
*
* @param string $offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return $this->get($offset);
}

/**
* [offsetSet description].
*
* @author JasonYan <me@yansongda.cn>
*
* @param string $offset
* @param string $value
*
* @return array
*/
public function offsetSet($offset, $value)
{
$this->set($offset, $value);
}

/**
* [offsetUnset description].
*
* @author JasonYan <me@yansongda.cn>
*
* @param string $offset
*
* @return array
*/
public function offsetUnset($offset)
{
$this->set($offset, null);
}
}

+ 119
- 0
addons/epay/library/Yansongda/Pay/Traits/HasHttpRequest.php View File

@@ -0,0 +1,119 @@
<?php

/*
* (c) overtrue <i@overtrue.me>
*
* Modified By yansongda <me@yansongda.cn>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/

namespace Yansongda\Pay\Traits;

use GuzzleHttp\Client;
use Psr\Http\Message\ResponseInterface;

trait HasHttpRequest
{
/**
* Make a get request.
*
* @param string $endpoint
* @param array $query
* @param array $headers
*
* @return array
*/
protected function get($endpoint, $query = [], $headers = [])
{
return $this->request('get', $endpoint, [
'headers' => $headers,
'query' => $query,
]);
}

/**
* Make a post request.
*
* @param string $endpoint
* @param mixed $params
* @param array $options
*
* @return string
*/
protected function post($endpoint, $params = [], ...$options)
{
$options = isset($options[0]) ? $options[0] : [];

if (!is_array($params)) {
$options['body'] = $params;
} else {
$options['form_params'] = $params;
}

return $this->request('post', $endpoint, $options);
}

/**
* Make a http request.
*
* @param string $method
* @param string $endpoint
* @param array $options http://docs.guzzlephp.org/en/latest/request-options.html
*
* @return array
*/
protected function request($method, $endpoint, $options = [])
{
return $this->unwrapResponse($this->getHttpClient($this->getBaseOptions())->{$method}($endpoint, $options));
}

/**
* Return base Guzzle options.
*
* @return array
*/
protected function getBaseOptions()
{
$options = [
'base_uri' => method_exists($this, 'getBaseUri') ? $this->getBaseUri() : '',
'timeout' => property_exists($this, 'timeout') ? $this->timeout : 5.0,
];

return $options;
}

/**
* Return http client.
*
* @param array $options
*
* @return \GuzzleHttp\Client
*/
protected function getHttpClient(array $options = [])
{
return new Client($options);
}

/**
* Convert response contents to json.
*
* @param \Psr\Http\Message\ResponseInterface $response
*
* @return array
*/
protected function unwrapResponse(ResponseInterface $response)
{
$contentType = $response->getHeaderLine('Content-Type');
$contents = $response->getBody()->getContents();

if (false !== stripos($contentType, 'json') || stripos($contentType, 'javascript')) {
return json_decode($contents, true);
} elseif (false !== stripos($contentType, 'xml')) {
return json_decode(json_encode(simplexml_load_string($contents)), true);
}

return $contents;
}
}

+ 86
- 0
addons/epay/view/api/wechat.html View File

@@ -0,0 +1,86 @@
<link rel="stylesheet" href="__ADDON__/css/wechat.css" />

{if $type=='jsapi'}
<div class="container">
<div class="row" style="margin-top:20px;">
<div class="col-xs-12">
<button type="button" class="btn btn-success btn-lg btn-block">正在发起微信支付</button>
<button type="button" class="btn btn-default btn-lg btn-block" onclick="location.href='{$orderData.returnurl}'">如果页面未自动跳转</button>
</div>
</div>
</div>
<script>
function onBridgeReady(){
WeixinJSBridge.invoke(
'getBrandWCPayRequest', {$payData|json_encode},
function(res){
if (res.err_msg == "get_brand_wcpay_request:ok") {
layer.msg('支付成功!');
} else if (res.err_msg == "get_brand_wcpay_request:cancel") {
layer.msg('您取消了支付');
} else if (res.err_msg == "get_brand_wcpay_request:fail") {
layer.msg('支付失败');
}
setTimeout(function () {
location.href = '{$orderData.returnurl}';
}, 1500);
});
}
if (typeof WeixinJSBridge == "undefined"){
if( document.addEventListener ){
document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
}else if (document.attachEvent){
document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
}
}else{
onBridgeReady();
}
</script>
{elseif $type=='pc' /}
<div class="container">
<div class="wechat">
<div class="row">
<div class="col-xs-12 col-sm-12">
<h2>
<img src="__ADDON__/images/logo-wechat.png" alt="" height="32" class="pull-left" style="margin-right:5px;"> 微信支付
<div class="wechat-time">
请在 <span>60</span> 秒内完成支付
</div>
</h2>

<div class="row">
<div class="col-xs-12 col-sm-5">
<div class="wechat-body">
<div class="wechat-order clearfix">
<p>订单标题:<em>{$data.body}</em></p>
<p>订单编号:<em>{$data.out_trade_no}</em></p>
<p>订单价格:<em class="wechat-price">¥{$data.total_fee/100}</em> 元</p>
</div>
<div class="wechat-qrcode">
<img src="{:addon_url('epay/api/qrcode',[],false)}?text={$data.code_url}">
<div class="expired hidden"></div>
<div class="paid hidden"></div>
</div>
<div class="wechat-tips">
<p>请使用微信扫一扫<br>扫描二维码支付</p>
</div>
</div>
</div>
<div class="col-sm-1"></div>
<div class="col-sm-6 hidden-xs">
<div class="wechat-scan">
<img src="__ADDON__/images/tips.png" class="img-responsive" alt=""/>
</div>
</div>
</div>
</div>
</div>
</div>

</div>

<script>
var queryParams = {$data|json_encode};
</script>
{/if}

+ 212
- 0
addons/epay/view/index/index.html View File

@@ -0,0 +1,212 @@
<!-- Header Carousel -->
<header id="myCarousel" class="carousel slide">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
<li data-target="#myCarousel" data-slide-to="3"></li>
</ol>

<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<a href="https://www.fastadmin.net/store/epay.html" target="_blank">
<div class="fill"
style="background-image:url('https://bg.fastadmin.net?text=random&color=9b59b6');"></div>
<div class="carousel-body">
<div class="container">
<h1 class="display-1 text-white">微信支付宝整合插件</h1>
<h2 class="display-4 text-white">打通微信、支付宝付款功能,支持CMS、余额充值、知识问答插件</h2>
</div>
</div>
</a>
</div>
<div class="item">
<a href="https://www.fastadmin.net/store/cms.html" target="_blank">
<div class="fill"
style="background-image:url('https://bg.fastadmin.net?text=random&color=3498db');"></div>
<div class="carousel-body">
<div class="container">
<h1 class="display-1 text-white">CMS内容管理系统(含小程序)</h1>
<h2 class="display-4 text-white">简单强大的内容管理系统,支持付费阅读、可自定义内容模型、标签、伪静态、区块、个性化模板等功能<br>包含完整的小程序CMS客户端,拥有完善的资讯模块、产品模块、评论模块、会员模块
</h2>
</div>
</div>
</a>
</div>
<div class="item">
<a href="https://www.fastadmin.net/store/ask.html" target="_blank">
<div class="fill"
style="background-image:url('https://bg.fastadmin.net?text=random&color=3498db');"></div>
<div class="carousel-body">
<div class="container">
<h1 class="display-1 text-white">知识问答系统</h1>
<h2 class="display-4 text-white">简单强大的问答社区,拥有强大的问答模块、付费问答、话题归类、付费阅读</h2>
</div>
</div>
</a>
</div>
<div class="item">
<a href="https://www.fastadmin.net/store/blog.html" target="_blank">
<div class="fill"
style="background-image:url('https://bg.fastadmin.net?text=random&color=2ecc71');"></div>
<div class="carousel-body">
<div class="container">
<h1 class="display-1 text-white">简单博客(含小程序)</h1>
<h2 class="display-4 text-white">响应式博客插件,包含日志、评论、分类、归档,包含完善的后台管理和前台功能<br/>包含完整的小程序博客客户端,拥有博客日志列表、日志详情、评论等功能
</h2>
</div>
</div>
</a>
</div>
<div class="item">
<a href="https://www.fastadmin.net/store/docs.html" target="_blank">
<div class="fill"
style="background-image:url('https://bg.fastadmin.net?text=random&color=9c88ff');"></div>
<div class="carousel-body">
<div class="container">
<h1 class="display-1 text-white">Markdown文档生成插件</h1>
<h2 class="display-4 text-white">将Github或本地Git环境中的Markdown文件解析并生成HTML,可在线浏览或导出为HTML离线浏览</h2>
</div>
</div>
</a>
</div>
</div>
</header>

<!-- Page Content -->
<div class="container">

<div class="row">
<div class="col-lg-12">
<h2 class="page-header">
开始接入
</h2>
</div>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<h4><i class="fa fa-fw fa-check"></i> 准备工作</h4>
</div>
<div class="panel-body">
<p><a href="https://b.alipay.com/" target="_blank">申请支付宝相应的支付产品,并获取相关配置</a></p>
<p><a href="https://pay.weixin.qq.com" target="_blank">申请微信相应的支付产品,并获取相关配置</a></p>
<p>插件管理中配置相应的微信或支付宝参数</p>
<a href="https://www.fastadmin.net/store/epay.html" target="_blank" class="btn btn-success"><i class="fa fa-download"></i> 下载插件</a>
</div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<h4><i class="fa fa-fw fa-gift"></i> 开发工作</h4>
</div>
<div class="panel-body">
<p>在你的PHP代码中调用相关代码进行支付,请参考控制器代码</p>
<p>目前FastAdmin中已经支持
<a href="https://www.fastadmin.net/store/cms.html" target="_blank">CMS内容管理系统</a>、
<a href="https://www.fastadmin.net/store/recharge.html" target="_blank">会员充值插件</a>、
<a href="https://www.fastadmin.net/store/ask.html" target="_blank">知识问答系统</a>
支持无缝接入此插件</p>
<a href="https://www.fastadmin.net/store/epay.html" target="_blank" class="btn btn-success"><i class="fa fa-list"></i> 查看文档</a>
</div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<h4><i class="fa fa-fw fa-compass"></i> 立即体验</h4>
</div>
<div class="panel-body">
<p>请选择对应的支付金额和支付方式</p>
<p>
<span class="input-group">
<input type="number" name="amount" step="2" value="{:mt_rand(1, 99)/100}"
class="form-control" placeholder="请输入一个随机金额"/>
<span class="input-group-addon" style="padding:0;width:100px;">
<select class="form-control" name="method" id="method" style="border:none;height: 32px;">
<option value="web">PC网页支付</option>
<option value="wap">H5手机网页支付</option>
<option value="app">APP支付</option>
<option value="scan">扫码支付</option>
<option value="mp">公众号支付(不支持支付宝)</option>
<option value="miniapp">小程序支付(不支持支付宝)</option>
</select>
</span>
</span>
</p>
<button data-type="alipay" class="btn btn-info btn-experience"><i class="fa fa-money"></i> 支付宝支付</button>
<button data-type="wechat" class="btn btn-success btn-experience"><i class="fa fa-wechat"></i> 微信支付</button>
</div>
</div>
</div>
</div>
<!-- /.row -->

<div class="row addonlist">
<div class="col-lg-12">
<h2 class="page-header">模块&插件</h2>
</div>
<div class="col-md-4 col-sm-6">
<a href="https://www.fastadmin.net/store/blog.html" target="_blank">
<img class="img-responsive img-addon img-hover" src="https://cdn.fastadmin.net/uploads/addons/blog.png"
alt="">
<p>简单博客(含小程序)</p>
</a>
</div>
<div class="col-md-4 col-sm-6">
<a href="https://www.fastadmin.net/store/cms.html" target="_blank">
<img class="img-responsive img-addon img-hover" src="https://cdn.fastadmin.net/uploads/addons/cms.png"
alt="">
<p>CMS内容管理系统(含小程序)</p>
</a>
</div>
<div class="col-md-4 col-sm-6">
<a href="https://www.fastadmin.net/store/ask.html" target="_blank">
<img class="img-responsive img-addon img-hover" src="https://cdn.fastadmin.net/uploads/addons/ask.png" alt="">
<p>知识付费问答社区</p>
</a>
</div>
<div class="col-md-4 col-sm-6">
<a href="https://www.fastadmin.net/store/docs.html" target="_blank">
<img class="img-responsive img-addon img-hover" src="https://cdn.fastadmin.net/uploads/addons/docs.png"
alt="">
<p>文档生成模块</p>
</a>
</div>
<div class="col-md-4 col-sm-6">
<a href="https://www.fastadmin.net/store/filemanager.html" target="_blank">
<img class="img-responsive img-addon img-hover"
src="https://cdn.fastadmin.net/uploads/addons/filemanager.png" alt="">
<p>文件管理器插件</p>
</a>
</div>
<div class="col-md-4 col-sm-6">
<a href="https://www.fastadmin.net/store/qiniu.html" target="_blank">
<img class="img-responsive img-addon img-hover" src="https://cdn.fastadmin.net/uploads/addons/qiniu.png"
alt="">
<p>七牛上传插件</p>
</a>
</div>
</div>
<!-- /.row -->

<hr>

<!-- Call to Action Section -->
<div class="well">
<div class="row">
<div class="col-md-8">
<p>感谢你对FastAdmin的支持!如果你在使用FastAdmin开发插件的过程中有任何疑问或需要寻求帮助,请前往FastAdmin交流社区与小伙伴们一起交流。</p>
</div>
<div class="col-md-4">
<a class="btn btn-lg btn-default btn-block" href="https://forum.fastadmin.net"
target="_blank">立即前往社区</a>
</div>
</div>
</div>

<hr>

</div>

+ 115
- 0
addons/epay/view/layout/default.html View File

@@ -0,0 +1,115 @@
<!DOCTYPE html>
<html lang="en">

<head>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">

<title>{$title} - FastAdmin</title>

<!-- Bootstrap Core CSS -->
<link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

<!-- Custom CSS -->
<link href="__ADDON__/css/common.css" rel="stylesheet">

<!-- Plugin CSS -->
<link href="https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://cdn.staticfile.org/simple-line-icons/2.4.1/css/simple-line-icons.min.css" rel="stylesheet">

<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->

</head>

<body>

<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{:addon_url('epay/index/index')}">FastAdmin</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li>
</li>
{if $user}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">欢迎你! {$user.nickname}<b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href="{:url('index/user/index')}">会员中心</a>
</li>
<li>
<a href="{:url('index/user/profile')}">个人资料</a>
</li>
<li>
<a href="{:url('index/user/logout')}">退出登录</a>
</li>
</ul>
</li>
{else /}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">会员中心 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href="{:url('index/user/login')}">登录</a>
</li>
<li>
<a href="{:url('index/user/register')}">注册</a>
</li>
</ul>
</li>
{/if}
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>

{__CONTENT__}

<div class="container">
<!-- Footer -->
<footer>
<div class="row">
<div class="col-lg-12">
<hr>
<p>Copyright &copy; <a href="https://www.fastadmin.net">FastAdmin</a> 2017-1019</p>
</div>
</div>
</footer>

</div>
<!-- /.container -->

<!-- jQuery -->
<script src="https://cdn.staticfile.org/jquery/2.1.4/jquery.min.js"></script>

<!-- Bootstrap Core JavaScript -->
<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>

<script src="__CDN__/assets/libs/fastadmin-layer/dist/layer.js"></script>

<script src="__ADDON__/js/common.js"></script>

</body>

</html>

+ 2
- 1
application/extra/addons.php View File

@@ -6,7 +6,8 @@ return array (
array (
'app_init' =>
array (
0 => 'unishop',
0 => 'epay',
1 => 'unishop',
),
),
'route' =>


+ 91
- 0
public/assets/addons/epay/css/common.css View File

@@ -0,0 +1,91 @@
/*!
* Start Bootstrap - Modern Business (http://startbootstrap.com/)
* Copyright 2013-2016 Start Bootstrap
* Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap/blob/gh-pages/LICENSE)
*/
/* Global Styles */
html,
body {
height: 100%;
}
body {
padding-top: 50px;
/* Required padding for .navbar-fixed-top. Remove if using .navbar-static-top. Change if height of navigation changes. */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.img-addon {
margin-bottom: 10px;
width: 100%;
}
.img-hover:hover {
opacity: 0.8;
}
.display-1 {
font-size: 44px;
}
.display-4 {
font-size: 24px;
line-height: 32px;
}
/* Home Page Carousel */
header.carousel {
height: 50%;
}
header.carousel .item,
header.carousel .item.active,
header.carousel .carousel-inner {
height: 100%;
}
header.carousel .fill {
width: 100%;
height: 100%;
}
.error-404 {
font-size: 100px;
}
/* Pricing Page Styles */
.price {
display: block;
font-size: 50px;
line-height: 50px;
}
.price sup {
top: -20px;
left: 2px;
font-size: 20px;
}
.period {
display: block;
font-style: italic;
}
/* Footer Styles */
footer {
margin: 50px 0;
}
/* Responsive Styles */
@media (max-width: 991px) {
.customer-img,
.img-related {
margin-bottom: 30px;
}
}
@media (max-width: 767px) {
.img-addon {
margin-bottom: 15px;
}
header.carousel .carousel {
height: 70%;
}
}
.carousel-body {
position: absolute;
width: 100%;
top: 25%;
text-align: center;
color: #fff;
}
.addonlist a > p {
margin-bottom: 15px;
}

+ 20
- 0
public/assets/addons/epay/css/epay.css View File

@@ -0,0 +1,20 @@
@import url("../../../css/bootstrap.min.css");
@import url("../../../libs/font-awesome/css/font-awesome.min.css");
html,
body {
height: 100%;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 400;
overflow-x: hidden;
overflow-y: auto;
background: #f4f6f8;
font-size: 14px;
color: #616161;
}
.container {
max-width: 850px;
margin: 0 auto;
padding: 50px;
}

+ 100
- 0
public/assets/addons/epay/css/wechat.css View File

@@ -0,0 +1,100 @@
.wechat {
margin-top: 30px;
}

.wechat h2 {
margin: 0 0 15px 0;
padding-bottom: 15px;
border-bottom: 1px solid #eee;
position: relative;
}

.wechat-body {
}

.wechat-qrcode {
margin-bottom: 20px;
position: relative;
}

.wechat-qrcode img {
width: 100%;
border: 1px solid #eee;
}

.wechat-qrcode .expired {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
opacity: .95;
background: #fff url(../images/expired.png) center center no-repeat;
}

.wechat-qrcode .paid {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
opacity: .95;
background: #fff url(../images/paid.png) center center no-repeat;
}

.wechat-scan {
padding: 0;
}

.wechat-scan img {
width: 100%;
}

.wechat-tips {
height: 60px;
padding: 8px 0 8px 125px;
background: #00c800 url(../images/scan.png) 50px 12px no-repeat;
background-size: 36px 36px;
}

.wechat-tips p {
margin: 0;
font-size: 14px;
line-height: 22px;
color: #fff;
font-weight: 700
}

.wechat-time {
font-size: 14px;
margin-bottom: 15px;
position: absolute;
top: 15px;
right: 10px;
font-weight: normal;
display: none;
}

.wechat-time span {
color: red;
}

.wechat-order {
margin-bottom: 5px;
}

.wechat-order em {
font-style: normal;
color: #666;
}

.wechat-order em.wechat-price {
color: #ff3333;
font-weight: bold;
}

@media (max-width: 767px) {
.wechat {
margin-top: 20px;
}
}

BIN
public/assets/addons/epay/images/alipay.png View File

Before After
Width: 136  |  Height: 48  |  Size: 3.6 KiB

BIN
public/assets/addons/epay/images/expired.png View File

Before After
Width: 63  |  Height: 48  |  Size: 4.6 KiB

BIN
public/assets/addons/epay/images/logo-alipay.png View File

Before After
Width: 48  |  Height: 48  |  Size: 1.6 KiB

BIN
public/assets/addons/epay/images/logo-wechat.png View File

Before After
Width: 48  |  Height: 48  |  Size: 1.7 KiB

BIN
public/assets/addons/epay/images/logo.png View File

Before After
Width: 440  |  Height: 98  |  Size: 23 KiB

BIN
public/assets/addons/epay/images/paid.png View File

Before After
Width: 48  |  Height: 48  |  Size: 2.2 KiB

BIN
public/assets/addons/epay/images/scan.png View File

Before After
Width: 64  |  Height: 64  |  Size: 922 B

BIN
public/assets/addons/epay/images/tips.png View File

Before After
Width: 329  |  Height: 421  |  Size: 21 KiB

BIN
public/assets/addons/epay/images/wechat.png View File

Before After
Width: 158  |  Height: 48  |  Size: 22 KiB

+ 52
- 0
public/assets/addons/epay/js/common.js View File

@@ -0,0 +1,52 @@
$(function () {
$('.carousel').carousel({
interval: 5000 //changes the speed
});
$(".btn-experience").on("click", function () {
location.href = "/addons/epay/index/experience?amount=" + $("input[name=amount]").val() + "&type=" + $(this).data("type") + "&method=" + $("#method").val();
});

var si, xhr;
if (typeof queryParams != 'undefined') {
var queryResult = function () {
xhr && xhr.abort();
xhr = $.ajax({
url: "",
type: "post",
data: queryParams,
dataType: 'json',
success: function (ret) {
if (ret.code == 1) {
var data = ret.data;
console.log(data);
if (typeof data.trade_state != 'undefined') {
if (data.trade_state == 'SUCCESS') {
$(".wechat-qrcode .paid").removeClass("hidden");
$(".wechat-tips p").html("支付成功!<br>3秒后将自动跳转...");
setTimeout(function () {
location.href = queryParams.return_url;
}, 3000);
clearInterval(si);
} else if (data.trade_state == 'REFUND') {
$(".wechat-tips p").html("请求失败!<br>请返回重新发起支付");
clearInterval(si);
} else if (data.trade_state == 'NOTPAY') {
} else if (data.trade_state == 'CLOSED') {
$(".wechat-tips p").html("订单已关闭!<br>请返回重新发起支付");
clearInterval(si);
} else if (data.trade_state == 'USERPAYING') {
} else if (data.trade_state == 'PAYERROR') {
clearInterval(si);
}
}
}
}
});
};
si = setInterval(function () {
queryResult();
}, 3000);
queryResult();
}

});

+ 113
- 0
public/assets/addons/epay/less/common.less View File

@@ -0,0 +1,113 @@
/*!
* Start Bootstrap - Modern Business (http://startbootstrap.com/)
* Copyright 2013-2016 Start Bootstrap
* Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap/blob/gh-pages/LICENSE)
*/

/* Global Styles */

html,
body {
height: 100%;
}

body {
padding-top: 50px; /* Required padding for .navbar-fixed-top. Remove if using .navbar-static-top. Change if height of navigation changes. */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;

}

.img-addon {
margin-bottom: 10px;
width:100%;
}

.img-hover:hover {
opacity: 0.8;
}

.display-1 {
font-size:44px;
}
.display-4 {
font-size:24px;
line-height:32px;
}

/* Home Page Carousel */

header.carousel {
height: 50%;
}

header.carousel .item,
header.carousel .item.active,
header.carousel .carousel-inner {
height: 100%;
}

header.carousel .fill {
width: 100%;
height: 100%;
}

.error-404 {
font-size: 100px;
}

/* Pricing Page Styles */

.price {
display: block;
font-size: 50px;
line-height: 50px;
}

.price sup {
top: -20px;
left: 2px;
font-size: 20px;
}

.period {
display: block;
font-style: italic;
}

/* Footer Styles */

footer {
margin: 50px 0;
}

/* Responsive Styles */

@media(max-width:991px) {
.customer-img,
.img-related {
margin-bottom: 30px;
}
}

@media(max-width:767px) {
.img-addon {
margin-bottom: 15px;
}

header.carousel .carousel {
height: 70%;
}
}
.carousel-body {
position:absolute;
width: 100%;
top:25%;
text-align:center;
color:#fff;
}

.addonlist a > p{
margin-bottom:15px;
}

+ 28
- 0
public/assets/addons/epay/less/epay.less View File

@@ -0,0 +1,28 @@
@import (reference) "../../../../public/assets/less/bootstrap-less/mixins.less";
@import (reference) "../../../../public/assets/less/bootstrap-less/variables.less";
@import (reference) "../../../../public/assets/less/fastadmin/mixins.less";
@import (reference) "../../../../public/assets/less/fastadmin/variables.less";
@import "../../../../public/assets/less/lesshat.less";
@import url("../../../css/bootstrap.min.css");
@import url("../../../libs/font-awesome/css/font-awesome.min.css");

html,
body {
height: 100%;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 400;
overflow-x: hidden;
overflow-y: auto;
background: #f4f6f8;
font-size: 14px;
color: #616161;

}

.container {
max-width: 850px;
margin: 0 auto;
padding:50px;
}

+ 0
- 4
runtime/cache/4e/819c837d54a6ed09abc77a8560a66f.php View File

@@ -1,4 +0,0 @@
<?php
//000000000000
exit();?>
a:1:{s:8:"app_init";a:1:{i:0;s:23:"\addons\unishop\Unishop";}}

+ 0
- 8
runtime/cache/cb/78ef4a9130f39208ff10858ddd8377.php
File diff suppressed because it is too large
View File


+ 0
- 1954
runtime/log/202007/10.log
File diff suppressed because it is too large
View File


+ 0
- 624
runtime/log/202007/11.log View File

@@ -1,624 +0,0 @@
---------------------------------------------------------------
[ 2020-07-11T10:04:11+08:00 ] 127.0.0.1 GET ww.com/
[运行时间:2.421004s] [吞吐率:0.41req/s] [内存消耗:4,781.79kb] [文件加载:128]
[ info ] [ BEHAVIOR ] Run Closure @app_init [ RunTime:0.000449s ]
[ info ] [ CACHE ] INIT File
[ info ] [ BEHAVIOR ] Run \addons\unishop\Unishop @app_init [ RunTime:0.137523s ]
[ info ] [ BEHAVIOR ] Run Closure @app_init [ RunTime:0.137713s ]
[ info ] [ LANG ] D:\php\weiwei\thinkphp\lang\zh-cn.php
[ info ] [ BEHAVIOR ] Run app\common\behavior\Common @app_dispatch [ RunTime:0.022033s ]
[ info ] [ ROUTE ] array (
'type' => 'module',
'module' =>
array (
0 => '',
1 => NULL,
2 => NULL,
),
)
[ info ] [ HEADER ] array (
'cookie' => 'PHPSESSID=4opmg9rsblfrfhgnefdmd6sh87; keeplogin=1%7C86400%7C1594447248%7Ceaad2efd816ec4c1c42d7c2809399bcb',
'accept-language' => 'zh-CN,zh;q=0.9,en;q=0.8',
'accept-encoding' => 'gzip, deflate',
'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'user-agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36',
'upgrade-insecure-requests' => '1',
'connection' => 'keep-alive',
'host' => 'ww.com',
'content-length' => '',
'content-type' => '',
)
[ info ] [ PARAM ] array (
)
[ info ] [ LANG ] D:\php\weiwei\public/../application/index\lang\zh-cn.php
[ info ] [ BEHAVIOR ] Run app\common\behavior\Common @module_init [ RunTime:0.022940s ]
[ info ] [ LANG ] D:\php\weiwei\public/../application/index/lang/zh-cn/index.php
[ info ] [ RUN ] app\index\controller\Index->index[ D:\php\weiwei\application\index\controller\Index.php ]
[ info ] [ VIEW ] D:\php\weiwei\public/../application/index\view\index\index.html [ array (
0 => 'user',
1 => 'site',
2 => 'config',
) ]
[ info ] [ LOG ] INIT File
---------------------------------------------------------------
[ 2020-07-11T10:04:18+08:00 ] 127.0.0.1 GET ww.com/aYhJTRKIWV.php/addon?ref=addtabs
[运行时间:1.075856s] [吞吐率:0.93req/s] [内存消耗:6,028.66kb] [文件加载:134]
[ info ] [ BEHAVIOR ] Run Closure @app_init [ RunTime:0.000202s ]
[ info ] [ CACHE ] INIT File
[ info ] [ BEHAVIOR ] Run \addons\unishop\Unishop @app_init [ RunTime:0.008658s ]
[ info ] [ BEHAVIOR ] Run Closure @app_init [ RunTime:0.008829s ]
[ info ] [ LANG ] D:\php\weiwei\thinkphp\lang\zh-cn.php
[ info ] [ BEHAVIOR ] Run app\common\behavior\Common @app_dispatch [ RunTime:0.001402s ]
[ info ] [ ROUTE ] array (
'type' => 'module',
'module' =>
array (
0 => 'admin',
1 => 'addon',
2 => NULL,
),
)
[ info ] [ HEADER ] array (
'cookie' => 'PHPSESSID=4opmg9rsblfrfhgnefdmd6sh87; keeplogin=1%7C86400%7C1594447248%7Ceaad2efd816ec4c1c42d7c2809399bcb',
'accept-language' => 'zh-CN,zh;q=0.9,en;q=0.8',
'accept-encoding' => 'gzip, deflate',
'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'user-agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36',
'upgrade-insecure-requests' => '1',
'connection' => 'keep-alive',
'host' => 'ww.com',
'content-length' => '',
'content-type' => '',
)
[ info ] [ PARAM ] array (
'ref' => 'addtabs',
)
[ info ] [ LANG ] D:\php\weiwei\public/../application/admin\lang\zh-cn.php
[ info ] [ BEHAVIOR ] Run app\common\behavior\Common @module_init [ RunTime:0.005058s ]
[ info ] [ SESSION ] INIT array (
'id' => '',
'var_session_id' => '',
'prefix' => 'think',
'type' => '',
'auto_start' => true,
)
[ info ] [ DB ] INIT mysql
[ info ] [ BEHAVIOR ] Run app\admin\behavior\AdminLog @app_end [ RunTime:0.014794s ]
[ info ] [ LOG ] INIT File
---------------------------------------------------------------
[ 2020-07-11T10:04:21+08:00 ] 127.0.0.1 GET ww.com/aYhJTRKIWV.php/index/index
[运行时间:2.503652s] [吞吐率:0.40req/s] [内存消耗:6,835.05kb] [文件加载:149]
[ info ] [ BEHAVIOR ] Run Closure @app_init [ RunTime:0.000231s ]
[ info ] [ CACHE ] INIT File
[ info ] [ BEHAVIOR ] Run \addons\unishop\Unishop @app_init [ RunTime:0.006723s ]
[ info ] [ BEHAVIOR ] Run Closure @app_init [ RunTime:0.007035s ]
[ info ] [ LANG ] D:\php\weiwei\thinkphp\lang\zh-cn.php
[ info ] [ BEHAVIOR ] Run app\common\behavior\Common @app_dispatch [ RunTime:0.001199s ]
[ info ] [ ROUTE ] array (
'type' => 'module',
'module' =>
array (
0 => 'admin',
1 => 'index',
2 => 'index',
),
)
[ info ] [ HEADER ] array (
'cookie' => 'PHPSESSID=4opmg9rsblfrfhgnefdmd6sh87; keeplogin=1%7C86400%7C1594447248%7Ceaad2efd816ec4c1c42d7c2809399bcb',
'accept-language' => 'zh-CN,zh;q=0.9,en;q=0.8',
'accept-encoding' => 'gzip, deflate',
'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'user-agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36',
'upgrade-insecure-requests' => '1',
'connection' => 'keep-alive',
'host' => 'ww.com',
'content-length' => '',
'content-type' => '',
)
[ info ] [ PARAM ] array (
)
[ info ] [ LANG ] D:\php\weiwei\public/../application/admin\lang\zh-cn.php
[ info ] [ BEHAVIOR ] Run app\common\behavior\Common @module_init [ RunTime:0.003676s ]
[ info ] [ SESSION ] INIT array (
'id' => '',
'var_session_id' => '',
'prefix' => 'think',
'type' => '',
'auto_start' => true,
)
[ info ] [ DB ] INIT mysql
[ info ] [ LANG ] D:\php\weiwei\public/../application/admin/lang/zh-cn/index.php
[ info ] [ RUN ] app\admin\controller\Index->index[ D:\php\weiwei\application\admin\controller\Index.php ]
[ info ] [ VIEW ] D:\php\weiwei\public/../application/admin\view\index\index.html [ array (
0 => 'breadcrumb',
1 => 'site',
2 => 'config',
3 => 'auth',
4 => 'admin',
5 => 'menulist',
6 => 'navlist',
7 => 'fixedmenu',
8 => 'referermenu',
9 => 'title',
) ]
[ info ] [ BEHAVIOR ] Run app\admin\behavior\AdminLog @app_end [ RunTime:0.001349s ]
[ info ] [ LOG ] INIT File
---------------------------------------------------------------
[ 2020-07-11T10:04:22+08:00 ] 127.0.0.1 GET ww.com/aYhJTRKIWV.php/addon?addtabs=1
[运行时间:1.187611s] [吞吐率:0.84req/s] [内存消耗:6,498.25kb] [文件加载:138]
[ info ] [ BEHAVIOR ] Run Closure @app_init [ RunTime:0.000522s ]
[ info ] [ CACHE ] INIT File
[ info ] [ BEHAVIOR ] Run \addons\unishop\Unishop @app_init [ RunTime:0.007494s ]
[ info ] [ BEHAVIOR ] Run Closure @app_init [ RunTime:0.007703s ]
[ info ] [ LANG ] D:\php\weiwei\thinkphp\lang\zh-cn.php
[ info ] [ BEHAVIOR ] Run app\common\behavior\Common @app_dispatch [ RunTime:0.002602s ]
[ info ] [ ROUTE ] array (
'type' => 'module',
'module' =>
array (
0 => 'admin',
1 => 'addon',
2 => NULL,
),
)
[ info ] [ HEADER ] array (
'cookie' => 'PHPSESSID=4opmg9rsblfrfhgnefdmd6sh87; keeplogin=1%7C86400%7C1594447248%7Ceaad2efd816ec4c1c42d7c2809399bcb',
'accept-language' => 'zh-CN,zh;q=0.9,en;q=0.8',
'accept-encoding' => 'gzip, deflate',
'referer' => 'http://ww.com/aYhJTRKIWV.php/index/index',
'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'user-agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36',
'upgrade-insecure-requests' => '1',
'connection' => 'keep-alive',
'host' => 'ww.com',
'content-length' => '',
'content-type' => '',
)
[ info ] [ PARAM ] array (
'addtabs' => '1',
)
[ info ] [ LANG ] D:\php\weiwei\public/../application/admin\lang\zh-cn.php
[ info ] [ BEHAVIOR ] Run app\common\behavior\Common @module_init [ RunTime:0.006185s ]
[ info ] [ SESSION ] INIT array (
'id' => '',
'var_session_id' => '',
'prefix' => 'think',
'type' => '',
'auto_start' => true,
)
[ info ] [ DB ] INIT mysql
[ info ] [ LANG ] D:\php\weiwei\public/../application/admin/lang/zh-cn/addon.php
[ info ] [ RUN ] app\admin\controller\Addon->index[ D:\php\weiwei\application\admin\controller\Addon.php ]
[ info ] [ VIEW ] D:\php\weiwei\public/../application/admin\view\addon\index.html [ array (
0 => 'breadcrumb',
1 => 'site',
2 => 'config',
3 => 'auth',
4 => 'admin',
) ]
[ info ] [ BEHAVIOR ] Run app\admin\behavior\AdminLog @app_end [ RunTime:0.001012s ]
[ info ] [ LOG ] INIT File
---------------------------------------------------------------
[ 2020-07-11T10:04:23+08:00 ] 127.0.0.1 GET ww.com/aYhJTRKIWV.php/dashboard?addtabs=1
[运行时间:2.123338s] [吞吐率:0.47req/s] [内存消耗:6,447.48kb] [文件加载:138]
[ info ] [ BEHAVIOR ] Run Closure @app_init [ RunTime:0.000426s ]
[ info ] [ CACHE ] INIT File
[ info ] [ BEHAVIOR ] Run \addons\unishop\Unishop @app_init [ RunTime:0.010934s ]
[ info ] [ BEHAVIOR ] Run Closure @app_init [ RunTime:0.011330s ]
[ info ] [ LANG ] D:\php\weiwei\thinkphp\lang\zh-cn.php
[ info ] [ BEHAVIOR ] Run app\common\behavior\Common @app_dispatch [ RunTime:0.002312s ]
[ info ] [ ROUTE ] array (
'type' => 'module',
'module' =>
array (
0 => 'admin',
1 => 'dashboard',
2 => NULL,
),
)
[ info ] [ HEADER ] array (
'cookie' => 'PHPSESSID=4opmg9rsblfrfhgnefdmd6sh87; keeplogin=1%7C86400%7C1594447248%7Ceaad2efd816ec4c1c42d7c2809399bcb',
'accept-language' => 'zh-CN,zh;q=0.9,en;q=0.8',
'accept-encoding' => 'gzip, deflate',
'referer' => 'http://ww.com/aYhJTRKIWV.php/index/index',
'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'user-agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36',
'upgrade-insecure-requests' => '1',
'connection' => 'keep-alive',
'host' => 'ww.com',
'content-length' => '',
'content-type' => '',
)
[ info ] [ PARAM ] array (
'addtabs' => '1',
)
[ info ] [ LANG ] D:\php\weiwei\public/../application/admin\lang\zh-cn.php
[ info ] [ BEHAVIOR ] Run app\common\behavior\Common @module_init [ RunTime:0.005432s ]
[ info ] [ SESSION ] INIT array (
'id' => '',
'var_session_id' => '',
'prefix' => 'think',
'type' => '',
'auto_start' => true,
)
[ info ] [ DB ] INIT mysql
[ info ] [ LANG ] D:\php\weiwei\public/../application/admin/lang/zh-cn/dashboard.php
[ info ] [ RUN ] app\admin\controller\Dashboard->index[ D:\php\weiwei\application\admin\controller\Dashboard.php ]
[ info ] [ VIEW ] D:\php\weiwei\public/../application/admin\view\dashboard\index.html [ array (
0 => 'breadcrumb',
1 => 'site',
2 => 'config',
3 => 'auth',
4 => 'admin',
5 => 'totaluser',
6 => 'totalviews',
7 => 'totalorder',
8 => 'totalorderamount',
9 => 'todayuserlogin',
10 => 'todayusersignup',
11 => 'todayorder',
12 => 'unsettleorder',
13 => 'sevendnu',
14 => 'sevendau',
15 => 'paylist',
16 => 'createlist',
17 => 'addonversion',
18 => 'uploadmode',
) ]
[ info ] [ BEHAVIOR ] Run app\admin\behavior\AdminLog @app_end [ RunTime:0.000801s ]
[ info ] [ LOG ] INIT File
---------------------------------------------------------------
[ 2020-07-11T10:04:24+08:00 ] 127.0.0.1 GET ww.com/aYhJTRKIWV.php/ajax/lang?callback=define&controllername=index&v=1594433058
[运行时间:2.015646s] [吞吐率:0.50req/s] [内存消耗:6,524.13kb] [文件加载:137]
[ info ] [ BEHAVIOR ] Run Closure @app_init [ RunTime:0.000712s ]
[ info ] [ CACHE ] INIT File
[ info ] [ BEHAVIOR ] Run \addons\unishop\Unishop @app_init [ RunTime:0.010280s ]
[ info ] [ BEHAVIOR ] Run Closure @app_init [ RunTime:0.010702s ]
[ info ] [ LANG ] D:\php\weiwei\thinkphp\lang\zh-cn.php
[ info ] [ BEHAVIOR ] Run app\common\behavior\Common @app_dispatch [ RunTime:0.001905s ]
[ info ] [ ROUTE ] array (
'type' => 'module',
'module' =>
array (
0 => 'admin',
1 => 'ajax',
2 => 'lang',
),
)
[ info ] [ HEADER ] array (
'cookie' => 'PHPSESSID=4opmg9rsblfrfhgnefdmd6sh87; keeplogin=1%7C86400%7C1594447248%7Ceaad2efd816ec4c1c42d7c2809399bcb',
'accept-language' => 'zh-CN,zh;q=0.9,en;q=0.8',
'accept-encoding' => 'gzip, deflate',
'referer' => 'http://ww.com/aYhJTRKIWV.php/index/index',
'accept' => '*/*',
'user-agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36',
'connection' => 'keep-alive',
'host' => 'ww.com',
'content-length' => '',
'content-type' => '',
)
[ info ] [ PARAM ] array (
'callback' => 'define',
'controllername' => 'index',
'v' => '1594433058',
)
[ info ] [ LANG ] D:\php\weiwei\public/../application/admin\lang\zh-cn.php
[ info ] [ BEHAVIOR ] Run app\common\behavior\Common @module_init [ RunTime:0.005308s ]
[ info ] [ SESSION ] INIT array (
'id' => '',
'var_session_id' => '',
'prefix' => 'think',
'type' => '',
'auto_start' => true,
)
[ info ] [ DB ] INIT mysql
[ info ] [ LANG ] D:\php\weiwei\public/../application/admin/lang/zh-cn/ajax.php
[ info ] [ RUN ] app\admin\controller\Ajax->lang[ D:\php\weiwei\application\admin\controller\Ajax.php ]
[ info ] [ LANG ] D:\php\weiwei\public/../application/admin/lang/zh-cn/index.php
[ info ] [ BEHAVIOR ] Run app\admin\behavior\AdminLog @app_end [ RunTime:0.000726s ]
[ info ] [ LOG ] INIT File
---------------------------------------------------------------
[ 2020-07-11T10:04:24+08:00 ] 127.0.0.1 GET ww.com/aYhJTRKIWV.php/ajax/lang?callback=define&controllername=addon&v=1594433061
[运行时间:1.916163s] [吞吐率:0.52req/s] [内存消耗:6,526.90kb] [文件加载:137]
[ info ] [ BEHAVIOR ] Run Closure @app_init [ RunTime:0.000541s ]
[ info ] [ CACHE ] INIT File
[ info ] [ BEHAVIOR ] Run \addons\unishop\Unishop @app_init [ RunTime:0.012278s ]
[ info ] [ BEHAVIOR ] Run Closure @app_init [ RunTime:0.013084s ]
[ info ] [ LANG ] D:\php\weiwei\thinkphp\lang\zh-cn.php
[ info ] [ BEHAVIOR ] Run app\common\behavior\Common @app_dispatch [ RunTime:0.002737s ]
[ info ] [ ROUTE ] array (
'type' => 'module',
'module' =>
array (
0 => 'admin',
1 => 'ajax',
2 => 'lang',
),
)
[ info ] [ HEADER ] array (
'cookie' => 'PHPSESSID=4opmg9rsblfrfhgnefdmd6sh87; keeplogin=1%7C86400%7C1594447248%7Ceaad2efd816ec4c1c42d7c2809399bcb',
'accept-language' => 'zh-CN,zh;q=0.9,en;q=0.8',
'accept-encoding' => 'gzip, deflate',
'referer' => 'http://ww.com/aYhJTRKIWV.php/addon?addtabs=1',
'accept' => '*/*',
'user-agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36',
'connection' => 'keep-alive',
'host' => 'ww.com',
'content-length' => '',
'content-type' => '',
)
[ info ] [ PARAM ] array (
'callback' => 'define',
'controllername' => 'addon',
'v' => '1594433061',
)
[ info ] [ LANG ] D:\php\weiwei\public/../application/admin\lang\zh-cn.php
[ info ] [ BEHAVIOR ] Run app\common\behavior\Common @module_init [ RunTime:0.005201s ]
[ info ] [ SESSION ] INIT array (
'id' => '',
'var_session_id' => '',
'prefix' => 'think',
'type' => '',
'auto_start' => true,
)
[ info ] [ DB ] INIT mysql
[ info ] [ LANG ] D:\php\weiwei\public/../application/admin/lang/zh-cn/ajax.php
[ info ] [ RUN ] app\admin\controller\Ajax->lang[ D:\php\weiwei\application\admin\controller\Ajax.php ]
[ info ] [ LANG ] D:\php\weiwei\public/../application/admin/lang/zh-cn/addon.php
[ info ] [ BEHAVIOR ] Run app\admin\behavior\AdminLog @app_end [ RunTime:0.001665s ]
[ info ] [ LOG ] INIT File
---------------------------------------------------------------
[ 2020-07-11T10:04:25+08:00 ] 127.0.0.1 GET ww.com/aYhJTRKIWV.php/ajax/lang?callback=define&controllername=dashboard&v=1594433061
[运行时间:1.810851s] [吞吐率:0.55req/s] [内存消耗:6,522.13kb] [文件加载:137]
[ info ] [ BEHAVIOR ] Run Closure @app_init [ RunTime:0.000446s ]
[ info ] [ CACHE ] INIT File
[ info ] [ BEHAVIOR ] Run \addons\unishop\Unishop @app_init [ RunTime:0.009469s ]
[ info ] [ BEHAVIOR ] Run Closure @app_init [ RunTime:0.009784s ]
[ info ] [ LANG ] D:\php\weiwei\thinkphp\lang\zh-cn.php
[ info ] [ BEHAVIOR ] Run app\common\behavior\Common @app_dispatch [ RunTime:0.001804s ]
[ info ] [ ROUTE ] array (
'type' => 'module',
'module' =>
array (
0 => 'admin',
1 => 'ajax',
2 => 'lang',
),
)
[ info ] [ HEADER ] array (
'cookie' => 'PHPSESSID=4opmg9rsblfrfhgnefdmd6sh87; keeplogin=1%7C86400%7C1594447248%7Ceaad2efd816ec4c1c42d7c2809399bcb',
'accept-language' => 'zh-CN,zh;q=0.9,en;q=0.8',
'accept-encoding' => 'gzip, deflate',
'referer' => 'http://ww.com/aYhJTRKIWV.php/dashboard?addtabs=1',
'accept' => '*/*',
'user-agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36',
'connection' => 'keep-alive',
'host' => 'ww.com',
'content-length' => '',
'content-type' => '',
)
[ info ] [ PARAM ] array (
'callback' => 'define',
'controllername' => 'dashboard',
'v' => '1594433061',
)
[ info ] [ LANG ] D:\php\weiwei\public/../application/admin\lang\zh-cn.php
[ info ] [ BEHAVIOR ] Run app\common\behavior\Common @module_init [ RunTime:0.007585s ]
[ info ] [ SESSION ] INIT array (
'id' => '',
'var_session_id' => '',
'prefix' => 'think',
'type' => '',
'auto_start' => true,
)
[ info ] [ DB ] INIT mysql
[ info ] [ LANG ] D:\php\weiwei\public/../application/admin/lang/zh-cn/ajax.php
[ info ] [ RUN ] app\admin\controller\Ajax->lang[ D:\php\weiwei\application\admin\controller\Ajax.php ]
[ info ] [ LANG ] D:\php\weiwei\public/../application/admin/lang/zh-cn/dashboard.php
[ info ] [ BEHAVIOR ] Run app\admin\behavior\AdminLog @app_end [ RunTime:0.001269s ]
[ info ] [ LOG ] INIT File
---------------------------------------------------------------
[ 2020-07-11T10:04:28+08:00 ] 127.0.0.1 GET ww.com/aYhJTRKIWV.php/unishop/ads?addtabs=1
[运行时间:0.995416s] [吞吐率:1.00req/s] [内存消耗:6,403.11kb] [文件加载:137]
[ info ] [ BEHAVIOR ] Run Closure @app_init [ RunTime:0.000371s ]
[ info ] [ CACHE ] INIT File
[ info ] [ BEHAVIOR ] Run \addons\unishop\Unishop @app_init [ RunTime:0.006845s ]
[ info ] [ BEHAVIOR ] Run Closure @app_init [ RunTime:0.007127s ]
[ info ] [ LANG ] D:\php\weiwei\thinkphp\lang\zh-cn.php
[ info ] [ BEHAVIOR ] Run app\common\behavior\Common @app_dispatch [ RunTime:0.001712s ]
[ info ] [ ROUTE ] array (
'type' => 'module',
'module' =>
array (
0 => 'admin',
1 => 'unishop.ads',
2 => NULL,
),
)
[ info ] [ HEADER ] array (
'cookie' => 'PHPSESSID=4opmg9rsblfrfhgnefdmd6sh87; keeplogin=1%7C86400%7C1594447248%7Ceaad2efd816ec4c1c42d7c2809399bcb',
'accept-language' => 'zh-CN,zh;q=0.9,en;q=0.8',
'accept-encoding' => 'gzip, deflate',
'referer' => 'http://ww.com/aYhJTRKIWV.php/unishop/ads?ref=addtabs',
'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'user-agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36',
'upgrade-insecure-requests' => '1',
'connection' => 'keep-alive',
'host' => 'ww.com',
'content-length' => '',
'content-type' => '',
)
[ info ] [ PARAM ] array (
'addtabs' => '1',
)
[ info ] [ LANG ] D:\php\weiwei\public/../application/admin\lang\zh-cn.php
[ info ] [ BEHAVIOR ] Run app\common\behavior\Common @module_init [ RunTime:0.005116s ]
[ info ] [ SESSION ] INIT array (
'id' => '',
'var_session_id' => '',
'prefix' => 'think',
'type' => '',
'auto_start' => true,
)
[ info ] [ DB ] INIT mysql
[ info ] [ LANG ] D:\php\weiwei\public/../application/admin/lang/zh-cn/unishop/ads.php
[ info ] [ DB ] INIT mysql
[ info ] [ RUN ] app\admin\controller\unishop\Ads->index[ D:\php\weiwei\application\admin\controller\unishop\Ads.php ]
[ info ] [ VIEW ] D:\php\weiwei\public/../application/admin\view\unishop\ads\index.html [ array (
0 => 'breadcrumb',
1 => 'site',
2 => 'config',
3 => 'auth',
4 => 'admin',
) ]
[ info ] [ BEHAVIOR ] Run app\admin\behavior\AdminLog @app_end [ RunTime:0.000695s ]
[ info ] [ LOG ] INIT File
---------------------------------------------------------------
[ 2020-07-11T10:04:29+08:00 ] 127.0.0.1 GET ww.com/aYhJTRKIWV.php/ajax/lang?callback=define&controllername=unishop.ads&v=1594433067
[运行时间:0.763844s] [吞吐率:1.31req/s] [内存消耗:6,517.07kb] [文件加载:137]
[ info ] [ BEHAVIOR ] Run Closure @app_init [ RunTime:0.000306s ]
[ info ] [ CACHE ] INIT File
[ info ] [ BEHAVIOR ] Run \addons\unishop\Unishop @app_init [ RunTime:0.009899s ]
[ info ] [ BEHAVIOR ] Run Closure @app_init [ RunTime:0.010383s ]
[ info ] [ LANG ] D:\php\weiwei\thinkphp\lang\zh-cn.php
[ info ] [ BEHAVIOR ] Run app\common\behavior\Common @app_dispatch [ RunTime:0.001474s ]
[ info ] [ ROUTE ] array (
'type' => 'module',
'module' =>
array (
0 => 'admin',
1 => 'ajax',
2 => 'lang',
),
)
[ info ] [ HEADER ] array (
'cookie' => 'PHPSESSID=4opmg9rsblfrfhgnefdmd6sh87; keeplogin=1%7C86400%7C1594447248%7Ceaad2efd816ec4c1c42d7c2809399bcb',
'accept-language' => 'zh-CN,zh;q=0.9,en;q=0.8',
'accept-encoding' => 'gzip, deflate',
'referer' => 'http://ww.com/aYhJTRKIWV.php/unishop/ads?addtabs=1',
'accept' => '*/*',
'user-agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36',
'connection' => 'keep-alive',
'host' => 'ww.com',
'content-length' => '',
'content-type' => '',
)
[ info ] [ PARAM ] array (
'callback' => 'define',
'controllername' => 'unishop.ads',
'v' => '1594433067',
)
[ info ] [ LANG ] D:\php\weiwei\public/../application/admin\lang\zh-cn.php
[ info ] [ BEHAVIOR ] Run app\common\behavior\Common @module_init [ RunTime:0.003414s ]
[ info ] [ SESSION ] INIT array (
'id' => '',
'var_session_id' => '',
'prefix' => 'think',
'type' => '',
'auto_start' => true,
)
[ info ] [ DB ] INIT mysql
[ info ] [ LANG ] D:\php\weiwei\public/../application/admin/lang/zh-cn/ajax.php
[ info ] [ RUN ] app\admin\controller\Ajax->lang[ D:\php\weiwei\application\admin\controller\Ajax.php ]
[ info ] [ LANG ] D:\php\weiwei\public/../application/admin/lang/zh-cn/unishop/ads.php
[ info ] [ BEHAVIOR ] Run app\admin\behavior\AdminLog @app_end [ RunTime:0.000622s ]
[ info ] [ LOG ] INIT File
---------------------------------------------------------------
[ 2020-07-11T10:04:31+08:00 ] 127.0.0.1 GET ww.com/aYhJTRKIWV.php/unishop/ads/index?addtabs=1&sort=weigh&order=desc&offset=0&limit=10&filter=%7B%7D&op=%7B%7D&_=1594433068507
[运行时间:1.637466s] [吞吐率:0.61req/s] [内存消耗:6,857.67kb] [文件加载:144]
[ info ] [ BEHAVIOR ] Run Closure @app_init [ RunTime:0.000356s ]
[ info ] [ CACHE ] INIT File
[ info ] [ BEHAVIOR ] Run \addons\unishop\Unishop @app_init [ RunTime:0.011204s ]
[ info ] [ BEHAVIOR ] Run Closure @app_init [ RunTime:0.011444s ]
[ info ] [ LANG ] D:\php\weiwei\thinkphp\lang\zh-cn.php
[ info ] [ BEHAVIOR ] Run app\common\behavior\Common @app_dispatch [ RunTime:0.001476s ]
[ info ] [ ROUTE ] array (
'type' => 'module',
'module' =>
array (
0 => 'admin',
1 => 'unishop.ads',
2 => 'index',
),
)
[ info ] [ HEADER ] array (
'cookie' => 'PHPSESSID=4opmg9rsblfrfhgnefdmd6sh87; keeplogin=1%7C86400%7C1594447248%7Ceaad2efd816ec4c1c42d7c2809399bcb',
'accept-language' => 'zh-CN,zh;q=0.9,en;q=0.8',
'accept-encoding' => 'gzip, deflate',
'referer' => 'http://ww.com/aYhJTRKIWV.php/unishop/ads?addtabs=1',
'content-type' => 'application/json',
'user-agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36',
'x-requested-with' => 'XMLHttpRequest',
'accept' => 'application/json, text/javascript, */*; q=0.01',
'connection' => 'keep-alive',
'host' => 'ww.com',
'content-length' => '',
)
[ info ] [ PARAM ] array (
'addtabs' => '1',
'sort' => 'weigh',
'order' => 'desc',
'offset' => '0',
'limit' => '10',
'filter' => '{}',
'op' => '{}',
'_' => '1594433068507',
)
[ info ] [ LANG ] D:\php\weiwei\public/../application/admin\lang\zh-cn.php
[ info ] [ BEHAVIOR ] Run app\common\behavior\Common @module_init [ RunTime:0.009297s ]
[ info ] [ SESSION ] INIT array (
'id' => '',
'var_session_id' => '',
'prefix' => 'think',
'type' => '',
'auto_start' => true,
)
[ info ] [ DB ] INIT mysql
[ info ] [ LANG ] D:\php\weiwei\public/../application/admin/lang/zh-cn/unishop/ads.php
[ info ] [ DB ] INIT mysql
[ info ] [ RUN ] app\admin\controller\unishop\Ads->index[ D:\php\weiwei\application\admin\controller\unishop\Ads.php ]
[ info ] [ BEHAVIOR ] Run app\admin\behavior\AdminLog @app_end [ RunTime:0.000689s ]
[ info ] [ LOG ] INIT File
---------------------------------------------------------------
[ 2020-07-11T19:27:24+08:00 ] 127.0.0.1 GET ww.com/
[运行时间:3.222170s] [吞吐率:0.31req/s] [内存消耗:4,572.02kb] [文件加载:126]
[ info ] [ BEHAVIOR ] Run Closure @app_init [ RunTime:0.002962s ]
[ info ] [ CACHE ] INIT File
[ info ] [ BEHAVIOR ] Run \addons\unishop\Unishop @app_init [ RunTime:0.200339s ]
[ info ] [ BEHAVIOR ] Run Closure @app_init [ RunTime:0.200617s ]
[ info ] [ LANG ] D:\php\weiwei\thinkphp\lang\zh-cn.php
[ info ] [ BEHAVIOR ] Run app\common\behavior\Common @app_dispatch [ RunTime:0.024413s ]
[ info ] [ ROUTE ] array (
'type' => 'module',
'module' =>
array (
0 => '',
1 => NULL,
2 => NULL,
),
)
[ info ] [ HEADER ] array (
'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'user-agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36',
'proxy-connection' => 'keep-alive',
'accept-language' => 'zh-CN,zh;q=0.9,en;q=0.8',
'purpose' => 'prefetch',
'accept-encoding' => 'gzip, deflate',
'upgrade-insecure-requests' => '1',
'cookie' => 'PHPSESSID=4opmg9rsblfrfhgnefdmd6sh87; keeplogin=1%7C86400%7C1594447248%7Ceaad2efd816ec4c1c42d7c2809399bcb',
'host' => 'ww.com',
'content-length' => '',
'content-type' => '',
)
[ info ] [ PARAM ] array (
)
[ info ] [ LANG ] D:\php\weiwei\public/../application/index\lang\zh-cn.php
[ info ] [ BEHAVIOR ] Run app\common\behavior\Common @module_init [ RunTime:0.028965s ]
[ info ] [ LANG ] D:\php\weiwei\public/../application/index/lang/zh-cn/index.php
[ info ] [ RUN ] app\index\controller\Index->index[ D:\php\weiwei\application\index\controller\Index.php ]
[ info ] [ VIEW ] D:\php\weiwei\public/../application/index\view\index\index.html [ array (
0 => 'user',
1 => 'site',
2 => 'config',
) ]
[ info ] [ LOG ] INIT File

+ 0
- 1294
runtime/log/202008/27.log
File diff suppressed because it is too large
View File


+ 0
- 97
runtime/temp/1c87dbfb971a6c4fcc8d052effdebfe7.php View File

@@ -1,97 +0,0 @@
<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:69:"D:\php\weiwei\public/../application/admin\view\unishop\ads\index.html";i:1594368667;s:56:"D:\php\weiwei\application\admin\view\layout\default.html";i:1588765311;s:53:"D:\php\weiwei\application\admin\view\common\meta.html";i:1588765311;s:55:"D:\php\weiwei\application\admin\view\common\script.html";i:1588765311;}*/ ?>
<!DOCTYPE html>
<html lang="<?php echo $config['language']; ?>">
<head>
<meta charset="utf-8">
<title><?php echo (isset($title) && ($title !== '')?$title:''); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="renderer" content="webkit">

<link rel="shortcut icon" href="/assets/img/favicon.ico" />
<!-- Loading Bootstrap -->
<link href="/assets/css/backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">

<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
<!--[if lt IE 9]>
<script src="/assets/js/html5shiv.js"></script>
<script src="/assets/js/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
var require = {
config: <?php echo json_encode($config); ?>
};
</script>
</head>

<body class="inside-header inside-aside <?php echo defined('IS_DIALOG') && IS_DIALOG ? 'is-dialog' : ''; ?>">
<div id="main" role="main">
<div class="tab-content tab-addtabs">
<div id="content">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<section class="content-header hide">
<h1>
<?php echo __('Dashboard'); ?>
<small><?php echo __('Control panel'); ?></small>
</h1>
</section>
<?php if(!IS_DIALOG && !\think\Config::get('fastadmin.multiplenav')): ?>
<!-- RIBBON -->
<div id="ribbon">
<ol class="breadcrumb pull-left">
<li><a href="dashboard" class="addtabsit"><i class="fa fa-dashboard"></i> <?php echo __('Dashboard'); ?></a></li>
</ol>
<ol class="breadcrumb pull-right">
<?php foreach($breadcrumb as $vo): ?>
<li><a href="javascript:;" data-url="<?php echo $vo['url']; ?>"><?php echo $vo['title']; ?></a></li>
<?php endforeach; ?>
</ol>
</div>
<!-- END RIBBON -->
<?php endif; ?>
<div class="content">
<div class="panel panel-default panel-intro">
<?php echo build_heading(); ?>

<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
<a href="javascript:;" class="btn btn-primary btn-refresh" title="<?php echo __('Refresh'); ?>" ><i class="fa fa-refresh"></i> </a>
<a href="javascript:;" class="btn btn-success btn-add <?php echo $auth->check('unishop/ads/add')?'':'hide'; ?>" title="<?php echo __('Add'); ?>" ><i class="fa fa-plus"></i> <?php echo __('Add'); ?></a>
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled <?php echo $auth->check('unishop/ads/edit')?'':'hide'; ?>" title="<?php echo __('Edit'); ?>" ><i class="fa fa-pencil"></i> <?php echo __('Edit'); ?></a>
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled <?php echo $auth->check('unishop/ads/del')?'':'hide'; ?>" title="<?php echo __('Delete'); ?>" ><i class="fa fa-trash"></i> <?php echo __('Delete'); ?></a>
<!-- <a href="javascript:;" class="btn btn-danger btn-import <?php echo $auth->check('unishop/ads/import')?'':'hide'; ?>" title="<?php echo __('Import'); ?>" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> <?php echo __('Import'); ?></a>-->

<div class="dropdown btn-group <?php echo $auth->check('unishop/ads/multi')?'':'hide'; ?>">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> <?php echo __('More'); ?></a>
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> <?php echo __('Set to normal'); ?></a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> <?php echo __('Set to hidden'); ?></a></li>
</ul>
</div>


</div>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="<?php echo $auth->check('unishop/ads/edit'); ?>"
data-operate-del="<?php echo $auth->check('unishop/ads/del'); ?>"
width="100%">
</table>
</div>
</div>

</div>
</div>
</div>

</div>
</div>
</div>
</div>
</div>
</div>
<script src="/assets/js/require<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js" data-main="/assets/js/require-backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js?v=<?php echo htmlentities($site['version']); ?>"></script>
</body>
</html>

+ 0
- 356
runtime/temp/427a4182b202828e9f9afa9e250c5079.php View File

@@ -1,356 +0,0 @@
<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:63:"D:\php\weiwei\public/../application/admin\view\addon\index.html";i:1588765311;s:56:"D:\php\weiwei\application\admin\view\layout\default.html";i:1588765311;s:53:"D:\php\weiwei\application\admin\view\common\meta.html";i:1588765311;s:55:"D:\php\weiwei\application\admin\view\common\script.html";i:1588765311;}*/ ?>
<!DOCTYPE html>
<html lang="<?php echo $config['language']; ?>">
<head>
<meta charset="utf-8">
<title><?php echo (isset($title) && ($title !== '')?$title:''); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="renderer" content="webkit">

<link rel="shortcut icon" href="/assets/img/favicon.ico" />
<!-- Loading Bootstrap -->
<link href="/assets/css/backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">

<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
<!--[if lt IE 9]>
<script src="/assets/js/html5shiv.js"></script>
<script src="/assets/js/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
var require = {
config: <?php echo json_encode($config); ?>
};
</script>
</head>

<body class="inside-header inside-aside <?php echo defined('IS_DIALOG') && IS_DIALOG ? 'is-dialog' : ''; ?>">
<div id="main" role="main">
<div class="tab-content tab-addtabs">
<div id="content">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<section class="content-header hide">
<h1>
<?php echo __('Dashboard'); ?>
<small><?php echo __('Control panel'); ?></small>
</h1>
</section>
<?php if(!IS_DIALOG && !\think\Config::get('fastadmin.multiplenav')): ?>
<!-- RIBBON -->
<div id="ribbon">
<ol class="breadcrumb pull-left">
<li><a href="dashboard" class="addtabsit"><i class="fa fa-dashboard"></i> <?php echo __('Dashboard'); ?></a></li>
</ol>
<ol class="breadcrumb pull-right">
<?php foreach($breadcrumb as $vo): ?>
<li><a href="javascript:;" data-url="<?php echo $vo['url']; ?>"><?php echo $vo['title']; ?></a></li>
<?php endforeach; ?>
</ol>
</div>
<!-- END RIBBON -->
<?php endif; ?>
<div class="content">
<style type="text/css">
.layui-layer-pay .layui-layer-content {
padding: 0;
height: 600px !important;
}

.layui-layer-pay {
border: none;
}

.payimg {
position: relative;
width: 800px;
height: 600px;
}

.payimg .alipaycode {
position: absolute;
left: 265px;
top: 442px;
}

.payimg .wechatcode {
position: absolute;
left: 660px;
top: 442px;
}

.thumbnail img {
width: 100%;
}

.fixed-table-toolbar .pull-right.search {
min-width: 300px;
}

a.title {
color: #444;
}

.releasetips {
position: relative;
}

.releasetips i {
display: block;
background: #f00;
border-radius: 50%;
width: 0.3em;
height: 0.3em;
top: 0px;
right: -8px;
position: absolute;
box-shadow: 0px 0px 2px #f11414;
}
.form-userinfo .breadcrumb {
margin-bottom:10px;
}
.btn-toggle {
padding:0;
}
</style>
<div class="panel panel-default panel-intro">
<div class="panel-heading">
<?php echo build_heading(null,FALSE); if(\think\Config::get('fastadmin.api_url')): ?>
<ul class="nav nav-tabs nav-category">
<li class="active"><a href="javascript:;" data-id=""><?php echo __('All'); ?></a></li>
<li><a href="javascript:;" data-id="0"><?php echo __('Uncategoried'); ?></a></li>
</ul>
<?php endif; ?>
</div>

<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
<?php echo build_toolbar('refresh'); ?>
<button type="button" id="plupload-addon" class="btn btn-danger plupload" data-url="addon/local" data-mimetype="application/zip" data-multiple="false"><i class="fa fa-upload"></i>
<?php echo __('Offline install'); ?>
</button>
<?php if(\think\Config::get('fastadmin.api_url')): ?>
<div class="btn-group">
<a href="#" class="btn btn-info btn-switch active" data-type="all"><i class="fa fa-list"></i> <?php echo __('All'); ?></a>
<a href="#" class="btn btn-info btn-switch" data-type="free"><i class="fa fa-gift"></i> <?php echo __('Free'); ?></a>
<a href="#" class="btn btn-info btn-switch" data-type="price"><i class="fa fa-rmb"></i> <?php echo __('Paying'); ?></a>
<a href="#" class="btn btn-info btn-switch" data-type="local" data-url="addon/downloaded"><i class="fa fa-laptop"></i> <?php echo __('Local addon'); ?></a>
</div>
<a class="btn btn-primary btn-userinfo" href="javascript:;"><i class="fa fa-user"></i> <?php echo __('Userinfo'); ?></a>
<?php endif; ?>
</div>
<table id="table" class="table table-striped table-bordered table-hover" width="100%">

</table>

</div>
</div>

</div>
</div>
</div>
<script id="searchformtpl" type="text/html">
<form action="" class="form-commonsearch hide">
<div class="well" style="box-shadow:none;border-radius:2px;margin-bottom:10px;">
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-3">
<div class="form-group">
<label class="control-label"><?php echo __('Title'); ?></label>
<input class="operate" type="hidden" data-name="title" value="like"/>
<input class="form-control" type="text" name="title" placeholder="" value=""/>
</div>
</div>
<div class="col-xs-12 col-sm-6 col-md-3">
<div class="form-group">
<label class="control-label"><?php echo __('Type'); ?></label>
<input class="operate" type="hidden" data-name="type" value="="/>
<input class="form-control" type="text" name="type" placeholder="all" value=""/>
</div>
</div>
<div class="col-xs-12 col-sm-6 col-md-3">
<div class="form-group">
<label class="control-label"><?php echo __('Category'); ?></label>
<input type="hidden" class="operate" data-name="category_id" value="="/>
<input class="form-control" name="category_id" type="text" value="">
</div>
</div>
<div class="col-xs-12 col-sm-6 col-md-3">
<div class="form-group">
<label class="control-label"><?php echo __('Version'); ?></label>
<input type="hidden" class="operate" data-name="faversion" value="="/>
<input class="form-control" name="faversion" type="text" value="<?php echo \think\Config::get('fastadmin.version'); ?>">
</div>
</div>
<div class="col-xs-12 col-sm-6 col-md-3">
<div class="form-group">
<label class="control-label"></label>
<div class="row">
<div class="col-xs-6">
<input type="submit" class="btn btn-success btn-block" value="<?php echo __('Submit'); ?>"/>
</div>
<div class="col-xs-6">
<input type="reset" class="btn btn-primary btn-block" value="<?php echo __('Reset'); ?>"/>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</script>
<script id="logintpl" type="text/html">
<div>
<form class="form-horizontal">
<fieldset>
<div class="alert alert-dismissable alert-danger">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong><?php echo __('Warning'); ?></strong><br/><?php echo __('Login tips'); ?>
</div>
<div class="form-group">
<div class="col-lg-12">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-user"></i></span>
<input type="text" class="form-control" id="inputAccount" value=""
placeholder="<?php echo __('Your username or email'); ?>">
</div>
</div>
</div>
<div class="form-group">
<div class="col-lg-12">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-lock"></i></span>
<input type="password" class="form-control" id="inputPassword" value=""
placeholder="<?php echo __('Your password'); ?>">
</div>
</div>
</div>
</fieldset>
</form>
</div>
</script>
<script id="userinfotpl" type="text/html">
<div>
<form class="form-horizontal form-userinfo">
<fieldset>
<div class="alert alert-dismissable alert-success">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong><?php echo __('Warning'); ?></strong><br/><?php echo __('Logined tips', '<%=username%>'); ?>
</div>
</fieldset>
<div class="breadcrumb"><a href="https://www.fastadmin.net/user/myaddon.html" target="_blank"><i class="fa fa-money"></i> <?php echo __('My addons'); ?></a></div>
<div class="breadcrumb"><a href="https://www.fastadmin.net/user/addon.html" target="_blank"><i class="fa fa-upload"></i> <?php echo __('My posts'); ?></a></div>
</form>
</div>
</script>
<script id="paytpl" type="text/html">
<div class="payimg" style="background:url('<%=payimg%>') 0 0 no-repeat;background-size:cover;">
<%if(paycode){%>
<div class="alipaycode">
<%=paycode%>
</div>
<div class="wechatcode">
<%=paycode%>
</div>
<%}%>
</div>
</script>
<script id="conflicttpl" type="text/html">
<div class="alert alert-dismissable alert-danger">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong><?php echo __('Warning'); ?></strong> <?php echo __('Conflict tips'); ?>
</div>
<table class="table table-striped">
<thead>
<tr>
<th>#</th>
<th><?php echo __('File'); ?></th>
</tr>
</thead>
<tbody>
<%for(var i=0;i < conflictlist.length;i++){%>
<tr>
<th scope="row"><%=i+1%></th>
<td><%=conflictlist[i]%></td>
</tr>
<%}%>
</tbody>
</table>
</script>
<!--@formatter:off-->
<script id="operatetpl" type="text/html">
<% var labelarr = ['primary', 'success', 'info', 'danger', 'warning']; %>
<% var label = labelarr[item.id % 5]; %>
<% var addon = item.addon; %>

<div class="operate" data-id="<%=item.id%>" data-name="<%=item.name%>">
<% if(!addon){ %>
<% if(typeof item.releaselist !="undefined" && item.releaselist.length>1){%>
<span class="btn-group">
<a href="javascript:;" class="btn btn-xs btn-primary btn-success btn-install"
data-type="<%=item.price<=0?'free':'price';%>" data-donateimage="<%=item.donateimage%>"
data-version="<%=item.version%>"><i class="fa fa-cloud-download"></i> <?php echo __('Install'); ?></a>
<a class="btn btn-xs btn-success dropdown-toggle" data-toggle="dropdown" href="javascript:;">
<span class="fa fa-caret-down"></span>
</a>
<ul class="dropdown-menu">
<% for(var j=0;j< item.releaselist.length;j++){ %>
<li><a href="javascript:;" class="btn-install" data-type="<%=item.price<=0?'free':'price';%>"
data-donateimage="<%=item.donateimage%>"
data-version="<%=item.releaselist[j].version%>"><%=item.releaselist[j].version%></a></li>
<% } %>
</ul>
</span>
<% }else{%>
<a href="javascript:;" class="btn btn-xs btn-primary btn-success btn-install"
data-type="<%=item.price<=0?'free':'price';%>" data-donateimage="<%=item.donateimage%>"
data-version="<%=item.version%>"><i class="fa fa-cloud-download"></i> <?php echo __('Install'); ?></a>
<% } %>

<% if(item.demourl){ %>
<a href="<%=item.demourl%>" class="btn btn-xs btn-primary btn-info btn-demo" target="_blank">
<i class="fa fa-flash"></i> <?php echo __('Demo'); ?>
</a>
<% } %>
<% } else {%>
<% if(addon.version!=item.version){%>
<% if(typeof item.releaselist !="undefined" && item.releaselist.length>1){%>
<span class="btn-group">
<a href="javascript:;" class="btn btn-xs btn-info btn-success btn-upgrade"
data-version="<%=item.version%>"><i class="fa fa-cloud"></i> <?php echo __('Upgrade'); ?></a>
<a class="btn btn-xs btn-info dropdown-toggle" data-toggle="dropdown"
href="javascript:;">
<span class="fa fa-caret-down"></span>
</a>
<ul class="dropdown-menu">
<% for(var j=0;j< item.releaselist.length;j++){ %>
<li><a href="javascript:;" class="btn-upgrade"
data-version="<%=item.releaselist[j].version%>"><%=item.releaselist[j].version%></a></li>
<% } %>
</ul>
</span>
<% }else{%>
<a href="javascript:;" class="btn btn-xs btn-info btn-upgrade" title="<?php echo __('Upgrade'); ?>" data-version="<%=item.version%>"><i
class="fa fa-cloud"></i> <?php echo __('Upgrade'); ?></a>
<% }%>
<% }%>
<% if(addon.config){ %>
<a href="javascript:;" class="btn btn-xs btn-primary btn-config" title="<?php echo __('Setting'); ?>"><i class="fa fa-pencil"></i>
<?php echo __('Setting'); ?></a>
<% } %>
<a href="javascript:;" class="btn btn-xs btn-danger btn-uninstall" title="<?php echo __('Uninstall'); ?>"><i class="fa fa-times"></i>
<?php echo __('Uninstall'); ?></a>
<% } %>
</div>
</script>
<!--@formatter:on-->
</div>
</div>
</div>
</div>
</div>
</div>
<script src="/assets/js/require<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js" data-main="/assets/js/require-backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js?v=<?php echo htmlentities($site['version']); ?>"></script>
</body>
</html>

+ 0
- 276
runtime/temp/483ec8a59636df7a935a0ca16d447796.php View File

@@ -1,276 +0,0 @@
<?php if (!defined('THINK_PATH')) exit(); /*a:6:{s:63:"D:\php\weiwei\public/../application/admin\view\index\index.html";i:1588765311;s:53:"D:\php\weiwei\application\admin\view\common\meta.html";i:1588765311;s:55:"D:\php\weiwei\application\admin\view\common\header.html";i:1588765311;s:53:"D:\php\weiwei\application\admin\view\common\menu.html";i:1588765311;s:56:"D:\php\weiwei\application\admin\view\common\control.html";i:1588765311;s:55:"D:\php\weiwei\application\admin\view\common\script.html";i:1588765311;}*/ ?>
<!DOCTYPE html>
<html lang="<?php echo $config['language']; ?>">
<head>
<!-- 加载样式及META信息 -->
<meta charset="utf-8">
<title><?php echo (isset($title) && ($title !== '')?$title:''); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="renderer" content="webkit">

<link rel="shortcut icon" href="/assets/img/favicon.ico" />
<!-- Loading Bootstrap -->
<link href="/assets/css/backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">

<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
<!--[if lt IE 9]>
<script src="/assets/js/html5shiv.js"></script>
<script src="/assets/js/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
var require = {
config: <?php echo json_encode($config); ?>
};
</script>
</head>
<body class="hold-transition skin-green sidebar-mini fixed <?php if(\think\Config::get('fastadmin.multiplenav')): ?>multiplenav<?php endif; ?>" id="tabs">
<div class="wrapper">

<!-- 头部区域 -->
<header id="header" class="main-header">
<!-- Logo -->
<a href="javascript:;" class="logo">
<!-- 迷你模式下Logo的大小为50X50 -->
<span class="logo-mini"><?php echo htmlentities(mb_strtoupper(mb_substr($site['name'],0,4,'utf-8'),'utf-8')); ?></span>
<!-- 普通模式下Logo -->
<span class="logo-lg"><b><?php echo htmlentities(mb_substr($site['name'],0,4,'utf-8')); ?></b><?php echo htmlentities(mb_substr($site['name'],4,null,'utf-8')); ?></span>
</a>

<!-- 顶部通栏样式 -->
<nav class="navbar navbar-static-top">

<!--第一级菜单-->
<div id="firstnav">
<!-- 边栏切换按钮-->
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
<span class="sr-only"><?php echo __('Toggle navigation'); ?></span>
</a>

<!--如果不想在顶部显示角标,则给ul加上disable-top-badge类即可-->
<ul class="nav nav-tabs nav-addtabs disable-top-badge hidden-xs" role="tablist">
<?php echo $navlist; ?>
</ul>

<div class="navbar-custom-menu">
<ul class="nav navbar-nav">

<li>
<a href="/" target="_blank"><i class="fa fa-home" style="font-size:14px;"></i></a>
</li>

<!-- 清除缓存 -->
<li>
<a href="javascript:;" data-toggle="dropdown" title="<?php echo __('Wipe cache'); ?>">
<i class="fa fa-trash"></i>
</a>
<ul class="dropdown-menu wipecache">
<li><a href="javascript:;" data-type="all"><i class="fa fa-trash"></i> <?php echo __('Wipe all cache'); ?></a></li>
<li class="divider"></li>
<li><a href="javascript:;" data-type="content"><i class="fa fa-file-text"></i> <?php echo __('Wipe content cache'); ?></a></li>
<li><a href="javascript:;" data-type="template"><i class="fa fa-file-image-o"></i> <?php echo __('Wipe template cache'); ?></a></li>
<li><a href="javascript:;" data-type="addons"><i class="fa fa-rocket"></i> <?php echo __('Wipe addons cache'); ?></a></li>
</ul>
</li>

<!-- 多语言列表 -->
<?php if(\think\Config::get('lang_switch_on')): ?>
<li class="hidden-xs">
<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-language"></i></a>
<ul class="dropdown-menu">
<li class="<?php echo $config['language']=='zh-cn'?'active':''; ?>">
<a href="?ref=addtabs&lang=zh-cn">简体中文</a>
</li>
<li class="<?php echo $config['language']=='en'?'active':''; ?>">
<a href="?ref=addtabs&lang=en">English</a>
</li>
</ul>
</li>
<?php endif; ?>

<!-- 全屏按钮 -->
<li class="hidden-xs">
<a href="#" data-toggle="fullscreen"><i class="fa fa-arrows-alt"></i></a>
</li>

<!-- 账号信息下拉框 -->
<li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<img src="<?php echo htmlentities(cdnurl($admin['avatar'])); ?>" class="user-image" alt="<?php echo htmlentities($admin['nickname']); ?>">
<span class="hidden-xs"><?php echo htmlentities($admin['nickname']); ?></span>
</a>
<ul class="dropdown-menu">
<!-- User image -->
<li class="user-header">
<img src="<?php echo htmlentities(cdnurl($admin['avatar'])); ?>" class="img-circle" alt="">

<p>
<?php echo htmlentities($admin['nickname']); ?>
<small><?php echo date("Y-m-d H:i:s",$admin['logintime']); ?></small>
</p>
</li>
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
<a href="general/profile" class="btn btn-primary addtabsit"><i class="fa fa-user"></i>
<?php echo __('Profile'); ?></a>
</div>
<div class="pull-right">
<a href="<?php echo url('index/logout'); ?>" class="btn btn-danger"><i class="fa fa-sign-out"></i>
<?php echo __('Logout'); ?></a>
</div>
</li>
</ul>
</li>
<!-- 控制栏切换按钮 -->
<li class="hidden-xs">
<a href="javascript:;" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
</li>
</ul>
</div>
</div>

<?php if(\think\Config::get('fastadmin.multiplenav')): ?>
<!--第二级菜单,只有在multiplenav开启时才显示-->
<div id="secondnav">
<ul class="nav nav-tabs nav-addtabs disable-top-badge" role="tablist">
<?php if($fixedmenu): ?>
<li role="presentation" id="tab_<?php echo $fixedmenu['id']; ?>" class="<?php echo $referermenu?'':'active'; ?>"><a href="#con_<?php echo $fixedmenu['id']; ?>" node-id="<?php echo $fixedmenu['id']; ?>" aria-controls="<?php echo $fixedmenu['id']; ?>" role="tab" data-toggle="tab"><i class="fa fa-dashboard fa-fw"></i> <span><?php echo $fixedmenu['title']; ?></span> <span class="pull-right-container"> </span></a></li>
<?php endif; if($referermenu): ?>
<li role="presentation" id="tab_<?php echo $referermenu['id']; ?>" class="active"><a href="#con_<?php echo $referermenu['id']; ?>" node-id="<?php echo $referermenu['id']; ?>" aria-controls="<?php echo $referermenu['id']; ?>" role="tab" data-toggle="tab"><i class="fa fa-list fa-fw"></i> <span><?php echo $referermenu['title']; ?></span> <span class="pull-right-container"> </span></a> <i class="close-tab fa fa-remove"></i></li>
<?php endif; ?>
</ul>
</div>
<?php endif; ?>
</nav>
</header>

<!-- 左侧菜单栏 -->
<aside class="main-sidebar">
<!-- 左侧菜单栏 -->
<section class="sidebar">
<!-- 管理员信息 -->
<div class="user-panel hidden-xs">
<div class="pull-left image">
<a href="general/profile" class="addtabsit"><img src="<?php echo htmlentities(cdnurl($admin['avatar'])); ?>" class="img-circle" /></a>
</div>
<div class="pull-left info">
<p><?php echo htmlentities($admin['nickname']); ?></p>
<i class="fa fa-circle text-success"></i> <?php echo __('Online'); ?>
</div>
</div>

<!-- 菜单搜索 -->
<form action="" method="get" class="sidebar-form" onsubmit="return false;">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="<?php echo __('Search menu'); ?>">
<span class="input-group-btn">
<button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
</button>
</span>
<div class="menuresult list-group sidebar-form hide">
</div>
</div>
</form>

<!-- 移动端一级菜单 -->
<div class="mobilenav visible-xs">

</div>

<!--如果想始终显示子菜单,则给ul加上show-submenu类即可,当multiplenav开启的情况下默认为展开-->
<ul class="sidebar-menu <?php if(\think\Config::get('fastadmin.multiplenav')): ?>show-submenu<?php endif; ?>">

<!-- 菜单可以在 后台管理->权限管理->菜单规则 中进行增删改排序 -->
<?php echo $menulist; ?>

</ul>
</section>
</aside>

<!-- 主体内容区域 -->
<div class="content-wrapper tab-content tab-addtabs">
<?php if($fixedmenu): ?>
<div role="tabpanel" class="tab-pane <?php echo $referermenu?'':'active'; ?>" id="con_<?php echo $fixedmenu['id']; ?>">
<iframe src="<?php echo $fixedmenu['url']; ?>?addtabs=1" width="100%" height="100%" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling-x="no" scrolling-y="auto" allowtransparency="yes"></iframe>
</div>
<?php endif; if($referermenu): ?>
<div role="tabpanel" class="tab-pane active" id="con_<?php echo $referermenu['id']; ?>">
<iframe src="<?php echo $referermenu['url']; ?>?addtabs=1" width="100%" height="100%" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling-x="no" scrolling-y="auto" allowtransparency="yes"></iframe>
</div>
<?php endif; ?>
</div>

<!-- 底部链接,默认隐藏 -->
<footer class="main-footer hide">
<div class="pull-right hidden-xs">
</div>
<strong>Copyright &copy; 2017-2020 <a href="/"><?php echo $site['name']; ?></a>.</strong> All rights reserved.
</footer>

<!-- 右侧控制栏 -->
<div class="control-sidebar-bg"></div>
<style>
.skin-list li{
float:left; width: 33.33333%; padding: 5px;
}
.skin-list li a{
display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4);
}
</style>
<!-- Control Sidebar -->
<aside class="control-sidebar control-sidebar-dark">
<!-- Create the tabs -->
<ul class="nav nav-tabs nav-justified control-sidebar-tabs">
<li class="active"><a href="#control-sidebar-setting-tab" data-toggle="tab" aria-expanded="true"><i class="fa fa-wrench"></i></a></li>
<li><a href="#control-sidebar-home-tab" data-toggle="tab"><i class="fa fa-home"></i></a></li>
<li><a href="#control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-gears"></i></a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<!-- Home tab content -->
<div class="tab-pane active" id="control-sidebar-setting-tab">
<h4 class="control-sidebar-heading"><?php echo __('Layout Options'); ?></h4>
<div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-layout="fixed" class="pull-right"> <?php echo __('Fixed Layout'); ?></label><p><?php echo __("You can't use fixed and boxed layouts together"); ?></p></div>
<div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-layout="layout-boxed" class="pull-right"> <?php echo __('Boxed Layout'); ?></label><p><?php echo __('Activate the boxed layout'); ?></p></div>
<div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-layout="sidebar-collapse" class="pull-right"> <?php echo __('Toggle Sidebar'); ?></label><p><?php echo __("Toggle the left sidebar's state (open or collapse)"); ?></p></div>
<div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-enable="expandOnHover" class="pull-right"> <?php echo __('Sidebar Expand on Hover'); ?></label><p><?php echo __('Let the sidebar mini expand on hover'); ?></p></div>
<div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-menu="show-submenu" class="pull-right"> <?php echo __('Show sub menu'); ?></label><p><?php echo __('Always show sub menu'); ?></p></div>
<div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-menu="disable-top-badge" class="pull-right"> <?php echo __('Disable top menu badge'); ?></label><p><?php echo __('Disable top menu badge without left menu'); ?></p></div>
<div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-controlsidebar="control-sidebar-open" class="pull-right"> <?php echo __('Toggle Right Sidebar Slide'); ?></label><p><?php echo __('Toggle between slide over content and push content effects'); ?></p></div>
<div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-sidebarskin="toggle" class="pull-right"> <?php echo __('Toggle Right Sidebar Skin'); ?></label><p><?php echo __('Toggle between dark and light skins for the right sidebar'); ?></p></div>
<h4 class="control-sidebar-heading"><?php echo __('Skins'); ?></h4>
<ul class="list-unstyled clearfix skin-list">
<li><a href="javascript:;" data-skin="skin-blue" style="" class="clearfix full-opacity-hover"><div><span style="display:block; width: 20%; float: left; height: 7px; background: #367fa9;"></span><span class="bg-light-blue" style="display:block; width: 80%; float: left; height: 7px;"></span></div><div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin">Blue</p></li>
<li><a href="javascript:;" data-skin="skin-white" class="clearfix full-opacity-hover"><div style="box-shadow: 0 0 2px rgba(0,0,0,0.1)" class="clearfix"><span style="display:block; width: 20%; float: left; height: 7px; background: #fefefe;"></span><span style="display:block; width: 80%; float: left; height: 7px; background: #fefefe;"></span></div><div><span style="display:block; width: 20%; float: left; height: 20px; background: #222;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin">White</p></li>
<li><a href="javascript:;" data-skin="skin-purple" class="clearfix full-opacity-hover"><div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-purple-active"></span><span class="bg-purple" style="display:block; width: 80%; float: left; height: 7px;"></span></div><div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin">Purple</p></li>
<li><a href="javascript:;" data-skin="skin-green" class="clearfix full-opacity-hover"><div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-green-active"></span><span class="bg-green" style="display:block; width: 80%; float: left; height: 7px;"></span></div><div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin">Green</p></li>
<li><a href="javascript:;" data-skin="skin-red" class="clearfix full-opacity-hover"><div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-red-active"></span><span class="bg-red" style="display:block; width: 80%; float: left; height: 7px;"></span></div><div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin">Red</p></li>
<li><a href="javascript:;" data-skin="skin-yellow" class="clearfix full-opacity-hover"><div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-yellow-active"></span><span class="bg-yellow" style="display:block; width: 80%; float: left; height: 7px;"></span></div><div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin">Yellow</p></li>
<li><a href="javascript:;" data-skin="skin-blue-light" class="clearfix full-opacity-hover"><div><span style="display:block; width: 20%; float: left; height: 7px; background: #367fa9;"></span><span class="bg-light-blue" style="display:block; width: 80%; float: left; height: 7px;"></span></div><div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin" style="font-size: 12px">Blue Light</p></li>
<li><a href="javascript:;" data-skin="skin-white-light" class="clearfix full-opacity-hover"><div style="box-shadow: 0 0 2px rgba(0,0,0,0.1)" class="clearfix"><span style="display:block; width: 20%; float: left; height: 7px; background: #fefefe;"></span><span style="display:block; width: 80%; float: left; height: 7px; background: #fefefe;"></span></div><div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin" style="font-size: 12px">White Light</p></li>
<li><a href="javascript:;" data-skin="skin-purple-light" class="clearfix full-opacity-hover"><div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-purple-active"></span><span class="bg-purple" style="display:block; width: 80%; float: left; height: 7px;"></span></div><div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin" style="font-size: 12px">Purple Light</p></li>
<li><a href="javascript:;" data-skin="skin-green-light" class="clearfix full-opacity-hover"><div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-green-active"></span><span class="bg-green" style="display:block; width: 80%; float: left; height: 7px;"></span></div><div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin" style="font-size: 12px">Green Light</p></li>
<li><a href="javascript:;" data-skin="skin-red-light" class="clearfix full-opacity-hover"><div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-red-active"></span><span class="bg-red" style="display:block; width: 80%; float: left; height: 7px;"></span></div><div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin" style="font-size: 12px">Red Light</p></li>
<li><a href="javascript:;" data-skin="skin-yellow-light" class="clearfix full-opacity-hover"><div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-yellow-active"></span><span class="bg-yellow" style="display:block; width: 80%; float: left; height: 7px;"></span></div><div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin" style="font-size: 12px;">Yellow Light</p></li>
</ul>
</div>
<!-- /.tab-pane -->
<!-- Home tab content -->
<div class="tab-pane" id="control-sidebar-home-tab">
<h4 class="control-sidebar-heading"><?php echo __('Home'); ?></h4>
</div>
<!-- /.tab-pane -->
<!-- Settings tab content -->
<div class="tab-pane" id="control-sidebar-settings-tab">
<h4 class="control-sidebar-heading"><?php echo __('Setting'); ?></h4>
</div>
<!-- /.tab-pane -->
</div>
</aside>
<!-- /.control-sidebar -->
</div>

<!-- 加载JS脚本 -->
<script src="/assets/js/require<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js" data-main="/assets/js/require-backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js?v=<?php echo htmlentities($site['version']); ?>"></script>
</body>
</html>

+ 0
- 124
runtime/temp/55a3fb71333a8a6df11d7c7ffd74691d.php View File

@@ -1,124 +0,0 @@
<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:67:"D:\php\gitea\shop\public/../application/admin\view\index\login.html";i:1588765311;s:57:"D:\php\gitea\shop\application\admin\view\common\meta.html";i:1588765311;s:59:"D:\php\gitea\shop\application\admin\view\common\script.html";i:1588765311;}*/ ?>
<!DOCTYPE html>
<html lang="<?php echo $config['language']; ?>">
<head>
<meta charset="utf-8">
<title><?php echo (isset($title) && ($title !== '')?$title:''); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="renderer" content="webkit">

<link rel="shortcut icon" href="/assets/img/favicon.ico" />
<!-- Loading Bootstrap -->
<link href="/assets/css/backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">

<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
<!--[if lt IE 9]>
<script src="/assets/js/html5shiv.js"></script>
<script src="/assets/js/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
var require = {
config: <?php echo json_encode($config); ?>
};
</script>

<style type="text/css">
body {
color:#999;
background:url('<?php echo $background; ?>');
background-size:cover;
}
a {
color:#fff;
}
.login-panel{margin-top:150px;}
.login-screen {
max-width:400px;
padding:0;
margin:100px auto 0 auto;

}
.login-screen .well {
border-radius: 3px;
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
background: rgba(255,255,255, 0.2);
}
.login-screen .copyright {
text-align: center;
}
@media(max-width:767px) {
.login-screen {
padding:0 20px;
}
}
.profile-img-card {
width: 100px;
height: 100px;
margin: 10px auto;
display: block;
-moz-border-radius: 50%;
-webkit-border-radius: 50%;
border-radius: 50%;
}
.profile-name-card {
text-align: center;
}

#login-form {
margin-top:20px;
}
#login-form .input-group {
margin-bottom:15px;
}

</style>
</head>
<body>
<div class="container">
<div class="login-wrapper">
<div class="login-screen">
<div class="well">
<div class="login-form">
<img id="profile-img" class="profile-img-card" src="/assets/img/avatar.png" />
<p id="profile-name" class="profile-name-card"></p>

<form action="" method="post" id="login-form">
<div id="errtips" class="hide"></div>
<?php echo token(); ?>
<div class="input-group">
<div class="input-group-addon"><span class="glyphicon glyphicon-user" aria-hidden="true"></span></div>
<input type="text" class="form-control" id="pd-form-username" placeholder="<?php echo __('Username'); ?>" name="username" autocomplete="off" value="" data-rule="<?php echo __('Username'); ?>:required;username" />
</div>

<div class="input-group">
<div class="input-group-addon"><span class="glyphicon glyphicon-lock" aria-hidden="true"></span></div>
<input type="password" class="form-control" id="pd-form-password" placeholder="<?php echo __('Password'); ?>" name="password" autocomplete="off" value="" data-rule="<?php echo __('Password'); ?>:required;password" />
</div>
<?php if(\think\Config::get('fastadmin.login_captcha')): ?>
<div class="input-group">
<div class="input-group-addon"><span class="glyphicon glyphicon-option-horizontal" aria-hidden="true"></span></div>
<input type="text" name="captcha" class="form-control" placeholder="<?php echo __('Captcha'); ?>" data-rule="<?php echo __('Captcha'); ?>:required;length(4)" />
<span class="input-group-addon" style="padding:0;border:none;cursor:pointer;">
<img src="<?php echo rtrim('/', '/'); ?>/index.php?s=/captcha" width="100" height="30" onclick="this.src = '<?php echo rtrim('/', '/'); ?>/index.php?s=/captcha&r=' + Math.random();"/>
</span>
</div>
<?php endif; ?>
<div class="form-group">
<label class="inline" for="keeplogin">
<input type="checkbox" name="keeplogin" id="keeplogin" value="1" />
<?php echo __('Keep login'); ?>
</label>
</div>
<div class="form-group">
<button type="submit" class="btn btn-success btn-lg btn-block"><?php echo __('Sign in'); ?></button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script src="/assets/js/require<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js" data-main="/assets/js/require-backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js?v=<?php echo htmlentities($site['version']); ?>"></script>
</body>
</html>

+ 0
- 276
runtime/temp/7aad3da33b80c4ebe7ec1de4bfed85bb.php View File

@@ -1,276 +0,0 @@
<?php if (!defined('THINK_PATH')) exit(); /*a:6:{s:67:"D:\php\gitea\shop\public/../application/admin\view\index\index.html";i:1588765311;s:57:"D:\php\gitea\shop\application\admin\view\common\meta.html";i:1588765311;s:59:"D:\php\gitea\shop\application\admin\view\common\header.html";i:1588765311;s:57:"D:\php\gitea\shop\application\admin\view\common\menu.html";i:1588765311;s:60:"D:\php\gitea\shop\application\admin\view\common\control.html";i:1588765311;s:59:"D:\php\gitea\shop\application\admin\view\common\script.html";i:1588765311;}*/ ?>
<!DOCTYPE html>
<html lang="<?php echo $config['language']; ?>">
<head>
<!-- 加载样式及META信息 -->
<meta charset="utf-8">
<title><?php echo (isset($title) && ($title !== '')?$title:''); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="renderer" content="webkit">

<link rel="shortcut icon" href="/assets/img/favicon.ico" />
<!-- Loading Bootstrap -->
<link href="/assets/css/backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">

<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
<!--[if lt IE 9]>
<script src="/assets/js/html5shiv.js"></script>
<script src="/assets/js/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
var require = {
config: <?php echo json_encode($config); ?>
};
</script>
</head>
<body class="hold-transition skin-green sidebar-mini fixed <?php if(\think\Config::get('fastadmin.multiplenav')): ?>multiplenav<?php endif; ?>" id="tabs">
<div class="wrapper">

<!-- 头部区域 -->
<header id="header" class="main-header">
<!-- Logo -->
<a href="javascript:;" class="logo">
<!-- 迷你模式下Logo的大小为50X50 -->
<span class="logo-mini"><?php echo htmlentities(mb_strtoupper(mb_substr($site['name'],0,4,'utf-8'),'utf-8')); ?></span>
<!-- 普通模式下Logo -->
<span class="logo-lg"><b><?php echo htmlentities(mb_substr($site['name'],0,4,'utf-8')); ?></b><?php echo htmlentities(mb_substr($site['name'],4,null,'utf-8')); ?></span>
</a>

<!-- 顶部通栏样式 -->
<nav class="navbar navbar-static-top">

<!--第一级菜单-->
<div id="firstnav">
<!-- 边栏切换按钮-->
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
<span class="sr-only"><?php echo __('Toggle navigation'); ?></span>
</a>

<!--如果不想在顶部显示角标,则给ul加上disable-top-badge类即可-->
<ul class="nav nav-tabs nav-addtabs disable-top-badge hidden-xs" role="tablist">
<?php echo $navlist; ?>
</ul>

<div class="navbar-custom-menu">
<ul class="nav navbar-nav">

<li>
<a href="/" target="_blank"><i class="fa fa-home" style="font-size:14px;"></i></a>
</li>

<!-- 清除缓存 -->
<li>
<a href="javascript:;" data-toggle="dropdown" title="<?php echo __('Wipe cache'); ?>">
<i class="fa fa-trash"></i>
</a>
<ul class="dropdown-menu wipecache">
<li><a href="javascript:;" data-type="all"><i class="fa fa-trash"></i> <?php echo __('Wipe all cache'); ?></a></li>
<li class="divider"></li>
<li><a href="javascript:;" data-type="content"><i class="fa fa-file-text"></i> <?php echo __('Wipe content cache'); ?></a></li>
<li><a href="javascript:;" data-type="template"><i class="fa fa-file-image-o"></i> <?php echo __('Wipe template cache'); ?></a></li>
<li><a href="javascript:;" data-type="addons"><i class="fa fa-rocket"></i> <?php echo __('Wipe addons cache'); ?></a></li>
</ul>
</li>

<!-- 多语言列表 -->
<?php if(\think\Config::get('lang_switch_on')): ?>
<li class="hidden-xs">
<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-language"></i></a>
<ul class="dropdown-menu">
<li class="<?php echo $config['language']=='zh-cn'?'active':''; ?>">
<a href="?ref=addtabs&lang=zh-cn">简体中文</a>
</li>
<li class="<?php echo $config['language']=='en'?'active':''; ?>">
<a href="?ref=addtabs&lang=en">English</a>
</li>
</ul>
</li>
<?php endif; ?>

<!-- 全屏按钮 -->
<li class="hidden-xs">
<a href="#" data-toggle="fullscreen"><i class="fa fa-arrows-alt"></i></a>
</li>

<!-- 账号信息下拉框 -->
<li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<img src="<?php echo htmlentities(cdnurl($admin['avatar'])); ?>" class="user-image" alt="<?php echo htmlentities($admin['nickname']); ?>">
<span class="hidden-xs"><?php echo htmlentities($admin['nickname']); ?></span>
</a>
<ul class="dropdown-menu">
<!-- User image -->
<li class="user-header">
<img src="<?php echo htmlentities(cdnurl($admin['avatar'])); ?>" class="img-circle" alt="">

<p>
<?php echo htmlentities($admin['nickname']); ?>
<small><?php echo date("Y-m-d H:i:s",$admin['logintime']); ?></small>
</p>
</li>
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
<a href="general/profile" class="btn btn-primary addtabsit"><i class="fa fa-user"></i>
<?php echo __('Profile'); ?></a>
</div>
<div class="pull-right">
<a href="<?php echo url('index/logout'); ?>" class="btn btn-danger"><i class="fa fa-sign-out"></i>
<?php echo __('Logout'); ?></a>
</div>
</li>
</ul>
</li>
<!-- 控制栏切换按钮 -->
<li class="hidden-xs">
<a href="javascript:;" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
</li>
</ul>
</div>
</div>

<?php if(\think\Config::get('fastadmin.multiplenav')): ?>
<!--第二级菜单,只有在multiplenav开启时才显示-->
<div id="secondnav">
<ul class="nav nav-tabs nav-addtabs disable-top-badge" role="tablist">
<?php if($fixedmenu): ?>
<li role="presentation" id="tab_<?php echo $fixedmenu['id']; ?>" class="<?php echo $referermenu?'':'active'; ?>"><a href="#con_<?php echo $fixedmenu['id']; ?>" node-id="<?php echo $fixedmenu['id']; ?>" aria-controls="<?php echo $fixedmenu['id']; ?>" role="tab" data-toggle="tab"><i class="fa fa-dashboard fa-fw"></i> <span><?php echo $fixedmenu['title']; ?></span> <span class="pull-right-container"> </span></a></li>
<?php endif; if($referermenu): ?>
<li role="presentation" id="tab_<?php echo $referermenu['id']; ?>" class="active"><a href="#con_<?php echo $referermenu['id']; ?>" node-id="<?php echo $referermenu['id']; ?>" aria-controls="<?php echo $referermenu['id']; ?>" role="tab" data-toggle="tab"><i class="fa fa-list fa-fw"></i> <span><?php echo $referermenu['title']; ?></span> <span class="pull-right-container"> </span></a> <i class="close-tab fa fa-remove"></i></li>
<?php endif; ?>
</ul>
</div>
<?php endif; ?>
</nav>
</header>

<!-- 左侧菜单栏 -->
<aside class="main-sidebar">
<!-- 左侧菜单栏 -->
<section class="sidebar">
<!-- 管理员信息 -->
<div class="user-panel hidden-xs">
<div class="pull-left image">
<a href="general/profile" class="addtabsit"><img src="<?php echo htmlentities(cdnurl($admin['avatar'])); ?>" class="img-circle" /></a>
</div>
<div class="pull-left info">
<p><?php echo htmlentities($admin['nickname']); ?></p>
<i class="fa fa-circle text-success"></i> <?php echo __('Online'); ?>
</div>
</div>

<!-- 菜单搜索 -->
<form action="" method="get" class="sidebar-form" onsubmit="return false;">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="<?php echo __('Search menu'); ?>">
<span class="input-group-btn">
<button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
</button>
</span>
<div class="menuresult list-group sidebar-form hide">
</div>
</div>
</form>

<!-- 移动端一级菜单 -->
<div class="mobilenav visible-xs">

</div>

<!--如果想始终显示子菜单,则给ul加上show-submenu类即可,当multiplenav开启的情况下默认为展开-->
<ul class="sidebar-menu <?php if(\think\Config::get('fastadmin.multiplenav')): ?>show-submenu<?php endif; ?>">

<!-- 菜单可以在 后台管理->权限管理->菜单规则 中进行增删改排序 -->
<?php echo $menulist; ?>

</ul>
</section>
</aside>

<!-- 主体内容区域 -->
<div class="content-wrapper tab-content tab-addtabs">
<?php if($fixedmenu): ?>
<div role="tabpanel" class="tab-pane <?php echo $referermenu?'':'active'; ?>" id="con_<?php echo $fixedmenu['id']; ?>">
<iframe src="<?php echo $fixedmenu['url']; ?>?addtabs=1" width="100%" height="100%" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling-x="no" scrolling-y="auto" allowtransparency="yes"></iframe>
</div>
<?php endif; if($referermenu): ?>
<div role="tabpanel" class="tab-pane active" id="con_<?php echo $referermenu['id']; ?>">
<iframe src="<?php echo $referermenu['url']; ?>?addtabs=1" width="100%" height="100%" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling-x="no" scrolling-y="auto" allowtransparency="yes"></iframe>
</div>
<?php endif; ?>
</div>

<!-- 底部链接,默认隐藏 -->
<footer class="main-footer hide">
<div class="pull-right hidden-xs">
</div>
<strong>Copyright &copy; 2017-2020 <a href="/"><?php echo $site['name']; ?></a>.</strong> All rights reserved.
</footer>

<!-- 右侧控制栏 -->
<div class="control-sidebar-bg"></div>
<style>
.skin-list li{
float:left; width: 33.33333%; padding: 5px;
}
.skin-list li a{
display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4);
}
</style>
<!-- Control Sidebar -->
<aside class="control-sidebar control-sidebar-dark">
<!-- Create the tabs -->
<ul class="nav nav-tabs nav-justified control-sidebar-tabs">
<li class="active"><a href="#control-sidebar-setting-tab" data-toggle="tab" aria-expanded="true"><i class="fa fa-wrench"></i></a></li>
<li><a href="#control-sidebar-home-tab" data-toggle="tab"><i class="fa fa-home"></i></a></li>
<li><a href="#control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-gears"></i></a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<!-- Home tab content -->
<div class="tab-pane active" id="control-sidebar-setting-tab">
<h4 class="control-sidebar-heading"><?php echo __('Layout Options'); ?></h4>
<div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-layout="fixed" class="pull-right"> <?php echo __('Fixed Layout'); ?></label><p><?php echo __("You can't use fixed and boxed layouts together"); ?></p></div>
<div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-layout="layout-boxed" class="pull-right"> <?php echo __('Boxed Layout'); ?></label><p><?php echo __('Activate the boxed layout'); ?></p></div>
<div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-layout="sidebar-collapse" class="pull-right"> <?php echo __('Toggle Sidebar'); ?></label><p><?php echo __("Toggle the left sidebar's state (open or collapse)"); ?></p></div>
<div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-enable="expandOnHover" class="pull-right"> <?php echo __('Sidebar Expand on Hover'); ?></label><p><?php echo __('Let the sidebar mini expand on hover'); ?></p></div>
<div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-menu="show-submenu" class="pull-right"> <?php echo __('Show sub menu'); ?></label><p><?php echo __('Always show sub menu'); ?></p></div>
<div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-menu="disable-top-badge" class="pull-right"> <?php echo __('Disable top menu badge'); ?></label><p><?php echo __('Disable top menu badge without left menu'); ?></p></div>
<div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-controlsidebar="control-sidebar-open" class="pull-right"> <?php echo __('Toggle Right Sidebar Slide'); ?></label><p><?php echo __('Toggle between slide over content and push content effects'); ?></p></div>
<div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-sidebarskin="toggle" class="pull-right"> <?php echo __('Toggle Right Sidebar Skin'); ?></label><p><?php echo __('Toggle between dark and light skins for the right sidebar'); ?></p></div>
<h4 class="control-sidebar-heading"><?php echo __('Skins'); ?></h4>
<ul class="list-unstyled clearfix skin-list">
<li><a href="javascript:;" data-skin="skin-blue" style="" class="clearfix full-opacity-hover"><div><span style="display:block; width: 20%; float: left; height: 7px; background: #367fa9;"></span><span class="bg-light-blue" style="display:block; width: 80%; float: left; height: 7px;"></span></div><div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin">Blue</p></li>
<li><a href="javascript:;" data-skin="skin-white" class="clearfix full-opacity-hover"><div style="box-shadow: 0 0 2px rgba(0,0,0,0.1)" class="clearfix"><span style="display:block; width: 20%; float: left; height: 7px; background: #fefefe;"></span><span style="display:block; width: 80%; float: left; height: 7px; background: #fefefe;"></span></div><div><span style="display:block; width: 20%; float: left; height: 20px; background: #222;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin">White</p></li>
<li><a href="javascript:;" data-skin="skin-purple" class="clearfix full-opacity-hover"><div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-purple-active"></span><span class="bg-purple" style="display:block; width: 80%; float: left; height: 7px;"></span></div><div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin">Purple</p></li>
<li><a href="javascript:;" data-skin="skin-green" class="clearfix full-opacity-hover"><div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-green-active"></span><span class="bg-green" style="display:block; width: 80%; float: left; height: 7px;"></span></div><div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin">Green</p></li>
<li><a href="javascript:;" data-skin="skin-red" class="clearfix full-opacity-hover"><div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-red-active"></span><span class="bg-red" style="display:block; width: 80%; float: left; height: 7px;"></span></div><div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin">Red</p></li>
<li><a href="javascript:;" data-skin="skin-yellow" class="clearfix full-opacity-hover"><div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-yellow-active"></span><span class="bg-yellow" style="display:block; width: 80%; float: left; height: 7px;"></span></div><div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin">Yellow</p></li>
<li><a href="javascript:;" data-skin="skin-blue-light" class="clearfix full-opacity-hover"><div><span style="display:block; width: 20%; float: left; height: 7px; background: #367fa9;"></span><span class="bg-light-blue" style="display:block; width: 80%; float: left; height: 7px;"></span></div><div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin" style="font-size: 12px">Blue Light</p></li>
<li><a href="javascript:;" data-skin="skin-white-light" class="clearfix full-opacity-hover"><div style="box-shadow: 0 0 2px rgba(0,0,0,0.1)" class="clearfix"><span style="display:block; width: 20%; float: left; height: 7px; background: #fefefe;"></span><span style="display:block; width: 80%; float: left; height: 7px; background: #fefefe;"></span></div><div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin" style="font-size: 12px">White Light</p></li>
<li><a href="javascript:;" data-skin="skin-purple-light" class="clearfix full-opacity-hover"><div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-purple-active"></span><span class="bg-purple" style="display:block; width: 80%; float: left; height: 7px;"></span></div><div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin" style="font-size: 12px">Purple Light</p></li>
<li><a href="javascript:;" data-skin="skin-green-light" class="clearfix full-opacity-hover"><div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-green-active"></span><span class="bg-green" style="display:block; width: 80%; float: left; height: 7px;"></span></div><div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin" style="font-size: 12px">Green Light</p></li>
<li><a href="javascript:;" data-skin="skin-red-light" class="clearfix full-opacity-hover"><div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-red-active"></span><span class="bg-red" style="display:block; width: 80%; float: left; height: 7px;"></span></div><div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin" style="font-size: 12px">Red Light</p></li>
<li><a href="javascript:;" data-skin="skin-yellow-light" class="clearfix full-opacity-hover"><div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-yellow-active"></span><span class="bg-yellow" style="display:block; width: 80%; float: left; height: 7px;"></span></div><div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin" style="font-size: 12px;">Yellow Light</p></li>
</ul>
</div>
<!-- /.tab-pane -->
<!-- Home tab content -->
<div class="tab-pane" id="control-sidebar-home-tab">
<h4 class="control-sidebar-heading"><?php echo __('Home'); ?></h4>
</div>
<!-- /.tab-pane -->
<!-- Settings tab content -->
<div class="tab-pane" id="control-sidebar-settings-tab">
<h4 class="control-sidebar-heading"><?php echo __('Setting'); ?></h4>
</div>
<!-- /.tab-pane -->
</div>
</aside>
<!-- /.control-sidebar -->
</div>

<!-- 加载JS脚本 -->
<script src="/assets/js/require<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js" data-main="/assets/js/require-backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js?v=<?php echo htmlentities($site['version']); ?>"></script>
</body>
</html>

+ 0
- 64
runtime/temp/8773a69671c22197200533d7438817af.php View File

@@ -1,64 +0,0 @@
<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:73:"D:\php\gitea\shop\public/../application/common\view\tpl\dispatch_jump.tpl";i:1588765311;}*/ ?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo __('Warning'); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="/assets/img/favicon.ico" />
<style type="text/css">
*{box-sizing:border-box;margin:0;padding:0;font-family:Lantinghei SC,Open Sans,Arial,Hiragino Sans GB,Microsoft YaHei,"微软雅黑",STHeiti,WenQuanYi Micro Hei,SimSun,sans-serif;-webkit-font-smoothing:antialiased}
body{padding:70px 0;background:#edf1f4;font-weight:400;font-size:1pc;-webkit-text-size-adjust:none;color:#333}
a{outline:0;color:#3498db;text-decoration:none;cursor:pointer}
.system-message{margin:20px 5%;padding:40px 20px;background:#fff;box-shadow:1px 1px 1px hsla(0,0%,39%,.1);text-align:center}
.system-message h1{margin:0;margin-bottom:9pt;color:#444;font-weight:400;font-size:40px}
.system-message .jump,.system-message .image{margin:20px 0;padding:0;padding:10px 0;font-weight:400}
.system-message .jump{font-size:14px}
.system-message .jump a{color:#333}
.system-message p{font-size:9pt;line-height:20px}
.system-message .btn{display:inline-block;margin-right:10px;width:138px;height:2pc;border:1px solid #44a0e8;border-radius:30px;color:#44a0e8;text-align:center;font-size:1pc;line-height:2pc;margin-bottom:5px;}
.success .btn{border-color:#69bf4e;color:#69bf4e}
.error .btn{border-color:#ff8992;color:#ff8992}
.info .btn{border-color:#3498db;color:#3498db}
.copyright p{width:100%;color:#919191;text-align:center;font-size:10px}
.system-message .btn-grey{border-color:#bbb;color:#bbb}
.clearfix:after{clear:both;display:block;visibility:hidden;height:0;content:"."}
@media (max-width:768px){body {padding:20px 0;}}
@media (max-width:480px){.system-message h1{font-size:30px;}}
</style>
</head>
<body>
<?php $codeText=$code == 1 ? 'success' : ($code == 0 ? 'error' : 'info'); ?>
<div class="system-message <?php echo $codeText; ?>">
<div class="image">
<img src="/assets/img/<?php echo $codeText; ?>.svg" alt="" width="150" />
</div>
<h1><?php echo $msg; ?></h1>
<?php if($url): ?>
<p class="jump">
<?php echo __('This page will be re-directed in %s seconds', '<span id="wait">' . $wait . '</span>'); ?>
</p>
<?php endif; ?>
<p class="clearfix">
<a href="/" class="btn btn-grey"><?php echo __('Go back'); ?></a>
<?php if($url): ?>
<a href="<?php echo $url; ?>" class="btn btn-primary"><?php echo __('Jump now'); ?></a>
<?php endif; ?>
</p>
</div>
<?php if($url): ?>
<script type="text/javascript">
(function () {
var wait = document.getElementById('wait');
var interval = setInterval(function () {
var time = --wait.innerHTML;
if (time <= 0) {
location.href = history.length <= 1 ? "/" : "<?php echo $url; ?>";
clearInterval(interval);
}
}, 1000);
})();
</script>
<?php endif; ?>
</body>
</html>

+ 0
- 446
runtime/temp/a658c8e92bad5371712d9ec6d59795e1.php View File

@@ -1,446 +0,0 @@
<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:71:"D:\php\gitea\shop\public/../application/admin\view\dashboard\index.html";i:1588765311;s:60:"D:\php\gitea\shop\application\admin\view\layout\default.html";i:1588765311;s:57:"D:\php\gitea\shop\application\admin\view\common\meta.html";i:1588765311;s:59:"D:\php\gitea\shop\application\admin\view\common\script.html";i:1588765311;}*/ ?>
<!DOCTYPE html>
<html lang="<?php echo $config['language']; ?>">
<head>
<meta charset="utf-8">
<title><?php echo (isset($title) && ($title !== '')?$title:''); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="renderer" content="webkit">

<link rel="shortcut icon" href="/assets/img/favicon.ico" />
<!-- Loading Bootstrap -->
<link href="/assets/css/backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">

<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
<!--[if lt IE 9]>
<script src="/assets/js/html5shiv.js"></script>
<script src="/assets/js/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
var require = {
config: <?php echo json_encode($config); ?>
};
</script>
</head>

<body class="inside-header inside-aside <?php echo defined('IS_DIALOG') && IS_DIALOG ? 'is-dialog' : ''; ?>">
<div id="main" role="main">
<div class="tab-content tab-addtabs">
<div id="content">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<section class="content-header hide">
<h1>
<?php echo __('Dashboard'); ?>
<small><?php echo __('Control panel'); ?></small>
</h1>
</section>
<?php if(!IS_DIALOG && !\think\Config::get('fastadmin.multiplenav')): ?>
<!-- RIBBON -->
<div id="ribbon">
<ol class="breadcrumb pull-left">
<li><a href="dashboard" class="addtabsit"><i class="fa fa-dashboard"></i> <?php echo __('Dashboard'); ?></a></li>
</ol>
<ol class="breadcrumb pull-right">
<?php foreach($breadcrumb as $vo): ?>
<li><a href="javascript:;" data-url="<?php echo $vo['url']; ?>"><?php echo $vo['title']; ?></a></li>
<?php endforeach; ?>
</ol>
</div>
<!-- END RIBBON -->
<?php endif; ?>
<div class="content">
<style type="text/css">
.sm-st {
background: #fff;
padding: 20px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
margin-bottom: 20px;
-webkit-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
}

.sm-st-icon {
width: 60px;
height: 60px;
display: inline-block;
line-height: 60px;
text-align: center;
font-size: 30px;
background: #eee;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
float: left;
margin-right: 10px;
color: #fff;
}

.sm-st-info {
font-size: 12px;
padding-top: 2px;
}

.sm-st-info span {
display: block;
font-size: 24px;
font-weight: 600;
}

.orange {
background: #fa8564 !important;
}

.tar {
background: #45cf95 !important;
}

.sm-st .green {
background: #86ba41 !important;
}

.pink {
background: #AC75F0 !important;
}

.yellow-b {
background: #fdd752 !important;
}

.stat-elem {

background-color: #fff;
padding: 18px;
border-radius: 40px;

}

.stat-info {
text-align: center;
background-color: #fff;
border-radius: 5px;
margin-top: -5px;
padding: 8px;
-webkit-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
font-style: italic;
}

.stat-icon {
text-align: center;
margin-bottom: 5px;
}

.st-red {
background-color: #F05050;
}

.st-green {
background-color: #27C24C;
}

.st-violet {
background-color: #7266ba;
}

.st-blue {
background-color: #23b7e5;
}

.stats .stat-icon {
color: #28bb9c;
display: inline-block;
font-size: 26px;
text-align: center;
vertical-align: middle;
width: 50px;
float: left;
}

.stat {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
margin-right: 10px;
}

.stat .value {
font-size: 20px;
line-height: 24px;
overflow: hidden;
text-overflow: ellipsis;
font-weight: 500;
}

.stat .name {
overflow: hidden;
text-overflow: ellipsis;
}

.stat.lg .value {
font-size: 26px;
line-height: 28px;
}

.stat.lg .name {
font-size: 16px;
}

.stat-col .progress {
height: 2px;
}

.stat-col .progress-bar {
line-height: 2px;
height: 2px;
}

.item {
padding: 30px 0;
}
</style>
<div class="panel panel-default panel-intro">
<div class="panel-heading">
<?php echo build_heading(null, false); ?>
<ul class="nav nav-tabs">
<li class="active"><a href="#one" data-toggle="tab"><?php echo __('Dashboard'); ?></a></li>
<li><a href="#two" data-toggle="tab"><?php echo __('Custom'); ?></a></li>
</ul>
</div>
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">

<div class="row">
<div class="col-sm-3 col-xs-6">
<div class="sm-st clearfix">
<span class="sm-st-icon st-red"><i class="fa fa-users"></i></span>
<div class="sm-st-info">
<span><?php echo $totaluser; ?></span>
<?php echo __('Total user'); ?>
</div>
</div>
</div>
<div class="col-sm-3 col-xs-6">
<div class="sm-st clearfix">
<span class="sm-st-icon st-violet"><i class="fa fa-book"></i></span>
<div class="sm-st-info">
<span><?php echo $totalviews; ?></span>
<?php echo __('Total view'); ?>
</div>
</div>
</div>
<div class="col-sm-3 col-xs-6">
<div class="sm-st clearfix">
<span class="sm-st-icon st-blue"><i class="fa fa-shopping-bag"></i></span>
<div class="sm-st-info">
<span><?php echo $totalorder; ?></span>
<?php echo __('Total order'); ?>
</div>
</div>
</div>
<div class="col-sm-3 col-xs-6">
<div class="sm-st clearfix">
<span class="sm-st-icon st-green"><i class="fa fa-cny"></i></span>
<div class="sm-st-info">
<span><?php echo $totalorderamount; ?></span>
<?php echo __('Total order amount'); ?>
</div>
</div>
</div>
</div>

<div class="row">
<div class="col-lg-8">
<div id="echart" class="btn-refresh" style="height:200px;width:100%;"></div>
</div>
<div class="col-lg-4">
<div class="card sameheight-item stats">
<div class="card-block">
<div class="row row-sm stats-container">
<div class="col-xs-6 stat-col">
<div class="stat-icon"><i class="fa fa-rocket"></i></div>
<div class="stat">
<div class="value"> <?php echo $todayusersignup; ?></div>
<div class="name"> <?php echo __('Today user signup'); ?></div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-success" style="width: 30%"></div>
</div>
</div>
<div class="col-xs-6 stat-col">
<div class="stat-icon"><i class="fa fa-shopping-cart"></i></div>
<div class="stat">
<div class="value"> <?php echo $todayuserlogin; ?></div>
<div class="name"> <?php echo __('Today user login'); ?></div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-success" style="width: 25%"></div>
</div>
</div>
<div class="col-xs-6 stat-col">
<div class="stat-icon"><i class="fa fa-line-chart"></i></div>
<div class="stat">
<div class="value"> <?php echo $todayorder; ?></div>
<div class="name"> <?php echo __('Today order'); ?></div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-success" style="width: 25%"></div>
</div>
</div>
<div class="col-xs-6 stat-col">
<div class="stat-icon"><i class="fa fa-users"></i></div>
<div class="stat">
<div class="value"> <?php echo $unsettleorder; ?></div>
<div class="name"> <?php echo __('Unsettle order'); ?></div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-success" style="width: 25%"></div>
</div>
</div>
<div class="col-xs-6 stat-col">
<div class="stat-icon"><i class="fa fa-list-alt"></i></div>
<div class="stat">
<div class="value"> <?php echo $sevendnu; ?></div>
<div class="name"> <?php echo __('Seven dnu'); ?></div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-success" style="width: 25%"></div>
</div>
</div>
<div class="col-xs-6 stat-col">
<div class="stat-icon"><i class="fa fa-dollar"></i></div>
<div class="stat">
<div class="value"> <?php echo $sevendau; ?></div>
<div class="name"> <?php echo __('Seven dau'); ?></div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-success" style="width: 25%"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

<div class="row" style="margin-top:15px;">

<div class="col-lg-12">
</div>
<div class="col-xs-6 col-md-3">
<div class="panel bg-blue">
<div class="panel-body">
<div class="panel-title">
<span class="label label-success pull-right"><?php echo __('Real time'); ?></span>
<h5><?php echo __('Category count'); ?></h5>
</div>
<div class="panel-content">
<h1 class="no-margins">1234</h1>
<div class="stat-percent font-bold text-gray"><i class="fa fa-commenting"></i> 1234</div>
<small><?php echo __('Category count tips'); ?></small>
</div>
</div>
</div>
</div>
<div class="col-xs-6 col-md-3">
<div class="panel bg-aqua-gradient">
<div class="panel-body">
<div class="ibox-title">
<span class="label label-info pull-right"><?php echo __('Real time'); ?></span>
<h5><?php echo __('Attachment count'); ?></h5>
</div>
<div class="ibox-content">
<h1 class="no-margins">1043</h1>
<div class="stat-percent font-bold text-gray"><i class="fa fa-modx"></i> 2592</div>
<small><?php echo __('Attachment count tips'); ?></small>
</div>
</div>
</div>
</div>

<div class="col-xs-6 col-md-3">
<div class="panel bg-purple-gradient">
<div class="panel-body">
<div class="ibox-title">
<span class="label label-primary pull-right"><?php echo __('Real time'); ?></span>
<h5><?php echo __('Article count'); ?></h5>
</div>
<div class="ibox-content">

<div class="row">
<div class="col-md-6">
<h1 class="no-margins">1234</h1>
<div class="font-bold"><i class="fa fa-commenting"></i>
<small><?php echo __('Comment count'); ?></small>
</div>
</div>
<div class="col-md-6">
<h1 class="no-margins">6754</h1>
<div class="font-bold"><i class="fa fa-heart"></i>
<small><?php echo __('Like count'); ?></small>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-xs-6 col-md-3">
<div class="panel bg-green-gradient">
<div class="panel-body">
<div class="ibox-title">
<span class="label label-primary pull-right"><?php echo __('Real time'); ?></span>
<h5><?php echo __('News count'); ?></h5>
</div>
<div class="ibox-content">

<div class="row">
<div class="col-md-6">
<h1 class="no-margins">5302</h1>
<div class="font-bold"><i class="fa fa-commenting"></i>
<small><?php echo __('Comment count'); ?></small>
</div>
</div>
<div class="col-md-6">
<h1 class="no-margins">8205</h1>
<div class="font-bold"><i class="fa fa-user"></i>
<small><?php echo __('Like count'); ?></small>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane fade" id="two">
<div class="row">
<div class="col-xs-12">
<?php echo __('Custom zone'); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
var Orderdata = {
column: <?php echo json_encode(array_keys($paylist)); ?>,
paydata: <?php echo json_encode(array_values($paylist)); ?>,
createdata: <?php echo json_encode(array_values($createlist)); ?>,
};
</script>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="/assets/js/require<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js" data-main="/assets/js/require-backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js?v=<?php echo htmlentities($site['version']); ?>"></script>
</body>
</html>

+ 0
- 73
runtime/temp/b8797f3ecfee33def8154075325682b4.php View File

@@ -1,73 +0,0 @@
<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:63:"D:\php\weiwei\public/../application/index\view\index\index.html";i:1588765311;}*/ ?>
<!DOCTYPE html>
<html>

<head>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">

<title><?php echo $site['name']; ?></title>
<link rel="shortcut icon" href="/assets/img/favicon.ico" />
<!-- Bootstrap Core CSS -->
<link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link href="/assets/css/index.css" rel="stylesheet">

<!-- Plugin CSS -->
<link href="https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://cdn.staticfile.org/simple-line-icons/2.4.1/css/simple-line-icons.min.css" rel="stylesheet">

<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>

<body id="page-top">

<nav id="mainNav" class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse-menu">
<span class="sr-only">Toggle navigation</span><i class="fa fa-bars"></i>
</button>
<a class="navbar-brand page-scroll" href="#page-top"><?php echo $site['name']; ?></a>
</div>

<div class="collapse navbar-collapse" id="navbar-collapse-menu">
<ul class="nav navbar-nav navbar-right">
<li><a href="<?php echo url('/'); ?>"><?php echo __('Home'); ?></a></li>
<li><a href="<?php echo url('index/user/index'); ?>"><?php echo __('Member center'); ?></a></li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container-fluid -->
</nav>

<header>
<div class="container">
<div class="row">
<div class="col-sm-12">
<div class="header-content">
<div class="header-content-inner">
<h1><?php echo $site['name']; ?></h1>
</div>
</div>
</div>
</div>
</div>
</header>

<!-- jQuery -->
<script src="https://cdn.staticfile.org/jquery/2.1.4/jquery.min.js"></script>

<!-- Bootstrap Core JavaScript -->
<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</body>

</html>

+ 0
- 73
runtime/temp/c035fcc57eeb493a20f61e92abb3b3a6.php View File

@@ -1,73 +0,0 @@
<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:67:"D:\php\gitea\shop\public/../application/index\view\index\index.html";i:1588765311;}*/ ?>
<!DOCTYPE html>
<html>

<head>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">

<title><?php echo $site['name']; ?></title>
<link rel="shortcut icon" href="/assets/img/favicon.ico" />
<!-- Bootstrap Core CSS -->
<link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link href="/assets/css/index.css" rel="stylesheet">

<!-- Plugin CSS -->
<link href="https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://cdn.staticfile.org/simple-line-icons/2.4.1/css/simple-line-icons.min.css" rel="stylesheet">

<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>

<body id="page-top">

<nav id="mainNav" class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse-menu">
<span class="sr-only">Toggle navigation</span><i class="fa fa-bars"></i>
</button>
<a class="navbar-brand page-scroll" href="#page-top"><?php echo $site['name']; ?></a>
</div>

<div class="collapse navbar-collapse" id="navbar-collapse-menu">
<ul class="nav navbar-nav navbar-right">
<li><a href="<?php echo url('/'); ?>"><?php echo __('Home'); ?></a></li>
<li><a href="<?php echo url('index/user/index'); ?>"><?php echo __('Member center'); ?></a></li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container-fluid -->
</nav>

<header>
<div class="container">
<div class="row">
<div class="col-sm-12">
<div class="header-content">
<div class="header-content-inner">
<h1><?php echo $site['name']; ?></h1>
</div>
</div>
</div>
</div>
</div>
</header>

<!-- jQuery -->
<script src="https://cdn.staticfile.org/jquery/2.1.4/jquery.min.js"></script>

<!-- Bootstrap Core JavaScript -->
<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</body>

</html>

+ 0
- 446
runtime/temp/fec14a706bf3c25d44c7f6272eec4fa9.php View File

@@ -1,446 +0,0 @@
<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:67:"D:\php\weiwei\public/../application/admin\view\dashboard\index.html";i:1588765311;s:56:"D:\php\weiwei\application\admin\view\layout\default.html";i:1588765311;s:53:"D:\php\weiwei\application\admin\view\common\meta.html";i:1588765311;s:55:"D:\php\weiwei\application\admin\view\common\script.html";i:1588765311;}*/ ?>
<!DOCTYPE html>
<html lang="<?php echo $config['language']; ?>">
<head>
<meta charset="utf-8">
<title><?php echo (isset($title) && ($title !== '')?$title:''); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="renderer" content="webkit">

<link rel="shortcut icon" href="/assets/img/favicon.ico" />
<!-- Loading Bootstrap -->
<link href="/assets/css/backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">

<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
<!--[if lt IE 9]>
<script src="/assets/js/html5shiv.js"></script>
<script src="/assets/js/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
var require = {
config: <?php echo json_encode($config); ?>
};
</script>
</head>

<body class="inside-header inside-aside <?php echo defined('IS_DIALOG') && IS_DIALOG ? 'is-dialog' : ''; ?>">
<div id="main" role="main">
<div class="tab-content tab-addtabs">
<div id="content">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<section class="content-header hide">
<h1>
<?php echo __('Dashboard'); ?>
<small><?php echo __('Control panel'); ?></small>
</h1>
</section>
<?php if(!IS_DIALOG && !\think\Config::get('fastadmin.multiplenav')): ?>
<!-- RIBBON -->
<div id="ribbon">
<ol class="breadcrumb pull-left">
<li><a href="dashboard" class="addtabsit"><i class="fa fa-dashboard"></i> <?php echo __('Dashboard'); ?></a></li>
</ol>
<ol class="breadcrumb pull-right">
<?php foreach($breadcrumb as $vo): ?>
<li><a href="javascript:;" data-url="<?php echo $vo['url']; ?>"><?php echo $vo['title']; ?></a></li>
<?php endforeach; ?>
</ol>
</div>
<!-- END RIBBON -->
<?php endif; ?>
<div class="content">
<style type="text/css">
.sm-st {
background: #fff;
padding: 20px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
margin-bottom: 20px;
-webkit-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
}

.sm-st-icon {
width: 60px;
height: 60px;
display: inline-block;
line-height: 60px;
text-align: center;
font-size: 30px;
background: #eee;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
float: left;
margin-right: 10px;
color: #fff;
}

.sm-st-info {
font-size: 12px;
padding-top: 2px;
}

.sm-st-info span {
display: block;
font-size: 24px;
font-weight: 600;
}

.orange {
background: #fa8564 !important;
}

.tar {
background: #45cf95 !important;
}

.sm-st .green {
background: #86ba41 !important;
}

.pink {
background: #AC75F0 !important;
}

.yellow-b {
background: #fdd752 !important;
}

.stat-elem {

background-color: #fff;
padding: 18px;
border-radius: 40px;

}

.stat-info {
text-align: center;
background-color: #fff;
border-radius: 5px;
margin-top: -5px;
padding: 8px;
-webkit-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
font-style: italic;
}

.stat-icon {
text-align: center;
margin-bottom: 5px;
}

.st-red {
background-color: #F05050;
}

.st-green {
background-color: #27C24C;
}

.st-violet {
background-color: #7266ba;
}

.st-blue {
background-color: #23b7e5;
}

.stats .stat-icon {
color: #28bb9c;
display: inline-block;
font-size: 26px;
text-align: center;
vertical-align: middle;
width: 50px;
float: left;
}

.stat {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
margin-right: 10px;
}

.stat .value {
font-size: 20px;
line-height: 24px;
overflow: hidden;
text-overflow: ellipsis;
font-weight: 500;
}

.stat .name {
overflow: hidden;
text-overflow: ellipsis;
}

.stat.lg .value {
font-size: 26px;
line-height: 28px;
}

.stat.lg .name {
font-size: 16px;
}

.stat-col .progress {
height: 2px;
}

.stat-col .progress-bar {
line-height: 2px;
height: 2px;
}

.item {
padding: 30px 0;
}
</style>
<div class="panel panel-default panel-intro">
<div class="panel-heading">
<?php echo build_heading(null, false); ?>
<ul class="nav nav-tabs">
<li class="active"><a href="#one" data-toggle="tab"><?php echo __('Dashboard'); ?></a></li>
<li><a href="#two" data-toggle="tab"><?php echo __('Custom'); ?></a></li>
</ul>
</div>
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">

<div class="row">
<div class="col-sm-3 col-xs-6">
<div class="sm-st clearfix">
<span class="sm-st-icon st-red"><i class="fa fa-users"></i></span>
<div class="sm-st-info">
<span><?php echo $totaluser; ?></span>
<?php echo __('Total user'); ?>
</div>
</div>
</div>
<div class="col-sm-3 col-xs-6">
<div class="sm-st clearfix">
<span class="sm-st-icon st-violet"><i class="fa fa-book"></i></span>
<div class="sm-st-info">
<span><?php echo $totalviews; ?></span>
<?php echo __('Total view'); ?>
</div>
</div>
</div>
<div class="col-sm-3 col-xs-6">
<div class="sm-st clearfix">
<span class="sm-st-icon st-blue"><i class="fa fa-shopping-bag"></i></span>
<div class="sm-st-info">
<span><?php echo $totalorder; ?></span>
<?php echo __('Total order'); ?>
</div>
</div>
</div>
<div class="col-sm-3 col-xs-6">
<div class="sm-st clearfix">
<span class="sm-st-icon st-green"><i class="fa fa-cny"></i></span>
<div class="sm-st-info">
<span><?php echo $totalorderamount; ?></span>
<?php echo __('Total order amount'); ?>
</div>
</div>
</div>
</div>

<div class="row">
<div class="col-lg-8">
<div id="echart" class="btn-refresh" style="height:200px;width:100%;"></div>
</div>
<div class="col-lg-4">
<div class="card sameheight-item stats">
<div class="card-block">
<div class="row row-sm stats-container">
<div class="col-xs-6 stat-col">
<div class="stat-icon"><i class="fa fa-rocket"></i></div>
<div class="stat">
<div class="value"> <?php echo $todayusersignup; ?></div>
<div class="name"> <?php echo __('Today user signup'); ?></div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-success" style="width: 30%"></div>
</div>
</div>
<div class="col-xs-6 stat-col">
<div class="stat-icon"><i class="fa fa-shopping-cart"></i></div>
<div class="stat">
<div class="value"> <?php echo $todayuserlogin; ?></div>
<div class="name"> <?php echo __('Today user login'); ?></div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-success" style="width: 25%"></div>
</div>
</div>
<div class="col-xs-6 stat-col">
<div class="stat-icon"><i class="fa fa-line-chart"></i></div>
<div class="stat">
<div class="value"> <?php echo $todayorder; ?></div>
<div class="name"> <?php echo __('Today order'); ?></div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-success" style="width: 25%"></div>
</div>
</div>
<div class="col-xs-6 stat-col">
<div class="stat-icon"><i class="fa fa-users"></i></div>
<div class="stat">
<div class="value"> <?php echo $unsettleorder; ?></div>
<div class="name"> <?php echo __('Unsettle order'); ?></div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-success" style="width: 25%"></div>
</div>
</div>
<div class="col-xs-6 stat-col">
<div class="stat-icon"><i class="fa fa-list-alt"></i></div>
<div class="stat">
<div class="value"> <?php echo $sevendnu; ?></div>
<div class="name"> <?php echo __('Seven dnu'); ?></div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-success" style="width: 25%"></div>
</div>
</div>
<div class="col-xs-6 stat-col">
<div class="stat-icon"><i class="fa fa-dollar"></i></div>
<div class="stat">
<div class="value"> <?php echo $sevendau; ?></div>
<div class="name"> <?php echo __('Seven dau'); ?></div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-success" style="width: 25%"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

<div class="row" style="margin-top:15px;">

<div class="col-lg-12">
</div>
<div class="col-xs-6 col-md-3">
<div class="panel bg-blue">
<div class="panel-body">
<div class="panel-title">
<span class="label label-success pull-right"><?php echo __('Real time'); ?></span>
<h5><?php echo __('Category count'); ?></h5>
</div>
<div class="panel-content">
<h1 class="no-margins">1234</h1>
<div class="stat-percent font-bold text-gray"><i class="fa fa-commenting"></i> 1234</div>
<small><?php echo __('Category count tips'); ?></small>
</div>
</div>
</div>
</div>
<div class="col-xs-6 col-md-3">
<div class="panel bg-aqua-gradient">
<div class="panel-body">
<div class="ibox-title">
<span class="label label-info pull-right"><?php echo __('Real time'); ?></span>
<h5><?php echo __('Attachment count'); ?></h5>
</div>
<div class="ibox-content">
<h1 class="no-margins">1043</h1>
<div class="stat-percent font-bold text-gray"><i class="fa fa-modx"></i> 2592</div>
<small><?php echo __('Attachment count tips'); ?></small>
</div>
</div>
</div>
</div>

<div class="col-xs-6 col-md-3">
<div class="panel bg-purple-gradient">
<div class="panel-body">
<div class="ibox-title">
<span class="label label-primary pull-right"><?php echo __('Real time'); ?></span>
<h5><?php echo __('Article count'); ?></h5>
</div>
<div class="ibox-content">

<div class="row">
<div class="col-md-6">
<h1 class="no-margins">1234</h1>
<div class="font-bold"><i class="fa fa-commenting"></i>
<small><?php echo __('Comment count'); ?></small>
</div>
</div>
<div class="col-md-6">
<h1 class="no-margins">6754</h1>
<div class="font-bold"><i class="fa fa-heart"></i>
<small><?php echo __('Like count'); ?></small>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-xs-6 col-md-3">
<div class="panel bg-green-gradient">
<div class="panel-body">
<div class="ibox-title">
<span class="label label-primary pull-right"><?php echo __('Real time'); ?></span>
<h5><?php echo __('News count'); ?></h5>
</div>
<div class="ibox-content">

<div class="row">
<div class="col-md-6">
<h1 class="no-margins">5302</h1>
<div class="font-bold"><i class="fa fa-commenting"></i>
<small><?php echo __('Comment count'); ?></small>
</div>
</div>
<div class="col-md-6">
<h1 class="no-margins">8205</h1>
<div class="font-bold"><i class="fa fa-user"></i>
<small><?php echo __('Like count'); ?></small>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane fade" id="two">
<div class="row">
<div class="col-xs-12">
<?php echo __('Custom zone'); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
var Orderdata = {
column: <?php echo json_encode(array_keys($paylist)); ?>,
paydata: <?php echo json_encode(array_values($paylist)); ?>,
createdata: <?php echo json_encode(array_values($createlist)); ?>,
};
</script>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="/assets/js/require<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js" data-main="/assets/js/require-backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js?v=<?php echo htmlentities($site['version']); ?>"></script>
</body>
</html>

Loading…
Cancel
Save