├── .babelrc ├── .eslintrc.json ├── .gitignore ├── .npmignore ├── LICENSE ├── README.md ├── assets ├── 0.png ├── 1.png ├── 2.png ├── 3.png ├── 4.png ├── 5.png ├── 6.png └── wx.jpg ├── blog ├── 20180325 │ └── index.md ├── 20180326 │ └── index.md ├── 20180328 │ ├── assets │ │ ├── 0.png │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ └── 5.png │ └── index.md ├── 20180331 │ ├── 0.png │ ├── index.md │ └── title.png └── 20180401 │ ├── 0.jpg │ ├── 1.gif │ ├── 2.jpg │ ├── 3.jpg │ └── index.md ├── build ├── About │ ├── index.js │ └── index.js.map ├── Common │ └── Image │ │ ├── back.png │ │ ├── contact_list_normal.png │ │ ├── contact_list_pressed.png │ │ ├── dingyue.png │ │ ├── find_normal.png │ │ ├── find_pressed.png │ │ ├── icon_de_nearby.png │ │ ├── icon_de_ping.png │ │ ├── icon_de_saoyisao.png │ │ ├── icon_de_yao.png │ │ ├── icon_me_card.png │ │ ├── icon_me_collect.png │ │ ├── icon_me_money.png │ │ ├── icon_me_photo.png │ │ ├── icon_me_setting.png │ │ ├── icon_me_smail.png │ │ ├── lanucher.jpg │ │ ├── logo.png │ │ ├── plus.png │ │ ├── profile_normal.png │ │ ├── profile_pressed.png │ │ ├── qr.png │ │ ├── search.png │ │ ├── v2.png │ │ ├── wechat.ttf │ │ ├── weixin_normal.png │ │ └── weixin_pressed.png ├── Demo │ ├── comm │ │ ├── father.js │ │ └── father.js.map │ ├── comm2 │ │ ├── father.js │ │ └── father.js.map │ ├── index.js │ └── index.js.map ├── DemoDetail │ ├── index.js │ └── index.js.map ├── GZH │ ├── index.js │ └── index.js.map ├── Main │ ├── index.js │ └── index.js.map ├── Web │ ├── index.js │ └── index.js.map ├── Welcome │ ├── index.js │ └── index.js.map ├── app.js ├── app.js.map └── manifest.json ├── dist └── com.application.demo.rpk ├── package.json ├── sign └── debug │ ├── certificate.pem │ └── private.pem ├── src ├── About │ └── index.ux ├── Common │ ├── Image │ │ ├── back.png │ │ ├── contact_list_normal.png │ │ ├── contact_list_pressed.png │ │ ├── dingyue.png │ │ ├── find_normal.png │ │ ├── find_pressed.png │ │ ├── icon_de_nearby.png │ │ ├── icon_de_ping.png │ │ ├── icon_de_saoyisao.png │ │ ├── icon_de_yao.png │ │ ├── icon_me_card.png │ │ ├── icon_me_collect.png │ │ ├── icon_me_money.png │ │ ├── icon_me_photo.png │ │ ├── icon_me_setting.png │ │ ├── icon_me_smail.png │ │ ├── lanucher.jpg │ │ ├── logo.png │ │ ├── plus.png │ │ ├── profile_normal.png │ │ ├── profile_pressed.png │ │ ├── qr.png │ │ ├── search.png │ │ ├── v2.png │ │ ├── wechat.ttf │ │ ├── weixin_normal.png │ │ └── weixin_pressed.png │ └── css │ │ ├── list.css │ │ └── title.css ├── Demo │ ├── comm │ │ ├── father.ux │ │ └── son.ux │ ├── comm2 │ │ ├── father.ux │ │ ├── son.ux │ │ └── son2.ux │ ├── index.ux │ └── webtest │ │ └── index.ux ├── DemoDetail │ └── index.ux ├── GZH │ └── index.ux ├── Main │ ├── contacts.ux │ ├── friends.ux │ ├── index.ux │ ├── me.ux │ └── weixin.ux ├── Title │ └── index.ux ├── Web │ └── index.ux ├── Welcome │ └── index.ux ├── app.ux ├── manifest.json └── util.js └── tp.ux /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "env" 4 | ] 5 | } -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "commonjs": true 4 | }, 5 | "extends": "eslint:recommended", 6 | "parser": "babel-eslint", 7 | "parserOptions": { 8 | "sourceType": "module", 9 | "ecmaFeatures": { 10 | "experimentalObjectRestSpread": true, 11 | "jsx": true 12 | } 13 | }, 14 | "globals": { 15 | "loadData": false, 16 | "saveData": false, 17 | "history": false, 18 | "console": false, 19 | "setTimeout": false, 20 | "clearTimeout": false, 21 | "setInterval": false, 22 | "clearInterval": false 23 | }, 24 | "plugins": [ 25 | "hybrid" 26 | ], 27 | "rules": { 28 | "indent": [ 29 | "warn", 30 | 2 31 | ], 32 | "no-console": [ 33 | "warn", 34 | { 35 | "allow": [ 36 | "info", 37 | "warn", 38 | "error" 39 | ] 40 | } 41 | ], 42 | "no-unused-vars": [ 43 | "warn", 44 | { 45 | "varsIgnorePattern": "prompt" 46 | } 47 | ], 48 | "quotes": [ 49 | "warn", 50 | "single", 51 | { 52 | "avoidEscape": true, 53 | "allowTemplateLiterals": true 54 | } 55 | ], 56 | "linebreak-style": [ 57 | "warn", 58 | "unix" 59 | ], 60 | "semi": [ 61 | "warn", 62 | "never" 63 | ] 64 | } 65 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Yale 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 快应用实现的微信Demo 2 | 3 | > 欢迎大家一起学习快应用开发 4 | 5 | 6 | 7 | 8 | 9 | 10 | ## 目前进度 11 | 12 | - [x] 基本UI 13 | - [ ] 详细功能 14 | 15 | ## [入门教程](https://juejin.im/post/5ab4d4c36fb9a028b92d149c) 16 | 17 | ## 快应用开发中发现的问题: 18 | 19 | ### CSS问题 20 | 21 | - 默认是flex布局,css就不用显示设置了; 22 | - 一定要看文档提示,有些属性不支持,比如 `justify-content` 不支持 `space-around` 23 | 24 | ### 布局问题 25 | 26 | - 自定义布局导入到父布局后默认宽高还是屏幕尺寸,并不是限制到父布局宽高 27 | 28 | ### 事件 29 | 30 | - 没有touch事件 31 | 32 | ### DOM 33 | 34 | - 不能操作document,比如所document.getElementById 35 | - onReady后才能操作DOM 36 | - $element(id) 不能直接修改style 37 | 38 | ### MVVM 39 | 40 | - VM的属性值必须在onInit之前修改好,等onReady后再修改无效,view不能更新 41 | 42 | ## 欢迎大家关注`快应用栈`公众号 43 | 44 |  -------------------------------------------------------------------------------- /assets/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/assets/0.png -------------------------------------------------------------------------------- /assets/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/assets/1.png -------------------------------------------------------------------------------- /assets/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/assets/2.png -------------------------------------------------------------------------------- /assets/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/assets/3.png -------------------------------------------------------------------------------- /assets/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/assets/4.png -------------------------------------------------------------------------------- /assets/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/assets/5.png -------------------------------------------------------------------------------- /assets/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/assets/6.png -------------------------------------------------------------------------------- /assets/wx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/assets/wx.jpg -------------------------------------------------------------------------------- /blog/20180325/index.md: -------------------------------------------------------------------------------- 1 | # 快应用学习教程-入门 2 | 3 | > 官方文档地址:https://doc.quickapp.cn/ 4 | 5 | ## 环境搭建 6 | 7 | ### 安装nodejs 8 | 9 | 官方建议不使用8.0.*版本.这个版本内部ZipStream实现与node-archive包不兼容,会引起报; 10 | 11 | Windows用户我推荐下载[node v7.10.1-x86.msi](https://nodejs.org/download/release/v7.10.1/node-v7.10.1-x86.msi) 一路点next就ok; 12 | 13 | 对于Android开发者来说对node不是很熟悉,没有关系,推荐看看知乎这篇文章[Node.js是用来做什么的?](https://www.zhihu.com/question/33578075)先了解一下。这里用node是把它作为搭建开发工具环境用的,主要用于开发、debug、编译和打包。 14 | 15 | `开发快应用真正用到的还是html(ux)、css和js的语法` 16 | 17 | 安装完node环境后建议安装cnpm,这样下载库时会走淘宝的node仓库,会更快: 18 | 19 | ``` 20 | npm install -g cnpm --registry=https://registry.npm.taobao.org 21 | ``` 22 | 23 | 安装完cnpm后,所有使用npm的地方都可以换做cnpm 24 | 25 | 26 | ### 安装hap-toolkit 27 | 28 | ``` 29 | cnpm install -g hap-toolkit 30 | ``` 31 | -g 参数是全局安装在环境变量能访问的地方,这样直接在命令行中可以执行hap命令,查看版本 32 | 33 | ``` 34 | hap -V 35 | ``` 36 | 37 | hap 是官方给的辅助开发工具,主要功能是初始化工程模板,这样就省去了初始化繁琐的工作; 38 | 39 | ## 开发工具 40 | 41 | 开发工具有很多种选择,我个人很喜欢VsCode [VsCode 下载地址](https://code.visualstudio.com/),推荐用VsCode 42 | 43 | 温馨提示:VsCode 快捷键 `Ctrl+Shift+y`可以调出调试控制台、终端 44 | 45 | ## 创建项目 46 | 47 | ### 创建 48 | 49 | ``` 50 | hap init 51 | ``` 52 | 53 | ``` 54 | ├── node_modules 55 | ├── sign rpk包签名模块 56 | │ └── debug 调试环境 57 | │ ├── certificate.pem 证书文件 58 | │ └── private.pem 私钥文件 59 | ├── src 60 | │ ├── Common 公用的资源文件和组件文件 61 | │ │ └── logo.png manifest.json中配置的icon 62 | │ ├── Demo 页面目录 63 | │ | └── index.ux 页面文件,文件名不必与父文件夹相同 64 | │ ├── app.ux APP文件(用于包括公用资源) 65 | │ └── manifest.json 项目配置文件(如:应用描述、接口申明、页面路由等) 66 | └── package.json 定义项目需要的各种模块及配置信息,npm install根据这个配置文件,自动下载所需的运行和开发环境 67 | 68 | ``` 69 | 70 | 目录的简要说明如下: 71 | 72 | - src:项目源文件夹 73 | - node_modules:项目的依赖类库 74 | - sign:签名模块,当前仅有debug签名,如果内测上线,请添加release文件夹,增加线上签名;签名生成方法请参考文档:编译工具的openssl 75 | 76 | Web前端同学可能不太了解sign,可以看看这篇文章[Android 你了解Android签名文件吗?](https://blog.csdn.net/u010316858/article/details/53159678) 77 | 78 | 79 | ### 编译 80 | 81 | 请先将命令行执行目录切换至你刚创建的目录下,后面所有命令都在这个目录下执行。 82 | 83 | 根据package.json [nodejs package.json详解](https://blog.csdn.net/hh12211221/article/details/77567627)安装库: 84 | 85 | ``` 86 | cnpm install 87 | ``` 88 | 89 | 编译 90 | 91 | ``` 92 | npm run build 93 | ``` 94 | 95 | 实际上是调用package.json中的scripts-->build命令,[npm scripts 使用指南](http://www.ruanyifeng.com/blog/2016/10/npm_scripts.html) 96 | 97 | ``` 98 | { 99 | "scripts": { 100 | "build": "cross-env NODE_PLATFORM=na NODE_PHASE=dv webpack --config ./node_modules/hap-tools/webpack.config.js" 101 | } 102 | } 103 | ``` 104 | 105 | 编译打包成功后,项目根目录下会生成文件夹:build、dist 106 | 107 | - build:临时产出,包含编译后的页面js,图片等 108 | - dist:最终产出,包含rpk文件。其实是将build目录下的资源打包压缩为一个文件,后缀名为rpk,这个rpk文件就是项目编译后的最终产出 109 | 110 | 111 |  112 | 113 | 我们大概看看其主要文件是.ux,里面的结构分为template,style,script三大块,这个结构是典型的Web前端[MVVM](https://baike.baidu.com/item/MVVM/96310?fr=aladdin)结构,用到了CSS [Flex](http://www.ruanyifeng.com/blog/2015/07/flex-grammar.html)看来一个.ux就是一个模块,类似一个Android中的Activity。manifest.json就类似Android中的AndroidManifest.xml 114 | 115 | 116 | `rpk文件就是快应用安装包类似Android的APK包,它只能在支持快应用的Android操作系统或Android App里执行` 117 | 118 | ### 自动重新编译 119 | 120 | 如果希望每次修改源代码文件后,都自动重新编译项目,请使用如下命令: 121 | 122 | ``` 123 | npm run watch 124 | ``` 125 | 126 | `注意:` 127 | 128 | 如果报错遇到Cannot find module '.../webpack.config.js',请重新执行一次hap update --force。这是由于高版本的npm在npm install时,会校验并删除了node_modules下部分文件夹,导致报错。而hap update --force会重新复制hap-tools文件夹到node_modules中 129 | 130 | ## 安装debug工具 131 | 132 | ### 安装debug APP 133 | 134 | [Debug APP 下载](https://statres.quickapp.cn/quickapp/quickapp/201803/file/201803221213415527241.apk) 135 | 136 | 安装后截图如下: 137 | 138 |  139 | 140 | 说明如下: 141 | 142 | - 扫码安装:配置HTTP服务器地址,下载rpk包,并唤起平台运行rpk包 143 | - 本地安装:选择手机文件系统中的rpk包,并唤起平台运行rpk包 144 | - 在线更新:重新发送HTTP请求,更新rpk包,并唤起平台运行rpk包 145 | - 开始调试:唤起平台运行rpk包,并启动远程调试工具 146 | 147 | 目前大部分手机系统还没有集成快应用的执行环境,所以还要安装运行环境APP,[运行环境APP下载](https://statres.quickapp.cn/quickapp/quickapp/201803/file/20180322121456491785.apk) 安装运行环境APP。然后再打开debug APP。 148 | 149 | ## 运行 rpk包 150 | 151 | 在调试器中唤起平台打开rpk包有多种途径,以下两者选其一即可,推荐第一种途径: 152 | 153 | - HTTP请求:开发者启动HTTP服务器,打开调试器,点击扫码安装配置HTTP服务器地址,下载rpk包,并唤起平台运行rpk包 154 | - 本地安装:开发者将rpk包拷贝到手机文件系统,打开调试器,点击本地安装选择rpk包,并唤起平台运行rpk包 155 | 156 | 1. 扫码安装 157 | 158 | 启动HTTP服务器 159 | 160 | 在终端中新建一个窗口,进入项目的根目录运行如下命令,启动本地服务器(默认端口为12306) 161 | 162 | ``` 163 | npm run server 164 | ``` 165 | 166 | 自定义端口(如:8080) 167 | 168 | ``` 169 | npm run server -- --port 8080 170 | ``` 171 | 在Debug APP上预览运行效果 172 | 173 | 配置HTTP服务器地址有两种方式,以下两者选其一即可: 174 | 175 | - 打开调试器 --> 点击"扫码安装",扫描终端窗口中的二维码即可完成配置(若扫描不成功,可在浏览器中打开页面:http://localhost:port,扫描页面中的二维码) 176 | 177 | - 打开调试器 --> 点击右上角menu --> 设置,输入终端窗口中提示的HTTP服务器地址 178 | 179 | 配置完成后,若没有自动唤起平台运行rpk包,点击在线更新唤起平台运行rpk包,若提示安装失败,请检查执行npm run server的终端窗口是否正常运行 180 | 181 | 运行效果如下图: 182 | 183 |  184 | 185 | 2. 本地安装 186 | 187 | 复制rpk包到手机中 188 | 189 | 将/dist目录下编译产出的rpk包通过USB数据线或其他方式,复制到手机文件系统中 190 | 191 | 本地安装rpk包 192 | 193 | 打开调试器 --> 点击"本地安装",选择手机文件系统中的rpk包,并自动唤起平台运行rpk包,查看效果 194 | 195 | ## 调试 196 | 197 | ### 日志输出 198 | 199 | 1. 修改日志等级 200 | 201 | 打开工程根目录下的src文件夹的manifest.json,找到config配置,将logLevel修改为最低级别debug,即:允许所有级别的日志输出 202 | 203 | 修改后/src/manifest.json中config配置代码如下: 204 | 205 | ``` 206 | { 207 | "config": { 208 | "logLevel": "debug" 209 | } 210 | } 211 | ``` 212 | 213 | 2. 在js中输出日志 214 | 215 | 当js代码未按需求正确运行,输出日志能帮助开发者快速定位问题;与传统前端开发一致,使用console对象输出日志,如下: 216 | 217 | ``` 218 | console.debug('debug') 219 | console.log('log') 220 | console.info('info') 221 | console.warn('warn') 222 | console.error('error') 223 | ``` 224 | 225 | 3. 查看日志 226 | 227 | 开发者可以使用Android Studio的Android Monitor输出来查看日志。 228 | 229 | 先添加一段console.debug("hello quickapp") 230 | 231 |  232 | 233 | 然后 234 | 235 | ``` 236 | npm run build 237 | ``` 238 | 239 | ``` 240 | npm run server 241 | ``` 242 | 终端出现如下: 243 | 244 |  245 | 246 | 247 | 然后打开Android Monitor 248 | 249 |  250 | 251 | 用Debug App 扫描二维码安装; 252 | 253 | 254 | 255 | ### 远程调试 256 | 257 | 如果你没有安装Android-Monitor,就可以通过远程调试调试快应用,用hap-toolkit的远程调试命令 、chrome devtools调试界面,来调试手机app端的页面 258 | 259 | - 开发者可以通过命令行终端或者调试服务器主页看到提供扫描的二维码 260 | - 开发者通过快应用调试器扫码安装按钮,扫码安装待调试的rpk文件 261 | - 开发者点击快应用调试器中的开始调试按钮,开始调试 262 | 263 | 用Debug App 扫描二维码安装后点击开始调试按钮: 264 | 265 |  266 | 267 | 如果安装了Chrome浏览器,debug程序会自动调起PC Chrome devtools: 268 | 269 |  270 | 271 | 272 | 大家可以改一些代码自己跑起来看看效果 273 | 274 | ## 与小程序对比 275 | 276 | 通过打开Android开发者选项中的'显示布局界面边界'功能可以看出界面是否是Android原始控件: 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 对比发现,快应用将html,js,css最终编译成Android原始控件了,这样快应用的体验最好 286 | 287 | 288 | ## 总结 289 | 290 | 总结一下前面都学到了什么: 291 | 292 | - 搭建环境,安装Node,hap,VsCode,Debug App,运行环境APP 293 | - 创建第一个项目,初识开发框架,开发语言 294 | - 编译安装debug rpk包 295 | - 和小程序对比,快应用编译程序为Android原始控件,这样体验最好 296 | 297 | 298 |  -------------------------------------------------------------------------------- /blog/20180326/index.md: -------------------------------------------------------------------------------- 1 | ## 快应用实现的微信Demo,欢迎大家一起学习快应用开发 2 | 3 | [github地址,欢迎关注](https://github.com/yale8848/quickapp-wechat) 4 | 5 | > 目前搭建了基本UI 6 | 7 |  8 |  9 |  10 |  11 |  12 |  13 |  14 | 15 | [快应用入门教程](https://juejin.im/post/5ab4d4c36fb9a028b92d149c) 16 | 17 | ## 快应用开发中发现的问题: 18 | ### CSS问题 19 | 20 | - 默认是flex布局,css就不用显示设置了; 21 | - 一定要看文档提示,有些属性不支持,比如 `justify-content` 不支持 `space-around` 22 | 23 | ### 布局问题 24 | 25 | - 自定义布局导入到父布局后默认宽高还是屏幕尺寸,并不是限制到父布局宽高 26 | 27 | ### 事件 28 | 29 | - 没有touch事件 30 | 31 | ### DOM 32 | 33 | - 不能操作document,比如所document.getElementById 34 | - onReady后才能操作DOM 35 | - $element(id) 不能直接修改style 36 | 37 | ### MVVM 38 | 39 | - VM的属性值必须在onInit之前修改好,等onReady后再修改无效,view不能更新 40 | 41 | ## [github地址,欢迎关注](https://github.com/yale8848/quickapp-wechat) 42 | ## 欢迎大家关注`快应用栈`公众号 43 | 44 |  -------------------------------------------------------------------------------- /blog/20180328/assets/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/blog/20180328/assets/0.png -------------------------------------------------------------------------------- /blog/20180328/assets/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/blog/20180328/assets/1.png -------------------------------------------------------------------------------- /blog/20180328/assets/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/blog/20180328/assets/2.png -------------------------------------------------------------------------------- /blog/20180328/assets/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/blog/20180328/assets/3.png -------------------------------------------------------------------------------- /blog/20180328/assets/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/blog/20180328/assets/4.png -------------------------------------------------------------------------------- /blog/20180328/assets/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/blog/20180328/assets/5.png -------------------------------------------------------------------------------- /blog/20180328/index.md: -------------------------------------------------------------------------------- 1 | # 快应用教程-实现自定义组件 2 | 3 | 以下用到的代码例子都在这里[快应用实现的微信Demo](https://github.com/yale8848/quickapp-wechat): 4 | 5 | ``` 6 | git clone https://github.com/yale8848/quickapp-wechat 7 | cd quickapp-wechat 8 | git checkout v0.1.1 9 | 10 | ``` 11 | 12 | ## 为什么用自定义组件 13 | 14 | 自定义组件首先是一个组件,至少包含一个.ux文件,文件里把组件要实现的UI,逻辑封装起来共外界调用,这样可以让组件之间解耦,组件功能更加单一、灵活;举个微信Demo中的一个例子,我要实现微信的titlebar功能, 15 | 16 |  17 | 18 | 当然我可以用系统的titlebar,但是为了功能更丰富,我把它作为一个组件来实现,下面来看看实现自定义组件的过程。 19 | 20 | ### 创建ux文件 21 | 22 | 如微信Demo里的Title/index.ux,创建好``,` 78 | 79 | 86 | 87 | ``` 88 | 好了,上面ux文件已经把titlebar的UI创建好了,还有一个返回事件也添加了; 89 | 90 | ### 如何调用组件 91 | 92 | 使用improt标签,name是自定义名称,详细看Demo里的Main/index.ux 93 | 94 | ``` 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | ``` 103 | 104 | 这样就可以把title调用起来了 105 | 106 | ``` 107 | npm run watch 108 | npm run server 109 | ``` 110 | 111 | 看看效果: 112 | 113 |  114 | 115 | 等等,怎么不见标题了?嗯,咱还没有设置呢,可能不同页面对标题、返回按钮是否显示的要求不一样,那么我们就要能动态控制; 116 | 117 | ### 给子组件传值 118 | 119 | - 子组件用`props`属性暴露变量给父组件调用,如下暴露`['showBack', 'showText', 'showPlus', 'showSearch', 'text']`变量,它们分别是控制返回按钮、标题、加按钮、搜索按钮是否显示以及标题内容,然后把这些变量绑定到UI控件上 120 | 121 | ``` 122 | 133 | 134 | 135 | 136 | 137 | 138 | {{text}} 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | ``` 149 | 150 | - 父组件调用 151 | 152 | 通过给子组件标签设置属性值来调用子组件变量,`子组件变量用驼峰命名方式,父组件调用子组件属性命名用-来分隔驼峰` 153 | 154 | ``` 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | ``` 163 | 调用结果如下: 164 | 165 |  166 | 167 | 168 | ### 父子组件通信 169 | 170 | 除过上面父组件给子组件以变量的形式传值外,父子之间可以以消息的形式传值: 171 | 172 | #### 父给子发消息 173 | 174 | 以下代码见src/Demo/comm 175 | 176 | 子组件订阅fatherSay消息: 177 | 178 | ``` 179 | data: { 180 | say: "" 181 | }, 182 | sayMsg(evt) { 183 | 184 | this.say = evt.detail.msg //收到消息 185 | 186 | }, 187 | onInit() { 188 | this.$on("fatherSay", this.sayMsg) //订阅消息 189 | }, 190 | ``` 191 | 192 | 父组件给fatherSay发消息: 193 | 194 | 195 | ``` 196 | this.$broadcast('fatherSay', { 197 | msg: "son" 198 | }) 199 | ``` 200 | 201 | #### 子组件给父组件发消息 202 | 203 | 父组件有2种方式订阅子组件消息: 204 | 205 | - 父组件以js代码形式订阅,子组件以$dispath发送事件 206 | 207 | ``` 208 | onInit() { 209 | this.$on("sonSay", this.sayMsg) 210 | } 211 | ``` 212 | 213 | ``` 214 | this.$dispath('sonSay', { 215 | msg: t 216 | }) 217 | ``` 218 | 219 | - 父组件以子组件标签属性形式订阅,子组件以$emit发送事件 220 | 221 | 222 | ``` 223 | 224 | 225 | ``` 226 | 227 | ``` 228 | this.$emit('sonSay', { 229 | msg: t 230 | }) 231 | ``` 232 | 233 | 大家可以把manifest.json 中的entry改为`"entry": "Demo/comm"`,看看效果: 234 | 235 |  236 | 237 | 238 | 当点击子组件say hi时父组件会收到子组件消息; 239 | 240 | 241 |  242 | 243 | 244 | 当点击子组件say father时父组件会收到子组件消息并反馈给子组件"son"的消息 245 | 246 | 247 | ### 兄弟组件之间发消息 248 | 249 | 以下代码在src/Demo/comm2中 250 | 251 | 兄弟组件之间发消息之前要先通过父组件互相绑定VM对象: 252 | 253 | ``` 254 | onReady() { //注意要放在onReady调用 255 | const vm1 = this.$vm('son1') 256 | const vm2 = this.$vm('son2') 257 | 258 | vm1.parentVm = this 259 | vm1.nextVm = vm2 260 | vm2.parentVm = this 261 | vm2.previousVm = vm1 262 | } 263 | 264 | ``` 265 | 266 | 然后兄弟组件之间发消息有两种形式: 267 | 268 | - 通过VM对象调用对方函数: 269 | 270 | ``` 271 | //son2.ux 272 | brotherSay(msg) { 273 | this.say = msg 274 | }, 275 | ``` 276 | 277 | ``` 278 | //son1.ux 279 | if (this.nextVm) { 280 | this.nextVm.brotherSay(msg) 281 | } 282 | ``` 283 | - 通过event事件: 284 | 285 | ``` 286 | //son1 绑定消息 287 | events: { 288 | eventSay(evt) { 289 | this.say = evt.detail 290 | } 291 | } 292 | ``` 293 | 294 | ``` 295 | //son2 通过$emit发送消息 296 | if (this.previousVm) { 297 | 298 | this.previousVm.$emit('eventSay', msg) 299 | } 300 | 301 | ``` 302 | 303 | 大家可以把manifest.json 中的entry改为`"entry": "Demo/comm2"`,看看效果: 304 | 305 |  306 | 307 | 308 | 以上用到的代码例子都在这里[快应用实现的微信Demo](https://github.com/yale8848/quickapp-wechat): 309 | ``` 310 | git clone https://github.com/yale8848/quickapp-wechat 311 | cd quickapp-wechat 312 | git checkout v0.1.1 313 | 314 | ``` 315 | 316 | ## 欢迎大家关注`快应用栈`公众号 317 | 318 |  -------------------------------------------------------------------------------- /blog/20180331/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/blog/20180331/0.png -------------------------------------------------------------------------------- /blog/20180331/index.md: -------------------------------------------------------------------------------- 1 | # 快应用中的‘EventBus’ 2 | 3 | > 前边一片文章 `快应用教程-实现自定义组件` 已经讲过如何自定义组件和组件之间通信,今天要讲的BroadcastChannel不同于前面的方式,BroadcastChannel可以让通信彻底解耦,不同页面、组件之间都可以用。BroadcastChannel就像是Android界的EventBus。 4 | 5 | 以下用到的代码例子都在这里[快应用实现的微信Demo](https://github.com/yale8848/quickapp-wechat): 6 | 7 | ``` 8 | git clone https://github.com/yale8848/quickapp-wechat 9 | cd quickapp-wechat 10 | git checkout v0.1.1 11 | 12 | ``` 13 | 14 | BroadcastChannel就是一种订阅发布组件,发布者给某一事件发送消息,所有订阅相同事件的订阅者会收到同一个消息; 15 | 16 | ## 订阅事件 17 | 18 | 订阅'说话'事件 19 | 20 | ``` 21 | onInit() { 22 | this.sayEvent = new BroadcastChannel('say') 23 | 24 | this.sayEvent.onmessage = function (event) { 25 | 26 | } 27 | } 28 | ``` 29 | 30 | ## 发布事件 31 | 32 | 发布'说话'事件,注意,`自己不会收到自己发的消息` 33 | 34 | ``` 35 | this.sayEvent = new BroadcastChannel('say'); 36 | this.sayEvent.postMessage('') 37 | 38 | ``` 39 | 40 | ## 关闭事件 41 | 42 | 当当前页面销毁的时候记得要关闭事件 43 | 44 | ``` 45 | onDestroy(){ 46 | this.sayEvent.close() 47 | } 48 | ``` 49 | 50 | 大家可以把manifest.json 中的entry改为`"entry": "Demo/comm"`试一试 51 | 52 |  53 | 54 | 55 | 56 | ## 欢迎大家关注`快应用栈`公众号 57 | 58 |  -------------------------------------------------------------------------------- /blog/20180331/title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/blog/20180331/title.png -------------------------------------------------------------------------------- /blog/20180401/0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/blog/20180401/0.jpg -------------------------------------------------------------------------------- /blog/20180401/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/blog/20180401/1.gif -------------------------------------------------------------------------------- /blog/20180401/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/blog/20180401/2.jpg -------------------------------------------------------------------------------- /blog/20180401/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/blog/20180401/3.jpg -------------------------------------------------------------------------------- /blog/20180401/index.md: -------------------------------------------------------------------------------- 1 | # 小程序快应用要互相兼容了 2 | 3 | 对于程序员来说,程序互不不兼容是令程序员非常头疼的事情。 4 | 5 |  6 | 7 | 好消息是小程序快应用互相兼容了,程序员喜大奔普的日子来了。 8 | 9 |  10 | 11 | 根据腾信最新消息,马哥已经发布最新消息称小程序快应用要互相兼容,这样小程序和快应用之间的优势就互补了,马哥称如果互相兼容就有以下好处: 12 | 13 | 14 | - 小程序可以直接由系统调用,这样可以更快; 15 | 16 | - 小程序彻底编译成系统控件,这样体验更流畅; 17 | 18 | - 小程序入口也变多了,可以直接在各大应用市场搜索启动; 19 | 20 | - 对于快应用来说,可以直接从微信里拉起了; 21 | 22 | - 互相兼容,解放程序员; 23 | 24 | - 每一天都要快乐,特别是今天; 25 | 26 |  -------------------------------------------------------------------------------- /build/About/index.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | 3 | var createPageHandler = function() { 4 | return /******/ (function(modules) { // webpackBootstrap 5 | /******/ // The module cache 6 | /******/ var installedModules = {}; 7 | /******/ 8 | /******/ // The require function 9 | /******/ function __webpack_require__(moduleId) { 10 | /******/ 11 | /******/ // Check if module is in cache 12 | /******/ if(installedModules[moduleId]) 13 | /******/ return installedModules[moduleId].exports; 14 | /******/ 15 | /******/ // Create a new module (and put it into the cache) 16 | /******/ var module = installedModules[moduleId] = { 17 | /******/ exports: {}, 18 | /******/ id: moduleId, 19 | /******/ loaded: false 20 | /******/ }; 21 | /******/ 22 | /******/ // Execute the module function 23 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 24 | /******/ 25 | /******/ // Flag the module as loaded 26 | /******/ module.loaded = true; 27 | /******/ 28 | /******/ // Return the exports of the module 29 | /******/ return module.exports; 30 | /******/ } 31 | /******/ 32 | /******/ 33 | /******/ // expose the modules object (__webpack_modules__) 34 | /******/ __webpack_require__.m = modules; 35 | /******/ 36 | /******/ // expose the module cache 37 | /******/ __webpack_require__.c = installedModules; 38 | /******/ 39 | /******/ // __webpack_public_path__ 40 | /******/ __webpack_require__.p = ""; 41 | /******/ 42 | /******/ // Load entry module and return exports 43 | /******/ return __webpack_require__(0); 44 | /******/ }) 45 | /************************************************************************/ 46 | /******/ ([ 47 | /* 0 */ 48 | /***/ function(module, exports, __webpack_require__) { 49 | 50 | var $app_template$ = __webpack_require__(1) 51 | var $app_style$ = __webpack_require__(2) 52 | var $app_script$ = __webpack_require__(3) 53 | 54 | $app_define$('@app-component/index', [], function($app_require$, $app_exports$, $app_module$){ 55 | $app_script$($app_module$, $app_exports$, $app_require$) 56 | if ($app_exports$.__esModule && $app_exports$.default) { 57 | $app_module$.exports = $app_exports$.default 58 | } 59 | $app_module$.exports.template = $app_template$ 60 | $app_module$.exports.style = $app_style$ 61 | }) 62 | 63 | $app_bootstrap$('@app-component/index',{ packagerVersion: '0.0.5'}) 64 | 65 | 66 | /***/ }, 67 | /* 1 */ 68 | /***/ function(module, exports) { 69 | 70 | module.exports = { 71 | "type": "div", 72 | "attr": {}, 73 | "classList": [ 74 | "demo-page" 75 | ], 76 | "children": [ 77 | { 78 | "type": "image", 79 | "attr": { 80 | "id": "icon", 81 | "src": function () {return this.icon} 82 | }, 83 | "id": "icon" 84 | }, 85 | { 86 | "type": "text", 87 | "attr": { 88 | "id": "name", 89 | "value": function () {return this.name} 90 | }, 91 | "id": "name" 92 | }, 93 | { 94 | "type": "div", 95 | "attr": { 96 | "id": "tags" 97 | }, 98 | "id": "tags", 99 | "children": [ 100 | { 101 | "type": "text", 102 | "attr": { 103 | "value": "无安装" 104 | }, 105 | "classList": [ 106 | "tag" 107 | ] 108 | }, 109 | { 110 | "type": "text", 111 | "attr": { 112 | "value": "|" 113 | }, 114 | "classList": [ 115 | "gap" 116 | ] 117 | }, 118 | { 119 | "type": "text", 120 | "attr": { 121 | "value": "体积小" 122 | }, 123 | "classList": [ 124 | "tag" 125 | ] 126 | }, 127 | { 128 | "type": "text", 129 | "attr": { 130 | "value": "|" 131 | }, 132 | "classList": [ 133 | "gap" 134 | ] 135 | }, 136 | { 137 | "type": "text", 138 | "attr": { 139 | "value": "一步直达" 140 | }, 141 | "classList": [ 142 | "tag" 143 | ] 144 | } 145 | ] 146 | }, 147 | { 148 | "type": "text", 149 | "attr": { 150 | "id": "desc", 151 | "value": function () {return this.desc} 152 | }, 153 | "id": "desc" 154 | }, 155 | { 156 | "type": "div", 157 | "attr": {}, 158 | "classList": [ 159 | "detail", 160 | "detail-first" 161 | ], 162 | "children": [ 163 | { 164 | "type": "text", 165 | "attr": { 166 | "value": "服务类型" 167 | }, 168 | "classList": [ 169 | "detail-title" 170 | ] 171 | }, 172 | { 173 | "type": "text", 174 | "attr": { 175 | "value": function () {return this.serviceType} 176 | }, 177 | "classList": [ 178 | "detail-content" 179 | ] 180 | } 181 | ] 182 | }, 183 | { 184 | "type": "div", 185 | "attr": {}, 186 | "classList": [ 187 | "detail" 188 | ], 189 | "children": [ 190 | { 191 | "type": "text", 192 | "attr": { 193 | "value": "主体信息" 194 | }, 195 | "classList": [ 196 | "detail-title" 197 | ] 198 | }, 199 | { 200 | "type": "text", 201 | "attr": { 202 | "value": function () {return this.subjectInfo} 203 | }, 204 | "classList": [ 205 | "detail-content" 206 | ] 207 | } 208 | ] 209 | }, 210 | { 211 | "type": "input", 212 | "attr": { 213 | "type": "button", 214 | "value": "创建快捷方式" 215 | }, 216 | "classList": [ 217 | "btn" 218 | ], 219 | "events": { 220 | "click": "createShortcut" 221 | } 222 | }, 223 | { 224 | "type": "text", 225 | "attr": { 226 | "id": "footer", 227 | "value": function () {return this.copyright} 228 | }, 229 | "id": "footer" 230 | } 231 | ] 232 | } 233 | 234 | /***/ }, 235 | /* 2 */ 236 | /***/ function(module, exports) { 237 | 238 | module.exports = { 239 | ".demo-page": { 240 | "flexDirection": "column", 241 | "alignItems": "center" 242 | }, 243 | "#icon": { 244 | "marginTop": "90px", 245 | "width": "134px", 246 | "height": "134px", 247 | "borderRadius": "10px", 248 | "borderTopWidth": "1px", 249 | "borderRightWidth": "1px", 250 | "borderBottomWidth": "1px", 251 | "borderLeftWidth": "1px", 252 | "borderStyle": "solid", 253 | "borderTopColor": "#8d8d8d", 254 | "borderRightColor": "#8d8d8d", 255 | "borderBottomColor": "#8d8d8d", 256 | "borderLeftColor": "#8d8d8d" 257 | }, 258 | "#name": { 259 | "marginTop": "20px", 260 | "fontSize": "36px", 261 | "color": "#000000" 262 | }, 263 | "#tags": { 264 | "marginTop": "22px", 265 | "alignItems": "center" 266 | }, 267 | ".tag": { 268 | "paddingLeft": "20px", 269 | "paddingRight": "20px", 270 | "fontSize": "28px", 271 | "color": "#2a9700" 272 | }, 273 | ".gap": { 274 | "fontSize": "22px", 275 | "color": "#b2b2b2" 276 | }, 277 | "#desc": { 278 | "width": "650px", 279 | "marginTop": "40px", 280 | "lineHeight": "35px", 281 | "fontSize": "25px", 282 | "color": "#8d8d8d" 283 | }, 284 | ".detail": { 285 | "width": "650px", 286 | "height": "90px", 287 | "borderBottomWidth": "1px", 288 | "borderBottomColor": "#f0f0f0" 289 | }, 290 | ".detail-first": { 291 | "marginTop": "65px", 292 | "borderTopWidth": "1px", 293 | "borderTopColor": "#f0f0f0" 294 | }, 295 | ".detail-title": { 296 | "width": "160px", 297 | "paddingLeft": "10px", 298 | "fontSize": "25px", 299 | "color": "#000000" 300 | }, 301 | ".detail-content": { 302 | "fontSize": "25px", 303 | "color": "#8d8d8d" 304 | }, 305 | ".btn": { 306 | "width": "550px", 307 | "height": "86px", 308 | "marginTop": "75px", 309 | "borderRadius": "43px", 310 | "backgroundColor": "#09ba07", 311 | "fontSize": "30px", 312 | "color": "#ffffff" 313 | }, 314 | "#footer": { 315 | "width": "750px", 316 | "position": "fixed", 317 | "bottom": "55px", 318 | "fontSize": "25px", 319 | "color": "#8d8d8d", 320 | "textAlign": "center" 321 | } 322 | } 323 | 324 | /***/ }, 325 | /* 3 */ 326 | /***/ function(module, exports) { 327 | 328 | module.exports = function(module, exports, $app_require$){'use strict'; 329 | 330 | Object.defineProperty(exports, "__esModule", { 331 | value: true 332 | }); 333 | 334 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; 335 | 336 | exports.default = { 337 | props: ['name', 'icon'], 338 | data: { 339 | desc: '即点即用,让你省去下载安装的步骤,立即使用各类服务', 340 | serviceType: '工具类', 341 | subjectInfo: 'xxx有限公司', 342 | copyright: '' 343 | }, 344 | onInit: function onInit() { 345 | this.$page.setTitleBar({ text: this.name }); 346 | }, 347 | createShortcut: function createShortcut() { 348 | this.$app.createShortcut(); 349 | } 350 | }; 351 | 352 | 353 | var moduleOwn = exports.default || module.exports; 354 | var accessors = ['public', 'protected', 'private']; 355 | 356 | if (moduleOwn.data && accessors.some(function (acc) { 357 | return moduleOwn[acc]; 358 | })) { 359 | throw new Error('页面VM对象中的属性data不可与"' + accessors.join(',') + '"同时存在,请使用private替换data名称'); 360 | } else if (!moduleOwn.data) { 361 | moduleOwn.data = {}; 362 | moduleOwn._descriptor = {}; 363 | accessors.forEach(function (acc) { 364 | var accType = _typeof(moduleOwn[acc]); 365 | if (accType === 'object') { 366 | moduleOwn.data = Object.assign(moduleOwn.data, moduleOwn[acc]); 367 | for (var name in moduleOwn[acc]) { 368 | moduleOwn._descriptor[name] = { access: acc }; 369 | } 370 | } else if (accType === 'function') { 371 | console.warn('页面VM对象中的属性' + acc + '的值不能是函数,请使用对象'); 372 | } 373 | }); 374 | }} 375 | 376 | /***/ } 377 | /******/ ]); 378 | }; 379 | if (typeof window === "undefined") { 380 | return createPageHandler(); 381 | } 382 | else { 383 | window.createPageHandler = createPageHandler 384 | } 385 | })(); 386 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /build/About/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///webpack/bootstrap eb081c1406219c276c17","webpack:///./src/About/index.ux?ad64","webpack:///./src/About/index.ux?ed39","webpack:///./src/About/index.ux?b877","webpack:///./src/About/index.ux"],"names":["props","data","desc","serviceType","subjectInfo","copyright","onInit","$page","setTitleBar","text","name","createShortcut","$app","moduleOwn","exports","default","module","accessors","some","acc","Error","join","_descriptor","forEach","accType","Object","assign","access","console","warn"],"mappings":";;;;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED,yCAAwC,0BAA0B;;;;;;;ACblE;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA4B;AAC5B,QAAO;AACP;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,+BAA8B;AAC9B,QAAO;AACP;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,+BAA8B;AAC9B,QAAO;AACP;AACA,MAAK;AACL;AACA;AACA,iBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,mCAAkC;AAClC,YAAW;AACX;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,iBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,mCAAkC;AAClC,YAAW;AACX;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,+BAA8B;AAC9B,QAAO;AACP;AACA;AACA;AACA,E;;;;;;AClKA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;;;;;;;;;mBC7EiB;AACbA,UAAO,CAAC,MAAD,EAAS,MAAT,CADM;AAEbC,SAAM;AACJC,WAAM,2BADF;AAEJC,kBAAa,KAFT;AAGJC,kBAAa,SAHT;AAIJC,gBAAW;AAJP,IAFO;AAQbC,SARa,oBAQH;AAER,UAAKC,KAAL,CAAWC,WAAX,CAAuB,EAAEC,MAAM,KAAKC,IAAb,EAAvB;AACD,IAXY;AAYbC,iBAZa,4BAYK;AAEhB,UAAKC,IAAL,CAAUD,cAAV;AACD;AAfY,E;;;AAkBf,KAAME,YAAYC,QAAQC,OAAR,IAAmBC,OAAOF,OAA5C;AACA,KAAMG,YAAY,CAAC,QAAD,EAAW,WAAX,EAAwB,SAAxB,CAAlB;;AAEA,KAAIJ,UAAUZ,IAAV,IAAkBgB,UAAUC,IAAV,CAAe,UAAUC,GAAV,EAAe;AAAE,UAAON,UAAUM,GAAV,CAAP;AAAuB,EAAvD,CAAtB,EAAgF;AAC9E,SAAM,IAAIC,KAAJ,CAAU,uBAAuBH,UAAUI,IAAV,CAAe,GAAf,CAAvB,GAA6C,0BAAvD,CAAN;AACD,EAFD,MAGK,IAAI,CAACR,UAAUZ,IAAf,EAAqB;AACxBY,aAAUZ,IAAV,GAAiB,EAAjB;AACAY,aAAUS,WAAV,GAAwB,EAAxB;AACAL,aAAUM,OAAV,CAAkB,UAAUJ,GAAV,EAAe;AAC/B,SAAMK,kBAAiBX,UAAUM,GAAV,CAAjB,CAAN;AACA,SAAIK,YAAY,QAAhB,EAA0B;AACxBX,iBAAUZ,IAAV,GAAiBwB,OAAOC,MAAP,CAAcb,UAAUZ,IAAxB,EAA8BY,UAAUM,GAAV,CAA9B,CAAjB;AACA,YAAK,IAAMT,IAAX,IAAmBG,UAAUM,GAAV,CAAnB,EAAmC;AACjCN,mBAAUS,WAAV,CAAsBZ,IAAtB,IAA8B,EAAEiB,QAAQR,GAAV,EAA9B;AACD;AACF,MALD,MAMK,IAAIK,YAAY,UAAhB,EAA4B;AAC/BI,eAAQC,IAAR,CAAa,eAAeV,GAAf,GAAqB,eAAlC;AACD;AACF,IAXD;AAYD,G","file":"About/index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap eb081c1406219c276c17","var $app_template$ = require(\"!!../../node_modules/hap-tools/lib/json-loader.js!../../node_modules/hap-tools/lib/template-loader.js!../../node_modules/hap-tools/lib/fragment-loader.js?index=0&type=templates!./index.ux\")\nvar $app_style$ = require(\"!!../../node_modules/hap-tools/lib/json-loader.js!../../node_modules/hap-tools/lib/style-loader.js?index=0&type=styles!../../node_modules/hap-tools/lib/fragment-loader.js?index=0&type=styles!./index.ux\")\nvar $app_script$ = require(\"!!../../node_modules/hap-tools/lib/script-loader.js!babel-loader?presets[]=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\babel-preset-env&presets=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\babel-preset-env&plugins[]=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\hap-tools\\\\lib\\\\jsx-loader.js&plugins=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\hap-tools\\\\lib\\\\jsx-loader.js&comments=false!../../node_modules/hap-tools/lib/access-loader.js!../../node_modules/hap-tools/lib/fragment-loader.js?index=0&type=scripts!./index.ux?isEntry=true\")\n\n$app_define$('@app-component/index', [], function($app_require$, $app_exports$, $app_module$){\n $app_script$($app_module$, $app_exports$, $app_require$)\n if ($app_exports$.__esModule && $app_exports$.default) {\n $app_module$.exports = $app_exports$.default\n }\n $app_module$.exports.template = $app_template$\n $app_module$.exports.style = $app_style$\n})\n\n$app_bootstrap$('@app-component/index',{ packagerVersion: '0.0.5'})\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/About/index.ux\n// module id = 0\n// module chunks = 0","module.exports = {\n \"type\": \"div\",\n \"attr\": {},\n \"classList\": [\n \"demo-page\"\n ],\n \"children\": [\n {\n \"type\": \"image\",\n \"attr\": {\n \"id\": \"icon\",\n \"src\": function () {return this.icon}\n },\n \"id\": \"icon\"\n },\n {\n \"type\": \"text\",\n \"attr\": {\n \"id\": \"name\",\n \"value\": function () {return this.name}\n },\n \"id\": \"name\"\n },\n {\n \"type\": \"div\",\n \"attr\": {\n \"id\": \"tags\"\n },\n \"id\": \"tags\",\n \"children\": [\n {\n \"type\": \"text\",\n \"attr\": {\n \"value\": \"无安装\"\n },\n \"classList\": [\n \"tag\"\n ]\n },\n {\n \"type\": \"text\",\n \"attr\": {\n \"value\": \"|\"\n },\n \"classList\": [\n \"gap\"\n ]\n },\n {\n \"type\": \"text\",\n \"attr\": {\n \"value\": \"体积小\"\n },\n \"classList\": [\n \"tag\"\n ]\n },\n {\n \"type\": \"text\",\n \"attr\": {\n \"value\": \"|\"\n },\n \"classList\": [\n \"gap\"\n ]\n },\n {\n \"type\": \"text\",\n \"attr\": {\n \"value\": \"一步直达\"\n },\n \"classList\": [\n \"tag\"\n ]\n }\n ]\n },\n {\n \"type\": \"text\",\n \"attr\": {\n \"id\": \"desc\",\n \"value\": function () {return this.desc}\n },\n \"id\": \"desc\"\n },\n {\n \"type\": \"div\",\n \"attr\": {},\n \"classList\": [\n \"detail\",\n \"detail-first\"\n ],\n \"children\": [\n {\n \"type\": \"text\",\n \"attr\": {\n \"value\": \"服务类型\"\n },\n \"classList\": [\n \"detail-title\"\n ]\n },\n {\n \"type\": \"text\",\n \"attr\": {\n \"value\": function () {return this.serviceType}\n },\n \"classList\": [\n \"detail-content\"\n ]\n }\n ]\n },\n {\n \"type\": \"div\",\n \"attr\": {},\n \"classList\": [\n \"detail\"\n ],\n \"children\": [\n {\n \"type\": \"text\",\n \"attr\": {\n \"value\": \"主体信息\"\n },\n \"classList\": [\n \"detail-title\"\n ]\n },\n {\n \"type\": \"text\",\n \"attr\": {\n \"value\": function () {return this.subjectInfo}\n },\n \"classList\": [\n \"detail-content\"\n ]\n }\n ]\n },\n {\n \"type\": \"input\",\n \"attr\": {\n \"type\": \"button\",\n \"value\": \"创建快捷方式\"\n },\n \"classList\": [\n \"btn\"\n ],\n \"events\": {\n \"click\": \"createShortcut\"\n }\n },\n {\n \"type\": \"text\",\n \"attr\": {\n \"id\": \"footer\",\n \"value\": function () {return this.copyright}\n },\n \"id\": \"footer\"\n }\n ]\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/hap-tools/lib/json-loader.js!./~/hap-tools/lib/template-loader.js!./~/hap-tools/lib/fragment-loader.js?index=0&type=templates!./src/About/index.ux\n// module id = 1\n// module chunks = 0","module.exports = {\n \".demo-page\": {\n \"flexDirection\": \"column\",\n \"alignItems\": \"center\"\n },\n \"#icon\": {\n \"marginTop\": \"90px\",\n \"width\": \"134px\",\n \"height\": \"134px\",\n \"borderRadius\": \"10px\",\n \"borderTopWidth\": \"1px\",\n \"borderRightWidth\": \"1px\",\n \"borderBottomWidth\": \"1px\",\n \"borderLeftWidth\": \"1px\",\n \"borderStyle\": \"solid\",\n \"borderTopColor\": \"#8d8d8d\",\n \"borderRightColor\": \"#8d8d8d\",\n \"borderBottomColor\": \"#8d8d8d\",\n \"borderLeftColor\": \"#8d8d8d\"\n },\n \"#name\": {\n \"marginTop\": \"20px\",\n \"fontSize\": \"36px\",\n \"color\": \"#000000\"\n },\n \"#tags\": {\n \"marginTop\": \"22px\",\n \"alignItems\": \"center\"\n },\n \".tag\": {\n \"paddingLeft\": \"20px\",\n \"paddingRight\": \"20px\",\n \"fontSize\": \"28px\",\n \"color\": \"#2a9700\"\n },\n \".gap\": {\n \"fontSize\": \"22px\",\n \"color\": \"#b2b2b2\"\n },\n \"#desc\": {\n \"width\": \"650px\",\n \"marginTop\": \"40px\",\n \"lineHeight\": \"35px\",\n \"fontSize\": \"25px\",\n \"color\": \"#8d8d8d\"\n },\n \".detail\": {\n \"width\": \"650px\",\n \"height\": \"90px\",\n \"borderBottomWidth\": \"1px\",\n \"borderBottomColor\": \"#f0f0f0\"\n },\n \".detail-first\": {\n \"marginTop\": \"65px\",\n \"borderTopWidth\": \"1px\",\n \"borderTopColor\": \"#f0f0f0\"\n },\n \".detail-title\": {\n \"width\": \"160px\",\n \"paddingLeft\": \"10px\",\n \"fontSize\": \"25px\",\n \"color\": \"#000000\"\n },\n \".detail-content\": {\n \"fontSize\": \"25px\",\n \"color\": \"#8d8d8d\"\n },\n \".btn\": {\n \"width\": \"550px\",\n \"height\": \"86px\",\n \"marginTop\": \"75px\",\n \"borderRadius\": \"43px\",\n \"backgroundColor\": \"#09ba07\",\n \"fontSize\": \"30px\",\n \"color\": \"#ffffff\"\n },\n \"#footer\": {\n \"width\": \"750px\",\n \"position\": \"fixed\",\n \"bottom\": \"55px\",\n \"fontSize\": \"25px\",\n \"color\": \"#8d8d8d\",\n \"textAlign\": \"center\"\n }\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/hap-tools/lib/json-loader.js!./~/hap-tools/lib/style-loader.js?index=0&type=styles!./~/hap-tools/lib/fragment-loader.js?index=0&type=styles!./src/About/index.ux\n// module id = 2\n// module chunks = 0","/**\n * 默认的菜单页(可自定义)\n * name默认为manifest文件中的name字段\n * icon默认为manifest文件中的icon字段\n * 若需修改页面中文本,请修改VM data中对应变量\n * 注意:使用加载器测试`创建桌面快捷方式`功能时,需要进入系统设置->权限管理->开启应用加载器的`桌面快捷方式`权限,才能保存到桌面。应用上线后可自动获取`桌面快捷方式`权限\n */\n export default {\n props: ['name', 'icon'],\n data: {\n desc: '即点即用,让你省去下载安装的步骤,立即使用各类服务',\n serviceType: '工具类',\n subjectInfo: 'xxx有限公司',\n copyright: ''\n },\n onInit () {\n // 设置标题栏\n this.$page.setTitleBar({ text: this.name })\n },\n createShortcut () {\n // 创建快捷方式\n this.$app.createShortcut()\n }\n }\n\n const moduleOwn = exports.default || module.exports\n const accessors = ['public', 'protected', 'private']\n\n if (moduleOwn.data && accessors.some(function (acc) { return moduleOwn[acc] })) {\n throw new Error('页面VM对象中的属性data不可与\"' + accessors.join(',') + '\"同时存在,请使用private替换data名称')\n }\n else if (!moduleOwn.data) {\n moduleOwn.data = {}\n moduleOwn._descriptor = {}\n accessors.forEach(function (acc) {\n const accType = typeof moduleOwn[acc]\n if (accType === 'object') {\n moduleOwn.data = Object.assign(moduleOwn.data, moduleOwn[acc])\n for (const name in moduleOwn[acc]) {\n moduleOwn._descriptor[name] = { access: acc }\n }\n }\n else if (accType === 'function') {\n console.warn('页面VM对象中的属性' + acc + '的值不能是函数,请使用对象')\n }\n })\n }\n\n\n\n// WEBPACK FOOTER //\n// ./src/About/index.ux?isEntry=true"],"sourceRoot":""} -------------------------------------------------------------------------------- /build/Common/Image/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/build/Common/Image/back.png -------------------------------------------------------------------------------- /build/Common/Image/contact_list_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/build/Common/Image/contact_list_normal.png -------------------------------------------------------------------------------- /build/Common/Image/contact_list_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/build/Common/Image/contact_list_pressed.png -------------------------------------------------------------------------------- /build/Common/Image/dingyue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/build/Common/Image/dingyue.png -------------------------------------------------------------------------------- /build/Common/Image/find_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/build/Common/Image/find_normal.png -------------------------------------------------------------------------------- /build/Common/Image/find_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/build/Common/Image/find_pressed.png -------------------------------------------------------------------------------- /build/Common/Image/icon_de_nearby.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/build/Common/Image/icon_de_nearby.png -------------------------------------------------------------------------------- /build/Common/Image/icon_de_ping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/build/Common/Image/icon_de_ping.png -------------------------------------------------------------------------------- /build/Common/Image/icon_de_saoyisao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/build/Common/Image/icon_de_saoyisao.png -------------------------------------------------------------------------------- /build/Common/Image/icon_de_yao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/build/Common/Image/icon_de_yao.png -------------------------------------------------------------------------------- /build/Common/Image/icon_me_card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/build/Common/Image/icon_me_card.png -------------------------------------------------------------------------------- /build/Common/Image/icon_me_collect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/build/Common/Image/icon_me_collect.png -------------------------------------------------------------------------------- /build/Common/Image/icon_me_money.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/build/Common/Image/icon_me_money.png -------------------------------------------------------------------------------- /build/Common/Image/icon_me_photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/build/Common/Image/icon_me_photo.png -------------------------------------------------------------------------------- /build/Common/Image/icon_me_setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/build/Common/Image/icon_me_setting.png -------------------------------------------------------------------------------- /build/Common/Image/icon_me_smail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/build/Common/Image/icon_me_smail.png -------------------------------------------------------------------------------- /build/Common/Image/lanucher.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/build/Common/Image/lanucher.jpg -------------------------------------------------------------------------------- /build/Common/Image/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/build/Common/Image/logo.png -------------------------------------------------------------------------------- /build/Common/Image/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/build/Common/Image/plus.png -------------------------------------------------------------------------------- /build/Common/Image/profile_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/build/Common/Image/profile_normal.png -------------------------------------------------------------------------------- /build/Common/Image/profile_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/build/Common/Image/profile_pressed.png -------------------------------------------------------------------------------- /build/Common/Image/qr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/build/Common/Image/qr.png -------------------------------------------------------------------------------- /build/Common/Image/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/build/Common/Image/search.png -------------------------------------------------------------------------------- /build/Common/Image/v2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/build/Common/Image/v2.png -------------------------------------------------------------------------------- /build/Common/Image/wechat.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/build/Common/Image/wechat.ttf -------------------------------------------------------------------------------- /build/Common/Image/weixin_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/build/Common/Image/weixin_normal.png -------------------------------------------------------------------------------- /build/Common/Image/weixin_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/build/Common/Image/weixin_pressed.png -------------------------------------------------------------------------------- /build/Demo/comm/father.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | 3 | var createPageHandler = function() { 4 | return /******/ (function(modules) { // webpackBootstrap 5 | /******/ // The module cache 6 | /******/ var installedModules = {}; 7 | /******/ 8 | /******/ // The require function 9 | /******/ function __webpack_require__(moduleId) { 10 | /******/ 11 | /******/ // Check if module is in cache 12 | /******/ if(installedModules[moduleId]) 13 | /******/ return installedModules[moduleId].exports; 14 | /******/ 15 | /******/ // Create a new module (and put it into the cache) 16 | /******/ var module = installedModules[moduleId] = { 17 | /******/ exports: {}, 18 | /******/ id: moduleId, 19 | /******/ loaded: false 20 | /******/ }; 21 | /******/ 22 | /******/ // Execute the module function 23 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 24 | /******/ 25 | /******/ // Flag the module as loaded 26 | /******/ module.loaded = true; 27 | /******/ 28 | /******/ // Return the exports of the module 29 | /******/ return module.exports; 30 | /******/ } 31 | /******/ 32 | /******/ 33 | /******/ // expose the modules object (__webpack_modules__) 34 | /******/ __webpack_require__.m = modules; 35 | /******/ 36 | /******/ // expose the module cache 37 | /******/ __webpack_require__.c = installedModules; 38 | /******/ 39 | /******/ // __webpack_public_path__ 40 | /******/ __webpack_require__.p = ""; 41 | /******/ 42 | /******/ // Load entry module and return exports 43 | /******/ return __webpack_require__(0); 44 | /******/ }) 45 | /************************************************************************/ 46 | /******/ ([ 47 | /* 0 */ 48 | /***/ function(module, exports, __webpack_require__) { 49 | 50 | __webpack_require__(4) 51 | var $app_template$ = __webpack_require__(8) 52 | var $app_style$ = __webpack_require__(9) 53 | var $app_script$ = __webpack_require__(10) 54 | 55 | $app_define$('@app-component/father', [], function($app_require$, $app_exports$, $app_module$){ 56 | $app_script$($app_module$, $app_exports$, $app_require$) 57 | if ($app_exports$.__esModule && $app_exports$.default) { 58 | $app_module$.exports = $app_exports$.default 59 | } 60 | $app_module$.exports.template = $app_template$ 61 | $app_module$.exports.style = $app_style$ 62 | }) 63 | 64 | $app_bootstrap$('@app-component/father',{ packagerVersion: '0.0.5'}) 65 | 66 | 67 | /***/ }, 68 | /* 1 */, 69 | /* 2 */, 70 | /* 3 */, 71 | /* 4 */ 72 | /***/ function(module, exports, __webpack_require__) { 73 | 74 | var $app_template$ = __webpack_require__(5) 75 | var $app_style$ = __webpack_require__(6) 76 | var $app_script$ = __webpack_require__(7) 77 | 78 | $app_define$('@app-component/son', [], function($app_require$, $app_exports$, $app_module$){ 79 | $app_script$($app_module$, $app_exports$, $app_require$) 80 | if ($app_exports$.__esModule && $app_exports$.default) { 81 | $app_module$.exports = $app_exports$.default 82 | } 83 | $app_module$.exports.template = $app_template$ 84 | $app_module$.exports.style = $app_style$ 85 | }) 86 | 87 | 88 | /***/ }, 89 | /* 5 */ 90 | /***/ function(module, exports) { 91 | 92 | module.exports = { 93 | "type": "div", 94 | "attr": { 95 | "id": "main" 96 | }, 97 | "id": "main", 98 | "children": [ 99 | { 100 | "type": "text", 101 | "attr": { 102 | "value": "son area: " 103 | } 104 | }, 105 | { 106 | "type": "div", 107 | "attr": {}, 108 | "classList": [ 109 | "say" 110 | ], 111 | "children": [ 112 | { 113 | "type": "text", 114 | "attr": { 115 | "value": function () {return 'father say : ' + (this.say)} 116 | } 117 | } 118 | ] 119 | }, 120 | { 121 | "type": "div", 122 | "attr": {}, 123 | "children": [ 124 | { 125 | "type": "input", 126 | "attr": { 127 | "type": "button", 128 | "value": "say hi" 129 | }, 130 | "classList": [ 131 | "btn" 132 | ], 133 | "events": { 134 | "click": function (evt) {this.sayFather('hi',evt)} 135 | } 136 | }, 137 | { 138 | "type": "input", 139 | "attr": { 140 | "type": "button", 141 | "value": "say father" 142 | }, 143 | "classList": [ 144 | "btn" 145 | ], 146 | "events": { 147 | "click": function (evt) {this.sayFather('father',evt)} 148 | } 149 | }, 150 | { 151 | "type": "input", 152 | "attr": { 153 | "type": "button", 154 | "value": "BroadcastChannel say father" 155 | }, 156 | "classList": [ 157 | "btn" 158 | ], 159 | "events": { 160 | "click": function (evt) {this.sayFather2('father',evt)} 161 | } 162 | } 163 | ] 164 | } 165 | ] 166 | } 167 | 168 | /***/ }, 169 | /* 6 */ 170 | /***/ function(module, exports) { 171 | 172 | module.exports = { 173 | "#main": { 174 | "width": "100%", 175 | "height": "300px", 176 | "borderTopWidth": "1px", 177 | "borderRightWidth": "1px", 178 | "borderBottomWidth": "1px", 179 | "borderLeftWidth": "1px", 180 | "borderStyle": "solid", 181 | "flexDirection": "column" 182 | }, 183 | ".btn": { 184 | "height": "80px", 185 | "backgroundColor": "#09ba07", 186 | "fontSize": "30px", 187 | "color": "#ffffff", 188 | "marginLeft": "20px", 189 | "marginBottom": "10px", 190 | "paddingTop": "10px", 191 | "paddingRight": "10px", 192 | "paddingBottom": "10px", 193 | "paddingLeft": "10px" 194 | }, 195 | ".say": { 196 | "width": "100%", 197 | "flexGrow": 1, 198 | "justifyContent": "center" 199 | } 200 | } 201 | 202 | /***/ }, 203 | /* 7 */ 204 | /***/ function(module, exports) { 205 | 206 | module.exports = function(module, exports, $app_require$){"use strict"; 207 | 208 | Object.defineProperty(exports, "__esModule", { 209 | value: true 210 | }); 211 | 212 | var _system = $app_require$("@app-module/system.router"); 213 | 214 | var _system2 = _interopRequireDefault(_system); 215 | 216 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 217 | 218 | exports.default = { 219 | 220 | data: { 221 | say: "", 222 | sayEvent: null 223 | }, 224 | sayMsg: function sayMsg(evt) { 225 | 226 | this.say = evt.detail.msg; 227 | }, 228 | onInit: function onInit() { 229 | this.$on("fatherSay", this.sayMsg); 230 | 231 | this.sayEvent = new BroadcastChannel('say'); 232 | var _this = this; 233 | this.sayEvent.onmessage = function (event) { 234 | console.log('son say'); 235 | _this.say = event.data; 236 | }; 237 | }, 238 | sayFather: function sayFather(t) { 239 | this.$emit('sonSay', { 240 | msg: t 241 | }); 242 | }, 243 | sayFather2: function sayFather2(t) { 244 | 245 | this.sayEvent.postMessage(t); 246 | }, 247 | onDestroy: function onDestroy() { 248 | this.sayEvent.close(); 249 | } 250 | };} 251 | 252 | /***/ }, 253 | /* 8 */ 254 | /***/ function(module, exports) { 255 | 256 | module.exports = { 257 | "type": "div", 258 | "attr": { 259 | "id": "main" 260 | }, 261 | "id": "main", 262 | "children": [ 263 | { 264 | "type": "son", 265 | "attr": {}, 266 | "events": { 267 | "son-say": "sayMsg" 268 | } 269 | }, 270 | { 271 | "type": "div", 272 | "attr": {}, 273 | "classList": [ 274 | "father" 275 | ], 276 | "children": [ 277 | { 278 | "type": "text", 279 | "attr": { 280 | "value": "father area: " 281 | } 282 | }, 283 | { 284 | "type": "div", 285 | "attr": {}, 286 | "classList": [ 287 | "say" 288 | ], 289 | "children": [ 290 | { 291 | "type": "text", 292 | "attr": { 293 | "value": function () {return 'son say:' + (this.say)} 294 | } 295 | } 296 | ] 297 | } 298 | ] 299 | } 300 | ] 301 | } 302 | 303 | /***/ }, 304 | /* 9 */ 305 | /***/ function(module, exports) { 306 | 307 | module.exports = { 308 | "#main": { 309 | "flexDirection": "column" 310 | }, 311 | ".father": { 312 | "width": "100%", 313 | "marginTop": "20px", 314 | "height": "300px", 315 | "borderTopWidth": "1px", 316 | "borderRightWidth": "1px", 317 | "borderBottomWidth": "1px", 318 | "borderLeftWidth": "1px", 319 | "borderStyle": "solid", 320 | "flexDirection": "column" 321 | }, 322 | ".say": { 323 | "width": "100%", 324 | "flexGrow": 1, 325 | "justifyContent": "center" 326 | } 327 | } 328 | 329 | /***/ }, 330 | /* 10 */ 331 | /***/ function(module, exports) { 332 | 333 | module.exports = function(module, exports, $app_require$){'use strict'; 334 | 335 | Object.defineProperty(exports, "__esModule", { 336 | value: true 337 | }); 338 | 339 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; 340 | 341 | var _system = $app_require$('@app-module/system.router'); 342 | 343 | var _system2 = _interopRequireDefault(_system); 344 | 345 | var _system3 = $app_require$('@app-module/system.prompt'); 346 | 347 | var _system4 = _interopRequireDefault(_system3); 348 | 349 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 350 | 351 | exports.default = { 352 | data: { 353 | say: "", 354 | sayEvent: null 355 | }, 356 | onInit: function onInit() { 357 | this.$on("sonSay", this.sayMsg); 358 | this.sayEvent = new BroadcastChannel('say'); 359 | var _this = this; 360 | this.sayEvent.onmessage = function (event) { 361 | console.log('fater say'); 362 | _this.say = event.data; 363 | _this.sayEvent.postMessage('im fater'); 364 | }; 365 | }, 366 | sayMsg: function sayMsg(evt) { 367 | 368 | this.say = evt.detail.msg; 369 | 370 | if (this.say === 'father') { 371 | this.$broadcast('fatherSay', { 372 | msg: "son" 373 | }); 374 | } 375 | }, 376 | onDestroy: function onDestroy() { 377 | this.sayEvent.close(); 378 | } 379 | }; 380 | 381 | 382 | var moduleOwn = exports.default || module.exports; 383 | var accessors = ['public', 'protected', 'private']; 384 | 385 | if (moduleOwn.data && accessors.some(function (acc) { 386 | return moduleOwn[acc]; 387 | })) { 388 | throw new Error('页面VM对象中的属性data不可与"' + accessors.join(',') + '"同时存在,请使用private替换data名称'); 389 | } else if (!moduleOwn.data) { 390 | moduleOwn.data = {}; 391 | moduleOwn._descriptor = {}; 392 | accessors.forEach(function (acc) { 393 | var accType = _typeof(moduleOwn[acc]); 394 | if (accType === 'object') { 395 | moduleOwn.data = Object.assign(moduleOwn.data, moduleOwn[acc]); 396 | for (var name in moduleOwn[acc]) { 397 | moduleOwn._descriptor[name] = { access: acc }; 398 | } 399 | } else if (accType === 'function') { 400 | console.warn('页面VM对象中的属性' + acc + '的值不能是函数,请使用对象'); 401 | } 402 | }); 403 | }} 404 | 405 | /***/ } 406 | /******/ ]); 407 | }; 408 | if (typeof window === "undefined") { 409 | return createPageHandler(); 410 | } 411 | else { 412 | window.createPageHandler = createPageHandler 413 | } 414 | })(); 415 | //# sourceMappingURL=father.js.map -------------------------------------------------------------------------------- /build/Demo/comm/father.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///webpack/bootstrap 3872ce8122213dcfa6ca","webpack:///./src/Demo/comm/father.ux?eb87","webpack:///./src/Demo/comm/son.ux?09cd","webpack:///./src/Demo/comm/son.ux?d292","webpack:///./src/Demo/comm/son.ux?3ba5","webpack:///./src/Demo/comm/son.ux","webpack:///./src/Demo/comm/father.ux?f67f","webpack:///./src/Demo/comm/father.ux?e585","webpack:///./src/Demo/comm/father.ux"],"names":["data","say","sayEvent","sayMsg","evt","detail","msg","onInit","$on","BroadcastChannel","_this","onmessage","event","console","log","sayFather","t","$emit","sayFather2","postMessage","onDestroy","close","$broadcast","moduleOwn","exports","default","module","accessors","some","acc","Error","join","_descriptor","forEach","accType","Object","assign","name","access","warn"],"mappings":";;;;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED,0CAAyC,0BAA0B;;;;;;;;;;ACdnE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;;;;;;ACXD;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,iBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,iBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,sCAAqC;AACrC;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,sCAAqC;AACrC;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,sCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA,E;;;;;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA,E;;;;;;;;;;;;AC5BA;;;;;;mBACmB;;AAEXA,WAAM;AACFC,cAAK,EADH;AAEFC,mBAAS;AAFP,MAFK;AAMXC,WANW,kBAMJC,GANI,EAMC;;AAER,cAAKH,GAAL,GAAWG,IAAIC,MAAJ,CAAWC,GAAtB;AAEH,MAVU;AAWXC,WAXW,oBAWF;AACL,cAAKC,GAAL,CAAS,WAAT,EAAsB,KAAKL,MAA3B;;AAEA,cAAKD,QAAL,GAAgB,IAAIO,gBAAJ,CAAqB,KAArB,CAAhB;AACA,aAAMC,QAAM,IAAZ;AACA,cAAKR,QAAL,CAAcS,SAAd,GAA0B,UAAUC,KAAV,EAAiB;AACvCC,qBAAQC,GAAR,CAAY,SAAZ;AACAJ,mBAAMT,GAAN,GAAYW,MAAMZ,IAAlB;AACH,UAHD;AAIH,MApBU;AAqBXe,cArBW,qBAqBDC,CArBC,EAqBE;AACR,cAAKC,KAAL,CAAW,QAAX,EAAqB;AAClBX,kBAAKU;AADa,UAArB;AAOJ,MA7BU;AA8BXE,eA9BW,sBA8BAF,CA9BA,EA8BG;;AAEV,cAAKd,QAAL,CAAciB,WAAd,CAA0BH,CAA1B;AACH,MAjCU;AAkCXI,cAlCW,uBAkCA;AACP,cAAKlB,QAAL,CAAcmB,KAAd;AACH;AApCU,E;;;;;;ACDnB;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,iBAAgB;AAChB;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,iBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,qBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;AC7CA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA,E;;;;;;;;;;;;;;ACpBA;;;;AACI;;;;;;mBACe;AACXrB,WAAM;AACFC,cAAK,EADH;AAEFC,mBAAS;AAFP,MADK;AAKXK,WALW,oBAKF;AACL,cAAKC,GAAL,CAAS,QAAT,EAAmB,KAAKL,MAAxB;AACA,cAAKD,QAAL,GAAiB,IAAIO,gBAAJ,CAAqB,KAArB,CAAjB;AACA,aAAMC,QAAQ,IAAd;AACA,cAAKR,QAAL,CAAeS,SAAf,GAA2B,UAAUC,KAAV,EAAiB;AACxCC,qBAAQC,GAAR,CAAY,WAAZ;AACAJ,mBAAMT,GAAN,GAAYW,MAAMZ,IAAlB;AACAU,mBAAMR,QAAN,CAAeiB,WAAf,CAA2B,UAA3B;AACH,UAJD;AAKH,MAdU;AAeXhB,WAfW,kBAeJC,GAfI,EAeC;;AAER,cAAKH,GAAL,GAAWG,IAAIC,MAAJ,CAAWC,GAAtB;;AAEA,aAAI,KAAKL,GAAL,KAAa,QAAjB,EAA2B;AACvB,kBAAKqB,UAAL,CAAgB,WAAhB,EAA6B;AACzBhB,sBAAK;AADoB,cAA7B;AAGH;AAEJ,MAzBU;AA0BXc,cA1BW,uBA0BA;AACP,cAAKlB,QAAL,CAAemB,KAAf;AACH;AA5BU,E;;;AAgCjB,KAAME,YAAYC,QAAQC,OAAR,IAAmBC,OAAOF,OAA5C;AACA,KAAMG,YAAY,CAAC,QAAD,EAAW,WAAX,EAAwB,SAAxB,CAAlB;;AAEA,KAAIJ,UAAUvB,IAAV,IAAkB2B,UAAUC,IAAV,CAAe,UAAUC,GAAV,EAAe;AAAE,YAAON,UAAUM,GAAV,CAAP;AAAuB,EAAvD,CAAtB,EAAgF;AAC9E,WAAM,IAAIC,KAAJ,CAAU,uBAAuBH,UAAUI,IAAV,CAAe,GAAf,CAAvB,GAA6C,0BAAvD,CAAN;AACD,EAFD,MAGK,IAAI,CAACR,UAAUvB,IAAf,EAAqB;AACxBuB,eAAUvB,IAAV,GAAiB,EAAjB;AACAuB,eAAUS,WAAV,GAAwB,EAAxB;AACAL,eAAUM,OAAV,CAAkB,UAAUJ,GAAV,EAAe;AAC/B,aAAMK,kBAAiBX,UAAUM,GAAV,CAAjB,CAAN;AACA,aAAIK,YAAY,QAAhB,EAA0B;AACxBX,uBAAUvB,IAAV,GAAiBmC,OAAOC,MAAP,CAAcb,UAAUvB,IAAxB,EAA8BuB,UAAUM,GAAV,CAA9B,CAAjB;AACA,kBAAK,IAAMQ,IAAX,IAAmBd,UAAUM,GAAV,CAAnB,EAAmC;AACjCN,2BAAUS,WAAV,CAAsBK,IAAtB,IAA8B,EAAEC,QAAQT,GAAV,EAA9B;AACD;AACF,UALD,MAMK,IAAIK,YAAY,UAAhB,EAA4B;AAC/BrB,qBAAQ0B,IAAR,CAAa,eAAeV,GAAf,GAAqB,eAAlC;AACD;AACF,MAXD;AAYD,G","file":"Demo/comm/father.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 3872ce8122213dcfa6ca","require(\"!!../../../node_modules/hap-tools/lib/loader.js?type=component!./son?name=son\")\nvar $app_template$ = require(\"!!../../../node_modules/hap-tools/lib/json-loader.js!../../../node_modules/hap-tools/lib/template-loader.js!../../../node_modules/hap-tools/lib/fragment-loader.js?index=0&type=templates!./father.ux\")\nvar $app_style$ = require(\"!!../../../node_modules/hap-tools/lib/json-loader.js!../../../node_modules/hap-tools/lib/style-loader.js?index=0&type=styles!../../../node_modules/hap-tools/lib/fragment-loader.js?index=0&type=styles!./father.ux\")\nvar $app_script$ = require(\"!!../../../node_modules/hap-tools/lib/script-loader.js!babel-loader?presets[]=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\babel-preset-env&presets=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\babel-preset-env&plugins[]=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\hap-tools\\\\lib\\\\jsx-loader.js&plugins=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\hap-tools\\\\lib\\\\jsx-loader.js&comments=false!../../../node_modules/hap-tools/lib/access-loader.js!../../../node_modules/hap-tools/lib/fragment-loader.js?index=0&type=scripts!./father.ux?isEntry=true\")\n\n$app_define$('@app-component/father', [], function($app_require$, $app_exports$, $app_module$){\n $app_script$($app_module$, $app_exports$, $app_require$)\n if ($app_exports$.__esModule && $app_exports$.default) {\n $app_module$.exports = $app_exports$.default\n }\n $app_module$.exports.template = $app_template$\n $app_module$.exports.style = $app_style$\n})\n\n$app_bootstrap$('@app-component/father',{ packagerVersion: '0.0.5'})\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/Demo/comm/father.ux\n// module id = 0\n// module chunks = 1","var $app_template$ = require(\"!!../../../node_modules/hap-tools/lib/json-loader.js!../../../node_modules/hap-tools/lib/template-loader.js!../../../node_modules/hap-tools/lib/fragment-loader.js?index=0&type=templates!./son.ux\")\nvar $app_style$ = require(\"!!../../../node_modules/hap-tools/lib/json-loader.js!../../../node_modules/hap-tools/lib/style-loader.js?index=0&type=styles!../../../node_modules/hap-tools/lib/fragment-loader.js?index=0&type=styles!./son.ux\")\nvar $app_script$ = require(\"!!../../../node_modules/hap-tools/lib/script-loader.js!babel-loader?presets[]=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\babel-preset-env&presets=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\babel-preset-env&plugins[]=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\hap-tools\\\\lib\\\\jsx-loader.js&plugins=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\hap-tools\\\\lib\\\\jsx-loader.js&comments=false!../../../node_modules/hap-tools/lib/access-loader.js!../../../node_modules/hap-tools/lib/fragment-loader.js?index=0&type=scripts!./son.ux?isEntry=false\")\n\n$app_define$('@app-component/son', [], function($app_require$, $app_exports$, $app_module$){\n $app_script$($app_module$, $app_exports$, $app_require$)\n if ($app_exports$.__esModule && $app_exports$.default) {\n $app_module$.exports = $app_exports$.default\n }\n $app_module$.exports.template = $app_template$\n $app_module$.exports.style = $app_style$\n})\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/hap-tools/lib/loader.js?type=component!./src/Demo/comm/son.ux?name=son\n// module id = 4\n// module chunks = 1","module.exports = {\n \"type\": \"div\",\n \"attr\": {\n \"id\": \"main\"\n },\n \"id\": \"main\",\n \"children\": [\n {\n \"type\": \"text\",\n \"attr\": {\n \"value\": \"son area: \"\n }\n },\n {\n \"type\": \"div\",\n \"attr\": {},\n \"classList\": [\n \"say\"\n ],\n \"children\": [\n {\n \"type\": \"text\",\n \"attr\": {\n \"value\": function () {return 'father say : ' + (this.say)}\n }\n }\n ]\n },\n {\n \"type\": \"div\",\n \"attr\": {},\n \"children\": [\n {\n \"type\": \"input\",\n \"attr\": {\n \"type\": \"button\",\n \"value\": \"say hi\"\n },\n \"classList\": [\n \"btn\"\n ],\n \"events\": {\n \"click\": function (evt) {this.sayFather('hi',evt)}\n }\n },\n {\n \"type\": \"input\",\n \"attr\": {\n \"type\": \"button\",\n \"value\": \"say father\"\n },\n \"classList\": [\n \"btn\"\n ],\n \"events\": {\n \"click\": function (evt) {this.sayFather('father',evt)}\n }\n },\n {\n \"type\": \"input\",\n \"attr\": {\n \"type\": \"button\",\n \"value\": \"BroadcastChannel say father\"\n },\n \"classList\": [\n \"btn\"\n ],\n \"events\": {\n \"click\": function (evt) {this.sayFather2('father',evt)}\n }\n }\n ]\n }\n ]\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/hap-tools/lib/json-loader.js!./~/hap-tools/lib/template-loader.js!./~/hap-tools/lib/fragment-loader.js?index=0&type=templates!./src/Demo/comm/son.ux\n// module id = 5\n// module chunks = 1","module.exports = {\n \"#main\": {\n \"width\": \"100%\",\n \"height\": \"300px\",\n \"borderTopWidth\": \"1px\",\n \"borderRightWidth\": \"1px\",\n \"borderBottomWidth\": \"1px\",\n \"borderLeftWidth\": \"1px\",\n \"borderStyle\": \"solid\",\n \"flexDirection\": \"column\"\n },\n \".btn\": {\n \"height\": \"80px\",\n \"backgroundColor\": \"#09ba07\",\n \"fontSize\": \"30px\",\n \"color\": \"#ffffff\",\n \"marginLeft\": \"20px\",\n \"marginBottom\": \"10px\",\n \"paddingTop\": \"10px\",\n \"paddingRight\": \"10px\",\n \"paddingBottom\": \"10px\",\n \"paddingLeft\": \"10px\"\n },\n \".say\": {\n \"width\": \"100%\",\n \"flexGrow\": 1,\n \"justifyContent\": \"center\"\n }\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/hap-tools/lib/json-loader.js!./~/hap-tools/lib/style-loader.js?index=0&type=styles!./~/hap-tools/lib/fragment-loader.js?index=0&type=styles!./src/Demo/comm/son.ux\n// module id = 6\n// module chunks = 1","import router from '@system.router'\r\n export default {\r\n\r\n data: {\r\n say: \"\",\r\n sayEvent:null\r\n },\r\n sayMsg(evt) {\r\n\r\n this.say = evt.detail.msg\r\n\r\n },\r\n onInit() {\r\n this.$on(\"fatherSay\", this.sayMsg);\r\n\r\n this.sayEvent = new BroadcastChannel('say')\r\n const _this=this;\r\n this.sayEvent.onmessage = function (event) {\r\n console.log('son say')\r\n _this.say = event.data\r\n }\r\n },\r\n sayFather(t) {\r\n this.$emit('sonSay', {\r\n msg: t\r\n })\r\n\r\n //this.$dispath('sonSay', {\r\n // msg: t\r\n // })\r\n },\r\n sayFather2(t) {\r\n \r\n this.sayEvent.postMessage(t)\r\n },\r\n onDestroy(){\r\n this.sayEvent.close()\r\n }\r\n\r\n\r\n }\n\n\n// WEBPACK FOOTER //\n// ./src/Demo/comm/son.ux?isEntry=false","module.exports = {\n \"type\": \"div\",\n \"attr\": {\n \"id\": \"main\"\n },\n \"id\": \"main\",\n \"children\": [\n {\n \"type\": \"son\",\n \"attr\": {},\n \"events\": {\n \"son-say\": \"sayMsg\"\n }\n },\n {\n \"type\": \"div\",\n \"attr\": {},\n \"classList\": [\n \"father\"\n ],\n \"children\": [\n {\n \"type\": \"text\",\n \"attr\": {\n \"value\": \"father area: \"\n }\n },\n {\n \"type\": \"div\",\n \"attr\": {},\n \"classList\": [\n \"say\"\n ],\n \"children\": [\n {\n \"type\": \"text\",\n \"attr\": {\n \"value\": function () {return 'son say:' + (this.say)}\n }\n }\n ]\n }\n ]\n }\n ]\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/hap-tools/lib/json-loader.js!./~/hap-tools/lib/template-loader.js!./~/hap-tools/lib/fragment-loader.js?index=0&type=templates!./src/Demo/comm/father.ux\n// module id = 8\n// module chunks = 1","module.exports = {\n \"#main\": {\n \"flexDirection\": \"column\"\n },\n \".father\": {\n \"width\": \"100%\",\n \"marginTop\": \"20px\",\n \"height\": \"300px\",\n \"borderTopWidth\": \"1px\",\n \"borderRightWidth\": \"1px\",\n \"borderBottomWidth\": \"1px\",\n \"borderLeftWidth\": \"1px\",\n \"borderStyle\": \"solid\",\n \"flexDirection\": \"column\"\n },\n \".say\": {\n \"width\": \"100%\",\n \"flexGrow\": 1,\n \"justifyContent\": \"center\"\n }\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/hap-tools/lib/json-loader.js!./~/hap-tools/lib/style-loader.js?index=0&type=styles!./~/hap-tools/lib/fragment-loader.js?index=0&type=styles!./src/Demo/comm/father.ux\n// module id = 9\n// module chunks = 1","import router from '@system.router'\r\n import prompt from '@system.prompt'\r\n export default {\r\n data: {\r\n say: \"\",\r\n sayEvent:null,\r\n },\r\n onInit() {\r\n this.$on(\"sonSay\", this.sayMsg);\r\n this.sayEvent = new BroadcastChannel('say')\r\n const _this = this;\r\n this.sayEvent .onmessage = function (event) {\r\n console.log('fater say')\r\n _this.say = event.data\r\n _this.sayEvent.postMessage('im fater')\r\n }\r\n },\r\n sayMsg(evt) {\r\n\r\n this.say = evt.detail.msg\r\n\r\n if (this.say === 'father') {\r\n this.$broadcast('fatherSay', {\r\n msg: \"son\"\r\n })\r\n }\r\n\r\n },\r\n onDestroy(){\r\n this.sayEvent .close()\r\n }\r\n\r\n }\n\n const moduleOwn = exports.default || module.exports\n const accessors = ['public', 'protected', 'private']\n\n if (moduleOwn.data && accessors.some(function (acc) { return moduleOwn[acc] })) {\n throw new Error('页面VM对象中的属性data不可与\"' + accessors.join(',') + '\"同时存在,请使用private替换data名称')\n }\n else if (!moduleOwn.data) {\n moduleOwn.data = {}\n moduleOwn._descriptor = {}\n accessors.forEach(function (acc) {\n const accType = typeof moduleOwn[acc]\n if (accType === 'object') {\n moduleOwn.data = Object.assign(moduleOwn.data, moduleOwn[acc])\n for (const name in moduleOwn[acc]) {\n moduleOwn._descriptor[name] = { access: acc }\n }\n }\n else if (accType === 'function') {\n console.warn('页面VM对象中的属性' + acc + '的值不能是函数,请使用对象')\n }\n })\n }\n\n\n\n// WEBPACK FOOTER //\n// ./src/Demo/comm/father.ux?isEntry=true"],"sourceRoot":""} -------------------------------------------------------------------------------- /build/Demo/comm2/father.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | 3 | var createPageHandler = function() { 4 | return /******/ (function(modules) { // webpackBootstrap 5 | /******/ // The module cache 6 | /******/ var installedModules = {}; 7 | /******/ 8 | /******/ // The require function 9 | /******/ function __webpack_require__(moduleId) { 10 | /******/ 11 | /******/ // Check if module is in cache 12 | /******/ if(installedModules[moduleId]) 13 | /******/ return installedModules[moduleId].exports; 14 | /******/ 15 | /******/ // Create a new module (and put it into the cache) 16 | /******/ var module = installedModules[moduleId] = { 17 | /******/ exports: {}, 18 | /******/ id: moduleId, 19 | /******/ loaded: false 20 | /******/ }; 21 | /******/ 22 | /******/ // Execute the module function 23 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 24 | /******/ 25 | /******/ // Flag the module as loaded 26 | /******/ module.loaded = true; 27 | /******/ 28 | /******/ // Return the exports of the module 29 | /******/ return module.exports; 30 | /******/ } 31 | /******/ 32 | /******/ 33 | /******/ // expose the modules object (__webpack_modules__) 34 | /******/ __webpack_require__.m = modules; 35 | /******/ 36 | /******/ // expose the module cache 37 | /******/ __webpack_require__.c = installedModules; 38 | /******/ 39 | /******/ // __webpack_public_path__ 40 | /******/ __webpack_require__.p = ""; 41 | /******/ 42 | /******/ // Load entry module and return exports 43 | /******/ return __webpack_require__(0); 44 | /******/ }) 45 | /************************************************************************/ 46 | /******/ ([ 47 | /* 0 */ 48 | /***/ function(module, exports, __webpack_require__) { 49 | 50 | __webpack_require__(11) 51 | __webpack_require__(15) 52 | var $app_template$ = __webpack_require__(19) 53 | var $app_style$ = __webpack_require__(20) 54 | var $app_script$ = __webpack_require__(21) 55 | 56 | $app_define$('@app-component/father', [], function($app_require$, $app_exports$, $app_module$){ 57 | $app_script$($app_module$, $app_exports$, $app_require$) 58 | if ($app_exports$.__esModule && $app_exports$.default) { 59 | $app_module$.exports = $app_exports$.default 60 | } 61 | $app_module$.exports.template = $app_template$ 62 | $app_module$.exports.style = $app_style$ 63 | }) 64 | 65 | $app_bootstrap$('@app-component/father',{ packagerVersion: '0.0.5'}) 66 | 67 | 68 | /***/ }, 69 | /* 1 */, 70 | /* 2 */, 71 | /* 3 */, 72 | /* 4 */, 73 | /* 5 */, 74 | /* 6 */, 75 | /* 7 */, 76 | /* 8 */, 77 | /* 9 */, 78 | /* 10 */, 79 | /* 11 */ 80 | /***/ function(module, exports, __webpack_require__) { 81 | 82 | var $app_template$ = __webpack_require__(12) 83 | var $app_style$ = __webpack_require__(13) 84 | var $app_script$ = __webpack_require__(14) 85 | 86 | $app_define$('@app-component/son1', [], function($app_require$, $app_exports$, $app_module$){ 87 | $app_script$($app_module$, $app_exports$, $app_require$) 88 | if ($app_exports$.__esModule && $app_exports$.default) { 89 | $app_module$.exports = $app_exports$.default 90 | } 91 | $app_module$.exports.template = $app_template$ 92 | $app_module$.exports.style = $app_style$ 93 | }) 94 | 95 | 96 | /***/ }, 97 | /* 12 */ 98 | /***/ function(module, exports) { 99 | 100 | module.exports = { 101 | "type": "div", 102 | "attr": { 103 | "id": "main" 104 | }, 105 | "id": "main", 106 | "children": [ 107 | { 108 | "type": "text", 109 | "attr": { 110 | "value": "son1 area: " 111 | } 112 | }, 113 | { 114 | "type": "div", 115 | "attr": {}, 116 | "classList": [ 117 | "say" 118 | ], 119 | "children": [ 120 | { 121 | "type": "text", 122 | "attr": { 123 | "value": function () {return 'brather say : ' + (this.say)} 124 | } 125 | } 126 | ] 127 | }, 128 | { 129 | "type": "div", 130 | "attr": {}, 131 | "children": [ 132 | { 133 | "type": "input", 134 | "attr": { 135 | "type": "button", 136 | "value": "im son1" 137 | }, 138 | "classList": [ 139 | "btn" 140 | ], 141 | "events": { 142 | "click": function (evt) {this.say2Brother('im son1',evt)} 143 | } 144 | } 145 | ] 146 | } 147 | ] 148 | } 149 | 150 | /***/ }, 151 | /* 13 */ 152 | /***/ function(module, exports) { 153 | 154 | module.exports = { 155 | "#main": { 156 | "width": "100%", 157 | "height": "300px", 158 | "borderTopWidth": "1px", 159 | "borderRightWidth": "1px", 160 | "borderBottomWidth": "1px", 161 | "borderLeftWidth": "1px", 162 | "borderStyle": "solid", 163 | "flexDirection": "column" 164 | }, 165 | ".btn": { 166 | "height": "80px", 167 | "backgroundColor": "#09ba07", 168 | "fontSize": "30px", 169 | "color": "#ffffff", 170 | "marginLeft": "20px", 171 | "marginBottom": "10px", 172 | "paddingTop": "10px", 173 | "paddingRight": "10px", 174 | "paddingBottom": "10px", 175 | "paddingLeft": "10px" 176 | }, 177 | ".say": { 178 | "width": "100%", 179 | "flexGrow": 1, 180 | "justifyContent": "center" 181 | } 182 | } 183 | 184 | /***/ }, 185 | /* 14 */ 186 | /***/ function(module, exports) { 187 | 188 | module.exports = function(module, exports, $app_require$){"use strict"; 189 | 190 | Object.defineProperty(exports, "__esModule", { 191 | value: true 192 | }); 193 | exports.default = { 194 | 195 | data: { 196 | say: "" 197 | }, 198 | 199 | onInit: function onInit() {}, 200 | brotherSay: function brotherSay(msg) { 201 | this.say = msg; 202 | }, 203 | say2Brother: function say2Brother(msg) { 204 | if (this.nextVm) { 205 | this.nextVm.brotherSay(msg); 206 | } 207 | }, 208 | 209 | 210 | events: { 211 | eventSay: function eventSay(evt) { 212 | this.say = evt.detail; 213 | } 214 | } 215 | 216 | };} 217 | 218 | /***/ }, 219 | /* 15 */ 220 | /***/ function(module, exports, __webpack_require__) { 221 | 222 | var $app_template$ = __webpack_require__(16) 223 | var $app_style$ = __webpack_require__(17) 224 | var $app_script$ = __webpack_require__(18) 225 | 226 | $app_define$('@app-component/son2', [], function($app_require$, $app_exports$, $app_module$){ 227 | $app_script$($app_module$, $app_exports$, $app_require$) 228 | if ($app_exports$.__esModule && $app_exports$.default) { 229 | $app_module$.exports = $app_exports$.default 230 | } 231 | $app_module$.exports.template = $app_template$ 232 | $app_module$.exports.style = $app_style$ 233 | }) 234 | 235 | 236 | /***/ }, 237 | /* 16 */ 238 | /***/ function(module, exports) { 239 | 240 | module.exports = { 241 | "type": "div", 242 | "attr": { 243 | "id": "main" 244 | }, 245 | "id": "main", 246 | "children": [ 247 | { 248 | "type": "text", 249 | "attr": { 250 | "value": "son2 area: " 251 | } 252 | }, 253 | { 254 | "type": "div", 255 | "attr": {}, 256 | "classList": [ 257 | "say" 258 | ], 259 | "children": [ 260 | { 261 | "type": "text", 262 | "attr": { 263 | "value": function () {return 'brather say : ' + (this.say)} 264 | } 265 | } 266 | ] 267 | }, 268 | { 269 | "type": "div", 270 | "attr": {}, 271 | "children": [ 272 | { 273 | "type": "input", 274 | "attr": { 275 | "type": "button", 276 | "value": "im son2" 277 | }, 278 | "classList": [ 279 | "btn" 280 | ], 281 | "events": { 282 | "click": function (evt) {this.say2Brother('im son2',evt)} 283 | } 284 | } 285 | ] 286 | } 287 | ] 288 | } 289 | 290 | /***/ }, 291 | /* 17 */ 292 | /***/ function(module, exports) { 293 | 294 | module.exports = { 295 | "#main": { 296 | "width": "100%", 297 | "height": "300px", 298 | "borderTopWidth": "1px", 299 | "borderRightWidth": "1px", 300 | "borderBottomWidth": "1px", 301 | "borderLeftWidth": "1px", 302 | "borderStyle": "solid", 303 | "flexDirection": "column" 304 | }, 305 | ".btn": { 306 | "height": "80px", 307 | "backgroundColor": "#09ba07", 308 | "fontSize": "30px", 309 | "color": "#ffffff", 310 | "marginLeft": "20px", 311 | "marginBottom": "10px", 312 | "paddingTop": "10px", 313 | "paddingRight": "10px", 314 | "paddingBottom": "10px", 315 | "paddingLeft": "10px" 316 | }, 317 | ".say": { 318 | "width": "100%", 319 | "flexGrow": 1, 320 | "justifyContent": "center" 321 | } 322 | } 323 | 324 | /***/ }, 325 | /* 18 */ 326 | /***/ function(module, exports) { 327 | 328 | module.exports = function(module, exports, $app_require$){"use strict"; 329 | 330 | Object.defineProperty(exports, "__esModule", { 331 | value: true 332 | }); 333 | exports.default = { 334 | 335 | data: { 336 | say: "" 337 | }, 338 | 339 | onInit: function onInit() {}, 340 | brotherSay: function brotherSay(msg) { 341 | this.say = msg; 342 | }, 343 | say2Brother: function say2Brother(msg) { 344 | if (this.previousVm) { 345 | this.previousVm.$emit('eventSay', msg); 346 | } 347 | } 348 | };} 349 | 350 | /***/ }, 351 | /* 19 */ 352 | /***/ function(module, exports) { 353 | 354 | module.exports = { 355 | "type": "div", 356 | "attr": { 357 | "id": "main" 358 | }, 359 | "id": "main", 360 | "children": [ 361 | { 362 | "type": "son1", 363 | "attr": { 364 | "id": "son1" 365 | }, 366 | "id": "son1" 367 | }, 368 | { 369 | "type": "son2", 370 | "attr": { 371 | "id": "son2" 372 | }, 373 | "id": "son2" 374 | }, 375 | { 376 | "type": "div", 377 | "attr": {}, 378 | "classList": [ 379 | "father" 380 | ], 381 | "children": [ 382 | { 383 | "type": "text", 384 | "attr": { 385 | "value": "father area: " 386 | } 387 | }, 388 | { 389 | "type": "div", 390 | "attr": {}, 391 | "classList": [ 392 | "say" 393 | ] 394 | } 395 | ] 396 | } 397 | ] 398 | } 399 | 400 | /***/ }, 401 | /* 20 */ 402 | /***/ function(module, exports) { 403 | 404 | module.exports = { 405 | "#main": { 406 | "flexDirection": "column" 407 | }, 408 | ".father": { 409 | "width": "100%", 410 | "marginTop": "20px", 411 | "height": "300px", 412 | "borderTopWidth": "1px", 413 | "borderRightWidth": "1px", 414 | "borderBottomWidth": "1px", 415 | "borderLeftWidth": "1px", 416 | "borderStyle": "solid", 417 | "flexDirection": "column" 418 | }, 419 | ".say": { 420 | "width": "100%", 421 | "flexGrow": 1, 422 | "justifyContent": "center" 423 | } 424 | } 425 | 426 | /***/ }, 427 | /* 21 */ 428 | /***/ function(module, exports) { 429 | 430 | module.exports = function(module, exports, $app_require$){'use strict'; 431 | 432 | Object.defineProperty(exports, "__esModule", { 433 | value: true 434 | }); 435 | 436 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; 437 | 438 | var _system = $app_require$('@app-module/system.router'); 439 | 440 | var _system2 = _interopRequireDefault(_system); 441 | 442 | var _system3 = $app_require$('@app-module/system.prompt'); 443 | 444 | var _system4 = _interopRequireDefault(_system3); 445 | 446 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 447 | 448 | exports.default = { 449 | data: {}, 450 | onReady: function onReady() { 451 | var vm1 = this.$vm('son1'); 452 | var vm2 = this.$vm('son2'); 453 | 454 | vm1.parentVm = this; 455 | vm1.nextVm = vm2; 456 | vm2.parentVm = this; 457 | vm2.previousVm = vm1; 458 | } 459 | }; 460 | 461 | 462 | var moduleOwn = exports.default || module.exports; 463 | var accessors = ['public', 'protected', 'private']; 464 | 465 | if (moduleOwn.data && accessors.some(function (acc) { 466 | return moduleOwn[acc]; 467 | })) { 468 | throw new Error('页面VM对象中的属性data不可与"' + accessors.join(',') + '"同时存在,请使用private替换data名称'); 469 | } else if (!moduleOwn.data) { 470 | moduleOwn.data = {}; 471 | moduleOwn._descriptor = {}; 472 | accessors.forEach(function (acc) { 473 | var accType = _typeof(moduleOwn[acc]); 474 | if (accType === 'object') { 475 | moduleOwn.data = Object.assign(moduleOwn.data, moduleOwn[acc]); 476 | for (var name in moduleOwn[acc]) { 477 | moduleOwn._descriptor[name] = { access: acc }; 478 | } 479 | } else if (accType === 'function') { 480 | console.warn('页面VM对象中的属性' + acc + '的值不能是函数,请使用对象'); 481 | } 482 | }); 483 | }} 484 | 485 | /***/ } 486 | /******/ ]); 487 | }; 488 | if (typeof window === "undefined") { 489 | return createPageHandler(); 490 | } 491 | else { 492 | window.createPageHandler = createPageHandler 493 | } 494 | })(); 495 | //# sourceMappingURL=father.js.map -------------------------------------------------------------------------------- /build/Demo/index.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | 3 | var createPageHandler = function() { 4 | return /******/ (function(modules) { // webpackBootstrap 5 | /******/ // The module cache 6 | /******/ var installedModules = {}; 7 | /******/ 8 | /******/ // The require function 9 | /******/ function __webpack_require__(moduleId) { 10 | /******/ 11 | /******/ // Check if module is in cache 12 | /******/ if(installedModules[moduleId]) 13 | /******/ return installedModules[moduleId].exports; 14 | /******/ 15 | /******/ // Create a new module (and put it into the cache) 16 | /******/ var module = installedModules[moduleId] = { 17 | /******/ exports: {}, 18 | /******/ id: moduleId, 19 | /******/ loaded: false 20 | /******/ }; 21 | /******/ 22 | /******/ // Execute the module function 23 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 24 | /******/ 25 | /******/ // Flag the module as loaded 26 | /******/ module.loaded = true; 27 | /******/ 28 | /******/ // Return the exports of the module 29 | /******/ return module.exports; 30 | /******/ } 31 | /******/ 32 | /******/ 33 | /******/ // expose the modules object (__webpack_modules__) 34 | /******/ __webpack_require__.m = modules; 35 | /******/ 36 | /******/ // expose the module cache 37 | /******/ __webpack_require__.c = installedModules; 38 | /******/ 39 | /******/ // __webpack_public_path__ 40 | /******/ __webpack_require__.p = ""; 41 | /******/ 42 | /******/ // Load entry module and return exports 43 | /******/ return __webpack_require__(0); 44 | /******/ }) 45 | /************************************************************************/ 46 | /******/ ({ 47 | 48 | /***/ 0: 49 | /***/ function(module, exports, __webpack_require__) { 50 | 51 | var $app_template$ = __webpack_require__(22) 52 | var $app_style$ = __webpack_require__(23) 53 | var $app_script$ = __webpack_require__(24) 54 | 55 | $app_define$('@app-component/index', [], function($app_require$, $app_exports$, $app_module$){ 56 | $app_script$($app_module$, $app_exports$, $app_require$) 57 | if ($app_exports$.__esModule && $app_exports$.default) { 58 | $app_module$.exports = $app_exports$.default 59 | } 60 | $app_module$.exports.template = $app_template$ 61 | $app_module$.exports.style = $app_style$ 62 | }) 63 | 64 | $app_bootstrap$('@app-component/index',{ packagerVersion: '0.0.5'}) 65 | 66 | 67 | /***/ }, 68 | 69 | /***/ 22: 70 | /***/ function(module, exports) { 71 | 72 | module.exports = { 73 | "type": "div", 74 | "attr": {}, 75 | "classList": [ 76 | "demo-page" 77 | ], 78 | "children": [ 79 | { 80 | "type": "text", 81 | "attr": { 82 | "value": function () {return '欢迎打开' + (this.title)} 83 | }, 84 | "classList": [ 85 | "title" 86 | ] 87 | }, 88 | { 89 | "type": "input", 90 | "attr": { 91 | "type": "button", 92 | "value": "跳转到详情页" 93 | }, 94 | "classList": [ 95 | "btn" 96 | ], 97 | "events": { 98 | "click": "routeDetail" 99 | } 100 | } 101 | ] 102 | } 103 | 104 | /***/ }, 105 | 106 | /***/ 23: 107 | /***/ function(module, exports) { 108 | 109 | module.exports = { 110 | ".demo-page": { 111 | "flexDirection": "column", 112 | "justifyContent": "center", 113 | "alignItems": "center" 114 | }, 115 | ".title": { 116 | "fontSize": "40px", 117 | "textAlign": "center" 118 | }, 119 | ".btn": { 120 | "width": "550px", 121 | "height": "86px", 122 | "marginTop": "75px", 123 | "borderRadius": "43px", 124 | "backgroundColor": "#09ba07", 125 | "fontSize": "30px", 126 | "color": "#ffffff" 127 | } 128 | } 129 | 130 | /***/ }, 131 | 132 | /***/ 24: 133 | /***/ function(module, exports) { 134 | 135 | module.exports = function(module, exports, $app_require$){'use strict'; 136 | 137 | Object.defineProperty(exports, "__esModule", { 138 | value: true 139 | }); 140 | 141 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; 142 | 143 | var _system = $app_require$('@app-module/system.router'); 144 | 145 | var _system2 = _interopRequireDefault(_system); 146 | 147 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 148 | 149 | exports.default = { 150 | data: { 151 | title: '示例页面' 152 | }, 153 | routeDetail: function routeDetail() { 154 | _system2.default.push({ 155 | uri: '/DemoDetail' 156 | }); 157 | } 158 | }; 159 | 160 | 161 | var moduleOwn = exports.default || module.exports; 162 | var accessors = ['public', 'protected', 'private']; 163 | 164 | if (moduleOwn.data && accessors.some(function (acc) { 165 | return moduleOwn[acc]; 166 | })) { 167 | throw new Error('页面VM对象中的属性data不可与"' + accessors.join(',') + '"同时存在,请使用private替换data名称'); 168 | } else if (!moduleOwn.data) { 169 | moduleOwn.data = {}; 170 | moduleOwn._descriptor = {}; 171 | accessors.forEach(function (acc) { 172 | var accType = _typeof(moduleOwn[acc]); 173 | if (accType === 'object') { 174 | moduleOwn.data = Object.assign(moduleOwn.data, moduleOwn[acc]); 175 | for (var name in moduleOwn[acc]) { 176 | moduleOwn._descriptor[name] = { access: acc }; 177 | } 178 | } else if (accType === 'function') { 179 | console.warn('页面VM对象中的属性' + acc + '的值不能是函数,请使用对象'); 180 | } 181 | }); 182 | }} 183 | 184 | /***/ } 185 | 186 | /******/ }); 187 | }; 188 | if (typeof window === "undefined") { 189 | return createPageHandler(); 190 | } 191 | else { 192 | window.createPageHandler = createPageHandler 193 | } 194 | })(); 195 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /build/Demo/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///webpack/bootstrap eb081c1406219c276c17?c844*","webpack:///./src/Demo/index.ux?9901","webpack:///./src/Demo/index.ux?699f","webpack:///./src/Demo/index.ux?f30d","webpack:///./src/Demo/index.ux"],"names":["data","title","routeDetail","push","uri","moduleOwn","exports","default","module","accessors","some","acc","Error","join","_descriptor","forEach","accType","Object","assign","name","access","console","warn"],"mappings":";;;;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;ACtCA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED,yCAAwC,0BAA0B;;;;;;;;ACblE;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA8B;AAC9B,QAAO;AACP;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;;;;;;;;;;ACnBA;;;;;;mBAEiB;AACbA,SAAM;AACJC,YAAO;AADH,IADO;AAIbC,cAJa,yBAIE;AAEb,sBAAOC,IAAP,CAAa;AACXC,YAAK;AADM,MAAb;AAGD;AATY,E;;;AAYf,KAAMC,YAAYC,QAAQC,OAAR,IAAmBC,OAAOF,OAA5C;AACA,KAAMG,YAAY,CAAC,QAAD,EAAW,WAAX,EAAwB,SAAxB,CAAlB;;AAEA,KAAIJ,UAAUL,IAAV,IAAkBS,UAAUC,IAAV,CAAe,UAAUC,GAAV,EAAe;AAAE,UAAON,UAAUM,GAAV,CAAP;AAAuB,EAAvD,CAAtB,EAAgF;AAC9E,SAAM,IAAIC,KAAJ,CAAU,uBAAuBH,UAAUI,IAAV,CAAe,GAAf,CAAvB,GAA6C,0BAAvD,CAAN;AACD,EAFD,MAGK,IAAI,CAACR,UAAUL,IAAf,EAAqB;AACxBK,aAAUL,IAAV,GAAiB,EAAjB;AACAK,aAAUS,WAAV,GAAwB,EAAxB;AACAL,aAAUM,OAAV,CAAkB,UAAUJ,GAAV,EAAe;AAC/B,SAAMK,kBAAiBX,UAAUM,GAAV,CAAjB,CAAN;AACA,SAAIK,YAAY,QAAhB,EAA0B;AACxBX,iBAAUL,IAAV,GAAiBiB,OAAOC,MAAP,CAAcb,UAAUL,IAAxB,EAA8BK,UAAUM,GAAV,CAA9B,CAAjB;AACA,YAAK,IAAMQ,IAAX,IAAmBd,UAAUM,GAAV,CAAnB,EAAmC;AACjCN,mBAAUS,WAAV,CAAsBK,IAAtB,IAA8B,EAAEC,QAAQT,GAAV,EAA9B;AACD;AACF,MALD,MAMK,IAAIK,YAAY,UAAhB,EAA4B;AAC/BK,eAAQC,IAAR,CAAa,eAAeX,GAAf,GAAqB,eAAlC;AACD;AACF,IAXD;AAYD,G","file":"Demo/index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap eb081c1406219c276c17","var $app_template$ = require(\"!!../../node_modules/hap-tools/lib/json-loader.js!../../node_modules/hap-tools/lib/template-loader.js!../../node_modules/hap-tools/lib/fragment-loader.js?index=0&type=templates!./index.ux\")\nvar $app_style$ = require(\"!!../../node_modules/hap-tools/lib/json-loader.js!../../node_modules/hap-tools/lib/style-loader.js?index=0&type=styles!../../node_modules/hap-tools/lib/fragment-loader.js?index=0&type=styles!./index.ux\")\nvar $app_script$ = require(\"!!../../node_modules/hap-tools/lib/script-loader.js!babel-loader?presets[]=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\babel-preset-env&presets=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\babel-preset-env&plugins[]=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\hap-tools\\\\lib\\\\jsx-loader.js&plugins=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\hap-tools\\\\lib\\\\jsx-loader.js&comments=false!../../node_modules/hap-tools/lib/access-loader.js!../../node_modules/hap-tools/lib/fragment-loader.js?index=0&type=scripts!./index.ux?isEntry=true\")\n\n$app_define$('@app-component/index', [], function($app_require$, $app_exports$, $app_module$){\n $app_script$($app_module$, $app_exports$, $app_require$)\n if ($app_exports$.__esModule && $app_exports$.default) {\n $app_module$.exports = $app_exports$.default\n }\n $app_module$.exports.template = $app_template$\n $app_module$.exports.style = $app_style$\n})\n\n$app_bootstrap$('@app-component/index',{ packagerVersion: '0.0.5'})\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/Demo/index.ux\n// module id = 0\n// module chunks = 3","module.exports = {\n \"type\": \"div\",\n \"attr\": {},\n \"classList\": [\n \"demo-page\"\n ],\n \"children\": [\n {\n \"type\": \"text\",\n \"attr\": {\n \"value\": function () {return '欢迎打开' + (this.title)}\n },\n \"classList\": [\n \"title\"\n ]\n },\n {\n \"type\": \"input\",\n \"attr\": {\n \"type\": \"button\",\n \"value\": \"跳转到详情页\"\n },\n \"classList\": [\n \"btn\"\n ],\n \"events\": {\n \"click\": \"routeDetail\"\n }\n }\n ]\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/hap-tools/lib/json-loader.js!./~/hap-tools/lib/template-loader.js!./~/hap-tools/lib/fragment-loader.js?index=0&type=templates!./src/Demo/index.ux\n// module id = 22\n// module chunks = 3","module.exports = {\n \".demo-page\": {\n \"flexDirection\": \"column\",\n \"justifyContent\": \"center\",\n \"alignItems\": \"center\"\n },\n \".title\": {\n \"fontSize\": \"40px\",\n \"textAlign\": \"center\"\n },\n \".btn\": {\n \"width\": \"550px\",\n \"height\": \"86px\",\n \"marginTop\": \"75px\",\n \"borderRadius\": \"43px\",\n \"backgroundColor\": \"#09ba07\",\n \"fontSize\": \"30px\",\n \"color\": \"#ffffff\"\n }\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/hap-tools/lib/json-loader.js!./~/hap-tools/lib/style-loader.js?index=0&type=styles!./~/hap-tools/lib/fragment-loader.js?index=0&type=styles!./src/Demo/index.ux\n// module id = 23\n// module chunks = 3","import router from '@system.router'\n\n export default {\n data: {\n title: '示例页面'\n },\n routeDetail () {\n // 跳转到应用内的某个页面,router用法详见:文档->接口->页面路由\n router.push ({\n uri: '/DemoDetail'\n })\n }\n }\n\n const moduleOwn = exports.default || module.exports\n const accessors = ['public', 'protected', 'private']\n\n if (moduleOwn.data && accessors.some(function (acc) { return moduleOwn[acc] })) {\n throw new Error('页面VM对象中的属性data不可与\"' + accessors.join(',') + '\"同时存在,请使用private替换data名称')\n }\n else if (!moduleOwn.data) {\n moduleOwn.data = {}\n moduleOwn._descriptor = {}\n accessors.forEach(function (acc) {\n const accType = typeof moduleOwn[acc]\n if (accType === 'object') {\n moduleOwn.data = Object.assign(moduleOwn.data, moduleOwn[acc])\n for (const name in moduleOwn[acc]) {\n moduleOwn._descriptor[name] = { access: acc }\n }\n }\n else if (accType === 'function') {\n console.warn('页面VM对象中的属性' + acc + '的值不能是函数,请使用对象')\n }\n })\n }\n\n\n\n// WEBPACK FOOTER //\n// ./src/Demo/index.ux?isEntry=true"],"sourceRoot":""} -------------------------------------------------------------------------------- /build/DemoDetail/index.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | 3 | var createPageHandler = function() { 4 | return /******/ (function(modules) { // webpackBootstrap 5 | /******/ // The module cache 6 | /******/ var installedModules = {}; 7 | /******/ 8 | /******/ // The require function 9 | /******/ function __webpack_require__(moduleId) { 10 | /******/ 11 | /******/ // Check if module is in cache 12 | /******/ if(installedModules[moduleId]) 13 | /******/ return installedModules[moduleId].exports; 14 | /******/ 15 | /******/ // Create a new module (and put it into the cache) 16 | /******/ var module = installedModules[moduleId] = { 17 | /******/ exports: {}, 18 | /******/ id: moduleId, 19 | /******/ loaded: false 20 | /******/ }; 21 | /******/ 22 | /******/ // Execute the module function 23 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 24 | /******/ 25 | /******/ // Flag the module as loaded 26 | /******/ module.loaded = true; 27 | /******/ 28 | /******/ // Return the exports of the module 29 | /******/ return module.exports; 30 | /******/ } 31 | /******/ 32 | /******/ 33 | /******/ // expose the modules object (__webpack_modules__) 34 | /******/ __webpack_require__.m = modules; 35 | /******/ 36 | /******/ // expose the module cache 37 | /******/ __webpack_require__.c = installedModules; 38 | /******/ 39 | /******/ // __webpack_public_path__ 40 | /******/ __webpack_require__.p = ""; 41 | /******/ 42 | /******/ // Load entry module and return exports 43 | /******/ return __webpack_require__(0); 44 | /******/ }) 45 | /************************************************************************/ 46 | /******/ ({ 47 | 48 | /***/ 0: 49 | /***/ function(module, exports, __webpack_require__) { 50 | 51 | var $app_template$ = __webpack_require__(25) 52 | var $app_style$ = __webpack_require__(26) 53 | var $app_script$ = __webpack_require__(27) 54 | 55 | $app_define$('@app-component/index', [], function($app_require$, $app_exports$, $app_module$){ 56 | $app_script$($app_module$, $app_exports$, $app_require$) 57 | if ($app_exports$.__esModule && $app_exports$.default) { 58 | $app_module$.exports = $app_exports$.default 59 | } 60 | $app_module$.exports.template = $app_template$ 61 | $app_module$.exports.style = $app_style$ 62 | }) 63 | 64 | $app_bootstrap$('@app-component/index',{ packagerVersion: '0.0.5'}) 65 | 66 | 67 | /***/ }, 68 | 69 | /***/ 25: 70 | /***/ function(module, exports) { 71 | 72 | module.exports = { 73 | "type": "div", 74 | "attr": {}, 75 | "classList": [ 76 | "demo-page" 77 | ], 78 | "children": [ 79 | { 80 | "type": "text", 81 | "attr": { 82 | "value": function () {return this.text} 83 | }, 84 | "classList": [ 85 | "title" 86 | ] 87 | } 88 | ] 89 | } 90 | 91 | /***/ }, 92 | 93 | /***/ 26: 94 | /***/ function(module, exports) { 95 | 96 | module.exports = { 97 | ".demo-page": { 98 | "flexDirection": "column", 99 | "justifyContent": "center", 100 | "alignItems": "center" 101 | }, 102 | ".title": { 103 | "fontSize": "40px", 104 | "textAlign": "center" 105 | } 106 | } 107 | 108 | /***/ }, 109 | 110 | /***/ 27: 111 | /***/ function(module, exports) { 112 | 113 | module.exports = function(module, exports, $app_require$){'use strict'; 114 | 115 | Object.defineProperty(exports, "__esModule", { 116 | value: true 117 | }); 118 | 119 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; 120 | 121 | exports.default = { 122 | data: { 123 | text: '欢迎打开详情页' 124 | }, 125 | onMenuPress: function onMenuPress() { 126 | this.$app.showMenu(); 127 | } 128 | }; 129 | 130 | 131 | var moduleOwn = exports.default || module.exports; 132 | var accessors = ['public', 'protected', 'private']; 133 | 134 | if (moduleOwn.data && accessors.some(function (acc) { 135 | return moduleOwn[acc]; 136 | })) { 137 | throw new Error('页面VM对象中的属性data不可与"' + accessors.join(',') + '"同时存在,请使用private替换data名称'); 138 | } else if (!moduleOwn.data) { 139 | moduleOwn.data = {}; 140 | moduleOwn._descriptor = {}; 141 | accessors.forEach(function (acc) { 142 | var accType = _typeof(moduleOwn[acc]); 143 | if (accType === 'object') { 144 | moduleOwn.data = Object.assign(moduleOwn.data, moduleOwn[acc]); 145 | for (var name in moduleOwn[acc]) { 146 | moduleOwn._descriptor[name] = { access: acc }; 147 | } 148 | } else if (accType === 'function') { 149 | console.warn('页面VM对象中的属性' + acc + '的值不能是函数,请使用对象'); 150 | } 151 | }); 152 | }} 153 | 154 | /***/ } 155 | 156 | /******/ }); 157 | }; 158 | if (typeof window === "undefined") { 159 | return createPageHandler(); 160 | } 161 | else { 162 | window.createPageHandler = createPageHandler 163 | } 164 | })(); 165 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /build/DemoDetail/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///webpack/bootstrap eb081c1406219c276c17?c844**","webpack:///./src/DemoDetail/index.ux?65ad","webpack:///./src/DemoDetail/index.ux?b6aa","webpack:///./src/DemoDetail/index.ux?1f02","webpack:///./src/DemoDetail/index.ux"],"names":["data","text","onMenuPress","$app","showMenu","moduleOwn","exports","default","module","accessors","some","acc","Error","join","_descriptor","forEach","accType","Object","assign","name","access","console","warn"],"mappings":";;;;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;ACtCA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED,yCAAwC,0BAA0B;;;;;;;;ACblE;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA8B;AAC9B,QAAO;AACP;AACA;AACA;AACA;AACA;AACA,E;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,E;;;;;;;;;;;;;;;mBCVe;AACXA,SAAM;AACJC,WAAM;AADF,IADK;AAQXC,cARW,yBAQG;AACZ,UAAKC,IAAL,CAAUC,QAAV;AACD;AAVU,E;;;AAab,KAAMC,YAAYC,QAAQC,OAAR,IAAmBC,OAAOF,OAA5C;AACA,KAAMG,YAAY,CAAC,QAAD,EAAW,WAAX,EAAwB,SAAxB,CAAlB;;AAEA,KAAIJ,UAAUL,IAAV,IAAkBS,UAAUC,IAAV,CAAe,UAAUC,GAAV,EAAe;AAAE,UAAON,UAAUM,GAAV,CAAP;AAAuB,EAAvD,CAAtB,EAAgF;AAC9E,SAAM,IAAIC,KAAJ,CAAU,uBAAuBH,UAAUI,IAAV,CAAe,GAAf,CAAvB,GAA6C,0BAAvD,CAAN;AACD,EAFD,MAGK,IAAI,CAACR,UAAUL,IAAf,EAAqB;AACxBK,aAAUL,IAAV,GAAiB,EAAjB;AACAK,aAAUS,WAAV,GAAwB,EAAxB;AACAL,aAAUM,OAAV,CAAkB,UAAUJ,GAAV,EAAe;AAC/B,SAAMK,kBAAiBX,UAAUM,GAAV,CAAjB,CAAN;AACA,SAAIK,YAAY,QAAhB,EAA0B;AACxBX,iBAAUL,IAAV,GAAiBiB,OAAOC,MAAP,CAAcb,UAAUL,IAAxB,EAA8BK,UAAUM,GAAV,CAA9B,CAAjB;AACA,YAAK,IAAMQ,IAAX,IAAmBd,UAAUM,GAAV,CAAnB,EAAmC;AACjCN,mBAAUS,WAAV,CAAsBK,IAAtB,IAA8B,EAAEC,QAAQT,GAAV,EAA9B;AACD;AACF,MALD,MAMK,IAAIK,YAAY,UAAhB,EAA4B;AAC/BK,eAAQC,IAAR,CAAa,eAAeX,GAAf,GAAqB,eAAlC;AACD;AACF,IAXD;AAYD,G","file":"DemoDetail/index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap eb081c1406219c276c17","var $app_template$ = require(\"!!../../node_modules/hap-tools/lib/json-loader.js!../../node_modules/hap-tools/lib/template-loader.js!../../node_modules/hap-tools/lib/fragment-loader.js?index=0&type=templates!./index.ux\")\nvar $app_style$ = require(\"!!../../node_modules/hap-tools/lib/json-loader.js!../../node_modules/hap-tools/lib/style-loader.js?index=0&type=styles!../../node_modules/hap-tools/lib/fragment-loader.js?index=0&type=styles!./index.ux\")\nvar $app_script$ = require(\"!!../../node_modules/hap-tools/lib/script-loader.js!babel-loader?presets[]=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\babel-preset-env&presets=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\babel-preset-env&plugins[]=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\hap-tools\\\\lib\\\\jsx-loader.js&plugins=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\hap-tools\\\\lib\\\\jsx-loader.js&comments=false!../../node_modules/hap-tools/lib/access-loader.js!../../node_modules/hap-tools/lib/fragment-loader.js?index=0&type=scripts!./index.ux?isEntry=true\")\n\n$app_define$('@app-component/index', [], function($app_require$, $app_exports$, $app_module$){\n $app_script$($app_module$, $app_exports$, $app_require$)\n if ($app_exports$.__esModule && $app_exports$.default) {\n $app_module$.exports = $app_exports$.default\n }\n $app_module$.exports.template = $app_template$\n $app_module$.exports.style = $app_style$\n})\n\n$app_bootstrap$('@app-component/index',{ packagerVersion: '0.0.5'})\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/DemoDetail/index.ux\n// module id = 0\n// module chunks = 4","module.exports = {\n \"type\": \"div\",\n \"attr\": {},\n \"classList\": [\n \"demo-page\"\n ],\n \"children\": [\n {\n \"type\": \"text\",\n \"attr\": {\n \"value\": function () {return this.text}\n },\n \"classList\": [\n \"title\"\n ]\n }\n ]\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/hap-tools/lib/json-loader.js!./~/hap-tools/lib/template-loader.js!./~/hap-tools/lib/fragment-loader.js?index=0&type=templates!./src/DemoDetail/index.ux\n// module id = 25\n// module chunks = 4","module.exports = {\n \".demo-page\": {\n \"flexDirection\": \"column\",\n \"justifyContent\": \"center\",\n \"alignItems\": \"center\"\n },\n \".title\": {\n \"fontSize\": \"40px\",\n \"textAlign\": \"center\"\n }\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/hap-tools/lib/json-loader.js!./~/hap-tools/lib/style-loader.js?index=0&type=styles!./~/hap-tools/lib/fragment-loader.js?index=0&type=styles!./src/DemoDetail/index.ux\n// module id = 26\n// module chunks = 4","export default {\n data: {\n text: '欢迎打开详情页'\n },\n /**\n * 当用户点击菜单按钮时触发,调用app中定义的方法showMenu\n * 注意:使用加载器测试`创建桌面快捷方式`功能时,请先在`系统设置`中打开`应用加载器`的`桌面快捷方式`权限\n */\n onMenuPress() {\n this.$app.showMenu()\n }\n }\n\n const moduleOwn = exports.default || module.exports\n const accessors = ['public', 'protected', 'private']\n\n if (moduleOwn.data && accessors.some(function (acc) { return moduleOwn[acc] })) {\n throw new Error('页面VM对象中的属性data不可与\"' + accessors.join(',') + '\"同时存在,请使用private替换data名称')\n }\n else if (!moduleOwn.data) {\n moduleOwn.data = {}\n moduleOwn._descriptor = {}\n accessors.forEach(function (acc) {\n const accType = typeof moduleOwn[acc]\n if (accType === 'object') {\n moduleOwn.data = Object.assign(moduleOwn.data, moduleOwn[acc])\n for (const name in moduleOwn[acc]) {\n moduleOwn._descriptor[name] = { access: acc }\n }\n }\n else if (accType === 'function') {\n console.warn('页面VM对象中的属性' + acc + '的值不能是函数,请使用对象')\n }\n })\n }\n\n\n\n// WEBPACK FOOTER //\n// ./src/DemoDetail/index.ux?isEntry=true"],"sourceRoot":""} -------------------------------------------------------------------------------- /build/Web/index.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | 3 | var createPageHandler = function() { 4 | return /******/ (function(modules) { // webpackBootstrap 5 | /******/ // The module cache 6 | /******/ var installedModules = {}; 7 | /******/ 8 | /******/ // The require function 9 | /******/ function __webpack_require__(moduleId) { 10 | /******/ 11 | /******/ // Check if module is in cache 12 | /******/ if(installedModules[moduleId]) 13 | /******/ return installedModules[moduleId].exports; 14 | /******/ 15 | /******/ // Create a new module (and put it into the cache) 16 | /******/ var module = installedModules[moduleId] = { 17 | /******/ exports: {}, 18 | /******/ id: moduleId, 19 | /******/ loaded: false 20 | /******/ }; 21 | /******/ 22 | /******/ // Execute the module function 23 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 24 | /******/ 25 | /******/ // Flag the module as loaded 26 | /******/ module.loaded = true; 27 | /******/ 28 | /******/ // Return the exports of the module 29 | /******/ return module.exports; 30 | /******/ } 31 | /******/ 32 | /******/ 33 | /******/ // expose the modules object (__webpack_modules__) 34 | /******/ __webpack_require__.m = modules; 35 | /******/ 36 | /******/ // expose the module cache 37 | /******/ __webpack_require__.c = installedModules; 38 | /******/ 39 | /******/ // __webpack_public_path__ 40 | /******/ __webpack_require__.p = ""; 41 | /******/ 42 | /******/ // Load entry module and return exports 43 | /******/ return __webpack_require__(0); 44 | /******/ }) 45 | /************************************************************************/ 46 | /******/ ({ 47 | 48 | /***/ 0: 49 | /***/ function(module, exports, __webpack_require__) { 50 | 51 | __webpack_require__(28) 52 | var $app_template$ = __webpack_require__(54) 53 | var $app_style$ = __webpack_require__(55) 54 | var $app_script$ = __webpack_require__(56) 55 | 56 | $app_define$('@app-component/index', [], function($app_require$, $app_exports$, $app_module$){ 57 | $app_script$($app_module$, $app_exports$, $app_require$) 58 | if ($app_exports$.__esModule && $app_exports$.default) { 59 | $app_module$.exports = $app_exports$.default 60 | } 61 | $app_module$.exports.template = $app_template$ 62 | $app_module$.exports.style = $app_style$ 63 | }) 64 | 65 | $app_bootstrap$('@app-component/index',{ packagerVersion: '0.0.5'}) 66 | 67 | 68 | /***/ }, 69 | 70 | /***/ 28: 71 | /***/ function(module, exports, __webpack_require__) { 72 | 73 | var $app_template$ = __webpack_require__(29) 74 | var $app_style$ = __webpack_require__(30) 75 | var $app_script$ = __webpack_require__(31) 76 | 77 | $app_define$('@app-component/comp-title', [], function($app_require$, $app_exports$, $app_module$){ 78 | $app_script$($app_module$, $app_exports$, $app_require$) 79 | if ($app_exports$.__esModule && $app_exports$.default) { 80 | $app_module$.exports = $app_exports$.default 81 | } 82 | $app_module$.exports.template = $app_template$ 83 | $app_module$.exports.style = $app_style$ 84 | }) 85 | 86 | 87 | /***/ }, 88 | 89 | /***/ 29: 90 | /***/ function(module, exports) { 91 | 92 | module.exports = { 93 | "type": "div", 94 | "attr": { 95 | "id": "title" 96 | }, 97 | "id": "title", 98 | "children": [ 99 | { 100 | "type": "div", 101 | "attr": {}, 102 | "classList": [ 103 | "left" 104 | ], 105 | "children": [ 106 | { 107 | "type": "image", 108 | "attr": { 109 | "id": "back", 110 | "src": "/Common/Image/back.png", 111 | "show": function () {return this.showBack} 112 | }, 113 | "id": "back", 114 | "events": { 115 | "click": function (evt) {this.back(evt)} 116 | } 117 | }, 118 | { 119 | "type": "text", 120 | "attr": { 121 | "id": "name", 122 | "show": function () {return this.showText}, 123 | "value": function () {return this.text} 124 | }, 125 | "id": "name" 126 | } 127 | ] 128 | }, 129 | { 130 | "type": "div", 131 | "attr": {}, 132 | "classList": [ 133 | "actions" 134 | ], 135 | "children": [ 136 | { 137 | "type": "div", 138 | "attr": { 139 | "show": function () {return this.showSearch} 140 | }, 141 | "classList": [ 142 | "search" 143 | ] 144 | }, 145 | { 146 | "type": "div", 147 | "attr": { 148 | "show": function () {return this.showPlus} 149 | }, 150 | "classList": [ 151 | "plus" 152 | ] 153 | } 154 | ] 155 | } 156 | ] 157 | } 158 | 159 | /***/ }, 160 | 161 | /***/ 30: 162 | /***/ function(module, exports) { 163 | 164 | module.exports = { 165 | "#title": { 166 | "backgroundColor": "#272727", 167 | "height": "100px", 168 | "alignItems": "center", 169 | "justifyContent": "space-between" 170 | }, 171 | "#title #name": { 172 | "fontSize": "40px", 173 | "marginLeft": "30px", 174 | "color": "#FFFFFF", 175 | "lines": 1, 176 | "_meta": { 177 | "ruleDef": [ 178 | { 179 | "t": "a", 180 | "n": "id", 181 | "i": false, 182 | "a": "equals", 183 | "v": "title" 184 | }, 185 | { 186 | "t": "d" 187 | }, 188 | { 189 | "t": "a", 190 | "n": "id", 191 | "i": false, 192 | "a": "equals", 193 | "v": "name" 194 | } 195 | ] 196 | } 197 | }, 198 | "#title #back": { 199 | "width": "50px", 200 | "height": "50px", 201 | "marginLeft": "25px", 202 | "_meta": { 203 | "ruleDef": [ 204 | { 205 | "t": "a", 206 | "n": "id", 207 | "i": false, 208 | "a": "equals", 209 | "v": "title" 210 | }, 211 | { 212 | "t": "d" 213 | }, 214 | { 215 | "t": "a", 216 | "n": "id", 217 | "i": false, 218 | "a": "equals", 219 | "v": "back" 220 | } 221 | ] 222 | } 223 | }, 224 | "#title>.actions": { 225 | "height": "100%", 226 | "alignItems": "center", 227 | "marginRight": "30px", 228 | "_meta": { 229 | "ruleDef": [ 230 | { 231 | "t": "a", 232 | "n": "id", 233 | "i": false, 234 | "a": "equals", 235 | "v": "title" 236 | }, 237 | { 238 | "t": "child" 239 | }, 240 | { 241 | "t": "a", 242 | "n": "class", 243 | "i": false, 244 | "a": "element", 245 | "v": "actions" 246 | } 247 | ] 248 | } 249 | }, 250 | ".search": { 251 | "width": "50px", 252 | "height": "50px", 253 | "backgroundImage": "/Common/Image/search.png", 254 | "marginRight": "50px" 255 | }, 256 | ".plus": { 257 | "width": "40px", 258 | "height": "40px", 259 | "backgroundImage": "/Common/Image/plus.png" 260 | } 261 | } 262 | 263 | /***/ }, 264 | 265 | /***/ 31: 266 | /***/ function(module, exports) { 267 | 268 | module.exports = function(module, exports, $app_require$){'use strict'; 269 | 270 | Object.defineProperty(exports, "__esModule", { 271 | value: true 272 | }); 273 | 274 | var _system = $app_require$('@app-module/system.router'); 275 | 276 | var _system2 = _interopRequireDefault(_system); 277 | 278 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 279 | 280 | exports.default = { 281 | props: ['showBack', 'showText', 'showPlus', 'showSearch', 'text'], 282 | data: {}, 283 | onInit: function onInit() {}, 284 | back: function back() { 285 | _system2.default.back(); 286 | } 287 | };} 288 | 289 | /***/ }, 290 | 291 | /***/ 54: 292 | /***/ function(module, exports) { 293 | 294 | module.exports = { 295 | "type": "div", 296 | "attr": { 297 | "id": "main" 298 | }, 299 | "id": "main", 300 | "children": [ 301 | { 302 | "type": "comp-title", 303 | "attr": { 304 | "showBack": "true", 305 | "showText": "true", 306 | "showPlus": "false", 307 | "showSearch": "false", 308 | "text": function () {return this.title} 309 | } 310 | }, 311 | { 312 | "type": "web", 313 | "attr": { 314 | "src": function () {return this.src}, 315 | "id": "web" 316 | }, 317 | "id": "web", 318 | "events": { 319 | "titlereceive": "onTitleReceive" 320 | } 321 | } 322 | ] 323 | } 324 | 325 | /***/ }, 326 | 327 | /***/ 55: 328 | /***/ function(module, exports) { 329 | 330 | module.exports = { 331 | "#main": { 332 | "flexDirection": "column" 333 | } 334 | } 335 | 336 | /***/ }, 337 | 338 | /***/ 56: 339 | /***/ function(module, exports) { 340 | 341 | module.exports = function(module, exports, $app_require$){'use strict'; 342 | 343 | Object.defineProperty(exports, "__esModule", { 344 | value: true 345 | }); 346 | 347 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; 348 | 349 | var _system = $app_require$('@app-module/system.router'); 350 | 351 | var _system2 = _interopRequireDefault(_system); 352 | 353 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 354 | 355 | exports.default = { 356 | props: ['src'], 357 | data: { 358 | src: "", 359 | title: "" 360 | }, 361 | onInit: function onInit() {}, 362 | onReady: function onReady() {}, 363 | onBackPress: function onBackPress() { 364 | this.$element('web').canBack({ 365 | callback: function (e) { 366 | if (e) { 367 | this.$element('web').back(); 368 | } else { 369 | _system2.default.back(); 370 | } 371 | }.bind(this) 372 | }); 373 | return true; 374 | }, 375 | onTitleReceive: function onTitleReceive(t) { 376 | this.title = t.title; 377 | } 378 | }; 379 | 380 | 381 | var moduleOwn = exports.default || module.exports; 382 | var accessors = ['public', 'protected', 'private']; 383 | 384 | if (moduleOwn.data && accessors.some(function (acc) { 385 | return moduleOwn[acc]; 386 | })) { 387 | throw new Error('页面VM对象中的属性data不可与"' + accessors.join(',') + '"同时存在,请使用private替换data名称'); 388 | } else if (!moduleOwn.data) { 389 | moduleOwn.data = {}; 390 | moduleOwn._descriptor = {}; 391 | accessors.forEach(function (acc) { 392 | var accType = _typeof(moduleOwn[acc]); 393 | if (accType === 'object') { 394 | moduleOwn.data = Object.assign(moduleOwn.data, moduleOwn[acc]); 395 | for (var name in moduleOwn[acc]) { 396 | moduleOwn._descriptor[name] = { access: acc }; 397 | } 398 | } else if (accType === 'function') { 399 | console.warn('页面VM对象中的属性' + acc + '的值不能是函数,请使用对象'); 400 | } 401 | }); 402 | }} 403 | 404 | /***/ } 405 | 406 | /******/ }); 407 | }; 408 | if (typeof window === "undefined") { 409 | return createPageHandler(); 410 | } 411 | else { 412 | window.createPageHandler = createPageHandler 413 | } 414 | })(); 415 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /build/Web/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///webpack/bootstrap eb081c1406219c276c17?c844*****","webpack:///./src/Web/index.ux?52db","webpack:///./src/Title/index.ux?66ab**","webpack:///./src/Title/index.ux?2057**","webpack:///./src/Title/index.ux?64cc**","webpack:///./src/Title/index.ux","webpack:///./src/Web/index.ux?dab4","webpack:///./src/Web/index.ux?1a8e","webpack:///./src/Web/index.ux"],"names":["props","data","onInit","back","src","title","onReady","onBackPress","$element","canBack","callback","e","bind","onTitleReceive","t","moduleOwn","exports","default","module","accessors","some","acc","Error","join","_descriptor","forEach","accType","Object","assign","name","access","console","warn"],"mappings":";;;;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;ACtCA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED,yCAAwC,0BAA0B;;;;;;;;ACdlE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;;;;;;;ACXD;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,iBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAiC;AACjC,YAAW;AACX;AACA;AACA,sCAAqC;AACrC;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,kCAAiC,qBAAqB;AACtD,mCAAkC;AAClC,YAAW;AACX;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,iBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAiC;AACjC,YAAW;AACX;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,kCAAiC;AACjC,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA,E;;;;;;;;;;;;;ACjGA;;;;;;mBACmB;AACXA,YAAO,CAAC,UAAD,EAAa,UAAb,EAAyB,UAAzB,EAAqC,YAArC,EAAmD,MAAnD,CADI;AAEXC,WAAM,EAFK;AAGXC,WAHW,oBAGF,CAAE,CAHA;AAIXC,SAJW,kBAIJ;AACH,0BAAOA,IAAP;AACH;AANU,E;;;;;;;ACDnB;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA6B;AAC7B;AACA,MAAK;AACL;AACA;AACA;AACA,6BAA4B,gBAAgB;AAC5C;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;;AC7BA;AACA;AACA;AACA;AACA,E;;;;;;;;;;;;;;;ACJA;;;;;;mBACmB;AACXH,YAAO,CAAC,KAAD,CADI;AAEXC,WAAM;AACFG,cAAK,EADH;AAEFC,gBAAO;AAFL,MAFK;AAMXH,WANW,oBAMF,CAER,CARU;AASXI,YATW,qBASD,CAET,CAXU;AAYXC,gBAZW,yBAYG;AACV,cAAKC,QAAL,CAAc,KAAd,EAAqBC,OAArB,CAA6B;AACzBC,uBAAU,UAASC,CAAT,EAAY;AAClB,qBAAIA,CAAJ,EAAO;AAEH,0BAAKH,QAAL,CAAc,KAAd,EAAqBL,IAArB;AACH,kBAHD,MAGO;AACH,sCAAOA,IAAP;AACH;AACJ,cAPS,CAORS,IAPQ,CAOH,IAPG;AADe,UAA7B;AAUA,gBAAO,IAAP;AACH,MAxBU;AAyBXC,mBAzBW,0BAyBIC,CAzBJ,EAyBO;AACd,cAAKT,KAAL,GAAaS,EAAET,KAAf;AACH;AA3BU,E;;;AA+BjB,KAAMU,YAAYC,QAAQC,OAAR,IAAmBC,OAAOF,OAA5C;AACA,KAAMG,YAAY,CAAC,QAAD,EAAW,WAAX,EAAwB,SAAxB,CAAlB;;AAEA,KAAIJ,UAAUd,IAAV,IAAkBkB,UAAUC,IAAV,CAAe,UAAUC,GAAV,EAAe;AAAE,YAAON,UAAUM,GAAV,CAAP;AAAuB,EAAvD,CAAtB,EAAgF;AAC9E,WAAM,IAAIC,KAAJ,CAAU,uBAAuBH,UAAUI,IAAV,CAAe,GAAf,CAAvB,GAA6C,0BAAvD,CAAN;AACD,EAFD,MAGK,IAAI,CAACR,UAAUd,IAAf,EAAqB;AACxBc,eAAUd,IAAV,GAAiB,EAAjB;AACAc,eAAUS,WAAV,GAAwB,EAAxB;AACAL,eAAUM,OAAV,CAAkB,UAAUJ,GAAV,EAAe;AAC/B,aAAMK,kBAAiBX,UAAUM,GAAV,CAAjB,CAAN;AACA,aAAIK,YAAY,QAAhB,EAA0B;AACxBX,uBAAUd,IAAV,GAAiB0B,OAAOC,MAAP,CAAcb,UAAUd,IAAxB,EAA8Bc,UAAUM,GAAV,CAA9B,CAAjB;AACA,kBAAK,IAAMQ,IAAX,IAAmBd,UAAUM,GAAV,CAAnB,EAAmC;AACjCN,2BAAUS,WAAV,CAAsBK,IAAtB,IAA8B,EAAEC,QAAQT,GAAV,EAA9B;AACD;AACF,UALD,MAMK,IAAIK,YAAY,UAAhB,EAA4B;AAC/BK,qBAAQC,IAAR,CAAa,eAAeX,GAAf,GAAqB,eAAlC;AACD;AACF,MAXD;AAYD,G","file":"Web/index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap eb081c1406219c276c17","require(\"!!../../node_modules/hap-tools/lib/loader.js?type=component!../Title?name=comp-title\")\nvar $app_template$ = require(\"!!../../node_modules/hap-tools/lib/json-loader.js!../../node_modules/hap-tools/lib/template-loader.js!../../node_modules/hap-tools/lib/fragment-loader.js?index=0&type=templates!./index.ux\")\nvar $app_style$ = require(\"!!../../node_modules/hap-tools/lib/json-loader.js!../../node_modules/hap-tools/lib/style-loader.js?index=0&type=styles!../../node_modules/hap-tools/lib/fragment-loader.js?index=0&type=styles!./index.ux\")\nvar $app_script$ = require(\"!!../../node_modules/hap-tools/lib/script-loader.js!babel-loader?presets[]=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\babel-preset-env&presets=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\babel-preset-env&plugins[]=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\hap-tools\\\\lib\\\\jsx-loader.js&plugins=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\hap-tools\\\\lib\\\\jsx-loader.js&comments=false!../../node_modules/hap-tools/lib/access-loader.js!../../node_modules/hap-tools/lib/fragment-loader.js?index=0&type=scripts!./index.ux?isEntry=true\")\n\n$app_define$('@app-component/index', [], function($app_require$, $app_exports$, $app_module$){\n $app_script$($app_module$, $app_exports$, $app_require$)\n if ($app_exports$.__esModule && $app_exports$.default) {\n $app_module$.exports = $app_exports$.default\n }\n $app_module$.exports.template = $app_template$\n $app_module$.exports.style = $app_style$\n})\n\n$app_bootstrap$('@app-component/index',{ packagerVersion: '0.0.5'})\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/Web/index.ux\n// module id = 0\n// module chunks = 7","var $app_template$ = require(\"!!../../node_modules/hap-tools/lib/json-loader.js!../../node_modules/hap-tools/lib/template-loader.js!../../node_modules/hap-tools/lib/fragment-loader.js?index=0&type=templates!./index.ux\")\nvar $app_style$ = require(\"!!../../node_modules/hap-tools/lib/json-loader.js!../../node_modules/hap-tools/lib/style-loader.js?index=0&type=styles!../../node_modules/hap-tools/lib/fragment-loader.js?index=0&type=styles!./index.ux\")\nvar $app_script$ = require(\"!!../../node_modules/hap-tools/lib/script-loader.js!babel-loader?presets[]=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\babel-preset-env&presets=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\babel-preset-env&plugins[]=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\hap-tools\\\\lib\\\\jsx-loader.js&plugins=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\hap-tools\\\\lib\\\\jsx-loader.js&comments=false!../../node_modules/hap-tools/lib/access-loader.js!../../node_modules/hap-tools/lib/fragment-loader.js?index=0&type=scripts!./index.ux?isEntry=false\")\n\n$app_define$('@app-component/comp-title', [], function($app_require$, $app_exports$, $app_module$){\n $app_script$($app_module$, $app_exports$, $app_require$)\n if ($app_exports$.__esModule && $app_exports$.default) {\n $app_module$.exports = $app_exports$.default\n }\n $app_module$.exports.template = $app_template$\n $app_module$.exports.style = $app_style$\n})\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/hap-tools/lib/loader.js?type=component!./src/Title/index.ux?name=comp-title\n// module id = 28\n// module chunks = 5 6 7","module.exports = {\n \"type\": \"div\",\n \"attr\": {\n \"id\": \"title\"\n },\n \"id\": \"title\",\n \"children\": [\n {\n \"type\": \"div\",\n \"attr\": {},\n \"classList\": [\n \"left\"\n ],\n \"children\": [\n {\n \"type\": \"image\",\n \"attr\": {\n \"id\": \"back\",\n \"src\": \"/Common/Image/back.png\",\n \"show\": function () {return this.showBack}\n },\n \"id\": \"back\",\n \"events\": {\n \"click\": function (evt) {this.back(evt)}\n }\n },\n {\n \"type\": \"text\",\n \"attr\": {\n \"id\": \"name\",\n \"show\": function () {return this.showText},\n \"value\": function () {return this.text}\n },\n \"id\": \"name\"\n }\n ]\n },\n {\n \"type\": \"div\",\n \"attr\": {},\n \"classList\": [\n \"actions\"\n ],\n \"children\": [\n {\n \"type\": \"div\",\n \"attr\": {\n \"show\": function () {return this.showSearch}\n },\n \"classList\": [\n \"search\"\n ]\n },\n {\n \"type\": \"div\",\n \"attr\": {\n \"show\": function () {return this.showPlus}\n },\n \"classList\": [\n \"plus\"\n ]\n }\n ]\n }\n ]\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/hap-tools/lib/json-loader.js!./~/hap-tools/lib/template-loader.js!./~/hap-tools/lib/fragment-loader.js?index=0&type=templates!./src/Title/index.ux\n// module id = 29\n// module chunks = 5 6 7","module.exports = {\n \"#title\": {\n \"backgroundColor\": \"#272727\",\n \"height\": \"100px\",\n \"alignItems\": \"center\",\n \"justifyContent\": \"space-between\"\n },\n \"#title #name\": {\n \"fontSize\": \"40px\",\n \"marginLeft\": \"30px\",\n \"color\": \"#FFFFFF\",\n \"lines\": 1,\n \"_meta\": {\n \"ruleDef\": [\n {\n \"t\": \"a\",\n \"n\": \"id\",\n \"i\": false,\n \"a\": \"equals\",\n \"v\": \"title\"\n },\n {\n \"t\": \"d\"\n },\n {\n \"t\": \"a\",\n \"n\": \"id\",\n \"i\": false,\n \"a\": \"equals\",\n \"v\": \"name\"\n }\n ]\n }\n },\n \"#title #back\": {\n \"width\": \"50px\",\n \"height\": \"50px\",\n \"marginLeft\": \"25px\",\n \"_meta\": {\n \"ruleDef\": [\n {\n \"t\": \"a\",\n \"n\": \"id\",\n \"i\": false,\n \"a\": \"equals\",\n \"v\": \"title\"\n },\n {\n \"t\": \"d\"\n },\n {\n \"t\": \"a\",\n \"n\": \"id\",\n \"i\": false,\n \"a\": \"equals\",\n \"v\": \"back\"\n }\n ]\n }\n },\n \"#title>.actions\": {\n \"height\": \"100%\",\n \"alignItems\": \"center\",\n \"marginRight\": \"30px\",\n \"_meta\": {\n \"ruleDef\": [\n {\n \"t\": \"a\",\n \"n\": \"id\",\n \"i\": false,\n \"a\": \"equals\",\n \"v\": \"title\"\n },\n {\n \"t\": \"child\"\n },\n {\n \"t\": \"a\",\n \"n\": \"class\",\n \"i\": false,\n \"a\": \"element\",\n \"v\": \"actions\"\n }\n ]\n }\n },\n \".search\": {\n \"width\": \"50px\",\n \"height\": \"50px\",\n \"backgroundImage\": \"/Common/Image/search.png\",\n \"marginRight\": \"50px\"\n },\n \".plus\": {\n \"width\": \"40px\",\n \"height\": \"40px\",\n \"backgroundImage\": \"/Common/Image/plus.png\"\n }\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/hap-tools/lib/json-loader.js!./~/hap-tools/lib/style-loader.js?index=0&type=styles!./~/hap-tools/lib/fragment-loader.js?index=0&type=styles!./src/Title/index.ux\n// module id = 30\n// module chunks = 5 6 7","import router from '@system.router'\r\n export default {\r\n props: ['showBack', 'showText', 'showPlus', 'showSearch', 'text'],\r\n data: {},\r\n onInit() {},\r\n back() {\r\n router.back()\r\n }\r\n }\n\n\n// WEBPACK FOOTER //\n// ./src/Title/index.ux?isEntry=false","module.exports = {\n \"type\": \"div\",\n \"attr\": {\n \"id\": \"main\"\n },\n \"id\": \"main\",\n \"children\": [\n {\n \"type\": \"comp-title\",\n \"attr\": {\n \"showBack\": \"true\",\n \"showText\": \"true\",\n \"showPlus\": \"false\",\n \"showSearch\": \"false\",\n \"text\": function () {return this.title}\n }\n },\n {\n \"type\": \"web\",\n \"attr\": {\n \"src\": function () {return this.src},\n \"id\": \"web\"\n },\n \"id\": \"web\",\n \"events\": {\n \"titlereceive\": \"onTitleReceive\"\n }\n }\n ]\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/hap-tools/lib/json-loader.js!./~/hap-tools/lib/template-loader.js!./~/hap-tools/lib/fragment-loader.js?index=0&type=templates!./src/Web/index.ux\n// module id = 54\n// module chunks = 7","module.exports = {\n \"#main\": {\n \"flexDirection\": \"column\"\n }\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/hap-tools/lib/json-loader.js!./~/hap-tools/lib/style-loader.js?index=0&type=styles!./~/hap-tools/lib/fragment-loader.js?index=0&type=styles!./src/Web/index.ux\n// module id = 55\n// module chunks = 7","import router from '@system.router'\r\n export default {\r\n props: ['src'],\r\n data: {\r\n src: \"\",\r\n title: \"\"\r\n },\r\n onInit() {\r\n\r\n },\r\n onReady() {\r\n\r\n },\r\n onBackPress() {\r\n this.$element('web').canBack({\r\n callback: function(e) {\r\n if (e) {\r\n // 加载历史列表中的上一个 URL\r\n this.$element('web').back()\r\n } else {\r\n router.back()\r\n }\r\n }.bind(this)\r\n })\r\n return true // 阻止默认行为,等待异步操作\r\n },\r\n onTitleReceive(t) {\r\n this.title = t.title\r\n }\r\n\r\n }\n\n const moduleOwn = exports.default || module.exports\n const accessors = ['public', 'protected', 'private']\n\n if (moduleOwn.data && accessors.some(function (acc) { return moduleOwn[acc] })) {\n throw new Error('页面VM对象中的属性data不可与\"' + accessors.join(',') + '\"同时存在,请使用private替换data名称')\n }\n else if (!moduleOwn.data) {\n moduleOwn.data = {}\n moduleOwn._descriptor = {}\n accessors.forEach(function (acc) {\n const accType = typeof moduleOwn[acc]\n if (accType === 'object') {\n moduleOwn.data = Object.assign(moduleOwn.data, moduleOwn[acc])\n for (const name in moduleOwn[acc]) {\n moduleOwn._descriptor[name] = { access: acc }\n }\n }\n else if (accType === 'function') {\n console.warn('页面VM对象中的属性' + acc + '的值不能是函数,请使用对象')\n }\n })\n }\n\n\n\n// WEBPACK FOOTER //\n// ./src/Web/index.ux?isEntry=true"],"sourceRoot":""} -------------------------------------------------------------------------------- /build/Welcome/index.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | 3 | var createPageHandler = function() { 4 | return /******/ (function(modules) { // webpackBootstrap 5 | /******/ // The module cache 6 | /******/ var installedModules = {}; 7 | /******/ 8 | /******/ // The require function 9 | /******/ function __webpack_require__(moduleId) { 10 | /******/ 11 | /******/ // Check if module is in cache 12 | /******/ if(installedModules[moduleId]) 13 | /******/ return installedModules[moduleId].exports; 14 | /******/ 15 | /******/ // Create a new module (and put it into the cache) 16 | /******/ var module = installedModules[moduleId] = { 17 | /******/ exports: {}, 18 | /******/ id: moduleId, 19 | /******/ loaded: false 20 | /******/ }; 21 | /******/ 22 | /******/ // Execute the module function 23 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 24 | /******/ 25 | /******/ // Flag the module as loaded 26 | /******/ module.loaded = true; 27 | /******/ 28 | /******/ // Return the exports of the module 29 | /******/ return module.exports; 30 | /******/ } 31 | /******/ 32 | /******/ 33 | /******/ // expose the modules object (__webpack_modules__) 34 | /******/ __webpack_require__.m = modules; 35 | /******/ 36 | /******/ // expose the module cache 37 | /******/ __webpack_require__.c = installedModules; 38 | /******/ 39 | /******/ // __webpack_public_path__ 40 | /******/ __webpack_require__.p = ""; 41 | /******/ 42 | /******/ // Load entry module and return exports 43 | /******/ return __webpack_require__(0); 44 | /******/ }) 45 | /************************************************************************/ 46 | /******/ ({ 47 | 48 | /***/ 0: 49 | /***/ function(module, exports, __webpack_require__) { 50 | 51 | var $app_template$ = __webpack_require__(57) 52 | var $app_style$ = __webpack_require__(58) 53 | var $app_script$ = __webpack_require__(59) 54 | 55 | $app_define$('@app-component/index', [], function($app_require$, $app_exports$, $app_module$){ 56 | $app_script$($app_module$, $app_exports$, $app_require$) 57 | if ($app_exports$.__esModule && $app_exports$.default) { 58 | $app_module$.exports = $app_exports$.default 59 | } 60 | $app_module$.exports.template = $app_template$ 61 | $app_module$.exports.style = $app_style$ 62 | }) 63 | 64 | $app_bootstrap$('@app-component/index',{ packagerVersion: '0.0.5'}) 65 | 66 | 67 | /***/ }, 68 | 69 | /***/ 57: 70 | /***/ function(module, exports) { 71 | 72 | module.exports = { 73 | "type": "div", 74 | "attr": { 75 | "id": "main" 76 | }, 77 | "id": "main" 78 | } 79 | 80 | /***/ }, 81 | 82 | /***/ 58: 83 | /***/ function(module, exports) { 84 | 85 | module.exports = { 86 | "#main": { 87 | "backgroundImage": "/Common/Image/lanucher.jpg", 88 | "backgroundSize": "cover" 89 | } 90 | } 91 | 92 | /***/ }, 93 | 94 | /***/ 59: 95 | /***/ function(module, exports) { 96 | 97 | module.exports = function(module, exports, $app_require$){'use strict'; 98 | 99 | Object.defineProperty(exports, "__esModule", { 100 | value: true 101 | }); 102 | 103 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; 104 | 105 | var _system = $app_require$('@app-module/system.router'); 106 | 107 | var _system2 = _interopRequireDefault(_system); 108 | 109 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 110 | 111 | exports.default = { 112 | onInit: function onInit() { 113 | setTimeout(function () { 114 | _system2.default.replace({ 115 | uri: '/Main' 116 | }); 117 | }, 1000); 118 | } 119 | }; 120 | 121 | 122 | var moduleOwn = exports.default || module.exports; 123 | var accessors = ['public', 'protected', 'private']; 124 | 125 | if (moduleOwn.data && accessors.some(function (acc) { 126 | return moduleOwn[acc]; 127 | })) { 128 | throw new Error('页面VM对象中的属性data不可与"' + accessors.join(',') + '"同时存在,请使用private替换data名称'); 129 | } else if (!moduleOwn.data) { 130 | moduleOwn.data = {}; 131 | moduleOwn._descriptor = {}; 132 | accessors.forEach(function (acc) { 133 | var accType = _typeof(moduleOwn[acc]); 134 | if (accType === 'object') { 135 | moduleOwn.data = Object.assign(moduleOwn.data, moduleOwn[acc]); 136 | for (var name in moduleOwn[acc]) { 137 | moduleOwn._descriptor[name] = { access: acc }; 138 | } 139 | } else if (accType === 'function') { 140 | console.warn('页面VM对象中的属性' + acc + '的值不能是函数,请使用对象'); 141 | } 142 | }); 143 | }} 144 | 145 | /***/ } 146 | 147 | /******/ }); 148 | }; 149 | if (typeof window === "undefined") { 150 | return createPageHandler(); 151 | } 152 | else { 153 | window.createPageHandler = createPageHandler 154 | } 155 | })(); 156 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /build/Welcome/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///webpack/bootstrap eb081c1406219c276c17?c844******","webpack:///./src/Welcome/index.ux?bcc9","webpack:///./src/Welcome/index.ux?44c5","webpack:///./src/Welcome/index.ux?9c2a","webpack:///./src/Welcome/index.ux"],"names":["onInit","setTimeout","replace","uri","moduleOwn","exports","default","module","accessors","data","some","acc","Error","join","_descriptor","forEach","accType","Object","assign","name","access","console","warn"],"mappings":";;;;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;ACtCA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED,yCAAwC,0BAA0B;;;;;;;;ACblE;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,E;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA,E;;;;;;;;;;;;;;;ACLA;;;;;;mBAKmB;AACXA,SADW,oBACF;AACLC,gBAAW,YAAW;AAClB,wBAAOC,OAAP,CAAe;AACXC,cAAK;AADM,QAAf;AAGH,MAJD,EAIG,IAJH;AAKH;AAPU,E;;;AAUjB,KAAMC,YAAYC,QAAQC,OAAR,IAAmBC,OAAOF,OAA5C;AACA,KAAMG,YAAY,CAAC,QAAD,EAAW,WAAX,EAAwB,SAAxB,CAAlB;;AAEA,KAAIJ,UAAUK,IAAV,IAAkBD,UAAUE,IAAV,CAAe,UAAUC,GAAV,EAAe;AAAE,UAAOP,UAAUO,GAAV,CAAP;AAAuB,EAAvD,CAAtB,EAAgF;AAC9E,SAAM,IAAIC,KAAJ,CAAU,uBAAuBJ,UAAUK,IAAV,CAAe,GAAf,CAAvB,GAA6C,0BAAvD,CAAN;AACD,EAFD,MAGK,IAAI,CAACT,UAAUK,IAAf,EAAqB;AACxBL,aAAUK,IAAV,GAAiB,EAAjB;AACAL,aAAUU,WAAV,GAAwB,EAAxB;AACAN,aAAUO,OAAV,CAAkB,UAAUJ,GAAV,EAAe;AAC/B,SAAMK,kBAAiBZ,UAAUO,GAAV,CAAjB,CAAN;AACA,SAAIK,YAAY,QAAhB,EAA0B;AACxBZ,iBAAUK,IAAV,GAAiBQ,OAAOC,MAAP,CAAcd,UAAUK,IAAxB,EAA8BL,UAAUO,GAAV,CAA9B,CAAjB;AACA,YAAK,IAAMQ,IAAX,IAAmBf,UAAUO,GAAV,CAAnB,EAAmC;AACjCP,mBAAUU,WAAV,CAAsBK,IAAtB,IAA8B,EAAEC,QAAQT,GAAV,EAA9B;AACD;AACF,MALD,MAMK,IAAIK,YAAY,UAAhB,EAA4B;AAC/BK,eAAQC,IAAR,CAAa,eAAeX,GAAf,GAAqB,eAAlC;AACD;AACF,IAXD;AAYD,G","file":"Welcome/index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap eb081c1406219c276c17","var $app_template$ = require(\"!!../../node_modules/hap-tools/lib/json-loader.js!../../node_modules/hap-tools/lib/template-loader.js!../../node_modules/hap-tools/lib/fragment-loader.js?index=0&type=templates!./index.ux\")\nvar $app_style$ = require(\"!!../../node_modules/hap-tools/lib/json-loader.js!../../node_modules/hap-tools/lib/style-loader.js?index=0&type=styles!../../node_modules/hap-tools/lib/fragment-loader.js?index=0&type=styles!./index.ux\")\nvar $app_script$ = require(\"!!../../node_modules/hap-tools/lib/script-loader.js!babel-loader?presets[]=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\babel-preset-env&presets=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\babel-preset-env&plugins[]=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\hap-tools\\\\lib\\\\jsx-loader.js&plugins=C:\\\\dev\\\\project\\\\node\\\\quickapp-wechat\\\\node_modules\\\\hap-tools\\\\lib\\\\jsx-loader.js&comments=false!../../node_modules/hap-tools/lib/access-loader.js!../../node_modules/hap-tools/lib/fragment-loader.js?index=0&type=scripts!./index.ux?isEntry=true\")\n\n$app_define$('@app-component/index', [], function($app_require$, $app_exports$, $app_module$){\n $app_script$($app_module$, $app_exports$, $app_require$)\n if ($app_exports$.__esModule && $app_exports$.default) {\n $app_module$.exports = $app_exports$.default\n }\n $app_module$.exports.template = $app_template$\n $app_module$.exports.style = $app_style$\n})\n\n$app_bootstrap$('@app-component/index',{ packagerVersion: '0.0.5'})\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/Welcome/index.ux\n// module id = 0\n// module chunks = 8","module.exports = {\n \"type\": \"div\",\n \"attr\": {\n \"id\": \"main\"\n },\n \"id\": \"main\"\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/hap-tools/lib/json-loader.js!./~/hap-tools/lib/template-loader.js!./~/hap-tools/lib/fragment-loader.js?index=0&type=templates!./src/Welcome/index.ux\n// module id = 57\n// module chunks = 8","module.exports = {\n \"#main\": {\n \"backgroundImage\": \"/Common/Image/lanucher.jpg\",\n \"backgroundSize\": \"cover\"\n }\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/hap-tools/lib/json-loader.js!./~/hap-tools/lib/style-loader.js?index=0&type=styles!./~/hap-tools/lib/fragment-loader.js?index=0&type=styles!./src/Welcome/index.ux\n// module id = 58\n// module chunks = 8","import router from '@system.router'\r\n\r\n\r\n\r\n\r\n export default {\r\n onInit() {\r\n setTimeout(function() {\r\n router.replace({\r\n uri: '/Main'\r\n })\r\n }, 1000)\r\n }\r\n }\n\n const moduleOwn = exports.default || module.exports\n const accessors = ['public', 'protected', 'private']\n\n if (moduleOwn.data && accessors.some(function (acc) { return moduleOwn[acc] })) {\n throw new Error('页面VM对象中的属性data不可与\"' + accessors.join(',') + '\"同时存在,请使用private替换data名称')\n }\n else if (!moduleOwn.data) {\n moduleOwn.data = {}\n moduleOwn._descriptor = {}\n accessors.forEach(function (acc) {\n const accType = typeof moduleOwn[acc]\n if (accType === 'object') {\n moduleOwn.data = Object.assign(moduleOwn.data, moduleOwn[acc])\n for (const name in moduleOwn[acc]) {\n moduleOwn._descriptor[name] = { access: acc }\n }\n }\n else if (accType === 'function') {\n console.warn('页面VM对象中的属性' + acc + '的值不能是函数,请使用对象')\n }\n })\n }\n\n\n\n// WEBPACK FOOTER //\n// ./src/Welcome/index.ux?isEntry=true"],"sourceRoot":""} -------------------------------------------------------------------------------- /build/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "package": "com.application.demo", 3 | "name": "quickapp-wechat", 4 | "versionName": "1.0.0", 5 | "versionCode": "1", 6 | "minPlatformVersion": "101", 7 | "icon": "/Common/Image/logo.png", 8 | "features": [ 9 | { 10 | "name": "system.prompt" 11 | }, 12 | { 13 | "name": "system.device" 14 | }, 15 | { 16 | "name": "system.router" 17 | }, 18 | { 19 | "name": "system.shortcut" 20 | }, 21 | { 22 | "name": "system.webview" 23 | }, 24 | { 25 | "name": "system.prompt" 26 | } 27 | ], 28 | "permissions": [ 29 | { 30 | "origin": "*" 31 | } 32 | ], 33 | "config": { 34 | "logLevel": "debug" 35 | }, 36 | "router": { 37 | "entry": "Demo/comm", 38 | "pages": { 39 | "Welcome": { 40 | "component": "index" 41 | }, 42 | "Main": { 43 | "component": "index" 44 | }, 45 | "Demo": { 46 | "component": "index" 47 | }, 48 | "DemoDetail": { 49 | "component": "index" 50 | }, 51 | "About": { 52 | "component": "index" 53 | }, 54 | "GZH": { 55 | "component": "index" 56 | }, 57 | "Web": { 58 | "component": "index" 59 | }, 60 | "Demo/comm": { 61 | "component": "father" 62 | }, 63 | "Demo/comm2": { 64 | "component": "father" 65 | } 66 | } 67 | }, 68 | "display": { 69 | "titleBarBackgroundColor": "#272727", 70 | "titleBarTextColor": "#414141", 71 | "menu": true, 72 | "pages": { 73 | "Welcome": { 74 | "fullScreen": true, 75 | "titleBar": false 76 | }, 77 | "Main": { 78 | "titleBar": false 79 | }, 80 | "Demo": { 81 | "titleBarText": "示例页", 82 | "menu": false 83 | }, 84 | "DemoDetail": { 85 | "titleBarText": "详情页" 86 | }, 87 | "About": { 88 | "menu": false 89 | }, 90 | "GZH": { 91 | "titleBar": false 92 | }, 93 | "Web": { 94 | "titleBar": false 95 | } 96 | } 97 | } 98 | } -------------------------------------------------------------------------------- /dist/com.application.demo.rpk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/dist/com.application.demo.rpk -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "quickapp-wechat", 3 | "version": "1.0.0", 4 | "subversion": { 5 | "toolkit": "0.0.26", 6 | "packager": "0.0.5" 7 | }, 8 | "description": "", 9 | "scripts": { 10 | "build": "cross-env NODE_PLATFORM=na NODE_PHASE=dv webpack --config ./node_modules/hap-tools/webpack.config.js", 11 | "release": "cross-env NODE_PLATFORM=na NODE_PHASE=ol webpack --config ./node_modules/hap-tools/webpack.config.js", 12 | "clear": "rm -rf build/* && rm -rf dist/*", 13 | "server": "cross-env NODE_MOUNTED_ROUTER=\"debug bundle\" node ./node_modules/hap-tools/debugger/server/index.js", 14 | "debug": "npm run server -- --debug-only --port=8081", 15 | "notify": "node ./node_modules/hap-tools/debugger/command/notify.js", 16 | "watch": "cross-env NODE_PLATFORM=na NODE_PHASE=dv webpack --config ./node_modules/hap-tools/webpack.config.js --watch", 17 | "watch:na": "npm run na:dv -- --watch", 18 | "na": "npm run na:dv -- --watch", 19 | "lint": "./node_modules/.bin/eslint src/", 20 | "na:dv": "cross-env NODE_PLATFORM=na NODE_PHASE=dv webpack --config ./node_modules/hap-tools/webpack.config.js", 21 | "na:qa": "cross-env NODE_PLATFORM=na NODE_PHASE=qa webpack --config ./node_modules/hap-tools/webpack.config.js", 22 | "na:ol": "cross-env NODE_PLATFORM=na NODE_PHASE=ol webpack --config ./node_modules/hap-tools/webpack.config.js", 23 | "postinstall": "npm run postinstall:koaStatic && npm run postinstall:koaSend", 24 | "postinstall:koaStatic": "babel -d ./node_modules/koa-static ./node_modules/koa-static", 25 | "postinstall:koaSend": "babel -d ./node_modules/koa-send ./node_modules/koa-send" 26 | }, 27 | "dependencies": { 28 | "archiver": "^1.3.0", 29 | "babel-polyfill": "^6.26.0", 30 | "babel-preset-env": "^1.6.0", 31 | "babel-plugin-transform-runtime": "^6.9.0", 32 | "babel-runtime": "^6.9.2", 33 | "babel-template": "^6.24.1", 34 | "babel-traverse": "^6.24.1", 35 | "babel-types": "^6.24.1", 36 | "babylon": "^6.17.0", 37 | "babylon-jsx": "^1.0.0", 38 | "browserify": "^13.1.1", 39 | "chalk": "^1.1.3", 40 | "css": "~2.2.1", 41 | "escodegen": "~1.7.1", 42 | "esprima": "~2.7.0", 43 | "fs-extra": "^3.0.1", 44 | "fsmonitor": "^0.2.4", 45 | "hash-sum": "^1.0.2", 46 | "loader-utils": "~0.2.14", 47 | "md5": "^2.1.0", 48 | "parse5": "^3.0.0", 49 | "prompt": "^1.0.0", 50 | "qr-image": "^3.2.0", 51 | "resolve-bin": "^0.4.0", 52 | "serve": "^3.4.0", 53 | "source-map": "^0.5.6", 54 | "xtoolkit": "^0.1.7", 55 | "yargs": "^6.6.0", 56 | "jsrsasign": "^7.1.2", 57 | "jsrsasign-util": "^1.0.0", 58 | "qrcode-terminal": "^0.11.0", 59 | "socket.io": "^2.0.3", 60 | "tar": "^3.1.5" 61 | }, 62 | "devDependencies": { 63 | "babel-cli": "^6.10.1", 64 | "babel-core": "^6.10.4", 65 | "babel-eslint": "^8.2.1", 66 | "babel-loader": "^6.2.4", 67 | "babel-plugin-syntax-jsx": "^6.18.0", 68 | "babel-polyfill": "^6.23.0", 69 | "cross-env": "^3.2.4", 70 | "css-what": "^2.1.0", 71 | "eslint": "^4.3.0", 72 | "eslint-plugin-hybrid": "~0.0.1", 73 | "file-loader": "^0.9.0", 74 | "html-webpack-plugin": "^2.28.0", 75 | "hybrid-chai": "~0.0.1", 76 | "hybrid-mocha": "~0.0.1", 77 | "js-base64": "^2.1.9", 78 | "koa": "^2.3.0", 79 | "koa-body": "^2.5.0", 80 | "koa-router": "^7.2.1", 81 | "koa-send": "^4.1.1", 82 | "koa-static": "^4.0.1", 83 | "sinon": "^1.17.3", 84 | "sinon-chai": "^2.8.0", 85 | "url-loader": "^0.5.7", 86 | "webdriverio": "^4.8.0", 87 | "webpack": "~1.13.0", 88 | "webpack-dev-server": "^1.16.5" 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /sign/debug/certificate.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDMTCCAhmgAwIBAgIJAMKpjyszxkDpMA0GCSqGSIb3DQEBCwUAMC4xCzAJBgNV 3 | BAYTAkNOMQwwCgYDVQQKDANSUEsxETAPBgNVBAMMCFJQS0RlYnVnMCAXDTE3MDQx 4 | OTAyMzE0OVoYDzIxMTYwMzI2MDIzMTQ5WjAuMQswCQYDVQQGEwJDTjEMMAoGA1UE 5 | CgwDUlBLMREwDwYDVQQDDAhSUEtEZWJ1ZzCCASIwDQYJKoZIhvcNAQEBBQADggEP 6 | ADCCAQoCggEBAK3kPd9jzvTctTIA3XNZVv9cHHDbAc6nTBfdZp9mtPOTkXFpvyCb 7 | kL0QjOog0+1pv8D7dFeP4ptWXU5CT3ImvaPR+16dAtMRcsxEr5q4zieJzx3O6huL 8 | UBa1k+xrzjXpRzkcOysmc8fTxt0tAwbDgJ2AA5TlXLTcVyb7GmJ+hl5CjnhoG5NN 9 | LrkqI7S29c1U3uokj8Q7hzaj0TURu/uB5ZIMCLZY9KFDugqaEcvmUyJiD0fuV6sA 10 | O/4kpiZUOnhV8/xWpRbMI4WFQsfgLOCV+X9uzUa29D677y//46t/EDSuQTHyBZbl 11 | AcNMENkpMWZsH7J/+F19+U0/Hd5bJgneVRkCAwEAAaNQME4wHQYDVR0OBBYEFKDN 12 | SZtt47ttOBDQzIchFYyxsg3mMB8GA1UdIwQYMBaAFKDNSZtt47ttOBDQzIchFYyx 13 | sg3mMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBABaZctNrn4gLmNf/ 14 | eNJ3x5CJIPjPwm6j9nwKhtadJ6BF+TIzSkJuHSgxULjW436F37otv94NPzT5PCBF 15 | WxgXoqgLqnWwvsaqC4LUEjsZviWW4CB824YDUquEUVGFLE/U5KTZ7Kh1ceyUk4N8 16 | +mtkXkanWoBBk0OF24lNrAsNLB63yTLr9HxEe75+kmvxf1qVJUGtaOEWIhiFMiAB 17 | 5D4w/j2EFWktumjuy5TTwU0zhl52bc8V9SNixM1IaqzNrVPrdjv8viUX548pU3WT 18 | xZ5ylDsxhMC1q4BXQVeIY8C0cMEX+WHOmOCvWrkxCkP91pKsSPkuVrWlzrkn8Ojo 19 | swP6sBw= 20 | -----END CERTIFICATE----- 21 | -------------------------------------------------------------------------------- /sign/debug/private.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCt5D3fY8703LUy 3 | AN1zWVb/XBxw2wHOp0wX3WafZrTzk5Fxab8gm5C9EIzqINPtab/A+3RXj+KbVl1O 4 | Qk9yJr2j0ftenQLTEXLMRK+auM4nic8dzuobi1AWtZPsa8416Uc5HDsrJnPH08bd 5 | LQMGw4CdgAOU5Vy03Fcm+xpifoZeQo54aBuTTS65KiO0tvXNVN7qJI/EO4c2o9E1 6 | Ebv7geWSDAi2WPShQ7oKmhHL5lMiYg9H7lerADv+JKYmVDp4VfP8VqUWzCOFhULH 7 | 4Czglfl/bs1GtvQ+u+8v/+OrfxA0rkEx8gWW5QHDTBDZKTFmbB+yf/hdfflNPx3e 8 | WyYJ3lUZAgMBAAECggEBAJTnCBBdUB+fSs1prjeS/gsmnfgJoY+K9H7PCIxgj3yw 9 | FXAvZAmRDKzJGlF2EOOQlTG0YNiGDj6EAtv7rjoKcINyULSg8IU6wLmn61MrAuUa 10 | fa+Bujgh4E/B5swhOHAztNhzkzsM70Hi17wXSislh+HWd7qteOgqcbqgdOR4gaj+ 11 | HUqtcxG3H3hCL3dWugnjLZMtestLKGHSSZvbQNjYM3kKy2LvO8NpxmDE4a+TXygK 12 | qhaZjmS/dc/nJBJzOfkzby58RvGbzlJflfW/Uu3/gizj13GFQKWonq1xh630RAhv 13 | xX5ySok2aAx/+/SiJSpNXvM09grQuoORSr7D1tm+5rECgYEA3vf0hRfua0XAOu6f 14 | pyzNvLRRJ/pEew7XpNPCyS2TuMTd1yvXjGVxQfP46N6x1IM3SRU0zE+LSk80EF7l 15 | u1Or7GyCEhabYNe/7P2F8ENP73Do0HwvcI1jGrgr6r9oK0J27Xei+f6Q0bgJOPI2 16 | qaLj+V37cOjkNSM1mhTjtDwK8k0CgYEAx6cMrkjHl1+lDIIOc3qAEL3jb3xQveYk 17 | WrMF/B+j048k6boU4VvFJAIyQxOxMNxLjw3/9+zXCFJT4WaZK3TMXlg614ASGx3H 18 | tKjJM9O07ywwMq1gbutFS4nHCg3L3Os6esL0SPwMdATR3Yh22n5OGI9o+/aURulL 19 | GPEXef1Z2/0CgYEAgmwp5LxV4vu+8Pnp+4DSq4ISQr861XyeGTUhKEp3sUm+tgFY 20 | KTChakHKpHS3Mqa6bQ5xft08je/8dWL9IHFWDIqAHxKIOsKY6oh1k0/cbyPtmx45 21 | Ja4efV+jmMHzrfJH3KnxdCg7D+GFy4CrBtlYXuJhlO81pft9fC6h7yh8ArUCgYBq 22 | gvkl5Zftbs4rnRq+iqTVyagTKvwcQzIz3PwdZHfO/rfPpUFMdNv4eN99n3zRN0Vs 23 | HSjoiEazntA3GLgwUdBRqLpDi4SdSMbo337vkksdqbJQ5uPiaMuAIBG6kF+pDSkW 24 | ovkWErlGD+gySoI10FozihaVDRhPuFgjB0PiBcIxtQKBgGNSzX+Bx5+ux1Qny0Sn 25 | SUcBtepLnO8M8wafoGNyehbMnLzfuMbaDiJOdozGlBNHZTtPB3r4AYb8WnltdKW0 26 | 7i3fk26YZGiMVeUJvewA6/LOBEaqMdwoNwnoptvbR6ehHeE/PPtRtge2cD3bPIM7 27 | U9VlWgfgj9Dxfwhslqb9hmyp 28 | -----END PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /src/About/index.ux: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{name}} 8 | 9 | 10 | 11 | 无安装 12 | | 13 | 体积小 14 | | 15 | 一步直达 16 | 17 | 18 | 19 | {{desc}} 20 | 21 | 22 | 23 | 服务类型 24 | {{serviceType}} 25 | 26 | 27 | 主体信息 28 | {{subjectInfo}} 29 | 30 | 31 | 32 | 33 | 34 | 35 | {{copyright}} 36 | 37 | 38 | 39 | 135 | 136 | 162 | -------------------------------------------------------------------------------- /src/Common/Image/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/src/Common/Image/back.png -------------------------------------------------------------------------------- /src/Common/Image/contact_list_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/src/Common/Image/contact_list_normal.png -------------------------------------------------------------------------------- /src/Common/Image/contact_list_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/src/Common/Image/contact_list_pressed.png -------------------------------------------------------------------------------- /src/Common/Image/dingyue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/src/Common/Image/dingyue.png -------------------------------------------------------------------------------- /src/Common/Image/find_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/src/Common/Image/find_normal.png -------------------------------------------------------------------------------- /src/Common/Image/find_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/src/Common/Image/find_pressed.png -------------------------------------------------------------------------------- /src/Common/Image/icon_de_nearby.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/src/Common/Image/icon_de_nearby.png -------------------------------------------------------------------------------- /src/Common/Image/icon_de_ping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/src/Common/Image/icon_de_ping.png -------------------------------------------------------------------------------- /src/Common/Image/icon_de_saoyisao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/src/Common/Image/icon_de_saoyisao.png -------------------------------------------------------------------------------- /src/Common/Image/icon_de_yao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/src/Common/Image/icon_de_yao.png -------------------------------------------------------------------------------- /src/Common/Image/icon_me_card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/src/Common/Image/icon_me_card.png -------------------------------------------------------------------------------- /src/Common/Image/icon_me_collect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/src/Common/Image/icon_me_collect.png -------------------------------------------------------------------------------- /src/Common/Image/icon_me_money.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/src/Common/Image/icon_me_money.png -------------------------------------------------------------------------------- /src/Common/Image/icon_me_photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/src/Common/Image/icon_me_photo.png -------------------------------------------------------------------------------- /src/Common/Image/icon_me_setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/src/Common/Image/icon_me_setting.png -------------------------------------------------------------------------------- /src/Common/Image/icon_me_smail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/src/Common/Image/icon_me_smail.png -------------------------------------------------------------------------------- /src/Common/Image/lanucher.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/src/Common/Image/lanucher.jpg -------------------------------------------------------------------------------- /src/Common/Image/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/src/Common/Image/logo.png -------------------------------------------------------------------------------- /src/Common/Image/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/src/Common/Image/plus.png -------------------------------------------------------------------------------- /src/Common/Image/profile_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/src/Common/Image/profile_normal.png -------------------------------------------------------------------------------- /src/Common/Image/profile_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/src/Common/Image/profile_pressed.png -------------------------------------------------------------------------------- /src/Common/Image/qr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/src/Common/Image/qr.png -------------------------------------------------------------------------------- /src/Common/Image/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/src/Common/Image/search.png -------------------------------------------------------------------------------- /src/Common/Image/v2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/src/Common/Image/v2.png -------------------------------------------------------------------------------- /src/Common/Image/wechat.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/src/Common/Image/wechat.ttf -------------------------------------------------------------------------------- /src/Common/Image/weixin_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/src/Common/Image/weixin_normal.png -------------------------------------------------------------------------------- /src/Common/Image/weixin_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yale8848/quickapp-wechat/4d70c64803a663cb2f54a16edfc748647e9024f2/src/Common/Image/weixin_pressed.png -------------------------------------------------------------------------------- /src/Common/css/list.css: -------------------------------------------------------------------------------- 1 | .content-item { 2 | align-items: center; 3 | justify-content: space-between; 4 | padding: 20px; 5 | border-bottom-color: #eeeeee; 6 | border-bottom-width: 1px; 7 | } 8 | 9 | .content-item>.right { 10 | flex-direction: column; 11 | height: 100%; 12 | } 13 | 14 | .content-item>.right text { 15 | color: #aaaaaa; 16 | font-size: 30px; 17 | } 18 | 19 | .content-item>.left { 20 | align-items: center 21 | } 22 | 23 | .content-item>.left>.img { 24 | width: 80px; 25 | height: 80px; 26 | } 27 | 28 | .content-item>.left>.texts { 29 | flex-direction: column; 30 | margin-left: 20px; 31 | } 32 | 33 | .content-item>.left .name { 34 | color: #000000; 35 | font-size: 36px; 36 | } 37 | 38 | .content-item>.left .msg { 39 | font-size: 28px; 40 | color: #aaaaaa; 41 | } -------------------------------------------------------------------------------- /src/Common/css/title.css: -------------------------------------------------------------------------------- 1 | #title { 2 | background-color: #272727; 3 | height: 100px; 4 | align-items: center; 5 | justify-content: space-between 6 | } 7 | 8 | #title #name { 9 | font-size: 40px; 10 | margin-left: 30px; 11 | color: #FFFFFF; 12 | } 13 | 14 | #title #back { 15 | width: 50px; 16 | height: 50px; 17 | margin-left: 30px; 18 | } 19 | 20 | #title>.actions { 21 | height: 100%; 22 | align-items: center; 23 | margin-right: 30px; 24 | } 25 | 26 | .search { 27 | width: 50px; 28 | height: 50px; 29 | background-image: url(/Common/Image/search.png); 30 | margin-right: 50px; 31 | } 32 | 33 | .plus { 34 | width: 40px; 35 | height: 40px; 36 | background-image: url(/Common/Image/plus.png); 37 | } -------------------------------------------------------------------------------- /src/Demo/comm/father.ux: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | father area: 7 | 8 | son say:{{say}} 9 | 10 | 11 | 12 | 13 | 32 | -------------------------------------------------------------------------------- /src/Demo/comm/son.ux: -------------------------------------------------------------------------------- 1 | 2 | 3 | son area: 4 | 5 | father say : {{say}} > 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 39 | -------------------------------------------------------------------------------- /src/Demo/comm2/father.ux: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | father area: 9 | 10 | 11 | 12 | 13 | 14 | 15 | 34 | -------------------------------------------------------------------------------- /src/Demo/comm2/son.ux: -------------------------------------------------------------------------------- 1 | 2 | 3 | son1 area: 4 | 5 | brather say : {{say}} > 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 37 | -------------------------------------------------------------------------------- /src/Demo/comm2/son2.ux: -------------------------------------------------------------------------------- 1 | 2 | 3 | son2 area: 4 | 5 | brather say : {{say}} > 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 37 | -------------------------------------------------------------------------------- /src/Demo/index.ux: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 欢迎打开{{title}} 5 | 6 | 7 | 8 | 9 | 10 | 32 | 33 | 48 | -------------------------------------------------------------------------------- /src/Demo/webtest/index.ux: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 欢迎打开{{title}} 5 | 6 | 7 | 8 | 9 | 10 | 32 | 33 | 48 | -------------------------------------------------------------------------------- /src/DemoDetail/index.ux: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{text}} 5 | 6 | 7 | 8 | 20 | 21 | 35 | -------------------------------------------------------------------------------- /src/GZH/index.ux: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | {{$item.name}} 14 | {{$item.text}} 15 | 16 | 17 | 18 | 19 | {{$item.time}} 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 35 | -------------------------------------------------------------------------------- /src/Main/contacts.ux: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {{$item.name}} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | {{letter}} 20 | 21 | 22 | 23 | 24 | {{$item}} 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 73 | -------------------------------------------------------------------------------- /src/Main/friends.ux: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 朋友圈 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 扫一扫 18 | 19 | 20 | 21 | 22 | 23 | 24 | 摇一摇 25 | 26 | 27 | 28 | 29 | 30 | 31 | 69 | -------------------------------------------------------------------------------- /src/Main/index.ux: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | {{item.name}} 39 | 40 | 41 | 42 | 43 | 80 | -------------------------------------------------------------------------------- /src/Main/me.ux: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 飞天舞 9 | 微信号:feitianwu 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 钱包 19 | 20 | 21 | 22 | 23 | 收藏 24 | 25 | 26 | 27 | 相册 28 | 29 | 30 | 31 | 卡包 32 | 33 | 34 | 35 | 表情 36 | 37 | 38 | 39 | 40 | 设置 41 | 42 | 43 | 44 | 107 | -------------------------------------------------------------------------------- /src/Main/weixin.ux: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | {{$item.name}} 10 | {{$item.text}} 11 | 12 | 13 | 14 | 15 | {{$item.time}} 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 28 | -------------------------------------------------------------------------------- /src/Title/index.ux: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{text}} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 54 | 55 | -------------------------------------------------------------------------------- /src/Web/index.ux: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 16 | 17 | -------------------------------------------------------------------------------- /src/Welcome/index.ux: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 12 | -------------------------------------------------------------------------------- /src/app.ux: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "package": "com.application.demo", 3 | "name": "quickapp-wechat", 4 | "versionName": "1.0.0", 5 | "versionCode": "1", 6 | "minPlatformVersion": "101", 7 | "icon": "/Common/Image/logo.png", 8 | "features": [ 9 | { "name": "system.prompt" }, 10 | { "name": "system.device" }, 11 | { "name": "system.router" }, 12 | { "name": "system.shortcut" }, 13 | { "name": "system.webview" }, 14 | { "name": "system.prompt" } 15 | ], 16 | "permissions": [ 17 | { "origin": "*" } 18 | ], 19 | "config": { 20 | "logLevel": "debug" 21 | }, 22 | "router": { 23 | "entry": "Welcome", 24 | "pages": { 25 | "Welcome": { 26 | "component": "index" 27 | }, 28 | "Main": { 29 | "component": "index" 30 | }, 31 | "Demo": { 32 | "component": "index" 33 | }, 34 | "DemoDetail": { 35 | "component": "index" 36 | }, 37 | "About": { 38 | "component": "index" 39 | }, 40 | "GZH": { 41 | "component": "index" 42 | }, 43 | "Web": { 44 | "component": "index" 45 | }, 46 | "Demo/comm": { 47 | "component": "father" 48 | }, 49 | "Demo/comm2": { 50 | "component": "father" 51 | } 52 | 53 | } 54 | }, 55 | "display": { 56 | "titleBarBackgroundColor": "#272727", 57 | "titleBarTextColor": "#414141", 58 | "menu": true, 59 | "pages": { 60 | "Welcome": { 61 | "fullScreen": true, 62 | "titleBar": false 63 | }, 64 | "Main": { 65 | "titleBar": false 66 | }, 67 | "Demo": { 68 | "titleBarText": "示例页", 69 | "menu": false 70 | }, 71 | "DemoDetail": { 72 | "titleBarText": "详情页" 73 | }, 74 | "About": { 75 | "menu": false 76 | }, 77 | "GZH": { 78 | "titleBar": false 79 | }, 80 | "Web": { 81 | "titleBar": false 82 | } 83 | } 84 | } 85 | } -------------------------------------------------------------------------------- /src/util.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 显示菜单 3 | */ 4 | function showMenu () { 5 | var prompt = require('@system.prompt'); 6 | var router = require('@system.router'); 7 | var appInfo = require('@system.app').getInfo() 8 | prompt.showContextMenu({ 9 | itemList: ['保存桌面', '关于', '取消'], 10 | success: function (ret) { 11 | switch (ret.index) { 12 | case 0: 13 | // 保存桌面 14 | createShortcut(); 15 | break; 16 | case 1: 17 | // 关于 18 | router.push({ 19 | uri: '/About', 20 | params: { name: appInfo.name, icon: appInfo.icon } 21 | }) 22 | break; 23 | case 2: 24 | // 取消 25 | break; 26 | default: 27 | prompt.showToast({ message: 'error' }) 28 | } 29 | } 30 | }) 31 | } 32 | 33 | /** 34 | * 创建桌面图标 35 | * 注意:使用加载器测试`创建桌面快捷方式`功能时,请先在`系统设置`中打开`应用加载器`的`桌面快捷方式`权限 36 | */ 37 | function createShortcut () { 38 | var prompt = require('@system.prompt'); 39 | var shortcut = require('@system.shortcut'); 40 | shortcut.hasInstalled({ 41 | success: function (ret) { 42 | if (ret) { 43 | prompt.showToast({ message: '已创建桌面图标' }) 44 | } else { 45 | shortcut.install({ 46 | success: function () { 47 | prompt.showToast({ message: '成功创建桌面图标' }) 48 | }, 49 | fail: function (errmsg, errcode) { 50 | prompt.showToast({ message: 'error: ' + errcode + '---' + errmsg }) 51 | } 52 | }) 53 | } 54 | } 55 | }) 56 | } 57 | 58 | export default { 59 | showMenu, 60 | createShortcut 61 | } 62 | -------------------------------------------------------------------------------- /tp.ux: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | --------------------------------------------------------------------------------