作者 Karson

修复后台列表过宽时iOS下未采取响应式布局的BUG

修复后台数据库管理iOS下框架内容无法滚动和溢出的BUG
... ... @@ -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">
... ...
... ... @@ -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;
}
... ...
... ... @@ -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;
}
}
... ...
... ... @@ -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">
... ...
<!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" />
... ...
... ... @@ -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();
}
};
... ...
... ... @@ -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: '',
... ...