应用在线安装优化
parent
fc64f124be
commit
8eaabaddad
|
|
@ -434,7 +434,7 @@
|
|||
{{/if}}
|
||||
|
||||
<!-- 购买导航 -->
|
||||
<div class="buy-nav">
|
||||
<div class="buy-nav {{if $goods['is_exist_many_spec'] eq 0}}buy-nav-not-many-spec{{/if}}">
|
||||
<div class="buy-nav-opt {{if !empty($buy_button) and isset($buy_button['count'])}}buy-nav-opt-button-number-{{$buy_button.count}}{{/if}}">
|
||||
<!-- 商品页面基础信息购买小导航内部前面钩子 开始 -->
|
||||
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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 '<pre>';
|
||||
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;
|
||||
|
||||
// 默认
|
||||
|
|
|
|||
|
|
@ -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('<div class="am-modal am-modal-alert" tabindex="-1">');
|
||||
html.push('<div class="am-modal am-modal-alert '+options.class_name+'" tabindex="-1">');
|
||||
html.push('<div class="am-modal-dialog">');
|
||||
if(options.title !== null)
|
||||
if(options.title !== null || options.isClose === true)
|
||||
{
|
||||
html.push('<div class="am-modal-hd">' + options.title + '</div>');
|
||||
html.push('<div class="am-modal-hd">');
|
||||
if(options.title !== null)
|
||||
{
|
||||
html.push('<span>'+options.title+'</span>');
|
||||
}
|
||||
if(options.isClose === true)
|
||||
{
|
||||
html.push('<a href="javascript: void(0)" class="am-close" data-am-modal-close>×</a>');
|
||||
}
|
||||
html.push('</div>');
|
||||
}
|
||||
html.push('<div class="am-modal-bd">' + options.content + '</div>');
|
||||
html.push('<div class="am-modal-footer"><span class="am-modal-btn">确定</span></div>');
|
||||
if(options.isBtn)
|
||||
{
|
||||
html.push('<div class="am-modal-footer"><span class="am-modal-btn">确定</span></div>');
|
||||
}
|
||||
html.push('</div>');
|
||||
html.push('</div>');
|
||||
|
||||
return $(html.join(''))
|
||||
.appendTo('body')
|
||||
.modal()
|
||||
.modal(options.config)
|
||||
.on('closed.modal.amui', function() {
|
||||
options.onConfirm();
|
||||
var $this = $(this);
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue