From 1b308df4b54ea32e2eaffaa897f0c372ce1525bf Mon Sep 17 00:00:00 2001 From: Karson Date: Sat, 29 Apr 2017 12:38:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=90=8E=E5=8F=B0=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E8=BF=87=E5=AE=BD=E6=97=B6iOS=E4=B8=8B=E6=9C=AA?= =?UTF-8?q?=E9=87=87=E5=8F=96=E5=93=8D=E5=BA=94=E5=BC=8F=E5=B8=83=E5=B1=80?= =?UTF-8?q?=E7=9A=84BUG=20=E4=BF=AE=E5=A4=8D=E5=90=8E=E5=8F=B0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93=E7=AE=A1=E7=90=86iOS=E4=B8=8B=E6=A1=86?= =?UTF-8?q?=E6=9E=B6=E5=86=85=E5=AE=B9=E6=97=A0=E6=B3=95=E6=BB=9A=E5=8A=A8?= =?UTF-8?q?=E5=92=8C=E6=BA=A2=E5=87=BA=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/view/general/database/index.html | 3 +- application/common/controller/Backend.php | 4 +- application/index/controller/Wechat.php | 37 +------------------ application/index/view/layout/bootstrap.html | 2 +- application/index/view/layout/user.html | 2 +- public/assets/js/backend/general/database.js | 5 +++ public/assets/js/require-table.js | 1 + 7 files changed, 14 insertions(+), 40 deletions(-) diff --git a/application/admin/view/general/database/index.html b/application/admin/view/general/database/index.html index 269a2ef0..aaabdd5a 100644 --- a/application/admin/view/general/database/index.html +++ b/application/admin/view/general/database/index.html @@ -15,6 +15,7 @@ #database .dropdown-menu ul li{margin:3px 0;} #database .dropdown-menu.row .col-xs-6{padding:0 5px;} #sqlquery {font-size:12px;color:#444;} + #resultparent {padding:5px;}
{:build_heading()} @@ -60,7 +61,7 @@
-
+
diff --git a/application/common/controller/Backend.php b/application/common/controller/Backend.php index d16415e1..7c4075ac 100644 --- a/application/common/controller/Backend.php +++ b/application/common/controller/Backend.php @@ -86,8 +86,8 @@ class Backend extends Controller { $url = $this->request->baseUrl(); $start = stripos($url, 'index.php'); - if ($start !== false) - $url = substr($url, 0, $start + 9) . str_replace('.', '/', substr($url, $start + 9)); + $start = $start !== false ? $start : 0; + $url = substr($url, 0, $start + 9) . str_replace('.', '/', substr($url, $start + 9)); header("location:" . url('index/index#!' . urlencode($url), '', false)); exit; } diff --git a/application/index/controller/Wechat.php b/application/index/controller/Wechat.php index a2b46bae..0bb04d4a 100644 --- a/application/index/controller/Wechat.php +++ b/application/index/controller/Wechat.php @@ -5,7 +5,6 @@ namespace app\index\controller; use app\common\controller\Frontend; use app\common\model\WechatContext; use app\common\model\WechatResponse; -use EasyWeChat\Message\Text; use EasyWeChat\Payment\Order; use fast\service\Wechat as WechatService; use fast\third\Application; @@ -142,7 +141,6 @@ class Wechat extends Frontend $response = $this->app->server->serve(); // 将响应输出 $response->send(); - return FALSE; } /** @@ -153,25 +151,6 @@ class Wechat extends Frontend } - /** - * 主动推送消息给用户 - */ - public function push() - { - $openid = $this->request->request("openid"); - $message = $this->request->request("message"); - if (!$openid || !$message) - { - $this->code = 1000; - return; - } - $message = new Text(['content' => $message]); - $result = $this->app->staff->message($message)->to($openid)->send(); - $this->code = 0; - echo json_encode(['code' => $this->code]); - return FALSE; - } - /** * 支付回调 */ @@ -201,19 +180,8 @@ class Wechat extends Frontend // 用户是否支付成功 if ($successful) { - // 不是已经支付状态则修改为已经支付状态 - Order::update(['paytime' => time(), 'paytype' => 'wechat', 'transaction_id' => $notify->transaction_id, 'status' => FA_STATUS_PAID], $orderinfo['id']); - $userinfo = User::get($orderinfo['user_id']); - if ($userinfo) - { - $data = [ - 'first' => '你好!' . $userinfo['nickname'] . ',我们已收到您的货款,开始为您印刷书本,请耐心等待: )', - 'orderMoneySum' => $orderinfo['saleamount'], - 'orderProductName' => $orderinfo['title'], - 'Remark' => '如有问题请直接在微信留言,我们将第一时间为您服务!', - ]; - notice($userinfo['id'], $data, url('order/info/' . $orderinfo['id'], 1), 'lABqvSfOD1nJ6mrVVY1vSBpKr8NpQf1MzqgdN0M_Ifo'); - } + // 请在这里编写处理成功的处理逻辑 + return true; // 返回处理完成 } else @@ -223,7 +191,6 @@ class Wechat extends Frontend }); $response->send(); - return FALSE; } } diff --git a/application/index/view/layout/bootstrap.html b/application/index/view/layout/bootstrap.html index 50781c86..69ba94bc 100644 --- a/application/index/view/layout/bootstrap.html +++ b/application/index/view/layout/bootstrap.html @@ -4,7 +4,7 @@ FastAdmin - + diff --git a/application/index/view/layout/user.html b/application/index/view/layout/user.html index 92731d4b..7f1af387 100644 --- a/application/index/view/layout/user.html +++ b/application/index/view/layout/user.html @@ -1,6 +1,6 @@ - 会员注册 + 会员中心 diff --git a/public/assets/js/backend/general/database.js b/public/assets/js/backend/general/database.js index 45179400..4985913d 100755 --- a/public/assets/js/backend/general/database.js +++ b/public/assets/js/backend/general/database.js @@ -27,6 +27,11 @@ define(['jquery', 'bootstrap', 'backend'], function ($, undefined, Backend) { $("#database .well").height($(window).height() - $("#database #sqlexecute").height() - $("#ribbon").outerHeight() - $(".panel-heading").outerHeight() - 130); }); + //修复iOS下iframe无法滚动的BUG + if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) { + $("#resultparent").css({"-webkit-overflow-scrolling": "touch", "overflow": "auto"}); + } + $(window).resize(); } }; diff --git a/public/assets/js/require-table.js b/public/assets/js/require-table.js index c64484d8..78c0637b 100644 --- a/public/assets/js/require-table.js +++ b/public/assets/js/require-table.js @@ -25,6 +25,7 @@ define(['jquery', 'bootstrap', 'backend', 'config', 'toastr', 'moment', 'bootstr paginationNextText: __("Next"), paginationLastText: __("Last"), mobileResponsive: true, + cardView: true, checkOnInit: true, extend: { index_url: '',