diff --git a/.env.local b/.env.local index 2341dadf..dab1f91e 100644 --- a/.env.local +++ b/.env.local @@ -11,6 +11,9 @@ DB_PREFIX = ow_ DEFAULT_LANG = zh-cn +# 前端代理服务器ip(影响使用代理访问情况下的客户端ip获取) +PROXY_SERVER_IP[] = 120.79.27.160 + [JWT] TTL=3600 REFRESH_TTL=20160 @@ -23,4 +26,12 @@ WHITE_LIST[] = v1/user/captcha # 不需记录日志的接口 [ADMIN_API] -IGNORE_LOGGING_LIST[] = v1/OperateLog/index \ No newline at end of file +IGNORE_LOGGING_LIST[] = v1/OperateLog/index +MAX_IMAGE_SIZE = 5mb; # 图片上传最大限制 +MAX_VIDEO_SIZE = 150mb; # 视频上传最大限制 +MAX_ATTACHMENT_SIZE = 100mb; # 附件上传最大限制 + +# 开放API +[OPENAPI] +RESOURCE_IMAGES_DOMAIN = http://local.orico.com; # 图片资源服务器地址 +RESOURCE_VIDEOS_DOMAIN = http://local.orico.com; # 视频资源服务器地址 \ No newline at end of file diff --git a/app/admin/controller/v1/Article.php b/app/admin/controller/v1/Article.php index ba60d6b7..4c4adf55 100644 --- a/app/admin/controller/v1/Article.php +++ b/app/admin/controller/v1/Article.php @@ -39,7 +39,11 @@ class Article ->language(request()->lang_id) ->where(function($query) use($param) { if (isset($param['category_id'])) { - $query->where('category_id', '=', $param['category_id']); + if (str_contains($param['category_id'], ',') || is_array($param['category_id'])) { + $query->whereIn('category_id', $param['category_id']); + } else { + $query->where('category_id', '=', $param['category_id']); + } } }) ->withSearch(['title', 'release_time'], [ @@ -55,7 +59,8 @@ class Article 'category', 'category_id' ]) - ->bindAttr('category', ['category_name' => 'name']); + ->bindAttr('category', ['category_name' => 'name']) + ->each(fn($item) => $item->image = thumb($item->image)); return success('获取成功', $article); } diff --git a/app/admin/controller/v1/ArticleTrash.php b/app/admin/controller/v1/ArticleTrash.php index daef9ecc..349b5b50 100644 --- a/app/admin/controller/v1/ArticleTrash.php +++ b/app/admin/controller/v1/ArticleTrash.php @@ -39,7 +39,8 @@ class ArticleTrash 'list_rows' => $param['size'] ]) ->hidden(['category_id', 'category']) - ->bindAttr('category', ['category_name' => 'name']); + ->bindAttr('category', ['category_name' => 'name']) + ?->each(fn($item) => $item->image = thumb($item->image)); return success('获取成功', $data); } diff --git a/app/admin/controller/v1/Attachment.php b/app/admin/controller/v1/Attachment.php index ba51b77b..08c27a7d 100644 --- a/app/admin/controller/v1/Attachment.php +++ b/app/admin/controller/v1/Attachment.php @@ -48,7 +48,8 @@ class Attachment 'page' => $params['page'] ]) ->bindAttr('category', ['category_name']) - ->hidden(['category_id', 'category']); + ->hidden(['category_id', 'category']) + ?->each(fn($item) => $item->image = thumb($item->image)); return success('获取成功', $attachments); } diff --git a/app/admin/controller/v1/AttachmentTrash.php b/app/admin/controller/v1/AttachmentTrash.php index bbe40647..59c1515e 100644 --- a/app/admin/controller/v1/AttachmentTrash.php +++ b/app/admin/controller/v1/AttachmentTrash.php @@ -46,7 +46,8 @@ class AttachmentTrash 'page' => $params['page'] ]) ->bindAttr('category', ['category_name']) - ->hidden(['category_id', 'category']); + ->hidden(['category_id', 'category']) + ?->each(fn($item) => $item->image = thumb($item->image)); return success('获取成功', $attachments); } diff --git a/app/admin/controller/v1/BannerItem.php b/app/admin/controller/v1/BannerItem.php index d949bcd9..7844309e 100644 --- a/app/admin/controller/v1/BannerItem.php +++ b/app/admin/controller/v1/BannerItem.php @@ -33,13 +33,17 @@ class BannerItem 'item.sort', 'item.status', 'item.created_at', - 'banner.name' => 'banner_name' + 'bnr.name' => 'banner_name' ]) - ->join('sys_banner banner', 'banner.id = item.banner_id') - ->where('banner.language_id', '=', request()->lang_id) + ->join('sys_banner bnr', 'bnr.id = item.banner_id') + ->where('bnr.language_id', '=', request()->lang_id) ->where(function($query) use($param){ if (!empty($param['banner_id'])) { - $query->where('item.banner_id', '=', $param['banner_id']); + if (is_array($param['banner_id']) || str_contains($param['banner_id'], ',')) { + $query->whereIn('item.banner_id', $param['banner_id']); + } else { + $query->where('item.banner_id', '=', $param['banner_id']); + } } if (!empty($param['title'])) { $query->where('item.title', 'like', "%{$param['title']}%"); @@ -60,7 +64,8 @@ class BannerItem ->paginate([ 'list_rows' => $param['size'], 'page' => $param['page'] - ]); + ]) + ->each(fn($item) => $item->image = thumb($item->image)); return success('获取成功', $banner_items); } @@ -76,6 +81,7 @@ class BannerItem 'updated_at', 'deleted_at' ]) + ->append(['rel_prod_cate_id', 'rel_prod_cate_name']) // 绑定产品分类关联模型中字段到父模型中 ->find($id); if (empty($banner_item)) { return error('横幅不存在'); @@ -282,7 +288,11 @@ class BannerItem ->where('banner.language_id', '=', request()->lang_id) ->where(function($query) use($param){ if (!empty($param['banner_id'])) { - $query->where('item.banner_id', '=', $param['banner_id']); + if (is_array($param['banner_id']) || str_contains($param['banner_id'], ',')) { + $query->whereIn('item.banner_id', $param['banner_id']); + } else { + $query->where('item.banner_id', '=', $param['banner_id']); + } } if (!empty($param['title'])) { $query->where('item.title', 'like', "%{$param['title']}%"); diff --git a/app/admin/controller/v1/Faq.php b/app/admin/controller/v1/Faq.php index 741c749c..b9a30934 100644 --- a/app/admin/controller/v1/Faq.php +++ b/app/admin/controller/v1/Faq.php @@ -38,7 +38,8 @@ class Faq ->paginate([ 'list_rows' => $param['size'], 'page' => $param['page'], - ]); + ]) + ?->each(fn($item) => $item->image = thumb($item->image)); return success('获取成功', $faqs); } diff --git a/app/admin/controller/v1/OperateLog.php b/app/admin/controller/v1/OperateLog.php index 7134827d..219cfdb2 100644 --- a/app/admin/controller/v1/OperateLog.php +++ b/app/admin/controller/v1/OperateLog.php @@ -4,6 +4,7 @@ declare (strict_types = 1); namespace app\admin\controller\v1; use app\admin\model\v1\SysOperateLog; +use app\admin\model\v1\SysUserModel; /** * 操作日志控制器 @@ -21,11 +22,15 @@ class OperateLog 'size/d' ]); - $logs = SysOperateLog::hasWhere('user', function($query) use($param) { + $logs = SysOperateLog::field([ + 'SysOperateLog.*', + 'SysUserModel.username' + ]) + ->hasWhere('user', function($query) use($param) { if (!empty($param['operator'])) { - $query->where('username', 'like', "{$param['operator']}"); + $query->where('username', 'like', "%{$param['operator']}%"); } - $query->field(['id', 'username']); + $query->withTrashed()->field(['id', 'username']); }) ->withSearch(['title', 'created_at'], [ 'title' => $param['title'] ?? null, @@ -36,7 +41,6 @@ class OperateLog 'list_rows' => $param['size'] ?? 10, 'page' => $param['page'] ?? 1, ]) - ->bindAttr('user', ['username']) ->hidden(['user_id', 'user']); return success('获取成功', $logs); diff --git a/app/admin/controller/v1/Product.php b/app/admin/controller/v1/Product.php index 98e1080e..74ffbafa 100644 --- a/app/admin/controller/v1/Product.php +++ b/app/admin/controller/v1/Product.php @@ -63,7 +63,8 @@ class Product 'page' => $param['page'], ]) ->bindAttr('category', ['category_name' => 'name']) - ->hidden(['category_id', 'category']); + ->hidden(['category_id', 'category']) + ?->each(fn($item) => $item->cover_image = thumb($item->cover_image)); return success('获取成功', $products); } diff --git a/app/admin/controller/v1/ProductTrash.php b/app/admin/controller/v1/ProductTrash.php index 85cab381..456e624d 100644 --- a/app/admin/controller/v1/ProductTrash.php +++ b/app/admin/controller/v1/ProductTrash.php @@ -55,7 +55,8 @@ class ProductTrash 'page' => $param['page'], ]) ->bindAttr('category', ['category_name' => 'name']) - ->hidden(['category_id', 'category']); + ->hidden(['category_id', 'category']) + ?->each(fn($item) => $item->cover_image = thumb($item->cover_image)); return success('获取成功', $products); } diff --git a/app/admin/model/v1/ArticleModel.php b/app/admin/model/v1/ArticleModel.php index 9d20a662..763f1a74 100644 --- a/app/admin/model/v1/ArticleModel.php +++ b/app/admin/model/v1/ArticleModel.php @@ -85,6 +85,10 @@ class ArticleModel extends ArticleBaseModel // 分类查询 public function scopeCategory($query, $value) { + if (is_array($value) || str_contains($value, ',')) { + $query->whereIn('category_id', $value); + return; + } $query->where('category_id', '=', $value); } public function scopeCategoryNullable($query, $value) @@ -92,6 +96,10 @@ class ArticleModel extends ArticleBaseModel if (is_null($value)) { return; } + if (is_array($value) || str_contains($value, ',')) { + $query->whereIn('category_id', $value); + return; + } $query->where('category_id', '=', $value); } } diff --git a/app/admin/model/v1/AttachmentModel.php b/app/admin/model/v1/AttachmentModel.php index 21a6006d..f2dc1c6a 100644 --- a/app/admin/model/v1/AttachmentModel.php +++ b/app/admin/model/v1/AttachmentModel.php @@ -58,6 +58,10 @@ class AttachmentModel extends AttachmentBaseModel public function scopeCategoryId($query, $value) { if (empty($value)) return; + if (is_array($value) || str_contains($value, ',')) { + $query->whereIn('category_id', $value); + return; + } $query->where('category_id', '=', $value); } } diff --git a/app/admin/model/v1/ProductModel.php b/app/admin/model/v1/ProductModel.php index e73fe5e5..8f970687 100644 --- a/app/admin/model/v1/ProductModel.php +++ b/app/admin/model/v1/ProductModel.php @@ -65,10 +65,18 @@ class ProductModel extends ProductBaseModel if (is_null($value)) { return; } + if (is_array($value) || str_contains($value, ',')) { + $query->whereIn('category_id', $value); + return; + } $query->where('category_id', '=', $value); } public function scopeCategory($query, $value) { + if (is_array($value) || str_contains($value, ',')) { + $query->whereIn('category_id', $value); + return; + } $query->where('category_id', '=', $value); } diff --git a/app/admin/model/v1/SysBannerItemModel.php b/app/admin/model/v1/SysBannerItemModel.php index e06dd586..884efe77 100644 --- a/app/admin/model/v1/SysBannerItemModel.php +++ b/app/admin/model/v1/SysBannerItemModel.php @@ -17,8 +17,6 @@ class SysBannerItemModel extends SysBannerItemBaseModel // 软删除字段 protected $deleteTime = 'deleted_at'; - // 绑定产品分类关联模型中字段到父模型 - protected $append = ['rel_prod_cate_id', 'rel_prod_cate_name']; // 要隐藏的字段或关联模型数据字段 protected $hidden = ['prodMapping']; @@ -62,7 +60,7 @@ class SysBannerItemModel extends SysBannerItemBaseModel } if (is_array($value)) { if (count($value) > 1) { - $query->whereBetweenTime ('created_at', $value[0], $value[1]); + $query->whereBetweenTime('created_at', $value[0], $value[1]); } else { $query->whereTime('created_at', '>=', $value[0]); } @@ -73,6 +71,10 @@ class SysBannerItemModel extends SysBannerItemBaseModel public function scopeBannerId($query, $value) { if (is_null($value)) return; + if (is_array($value) || str_contains($value, ',')) { + $query->whereIn('banner_id', $value); + return; + } $query->where('banner_id', '=', $value); } } diff --git a/app/admin/model/v1/VideoModel.php b/app/admin/model/v1/VideoModel.php index 9f029c9c..08d1bfc3 100644 --- a/app/admin/model/v1/VideoModel.php +++ b/app/admin/model/v1/VideoModel.php @@ -62,6 +62,10 @@ class VideoModel extends VideoBaseModel if (empty($value)) { return; } + if (is_array($value) || str_contains($value, ',')) { + $query->whereIn('category_id', $value); + return; + } $query->where('category_id', '=', $value); } } diff --git a/app/common.php b/app/common.php index ae91895a..1fa13ee4 100644 --- a/app/common.php +++ b/app/common.php @@ -102,4 +102,46 @@ if (!function_exists('array_to_tree')) { } return $ret; } +} + +if (!function_exists('array_flatten')) { + /** + * 将多维数组转换为一维数组 + * @param array $array + * @return array + */ + function array_flatten(array $array, int $depth = 1): array + { + return \think\helper\Arr::flatten($array, $depth); + } +} + +if (!function_exists('thumb')) { + /** + * 获取缩略图 + * @param string $url 图片地址 + * @return string + */ + function thumb(?string $url): string + { + if (empty($url)) { + return ''; + } + if ( + str_contains($url, '_thumb') || + \think\helper\Str::startsWith($url, ['http://', 'https://']) || + !\think\helper\Str::endsWith($url, ['.png', '.jpg', '.jpeg', '.gif', '.tif', '.svg', '.webp', '.bmp']) + ) { + return $url; + } + + $idx = mb_strripos($url, '.', 0, 'utf-8'); + if ($idx === false) { + return $url; + } + + $len = mb_strlen($url, 'utf-8'); + + return mb_substr($url, 0, $idx, 'utf-8') . '_thumb' . mb_substr($url, $idx, $len - $idx, 'utf-8'); + } } \ No newline at end of file diff --git a/app/index/common.php b/app/index/common.php index 35395eec..7e901805 100644 --- a/app/index/common.php +++ b/app/index/common.php @@ -71,36 +71,6 @@ if (!function_exists('style')) { } } -if (!function_exists('thumb')) { - /** - * 获取缩略图 - * @param string $url 图片地址 - * @return string - */ - function thumb(string $url): string - { - if (empty($url)) { - return ''; - } - if ( - str_contains($url, '_thumb') || - \think\helper\Str::startsWith($url, ['http://', 'https://']) || - !\think\helper\Str::endsWith($url, ['.png', '.jpg', '.jpeg', '.gif', '.tif', '.svg', '.webp', '.bmp']) - ) { - return $url; - } - - $idx = mb_strripos($url, '.', 0, 'utf-8'); - if ($idx === false) { - return $url; - } - - $len = mb_strlen($url, 'utf-8'); - - return mb_substr($url, 0, $idx, 'utf-8') . '_thumb' . mb_substr($url, $idx, $len - $idx, 'utf-8'); - } -} - if (!function_exists('get_path_from_img_tag')) { /** * 从img标签中获取图片路径 @@ -128,7 +98,8 @@ if (!function_exists('lang_i18n')) { * @param string $lang 语言标识 * @return string */ - function lang_i18n(string $name, array $vars = [], string $lang = '') { + function lang_i18n(string $name, array $vars = [], string $lang = ''): string + { if (is_null($name)) { return ''; } diff --git a/app/index/controller/AboutUs.php b/app/index/controller/AboutUs.php index bd9e7ea9..69adbb48 100644 --- a/app/index/controller/AboutUs.php +++ b/app/index/controller/AboutUs.php @@ -27,6 +27,7 @@ class AboutUs extends Common ->where('status', '=', 1) ->order(['sort' => 'asc', 'id' => 'desc']); }]) + ->atPlatform(request()->from) ->uniqueLabel([ "BANNER_680744b1d0000", "BANNER_680744e7cacb3", @@ -62,7 +63,8 @@ class AboutUs extends Common // 获取品牌故事banner $banners = SysBannerItemModel::hasWhere('banner', [ 'language_id' => $this->lang_id, - 'unique_label' => 'BANNER_67ff632a5f7aa' + 'unique_label' => 'BANNER_67ff632a5f7aa', + 'at_platform' => request()->from, ]) ->type('image') ->enabled(true) @@ -87,6 +89,7 @@ class AboutUs extends Common $banner = SysBannerModel::with(['items' => function($query) { $query->where('status', '=', 1)->order(['sort' => 'asc', 'id' => 'desc']); }]) + ->atPlatform(request()->from) ->uniqueLabel([ 'BANNER_67ff786dc9c8d', 'BANNER_67ff7ef1354cf', @@ -124,6 +127,7 @@ class AboutUs extends Common ->where('status', '=', 1) ->order(['sort' => 'asc', 'id' => 'desc']); }]) + ->atPlatform(request()->from) ->uniqueLabel([ "BANNER_68075a636e648", "BANNER_68075bf4dd0f5", @@ -157,6 +161,7 @@ class AboutUs extends Common ->where('status', '=', 1) ->order(['sort' => 'asc', 'id' => 'desc']); }]) + ->atPlatform(request()->from) ->uniqueLabel([ "BANNER_6806f5f19c3d6", "BANNER_6806f609b9fe9", diff --git a/app/index/controller/Article.php b/app/index/controller/Article.php index 367444cb..13e0e2e5 100644 --- a/app/index/controller/Article.php +++ b/app/index/controller/Article.php @@ -32,10 +32,12 @@ class Article extends Common // 获取banner焦点图 $banner = SysBannerItemModel::hasWhere('banner', [ 'language_id' => $this->lang_id, - 'unique_label' => 'BANNER_67f9fc71e27db' + 'unique_label' => 'BANNER_67f9fc71e27db', + 'at_platform' => request()->from ]) ->type('image') ->visible(['id', 'title', 'image', 'link']) + ->enabled() ->find(); View::assign('banner', $banner); @@ -58,17 +60,21 @@ class Article extends Common 'id', 'title', 'desc', - 'image' + 'image', + 'release_time' ]) ->withSearch(['title'], ['title' => $param['keywords']??null]) ->category($param['cid']??$categorys[0]['id']) - ->where('release_time', '<=', date('Y-m-d H:i:s')) ->order(['sort' => 'asc', 'release_time' => 'desc', 'id' => 'desc']) ->paginate([ 'list_rows' => $param['size'], 'page' => $param['page'], + 'query' => request()->param([ + 'cid', + 'keywords', + ]) // 保留查询参数,防止分页丢失 ]); - } + } View::assign('articles', $articles??[]); return View::fetch('index'); @@ -123,12 +129,14 @@ class Article extends Common // 验证字段 $validate = Validate::rule([ - 'name' => 'max:64', - 'email' => 'email' + 'name' => 'require|max:64', + 'email' => 'require|email' ]) ->message([ - 'name.max' => '姓名不能超过64个字符', - 'email' => '请输入正确的邮箱' + 'name.require' => '姓名不能为空', + 'name.max' => '姓名不能超过:rule个字符', + 'email.require' => '邮箱不能为空', + 'email.email' => '邮箱格式不正确' ]); if (!$validate->check($post)) { return error($validate->getError()); @@ -142,9 +150,9 @@ class Article extends Common ]); $ret = ArticleLeaveMessageModel::create($data); if ($ret->isEmpty()) { - return error('留言提交失败'); + return error(lang('留言提交失败')); } - return success('留言提交成功'); + return success(lang('留言提交成功')); } } diff --git a/app/index/controller/Faq.php b/app/index/controller/Faq.php index 91d4774a..c9b3a6eb 100644 --- a/app/index/controller/Faq.php +++ b/app/index/controller/Faq.php @@ -25,7 +25,8 @@ class Faq extends Common // 获取banner焦点图 $banner = SysBannerItemModel::hasWhere('banner', [ 'language_id' => $this->lang_id, - 'unique_label' => 'BANNER_67fa37f30e151' + 'unique_label' => 'BANNER_67fa37f30e151', + 'at_platform' => request()->from ]) ->type('image') ->visible(['id', 'title', 'image', 'link']) diff --git a/app/index/controller/Product.php b/app/index/controller/Product.php index 666043a4..c1db50be 100644 --- a/app/index/controller/Product.php +++ b/app/index/controller/Product.php @@ -253,7 +253,11 @@ class Product extends Common ]; } foreach ($categorys_data as $k => $v) { - $categorys_data[$k]['products'] = $products_map[$v['id']] ?? []; + if (!isset($products_map[$v['id']])) { + unset($categorys_data[$k]); + continue; + } + $categorys_data[$k]['products'] = $products_map[$v['id']]; } } } diff --git a/app/index/controller/TopicNas.php b/app/index/controller/TopicNas.php index 4ad0a561..a96d0649 100644 --- a/app/index/controller/TopicNas.php +++ b/app/index/controller/TopicNas.php @@ -20,6 +20,10 @@ class TopicNas extends Common { // 获取国家/语言列表 $languages = $this->getLanguages(); + // 输出国家/语言列表 + if (request()->isMobile()) { + View::assign('header_languages', $languages); + } // 获取当前语言 $current_language = $this->getCurrentLanguage($languages); @@ -61,8 +65,10 @@ class TopicNas extends Common $nas_software = []; // 获取banner数据 $banners = SysBannerModel::with(['items' => function($query) { - $query->withoutField(['sort', 'created_at', 'updated_at', 'deleted_at']); + $query->withoutField(['sort', 'created_at', 'updated_at', 'deleted_at']) + ->order(['sort' => 'asc', 'id' => 'desc']); }]) + ->atPlatform(request()->from) ->uniqueLabel([ 'BANNER_680f156a805a8', 'BANNER_680f15ca5482f', diff --git a/app/index/lang/en-us/mobile.php b/app/index/lang/en-us/mobile.php index 288f2120..6bc8a5f1 100644 --- a/app/index/lang/en-us/mobile.php +++ b/app/index/lang/en-us/mobile.php @@ -15,6 +15,8 @@ return [ '提交失败' => 'fail', '信息已成功提交!' => 'Add Success!', '信息提交失败!' => 'Add Fail!', + '留言提交失败' => 'Message submit failed', + '留言提交成功' => 'Message submit success', '当前选定语言的采购可选品类配置出错' => 'Current language configuration of purchase optional categories is incorrect', // 首页 @@ -29,6 +31,19 @@ return [ '客服团队的工作时间:周一到周五,早9点到晚6点 平均应答时间:24小时内' => 'Our customer support is available Monday to Friday: 9am-6:00pm. Average answer time: 24h', ], + // 文章详情页 + 'article/detail' => [ + '分享' => 'SHARE', + '留言' => 'Leave a Reply', + '名称' => 'Name', + '电子邮箱' => 'Email', + '您的电子邮件地址不会被公开' => 'Your email address will not be pulished.', + '留言内容' => 'Comment', + '提交留言' => 'POST COMMENT', + '你可能还喜欢' => 'Recommended for you', + '链接复制成功' => 'Link copied successfully', + ], + // 产品分类 'product/category' => [ '查看全部' => 'View All', @@ -58,6 +73,12 @@ return [ '提交' => 'SUBMIT', ], + // 常见问题 + 'faq/index' => [ + '常见FQ_下载与服务_中文官网帮助信息_ORICO/奥睿科官网' => 'FAQ', + '常见问题解答' => 'Frequently asked questions', + ], + // 附件下载 'attachment/index' => [ '软件下载' => 'Software download', @@ -121,4 +142,40 @@ return [ '发送' => 'SEND', '成为经销商' => 'Become a Distributor', ], + + // 关于我们 - 品牌介绍 + 'aboutus/introduction' => [ + '品牌介绍' => 'Introduction of the Brand', + '选择我们的理由' => 'Why Choose Us', + '为您提供专属定制服务' => 'How We Can Help with Customization', + '对于不同的情况' => 'For Different Situation', + ], + + // 关于我们 - 文化介绍 + 'aboutus/culture' => [ + '文化介绍' => 'Culture Introduction', + ], + + // 关于我们 - 品牌历程 + 'aboutus/mileage' => [ + 'ORICO荣耀' => 'Our Achievement', + '品牌里程' => 'Brand Events', + '品牌活动' => 'Tech Development', + ], + + // 关于我们 - 售后政策 + 'aboutus/policy' => [ + '售后政策_注意事项' => 'After-Sales Policy', + '售后政策' => 'After-sale Policy', + 'ORICO/奥睿科商城为您提供七天包退、15天换新、1年保修、终身维护的服务承诺' => 'ORICO commits to provide 7-day Refund, 15-day Exchange, 1-year Quality Warranty. ', + '为了保障您的合法权益,敬请关注以下信息' => 'For your own benefits, please mind the following information', + '为了得到深圳市元创时代科技有限公司给予您的“包修、包换、包退”的权益,请您:' => 'For a smooth return and refund, quality warranty, please follow these steps:', + '特别说明' => 'ORICO is not liable for:' + ], + + // nas主题 - 首页 + 'topicnas/index' => [ + '网络存储解决方案' => 'Network Storage Solutions', + '配套软件' => 'Software', + ], ]; \ No newline at end of file diff --git a/app/index/lang/en-us/pc.php b/app/index/lang/en-us/pc.php index 344f4b85..80e2ee36 100644 --- a/app/index/lang/en-us/pc.php +++ b/app/index/lang/en-us/pc.php @@ -40,6 +40,11 @@ return [ '链接复制成功' => 'Link copied successfully', ], + // 常见问题 + 'faq/index' => [ + '常见FQ_下载与服务_中文官网帮助信息_ORICO/奥睿科官网' => 'FAQ', + ], + // 附件页 - 软件下载 'attachment/index' => [ '软件和驱动程序' => 'Software and Drivers', @@ -153,6 +158,7 @@ return [ // 产品 - 产品详情页 'product/detail' => [ + '首页' => 'Home', '产品详情' => 'Product Description', '相关产品' => 'Related Products', '发送查询' => 'Send Inquiry', diff --git a/app/index/view/mobile/about_us/culture.html b/app/index/view/mobile/about_us/culture.html new file mode 100644 index 00000000..2e20214a --- /dev/null +++ b/app/index/view/mobile/about_us/culture.html @@ -0,0 +1,38 @@ +{extend name="public/base" /} +{block name="title"} +{notempty name=":lang_i18n('文化介绍')"}{:lang_i18n('文化介绍')}{else/}{__BLOCK__}{/notempty} +{/block} +{block name="style"} + +{/block} +{block name="main"} +
+ +
+ {notempty name="focus_image"} +
+ + + +
+ {/notempty} + + {notempty name="culture"} + {volist name="culture" id="cul" offset="0" length="3"} +
+
+
{$cul.title}
+
{$cul.desc|raw}
+
+ {/volist} +
+ {volist name="culture" id="cul" offset="3"} +
+
{$cul.title}
+
{$cul.desc|raw}
+ {/volist} +
+ {/notempty} +
+
+{/block} \ No newline at end of file diff --git a/app/index/view/mobile/about_us/introduction.html b/app/index/view/mobile/about_us/introduction.html index b2e756c6..b401bce3 100644 --- a/app/index/view/mobile/about_us/introduction.html +++ b/app/index/view/mobile/about_us/introduction.html @@ -1,7 +1,58 @@ {extend name="public/base" /} +{block name="title"} +{notempty name=":lang_i18n('品牌介绍')"}{:lang_i18n('品牌介绍')}{else/}{__BLOCK__}{/notempty} +{/block} {block name="style"} - + {/block} {block name="main"} - +
+
+ {notempty name="focus_image"} + + {/notempty} + {notempty name="why"} +
+

{:lang_i18n('选择我们的理由')}

+
+ {volist name="why" id="wh"} +
+ +

{$wh.title}

+ {$wh.desc|raw} +
+ {/volist} +
+
+ {/notempty} + {notempty name="service"} +
+

{:lang_i18n('为您提供专属定制服务')}

+
+ {assign name="flat_service" value=":array_flatten($service)" /} + {volist name="flat_service" id="fs"} +
+ + {$fs.title} +
+ {/volist} +
+
+ {/notempty} + {notempty name="difference"} +
+

{:lang_i18n('对于不同的情况')}

+
+ {assign name="flat_difference" value=":array_flatten($difference)" /} + {volist name="flat_difference" id="di"} +
+ + {$di.title} +
+ {/volist} +
+
+ {/notempty} +
+
{/block} \ No newline at end of file diff --git a/app/index/view/mobile/about_us/mileage.html b/app/index/view/mobile/about_us/mileage.html new file mode 100644 index 00000000..06c58a3e --- /dev/null +++ b/app/index/view/mobile/about_us/mileage.html @@ -0,0 +1,106 @@ +{extend name="public/base"/} +{block name="style"} + +{/block} +{block name="main"} +
+ +
+
+
+
+ +
+
{:lang_i18n('ORICO荣耀')}
+
+ {notempty name="achievement"} +
    + {volist name="achievement" id="ac"} +
  • +

    $ac['desc_txt_color']])}>{$ac.desc|raw}

    +

    $ac['title_txt_color']])}>{$ac.title}

    +
  • + {/volist} +
+ {/notempty} +
+
+ {notempty name="events"} +
+
{:lang_i18n('品牌里程')}
+
+
+ + + + +
+ {/notempty} + {notempty name="development"} +
+
+
{:lang_i18n('品牌活动')}
+
+ {volist name="development" id="de"} +
+
+ +
+
+ {$de.title} +
+
{$de.desc|raw}
+
+ {/volist} +
+ {/notempty} +
+
+{/block} +{block name="script"} + +{/block} \ No newline at end of file diff --git a/app/index/view/mobile/about_us/policy.html b/app/index/view/mobile/about_us/policy.html new file mode 100644 index 00000000..543c6b40 --- /dev/null +++ b/app/index/view/mobile/about_us/policy.html @@ -0,0 +1,84 @@ +{extend name="public/base"/} +{block name="title"} +{:lang_i18n('售后政策_注意事项')} +{/block} +{block name="style"} + +{/block} +{block name="main"} +
+ +
+ {notempty name="policy.focus_image"} + + + + {/notempty} +
+ {:lang_i18n('售后政策')} +

{:lang_i18n('ORICO/奥睿科商城为您提供七天包退、15天换新、1年保修、终身维护的服务承诺')}

+
+ {notempty name="policy.banner_1"} + {volist name="policy.banner_1" id="b1"} +
+ {$b1.title} +
{$b1.desc|raw}
+
+ {/volist} + {/notempty} + + {notempty name="policy.banner_2"} + {volist name="policy.banner_2" id="b2"} + +
+ {$b2.title} +
{$b2.desc|raw}
+
+ {/volist} + {/notempty} + + {notempty name="policy.banner_3"} +
+ {:lang_i18n('为了保障您的合法权益,敬请关注以下信息')} +

{:lang_i18n('为了得到深圳市元创时代科技有限公司给予您的“包修、包换、包退”的权益,请您:')}

+
+ {volist name="policy.banner_3" id="b3"} + {$b3.title}
+ {/volist} +
+
+ {/notempty} + + {notempty name="policy.banner_4"} + {volist name="policy.banner_4" id="b4"} + +
+ {$b4.title} +
{$b4.desc|raw}
+
+ {/volist} + {/notempty} + + {notempty name="policy.banner_5"} +
+ {:lang_i18n('特别说明')} +

+ {volist name="policy.banner_5" id="b5" key="k"} + {$k+1}、{$b5.title}
+ {/volist} +

+
+ {/notempty} + + {notempty name="policy.banner_6"} + {volist name="policy.banner_6" id="b6"} + +
+ {$b6.title} +
{$b6.desc|raw}
+
+ {/volist} + {/notempty} +
+
+{/block} \ No newline at end of file diff --git a/app/index/view/mobile/about_us/story.html b/app/index/view/mobile/about_us/story.html new file mode 100644 index 00000000..506c801f --- /dev/null +++ b/app/index/view/mobile/about_us/story.html @@ -0,0 +1,32 @@ +{extend name="public/base" /} +{block name="style"} + +{/block} +{block name="main"} +
+ +
+
+ +
+ {notempty name="banners"} +
+ {volist name="banners" id="ba" offset="0" length="2"} +
{$ba.title}
+
{$ba.desc|raw}
+
+ +
+ {/volist} + {volist name="banners" id="ba" offset="2" length="3"} +
+ +
+
{$ba.title}
+
{$ba.desc|raw}
+ {/volist} +
+ {/notempty} +
+
+{/block} \ No newline at end of file diff --git a/app/index/view/mobile/article/detail.html b/app/index/view/mobile/article/detail.html new file mode 100644 index 00000000..1decf523 --- /dev/null +++ b/app/index/view/mobile/article/detail.html @@ -0,0 +1,149 @@ +{extend name="public/base" /} +{block name="title"} + {notempty name="detail.seo_title"}{$detail.seo_title}{else /}{__BLOCK__}{/notempty} +{/block} +{block name="seo"} + {notempty name="detail.seo_keywords"} + + + {else /} + {__BLOCK__} + {/notempty} +{/block} +{block name="style"} + +{/block} +{block name="main"} +
+ +
+
+
+
+

{$detail.title}

+

{$detail.release_time}

+
+
{$detail.content|raw}
+
+ +
+
+
+{/block} +{block name="script"} + +{/block} \ No newline at end of file diff --git a/app/index/view/mobile/article/index.html b/app/index/view/mobile/article/index.html new file mode 100644 index 00000000..676293f2 --- /dev/null +++ b/app/index/view/mobile/article/index.html @@ -0,0 +1,62 @@ +{extend name="public/base" /} +{block name="style"} + +{/block} +{block name="main"} +
+ +
+ + {notempty name="banner.image"} + + {/notempty} + +
+
+
+ {volist name="categorys" id="ca"} + {if condition="$Request.get.cid == $ca.id || (!$Request.has.cid && $key == 0)"} + + {else/} + + {/if} + {$ca.name} + + {/volist} +
+
+ + + {notempty name="articles"} +
+ +
+ +
{$articles|raw}
+ + {/notempty} +
+
+
+
+
+{/block} \ No newline at end of file diff --git a/app/index/view/mobile/attachment/video.html b/app/index/view/mobile/attachment/video.html index 19d18ea6..71f4704d 100644 --- a/app/index/view/mobile/attachment/video.html +++ b/app/index/view/mobile/attachment/video.html @@ -20,7 +20,7 @@
{notempty name="videos"} - {assign name="flat_videos" value=":\think\helper\Arr::flatMap(fn($item) => $item->toArray(), $videos->items())" /} + {assign name="flat_videos" value=":array_flatten($videos->items())" /} {volist name="flat_videos" id="vo"}