@aiot-toolkit/velasim
Version:
vela for sim
402 lines (368 loc) • 14.9 kB
JavaScript
export default function(global, globalThis, window, $app_exports$){
var createPageHandler = function() {
return /******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ "./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/script-loader.js!./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/module-loader.js!./node_modules/babel-loader/lib/index.js?cwd=/home/baerg/vela/app/vela-xcz&cacheDirectory&plugins[]=/home/baerg/vela/app/vela-xcz/node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/babel-plugin-jsx.js&comments=false&configFile=/home/baerg/vela/app/vela-xcz/node_modules/@aiot-toolkit/packager/babel.config.js!./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/access-loader.js!./src/pages/city_xq/city_xq.js?uxType=page":
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/script-loader.js!./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/module-loader.js!./node_modules/babel-loader/lib/index.js?cwd=/home/baerg/vela/app/vela-xcz&cacheDirectory&plugins[]=/home/baerg/vela/app/vela-xcz/node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/babel-plugin-jsx.js&comments=false&configFile=/home/baerg/vela/app/vela-xcz/node_modules/@aiot-toolkit/packager/babel.config.js!./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/access-loader.js!./src/pages/city_xq/city_xq.js?uxType=page ***!
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/***/ ((module) => {
module.exports = function __scriptModule__ (module, exports, $app_require$){"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _system = _interopRequireDefault($app_require$("@app-module/system.router"));
var _system2 = _interopRequireDefault($app_require$("@app-module/system.fetch"));
var _system3 = _interopRequireDefault($app_require$("@app-module/system.storage"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _default = {
protected: {
poetryId: '',
poetryName: '',
info: [],
cityname: '',
cityname1: ''
},
back() {
_system.default.replace({
uri: "pages/city"
});
},
wenku(name) {
console.log("-------------" + name);
_system3.default.set({
key: "city",
value: name,
success: function (data) {
console.log("city: " + data);
_system.default.replace({
uri: "pages/tuisong",
params: {
cityname1: name
}
});
},
fail: function (data, code) {
console.log("city, code: " + code + ", data: " + data);
}
});
},
onInit() {
'北京', '上海', '天津', '', '', '', '', '', '', '江西省', '', '', '';
if (this.cityname == "北京") {
this.info = ['北京'];
} else if (this.cityname == "上海") {
this.info = ['上海'];
} else if (this.cityname == "天津") {
this.info = ['北京'];
} else if (this.cityname == "河北省") {
this.info = ['石家庄', '邯郸', '邢台', '保定', '承德', '沧州', '衡水', '定州'];
} else if (this.cityname == "山西省") {
this.info = ['太原', '大同', '阳泉', '长治', '晋城', '朔州', '运城', '晋中', '忻州', '临汾', '吕梁'];
} else if (this.cityname == "江苏省") {
this.info = ['南京', '无锡', '徐州', '常州', '苏州', '南通', '连云港', '淮安', '扬州', '镇江', '泰州', '宿迁'];
} else if (this.cityname == "浙江省") {
this.info = ['杭州', '宁波', '温州', '嘉兴', '湖州', '绍兴', '金华', '衢州', '台州', '丽水'];
} else if (this.cityname == "安徽省") {
this.info = ['合肥', '芜湖', '蚌埠', '淮南', '马鞍山', '铜陵', '安庆', '黄山', '滁州', '阜阳', '六安', '亳州', '池州', '宣城'];
} else if (this.cityname == "福建省") {
this.info = ['福州', '莆田', '三明', '泉州', '漳州', '南平', '龙岩', '宁德'];
} else if (this.cityname == "江西省") {
this.info = ['南昌', '景德镇', '萍乡', '九江', '新余', '鹰潭', '赣州', '吉安', '宜春', '抚州', '上饶'];
} else if (this.cityname == "山东省") {
this.info = ["济南", '青岛', '烟台', '潍坊', '济宁', '泰安', '日照', '德州', '聊城', '滨州', '菏泽'];
} else if (this.cityname == "河南省") {
this.info = ['郑州', '开封'];
} else if (this.cityname == "内蒙古自治区") {
this.info = ['呼和浩特', '赤峰', '鄂尔多斯', '朝阳'];
}
}
};
exports.default = _default;
const moduleOwn = exports.default || module.exports;
const accessors = ['public', 'protected', 'private'];
if (moduleOwn.data && accessors.some(function (acc) {
return moduleOwn[acc];
})) {
throw new Error('页面VM对象中的属性data不可与"' + accessors.join(',') + '"同时存在,请使用private替换data名称');
} else if (!moduleOwn.data) {
moduleOwn.data = {};
moduleOwn._descriptor = {};
accessors.forEach(function (acc) {
const accType = typeof moduleOwn[acc];
if (accType === 'object') {
moduleOwn.data = Object.assign(moduleOwn.data, moduleOwn[acc]);
for (const name in moduleOwn[acc]) {
moduleOwn._descriptor[name] = {
access: acc
};
}
} else if (accType === 'function') {
console.warn('页面VM对象中的属性' + acc + '的值不能是函数,请使用对象');
}
});
}}
/***/ }),
/***/ "./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/style-loader.js?index=0&type=style!./src/pages/city_xq/city_xq.css?uxType=page":
/*!***************************************************************************************************************************************!*\
!*** ./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/style-loader.js?index=0&type=style!./src/pages/city_xq/city_xq.css?uxType=page ***!
\***************************************************************************************************************************************/
/***/ ((module) => {
module.exports = [
[
[
[
0,
"container"
]
],
{
"left": "0px",
"top": "0px",
"width": "466px",
"height": "466px",
"flexWrap": "wrap",
"flexDirection": "column",
"alignItems": "center"
}
],
[
[
[
0,
"todo1"
]
],
{
"width": "466px",
"height": "280px",
"justifyContent": "center",
"alignItems": "center",
"flexDirection": "column",
"marginTop": "10px",
"marginRight": "0px",
"marginBottom": "0px",
"marginLeft": "0px"
}
],
[
[
[
0,
"todo_info"
]
],
{
"width": "466px",
"height": "90px",
"justifyContent": "center",
"alignItems": "center",
"flexDirection": "column",
"color": "#ffffff"
}
],
[
[
[
0,
"top"
]
],
{
"width": "466px",
"height": "40px",
"marginTop": "50px",
"marginRight": "0px",
"marginBottom": "5px",
"marginLeft": "0px",
"alignItems": "center"
}
],
[
[
[
0,
"img1"
]
],
{
"width": "34px",
"height": "34px",
"marginTop": "0px",
"marginRight": "0px",
"marginBottom": "0px",
"marginLeft": "90px"
}
],
[
[
[
0,
"tit"
]
],
{
"width": "160px",
"height": "40px",
"fontSize": "30px",
"color": "#ffffff"
}
],
[
[
[
0,
"box_item"
]
],
{
"width": "360px",
"height": "80px",
"alignItems": "center",
"justifyContent": "flex-end",
"backgroundColor": "#393939",
"borderRadius": "20px",
"marginTop": "10px",
"marginRight": "0px",
"marginBottom": "0px",
"marginLeft": "0px"
}
],
[
[
[
0,
"title"
]
],
{
"width": "360px",
"height": "40px",
"fontSize": "30px",
"color": "#ffffff",
"textAlign": "center"
}
]
]
/***/ }),
/***/ "./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/template-loader.js!./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/fragment-loader.js?index=0&type=template!./src/pages/city_xq/city_xq.hml?uxType=page&":
/*!******************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/template-loader.js!./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/fragment-loader.js?index=0&type=template!./src/pages/city_xq/city_xq.hml?uxType=page& ***!
\******************************************************************************************************************************************************************************************************************/
/***/ ((module) => {
module.exports = function (vm) {
const _vm_ = vm || this
return aiot.__ce__("div", {
"classList": [
"container"
]
}, [
aiot.__ce__("div", {
"classList": [
"top"
],
"events": {
"click": function (evt) {_vm_.back(evt)}
}
}, [
aiot.__ce__("image", {
"src": "/common/ic_back.png",
"classList": [
"img1"
],
"events": {
"click": function (evt) {_vm_.back(evt)}
}
}),
aiot.__ce__("text", {
"classList": [
"tit"
],
"value": function () {return _vm_.poetryName}
})
]),
aiot.__ce__("list", {
"classList": [
"todo1"
]
}, [
aiot.__cf__({
exp: function () {return _vm_.info}
},
function ($idx, $item) {
return aiot.__ce__("list-item", {
"classList": [
"todo_info"
],
"events": {
"click": function (evt) { return _vm_.wenku($item,evt)}
}
}, [
aiot.__ce__("div", {
"classList": [
"box_item"
]
}, [
aiot.__ce__("text", {
"classList": [
"title"
],
"value": function () {return $item}
})
])
])})
])
])
}
/***/ }),
/***/ "./src/pages/city_xq/city_xq.hml?uxType=page":
/*!***************************************************!*\
!*** ./src/pages/city_xq/city_xq.hml?uxType=page ***!
\***************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var $app_style$ = __webpack_require__(/*! !../../../node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/style-loader.js?index=0&type=style!./city_xq.css?uxType=page */ "./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/style-loader.js?index=0&type=style!./src/pages/city_xq/city_xq.css?uxType=page")
var $app_script$ = __webpack_require__(/*! !../../../node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/script-loader.js!../../../node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/module-loader.js!../../../node_modules/babel-loader/lib/index.js?cwd=/home/baerg/vela/app/vela-xcz&cacheDirectory&plugins[]=/home/baerg/vela/app/vela-xcz/node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/babel-plugin-jsx.js&comments=false&configFile=/home/baerg/vela/app/vela-xcz/node_modules/@aiot-toolkit/packager/babel.config.js!../../../node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/access-loader.js!./city_xq.js?uxType=page */ "./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/script-loader.js!./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/module-loader.js!./node_modules/babel-loader/lib/index.js?cwd=/home/baerg/vela/app/vela-xcz&cacheDirectory&plugins[]=/home/baerg/vela/app/vela-xcz/node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/babel-plugin-jsx.js&comments=false&configFile=/home/baerg/vela/app/vela-xcz/node_modules/@aiot-toolkit/packager/babel.config.js!./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/access-loader.js!./src/pages/city_xq/city_xq.js?uxType=page")
var $app_template$ = __webpack_require__(/*! !../../../node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/template-loader.js!../../../node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/fragment-loader.js?index=0&type=template!./city_xq.hml?uxType=page& */ "./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/template-loader.js!./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/fragment-loader.js?index=0&type=template!./src/pages/city_xq/city_xq.hml?uxType=page&")
$app_script$({}, $app_exports$, $app_require$);
$app_exports$.default.template = $app_template$;
$app_exports$.default.style = $app_style$;
module.exports = $app_exports$.default;
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(__webpack_module_cache__[moduleId]) {
/******/ return __webpack_module_cache__[moduleId].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;
/******/ }
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module is referenced by other modules so it can't be inlined
/******/ var __webpack_exports__ = __webpack_require__("./src/pages/city_xq/city_xq.hml?uxType=page");
/******/
/******/ })()
;
};
return createPageHandler();
};