商业Java版 ThinkInShop

  1. 主页
  2. 文档
  3. 商业Java版 ThinkInShop
  4. 部署文档
  5. PC店铺后台部署

PC店铺后台部署

一、准备

安装nodejs环境
下载 安装使用

下载安装vscode工具

下载 使用
下载java版后台代码

来客推官网联系销售

二、打包

1、将代码导入vscode,修改配置文件

LaiKeJaveMch
└── .env.production # 生产环境配置文件
# just a flag
ENV = 'production' 
# 修改为生产环境的网关地址
VUE_APP_BASE_API='https://xxx.yyy.com/gw'

如果需要部署在二级目录需要修改根目录的 vue.config.js 第46行
比如要部署到 域名的二级目录 admin 则这个 publicPath:’/admin/‘

/**
   * You will need to set publicPath if you plan to deploy your site under a sub path,
   * for example GitHub Pages. If you plan to deploy your site to https://foo.github.io/bar/,
   * then publicPath should be set to "/bar/".
   * In most cases please use '/'  
   * Detail: https://cli.vuejs.org/config/#publicpath
   */
  publicPath: '/',

2、打开terminal 终端命令窗口

按顺序执行一下命令

# 1、防止出错
$ npm cache clean --force
# 2、安装项目依赖
$ npm intall 
# 3、测试
$ npm run dev
# 4、打包
$ npm run build:prod

如果npm install 失败 请更换node或者npm的版本 或者点击下面的下载链接【非必须】

下载node_modules.zip

#出现 npm WARN using --force Recommended protections disabled.
$ npm install npm@6.14.10 -g

3、打包后文件输出到

LaiKeJaveMch
└── dist # 打包后的文件夹

二、部署


1、将打包后的dist 压缩为zip

2、上传到你想部署到的服务器

三、访问默认用户名密码 000000/000000
卖家后台url:https://xxx.yyy.zzz/mch/#/login?redirect=%2Fhome

PC店铺后台部署