From e045ef43df171e78c2b765ac4d9641421ad5629a Mon Sep 17 00:00:00 2001 From: huxiaoshuang Date: Wed, 23 Nov 2022 16:17:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=AA=E4=BA=BAappld?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.js | 7 +++++++ dist/app.js | 2 +- dist/app.js.LICENSE.txt | 6 ++++++ dist/project.config.json | 2 +- project.config.json | 2 +- src/app.ts | 6 ++++-- 6 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 config.js diff --git a/config.js b/config.js new file mode 100644 index 0000000..4d7e94d --- /dev/null +++ b/config.js @@ -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"; + + diff --git a/dist/app.js b/dist/app.js index 3438541..410c0af 100644 --- a/dist/app.js +++ b/dist/app.js @@ -1,2 +1,2 @@ /*! For license information please see app.js.LICENSE.txt */ -"use strict";require("./prebundle/vendors-node_modules_taro_weapp_prebundle_antmjs_vantui_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-TS5T3MDA_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-5ZOEZXK4_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_lodash_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_moment_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-JHQVW7VO_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_tarojs_plugin-framework-react_dist_runtime_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-YPK4VK53_js.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_tarojs_plu-b2bd19.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-HER2BAHA_js.js"),require("./prebundle/remoteEntry.js"),require("./prebundle/node_modules_taro_weapp_prebundle_react_jsx-runtime_js.js"),require("./prebundle/node_modules_taro_weapp_prebundle_react_js.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_tarojs_run-08648c.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_react-dom_js.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_tarojs_taro_js.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-_94890.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-_94891.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-_94892.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-_94893.js"),require("./common"),require("./vendors"),require("./taro"),require("./runtime"),(wx.webpackJsonp=wx.webpackJsonp||[]).push([["app"],{"./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/app.ts":function(e,r,t){var n=t("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),o=t("./node_modules/@babel/runtime/helpers/esm/createClass.js"),s=t("./node_modules/@babel/runtime/helpers/esm/inherits.js"),u=t("./node_modules/@babel/runtime/helpers/esm/createSuper.js"),d=t("webpack/container/remote/@tarojs/taro"),i=t.n(d),a=t("webpack/container/remote/react"),p=function(e){(0,s.default)(App,e);var r=(0,u.default)(App);function App(){return(0,n.default)(this,App),r.apply(this,arguments)}return(0,o.default)(App,[{key:"componentDidMount",value:function componentDidMount(){i().cloud.init({env:"cloud1-5g5xrgza12a0dd6d",traceUser:!0}),new(i().cloud.Cloud)({resourceEnv:"cloud1-5g5xrgza12a0dd6d"}).init()}},{key:"componentDidShow",value:function componentDidShow(){}},{key:"componentDidHide",value:function componentDidHide(){}},{key:"render",value:function render(){return this.props.children}}]),App}(a.Component);r.default=p},"./src/app.ts":function(e,r,t){t("webpack/container/remote/@tarojs/plugin-platform-weapp/dist/runtime");var n=t("webpack/container/remote/@tarojs/runtime"),o=t("webpack/container/remote/@tarojs/plugin-framework-react/dist/runtime"),s=t("webpack/container/remote/@tarojs/taro"),u=t("./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/app.ts"),d=t("webpack/container/remote/react"),i=t("webpack/container/remote/react-dom"),a=t.n(i),p={pages:["pages/home/index","pages/home/components/CheckIn/index","pages/home/components/Certified/index","pages/activityList/index","pages/formSubmit/index","pages/activityList/components/details/index","pages/mountainPeak/index","pages/my/index","pages/my/components/Version/index","pages/my/components/AbountUs/index"],permission:{"scope.userLocation":{desc:"你的位置信息将用于小程序位置接口的效果展示"}},requiredPrivateInfos:["getLocation","chooseLocation"],window:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#fff",navigationBarTitleText:"WeChat",navigationBarTextStyle:"black"}};n.window.__taroAppConfig=p;App((0,o.createReactApp)(u.default,d,a(),p));(0,s.initPxTransform)({designWidth:750,deviceRatio:{640:1.17,750:1,828:.905}})},"./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":function(e,r,t){function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(r,{default:function(){return _assertThisInitialized}})},"./node_modules/@babel/runtime/helpers/esm/createSuper.js":function(e,r,t){t.d(r,{default:function(){return _createSuper}});var n=t("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),o=t("./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js"),s=t("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js");function _createSuper(e){var r=(0,o.default)();return function _createSuperInternal(){var t,o=(0,n.default)(e);if(r){var u=(0,n.default)(this).constructor;t=Reflect.construct(o,arguments,u)}else t=o.apply(this,arguments);return(0,s.default)(this,t)}}},"./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js":function(e,r,t){function _getPrototypeOf(e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf(e)}t.d(r,{default:function(){return _getPrototypeOf}})},"./node_modules/@babel/runtime/helpers/esm/inherits.js":function(e,r,t){t.d(r,{default:function(){return _inherits}});var n=t("./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js");function _inherits(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&(0,n.default)(e,r)}},"./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js":function(e,r,t){function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}t.d(r,{default:function(){return _isNativeReflectConstruct}})},"./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js":function(e,r,t){t.d(r,{default:function(){return _possibleConstructorReturn}});var n=t("./node_modules/@babel/runtime/helpers/esm/typeof.js"),o=t("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");function _possibleConstructorReturn(e,r){if(r&&("object"===(0,n.default)(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.default)(e)}},"./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":function(e,r,t){function _setPrototypeOf(e,r){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(e,r){return e.__proto__=r,e},_setPrototypeOf(e,r)}t.d(r,{default:function(){return _setPrototypeOf}})}},function(e){e.O(0,["vendors","common"],(function(){return r="./src/app.ts",e(e.s=r);var r}));e.O()}]); \ No newline at end of file +"use strict";require("./prebundle/vendors-node_modules_taro_weapp_prebundle_antmjs_vantui_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-TS5T3MDA_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-5ZOEZXK4_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_lodash_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_moment_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-JHQVW7VO_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_tarojs_plugin-framework-react_dist_runtime_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-YPK4VK53_js.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_tarojs_plu-b2bd19.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-HER2BAHA_js.js"),require("./prebundle/remoteEntry.js"),require("./prebundle/node_modules_taro_weapp_prebundle_react_jsx-runtime_js.js"),require("./prebundle/node_modules_taro_weapp_prebundle_react_js.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_tarojs_run-08648c.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_react-dom_js.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_tarojs_taro_js.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-_94890.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-_94891.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-_94892.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-_94893.js"),require("./common"),require("./vendors"),require("./taro"),require("./runtime"),(wx.webpackJsonp=wx.webpackJsonp||[]).push([["app"],{"./config.js":function(e,r,t){t.d(r,{envConfig:function(){return n}});var n="citynew-0givkbre03955d8c"},"./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/app.ts":function(e,r,t){var n=t("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),o=t("./node_modules/@babel/runtime/helpers/esm/createClass.js"),s=t("./node_modules/@babel/runtime/helpers/esm/inherits.js"),u=t("./node_modules/@babel/runtime/helpers/esm/createSuper.js"),i=t("webpack/container/remote/@tarojs/taro"),d=t.n(i),a=t("webpack/container/remote/react"),p=t("./config.js"),l=function(e){(0,s.default)(App,e);var r=(0,u.default)(App);function App(){return(0,n.default)(this,App),r.apply(this,arguments)}return(0,o.default)(App,[{key:"componentDidMount",value:function componentDidMount(){d().cloud.init({env:p.envConfig,traceUser:!0}),new(d().cloud.Cloud)({resourceEnv:p.envConfig}).init()}},{key:"componentDidShow",value:function componentDidShow(){}},{key:"componentDidHide",value:function componentDidHide(){}},{key:"render",value:function render(){return this.props.children}}]),App}(a.Component);r.default=l},"./src/app.ts":function(e,r,t){t("webpack/container/remote/@tarojs/plugin-platform-weapp/dist/runtime");var n=t("webpack/container/remote/@tarojs/runtime"),o=t("webpack/container/remote/@tarojs/plugin-framework-react/dist/runtime"),s=t("webpack/container/remote/@tarojs/taro"),u=t("./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/app.ts"),i=t("webpack/container/remote/react"),d=t("webpack/container/remote/react-dom"),a=t.n(d),p={pages:["pages/home/index","pages/home/components/CheckIn/index","pages/home/components/Certified/index","pages/activityList/index","pages/formSubmit/index","pages/activityList/components/details/index","pages/mountainPeak/index","pages/my/index","pages/my/components/Version/index","pages/my/components/AbountUs/index"],permission:{"scope.userLocation":{desc:"你的位置信息将用于小程序位置接口的效果展示"}},requiredPrivateInfos:["getLocation","chooseLocation"],window:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#fff",navigationBarTitleText:"WeChat",navigationBarTextStyle:"black"}};n.window.__taroAppConfig=p;App((0,o.createReactApp)(u.default,i,a(),p));(0,s.initPxTransform)({designWidth:750,deviceRatio:{640:1.17,750:1,828:.905}})},"./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":function(e,r,t){function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(r,{default:function(){return _assertThisInitialized}})},"./node_modules/@babel/runtime/helpers/esm/createSuper.js":function(e,r,t){t.d(r,{default:function(){return _createSuper}});var n=t("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),o=t("./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js"),s=t("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js");function _createSuper(e){var r=(0,o.default)();return function _createSuperInternal(){var t,o=(0,n.default)(e);if(r){var u=(0,n.default)(this).constructor;t=Reflect.construct(o,arguments,u)}else t=o.apply(this,arguments);return(0,s.default)(this,t)}}},"./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js":function(e,r,t){function _getPrototypeOf(e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf(e)}t.d(r,{default:function(){return _getPrototypeOf}})},"./node_modules/@babel/runtime/helpers/esm/inherits.js":function(e,r,t){t.d(r,{default:function(){return _inherits}});var n=t("./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js");function _inherits(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&(0,n.default)(e,r)}},"./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js":function(e,r,t){function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}t.d(r,{default:function(){return _isNativeReflectConstruct}})},"./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js":function(e,r,t){t.d(r,{default:function(){return _possibleConstructorReturn}});var n=t("./node_modules/@babel/runtime/helpers/esm/typeof.js"),o=t("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");function _possibleConstructorReturn(e,r){if(r&&("object"===(0,n.default)(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.default)(e)}},"./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":function(e,r,t){function _setPrototypeOf(e,r){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(e,r){return e.__proto__=r,e},_setPrototypeOf(e,r)}t.d(r,{default:function(){return _setPrototypeOf}})}},function(e){e.O(0,["vendors","common"],(function(){return r="./src/app.ts",e(e.s=r);var r}));e.O()}]); \ No newline at end of file diff --git a/dist/app.js.LICENSE.txt b/dist/app.js.LICENSE.txt index 9939b57..3a8505e 100644 --- a/dist/app.js.LICENSE.txt +++ b/dist/app.js.LICENSE.txt @@ -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 ***! \********************/ diff --git a/dist/project.config.json b/dist/project.config.json index aac8ab3..3a0a14b 100644 --- a/dist/project.config.json +++ b/dist/project.config.json @@ -2,7 +2,7 @@ "miniprogramRoot": "./", "projectname": "myApp", "description": "city", - "appid": "wx2b2ec2ba5ee694bc", + "appid": "wx515bd42ee0db5c5d", "cloudfunctionRoot": "cloudfunctions/", "setting": { "urlCheck": true, diff --git a/project.config.json b/project.config.json index 7193d63..ccf8423 100644 --- a/project.config.json +++ b/project.config.json @@ -2,7 +2,7 @@ "miniprogramRoot": "dist/", "projectname": "myApp", "description": "city", - "appid": "wx2b2ec2ba5ee694bc", + "appid": "wx515bd42ee0db5c5d", "cloudfunctionRoot": "cloudfunctions/", "setting": { "urlCheck": true, diff --git a/src/app.ts b/src/app.ts index ff4ba4a..f436d55 100644 --- a/src/app.ts +++ b/src/app.ts @@ -1,15 +1,17 @@ import Taro from "@tarojs/taro"; import { Component } from "react"; import "./app.scss"; +import {envConfig} from '../config' class App extends Component { 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() }