From 1b308df4b54ea32e2eaffaa897f0c372ce1525bf Mon Sep 17 00:00:00 2001 From: Karson <karsonzhang@163.com> Date: Sat, 29 Apr 2017 12:38:44 +0800 Subject: [PATCH] 修复后台列表过宽时iOS下未采取响应式布局的BUG 修复后台数据库管理iOS下框架内容无法滚动和溢出的BUG --- application/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 269a2ef..aaabdd5 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;} </style> <div class="panel panel-default panel-intro"> {:build_heading()} @@ -60,7 +61,7 @@ </div> </div> - <div class="well" style="padding:5px;"> + <div class="well" id="resultparent"> <iframe name="resultframe" frameborder="0" id="resultframe" style="height:100%;" width="100%" height="100%"></iframe> </div> <form action="{:url('general.database/query')}" method="post" id="sqlexecute" name="form1" target="resultframe"> diff --git a/application/common/controller/Backend.php b/application/common/controller/Backend.php index d16415e..7c4075a 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 a2b46ba..0bb04d4 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; } /** @@ -154,25 +152,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; - } - - /** * 支付回调 */ public function notify() @@ -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 50781c8..69ba94b 100644 --- a/application/index/view/layout/bootstrap.html +++ b/application/index/view/layout/bootstrap.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <title>FastAdmin</title> <meta name="viewport" content="width=device-width, initial-scale=1"> - <meta name="description" content="基于ThinkPHP5和Bootstrap的极速后台开发系统"> + <meta name="description" content="基于ThinkPHP5和Bootstrap的极速后台开发框架"> <link rel="shortcut icon" href="__CDN__/assets/img/favicon.ico" /> <!-- Loading Bootstrap --> <link href="__CDN__/assets/css/frontend{$Think.config.app_debug?'':'.min'}.css?v={$Think.config.site.version}" rel="stylesheet"> diff --git a/application/index/view/layout/user.html b/application/index/view/layout/user.html index 92731d4..7f1af38 100644 --- a/application/index/view/layout/user.html +++ b/application/index/view/layout/user.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <head> - <title>会员注册</title> + <title>会员中心</title> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="__CDN__/assets/css/bootstrap.min.css" rel="stylesheet" /> diff --git a/public/assets/js/backend/general/database.js b/public/assets/js/backend/general/database.js index 4517940..4985913 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 c64484d..78c0637 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: '', -- libgit2 0.24.0