Initial DSHWatch DSHWatchPhone scaffold

This commit is contained in:
2026-09-01 14:25:34 +08:00
commit 18ec9fadc7
14 changed files with 272 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
/.nyc_output
/coverage
/node_modules
/tests/fixtures
/sign
/dist
/build
+16
View File
@@ -0,0 +1,16 @@
node_modules
build
dist
.DS_Store
Thumbs.db
*.log
*.iml
.idea/
.vscode/
.nyc_output
/coverage
/logs
+13
View File
@@ -0,0 +1,13 @@
## 快速上手
您可通过运行 `npm run start` 后,使用快应用引擎扫描二维码快速开发。
## 了解更多
你可以通过我们的[官方文档](https://doc.quickapp.cn/)熟悉和了解快应用。
可以通过我们[快应用官方示例项目](https://github.com/quickappcn/sample),快速掌握
api 和组件的用法
对我们有什么意见,建议或者 bug,可以在这里反馈
https://github.com/quickappcn/issues
View File
+18
View File
@@ -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"
}
}
+24
View File
@@ -0,0 +1,24 @@
<template>
<!-- template里只能有一个根节点 -->
<div class="demo-page">
<text>{{text}}</text>
<text>{{des}}</text>
</div>
</template>
<script>
export default {
private: {
text: '欢迎使用快应用卡片',
des: '卡片是一种轻量级的快应用,快应用卡片使快应用能够在其他app和系统里提供可扩展的app功能'
}
}
</script>
<style>
.demo-page {
flex: 1;
flex-direction: column;
align-items: center;
}
</style>
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

+48
View File
@@ -0,0 +1,48 @@
<template>
<!-- template里只能有一个根节点 -->
<div class="demo-page">
<text class="title">欢迎打开{{title}}</text>
<!-- 点击跳转详情页 -->
<input class="btn" type="button" value="跳转到详情页" onclick="routeDetail" />
</div>
</template>
<script>
import router from '@system.router'
export default {
// 页面级组件的数据模型,影响传入数据的覆盖机制:private内定义的属性不允许被覆盖
private: {
title: '示例页面'
},
routeDetail () {
// 跳转到应用内的某个页面,router用法详见:文档->接口->页面路由
router.push ({
uri: '/DemoDetail'
})
}
}
</script>
<style>
.demo-page {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 40px;
text-align: center;
}
.btn {
width: 550px;
height: 86px;
margin-top: 75px;
border-radius: 43px;
background-color: #09ba07;
font-size: 30px;
color: #ffffff;
}
</style>
+27
View File
@@ -0,0 +1,27 @@
<template>
<!-- template里只能有一个根节点 -->
<div class="demo-page">
<text class="title">{{text}}</text>
</div>
</template>
<script>
export default {
private: {
text: '欢迎打开详情页'
}
}
</script>
<style>
.demo-page {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 40px;
text-align: center;
}
</style>
+14
View File
@@ -0,0 +1,14 @@
<script>
/**
* @file 应用级别的配置,供所有页面公用
* 可在app.ux导出公用变量
* 其他src目录下的ux文件使用this.$app.$def.<paramName>即可调用此处导出的变量
* 文档地址: https://doc.quickapp.cn/framework/source-file.html#appux
*/
// 引入全局函数定义文件global.js
import './global'
export default {}
</script>
+1
View File
@@ -0,0 +1 @@
{}
+34
View File
@@ -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 }
+66
View File
@@ -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": "详情页"
}
}
}
}
+4
View File
@@ -0,0 +1,4 @@
{
"doc": "https://doc.quickapp.cn/framework/sitemap.html",
"rules": [{ "rule": "enable", "page": "*" }]
}