支付宝小程序、微信小程序输出到不同dist目录;一些小调整
This commit is contained in:
parent
070cb9a997
commit
286b244457
10
README.md
10
README.md
@ -283,7 +283,7 @@ cd ../
|
||||
|
||||
##### 配置业务域名
|
||||
|
||||
修改 `miniprogram/src/app.js` 文件
|
||||
1.修改 `miniprogram/src/app.js` 文件
|
||||
|
||||
```javascript
|
||||
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
|
||||
|
||||
|
@ -8,13 +8,13 @@ const config = {
|
||||
828: 1.81 / 2
|
||||
},
|
||||
sourceRoot: 'src',
|
||||
outputRoot: 'dist',
|
||||
outputRoot: `dist/${process.env.TARO_ENV}`,
|
||||
plugins: [],
|
||||
defineConstants: {
|
||||
},
|
||||
copy: {
|
||||
patterns: [
|
||||
{ from: 'src/image/', to: 'dist/image/', ignore: ['*.js'] }, // 指定需要 copy 的目录
|
||||
{ from: 'src/image/', to: `dist/${process.env.TARO_ENV}/image/`, ignore: ['*.js'] }, // 指定需要 copy 的目录
|
||||
],
|
||||
options: {
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"miniprogramRoot": "dist/",
|
||||
"miniprogramRoot": "dist/weapp/",
|
||||
"projectname": "epp",
|
||||
"description": "基于微服务的社区疫情防控系统",
|
||||
"appid": "wxa70348746d2b562f",
|
||||
@ -18,7 +18,7 @@
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "2.27.1",
|
||||
"srcMiniprogramRoot": "dist/",
|
||||
"srcMiniprogramRoot": "dist/weapp/",
|
||||
"packOptions": {
|
||||
"ignore": [],
|
||||
"include": []
|
||||
|
@ -16,6 +16,7 @@
|
||||
}
|
||||
|
||||
.inputText {
|
||||
width: 95%;
|
||||
border-bottom: solid 1px;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#myQrcode {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
margin: 30px auto;
|
||||
}
|
||||
|
||||
#show-text {
|
||||
|
@ -2,7 +2,7 @@
|
||||
<view id="codeView" :style="{ display: isShow }">
|
||||
<view id="user-text"><text>{{ userText }}</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="small-text"><text>下拉可刷新</text></view>
|
||||
</view>
|
||||
@ -40,6 +40,7 @@ export default {
|
||||
console.log('onHide')
|
||||
clearInterval(this.timeInterval);
|
||||
this.isShow = 'none'
|
||||
this.time = ''
|
||||
},
|
||||
|
||||
onPullDownRefresh() {
|
||||
@ -47,6 +48,7 @@ export default {
|
||||
Taro.showNavigationBarLoading();
|
||||
clearInterval(this.timeInterval);
|
||||
this.isShow = 'none'
|
||||
this.time = ''
|
||||
this.userInfo = Taro.getStorageSync("userInfo");
|
||||
if (!this.userInfo) {
|
||||
Taro.redirectTo({
|
||||
@ -112,7 +114,7 @@ export default {
|
||||
canvas: canvas,
|
||||
canvasId: 'myQrcode',
|
||||
width: 260,
|
||||
padding: 30,
|
||||
padding: 0,
|
||||
background: '#ffffff',
|
||||
foreground: foreground,
|
||||
text: text,
|
||||
|
Loading…
Reference in New Issue
Block a user