支付宝小程序、微信小程序输出到不同dist目录;一些小调整
This commit is contained in:
parent
070cb9a997
commit
286b244457
26
README.md
26
README.md
@ -119,10 +119,10 @@
|
|||||||
> # 您会看到以;分隔的很多路径,其中应该包括:
|
> # 您会看到以;分隔的很多路径,其中应该包括:
|
||||||
> # JDK 所在文件夹下的 bin 目录:...\openjdk-11\bin
|
> # JDK 所在文件夹下的 bin 目录:...\openjdk-11\bin
|
||||||
> # Maven 所在文件夹下的 bin 目录:...\apache-maven-3.6.3\bin
|
> # Maven 所在文件夹下的 bin 目录:...\apache-maven-3.6.3\bin
|
||||||
>
|
>
|
||||||
> echo %JAVA_HOME%
|
> echo %JAVA_HOME%
|
||||||
> # 您会看到 JDK 所在文件夹
|
> # 您会看到 JDK 所在文件夹
|
||||||
>
|
>
|
||||||
> echo %MAVEN_HOME%
|
> echo %MAVEN_HOME%
|
||||||
> # 您会看到 Maven 所在文件夹
|
> # 您会看到 Maven 所在文件夹
|
||||||
> ```
|
> ```
|
||||||
@ -134,19 +134,19 @@
|
|||||||
> git --version
|
> git --version
|
||||||
> # 您应该看到类似如下输出👇
|
> # 您应该看到类似如下输出👇
|
||||||
> # git version 2.35.1.windows.2
|
> # git version 2.35.1.windows.2
|
||||||
>
|
>
|
||||||
> # 查看 MySQL 版本(如果 MySQL 的 bin 目录没有配在环境变量中,则需要先 cd 切换到 bin 目录下)
|
> # 查看 MySQL 版本(如果 MySQL 的 bin 目录没有配在环境变量中,则需要先 cd 切换到 bin 目录下)
|
||||||
> mysql --version
|
> mysql --version
|
||||||
> # 您应该看到类似如下输出👇
|
> # 您应该看到类似如下输出👇
|
||||||
> # mysql Ver 8.0.12 for Win64 on x86_64 (MySQL Community Server - GPL)
|
> # mysql Ver 8.0.12 for Win64 on x86_64 (MySQL Community Server - GPL)
|
||||||
>
|
>
|
||||||
> # 查看 JDK 版本
|
> # 查看 JDK 版本
|
||||||
> java -version
|
> java -version
|
||||||
> # 您应该看到类似如下输出👇
|
> # 您应该看到类似如下输出👇
|
||||||
> # openjdk version "11" 2018-09-25
|
> # openjdk version "11" 2018-09-25
|
||||||
> # OpenJDK Runtime Environment 18.9 (build 11+28)
|
> # OpenJDK Runtime Environment 18.9 (build 11+28)
|
||||||
> # OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)
|
> # OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)
|
||||||
>
|
>
|
||||||
> # 查看 Maven 版本
|
> # 查看 Maven 版本
|
||||||
> mvn -v
|
> mvn -v
|
||||||
> # 您应该看到类似如下输出👇
|
> # 您应该看到类似如下输出👇
|
||||||
@ -155,12 +155,12 @@
|
|||||||
> # Java version: 11, vendor: Oracle Corporation, runtime: xxxxxx\openjdk-11
|
> # Java version: 11, vendor: Oracle Corporation, runtime: xxxxxx\openjdk-11
|
||||||
> # Default locale: zh_CN, platform encoding: GBK
|
> # Default locale: zh_CN, platform encoding: GBK
|
||||||
> # OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
|
> # OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
|
||||||
>
|
>
|
||||||
> # 查看 node 版本
|
> # 查看 node 版本
|
||||||
> node -v
|
> node -v
|
||||||
> # 您应该看到类似如下输出👇
|
> # 您应该看到类似如下输出👇
|
||||||
> # v14.18.0
|
> # v14.18.0
|
||||||
>
|
>
|
||||||
> # 查看 npm 版本
|
> # 查看 npm 版本
|
||||||
> # 您应该看到类似如下输出👇
|
> # 您应该看到类似如下输出👇
|
||||||
> # 8.19.2
|
> # 8.19.2
|
||||||
@ -215,7 +215,7 @@
|
|||||||
> npm config get registry
|
> npm config get registry
|
||||||
> ```
|
> ```
|
||||||
>
|
>
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -283,7 +283,7 @@ cd ../
|
|||||||
|
|
||||||
##### 配置业务域名
|
##### 配置业务域名
|
||||||
|
|
||||||
修改 `miniprogram/src/app.js` 文件
|
1.修改 `miniprogram/src/app.js` 文件
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
App.use(setGlobalDataPlugin, {
|
App.use(setGlobalDataPlugin, {
|
||||||
@ -293,7 +293,13 @@ App.use(setGlobalDataPlugin, {
|
|||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
同时记得在[微信小程序后台](https://mp.weixin.qq.com/)填写小程序的**服务器域名**→**request合法域名**(注意不是业务域名)。
|
2.配置服务域名
|
||||||
|
|
||||||
|
- 小程序:在[微信小程序后台](https://mp.weixin.qq.com/) - 左侧最下方**开发** - **开发管理** - 右侧上方**开发设置** - **服务器域名** 添加 `https://` 开头的**request合法域名**
|
||||||
|
- 小程序测试号:在[微信小程序后台](https://mp.weixin.qq.com/) - **服务器域名** 添加 `https://` 开头的**request合法域名**(注意不是业务域名)
|
||||||
|
- 支付宝沙箱应用:在[支付宝开放平台](https://open.alipay.com/develop/sandbox/app) - 左侧**沙箱应用** - **服务端域名白名单** 添加 `https://` 开头的**httpRequest接口请求域名白名单**
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
##### 配置微信小程序appid
|
##### 配置微信小程序appid
|
||||||
|
|
||||||
|
@ -8,13 +8,13 @@ const config = {
|
|||||||
828: 1.81 / 2
|
828: 1.81 / 2
|
||||||
},
|
},
|
||||||
sourceRoot: 'src',
|
sourceRoot: 'src',
|
||||||
outputRoot: 'dist',
|
outputRoot: `dist/${process.env.TARO_ENV}`,
|
||||||
plugins: [],
|
plugins: [],
|
||||||
defineConstants: {
|
defineConstants: {
|
||||||
},
|
},
|
||||||
copy: {
|
copy: {
|
||||||
patterns: [
|
patterns: [
|
||||||
{ from: 'src/image/', to: 'dist/image/', ignore: ['*.js'] }, // 指定需要 copy 的目录
|
{ from: 'src/image/', to: `dist/${process.env.TARO_ENV}/image/`, ignore: ['*.js'] }, // 指定需要 copy 的目录
|
||||||
],
|
],
|
||||||
options: {
|
options: {
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"miniprogramRoot": "dist/",
|
"miniprogramRoot": "dist/weapp/",
|
||||||
"projectname": "epp",
|
"projectname": "epp",
|
||||||
"description": "基于微服务的社区疫情防控系统",
|
"description": "基于微服务的社区疫情防控系统",
|
||||||
"appid": "wxa70348746d2b562f",
|
"appid": "wxa70348746d2b562f",
|
||||||
@ -18,7 +18,7 @@
|
|||||||
},
|
},
|
||||||
"compileType": "miniprogram",
|
"compileType": "miniprogram",
|
||||||
"libVersion": "2.27.1",
|
"libVersion": "2.27.1",
|
||||||
"srcMiniprogramRoot": "dist/",
|
"srcMiniprogramRoot": "dist/weapp/",
|
||||||
"packOptions": {
|
"packOptions": {
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"include": []
|
"include": []
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.inputText {
|
.inputText {
|
||||||
|
width: 95%;
|
||||||
border-bottom: solid 1px;
|
border-bottom: solid 1px;
|
||||||
margin-bottom: 50px;
|
margin-bottom: 50px;
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
#myQrcode {
|
#myQrcode {
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0 auto;
|
margin: 30px auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#show-text {
|
#show-text {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<view id="codeView" :style="{ display: isShow }">
|
<view id="codeView" :style="{ display: isShow }">
|
||||||
<view id="user-text"><text>{{ userText }}</text></view>
|
<view id="user-text"><text>{{ userText }}</text></view>
|
||||||
<view id="time-text"><text>{{ time }}</text></view>
|
<view id="time-text"><text>{{ time }}</text></view>
|
||||||
<canvas type="2d" style="width: 70vw; height: 70vw;" id="myQrcode"></canvas>
|
<canvas type="2d" style="width: 250px; height: 250px;" id="myQrcode"></canvas>
|
||||||
<view id="show-text"><text :style="{ color: showTextColor }">{{ showText }}</text></view>
|
<view id="show-text"><text :style="{ color: showTextColor }">{{ showText }}</text></view>
|
||||||
<view id="small-text"><text>下拉可刷新</text></view>
|
<view id="small-text"><text>下拉可刷新</text></view>
|
||||||
</view>
|
</view>
|
||||||
@ -40,6 +40,7 @@ export default {
|
|||||||
console.log('onHide')
|
console.log('onHide')
|
||||||
clearInterval(this.timeInterval);
|
clearInterval(this.timeInterval);
|
||||||
this.isShow = 'none'
|
this.isShow = 'none'
|
||||||
|
this.time = ''
|
||||||
},
|
},
|
||||||
|
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
@ -47,6 +48,7 @@ export default {
|
|||||||
Taro.showNavigationBarLoading();
|
Taro.showNavigationBarLoading();
|
||||||
clearInterval(this.timeInterval);
|
clearInterval(this.timeInterval);
|
||||||
this.isShow = 'none'
|
this.isShow = 'none'
|
||||||
|
this.time = ''
|
||||||
this.userInfo = Taro.getStorageSync("userInfo");
|
this.userInfo = Taro.getStorageSync("userInfo");
|
||||||
if (!this.userInfo) {
|
if (!this.userInfo) {
|
||||||
Taro.redirectTo({
|
Taro.redirectTo({
|
||||||
@ -112,7 +114,7 @@ export default {
|
|||||||
canvas: canvas,
|
canvas: canvas,
|
||||||
canvasId: 'myQrcode',
|
canvasId: 'myQrcode',
|
||||||
width: 260,
|
width: 260,
|
||||||
padding: 30,
|
padding: 0,
|
||||||
background: '#ffffff',
|
background: '#ffffff',
|
||||||
foreground: foreground,
|
foreground: foreground,
|
||||||
text: text,
|
text: text,
|
||||||
|
Loading…
Reference in New Issue
Block a user