commit 18ec9fadc73fb434422742b10f058efd535d398a Author: jiangchen <1703935164@qq.com> Date: Tue Sep 1 14:25:34 2026 +0800 Initial DSHWatch DSHWatchPhone scaffold diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..dc1a78f --- /dev/null +++ b/.eslintignore @@ -0,0 +1,7 @@ +/.nyc_output +/coverage +/node_modules +/tests/fixtures +/sign +/dist +/build \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3d1760d --- /dev/null +++ b/.gitignore @@ -0,0 +1,16 @@ +node_modules +build +dist + +.DS_Store +Thumbs.db + +*.log +*.iml +.idea/ +.vscode/ + +.nyc_output +/coverage + +/logs diff --git a/README.md b/README.md new file mode 100644 index 0000000..f859aa2 --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +## 快速上手 + +您可通过运行 `npm run start` 后,使用快应用引擎扫描二维码快速开发。 + +## 了解更多 + +你可以通过我们的[官方文档](https://doc.quickapp.cn/)熟悉和了解快应用。 + +可以通过我们[快应用官方示例项目](https://github.com/quickappcn/sample),快速掌握 +api 和组件的用法 + +对我们有什么意见,建议或者 bug,可以在这里反馈 +https://github.com/quickappcn/issues diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000..e69de29 diff --git a/package.json b/package.json new file mode 100644 index 0000000..e884377 --- /dev/null +++ b/package.json @@ -0,0 +1,18 @@ +{ + "name": "DSHWatchPhone", + "version": "1.0.0", + "description": "", + "engines": { + "node": ">=8.10" + }, + "scripts": { + "start": "aiot start --watch", + "build": "aiot build", + "release": "aiot release", + "lint": "eslint --format codeframe --fix --ext .ux,.js src/" + }, + "devDependencies": { + "@aiot-toolkit/jsc": "^1.0.3", + "aiot-toolkit": "^2.0.5" + } +} \ No newline at end of file diff --git a/src/CardDemo/index.ux b/src/CardDemo/index.ux new file mode 100644 index 0000000..7d0b3f5 --- /dev/null +++ b/src/CardDemo/index.ux @@ -0,0 +1,24 @@ + + + + + diff --git a/src/Common/logo.png b/src/Common/logo.png new file mode 100644 index 0000000..b3c0fb0 Binary files /dev/null and b/src/Common/logo.png differ diff --git a/src/Demo/index.ux b/src/Demo/index.ux new file mode 100644 index 0000000..dd018c4 --- /dev/null +++ b/src/Demo/index.ux @@ -0,0 +1,48 @@ + + + + + diff --git a/src/DemoDetail/index.ux b/src/DemoDetail/index.ux new file mode 100644 index 0000000..ad9b3b2 --- /dev/null +++ b/src/DemoDetail/index.ux @@ -0,0 +1,27 @@ + + + + + diff --git a/src/app.ux b/src/app.ux new file mode 100644 index 0000000..b2c4fdf --- /dev/null +++ b/src/app.ux @@ -0,0 +1,14 @@ + diff --git a/src/config-phone.json b/src/config-phone.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/src/config-phone.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/src/global.js b/src/global.js new file mode 100644 index 0000000..da7ab8f --- /dev/null +++ b/src/global.js @@ -0,0 +1,34 @@ +/** + * @file 全局能力的配置与获取 + * 文档地址:https://doc.quickapp.cn/tutorial/framework/optimization-skills.html#%E4%BD%BF%E7%94%A8-globaljs + */ + +function getGlobalRef() { + return Object.getPrototypeOf(global) || global +} + +const quickappGlobal = getGlobalRef() + +/** + * 设置全局(被APP与Page共享)数据; + * @param key {string} + * @param val {*} + */ +function setGlobalData(key, val) { + quickappGlobal[key] = val +} + +/** + * 获取全局(被APP与Page共享)数据; + * @param key {string} + * @return {*} + */ +function getGlobalData(key) { + return quickappGlobal[key] +} + +// 两个方法默认定义在全局 +setGlobalData('setGlobalData', setGlobalData) +setGlobalData('getGlobalData', getGlobalData) + +export { setGlobalData, getGlobalData } diff --git a/src/manifest.json b/src/manifest.json new file mode 100644 index 0000000..f62afba --- /dev/null +++ b/src/manifest.json @@ -0,0 +1,66 @@ +{ + "package": "com.application.demo", + "name": "DSHWatchPhone", + "versionName": "1.0.0", + "versionCode": 1, + "minPlatformVersion": 1070, + "icon": "/Common/logo.png", + "deviceTypeList": [ + "phone" + ], + "features": [ + { + "name": "system.prompt" + }, + { + "name": "system.router" + }, + { + "name": "system.shortcut" + } + ], + "permissions": [ + { + "origin": "*" + } + ], + "config": { + "logLevel": "log" + }, + "router": { + "entry": "Demo", + "pages": { + "Demo": { + "component": "index" + }, + "DemoDetail": { + "component": "index" + } + }, + "widgets": { + "CardDemo": { + "name": "CardDemo", + "description": "快应用卡片展示", + "component": "index", + "path": "/CardDemo", + "features": [] + } + } + }, + "display": { + "titleBarBackgroundColor": "#f2f2f2", + "titleBarTextColor": "#414141", + "menu": false, + "menuBarData": { + "menuBar": true + }, + "pages": { + "Demo": { + "titleBarText": "示例页" + }, + "DemoDetail": { + "titleBarText": "详情页" + } + } + } +} \ No newline at end of file diff --git a/src/sitemap.json b/src/sitemap.json new file mode 100644 index 0000000..8d03ea3 --- /dev/null +++ b/src/sitemap.json @@ -0,0 +1,4 @@ +{ + "doc": "https://doc.quickapp.cn/framework/sitemap.html", + "rules": [{ "rule": "enable", "page": "*" }] +}