系统优化
parent
b31591f8d9
commit
e035dca25b
|
|
@ -10,6 +10,7 @@
|
|||
// +----------------------------------------------------------------------
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\facade\Hook;
|
||||
use app\service\IntegralService;
|
||||
use app\service\UserService;
|
||||
|
||||
|
|
@ -91,7 +92,6 @@ class User extends Common
|
|||
$this->assign('page_html', $page->GetPageHtml());
|
||||
$this->assign('data_list', $data['data']);
|
||||
return $this->fetch();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -150,14 +150,23 @@ class User extends Common
|
|||
|
||||
$data = $ret['data'][0];
|
||||
}
|
||||
$this->assign('data', $data);
|
||||
|
||||
// 用户编辑页面钩子
|
||||
$this->assign('plugins_view_admin_user_save_data', Hook::listen('plugins_view_admin_user_save',
|
||||
[
|
||||
'hook_name' => 'plugins_view_admin_user_save',
|
||||
'is_backend' => false,
|
||||
'user_id' => $params['id'],
|
||||
'data' => &$data,
|
||||
'params' => &$params,
|
||||
]));
|
||||
|
||||
// 性别
|
||||
$this->assign('common_gender_list', lang('common_gender_list'));
|
||||
|
||||
// 参数
|
||||
// 数据
|
||||
$this->assign('data', $data);
|
||||
$this->assign('params', $params);
|
||||
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -67,6 +67,26 @@
|
|||
<input type="text" placeholder="登录密码" name="pwd" pattern="{{:lang('common_regex_pwd')}}" data-validation-message="登录密码格式 6~18 个字符之间" class="am-radius" value="" />
|
||||
</div>
|
||||
|
||||
<!-- 插件扩展数据 start -->
|
||||
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
|
||||
<div class="plugins-tag">
|
||||
<span>plugins_view_admin_user_save</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($plugins_view_admin_user_save_data) and is_array($plugins_view_admin_user_save_data)}}
|
||||
<div class="am-alert am-alert-secondary">
|
||||
<label class="am-text-sm am-text-warning">该区域为插件扩展数据,请按照插件文档填写相应的值。</label>
|
||||
<div>
|
||||
{{foreach $plugins_view_admin_user_save_data as $hook}}
|
||||
{{if is_string($hook) or is_int($hook)}}
|
||||
{{$hook|raw}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
<!-- 插件扩展数据 end -->
|
||||
|
||||
<div class="am-form-group am-form-group-refreshing">
|
||||
<input type="hidden" name="id" {{if !empty($data)}} value="{{$data.id}}"{{/if}} />
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
|
||||
|
|
|
|||
|
|
@ -2245,42 +2245,6 @@ class GoodsService
|
|||
'data' => &$data,
|
||||
]);
|
||||
|
||||
// 测试配置信息
|
||||
$plugins = [
|
||||
'name' => '会员等级插件',
|
||||
'desc' => '按照会员等级设定不同金额',
|
||||
'element' =>[
|
||||
[
|
||||
'element' => 'input',
|
||||
'type' => 'text',
|
||||
'name' => 'price',
|
||||
'placeholder' => '普通会员售价',
|
||||
'title' => '普通会员售价',
|
||||
'is_required' => 0,
|
||||
'message' => '请填写应用ID',
|
||||
'desc' => '请输入会员金额',
|
||||
],
|
||||
[
|
||||
'element' => 'input',
|
||||
'type' => 'text',
|
||||
'name' => 'price2',
|
||||
'placeholder' => '高级会员售价',
|
||||
'title' => '高级会员售价',
|
||||
'is_required' => 0,
|
||||
'message' => '请填写应用公钥',
|
||||
],
|
||||
[
|
||||
'element' => 'input',
|
||||
'type' => 'text',
|
||||
'name' => 'price3',
|
||||
'placeholder' => '至尊会员售价',
|
||||
'title' => '至尊会员售价',
|
||||
'is_required' => 0,
|
||||
'message' => '请填写应用公钥',
|
||||
],
|
||||
],
|
||||
];
|
||||
$data[] = $plugins;
|
||||
return DataReturn('获取成功', 0, $data);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -299,6 +299,20 @@ class UserService
|
|||
'upd_time' => time(),
|
||||
];
|
||||
|
||||
// 用户编辑处理钩子
|
||||
$hook_name = 'plugins_service_user_save_handle';
|
||||
$ret = Hook::listen($hook_name, [
|
||||
'hook_name' => $hook_name,
|
||||
'is_backend' => true,
|
||||
'params' => &$params,
|
||||
'data' => &$data,
|
||||
'user_id' => isset($params['id']) ? intval($params['id']) : 0,
|
||||
]);
|
||||
if(isset($ret['code']) && $ret['code'] != 0)
|
||||
{
|
||||
return $ret;
|
||||
}
|
||||
|
||||
// 密码
|
||||
if(!empty($params['pwd']))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,31 +34,35 @@ return array (
|
|||
),
|
||||
'plugins_css' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\limitedtimediscount\\Hook',
|
||||
),
|
||||
'plugins_js' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\limitedtimediscount\\Hook',
|
||||
),
|
||||
'plugins_service_navigation_header_handle' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\limitedtimediscount\\Hook',
|
||||
0 => 'app\\plugins\\membershiplevel\\Hook',
|
||||
),
|
||||
'plugins_service_goods_handle_end' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\limitedtimediscount\\Hook',
|
||||
0 => 'app\\plugins\\membershiplevel\\Hook',
|
||||
),
|
||||
'plugins_service_goods_spec_base' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\limitedtimediscount\\Hook',
|
||||
0 => 'app\\plugins\\membershiplevel\\Hook',
|
||||
),
|
||||
'plugins_view_goods_detail_base_top' =>
|
||||
'plugins_service_buy_handle' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\limitedtimediscount\\Hook',
|
||||
0 => 'app\\plugins\\membershiplevel\\Hook',
|
||||
),
|
||||
'plugins_view_home_floor_top' =>
|
||||
'plugins_service_user_login_success_record' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\limitedtimediscount\\Hook',
|
||||
0 => 'app\\plugins\\membershiplevel\\Hook',
|
||||
),
|
||||
'plugins_service_goods_spec_extends_handle' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\membershiplevel\\Hook',
|
||||
),
|
||||
'plugins_view_admin_user_save' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\membershiplevel\\Hook',
|
||||
),
|
||||
'plugins_service_user_save_handle' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\membershiplevel\\Hook',
|
||||
),
|
||||
);
|
||||
?>
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
{"appid":"16634987","cloudTesting":{"forcePreview":false},"editor":{"curPath":"/data/www/project/shopxo/public/appmini/old/baidu/pages/goods-search/goods-search.js","expands":["/data/www/project/shopxo/public/appmini/old/baidu/pages","/data/www/project/shopxo/public/appmini/old/baidu/pages/index","/data/www/project/shopxo/public/appmini/old/baidu/pages/goods-detail","/data/www/project/shopxo/public/appmini/old/baidu/pages/goods-category","/data/www/project/shopxo/public/appmini/old/baidu/pages/goods-search"],"markdownUploadTimeMap":{},"paths":["/data/www/project/shopxo/public/appmini/old/baidu/pages/index/index.js","/data/www/project/shopxo/public/appmini/old/baidu/pages/goods-detail/goods-detail.js","/data/www/project/shopxo/public/appmini/old/baidu/pages/goods-category/goods-category.js","/data/www/project/shopxo/public/appmini/old/baidu/app.js","/data/www/project/shopxo/public/appmini/old/baidu/pages/goods-search/goods-search.js"],"recentlyFiles":["/data/www/project/shopxo/public/appmini/old/baidu/pages/goods-search/goods-search.js","/data/www/project/shopxo/public/appmini/old/baidu/pages/goods-category/goods-category.js","/data/www/project/shopxo/public/appmini/old/baidu/app.js","/data/www/project/shopxo/public/appmini/old/baidu/pages/index/index.js","/data/www/project/shopxo/public/appmini/old/baidu/pages/goods-detail/goods-detail.js"]},"host":"baiduboxapp","preview":{"packageId":222766},"publish":{"version":"1.0.1.0"},"setting":{"urlCheck":false},"swan":{"baiduboxapp":{"extensionJsVersion":"","swanJsVersion":"3.30.43"}}}
|
||||
{"appid":"16634987","cloudTesting":{"forcePreview":false},"editor":{"curPath":"","expands":[],"markdownUploadTimeMap":{},"paths":[],"recentlyFiles":["/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/app.json","/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/app.js"]},"host":"baiduboxapp","preview":{"packageId":222766},"publish":{"version":"1.0.1.0"},"setting":{"urlCheck":false},"swan":{"baiduboxapp":{"extensionJsVersion":"","swanJsVersion":"3.30.43"}}}
|
||||
|
|
@ -375,4 +375,41 @@ button.colorpicker-submit img {
|
|||
*/
|
||||
.am-radio input[type="radio"], .am-radio-inline input[type="radio"], .am-checkbox input[type="checkbox"], .am-checkbox-inline input[type="checkbox"] {
|
||||
margin: -3px;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 插件标记
|
||||
*/
|
||||
.plugins-tag {
|
||||
background: #333;
|
||||
border: 3px solid #e90000;
|
||||
text-align: center;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
display: -webkit-inline-box;
|
||||
}
|
||||
.plugins-tag, .plugins-tag span {
|
||||
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
|
||||
-moz-box-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
|
||||
box-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
.plugins-tag span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #e90000;
|
||||
text-shadow: 1px 1px #bfbfbf;
|
||||
background: #ffdfdf;
|
||||
padding: 2px 6px;
|
||||
border-radius: 3px;
|
||||
border: 1px solid #ffd4d4;
|
||||
position: absolute;
|
||||
margin: -12px 0 0 -5px;
|
||||
z-index: 2;
|
||||
display: none;
|
||||
}
|
||||
.plugins-tag:hover span {
|
||||
display: block;
|
||||
}
|
||||
|
|
@ -798,42 +798,6 @@ button { outline: none !important; }
|
|||
.common-cropper-popup .preview-sm { width:50px; height:50px; }
|
||||
}
|
||||
|
||||
/**
|
||||
* 插件标记
|
||||
*/
|
||||
.plugins-tag {
|
||||
background: #333;
|
||||
border: 3px solid #e90000;
|
||||
text-align: center;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
display: -webkit-inline-box;
|
||||
}
|
||||
.plugins-tag, .plugins-tag span {
|
||||
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
|
||||
-moz-box-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
|
||||
box-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
.plugins-tag span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #e90000;
|
||||
text-shadow: 1px 1px #bfbfbf;
|
||||
background: #ffdfdf;
|
||||
padding: 2px 6px;
|
||||
border-radius: 3px;
|
||||
border: 1px solid #ffd4d4;
|
||||
position: absolute;
|
||||
margin: -12px 0 0 -5px;
|
||||
z-index: 2;
|
||||
display: none;
|
||||
}
|
||||
.plugins-tag:hover span {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* 公共
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue