Skip to content

Commit 54e687a

Browse files
committed
优化:更新注释
1 parent aa8eb30 commit 54e687a

File tree

23 files changed

+156
-86
lines changed

23 files changed

+156
-86
lines changed

module/AigcBase/Docs/release.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 1.3.1 非Markdown格式模型调用异常问题
2+
3+
- 修复:非Markdown格式模型调用异常问题
4+
5+
---
6+
17
## 1.3.0 系统重构,支持多个AI服务商,支持自定义AI服务商
28

39
- 系统重构,支持多个AI服务商,支持自定义AI服务商

module/AigcBase/Provider/AbstractAigcChatProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ protected function chatGetContentOrFail($sessionId, $msg, $option)
4646

4747
protected function chatResponse($sessionId, $content, $option)
4848
{
49-
if (!$option['markdown']) {
49+
if (empty($option['markdown'])) {
5050
$content = MarkdownUtil::convertToHtml($content);
5151
}
5252
return Response::generateSuccessData([

module/AigcBase/Util/AigcCreditUtil.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ public static function calc($configKeyPrefix, $countCalculator)
1313
$unit = modstart_config($configKeyPrefix . 'Unit', 1);
1414
$cost = modstart_config($configKeyPrefix . 'Cost', 1);
1515
if (is_callable($countCalculator)) {
16-
$count = call_user_func_array($countCalculator, [
17-
$unit
18-
]);
16+
$count = call_user_func_array($countCalculator, []);
1917
} else {
2018
$count = $countCalculator;
2119
}

module/AigcBase/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"AigcChatOpenAi",
1818
"AigcChatZhipuAi"
1919
],
20-
"version": "1.3.0",
20+
"version": "1.3.1",
2121
"modstartVersion": ">=4.1.0",
2222
"author": "ModStart",
2323
"description": "提供AI基础框架包,支持各种模型接入",

module/Blog/Admin/Controller/ConfigController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ public function index(AdminConfigBuilder $builder)
4848
$builder->select('Blog_BlogSuperSearchProvider', '博客超级搜索驱动')->options(SuperSearchProvider::allDefaultMap());
4949
$builder->switch('Blog_CommentEnable', '启用评论');
5050
$builder->switch('Blog_ContentNavEnable', '启用内容导航');
51+
$builder->switch('Blog_CommentVerifyEnable', '博客评论审核');
52+
$builder->switch('Blog_MessageVerifyEnable', '留言审核');
5153
});
5254
$builder->layoutPanel('安全设置', function (Form $builder) {
5355
$builder->select('Blog_BlogCaptchaProvider', '博客评论验证')->options(CaptchaProvider::nameTitleMap());

module/Blog/Api/Controller/CommentController.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ public function add()
5353
} else {
5454
$data['memberUserId'] = 0;
5555
}
56-
$data['status'] = BlogCommentStatus::WAIT_VERIFY;
56+
if (modstart_config('Blog_CommentVerifyEnable', false)) {
57+
$data['status'] = BlogCommentStatus::WAIT_VERIFY;
58+
} else {
59+
$data['status'] = BlogCommentStatus::VERIFY_SUCCESS;
60+
}
5761
ModelUtil::insert('blog_comment', $data);
5862
ModelUtil::update('blog', $blogId, [
5963
'commentCount' => ModelUtil::count('blog_comment', [

module/Blog/Api/Controller/MessageController.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,11 @@ public function add()
8888
} else {
8989
$data['memberUserId'] = 0;
9090
}
91-
$data['status'] = BlogCommentStatus::WAIT_VERIFY;
91+
if (modstart_config('Blog_MessageVerifyEnable', false)) {
92+
$data['status'] = BlogCommentStatus::WAIT_VERIFY;
93+
} else {
94+
$data['status'] = BlogCommentStatus::VERIFY_SUCCESS;
95+
}
9296
ModelUtil::insert('blog_message', $data);
9397
return Response::generate(0, '提交成功,后台审核后将会显示', null, '[reload]');
9498
}

module/Blog/Docs/release.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 3.8.0 博客评论和留言免审核开关,升级基础依赖
2+
3+
- 新增:升级基础依赖
4+
- 新增:博客评论免审核开关
5+
- 新增:博客留言免审核开关
6+
7+
---
8+
19
## 3.7.0 博客批量导入支持
210

311
- 新增:博客批量导入支持

module/Blog/config.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
"tags": [
1818
"博客"
1919
],
20-
"modstartVersion": ">=4.0.0",
21-
"version": "3.7.0",
20+
"modstartVersion": ">=4.1.0",
21+
"version": "3.8.0",
2222
"author": "ModStart",
2323
"description": "提供一个基础的博客系统",
2424
"suggest": [
@@ -33,4 +33,4 @@
3333
"TagManager"
3434
],
3535
"config": {}
36-
}
36+
}

module/ModuleStore/Asset/entry/moduleStore.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

module/ModuleStore/Docs/release.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 2.2.0 模块市场登录安全升级
2+
3+
- 新增:模块市场登录安全升级
4+
- 优化:管理界面优化
5+
6+
---
7+
18
## 2.1.0 功能特性优化,已知问题修复
29

310
- 新增:模块一键扫码购买功能

module/ModuleStore/config.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@
1515
"require": [
1616
"Vendor:>=1.4.0"
1717
],
18-
"modstartVersion": ">=3.7.0",
19-
"version": "2.1.0",
18+
"modstartVersion": ">=4.1.0",
19+
"version": "2.2.0",
2020
"author": "官方",
21-
"description": "提供各种各样的应用模块,方便应用快速集成"
21+
"description": "提供各种各样的应用模块,方便应用快速集成",
22+
"config": {}
2223
}

module/ModuleStore/resources/asset/src/pages/ModuleStore.vue

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
</el-tabs>
5050
<a href="javascript:;" @click="search.tab='system'"
5151
class="ub-text-muted tw-leading-10 tw-px-3 tw-absolute tw-right-0 tw-top-0">
52-
<i class="iconfont icon-cog"></i> 系统模块
52+
<i class="iconfont icon-cog"></i> 内置模块
5353
</a>
5454
<div class="ub-padding">
5555
<div class="tw-float-right">
@@ -120,11 +120,11 @@
120120
</div>
121121
<div class="text">暂无记录</div>
122122
</div>
123-
<div class="ub-padding" v-if="filterModules.length>0">
123+
<div class="margin-top tw-p-3" v-if="filterModules.length>0">
124124
<div class="row">
125125
<div v-for="(module,moduleIndex) in filterModules" class="col-md-4">
126126
<div
127-
class="tw-bg-white tw-p-2 tw-rounded tw-mb-2 tw-border-gray-200 tw-border-solid tw-border tw-shadow">
127+
class="hover:tw-shadow-lg tw-bg-white tw-mb-2 tw-p-2 tw-rounded-lg tw-shadow ub-border">
128128
<div style="padding-left:6rem;">
129129
<div class="tw-w-28 tw-float-left" style="margin-left:-6rem;">
130130
<a v-if="module.url"
@@ -253,28 +253,26 @@
253253
</a>
254254
</div>
255255
<div v-if="!memberUser.id">
256-
<div style="padding:0 1.5rem;">
257-
<div class="tw-py-2 tw-text-center tw-text-lg">
258-
请登录账号
256+
<div style="padding:1.5rem;">
257+
<div class="margin-bottom tw-font-bold">
258+
<i class="iconfont icon-code-alt"></i>
259+
任意搭配市场的模块,让系统百变
259260
</div>
260261
<div class="ub-form vertical">
261-
<div class="line">
262-
<div class="label">用户名</div>
262+
<div class="line margin-bottom">
263263
<div class="field">
264264
<input type="text" class="form" v-model="memberLoginInfo.username"
265265
@keyup="doSubmitCheck" placeholder="输入用户名"/>
266266
</div>
267267
</div>
268-
<div class="line">
269-
<div class="label">密码</div>
268+
<div class="line margin-bottom">
270269
<div class="field">
271270
<input type="password" class="form" v-model="memberLoginInfo.password"
272271
@keyup="doSubmitCheck"
273272
placeholder="输入密码"/>
274273
</div>
275274
</div>
276-
<div class="line">
277-
<div class="label">验证码</div>
275+
<div class="line margin-bottom">
278276
<div class="field">
279277
<div class="row no-gutters">
280278
<div class="col-8">
@@ -293,14 +291,15 @@
293291
<div class="field">
294292
<el-checkbox v-model="memberLoginInfo.agree">
295293
同意
296-
<a target="_blank" href="https://modstart.com/article/module_agreement">《使用协议》</a>
294+
<a target="_blank"
295+
href="https://modstart.com/article/module_agreement">《使用协议》</a>
297296
<a target="_blank" href="https://modstart.com/article/disclaimer">《免责声明》</a>
298297
</el-checkbox>
299298
</div>
300299
</div>
301300
<div class="line">
302301
<div class="field">
303-
<button type="submit" class="btn btn-primary btn-block" @click="doMemberLoginSubmit()">
302+
<button type="submit" class="btn btn-primary btn-block btn-round" @click="doMemberLoginSubmit()">
304303
登录
305304
</button>
306305
</div>
@@ -618,8 +617,16 @@ export default {
618617
this.$dialog.tipError('请先同意使用协议')
619618
return
620619
}
620+
const postData = {
621+
username: this.memberLoginInfo.username,
622+
password: this.memberLoginInfo.password,
623+
captcha: this.memberLoginInfo.captcha,
624+
}
625+
postData.ek = MS.util.randomString(8)
626+
postData.username = 'E.A:' + MS.util.encrypt.aesEncode(postData.ek, postData.username)
627+
postData.password = 'E.A:' + MS.util.encrypt.aesEncode(postData.ek, postData.password)
621628
this.$dialog.loadingOn()
622-
this.doStoreRequest('store/login', this.memberLoginInfo, res => {
629+
this.doStoreRequest('store/login', postData, res => {
623630
this.$dialog.loadingOff()
624631
this.$dialog.tipSuccess('登录成功')
625632
this.doLoadStoreMember()

public/asset/theme/default/style.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/vendor/ModuleDeveloper/entry/moduleDeveloper.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/vendor/ModuleStore/entry/moduleStore.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/modstart/modstart/asset/theme/default/style.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/modstart/modstart/resources/asset/src/sui/bricks/component/modal/modal.less

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
position: relative;
3737
box-sizing: border-box;
3838
margin: 2.5rem auto;
39-
padding: 0.5rem;
39+
padding: 0;
4040
width: 30rem;
4141
max-width: 100%;
4242
max-width: calc(100% - 1rem);
@@ -46,7 +46,7 @@
4646
transform: translateY(-100px);
4747
-webkit-transition: opacity 0.3s linear, -webkit-transform 0.3s ease-in-out;
4848
transition: opacity 0.3s linear, transform 0.3s ease-in-out;
49-
border-radius: 3px;
49+
border-radius: 0.5rem;
5050
box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.3);
5151
}
5252

@@ -66,27 +66,35 @@
6666
}
6767

6868
.ub-modal-dialog > .ub-modal-close {
69-
margin: -0rem -0rem 0 0;
70-
float: right;
71-
color: #c4cfdb;
69+
position: absolute;
70+
right: 0.75rem;
71+
top: 0.5rem;
72+
font-size: 0.7rem;
73+
color: var(--color-tertiary);
74+
line-height: 1.5rem;
7275

7376
&:hover {
74-
color: var(--color-primary);
77+
color: var(--color-danger);
7578
}
7679
}
7780

7881
.ub-modal-dialog {
7982
& > .ub-modal-head {
8083
border-bottom: 1px solid #EEE;
81-
padding: 0 0 0.5rem 0;
84+
padding: 0.5rem;
85+
86+
& > .title {
87+
line-height: 1.5rem;
88+
height: 1.5rem;
89+
}
8290
}
8391

8492
& > .ub-modal-body {
85-
padding: 0.5rem 0;
93+
padding: 0.5rem;
8694
}
8795

8896
& > .ub-modal-foot {
89-
padding: 0.5rem 0 0 0;
97+
padding: 0.5rem;
9098
text-align: right;
9199
border-top: 1px solid #EEE;
92100
}

vendor/modstart/modstart/resources/asset/src/svue/components/AudioPlayerButton.vue

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6,64 +6,64 @@
66
<a v-if="playing" class="pause" href="javascript:;" @click="playing=false">
77
<i class="iconfont">&#xe6a3;</i>
88
</a>
9-
<audio ref="audio" :src="source"></audio>
9+
<audio ref="audio" :src="source" preload="none"></audio>
1010
</span>
1111
</template>
1212

1313
<script>
14-
const convertTimeHHMMSS = (val) => {
14+
const convertTimeHHMMSS = (val) => {
1515
let hhmmss = new Date(val * 1000).toISOString().substr(11, 8);
1616
return hhmmss.indexOf("00:") === 0 ? hhmmss.substr(3) : hhmmss;
17-
};
17+
};
1818
19-
export default {
19+
export default {
2020
props: {
21-
source: {
22-
type: String,
23-
default: ''
24-
}
21+
source: {
22+
type: String,
23+
default: ''
24+
}
2525
},
2626
data() {
27-
return {
28-
audio: undefined,
29-
loaded: false,
30-
playing: false
31-
}
27+
return {
28+
audio: undefined,
29+
loaded: false,
30+
playing: false
31+
}
3232
},
3333
watch: {
34-
source(newValue, oldValue) {
35-
if (newValue && newValue != oldValue) {
36-
this.init()
34+
source(newValue, oldValue) {
35+
if (newValue && newValue != oldValue) {
36+
this.init()
37+
}
38+
},
39+
playing(value) {
40+
if (value) {
41+
return this.audio.play();
42+
}
43+
this.audio.pause();
3744
}
38-
},
39-
playing(value) {
40-
if (value) {
41-
return this.audio.play();
42-
}
43-
this.audio.pause();
44-
}
4545
},
4646
mounted() {
47-
this.audio = this.$refs.audio
48-
this.audio.addEventListener('loadeddata', this.loadeddata);
49-
this.audio.addEventListener('pause', () => {
50-
this.playing = false
51-
});
52-
this.audio.addEventListener('play', () => {
53-
this.playing = true
54-
});
47+
this.audio = this.$refs.audio
48+
this.audio.addEventListener('loadeddata', this.loadeddata);
49+
this.audio.addEventListener('pause', () => {
50+
this.playing = false
51+
});
52+
this.audio.addEventListener('play', () => {
53+
this.playing = true
54+
});
5555
},
5656
methods: {
57-
init() {
58-
},
59-
loadeddata() {
60-
if (this.audio.readyState >= 2) {
61-
this.loaded = true
62-
this.durationSeconds = parseInt(this.audio.duration)
63-
return
64-
}
65-
throw new Error('Failed to load sound file.');
66-
},
57+
init() {
58+
},
59+
loadeddata() {
60+
if (this.audio.readyState >= 2) {
61+
this.loaded = true
62+
this.durationSeconds = parseInt(this.audio.duration)
63+
return
64+
}
65+
throw new Error('Failed to load sound file.');
66+
},
6767
}
68-
}
68+
}
6969
</script>

vendor/modstart/modstart/src/Admin/Controller/SystemController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function securityFix(AdminDialogPage $page)
7373
file_put_contents(base_path('.env'), $content);
7474
} catch (\Exception $e) {
7575
BizException::throwsIfMessageMatch($e, [
76-
'Permission denied' => L('FileWriteNoPermission')
76+
'Permission denied' => L('FileWriteNoPermission') . '(.env)',
7777
]);
7878
}
7979
return Response::json(0, L('Operate Success'), null, '[reload]');

0 commit comments

Comments
 (0)