@aiot-toolkit/velasim
Version:
vela for sim
147 lines (120 loc) • 8.48 kB
JavaScript
export default function(global, globalThis, window, $app_exports$){
var $app_define_wrap$ = $app_define_wrap$ || function() {}
var createAppHandler = function() {
return /******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ "../../hap-toolkit-xiaomi/packages/hap-dsl-xvm/lib/loaders/script-loader.js!../../hap-toolkit-xiaomi/packages/hap-dsl-xvm/lib/loaders/module-loader.js!../../hap-toolkit-xiaomi/packages/hap-dsl-xvm/lib/loaders/manifest-loader.js?path=/home/lewis/work/vela/airplane-travel/src!../../hap-toolkit-xiaomi/packages/hap-dsl-xvm/node_modules/babel-loader/lib/index.js?cwd=/home/lewis/work/vela/airplane-travel&cacheDirectory&comments=false&configFile=/home/lewis/work/hap-toolkit-xiaomi/packages/hap-packager/babel.config.js!../../hap-toolkit-xiaomi/packages/hap-dsl-xvm/lib/loaders/fragment-loader.js?index=0&type=script!./src/app.ux?uxType=app":
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ../../hap-toolkit-xiaomi/packages/hap-dsl-xvm/lib/loaders/script-loader.js!../../hap-toolkit-xiaomi/packages/hap-dsl-xvm/lib/loaders/module-loader.js!../../hap-toolkit-xiaomi/packages/hap-dsl-xvm/lib/loaders/manifest-loader.js?path=/home/lewis/work/vela/airplane-travel/src!../../hap-toolkit-xiaomi/packages/hap-dsl-xvm/node_modules/babel-loader/lib/index.js?cwd=/home/lewis/work/vela/airplane-travel&cacheDirectory&comments=false&configFile=/home/lewis/work/hap-toolkit-xiaomi/packages/hap-packager/babel.config.js!../../hap-toolkit-xiaomi/packages/hap-dsl-xvm/lib/loaders/fragment-loader.js?index=0&type=script!./src/app.ux?uxType=app ***!
\********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
module.exports = function __scriptModule__ (module, exports, $app_require$){"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
__webpack_require__(/*! ./global */ "./src/global.js");
var _default = {};
exports.default = _default;}
/***/ }),
/***/ "./src/manifest.json":
/*!***************************!*\
!*** ./src/manifest.json ***!
\***************************/
/***/ ((module) => {
"use strict";
module.exports = JSON.parse('{"package":"com.xiaomi.airplane.travel","name":"airplane","versionName":"1.0.0","versionCode":1,"minPlatformVersion":1070,"icon":"/Common/logo.png","deviceTypeList":["phone"],"features":[{"name":"system.prompt"},{"name":"system.router"},{"name":"system.storage"}],"permissions":[{"origin":"*"}],"config":{"logLevel":"log","designWidth":320},"router":{"entry":"Home","pages":{"Home":{"component":"index"},"Detail":{"component":"index"},"Boarding":{"component":"index"}}},"display":{"titleBarBackgroundColor":"#f2f2f2","titleBarTextColor":"#414141","menu":false,"menuBarData":{"menuBar":true},"pages":{}}}');
/***/ }),
/***/ "./src/global.js":
/*!***********************!*\
!*** ./src/global.js ***!
\***********************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.setGlobalData = setGlobalData;
exports.getGlobalData = getGlobalData;
/**
* @file 全局能力的配置与获取
* 文档地址:https://doc.quickapp.cn/tutorial/framework/optimization-skills.html#%E4%BD%BF%E7%94%A8-globaljs
*/
function getGlobalRef() {
return Object.getPrototypeOf(__webpack_require__.g) || __webpack_require__.g;
}
const quickappGlobal = getGlobalRef();
/**
* 设置全局(被APP与Page共享)数据;
* @param key {string}
* @param val {*}
*/
function setGlobalData(key, val) {
quickappGlobal[key] = val;
}
/**
* 获取全局(被APP与Page共享)数据;
* @param key {string}
* @return {*}
*/
function getGlobalData(key) {
return quickappGlobal[key];
} // 两个方法默认定义在全局
setGlobalData('setGlobalData', setGlobalData);
setGlobalData('getGlobalData', getGlobalData);
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/global */
/******/ (() => {
/******/ __webpack_require__.g = (function() {
/******/ if (typeof globalThis === 'object') return globalThis;
/******/ try {
/******/ return this || new Function('return this')();
/******/ } catch (e) {
/******/ if (typeof window === 'object') return window;
/******/ }
/******/ })();
/******/ })();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
(() => {
/*!*******************************!*\
!*** ./src/app.ux?uxType=app ***!
\*******************************/
var $app_script$ = __webpack_require__(/*! !../../../hap-toolkit-xiaomi/packages/hap-dsl-xvm/lib/loaders/script-loader.js!../../../hap-toolkit-xiaomi/packages/hap-dsl-xvm/lib/loaders/module-loader.js!../../../hap-toolkit-xiaomi/packages/hap-dsl-xvm/lib/loaders/manifest-loader.js?path=/home/lewis/work/vela/airplane-travel/src!../../../hap-toolkit-xiaomi/packages/hap-dsl-xvm/node_modules/babel-loader/lib/index.js?cwd=/home/lewis/work/vela/airplane-travel&cacheDirectory&comments=false&configFile=/home/lewis/work/hap-toolkit-xiaomi/packages/hap-packager/babel.config.js!../../../hap-toolkit-xiaomi/packages/hap-dsl-xvm/lib/loaders/fragment-loader.js?index=0&type=script!./app.ux?uxType=app */ "../../hap-toolkit-xiaomi/packages/hap-dsl-xvm/lib/loaders/script-loader.js!../../hap-toolkit-xiaomi/packages/hap-dsl-xvm/lib/loaders/module-loader.js!../../hap-toolkit-xiaomi/packages/hap-dsl-xvm/lib/loaders/manifest-loader.js?path=/home/lewis/work/vela/airplane-travel/src!../../hap-toolkit-xiaomi/packages/hap-dsl-xvm/node_modules/babel-loader/lib/index.js?cwd=/home/lewis/work/vela/airplane-travel&cacheDirectory&comments=false&configFile=/home/lewis/work/hap-toolkit-xiaomi/packages/hap-packager/babel.config.js!../../hap-toolkit-xiaomi/packages/hap-dsl-xvm/lib/loaders/fragment-loader.js?index=0&type=script!./src/app.ux?uxType=app")
$app_script$({}, $app_exports$, $app_require$)
$app_exports$.default.manifest = __webpack_require__(/*! ./manifest.json */ "./src/manifest.json")
})();
/******/ })()
;
};
return createAppHandler();
};