38 Commits

Author SHA1 Message Date
5018a59045 Merge branch 'dev' of https://gitea.f2b211.com/jsasg/orico-official-website into dev 2025-07-16 13:39:34 +08:00
e781887d16 fix: 产品目录同步产品默认在售 2025-07-16 13:38:54 +08:00
3eda90f2d1 fix: 后台管理 产品参数问题 2025-07-16 11:51:48 +08:00
df8001d43e fix: 产品搜索无数据语言问题 2025-07-16 10:31:14 +08:00
7f8ad55c97 pc编辑文本样式 2025-07-16 10:19:42 +08:00
14f0f1609e 添加编辑器样式 2025-07-16 10:17:58 +08:00
6c176a1039 1 2025-07-16 10:12:28 +08:00
bffe804a7b 1 2025-07-16 10:10:36 +08:00
a9beb0dda6 1 2025-07-16 10:04:54 +08:00
3c72fa125f 1 2025-07-16 10:02:47 +08:00
81df05e0f9 1 2025-07-16 09:56:05 +08:00
e0fd77837d 1 2025-07-16 09:54:28 +08:00
7344691613 Merge branch 'master' of https://gitea.f2b211.com/jsasg/orico-official-website 2025-07-16 09:51:31 +08:00
fe697df167 1 2025-07-16 09:51:26 +08:00
b743688d99 Merge branch 'dev' 2025-07-15 15:00:51 +08:00
51b6841a3a fix: openapi token有效期配置 2025-07-15 15:00:38 +08:00
768ed5b0fb fix: openapi token有效期配置 2025-07-15 14:59:25 +08:00
0c2f96fd49 Merge branch 'dev' 2025-07-15 14:49:47 +08:00
40c8385776 perf: openapi token有效期配置 2025-07-15 14:49:03 +08:00
80c6647a0c Merge branch 'dev' 2025-07-15 14:45:54 +08:00
187a0affcc perf: openapi token有效期配置 2025-07-15 14:45:16 +08:00
a35288dd0b Merge branch 'dev' 2025-07-15 14:21:30 +08:00
b36627ec25 perf: openapi client授权过期 2025-07-15 14:21:16 +08:00
eb2a98e7fe fix: admapi 角色菜单权力model 2025-07-15 14:21:04 +08:00
5c79e33ce1 perf: openapi client授权过期 2025-07-15 14:20:36 +08:00
341e1f54fb fix: admapi 角色菜单权力model 2025-07-15 13:50:50 +08:00
78925fbbab Merge branch 'dev' 2025-07-15 10:48:30 +08:00
d9e056972c perf: .gitignore 2025-07-15 10:46:17 +08:00
b09f7d1e6f fix: mobile subcategory.html 2025-07-15 09:54:58 +08:00
ad0f7f4b87 fix: mobile subcategory.html 2025-07-15 09:54:38 +08:00
61e4ac1fb3 smallImgDown相对位置修改 2025-07-15 09:36:55 +08:00
728730433b bsImg 高度自适应 2025-07-15 09:32:07 +08:00
3a50a23cfa Merge branch 'master' of https://gitea.f2b211.com/jsasg/orico-official-website 2025-07-15 09:30:05 +08:00
1dc03040f1 .bttj 修改 2025-07-15 09:30:02 +08:00
900d73d389 fix: mobile subcategory.html 2025-07-15 09:25:25 +08:00
5b69987d6e perf: mobile 产品分类与搜索页改为缩略图 2025-07-15 09:22:21 +08:00
512c07b5a8 Merge branch 'dev' of https://gitea.f2b211.com/jsasg/orico-official-website into dev 2025-07-15 09:19:14 +08:00
c04b7cae38 fix: mobile view问题 2025-07-15 09:16:01 +08:00
25 changed files with 2342 additions and 34 deletions

5
.env
View File

@@ -1,5 +0,0 @@
[JWT]
TTL=3600
REFRESH_TTL=20160
SECRET=b43e6276644ed60e65c50d1b324ba10b

View File

@@ -36,12 +36,14 @@ WHITE_LIST[] = receive_sync/product
# 不需记录日志的接口
[ADMIN_API]
IGNORE_LOGGING_LIST[] = v1/OperateLog/index
MAX_IMAGE_SIZE = 5mb # 图片上传最大限制
MAX_VIDEO_SIZE = 150mb # 视频上传最大限制
MAX_ATTACHMENT_SIZE = 100mb # 附件上传最大限制
MAX_IMAGE_SIZE = 5mb; # 图片上传最大限制
MAX_VIDEO_SIZE = 150mb; # 视频上传最大限制
MAX_ATTACHMENT_SIZE = 100mb; # 附件上传最大限制
# 开放API
[OPENAPI]
ACCESS_TOKEN_LIFETIME = 3600; # 访问令牌有效期
REFRESH_TOKEN_LIFETIME = 1209600; # 刷新令牌有效期
RESOURCE_IMAGES_DOMAIN = http://local.orico.com; # 图片资源服务器地址
RESOURCE_VIDEOS_DOMAIN = http://local.orico.com; # 视频资源服务器地址

2
.gitignore vendored
View File

@@ -3,8 +3,10 @@ composer.phar
composer.lock
.DS_Store
Thumbs.db
.env
.env.dev
.env.local
.env.prod
/.idea
/.vscode

View File

@@ -183,7 +183,7 @@ class ReceiveProductSync
'desc' => '',
'video_img' => '',
'video_url' => '',
'is_sale' => 0,
'is_sale' => 1,
'is_new' => 0,
'is_hot' => 0,
'is_show' => 0,

View File

@@ -171,7 +171,7 @@ class Product
// 更新产品参数
if ($put['params'] != "") {
ProductParamsModel::productId($id)->delete();
if (preg_match_all('/(\S+):(.[^\s]+)/', $put['params'], $match_result)) {
if (preg_match_all('/(.+):(.+)/', $put['params'], $match_result)) {
$params = [];
for ($i = 0; $i < count($match_result[0]); $i++) {
$params[] = [

View File

@@ -18,6 +18,6 @@ class SysRoleAuthorityBaseModel extends Model
protected $schema = [
'role_id' => 'int',
'menu_id' => 'int',
'permission' => 'int',
'permission' => 'string',
];
}

View File

@@ -53,6 +53,7 @@ return [
'product/search' => [
'搜索' => 'Search',
'请搜索' => 'Please search...',
'暂无数据' => 'No data',
],
// 产品详情
'product/detail' => [

View File

@@ -177,6 +177,11 @@ return [
'提交' => 'SUBMIT',
],
// 产品 - 搜索
'product/search' => [
'暂无数据' => 'No data',
],
// 产品 - 分类
'product/category' => [
'查看全部' => 'View All',

View File

@@ -101,7 +101,7 @@
<a href="{$sc.link}"><img src="{$sc.image}" /></a>
<div class="position_a text_center wow animated bounceInLeft">
<p class="f_weight_500 timetitle" {:style(['color'=>$sc['title_txt_color']])}>{$sc.title}</p>
<p class=" margin-top-14 f_weight_400 timedesin" {:style(['color'=>$sc['desc_txt_color']])}>{$sc.desc}</p>
<p class=" margin-top-14 f_weight_400 timedesin" {:style(['color'=>$sc['desc_txt_color']])}>{$sc.desc|raw}</p>
<p class=" margin-top-20 f_weight_400">
<a href="{$sc.link}" class="timeblue"> {:lang_i18n('了解更多')} <img src="__IMAGES__/more-r.png"></a>
</p>
@@ -141,7 +141,7 @@
<img src="{$bs.image}">
<div class="position_a text_center">
<p class=" timetitle" {:style(['color'=>$bs['title_txt_color']])}>{$bs.title} </p>
<p class=" margin-top-14 f_weight_400 timedesin" {:style(['color'=>$bs['desc_txt_color']])}>{$bs.desc}</p>
<p class=" margin-top-14 f_weight_400 timedesin" {:style(['color'=>$bs['desc_txt_color']])}>{$bs.desc|raw}</p>
<p class=" margin-top-20 f_weight_400">
<span class=" timeblue">
<a href="{$bs.link}">{:lang_i18n('了解更多')}<img src="__IMAGES__/more-r.png"></a>

View File

@@ -46,7 +46,7 @@
{volist name="vo.products" id="pro" length="4"}
<li class="img-responsive">
<a href="{:url('product/detail', ['id' => $pro.id])}">
<img src="{$pro.cover_image}">
<img src="{:thumb($pro.cover_image)}">
<span class="title">{$pro.name}</span>
<span class="subtitle">{$pro.spu}</span>
</a>

View File

@@ -17,7 +17,7 @@
<div class="prlist">
{volist name="products" id="pro"}
<a class="pritem" href="{:url('product/detail',['id'=>$pro.id])}">
<img src="{$pro.cover_image}" class="primg"/>
<img src="{:thumb($pro.cover_image)}" class="primg"/>
<div class="prinfo">
<span class="t1">{$pro.name|raw}</span>
<span class="t2">{$pro.spu|raw}</span>
@@ -28,7 +28,7 @@
<!-- 分页 -->
<div>{$page|raw}</div>
{else/}
<div style="text-align: center; padding: 10%;">暂无数据</div>
<div style="text-align: center; padding: 10%;">{:lang_i18n('暂无数据')}</div>
{/notempty}
</div>
</div>

View File

@@ -19,6 +19,7 @@
<div class="m_Container">
{notempty name="categorys_data"}
<div class="product_list">
{if condition="in_array('products', array_keys($categorys_data[0]))"}
<ul>
{assign name="products" value=":\think\helper\Arr::flatMap(fn($pro) => $pro['products'], $categorys_data)" /}
{volist name="products" id="pr"}
@@ -55,6 +56,7 @@
</li>
{/volist}
</ul>
{/if}
</div>
{/notempty}
</div>

View File

@@ -33,8 +33,10 @@
</div>
</div>
<!-- 文章内容 -->
<div id="rendered-content" class="nhlp-app-content">
{$article.content|raw|default=''}
<div class="ql-container">
<div id="rendered-content" class="nhlp-app-content ql-editor">
{$article.content|raw|default=''}
</div>
</div>
<!-- 搜索 -->
<div class="nhlpapp-search">

View File

@@ -35,7 +35,7 @@
</ul>
<div>{$page|raw}</div>
{else/}
<div style="text-align: center; padding: 10%;">暂无数据</div>
<div style="text-align: center; padding: 10%;">{:lang_i18n('暂无数据')}</div>
{/notempty}
</div>
</div>

View File

@@ -58,7 +58,9 @@
{/notempty}
</div>
<!--文章详情 -->
<div class="nars-hlpdt-mm" id="rendered-content">{$article.content|raw|default=''}</div>
<div class="ql-container ">
<div class="nars-hlpdt-mm ql-editor" id="rendered-content">{$article.content|raw|default=''}</div>
</div>
<!--锚点定位 -->
<div class="nars-hlpdt-mr">
<div id="title-list">

View File

@@ -25,7 +25,10 @@ class Authorize
$server = request()->server();
$request = new Request([], $post, [], [], [], $server);
$storage = new OAuthStorage;
$oauth = new OAuth2($storage);
$oauth = new OAuth2($storage, [
'access_token_lifetime' => intval(env('OPENAPI.ACCESS_TOKEN_LIFETIME', 3600)),
'refresh_token_lifetime' => intval(env('OPENAPI.REFRESH_TOKEN_LIFETIME', 1209600)),
]);
$token = $oauth->grantAccessToken($request);
return success('success', json_decode($token->getContent(), true));
} catch (OAuth2ServerException $e) {

View File

@@ -19,7 +19,10 @@ class Auth
public function handle($request, \Closure $next)
{
try {
$oauth = new OAuth2(new OAuthStorage);
$oauth = new OAuth2(new OAuthStorage, [
'access_token_lifetime' => intval(env('OPENAPI.ACCESS_TOKEN_LIFETIME', 3600)),
'refresh_token_lifetime' => intval(env('OPENAPI.REFRESH_TOKEN_LIFETIME', 1209600)),
]);
$token = $oauth->getBearerToken();
$oauth->verifyAccessToken($token);
} catch (OAuth2ServerException $e) {

View File

@@ -20,6 +20,8 @@ class OAuthClientModel extends Model
'client_secret' => 'string',
'redirect_uri' => 'string',
'enabled' => 'int',
'expired_at' => 'datetime',
'remark' => 'string',
'created_at' => 'datetime',
'updated_at' => 'datetime',
'deleted_at' => 'datetime'

View File

@@ -78,15 +78,18 @@ class OAuthStorage implements IOAuth2GrantCode, IOAuth2RefreshTokens, IOAuth2Gra
public function getClient($client_id): IOAuth2Client
{
// 实现获取客户端的逻辑
$ret = OAuthClientModel::clientId($client_id)->find();
if (is_null($ret)) {
$client = OAuthClientModel::clientId($client_id)->find();
if (is_null($client)) {
throw new \Exception('客户端不存在');
}
if ($ret->enabled != 1) {
if ($client->enabled != 1) {
throw new \Exception('客户端已禁用');
}
if (strtotime($client->expired_at) < time()) {
throw new \Exception('client_id 授权已过期');
}
return new OAuth2Client($ret->client_id, $ret->client_secret, [$ret->redirect_uri]);
return new OAuth2Client($client->client_id, $client->client_secret, [$client->redirect_uri]);
}
public function checkClientCredentials(IOAuth2Client $client, $client_secret = null): bool
@@ -96,6 +99,9 @@ class OAuthStorage implements IOAuth2GrantCode, IOAuth2RefreshTokens, IOAuth2Gra
if (is_null($client)) {
return false;
}
if (strtotime($client->expired_at) < time()) {
throw new \Exception('client_id 授权已过期');
}
return $client->client_secret == hash('sha1', $client->client_id . $client_secret . $this->salt);
}

View File

@@ -137,7 +137,7 @@
font-size: 14px;
font-family: Montserrat-Bold, Montserrat;
font-weight: bold;
width: 212px;
/* width: 212px; */
/* height: 48px; */
padding: 15px 60px;
background: #004bfa;

View File

@@ -130,7 +130,7 @@
padding: 15px;
background: #f2f2f2;
border-radius: 8px;
font-family: Montserrat-Regular, Montserrat;
font-family: Montserrat-Regular, Montserrat;
border: 0;
}
@@ -138,7 +138,7 @@
font-size: 14px;
font-family: Montserrat-Bold, Montserrat;
font-weight: bold;
width: 212px;
/* width: 212px; */
padding: 15px 60px;
background: #004bfa;
border-radius: 28px;

File diff suppressed because it is too large Load Diff

View File

@@ -541,7 +541,7 @@
margin-left: 1%;
border-radius: 26px 26px 26px 26px;
width: 98%;
height: 41.625rem;
/* height: 41.625rem; */
}
.orico_Page_index .pageMain .brandStory .swiper-wrapper .bsitem .bsinf {

View File

@@ -608,13 +608,13 @@
.scrollbutton_01.smallImgUp,
.scrollbutton_01.smallImgUp.disabled {
background: url(/static/index/pc/images/fl.png);
left: 0px;
left: 10%;
}
.scrollbutton_01.smallImgDown,
.scrollbutton_01.smallImgDown.disabled {
background: url(/static/index/pc/images/rh.png);
right: 0px;
right: 10%;
}
.scrollbutton.smallImgUp,

File diff suppressed because it is too large Load Diff