提交 9d4abcc1 编写于 作者: D devil

货币自由选择

上级 3b12ad96
...@@ -15,6 +15,7 @@ use think\Controller; ...@@ -15,6 +15,7 @@ use think\Controller;
use app\module\FormHandleModule; use app\module\FormHandleModule;
use app\service\AdminPowerService; use app\service\AdminPowerService;
use app\service\ConfigService; use app\service\ConfigService;
use app\service\ResourcesService;
/** /**
* 管理员公共控制器 * 管理员公共控制器
...@@ -233,7 +234,7 @@ class Common extends Controller ...@@ -233,7 +234,7 @@ class Common extends Controller
$this->assign('page_size', $this->page_size); $this->assign('page_size', $this->page_size);
// 价格符号 // 价格符号
$this->assign('price_symbol', config('shopxo.price_symbol')); $this->assign('price_symbol', ResourcesService::CurrencyPriceSymbol());
// 控制器静态文件状态css,js // 控制器静态文件状态css,js
$module_css = $this->module_name.DS.$default_theme.DS.'css'.DS.$this->controller_name; $module_css = $this->module_name.DS.$default_theme.DS.'css'.DS.$this->controller_name;
......
...@@ -22,6 +22,7 @@ use app\service\SearchService; ...@@ -22,6 +22,7 @@ use app\service\SearchService;
use app\service\ConfigService; use app\service\ConfigService;
use app\service\LinkService; use app\service\LinkService;
use app\service\UserService; use app\service\UserService;
use app\service\ResourcesService;
/** /**
* 前端公共控制器 * 前端公共控制器
...@@ -277,7 +278,7 @@ class Common extends Controller ...@@ -277,7 +278,7 @@ class Common extends Controller
$this->assign('params', $this->data_request); $this->assign('params', $this->data_request);
// 价格符号 // 价格符号
$this->assign('price_symbol', config('shopxo.price_symbol')); $this->assign('price_symbol', ResourcesService::CurrencyPriceSymbol());
// 站点类型 // 站点类型
$this->assign('common_site_type', MyC('common_site_type', 0, true)); $this->assign('common_site_type', MyC('common_site_type', 0, true));
......
...@@ -59,21 +59,19 @@ ...@@ -59,21 +59,19 @@
</div> </div>
{{else /}} {{else /}}
<div class="top-nav-items"> <div class="top-nav-items">
<div class="am-dropdown menu-hd {{if isset($nav['is_login']) and $nav['is_login'] eq 1 and empty($user)}}login-event{{/if}}" data-am-dropdown> <div class="am-dropdown menu-hd" data-am-dropdown>
<a class="am-dropdown-toggle" href="javascript:;" target="_top" data-am-dropdown-toggle> <a class="am-dropdown-toggle" href="javascript:;" target="_top" data-am-dropdown-toggle>
<i class="am-icon-fw {{$nav.icon}}"></i> <i class="am-icon-fw {{$nav.icon}}"></i>
<span>{{$nav.name}}</span> <span>{{$nav.name}}</span>
<i class="am-icon-angle-down"></i> <i class="am-icon-angle-down"></i>
</a> </a>
{{if !empty($user)}} <ul class="am-dropdown-content">
<ul class="am-dropdown-content"> {{foreach $nav.items as $navs}}
{{foreach $nav.items as $navs}} <li class="{{if ((isset($nav['is_login']) and $nav['is_login'] eq 1) or (isset($navs['is_login']) and $navs['is_login'] eq 1)) and empty($user)}}login-event{{/if}}">
<li> <a href="{{if ((isset($nav['is_login']) and $nav['is_login'] eq 1) or (isset($navs['is_login']) and $navs['is_login'] eq 1)) and empty($user)}}javascript:;{{else /}}{{$navs.url}}{{/if}}">{{$navs.name}}</a>
<a href="{{if empty($user)}}javascript:;{{else /}}{{$navs.url}}{{/if}}">{{$navs.name}}</a> </li>
</li> {{/foreach}}
{{/foreach}} </ul>
</ul>
{{/if}}
</div> </div>
</div> </div>
{{/if}} {{/if}}
......
...@@ -584,5 +584,29 @@ class ResourcesService ...@@ -584,5 +584,29 @@ class ResourcesService
} }
return []; return [];
} }
/**
* 货币价格符号
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-09-10
* @desc description
*/
public static function CurrencyPriceSymbol()
{
// 默认从配置文件读取货币符号
$data = config('shopxo.price_symbol');
// 货币符号钩子
$hook_name = 'plugins_service_currency_price_symbol';
Hook::listen($hook_name, [
'hook_name' => $hook_name,
'is_backend' => true,
'data' => &$data,
]);
return $data;
}
} }
?> ?>
\ No newline at end of file
...@@ -216,7 +216,7 @@ class WarehouseService ...@@ -216,7 +216,7 @@ class WarehouseService
// 参数是否有误 // 参数是否有误
if(empty($params['ids'])) if(empty($params['ids']))
{ {
return DataReturn('商品id有误', -1); return DataReturn('数据id有误', -1);
} }
// 是否数组 // 是否数组
if(!is_array($params['ids'])) if(!is_array($params['ids']))
......
...@@ -54,15 +54,62 @@ return array ( ...@@ -54,15 +54,62 @@ return array (
), ),
'plugins_service_users_center_left_menu_handle' => 'plugins_service_users_center_left_menu_handle' =>
array ( array (
0 => 'app\\plugins\\wallet\\Hook', 0 => 'app\\plugins\\distribution\\Hook',
1 => 'app\\plugins\\wallet\\Hook',
), ),
'plugins_service_header_navigation_top_right_handle' => 'plugins_service_header_navigation_top_right_handle' =>
array ( array (
0 => 'app\\plugins\\wallet\\Hook', 0 => 'app\\plugins\\distribution\\Hook',
1 => 'app\\plugins\\wallet\\Hook',
2 => 'app\\plugins\\exchangerate\\Hook',
),
'plugins_service_order_status_change_history_success_handle' =>
array (
0 => 'app\\plugins\\distribution\\Hook',
),
'plugins_service_order_aftersale_audit_handle_end' =>
array (
0 => 'app\\plugins\\distribution\\Hook',
),
'plugins_service_site_extraction_address_list' =>
array (
0 => 'app\\plugins\\distribution\\Hook',
),
'plugins_service_buy_order_insert_end' =>
array (
0 => 'app\\plugins\\distribution\\Hook',
),
'plugins_service_goods_spec_extends_handle' =>
array (
0 => 'app\\plugins\\distribution\\Hook',
),
'plugins_view_admin_user_save' =>
array (
0 => 'app\\plugins\\distribution\\Hook',
),
'plugins_service_user_save_handle' =>
array (
0 => 'app\\plugins\\distribution\\Hook',
), ),
'plugins_service_user_register_end' => 'plugins_service_user_register_end' =>
array ( array (
0 => 'app\\plugins\\wallet\\Hook', 0 => 'app\\plugins\\wallet\\Hook',
), ),
'plugins_service_currency_price_symbol' =>
array (
0 => 'app\\plugins\\exchangerate\\Hook',
),
'plugins_service_goods_handle_end' =>
array (
0 => 'app\\plugins\\exchangerate\\Hook',
),
'plugins_service_goods_spec_base' =>
array (
0 => 'app\\plugins\\exchangerate\\Hook',
),
'plugins_service_order_pay_launch_handle' =>
array (
0 => 'app\\plugins\\exchangerate\\Hook',
),
); );
?> ?>
\ No newline at end of file
...@@ -29,7 +29,7 @@ form.am-form .am-form-group-label-tips { color: #ccc; } ...@@ -29,7 +29,7 @@ form.am-form .am-form-group-label-tips { color: #ccc; }
form.am-form .am-form-group-label-tips-must { color: #f00; } form.am-form .am-form-group-label-tips-must { color: #f00; }
.am-form-group:hover>label { color: #333 !important; } .am-form-group:hover>label { color: #333 !important; }
.am-form-group:hover>label>.am-form-group-label-tips { color: #FF9800 !important; } .am-form-group:hover>label>.am-form-group-label-tips { color: #FF9800 !important; }
form.am-form .am-form-group, .plug-file-upload-view, .business-form-group, .business-form-block { border-bottom: 1px dashed #ccc; padding: 10px 20% 10px 5px; } form.am-form .am-form-group, .plug-file-upload-view, .business-form-group, .business-form-block { border-bottom: 1px dashed #e2e2e2; padding: 15px 20% 20px 5px; margin-bottom: 0; }
form.am-form .am-form-group-refreshing, .plug-file-upload-view { border-bottom: 0px; } form.am-form .am-form-group-refreshing, .plug-file-upload-view { border-bottom: 0px; }
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册