1 Star 1 Fork 1

fecshop / vue_fecshop_appserver

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
BSD-3-Clause

vue_fecshop_appserver

开发演示地址:http://120.24.37.249:8080/#/

目前还在开发中...

做fecshop的前后端彻底分离部分的前端界面部分

  1. 首先您需要安装npm,详细参看:安装npm和nodejs

  2. 全局安装 vue-cli:

npm install -g vue-cli
  1. 下载本文件
git clone https://github.com/fecshop/vue_fecshop_appserver.git
  1. 进入上面下载的文件夹,然后执行。
npm install

这里需要很长一段时间,您也可以使用淘宝镜像 cnpm install

  1. 下面就可以执行了

开发环境执行

npm run dev

线上环境执行,

npm run build
  1. 文件包里面的文件说明:

build中配置了webpack的基本配置、开发环境配置、生产环境配置

config中配置了路径端口值等

node_modules为依赖的模块

src放置组件和入口文件

static放置静态资源文件

index.html文件入口

  1. 配置

7.1 配置获取远程数据的地址:

开发环境为:config/dev.env.js

生产环境为:config/prod.env.js

修改 API_ROOT 的值:

API_ROOT: '"https://cnodejs.org/api/v1"'

7.2 生产环境设置发布文件地址:

config/index.js 文件中的assetsRoot为设置生产环境的文件发布地址

module.exports = {
  build: {
    env: require('./prod.env'),
    index: path.resolve(__dirname, '../dist/index.html'),
    assetsRoot: path.resolve(__dirname, '../dist'),

7.3 设置开发环境的地址和端口

设置地址:build/dev-server.js

 var uri = 'http://localhost:' + port

设置端口:config/index.js 设置dev里面的port,改为您想要更改的端口

port: 8080,
BSD 3-Clause License Copyright (c) 2017, All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

简介

做fecshop的前后端彻底分离部分的前端界面部分 展开 收起
JavaScript
BSD-3-Clause
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/fecshopsoft/vue_fecshop_appserver.git
git@gitee.com:fecshopsoft/vue_fecshop_appserver.git
fecshopsoft
vue_fecshop_appserver
vue_fecshop_appserver
master

搜索帮助