Skip to content

Commit

Permalink
优化:富文本编辑器升级
Browse files Browse the repository at this point in the history
  • Loading branch information
modstart committed Dec 16, 2024
1 parent 1c4f0ed commit 115785d
Show file tree
Hide file tree
Showing 85 changed files with 1,344 additions and 1,083 deletions.
2 changes: 1 addition & 1 deletion app/Constant/AppConstant.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ class AppConstant
{
const APP = 'cms';
const APP_NAME = 'ModStartCMS';
const VERSION = '9.0.0';
const VERSION = '9.1.0';
}
8 changes: 8 additions & 0 deletions module/Member/Admin/Controller/MemberController.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,19 @@ protected function crud(AdminCRUDBuilder $builder)
$icon = $oauth->icon();
}
}
switch ($title) {
case 'wechatunion':
$icon = 'iconfont icon-wechat';
$title = '微信联合ID';
$color = '#565b56';
break;
}
if (empty($color)) {
$color = ColorUtil::pick($oauthRecord['type']);
}
$oauthList[] = join('', [
"<a style='color:{$color};'",
"class='tw-bg-gray-100 tw-inline-block tw-leading-6 tw-rounded-full tw-shadow tw-text-center tw-w-6 tw-mr-1'",
"href='javascript:;'",
"data-tip-popover='{$title}'",
"data-dialog-request='" . modstart_admin_url('member/oauth', ['_id' => $item->id]) . "'",
Expand Down
1 change: 0 additions & 1 deletion module/Member/Api/Controller/MemberProfileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
use Module\Member\Util\MemberUtil;
use Module\Vendor\Job\MailSendJob;
use Module\Vendor\Job\SmsSendJob;
use Module\Vendor\Sms\SmsUtil;
use Module\Vendor\Support\ResponseCodes;
use Symfony\Component\HttpFoundation\File\UploadedFile;

Expand Down
3 changes: 2 additions & 1 deletion module/Member/Docs/release.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
## 4.5.0
## 4.5.0 VIP优惠券集成,VIP购买交互方式优化,注册IP定位,用户密码加密

- 新增:VIP 优惠券功能集成,支持折扣券
- 新增:可完全自定义上传功能定制的特性 UploadScript Hook
- 新增:用户登录传输用户密码加密
- 新增:用户注册增加注册IP定位,支持用户注册地理位置记录
- 优化:后台授权登录显示样式功能优化
- 优化:VIP 开通页面交互形式优化

---
Expand Down
12 changes: 12 additions & 0 deletions module/Member/Model/MemberMeta.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php


namespace Module\Member\Model;


use Illuminate\Database\Eloquent\Model;

class MemberMeta extends Model
{
protected $table = 'member_meta';
}
24 changes: 23 additions & 1 deletion module/Member/Type/Gender.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,26 @@ public static function getList()
];
}

}
public static function labelToValue($label)
{
switch ($label) {
case 'male':
return self::MALE;
case 'female':
return self::FEMALE;
}
return null;
}

public static function valueToLabel($value)
{
switch ($value) {
case self::MALE:
return 'male';
case self::FEMALE:
return 'female';
}
return null;
}

}
11 changes: 6 additions & 5 deletions module/Member/Util/MemberMetaUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Carbon\Carbon;
use ModStart\Core\Dao\ModelUtil;
use Module\Member\Model\MemberMeta;

class MemberMetaUtil
{
Expand All @@ -16,16 +17,16 @@ public static function set($memberUserId, $name, $value = null)
'name' => $name,
];
if (is_null($value)) {
ModelUtil::delete('member_meta', $where);
ModelUtil::delete(MemberMeta::class, $where);
} else {
if (ModelUtil::update('member_meta', $where, [
if (ModelUtil::update(MemberMeta::class, $where, [
'value' => $value,
'updated_at' => Carbon::now()
]) <= 0) {
ModelUtil::transactionBegin();
$one = ModelUtil::getWithLock('member_meta', $where);
$one = ModelUtil::getWithLock(MemberMeta::class, $where);
if (empty($one)) {
ModelUtil::insert('member_meta', array_merge($where, [
ModelUtil::insert(MemberMeta::class, array_merge($where, [
'value' => $value,
]));
}
Expand All @@ -40,7 +41,7 @@ public static function get($memberUserId, $name)
'memberUserId' => $memberUserId,
'name' => $name,
];
$meta = ModelUtil::get('member_meta', $where);
$meta = ModelUtil::get(MemberMeta::class, $where);
if ($meta) {
return $meta['value'];
}
Expand Down
10 changes: 5 additions & 5 deletions module/Member/Util/MemberUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,12 @@ public static function listUsers($ids)
public static function convertOneToBasic($memberUser)
{
return [
'id' => $memberUser['id'],
'username' => $memberUser['username'],
'nickname' => empty($memberUser['nickname']) ? $memberUser['username'] : $memberUser['nickname'],
'created_at' => $memberUser['created_at'],
'id' => $memberUser ? $memberUser['id'] : 0,
'username' => $memberUser ? $memberUser['username'] : null,
'nickname' => $memberUser ? (empty($memberUser['nickname']) ? $memberUser['username'] : $memberUser['nickname']) : null,
'created_at' => $memberUser ? $memberUser['created_at'] : null,
'signature' => isset($memberUser['signature']) ? $memberUser['signature'] : null,
'avatar' => AssetsUtil::fixFullOrDefault($memberUser['avatar'], 'asset/image/avatar.svg'),
'avatar' => AssetsUtil::fixFullOrDefault($memberUser ? $memberUser['avatar'] : null, 'asset/image/avatar.svg'),
];
}

Expand Down
2 changes: 2 additions & 0 deletions module/Member/View/pc/loginDialog.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

@section('headAppend')
@parent
<link rel="canonical" href="{{modstart_web_url('register/login')}}"/>
{!! \ModStart\Core\Hook\ModStartHook::fireInView('MemberLoginPageHeadAppend'); !!}
@endsection

Expand All @@ -14,6 +15,7 @@
@endsection

{!! \ModStart\ModStart::style('html,body{background:var(--color-content-bg);}') !!}

@section('body')

<div class="ub-account pb-member-login-account">
Expand Down
2 changes: 1 addition & 1 deletion module/Member/View/pc/registerDialog.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

@section('headAppend')
@parent
<link rel="canonical" href="{{modstart_web_url('register/register')}}"/>
{!! \ModStart\Core\Hook\ModStartHook::fireInView('MemberRegisterPageHeadAppend'); !!}
@endsection

@section('bodyAppend')
@parent
{{\ModStart\ModStart::js('asset/common/commonVerify.js')}}
{{\ModStart\ModStart::js('vendor/Member/entry/register.js')}}
<script>
Expand Down
4 changes: 2 additions & 2 deletions module/Member/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Member",
"title": "用户系统",
"version": "4.5.0",
"modstartVersion": ">=3.9.0",
"modstartVersion": ">=4.0.0",
"author": "官方",
"description": "提供基础的用户注册、登录服务",
"env": [
Expand Down Expand Up @@ -109,4 +109,4 @@
]
]
}
}
}
5 changes: 4 additions & 1 deletion module/SmsTecmz/Admin/Controller/ConfigController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@
use Illuminate\Routing\Controller;
use ModStart\Admin\Layout\AdminConfigBuilder;
use Module\Vendor\Provider\SmsTemplate\SmsTemplateProvider;
use Module\Vendor\Sms\SmsUtil;
use Module\Vendor\Tecmz\TecmzUtil;
use Module\Vendor\Util\QueueUtil;

class ConfigController extends Controller
{
public function setting(AdminConfigBuilder $builder)
{
$builder->pageTitle('魔众短信');
if (class_exists(QueueUtil::class) && QueueUtil::isAsync()) {
$builder->html('')->html(QueueUtil::queueRestartTip());
}
$builder->switch('SmsTecmz_Enable', '开启短信发送')->help('<div>访问 <a href="' . TecmzUtil::url() . '" target="_blank">' . TecmzUtil::url() . '</a> 申请</div>');
$builder->text('SmsTecmz_AppId', 'AppId');
$builder->text('SmsTecmz_AppSecret', 'AppSecret');
Expand Down
6 changes: 6 additions & 0 deletions module/SmsTecmz/Docs/release.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 1.4.0 异步队列任务情况下,修改配置重启队列提示

- 新增:异步队列任务情况下,修改配置重启队列提示

---

## 1.3.0 适配Laravel9版

- 新增:适配Laravel9版
Expand Down
11 changes: 5 additions & 6 deletions module/SmsTecmz/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"require": [
"Vendor:>=1.6.0"
],
"version": "1.3.0",
"version": "1.4.0",
"author": "ModStart",
"description": "魔众API短信发送配置",
"env": [
Expand All @@ -18,8 +18,7 @@
"云短信",
"魔众API"
],
"providers": [
],
"config": {
}
}
"providers": [],
"config": {},
"modstartVersion": ">=4.0.0"
}
Loading

0 comments on commit 115785d

Please sign in to comment.