feat: 个人appld

This commit is contained in:
huxiaoshuang
2022-11-23 16:17:58 +08:00
parent 80914506ce
commit e045ef43df
6 changed files with 20 additions and 5 deletions

7
config.js Normal file
View File

@@ -0,0 +1,7 @@
export const type = "people"; //office 个人公司
// wx515bd42ee0db5c5d cityNew
// wx2b2ec2ba5ee694bc 公司
export const appId = type === "people" ? "wx515bd42ee0db5c5d" : "wx2b2ec2ba5ee694bc";
export const envConfig=type === "people" ? "citynew-0givkbre03955d8c" : "cloud1-5g5xrgza12a0dd6d";

2
dist/app.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -1,3 +1,5 @@
/*! ../config */
/*! ../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./app.ts */
/*! ./assertThisInitialized.js */
@@ -32,6 +34,10 @@
/*! react-dom */
/*!*******************!*\
!*** ./config.js ***!
\*******************/
/*!********************!*\
!*** ./src/app.ts ***!
\********************/

View File

@@ -2,7 +2,7 @@
"miniprogramRoot": "./",
"projectname": "myApp",
"description": "city",
"appid": "wx2b2ec2ba5ee694bc",
"appid": "wx515bd42ee0db5c5d",
"cloudfunctionRoot": "cloudfunctions/",
"setting": {
"urlCheck": true,

View File

@@ -2,7 +2,7 @@
"miniprogramRoot": "dist/",
"projectname": "myApp",
"description": "city",
"appid": "wx2b2ec2ba5ee694bc",
"appid": "wx515bd42ee0db5c5d",
"cloudfunctionRoot": "cloudfunctions/",
"setting": {
"urlCheck": true,

View File

@@ -1,15 +1,17 @@
import Taro from "@tarojs/taro";
import { Component } from "react";
import "./app.scss";
import {envConfig} from '../config'
class App extends Component<any> {
componentDidMount() {
Taro.cloud.init({
env: 'cloud1-5g5xrgza12a0dd6d',
// env: 'cloud1-5g5xrgza12a0dd6d',//公司
env:envConfig, //个人
traceUser:true
})
const a = new Taro.cloud.Cloud({
resourceEnv: 'cloud1-5g5xrgza12a0dd6d',
resourceEnv:envConfig, //公司
})
a.init()
}