diff --git a/application/index/view/default/goods/index.html b/application/index/view/default/goods/index.html index bcd176c635bb5fb84410e303357d357f14bd6393..1f10d8511fa174a1fc1fa4954715249fc639ad71 100755 --- a/application/index/view/default/goods/index.html +++ b/application/index/view/default/goods/index.html @@ -434,7 +434,7 @@ {{/if}} -
+
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}} diff --git a/application/service/AppMiniService.php b/application/service/AppMiniService.php index efac953914f13a1f9cb7916bf7601a27bc2fd47f..63a0a6e85cdde4025a0e7dad0f394a4d2a483673 100755 --- a/application/service/AppMiniService.php +++ b/application/service/AppMiniService.php @@ -162,9 +162,6 @@ class AppMiniService */ public static function ThemeUpload($params = []) { - // 初始化 - self::Init($params); - // 文件上传校验 $error = FileUploadError('theme'); if($error !== true) @@ -179,6 +176,24 @@ class AppMiniService return DataReturn('文件格式有误,请上传zip压缩包', -2); } + // 上传处理 + return self::ThemeUploadHandle($_FILES['file']['tmp_name'], $params); + } + + /** + * 模板上传处理 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @datetime 2018-12-19T00:53:45+0800 + * @param [string] $package_file [软件包地址] + * @param [array] $params [输入参数] + */ + public static function ThemeUploadHandle($package_file, $params = []) + { + // 初始化 + self::Init($params); + // 主题目录 $dir = self::$old_path.DS; @@ -189,7 +204,7 @@ class AppMiniService } // 开始解压文件 - $resource = zip_open($_FILES['theme']['tmp_name']); + $resource = zip_open($package_file); while(($temp_resource = zip_read($resource)) !== false) { if(zip_entry_open($resource, $temp_resource)) diff --git a/application/service/PackageInstallService.php b/application/service/PackageInstallService.php index 0c91d8835683259b900db6a5cdb74f2cffb201ee..e09e366e1006cf58306c99d91b151ae774fab11b 100644 --- a/application/service/PackageInstallService.php +++ b/application/service/PackageInstallService.php @@ -14,6 +14,7 @@ use think\Db; use app\service\PluginsAdminService; use app\service\PaymentService; use app\service\ThemeService; +use app\service\AppMiniService; /** * 软件安装服务层 @@ -163,9 +164,12 @@ class PackageInstallService // 小程序主题 case 'minitheme' : - echo '
';
-                print_r($res);
-                print_r($params);die;
+                if(empty($params['terminal']))
+                {
+                    return DataReturn('未指定小程序终端类型', -1);
+                }
+                $params['application_name'] = $params['terminal'];
+                $ret = AppMiniService::ThemeUploadHandle($res['url'], $params);
                 break;
 
             // 默认
diff --git a/public/static/common/lib/amazeui-dialog/amazeui.dialog.js b/public/static/common/lib/amazeui-dialog/amazeui.dialog.js
index e644fb65e2f8bb65b8c564a720439b9680492e53..64fd5d4d5ef889adc9ffd6f24c4a24bda937a64c 100755
--- a/public/static/common/lib/amazeui-dialog/amazeui.dialog.js
+++ b/public/static/common/lib/amazeui-dialog/amazeui.dialog.js
@@ -14,25 +14,41 @@ var dialog = dialog || {};
 
 dialog.alert = function(options) {
   options = options || {};
+  options.class_name = options.class_name || '';
   options.title = options.title || null;
   options.content = options.content || '提示内容';
+  options.isClose = options.isClose || false;
+  options.isBtn = options.isBtn || false;
+  options.config = options.config || {};
   options.onConfirm = options.onConfirm || function() {
     };
   var html = [];
-  html.push('
'); + html.push('
'); html.push('
'); - if(options.title !== null) + if(options.title !== null || options.isClose === true) { - html.push('
' + options.title + '
'); + html.push('
'); + if(options.title !== null) + { + html.push(''+options.title+''); + } + if(options.isClose === true) + { + html.push('×'); + } + html.push('
'); } html.push('
' + options.content + '
'); - html.push(''); + if(options.isBtn) + { + html.push(''); + } html.push('
'); html.push('
'); return $(html.join('')) .appendTo('body') - .modal() + .modal(options.config) .on('closed.modal.amui', function() { options.onConfirm(); var $this = $(this); diff --git a/public/static/index/default/css/goods.css b/public/static/index/default/css/goods.css index 5d6b442412887dded6395f2d7761b442c1fddeba..2fb4399fe031d4a34bac67863dfc4cf99c3f5162 100755 --- a/public/static/index/default/css/goods.css +++ b/public/static/index/default/css/goods.css @@ -306,6 +306,10 @@ flex: 1 1 0%;line-height: 16px;cursor: pointer;} padding-left: 65px; margin-top: 10px !important; } + .buy-nav-not-many-spec { + padding-left: 0px !important; + margin-top: 20px !important; + } } @media only screen and (max-width:641px) { .buy-nav .buy-submit-container,