From a692a1ae567faeefa4dc40fd59988269eab07999 Mon Sep 17 00:00:00 2001 From: Devil Date: Wed, 27 Jan 2021 22:21:04 +0800 Subject: [PATCH] =?UTF-8?q?2.0.0=E5=BC=80=E5=8F=91=E5=90=AF=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/Agreement.php | 3 +- application/admin/controller/Appcenternav.php | 5 +- application/admin/controller/Apphomenav.php | 5 +- application/admin/controller/Article.php | 3 +- application/admin/controller/Brand.php | 3 +- application/admin/controller/Express.php | 3 +- application/admin/controller/Goods.php | 3 +- .../admin/controller/Goodscategory.php | 3 +- application/admin/controller/Payment.php | 3 +- application/admin/controller/Plugins.php | 3 +- application/admin/controller/Pluginsadmin.php | 3 +- application/admin/controller/Quicknav.php | 3 +- application/admin/controller/Site.php | 3 +- application/admin/controller/Slide.php | 5 +- application/admin/controller/Useraddress.php | 3 +- application/admin/controller/Warehouse.php | 3 +- application/admin/form/Goods.php | 9 + .../admin/view/default/appmini/config.html | 2 +- .../admin/view/default/goods/detail.html | 2 + .../admin/view/default/goods/save_info.html | 69 ++++---- .../admin/view/default/goods/spec.html | 33 ++-- .../view/default/goodscomments/save_info.html | 2 +- .../public/goodsparamstemplate/table.html | 8 +- .../default/public/module/form_table.html | 2 +- application/api/controller/Order.php | 3 +- application/api/controller/Orderaftersale.php | 3 +- application/api/controller/Useraddress.php | 3 +- application/common.php | 11 +- application/index/controller/Common.php | 2 +- application/index/controller/Order.php | 2 +- .../index/controller/Orderaftersale.php | 3 +- application/index/controller/Plugins.php | 3 +- application/index/controller/Useraddress.php | 3 +- application/index/view/default/config.json | 2 +- .../index/view/default/index/index.html | 8 +- .../default/public/module/form_table.html | 2 +- application/lang/zh-cn.php | 1 + application/service/AppMiniService.php | 2 +- application/service/BrandService.php | 26 ++- application/service/GoodsService.php | 164 ++++++++++++------ application/service/RegionService.php | 26 ++- application/service/ResourcesService.php | 29 +++- application/service/WarehouseGoodsService.php | 44 ++++- changelog.txt | 19 ++ config/app.php | 2 +- extend/payment/Alipay.php | 24 ++- extend/payment/AlipayMini.php | 2 +- extend/payment/CashPayment.php | 103 ++++++++++- public/core.php | 12 +- public/static/admin/default/css/common.css | 8 - public/static/admin/default/js/goods.js | 4 +- public/static/common/css/common.css | 6 + .../default/pages/common/copyright.axml | 2 +- .../baidu/default/pages/common/copyright.swan | 2 +- .../qq/default/pages/common/copyright.qml | 2 +- .../default/pages/common/copyright.ttml | 2 +- sourcecode/weixin/default/app.js | 2 +- .../default/pages/common/copyright.wxml | 2 +- 58 files changed, 538 insertions(+), 172 deletions(-) diff --git a/application/admin/controller/Agreement.php b/application/admin/controller/Agreement.php index 3cd687a07..67266131f 100644 --- a/application/admin/controller/Agreement.php +++ b/application/admin/controller/Agreement.php @@ -11,6 +11,7 @@ namespace app\admin\controller; use app\service\ConfigService; +use app\service\ResourcesService; /** * 协议管理 @@ -54,7 +55,7 @@ class Agreement extends Common $this->assign('data', ConfigService::ConfigList()); // 编辑器文件存放地址 - $this->assign('editor_path_type', 'agreement'); + $this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('agreement')); // 导航/视图 $nav_type = input('nav_type', 'register'); diff --git a/application/admin/controller/Appcenternav.php b/application/admin/controller/Appcenternav.php index 9fa308eec..a6bc8f926 100755 --- a/application/admin/controller/Appcenternav.php +++ b/application/admin/controller/Appcenternav.php @@ -11,6 +11,7 @@ namespace app\admin\controller; use app\service\AppCenterNavService; +use app\service\ResourcesService; /** * 手机管理-用户中心导航管理 @@ -138,9 +139,11 @@ class AppCenterNav extends Common $this->assign('common_platform_type', lang('common_platform_type')); $this->assign('common_app_event_type', lang('common_app_event_type')); + // 编辑器文件存放地址 + $this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('app_center_nav')); + // 数据 unset($params['id']); - $this->assign('editor_path_type', 'app_center_nav'); $this->assign('params', $params); $this->assign('data', $data); return $this->fetch(); diff --git a/application/admin/controller/Apphomenav.php b/application/admin/controller/Apphomenav.php index ea341b04d..0eee335f6 100755 --- a/application/admin/controller/Apphomenav.php +++ b/application/admin/controller/Apphomenav.php @@ -11,6 +11,7 @@ namespace app\admin\controller; use app\service\AppHomeNavService; +use app\service\ResourcesService; /** * 手机管理-首页导航管理 @@ -138,9 +139,11 @@ class AppHomeNav extends Common $this->assign('common_platform_type', lang('common_platform_type')); $this->assign('common_app_event_type', lang('common_app_event_type')); + // 编辑器文件存放地址 + $this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('app_nav')); + // 数据 unset($params['id']); - $this->assign('editor_path_type', 'app_nav'); $this->assign('params', $params); $this->assign('data', $data); return $this->fetch(); diff --git a/application/admin/controller/Article.php b/application/admin/controller/Article.php index 3a1c02179..b7cf5e79b 100755 --- a/application/admin/controller/Article.php +++ b/application/admin/controller/Article.php @@ -12,6 +12,7 @@ namespace app\admin\controller; use think\facade\Hook; use app\service\ArticleService; +use app\service\ResourcesService; /** * 文章管理 @@ -150,7 +151,7 @@ class Article extends Common ])); // 编辑器文件存放地址 - $this->assign('editor_path_type', 'article'); + $this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('article')); // 数据 unset($params['id']); diff --git a/application/admin/controller/Brand.php b/application/admin/controller/Brand.php index e567501fd..6564c548c 100755 --- a/application/admin/controller/Brand.php +++ b/application/admin/controller/Brand.php @@ -13,6 +13,7 @@ namespace app\admin\controller; use think\facade\Hook; use app\service\BrandService; use app\service\BrandCategoryService; +use app\service\ResourcesService; /** * 品牌管理 @@ -155,7 +156,7 @@ class Brand extends Common ])); // 编辑器文件存放地址 - $this->assign('editor_path_type', 'brand'); + $this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('brand')); // 数据 unset($params['id']); diff --git a/application/admin/controller/Express.php b/application/admin/controller/Express.php index e656d6662..34d390d5d 100755 --- a/application/admin/controller/Express.php +++ b/application/admin/controller/Express.php @@ -11,6 +11,7 @@ namespace app\admin\controller; use app\service\ExpressService; +use app\service\ResourcesService; /** * 快递管理 @@ -53,7 +54,7 @@ class Express extends Common $this->assign('common_is_enable_list', lang('common_is_enable_list')); // 编辑器文件存放地址 - $this->assign('editor_path_type', 'express'); + $this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('express')); return $this->fetch(); } diff --git a/application/admin/controller/Goods.php b/application/admin/controller/Goods.php index a09eecb31..82b04c3f5 100755 --- a/application/admin/controller/Goods.php +++ b/application/admin/controller/Goods.php @@ -15,6 +15,7 @@ use app\service\GoodsService; use app\service\RegionService; use app\service\BrandService; use app\service\GoodsParamsService; +use app\service\ResourcesService; /** * 商品管理 @@ -229,7 +230,7 @@ class Goods extends Common ])); // 编辑器文件存放地址 - $this->assign('editor_path_type', 'goods'); + $this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('goods')); // 数据 unset($params['id'], $params['is_copy']); diff --git a/application/admin/controller/Goodscategory.php b/application/admin/controller/Goodscategory.php index cb161fb18..88f72cd24 100755 --- a/application/admin/controller/Goodscategory.php +++ b/application/admin/controller/Goodscategory.php @@ -11,6 +11,7 @@ namespace app\admin\controller; use app\service\GoodsService; +use app\service\ResourcesService; /** * 分类管理 @@ -59,7 +60,7 @@ class GoodsCategory extends Common $this->assign('goods_category_list', GoodsService::GoodsCategoryAll()); // 编辑器文件存放地址 - $this->assign('editor_path_type', 'goods_category'); + $this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('goods_category')); return $this->fetch(); } diff --git a/application/admin/controller/Payment.php b/application/admin/controller/Payment.php index fb5974c85..0583f8ef3 100755 --- a/application/admin/controller/Payment.php +++ b/application/admin/controller/Payment.php @@ -12,6 +12,7 @@ namespace app\admin\controller; use app\service\PaymentService; use app\service\StoreService; +use app\service\ResourcesService; /** * 支付方式管理 @@ -101,7 +102,7 @@ class Payment extends Common $this->assign('params', $params); // 编辑器文件存放地址 - $this->assign('editor_path_type', 'payment'); + $this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('payment')); return $this->fetch(); } diff --git a/application/admin/controller/Plugins.php b/application/admin/controller/Plugins.php index 9669719f3..50df188ce 100755 --- a/application/admin/controller/Plugins.php +++ b/application/admin/controller/Plugins.php @@ -11,6 +11,7 @@ namespace app\admin\controller; use app\service\PluginsService; +use app\service\ResourcesService; /** * 应用调用入口 @@ -91,7 +92,7 @@ class Plugins extends Common $this->PluginsViewInit($pluginsname, $pluginscontrol, $pluginsaction); // 编辑器文件存放地址定义 - $this->assign('editor_path_type', 'plugins_'.$pluginsname); + $this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('plugins_'.$pluginsname)); // 调用 $ret = PluginsService::PluginsControlCall($pluginsname, $pluginscontrol, $pluginsaction, 'admin', $params); diff --git a/application/admin/controller/Pluginsadmin.php b/application/admin/controller/Pluginsadmin.php index 6668d831f..00c0632af 100755 --- a/application/admin/controller/Pluginsadmin.php +++ b/application/admin/controller/Pluginsadmin.php @@ -12,6 +12,7 @@ namespace app\admin\controller; use app\service\StoreService; use app\service\PluginsAdminService; +use app\service\ResourcesService; /** * 应用管理 @@ -123,7 +124,7 @@ class Pluginsadmin extends Common return $this->fetch('first_step'); } else { // 编辑器文件存放地址 - $this->assign('editor_path_type', 'plugins_'.$params['plugins']); + $this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('plugins_'.$params['plugins'])); // 唯一标记 $this->assign('plugins', $params['plugins']); diff --git a/application/admin/controller/Quicknav.php b/application/admin/controller/Quicknav.php index edf3503b6..437377780 100755 --- a/application/admin/controller/Quicknav.php +++ b/application/admin/controller/Quicknav.php @@ -11,6 +11,7 @@ namespace app\admin\controller; use app\service\QuickNavService; +use app\service\ResourcesService; /** * 快捷导航管理 @@ -143,7 +144,7 @@ class QuickNav extends Common $this->assign('params', $params); // 编辑器文件存放地址 - $this->assign('editor_path_type', 'quick_nav'); + $this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('quick_nav')); return $this->fetch(); } diff --git a/application/admin/controller/Site.php b/application/admin/controller/Site.php index d7c600be7..af4a473e1 100755 --- a/application/admin/controller/Site.php +++ b/application/admin/controller/Site.php @@ -13,6 +13,7 @@ namespace app\admin\controller; use app\service\ConfigService; use app\service\GoodsService; use app\service\SiteService; +use app\service\ResourcesService; /** * 站点设置 @@ -123,7 +124,7 @@ class Site extends Common } // 编辑器文件存放地址 - $this->assign('editor_path_type', 'common'); + $this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('common')); // 视图 $view = 'site/'.$this->nav_type.'/'.$this->view_type; diff --git a/application/admin/controller/Slide.php b/application/admin/controller/Slide.php index f3e886ab2..4d9af64a7 100755 --- a/application/admin/controller/Slide.php +++ b/application/admin/controller/Slide.php @@ -11,6 +11,7 @@ namespace app\admin\controller; use app\service\SlideService; +use app\service\ResourcesService; /** * 轮播图片管理 @@ -139,9 +140,11 @@ class Slide extends Common $this->assign('common_platform_type', lang('common_platform_type')); $this->assign('common_app_event_type', lang('common_app_event_type')); + // 编辑器文件存放地址 + $this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('slide')); + // 数据 unset($params['id']); - $this->assign('editor_path_type', 'slide'); $this->assign('params', $params); $this->assign('data', $data); return $this->fetch(); diff --git a/application/admin/controller/Useraddress.php b/application/admin/controller/Useraddress.php index ab4c88759..ed6f7ee15 100644 --- a/application/admin/controller/Useraddress.php +++ b/application/admin/controller/Useraddress.php @@ -11,6 +11,7 @@ namespace app\admin\controller; use app\service\UserAddressService; +use app\service\ResourcesService; /** * 用户地址管理 @@ -146,7 +147,7 @@ class UserAddress extends Common // 编辑器文件存放地址 if(!empty($data['user_id'])) { - $this->assign('editor_path_type', UserAddressService::EditorAttachmentPathType($data['user_id'])); + $this->assign('editor_path_type', ResourcesService::EditorPathTypeValue(UserAddressService::EditorAttachmentPathType($data['user_id']))); } // 数据 diff --git a/application/admin/controller/Warehouse.php b/application/admin/controller/Warehouse.php index 98039e8fb..5af7e6881 100644 --- a/application/admin/controller/Warehouse.php +++ b/application/admin/controller/Warehouse.php @@ -12,6 +12,7 @@ namespace app\admin\controller; use think\facade\Hook; use app\service\WarehouseService; +use app\service\ResourcesService; /** * 仓库管理 @@ -141,7 +142,7 @@ class Warehouse extends Common $this->assign('is_load_baidu_map_api', 1); // 编辑器文件存放地址 - $this->assign('editor_path_type', 'warehouse'); + $this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('warehouse')); // 数据 unset($params['id']); diff --git a/application/admin/form/Goods.php b/application/admin/form/Goods.php index cfb892408..15c26f306 100644 --- a/application/admin/form/Goods.php +++ b/application/admin/form/Goods.php @@ -251,6 +251,15 @@ class Goods 'form_type' => 'section', ], ], + [ + 'label' => '销量', + 'view_type' => 'field', + 'view_key' => 'sales_count', + 'is_sort' => 1, + 'search_config' => [ + 'form_type' => 'section', + ], + ], [ 'label' => '访问次数', 'view_type' => 'field', diff --git a/application/admin/view/default/appmini/config.html b/application/admin/view/default/appmini/config.html index 7cd055877..bea32e122 100755 --- a/application/admin/view/default/appmini/config.html +++ b/application/admin/view/default/appmini/config.html @@ -77,7 +77,7 @@
-

1. 获取最新组件版本号,默认[ 1.2.5 ]

+

1. 获取最新组件版本号,默认[ 1.2.7 ]

2. 登录微信小程序平台,左侧导航[ 直播 ],申请直播权限后等待审核通过方可使用

3. 点击左侧导航[ 小程序直播->接入说明 ],找到[ 使用方法说明->1. 【直播组件】如何引入 ],json 代码串[ plugins->live-player-plugin ]参数下的[ version ]的值填入

去获取组件版本号 diff --git a/application/admin/view/default/goods/detail.html b/application/admin/view/default/goods/detail.html index b791390e2..4b8aec2b5 100644 --- a/application/admin/view/default/goods/detail.html +++ b/application/admin/view/default/goods/detail.html @@ -57,6 +57,7 @@ {{$line_v.name}} {{/foreach}} 销售金额 + 库存 重量 编码 条形码 @@ -75,6 +76,7 @@ {{case base}} {{$v.data.price}} + {{$v.data.inventory}} {{if $v['data']['weight'] gt 0}}{{$v.data.weight}}{{/if}} {{$v.data.coding}} {{$v.data.barcode}} diff --git a/application/admin/view/default/goods/save_info.html b/application/admin/view/default/goods/save_info.html index c71c86267..743317b24 100755 --- a/application/admin/view/default/goods/save_info.html +++ b/application/admin/view/default/goods/save_info.html @@ -95,7 +95,7 @@

- {{if !empty($brand_list)}} {{foreach $brand_list as $v}} @@ -154,7 +154,7 @@
- +