细节优化
parent
77f6d11125
commit
8cb3c15d24
|
|
@ -220,6 +220,9 @@ class Common extends BaseController
|
|||
// 当前http类型
|
||||
MyViewAssign('my_http', __MY_HTTP__);
|
||||
|
||||
// 首页地址
|
||||
MyViewAssign('home_url', SystemService::HomeUrl());
|
||||
|
||||
// 开发模式
|
||||
MyViewAssign('shopxo_is_develop', MyConfig('shopxo.is_develop'));
|
||||
|
||||
|
|
@ -424,9 +427,9 @@ class Common extends BaseController
|
|||
// 是否插件默认下
|
||||
if($this->controller_name == 'plugins')
|
||||
{
|
||||
if(!empty($this->data_request['pluginsname']))
|
||||
if(!empty($this->plugins_module_name))
|
||||
{
|
||||
$current .= '_'.trim($this->data_request['pluginsname']);
|
||||
$current .= '_'.$this->plugins_module_name.'_'.$this->plugins_controller_name;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ class GoodsComments
|
|||
'is_delete' => 1,
|
||||
'delete_url' => MyUrl('admin/goodscomments/delete'),
|
||||
'delete_key' => 'ids',
|
||||
'is_middle' => 0,
|
||||
],
|
||||
// 表单配置
|
||||
'form' => [
|
||||
|
|
@ -158,7 +159,7 @@ class GoodsComments
|
|||
'search_config' => [
|
||||
'form_type' => 'select',
|
||||
'where_type' => 'in',
|
||||
'data' => MyConst('common_is_shelves_list'),
|
||||
'data' => MyConst('common_is_text_list'),
|
||||
'data_key' => 'id',
|
||||
'data_name' => 'name',
|
||||
'is_multiple' => 1,
|
||||
|
|
|
|||
|
|
@ -43,9 +43,9 @@
|
|||
<textarea name="reply" rows="5" class="am-radius" placeholder="回复内容格式 1~230 个字符" data-validation-message="回复内容格式 1~230 个字符" minlength="1" maxlength="230" required></textarea>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group reply-submit am-form-group-refreshing t-c">
|
||||
<div class="am-form-group reply-submit am-form-group-refreshing am-margin-top-sm">
|
||||
<input type="hidden" name="id" value="" />
|
||||
<button type="submit" class="am-btn am-btn-success am-radius am-btn-sm" data-am-loading="{loadingText:'处理中...'}">回复</button>
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">确认</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -7,12 +7,17 @@
|
|||
<i class="am-icon-edit"></i>
|
||||
<span>编辑</span>
|
||||
</a>
|
||||
{{if $module_data['is_reply'] eq 0}}
|
||||
<button type="button" class="am-btn am-btn-success am-btn-xs am-radius am-btn-block submit-reply" data-am-modal="{target: '#my-popup-reply'}" data-json='{{:json_encode($module_data)}}'>
|
||||
<button type="button" class="am-btn am-btn-success am-btn-xs am-radius am-btn-block submit-reply" data-am-modal="{target: '#my-popup-reply'}" data-json='{{:json_encode($module_data)}}'>
|
||||
{{if $module_data['is_reply'] eq 0}}
|
||||
<i class="am-icon-gavel"></i>
|
||||
<span>回复</span>
|
||||
</button>
|
||||
{{/if}}
|
||||
{{else /}}
|
||||
{{if $module_data['is_show'] eq 0}}
|
||||
<i class="am-icon-pencil"></i>
|
||||
<span>修改</span>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</button>
|
||||
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block submit-delete" data-url="{{:MyUrl('admin/goodscomments/delete')}}" data-id="{{$module_data.id}}" data-key="ids">
|
||||
<i class="am-icon-trash-o"></i>
|
||||
<span>删除</span>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<div class="am-collapse am-topbar-collapse" id="topbar-collapse">
|
||||
<ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list tpl-header-list">
|
||||
<li class="am-dropdown">
|
||||
<a href="{{$Think.__MY_URL__}}" target="_blank" class="tpl-header-list-link">
|
||||
<a href="{{$home_url}}" target="_blank" class="tpl-header-list-link">
|
||||
<i class="am-icon-home"></i>
|
||||
<span>查看首页</span>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>昵称</label>
|
||||
<input type="text" name="nickname" class="am-radius" placeholder="昵称" data-validation-message="昵称最多 16 个字符" {{if !empty($data)}} value="{{$data.nickname}}"{{/if}} />
|
||||
<input type="text" name="nickname" class="am-radius" placeholder="昵称" data-validation-message="昵称最多 30 个字符" {{if !empty($data)}} value="{{$data.nickname}}"{{/if}} />
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
|
|
|
|||
|
|
@ -288,6 +288,9 @@ class Common extends BaseController
|
|||
// 当前http类型
|
||||
MyViewAssign('my_http', __MY_HTTP__);
|
||||
|
||||
// 首页地址
|
||||
MyViewAssign('home_url', SystemService::HomeUrl());
|
||||
|
||||
// url模式
|
||||
MyViewAssign('url_model', MyC('home_seo_url_model', 0));
|
||||
|
||||
|
|
@ -592,7 +595,7 @@ class Common extends BaseController
|
|||
{
|
||||
if(!empty($this->plugins_module_name))
|
||||
{
|
||||
$current .= '_'.trim($this->plugins_module_name);
|
||||
$current .= '_'.$this->plugins_module_name.'_'.$this->plugins_controller_name;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -453,7 +453,7 @@
|
|||
<!-- 商品页面基础信息购买小导航内部前面钩子 结束 -->
|
||||
|
||||
<!-- 首页 -->
|
||||
<a href="{{$Think.__MY_URL__}}" class=nav-min-home-submit>
|
||||
<a href="{{$home_url}}" class=nav-min-home-submit>
|
||||
<span class="nav-icon nav-icon-home">
|
||||
<i class="am-icon-home am-icon-fw"></i>
|
||||
<em>首页</em>
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@
|
|||
{{if isset($is_design) and $is_design eq 1}}
|
||||
<div class="am-margin-top-sm">
|
||||
<div class="layout-operate-container am-fr" data-save-url="{{$layout_save_url}}">
|
||||
<a href="{{$Think.__MY_URL__}}" class="am-btn am-btn-warning am-btn-xs am-radius">取消</a>
|
||||
<a href="{{$home_url}}" class="am-btn am-btn-warning am-btn-xs am-radius">取消</a>
|
||||
<button type="button" class="am-btn am-btn-success am-btn-xs am-radius am-margin-left-sm" data-am-loading="{loadingText:'处理中...'}">保存</button>
|
||||
</div>
|
||||
{{include file="../../../layout/view/base" /}}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-default am-show-sm-only switch-submit" data-am-collapse="{target: '#doc-topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span class="am-icon-bars"></span></button>
|
||||
|
||||
<h1 class="am-topbar-brand wap-logo am-show-sm-only">
|
||||
<a href="{{$Think.__MY_URL__}}">
|
||||
<a href="{{$home_url}}">
|
||||
<img src="{{:AttachmentPathViewHandle(MyC('home_site_logo_wap'))}}" alt="{{:MyC('home_seo_site_title')}}" />
|
||||
</a>
|
||||
</h1>
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@
|
|||
{{if MyC('home_header_top_is_home', 0) eq 1 and $module_name.$controller_name.$action_name neq 'indexindexindex'}}
|
||||
<div class="top-nav-items">
|
||||
<div class="menu-hd ">
|
||||
<a href="{{$Think.__MY_URL__}}" target="_top">
|
||||
<a href="{{$home_url}}" target="_top">
|
||||
<i class="am-icon-fw am-icon-home"></i>
|
||||
<span>商城首页</span>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
<span class="msg">{{$msg}}</span>
|
||||
{{if !isset($is_home) or $is_home eq 1}}
|
||||
<div class="tips-nav">
|
||||
<a href="{{$Think.__MY_URL__}}" class="am-btn am-btn-secondary am-radius">回到首页</a>
|
||||
<a href="{{$home_url}}" class="am-btn am-btn-secondary am-radius">回到首页</a>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
@ -44,13 +44,13 @@
|
|||
{
|
||||
parent.location.reload();
|
||||
}else{
|
||||
window.location.href='{{$Think.__MY_URL__}}';
|
||||
window.location.href='{{$home_url}}';
|
||||
}
|
||||
}, 1500);
|
||||
{{else /}}
|
||||
setTimeout(function()
|
||||
{
|
||||
window.location.href='{{$Think.__MY_URL__}}';
|
||||
window.location.href='{{$home_url}}';
|
||||
}, 1500);
|
||||
{{/if}}
|
||||
</script>
|
||||
|
|
@ -2,12 +2,12 @@
|
|||
<div class="nav-search white am-hide-sm-only">
|
||||
<div class="am-container">
|
||||
<div class="logo am-show-sm-only">
|
||||
<a href="{{$Think.__MY_URL__}}">
|
||||
<a href="{{$home_url}}">
|
||||
<img src="{{:AttachmentPathViewHandle(MyC('home_site_logo_wap'))}}" alt="{{:MyC('home_seo_site_title')}}" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="logo-big am-hide-sm-only">
|
||||
<a href="{{$Think.__MY_URL__}}">
|
||||
<a href="{{$home_url}}">
|
||||
<img src="{{:AttachmentPathViewHandle(MyC('home_site_logo'))}}" alt="{{:MyC('home_seo_site_title')}}" />
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
<span class="msg">{{$msg}}</span>
|
||||
<div class="tips-nav">
|
||||
{{if !isset($is_to_home) or $is_to_home eq 1}}
|
||||
<a href="{{$Think.__MY_URL__}}" class="am-btn am-btn-secondary am-radius">回到首页</a>
|
||||
<a href="{{$home_url}}" class="am-btn am-btn-secondary am-radius">回到首页</a>
|
||||
{{/if}}
|
||||
{{if !empty($to_url) and !empty($to_title)}}
|
||||
<a href="{{$to_url}}" class="am-btn am-btn-primary am-radius">{{$to_title}}</a>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
<span class="msg">{{$msg}}</span>
|
||||
<div class="tips-nav">
|
||||
{{if !isset($is_to_home) or $is_to_home eq 1}}
|
||||
<a href="{{$Think.__MY_URL__}}" class="am-btn am-btn-secondary am-radius">回到首页</a>
|
||||
<a href="{{$home_url}}" class="am-btn am-btn-secondary am-radius">回到首页</a>
|
||||
{{/if}}
|
||||
{{if !empty($to_url) and !empty($to_title)}}
|
||||
<a href="{{$to_url}}" class="am-btn am-btn-primary am-radius">{{$to_title}}</a>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
<i class="am-icon-check-circle am-icon-lg"></i>
|
||||
<span class="msg">{{$msg}}</span>
|
||||
<div class="tips-nav">
|
||||
<a href="{{$Think.__MY_URL__}}" class="am-btn am-btn-secondary am-radius">回到首页</a>
|
||||
<a href="{{$home_url}}" class="am-btn am-btn-secondary am-radius">回到首页</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -37,6 +37,6 @@
|
|||
<script type="text/javascript">
|
||||
setTimeout(function()
|
||||
{
|
||||
window.location.href = '{{$Think.__MY_URL__}}';
|
||||
window.location.href = '{{$home_url}}';
|
||||
}, 1500);
|
||||
</script>
|
||||
|
|
@ -63,7 +63,7 @@ class NavigationService
|
|||
'id' => 0,
|
||||
'pid' => 0,
|
||||
'name' => '首页',
|
||||
'url' => __MY_URL__,
|
||||
'url' => SystemService::HomeUrl(),
|
||||
'data_type' => 'system',
|
||||
'is_show' => 1,
|
||||
'is_new_window_open' => 0,
|
||||
|
|
@ -1008,7 +1008,7 @@ class NavigationService
|
|||
'badge' => null,
|
||||
'icon' => 'nav-icon-home',
|
||||
'only_tag' => 'indexindex',
|
||||
'url' => __MY_URL__,
|
||||
'url' => SystemService::HomeUrl(),
|
||||
],
|
||||
[
|
||||
'name' => '分类',
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ use app\service\GoodsService;
|
|||
use app\service\OrderAftersaleService;
|
||||
use app\service\OrderCurrencyService;
|
||||
use app\service\WarehouseService;
|
||||
use app\service\SystemService;
|
||||
|
||||
/**
|
||||
* 订单服务层
|
||||
|
|
@ -2483,7 +2484,7 @@ class OrderService
|
|||
$pay_log = Db::name('PayLog')->where($where)->field('id,status')->find();
|
||||
if(empty($pay_log))
|
||||
{
|
||||
return DataReturn('支付订单不存在', -400, ['url'=>__MY_URL__]);
|
||||
return DataReturn('支付订单不存在', -400, ['url'=>SystemService::HomeUrl()]);
|
||||
}
|
||||
if($pay_log['status'] == 1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ class PluginsService
|
|||
{
|
||||
return DataReturn('无效插件['.$plugins.']', -10);
|
||||
}
|
||||
MyRedirect(__MY_URL__, true);
|
||||
MyRedirect(SystemService::HomeUrl(), true);
|
||||
}
|
||||
return DataReturn('应用未安装['.$plugins.']', -10);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,5 +166,18 @@ class SystemService
|
|||
{
|
||||
return intval(ini_get('max_input_vars'));
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页地址
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2022-05-12
|
||||
* @desc description
|
||||
*/
|
||||
public static function HomeUrl()
|
||||
{
|
||||
return MyC('common_domain_host', __MY_URL__, true);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -19,7 +19,7 @@ $(function()
|
|||
$popup.find('.goods-info .base img').attr('src', json.goods.images || $popup.find('.goods-info .base img').attr('src'));
|
||||
$popup.find('.goods-info .title').html(json.goods.title);
|
||||
$popup.find('.goods-info .price').html(__currency_symbol__+json.goods.price);
|
||||
|
||||
$popup.find('.content').html(json.content || '<span class="cr-ddd">没有评论内容</span>');
|
||||
$popup.find('textarea[name="reply"]').val(json.reply || '');
|
||||
});
|
||||
});
|
||||
|
|
@ -1264,11 +1264,18 @@ function AjaxRequest(e)
|
|||
var value = e.attr('data-value') || '';
|
||||
var url = e.attr('data-url');
|
||||
var view = e.attr('data-view') || '';
|
||||
var is_example = e.hasClass('btn-loading-example');
|
||||
|
||||
// 请求数据
|
||||
var data = {"value": value, "field": field};
|
||||
data[key] = id;
|
||||
|
||||
// 按钮加载
|
||||
if(is_example)
|
||||
{
|
||||
e.button('loading');
|
||||
}
|
||||
|
||||
// ajax
|
||||
$.AMUI.progress.start();
|
||||
$.ajax({
|
||||
|
|
@ -1279,6 +1286,10 @@ function AjaxRequest(e)
|
|||
data:data,
|
||||
success:function(result)
|
||||
{
|
||||
if(is_example)
|
||||
{
|
||||
e.button('reset');
|
||||
}
|
||||
$.AMUI.progress.done();
|
||||
if(result.code == 0)
|
||||
{
|
||||
|
|
@ -1319,6 +1330,10 @@ function AjaxRequest(e)
|
|||
},
|
||||
error:function(xhr, type)
|
||||
{
|
||||
if(is_example)
|
||||
{
|
||||
e.button('reset');
|
||||
}
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1085,4 +1085,23 @@ legend a.am-fr {
|
|||
border: 2px solid #ea304b;
|
||||
color: #ea304b;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 二级导航
|
||||
*/
|
||||
.second-nav {
|
||||
background: #90b9ff;
|
||||
}
|
||||
.second-nav li a {
|
||||
color: #fff;
|
||||
}
|
||||
.second-nav > li > a:hover {
|
||||
font-weight: bold;
|
||||
background-color: transparent;
|
||||
}
|
||||
.second-nav li.am-active a,
|
||||
.second-nav li.am-active a:hover {
|
||||
background-color: #1cc09f !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
Loading…
Reference in New Issue