已发布新版本小程序主题(支持6端小程序+H5)建议使用新版本主题,老版本主题已停止维护开发、将在后续版本中剔除。
+ 更多主题下载 +已发布新版本小程序主题、采用uniapp开发(支持多端小程序+H5),APP也在紧急适配中。
- 查看新版本小程序主题 -
--
{{else /}}
- {{include file="public/not_data" /}}
+
+ 查看新版本小程序打包教程 +
+diff --git a/app/admin/controller/Appconfig.php b/app/admin/controller/Appconfig.php index 7e9108a462991da31f3593d420b1e181ba6d3d5d..4474372f1f3af2f968280d46a964fedbc5fca8e1 100755 --- a/app/admin/controller/Appconfig.php +++ b/app/admin/controller/Appconfig.php @@ -52,8 +52,9 @@ class AppConfig extends Common // 配置信息 MyViewAssign('data', ConfigService::ConfigList()); - // 是否 + // 静态数据 MyViewAssign('common_is_text_list', MyConst('common_is_text_list')); + MyViewAssign('common_platform_type', MyConst('common_platform_type')); // 导航/视图 $nav_type = input('nav_type', 'base'); @@ -70,7 +71,12 @@ class AppConfig extends Common */ public function Save() { - return ConfigService::ConfigSave($_POST); + // 空字段处理 + $field_list = [ + 'common_user_onekey_bind_mobile_list', + 'common_user_address_platform_import_list', + ]; + return ConfigService::ConfigSave(ConfigService::FieldsEmptyDataHandle($_POST, $field_list)); } } ?> \ No newline at end of file diff --git a/app/admin/controller/Brand.php b/app/admin/controller/Brand.php index a59af4c5dc43bbff4a7a31b32e65d71e58c27088..a59fc9a39f229d53829f3196cab1e70643552200 100755 --- a/app/admin/controller/Brand.php +++ b/app/admin/controller/Brand.php @@ -91,16 +91,13 @@ class Brand extends Common { if(!empty($this->data_request['id'])) { - // 条件 - $where = [ - ['id', '=', intval($this->data_request['id'])], - ]; - // 获取列表 $data_params = [ 'm' => 0, 'n' => 1, - 'where' => $where, + 'where' => [ + ['id', '=', intval($this->data_request['id'])], + ], ]; $ret = BrandService::BrandList($data_params); $data = (empty($ret['data']) || empty($ret['data'][0])) ? [] : $ret['data'][0]; @@ -126,12 +123,13 @@ class Brand extends Common if(!empty($params['id'])) { // 获取列表 - $data_params = array( + $data_params = [ 'm' => 0, 'n' => 1, - 'where' => ['id'=>intval($params['id'])], - 'field' => '*', - ); + 'where' => [ + ['id', '=', intval($params['id'])] + ], + ]; $ret = BrandService::BrandList($data_params); $data = empty($ret['data'][0]) ? [] : $ret['data'][0]; } diff --git a/app/admin/controller/Config.php b/app/admin/controller/Config.php index 62863b1e8888ae64a3eef536d350bc75771df62e..c2db1593009d9826db28b3146c72508757fbf2de 100755 --- a/app/admin/controller/Config.php +++ b/app/admin/controller/Config.php @@ -92,28 +92,19 @@ class Config extends Common $params = $_POST; // 字段不存在赋值 - $empty_value_field_list = []; + $field_list = []; // 页面类型 $view_type = empty($this->data_request['view_type']) ? 'index' : $this->data_request['view_type']; switch($view_type) { case 'store' : - $empty_value_field_list['common_customer_store_qrcode'] = ''; + $field_list[] = 'common_customer_store_qrcode'; break; } // 空字段处理 - if(!empty($empty_value_field_list)) - { - foreach($empty_value_field_list as $fk=>$fv) - { - if(!isset($params[$fk])) - { - $params[$fk] = $fv; - } - } - } + $params = ConfigService::FieldsEmptyDataHandle($params, $field_list); // 默认值字段处理 $default_value_field_list = [ diff --git a/app/admin/controller/Design.php b/app/admin/controller/Design.php index 8ce5f70af34a7972f81741d3858c177ddf8064b3..82416d329940df4379336aa5cd46de574ec6b0f8 100644 --- a/app/admin/controller/Design.php +++ b/app/admin/controller/Design.php @@ -13,6 +13,7 @@ namespace app\admin\controller; use app\service\DesignService; use app\service\GoodsService; use app\service\BrandService; +use app\service\StoreService; use app\layout\service\BaseLayout; /** @@ -76,6 +77,9 @@ class Design extends Common ]; $ret = DesignService::DesignList($data_params); + // 应用商店 + MyViewAssign('store_design_url', StoreService::StoreDesignUrl()); + // 基础参数赋值 MyViewAssign('params', $this->data_request); MyViewAssign('page_html', $page->GetPageHtml()); @@ -163,6 +167,31 @@ class Design extends Common return MyView(); } + /** + * 下载 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2022-04-17 + * @desc description + */ + public function Download() + { + // 是否有权限 + if(!AdminIsPower()) + { + return $this->error('无权限'); + } + + // 下载数据 + $ret = DesignService::DesignDownload($this->data_request); + if(isset($ret['code']) && $ret['code'] != 0) + { + MyViewAssign('msg', $ret['msg']); + return MyView('public/tips_error'); + } + } + /** * 保存 * @author Devil @@ -222,5 +251,45 @@ class Design extends Common // 开始操作 return DesignService::DesignDelete($this->data_post); } + + /** + * 同步到首页 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2022-04-19 + * @desc description + */ + public function Sync() + { + // 是否ajax请求 + if(!IS_AJAX) + { + $this->error('非法访问'); + } + + // 开始操作 + return DesignService::DesignSync($this->data_post); + } + + /** + * 导入 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2022-04-19 + * @desc description + */ + public function Upload() + { + // 是否ajax请求 + if(!IS_AJAX) + { + $this->error('非法访问'); + } + + // 开始操作 + return DesignService::DesignUpload($this->data_request); + } } ?> \ No newline at end of file diff --git a/app/admin/controller/Navigation.php b/app/admin/controller/Navigation.php index 846b597f9bbac7642b4d7f4b83ea6862ed26543d..46e82fa5d9fbf3eadfec4f8175ac9b38a7365bb3 100755 --- a/app/admin/controller/Navigation.php +++ b/app/admin/controller/Navigation.php @@ -14,6 +14,7 @@ use app\service\ArticleService; use app\service\NavigationService; use app\service\GoodsService; use app\service\CustomViewService; +use app\service\DesignService; /** * 导航管理 @@ -80,6 +81,10 @@ class Navigation extends Common $custom_view = CustomViewService::CustomViewList(['where'=>['is_enable'=>1], 'field'=>'id,title', 'n'=>0]); MyViewAssign('customview_list', $custom_view['data']); + // 页面设计 + $design_view = DesignService::DesignList(['where'=>['is_enable'=>1], 'field'=>'id,name', 'n'=>0]); + MyViewAssign('design_list', $design_view['data']); + MyViewAssign('nav_type', $this->nav_type); return MyView(); } diff --git a/app/admin/controller/Payment.php b/app/admin/controller/Payment.php index 00134140a119cad108c66af8862e43c5a4ea39f2..e3fb9cd562e61bbff0817a29eda2dd9e6b5097ef 100755 --- a/app/admin/controller/Payment.php +++ b/app/admin/controller/Payment.php @@ -52,7 +52,7 @@ class Payment extends Common public function Index() { // 插件列表 - $ret = PaymentService::PlugPaymentList(); + $ret = PaymentService::PluginsPaymentList(); MyViewAssign('data_list', $ret['data']); // 不能删除的支付方式 diff --git a/app/admin/controller/Plugins.php b/app/admin/controller/Plugins.php index 82e467813bd7049dbecff79bea9cbe2de7220fc8..422061774eecfbfa36524a49590ed70c51c79f77 100755 --- a/app/admin/controller/Plugins.php +++ b/app/admin/controller/Plugins.php @@ -10,6 +10,7 @@ // +---------------------------------------------------------------------- namespace app\admin\controller; +use app\service\SystemService; use app\service\ApiService; use app\service\PluginsService; use app\service\ResourcesService; @@ -85,7 +86,7 @@ class Plugins extends Common } // 插件权限校验 - $power_plugins = MyCache(MyConfig('shopxo.cache_admin_power_plugins_key').$this->admin['id']); + $power_plugins = MyCache(SystemService::CacheKey('shopxo.cache_admin_power_plugins_key').$this->admin['id']); if(empty($power_plugins) || !array_key_exists($params['data_request']['pluginsname'], $power_plugins)) { $msg = '无权限使用该插件'; diff --git a/app/admin/controller/Pluginsadmin.php b/app/admin/controller/Pluginsadmin.php index feef2f539bef41ed39431f6db2cdf9a7374029cd..163a632c4925b502458b89a596f0e04d3c314611 100755 --- a/app/admin/controller/Pluginsadmin.php +++ b/app/admin/controller/Pluginsadmin.php @@ -48,7 +48,7 @@ class Pluginsadmin extends Common } /** - * [Index 配置列表] + * 列表 * @author Devil * @blog http://gong.gg/ * @version 0.0.1 diff --git a/app/admin/controller/Site.php b/app/admin/controller/Site.php index 34ddbba5ab317a02987bb28f0c35ffcd0e01f0c3..1589cc93eab2e297fe813999997aa430144dd012 100755 --- a/app/admin/controller/Site.php +++ b/app/admin/controller/Site.php @@ -10,6 +10,7 @@ // +---------------------------------------------------------------------- namespace app\admin\controller; +use app\service\SystemService; use app\service\ConfigService; use app\service\GoodsService; use app\service\SiteService; @@ -372,20 +373,8 @@ class Site extends Common break; } - // 开始处理空值 - if(!empty($field_list)) - { - foreach($field_list as $field) - { - if(!isset($params[$field])) - { - $params[$field] = ''; - } - } - } - // 基础配置 - $ret = ConfigService::ConfigSave($params); + $ret = ConfigService::ConfigSave(ConfigService::FieldsEmptyDataHandle($params, $field_list)); // 清除缓存 if($ret['code'] == 0) @@ -394,11 +383,11 @@ class Site extends Common { // 登录 case 'login' : - MyCache(MyConfig('shopxo.cache_user_login_left_key'), null); + MyCache(SystemService::CacheKey('shopxo.cache_user_login_left_key'), null); // 密码找回 case 'forgetpwd' : - MyCache(MyConfig('shopxo.cache_user_forgetpwd_left_key'), null); + MyCache(SystemService::CacheKey('shopxo.cache_user_forgetpwd_left_key'), null); break; } } diff --git a/app/admin/controller/User.php b/app/admin/controller/User.php index 04272812fb6a40e3b613e75333d330abda285bbe..442e4c44671f280c826ab52d9c3338ce415a5576 100755 --- a/app/admin/controller/User.php +++ b/app/admin/controller/User.php @@ -120,6 +120,12 @@ class User extends Common */ public function ExcelExport() { + // 是否有权限 + if(!AdminIsPower()) + { + return $this->error('无权限'); + } + // 获取数据列表 $data_params = [ 'where' => $this->form_where, diff --git a/app/admin/form/Design.php b/app/admin/form/Design.php index 79be7c28f9eb03636406a8c04c7ee3df772bd1e2..3a9443489fc9eb373cc50a91f1e1256fd3564a9a 100644 --- a/app/admin/form/Design.php +++ b/app/admin/form/Design.php @@ -44,6 +44,7 @@ class Design 'is_delete' => 1, 'delete_url' => MyUrl('admin/design/delete'), 'delete_key' => 'ids', + 'is_middle' => 0, ], // 表单配置 'form' => [ @@ -55,6 +56,17 @@ class Design 'align' => 'center', 'width' => 80, ], + [ + 'label' => '数据ID', + 'view_type' => 'field', + 'view_key' => 'id', + 'width' => 105, + 'is_sort' => 1, + 'search_config' => [ + 'form_type' => 'input', + 'where_type' => '=', + ], + ], [ 'label' => '基础信息', 'view_type' => 'module', diff --git a/app/admin/form/Payment.php b/app/admin/form/Payment.php index 4311133250138fb681a8e8da9af7533697a31cf7..d2f770051200901a6c58740f4c7f3823cb7ca56e 100644 --- a/app/admin/form/Payment.php +++ b/app/admin/form/Payment.php @@ -39,6 +39,7 @@ class Payment 'base' => [ 'key_field' => 'payment', 'status_field' => 'is_enable', + 'is_middle' => 0, ], // 表单配置 'form' => [ diff --git a/app/admin/form/User.php b/app/admin/form/User.php index b1186649627a6727708e172dbe23523e69764f12..d76c208fb229c4908f0614efbda2eed14848210e 100644 --- a/app/admin/form/User.php +++ b/app/admin/form/User.php @@ -68,6 +68,18 @@ class User 'where_type' => '=', ], ], + [ + 'label' => '系统类型', + 'view_type' => 'field', + 'view_key' => 'system_type', + 'is_sort' => 1, + 'search_config' => [ + 'form_type' => 'select', + 'where_type' => 'in', + 'data' => $this->SystemTypeList(), + 'is_multiple' => 1, + ], + ], [ 'label' => '头像', 'view_type' => 'module', @@ -269,5 +281,18 @@ class User } return $value; } + + /** + * 系统类型列表 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2022-04-14 + * @desc description + */ + public function SystemTypeList() + { + return Db::name('User')->group('system_type')->column('system_type', 'system_type'); + } } ?> \ No newline at end of file diff --git a/app/admin/view/default/appconfig/app.html b/app/admin/view/default/appconfig/app.html index ffee14baaf505851364e6f787319f97bbb50b0c1..566d9c879c4c7a4e2d1ac16175b99174dda23495 100644 --- a/app/admin/view/default/appconfig/app.html +++ b/app/admin/view/default/appconfig/app.html @@ -17,6 +17,7 @@ {{/foreach}} +
1. 获取当前小程序平台app账户的收货地址,目前仅支持【小程序】
+2. 确认导入后直接添加为系统用户收货地址
+3. 部分小程序平台可能需要申请权限、请根据小程序平台要求申请后再对应开启
已发布新版本小程序主题(支持6端小程序+H5)建议使用新版本主题,老版本主题已停止维护开发、将在后续版本中剔除。
+ 更多主题下载 +已发布新版本小程序主题、采用uniapp开发(支持多端小程序+H5),APP也在紧急适配中。
- 查看新版本小程序主题 -
-+ 查看新版本小程序打包教程 +
+已发布新版本小程序主题(支持6端小程序+H5)建议使用新版本主题,老版本主题已停止维护开发、将在后续版本中剔除。
+已发布新版本小程序主题、采用uniapp开发(支持多端小程序+H5),APP也在紧急适配中。
- 查看新版本小程序主题源码 -
-生成源码包采用当前设置的默认主题进行生成zip压缩包
+生成源码包采用当前设置的默认主题进行生成zip压缩包
{{if MyConfig('shopxo.is_develop') eq true}}当前为开发模式
1. 发布小程序必须采用 https 协议,上线需确认 app.js 中 request_url 参数值是否正确。
diff --git a/app/admin/view/default/design/index.html b/app/admin/view/default/design/index.html index 3fedceab3105ead5671faed457f213fefb2f0c7b..b975201d1bd0ade732af8cca24ba793c440ec790 100644 --- a/app/admin/view/default/design/index.html +++ b/app/admin/view/default/design/index.html @@ -3,7 +3,43 @@ {{block name="form_operate_top"}} + 新增 {__block__} + 更多设计模板下载 +{{/block}} + + +{{block name="form_extend"}} + +