Skip to content

Commit adcb3f5

Browse files
committed
feat: release 6.5.0
1 parent cb1122d commit adcb3f5

File tree

71 files changed

+1367
-303
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1367
-303
lines changed

app/Constant/AppConstant.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ class AppConstant
66
{
77
const APP = 'blog';
88
const APP_NAME = 'ModStartBlog';
9-
const VERSION = '6.4.0';
9+
const VERSION = '6.5.0';
1010
}

module/AdminManager/Util/ModuleUtil.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ public static function modules()
1515
$modules[] = "ModStart:" . ModStart::$version;
1616
foreach (ModuleManager::listAllEnabledModules() as $m => $_) {
1717
$info = ModuleManager::getModuleBasic($m);
18+
if (!$info) {
19+
continue;
20+
}
1821
$modules[] = "$m:$info[version]";
1922
}
2023
return $modules;

module/AdminManager/View/admin/auth.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
@section('pageTitle')模块授权@endsection
44

5-
@section('bodyContent')
5+
@section($_tabSectionName)
66
<div class="ub-panel">
77
<div class="head">
88
<div class="title">

module/AdminManager/View/admin/upgrade.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
@section('pageTitle')系统升级@endsection
44

5-
@section('bodyContent')
5+
@section($_tabSectionName)
66
<div id="app"></div>
77
@endsection
88

module/ModuleStore/Admin/Controller/ModuleStoreController.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function disable()
101101
$ret = ModuleManager::disable($module);
102102
BizException::throwsIfResponseError($ret);
103103
return $this->doFinish([
104-
'<span class="ub-text-success">禁用成功,请 <a href="javascript:;" onclick="window.location.reload()">刷新后台</a> 查看最新系统</span>',
104+
'<span class="ub-text-success">禁用成功,请 <a href="javascript:;" onclick="parent.location.reload()">刷新后台</a> 查看最新系统</span>',
105105
]);
106106
}
107107
}
@@ -123,7 +123,7 @@ public function enable()
123123
$ret = ModuleManager::enable($module);
124124
BizException::throwsIfResponseError($ret);
125125
return $this->doFinish([
126-
'<span class="ub-text-success">启动成功,请 <a href="javascript:;" onclick="window.location.reload()">刷新后台</a> 查看最新系统</span>',
126+
'<span class="ub-text-success">启动成功,请 <a href="javascript:;" onclick="parent.location.reload()">刷新后台</a> 查看最新系统</span>',
127127
]);
128128
}
129129
}
@@ -148,7 +148,7 @@ public function uninstall()
148148
$ret = ModuleManager::uninstall($module);
149149
BizException::throwsIfResponseError($ret);
150150
return $this->doFinish([
151-
'<span class="ub-text-success">卸载完成,请 <a href="javascript:;" onclick="window.location.reload()">刷新后台</a> 查看最新系统</span>',
151+
'<span class="ub-text-success">卸载完成,请 <a href="javascript:;" onclick="parent.location.reload()">刷新后台</a> 查看最新系统</span>',
152152
]);
153153
}
154154
} else {
@@ -157,7 +157,7 @@ public function uninstall()
157157
$ret = ModuleStoreUtil::removeModule($module, $version);
158158
BizException::throwsIfResponseError($ret);
159159
return $this->doFinish([
160-
'<span class="ub-text-success">卸载完成,请 <a href="javascript:;" onclick="window.location.reload()">刷新后台</a> 查看最新系统</span>',
160+
'<span class="ub-text-success">卸载完成,请 <a href="javascript:;" onclick="parent.location.reload()">刷新后台</a> 查看最新系统</span>',
161161
]);
162162
default:
163163
$ret = ModuleManager::uninstall($module);
@@ -192,7 +192,7 @@ public function upgrade()
192192
$ret = ModuleManager::enable($module);
193193
BizException::throwsIfResponseError($ret);
194194
return $this->doFinish([
195-
'<span class="ub-text-success">升级安装完成,请 <a href="javascript:;" onclick="window.location.reload()">刷新后台</a> 查看最新系统</span>',
195+
'<span class="ub-text-success">升级安装完成,请 <a href="javascript:;" onclick="parent.location.reload()">刷新后台</a> 查看最新系统</span>',
196196
]);
197197
case 'unpackPackage':
198198
$package = $dataInput->getTrimString('package');
@@ -274,7 +274,7 @@ public function install()
274274
$ret = ModuleManager::enable($module);
275275
BizException::throwsIfResponseError($ret);
276276
return $this->doFinish([
277-
'<span class="ub-text-success">安装完成,请 <a href="javascript:;" onclick="window.location.reload()">刷新后台</a> 查看最新系统</span>',
277+
'<span class="ub-text-success">安装完成,请 <a href="javascript:;" onclick="parent.location.reload()">刷新后台</a> 查看最新系统</span>',
278278
]);
279279
default:
280280
return $this->doNext('install', 'installModule', [
@@ -293,7 +293,7 @@ public function install()
293293
$ret = ModuleManager::enable($module);
294294
BizException::throwsIfResponseError($ret);
295295
return $this->doFinish([
296-
'<span class="ub-text-success">安装完成,请 <a href="javascript:;" onclick="window.location.reload()">刷新后台</a> 查看最新系统</span>',
296+
'<span class="ub-text-success">安装完成,请 <a href="javascript:;" onclick="parent.location.reload()">刷新后台</a> 查看最新系统</span>',
297297
]);
298298
case 'unpackPackage':
299299
$package = $dataInput->getTrimString('package');

module/ModuleStore/Docs/release.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 2.0.0 页面刷新兼容TAB标签
2+
3+
- 新增:模块市场页面刷新兼容TAB标签
4+
5+
---
6+
17
## 1.9.0 预览宝功能支持,升级逻辑优化
28

39
- 新增:模块市场预览包功能支持

module/ModuleStore/View/admin/moduleStore/index.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</script>
2222
@endsection
2323

24-
@section('bodyContent')
24+
@section($_tabSectionName)
2525
<div id="app"></div>
2626
@endsection
2727

module/ModuleStore/config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"require": [
1616
"Vendor:>=1.4.0"
1717
],
18-
"modstartVersion": ">=3.3.0",
19-
"version": "1.9.0",
18+
"modstartVersion": ">=3.7.0",
19+
"version": "2.0.0",
2020
"author": "官方",
2121
"description": "提供各种各样的应用模块,方便应用快速集成"
2222
}

module/Vendor/Docs/release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 3.7.0
1+
## 3.7.0 任务调度升级,订单处理优化
22

33
- 新增:任务调度执行器ScheduleRunner
44
- 新增:SiteUrlBiz 网站链接管理基础组件

module/Vendor/Email/MailSendJob.php

Lines changed: 51 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,43 @@ class MailSendJob extends BaseJob
1818
public $emailUserName = null;
1919
public $option = [];
2020
public $module;
21+
public $html;
22+
public $type;
2123

22-
public static function create($email, $subject, $template, $templateData = [], $emailUserName = null, $option = [], $delay = 0, $module = null)
24+
private static function checkConfig()
2325
{
2426
$provider = app()->config->get('EmailSenderProvider');
2527
BizException::throwsIfEmpty('邮箱发送未配置', $provider);
28+
}
29+
30+
public static function createHtml($email, $subject, $html, $emailUserName = null, $option = [], $delay = 0)
31+
{
32+
self::checkConfig();
33+
$job = new static();
34+
$job->type = 'html';
35+
$job->email = $email;
36+
$job->subject = $subject;
37+
$job->html = $html;
38+
$job->emailUserName = $emailUserName;
39+
$job->option = $option;
40+
if ($delay > 0) {
41+
$job->delay($delay);
42+
}
43+
app('Illuminate\Contracts\Bus\Dispatcher')->dispatch($job);
44+
}
2645

27-
$job = new MailSendJob();
46+
public static function create($email, $subject, $template, $templateData = [], $emailUserName = null, $option = [], $delay = 0, $module = null)
47+
{
48+
self::checkConfig();
49+
$job = new static();
2850
$job->email = $email;
2951
$job->subject = $subject;
3052
$job->template = $template;
3153
$job->templateData = $templateData;
3254
$job->emailUserName = $emailUserName;
3355
$job->option = $option;
3456
$job->module = $module;
35-
if ($delay > 0) {
57+
if ($delay > 0) {
3658
$job->delay($delay);
3759
}
3860
app('Illuminate\Contracts\Bus\Dispatcher')->dispatch($job);
@@ -45,29 +67,37 @@ public function handle()
4567
$instance = MailSenderProvider::get($provider);
4668
Logger::info('Email', 'Start', $this->email . ' -> ' . $this->subject . ' -> ' . $this->template);
4769

48-
$view = $this->template;
49-
if (!view()->exists($view)) {
50-
$view = 'theme.' . modstart_config()->getWithEnv('siteTemplate', 'default') . '.mail.' . $this->template;
51-
if (!view()->exists($view)) {
52-
$view = 'theme.default.mail.' . $this->template;
70+
switch ($this->type) {
71+
case 'html':
72+
$html = $this->html;
73+
break;
74+
default:
75+
$view = $this->template;
5376
if (!view()->exists($view)) {
54-
if ($this->module) {
55-
$view = 'module::' . $this->module . '.View.mail.' . $this->template;
56-
}
77+
$view = 'theme.' . modstart_config()->getWithEnv('siteTemplate', 'default') . '.mail.' . $this->template;
5778
if (!view()->exists($view)) {
58-
$view = 'module::Vendor.View.mail.' . $this->template;
79+
$view = 'theme.default.mail.' . $this->template;
80+
if (!view()->exists($view)) {
81+
if ($this->module) {
82+
$view = 'module::' . $this->module . '.View.mail.' . $this->template;
83+
}
84+
if (!view()->exists($view)) {
85+
$view = 'module::Vendor.View.mail.' . $this->template;
86+
}
87+
}
5988
}
6089
}
61-
}
62-
}
63-
if (!view()->exists($view)) {
64-
throw new \Exception('mail view not found : ' . $view);
65-
}
66-
if (null === $this->emailUserName) {
67-
$this->emailUserName = $this->email;
90+
if (!view()->exists($view)) {
91+
throw new \Exception('mail view not found : ' . $view);
92+
}
93+
if (null === $this->emailUserName) {
94+
$this->emailUserName = $this->email;
95+
}
96+
$html = View::make($view, $this->templateData)->render();
97+
break;
6898
}
69-
$content = View::make($view, $this->templateData)->render();
70-
$ret = $instance->send($this->email, $this->emailUserName, $this->subject, $content);
99+
BizException::throwsIfEmpty('MailSendJob.HtmlEmpty', $html);
100+
$ret = $instance->send($this->email, $this->emailUserName, $this->subject, $html);
71101
BizException::throwsIfResponseError($ret);
72102
Logger::info('Email', 'End', $this->email . ' -> ' . $this->subject);
73103
}

0 commit comments

Comments
 (0)