Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ruiyong-lee committed Dec 17, 2019
1 parent dae56b8 commit 7538196
Show file tree
Hide file tree
Showing 15 changed files with 6,753 additions and 5,461 deletions.
52 changes: 41 additions & 11 deletions mobile_uni-app/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,49 @@
# mobile_uni-app

## Project setup
```
npm install
```
## 概述

### Compiles and hot-reloads for development
```
npm run serve
本文档只介绍 **windows** 环境下如何本地调试和打包,关于小程序的介绍如需进一步了解,参见 [uniapp文档][uniapp][微信小程序文档][weapp]

##### 开发环境、工具

- **Node.js:** v12.13.1
- **Westorm:** v2019.3
- **微信Web开发者工具**

## 本地开发(windows)

1、安装Node.js(自带npm):[Node.js安装配置](https://www.runoob.com/nodejs/nodejs-install-setup.html)

2、打开命令提示符,定位到文件夹`mobile_uni-app`

> 执行下面的命令,安装依赖和插件
```bash
npm i
```

### Compiles and minifies for production
> 执行下面的命令,启动本地服务
```bash
npm run dev:mp-weixin
```
npm run build
打开微信Web开发者工具,新增小程序 -> 导入项目,选择文件夹`mobile_uni-app`,
小程序的appId需要根据个人申请的小程序进行修改,默认是我自己的小程序

## 打包部署
1、打开命令提示符,定位到文件夹`pc_vue`

> 执行下面的命令,打包项目
```bash
npm run build:mp-weixin
```
将主目录下的project.config.json中的miniprogramRoot修改为`dist/build/mp-weixin/`,打开微信Web开发者工具,选着刚才导入的
项目,就会定位到打包完的目录,而不是开发目录了

## 业务操作
因为这个小程序是之前公司项目直接拿过来用的,当时的业务需求就是这个小程序直接绑定一个商家,也就是一个商家对应一个小程序,所以是这样操作的(后期考虑做微信第三方开放平台):

1、把数据库里面要关联的商家uuid复制到小程序代码里面写死,打开 `mobile_uni-app -> src -> common -> constans.js`,找到字段:MERCHANT_UUID, 替换商家uuid。

补充中...

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
[weapp]: https://developers.weixin.qq.com/miniprogram/dev/index.html?t=19041716
[uniapp]: https://uniapp.dcloud.io/
3,857 changes: 2,349 additions & 1,508 deletions mobile_uni-app/package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions mobile_uni-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mobile_uni-app",
"version": "0.1.0",
"version": "2.0.0",
"private": true,
"scripts": {
"serve": "npm run dev:h5",
Expand Down Expand Up @@ -53,7 +53,7 @@
"@types/uni-app": "*",
"@vue/cli-plugin-babel": "^3.12.1",
"@vue/cli-plugin-eslint": "^3.11.0",
"@vue/cli-service": "^3.12.1",
"@vue/cli-service": "^4.1.1",
"@vue/eslint-config-airbnb": "^4.0.1",
"babel-plugin-import": "^1.12.2",
"mini-types": "*",
Expand Down
4 changes: 2 additions & 2 deletions pc_vue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

##### 开发环境、工具

- **Node.js:** v10.15.0
- **Node.js:** v12.13.1

- **Westorm:** v2019.1.2
- **Westorm:** v2019.3

## 本地开发(windows)

Expand Down
Loading

0 comments on commit 7538196

Please sign in to comment.