vuefront / module-vuefront
Vuefront api for magento2
Requires
- ext-json: *
- vuefront/module-blog: >=0.1.0
- vuefront/module-brands: >=0.1.0
- webonyx/graphql-php: >=0.12.6
- dev-master
- 0.3.1
- 0.3.0
- 0.2.0
- 0.1.0
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/minimist-1.2.8
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/jszip-3.8.0
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/express-4.18.2
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/qs-6.5.3
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/loader-utils-1.4.2
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/terser-4.8.1
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/moment-2.29.4
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/eventsource-1.1.1
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/nanoid-3.3.3
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/async-2.6.4
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/node-fetch-2.6.7
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/url-parse-1.5.10
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/follow-redirects-1.14.8
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/node-sass-7.0.0
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/validator-13.7.0
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/axios-0.21.2
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/nth-check-2.0.1
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/tmpl-1.0.5
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/hosted-git-info-2.8.9
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/dns-packet-1.3.4
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/lodash-4.17.21
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/ini-1.3.8
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/y18n-4.0.3
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/browserslist-4.16.7
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/ws-6.2.2
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/path-parse-1.0.7
- dev-dependabot/npm_and_yarn/view/adminhtml/web/js/pax/websocket-extensions-0.1.4
This package is auto-updated.
Last update: 2024-09-04 21:13:24 UTC
README
VueFront
适用于 Magento 的 CMS 连接应用程序
展示您的❤️ - 给我们一个⭐
帮助我们使这个项目变得更好!
VueFront 是一个由 VueJS 驱动 的 CMS 通用 SPA & PWA 前端,适用于您过时的博客和电子商务网站。
Magento 为数以千计的零售商和品牌提供最佳的电子商务平台和灵活的云解决方案,以快速创新和增长。
CMS 连接应用程序 - 通过 GraphQL API 在 Magento CMS 和 VueFront Web 应用程序之间建立连接。
它做什么?
这是一个连接 Magento CMS 与 VueFront Web 应用程序的 GraphQL API 的 Magento 模块。安装后,您将获得一个 CMS 连接 URL,您需要在 设置 期间将其添加到您的 VueFront Web 应用程序中。
演示
Magento 博客(Megafan 博客模块)
由于 Magento 没有内置的博客,我们使用 Megafan 博客模块 自动添加博客支持。如果 Megafan 博客模块不可用,VueFront 将忽略它。
如何安装?
所需的 PHP 版本 >= 5.5, <= 7.2(此限制将在未来移除)
1. 通过 composer 快速安装(推荐)
我们建议您通过 composer 安装 VueFront 模块。它易于安装、更新和维护。
在 Magento 2 根目录下运行以下命令。
1.1 安装
composer require vuefront/module-vuefront
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
1.2 升级
composer update vuefront/module-vuefront
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
如果您的商店在产品模式下,请运行编译
php bin/magento setup:di:compile
2. 通过复制粘贴安装
如果您不想通过 composer 安装,可以使用这种方法。
- 在此处下载最新版本 [下载 master.zip]
- 将
master.zip
文件解压到app/code/Vuefront/Vuefront
;如果不存在,您应该创建路径app/code/Vuefront/Vuefront
。 - 转到 Magento 根目录并运行升级命令行以安装
Vuefront
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
通过 VueFront 部署服务将 VueFront Web 应用程序部署到 Apache 托管(静态网站)
(推荐)
- 从本仓库安装 VueFront CMS 连接应用程序。
- 登录或注册 VueFront.com 账户
- 构建您的第一个 Web 应用程序
- 激活新的前端 Web 应用程序(仅适用于 Apache 服务器)
通过 ftp 手动
- 从本仓库安装 VueFront CMS 连接应用程序。
- 登录或注册 VueFront.com 账户
- 复制 CMS 连接 URL
- 通过 ftp 在您的主机上的 OpenCart 网站根目录中创建一个新的文件夹
vuefront
。 - 通过命令行构建您的 VueFront Web 应用程序(更多信息)
yarn create vuefront-app
# When promote, provide the CMS Connect URL, which you coppied at step 3.
yarn generate
- 将
dist
文件夹中的所有文件复制到新创建的vuefront
文件夹中 - 通过修改
.htaccess
文件,在#RewriteBase /magento/
规则后添加以下规则
# VueFront scripts, styles and images
RewriteCond %{REQUEST_URI} .*(_nuxt)
RewriteCond %{REQUEST_URI} !.*/vuefront/_nuxt
RewriteRule ^([^?]*) vuefront/$1
# VueFront sw.js
RewriteCond %{REQUEST_URI} .*(sw.js)
RewriteCond %{REQUEST_URI} !.*/vuefront/sw.js
RewriteRule ^([^?]*) vuefront/$1
# VueFront favicon.ico
RewriteCond %{REQUEST_URI} .*(favicon.ico)
RewriteCond %{REQUEST_URI} !.*/vuefront/favicon.ico
RewriteRule ^([^?]*) vuefront/$1
# VueFront pages
# VueFront home page
RewriteCond %{REQUEST_URI} !.*(image|.php|admin|catalog|\/img\/.*\/|wp-json|wp-admin|wp-content|checkout|rest|static|order|themes\/|modules\/|js\/|\/vuefront\/)
RewriteCond %{QUERY_STRING} !.*(rest_route)
RewriteCond %{DOCUMENT_ROOT}".$document_path."vuefront/index.html -f
RewriteRule ^$ vuefront/index.html [L]
RewriteCond %{REQUEST_URI} !.*(image|.php|admin|catalog|\/img\/.*\/|wp-json|wp-admin|wp-content|checkout|rest|static|order|themes\/|modules\/|js\/|\/vuefront\/)
RewriteCond %{QUERY_STRING} !.*(rest_route)
RewriteCond %{DOCUMENT_ROOT}".$document_path."vuefront/index.html !-f
RewriteRule ^$ vuefront/200.html [L]
# VueFront page if exists html file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*(image|.php|admin|catalog|\/img\/.*\/|wp-json|wp-admin|wp-content|checkout|rest|static|order|themes\/|modules\/|js\/|\/vuefront\/)
RewriteCond %{QUERY_STRING} !.*(rest_route)
RewriteCond %{DOCUMENT_ROOT}".$document_path."vuefront/$1.html -f
RewriteRule ^([^?]*) vuefront/$1.html [L,QSA]
# VueFront page if not exists html file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*(image|.php|admin|catalog|\/img\/.*\/|wp-json|wp-admin|wp-content|checkout|rest|static|order|themes\/|modules\/|js\/|\/vuefront\/)
RewriteCond %{QUERY_STRING} !.*(rest_route)
RewriteCond %{DOCUMENT_ROOT}".$document_path."vuefront/$1.html !-f
RewriteRule ^([^?]*) vuefront/200.html [L,QSA]
将 VueFront Web 应用程序部署到 Nginx 托管(静态网站)
与 Apache 相同,但您需要自己添加服务器配置,并且 vuefront 文件夹的路径不同,为 ./pub/vuefront
(推荐)
- 从本仓库安装 VueFront CMS 连接应用程序。
- 登录或注册 VueFront.com 账户
- 构建您的第一个 Web 应用程序
- 现在您需要将此代码添加到您的
nginx.config
文件中,在index
指令之后
location ~ ^((?!image|.php|admin|catalog|\/img\/.*\/|wp-json|wp-admin|wp-content|checkout|rest|static|order|themes\/|modules\/|js\/|\/vuefront\/).)*$ {
try_files /vuefront/$uri /vuefront/$uri "/vuefront${uri}index.html" /vuefront$uri.html /vuefront/200.html;
}
通过 ftp 手动
- 从本仓库安装 VueFront CMS 连接应用程序。
- 登录或注册 VueFront.com 账户
- 复制 CMS 连接 URL
- 通过 ftp 在您的主机上的 Magento 网站中创建一个新的文件夹
./pub/vuefront
。 - 通过命令行构建 VueFront Web 应用程序(了解更多)
yarn create vuefront-app
# When promote, provide the CMS Connect URL, which you coppied at step 3.
yarn generate
- 现在您需要将此代码添加到您的
nginx.config
文件中,在index
指令之后
location ~ ^((?!image|.php|admin|catalog|\/img\/.*\/|wp-json|wp-admin|wp-content|checkout|rest|static|order|themes\/|modules\/|js\/|\/vuefront\/).)*$ {
try_files /vuefront/$uri /vuefront/$uri "/vuefront${uri}index.html" /vuefront$uri.html /vuefront/200.html;
}
支持
如需支持,请通过 Discord 联系我们
提交问题
要提交问题,请在 问题标签页 中创建一个问题。请记住提供关于您情况的详细说明以及重现问题的方法。
享受吧!