mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
增加登录背景图片配置
This commit is contained in:
parent
c91dfac095
commit
4afdef411e
@ -47,6 +47,7 @@ class Login extends Controller
|
||||
$this->captchaType = 'LoginCaptcha';
|
||||
$this->captchaToken = CodeExtend::uniqidDate(18);
|
||||
$this->developmentMode = SystemService::instance()->checkRunMode();
|
||||
$this->loginBackground = str_replace('|', ',', sysconf('login_image') ?: '');
|
||||
// 刷新当前后台域名
|
||||
$host = "{$this->request->scheme()}://{$this->request->host()}";
|
||||
if ($host !== sysconf('base.site_host')) sysconf('base.site_host', $host);
|
||||
|
@ -2,8 +2,8 @@
|
||||
<div class="layui-card-body padding-left-40">
|
||||
|
||||
<div class="layui-form-item">
|
||||
<span class="color-green font-w7 label-required-prev">后台登录入口</span>
|
||||
<span class="color-desc margin-left-5">Login</span>
|
||||
<b class="color-green label-required-prev">后台登录入口</b>
|
||||
<span class="color-desc margin-left-5">Login Entry</span>
|
||||
<label class="layui-input relative block label-required-null">
|
||||
<span>{:sysuri('@',[],false,true)}</span>
|
||||
<input autofocus required pattern="[a-zA-Z_][a-zA-Z0-9_]*" placeholder="请输入后台登录入口" class="layui-input inline-block padding-0 border-0" style="width:auto;background:none" value="{:trim(sysuri('admin/index/index',[],false),'/')}" name="xpath">
|
||||
@ -11,8 +11,15 @@
|
||||
<span class="help-block">名称由英文字母开头且不能存在相同名称的应用,设置之后原地址不能继续访问!</span>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<b class="color-green label-required-prev">登录界面背景</b>
|
||||
<span class="color-desc margin-left-5">Login Background</span>
|
||||
<div><input type="hidden" value="{:sysconf('login_image')}" name="login_image"></div>
|
||||
<script>$('[name=login_image]').uploadMultipleImage();</script>
|
||||
</div>
|
||||
|
||||
<label class="layui-form-item relative block">
|
||||
<span class="color-green font-w7">浏览器小图标</span>
|
||||
<b class="color-green">浏览器小图标</b>
|
||||
<span class="color-desc margin-left-5">Icon</span>
|
||||
<input class="layui-input" required pattern="^(http|/)" placeholder="请上传浏览器图标" value="{:sysconf('site_icon')}" name="site_icon">
|
||||
<a class="input-right-icon layui-icon layui-icon-upload-drag" style="top:25px" data-file="btn" data-type="ico,png" data-field="site_icon"></a>
|
||||
|
@ -1,7 +1,7 @@
|
||||
{extend name="index/index"}
|
||||
|
||||
{block name="body"}
|
||||
<div class="login-container" data-supersized="__ROOT__/static/theme/img/login/bg1.jpg,__ROOT__/static/theme/img/login/bg2.jpg">
|
||||
<div class="login-container" data-supersized="{$loginBackground|default='__ROOT__/static/theme/img/login/bg1.jpg,__ROOT__/static/theme/img/login/bg2.jpg'}">
|
||||
<div class="header notselect layui-hide-xs">
|
||||
<a href="{:url('@')}" class="title">{:sysconf('app_name')}<span>{:sysconf('app_version')}</span></a>
|
||||
{notempty name='developmentMode'}
|
||||
|
@ -217,13 +217,16 @@ class Order extends Auth
|
||||
'code.require' => '地址不能为空',
|
||||
'order_no.require' => '单号不能为空',
|
||||
]);
|
||||
|
||||
// 用户收货地址
|
||||
$map = ['uuid' => $this->uuid, 'code' => $data['code']];
|
||||
$addr = DataUserAddress::mk()->where($map)->find();
|
||||
if (empty($addr)) $this->error('收货地址异常');
|
||||
|
||||
// 订单状态检查
|
||||
$map = ['uuid' => $this->uuid, 'order_no' => $data['order_no']];
|
||||
$tCount = ShopOrderItem::mk()->where($map)->sum('truck_number');
|
||||
|
||||
// 根据地址计算运费
|
||||
$map = ['status' => 1, 'deleted' => 0, 'order_no' => $data['order_no']];
|
||||
$tCode = ShopOrderItem::mk()->where($map)->column('truck_code');
|
||||
@ -244,20 +247,24 @@ class Order extends Auth
|
||||
'code.require' => '地址不能为空',
|
||||
'order_no.require' => '单号不能为空',
|
||||
]);
|
||||
|
||||
// 用户收货地址
|
||||
$map = ['uuid' => $this->uuid, 'code' => $data['code'], 'deleted' => 0];
|
||||
$addr = DataUserAddress::mk()->where($map)->find();
|
||||
if (empty($addr)) $this->error('收货地址异常');
|
||||
|
||||
// 订单状态检查
|
||||
$map1 = ['uuid' => $this->uuid, 'order_no' => $data['order_no']];
|
||||
$order = ShopOrder::mk()->where($map1)->whereIn('status', [1, 2])->find();
|
||||
if (empty($order)) $this->error('不能修改地址');
|
||||
if (empty($order['truck_type'])) $this->success('无需快递配送', ['order_no' => $order['order_no']]);
|
||||
|
||||
// 根据地址计算运费
|
||||
$map2 = ['status' => 1, 'deleted' => 0, 'order_no' => $data['order_no']];
|
||||
$tCount = ShopOrderItem::mk()->where($map1)->sum('truck_number');
|
||||
$tCodes = ShopOrderItem::mk()->where($map2)->column('truck_code');
|
||||
[$amount, $tCount, $tCode, $remark] = ExpressService::instance()->amount($tCodes, $addr['province'], $addr['city'], $tCount);
|
||||
|
||||
// 创建订单发货信息
|
||||
$express = [
|
||||
'template_code' => $tCode, 'template_count' => $tCount, 'uuid' => $this->uuid,
|
||||
@ -280,6 +287,7 @@ class Order extends Auth
|
||||
$express['address_area'] = $addr['area'];
|
||||
$express['address_content'] = $addr['address'];
|
||||
|
||||
ShopOrderSend::mUpdate($express, 'order_no');
|
||||
data_save(ShopOrderSend::class, $express, 'order_no');
|
||||
// 组装更新订单数据
|
||||
$update = ['status' => 2, 'amount_express' => $express['template_amount']];
|
||||
|
Loading…
x
Reference in New Issue
Block a user