Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
Hello UTS
提交
1c2eb11f
H
Hello UTS
项目概览
DCloud
/
Hello UTS
通知
1605
Star
27
Fork
9
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
2
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
Hello UTS
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
2
Issue
2
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
1c2eb11f
编写于
7月 06, 2023
作者:
杜庆泉
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增实例创建测试示例
上级
92a1a39c
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
236 addition
and
175 deletion
+236
-175
pages.json
pages.json
+165
-175
pages/SyntaxCase/instanceTest.vue
pages/SyntaxCase/instanceTest.vue
+48
-0
pages/advance/advance.vue
pages/advance/advance.vue
+7
-0
uni_modules/uts-advance/utssdk/app-android/index.uts
uni_modules/uts-advance/utssdk/app-android/index.uts
+16
-0
未找到文件。
pages.json
浏览文件 @
1c2eb11f
...
@@ -2,132 +2,117 @@
...
@@ -2,132 +2,117 @@
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
{
"path"
:
"pages/index/index"
,
"path"
:
"pages/index/index"
,
"style"
:
"style"
:
{
{
"navigationBarTitleText"
:
""
,
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
},
},
{
{
"path"
:
"pages/advance/advance"
,
"path"
:
"pages/advance/advance"
,
"style"
:
"style"
:
{
{
"navigationBarTitleText"
:
""
,
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
},
},
{
{
"path"
:
"pages/SystemAPI/SystemAPI"
,
"path"
:
"pages/SystemAPI/SystemAPI"
,
"style"
:
"style"
:
{
{
"navigationBarTitleText"
:
""
,
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
},
},
{
{
"path"
:
"pages/SystemAPI/Alert/alert"
,
"path"
:
"pages/SystemAPI/Alert/alert"
,
"style"
:
"style"
:
{
{
"navigationBarTitleText"
:
""
"navigationBarTitleText"
:
""
}
}
},
},
{
{
"path"
:
"pages/component/helloView"
,
"path"
:
"pages/component/helloView"
,
"style"
:
"style"
:
{
{
"navigationBarTitleText"
:
""
,
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
},
},
{
{
"path"
:
"pages/SDKIntegration/SDKIntegration"
,
"path"
:
"pages/SDKIntegration/SDKIntegration"
,
"style"
:
"style"
:
{
{
"navigationBarTitleText"
:
""
,
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
},
},
{
{
"path"
:
"pages/SDKIntegration/TencentLocation/TencentLocation"
,
"path"
:
"pages/SDKIntegration/TencentLocation/TencentLocation"
,
"style"
:
"style"
:
{
{
"navigationBarTitleText"
:
""
,
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
},
},
{
{
"path"
:
"pages/SDKIntegration/Lottie/index"
,
"path"
:
"pages/SDKIntegration/Lottie/index"
,
"style"
:
"style"
:
{
{
"navigationBarTitleText"
:
""
,
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
},
},
{
{
"path"
:
"pages/SDKIntegration/Toast/Toast"
,
"path"
:
"pages/SDKIntegration/Toast/Toast"
,
"style"
:
"style"
:
{
{
"navigationBarTitleText"
:
""
,
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
},
},
{
{
"path"
:
"pages/lifecycle/lifecycle"
,
"path"
:
"pages/lifecycle/lifecycle"
,
"style"
:
"style"
:
{
{
"navigationBarTitleText"
:
""
,
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
},
},
{
{
"path"
:
"pages/resource/resource"
,
"path"
:
"pages/resource/resource"
,
"style"
:
"style"
:
{
{
"navigationBarTitleText"
:
""
,
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
},
},
{
{
"path"
:
"pages/advance/android/decorview"
,
"path"
:
"pages/advance/android/decorview"
,
"style"
:
"style"
:
{
{
"navigationBarTitleText"
:
""
,
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
},
},
{
{
"path"
:
"pages/advance/iOS/getResourcePath"
,
"path"
:
"pages/advance/iOS/getResourcePath"
,
"style"
:
"style"
:
{
{
"navigationBarTitleText"
:
""
,
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
},
},
{
{
"path"
:
"pages/advance/android/assetaudio"
,
"path"
:
"pages/advance/android/assetaudio"
,
"style"
:
"style"
:
{
{
"navigationBarTitleText"
:
""
,
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
},
},
{
{
"path"
:
"pages/SystemAPI/ScreenListen/screenlisten"
,
"path"
:
"pages/SystemAPI/ScreenListen/screenlisten"
,
"style"
:
"style"
:
{
{
"navigationBarTitleText"
:
""
,
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
...
@@ -135,9 +120,8 @@
...
@@ -135,9 +120,8 @@
},
},
{
{
"path"
:
"pages/SyntaxCase/index"
,
"path"
:
"pages/SyntaxCase/index"
,
"style"
:
"style"
:
{
{
"navigationBarTitleText"
:
""
,
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
...
@@ -145,27 +129,33 @@
...
@@ -145,27 +129,33 @@
},
},
{
{
"path"
:
"pages/SyntaxCase/paramTest"
,
"path"
:
"pages/SyntaxCase/paramTest"
,
"style"
:
"style"
:
{
{
"navigationBarTitleText"
:
""
,
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
},
},
{
{
"path"
:
"pages/SyntaxCase/consoleTest"
,
"path"
:
"pages/SyntaxCase/consoleTest"
,
"style"
:
"style"
:
{
{
"navigationBarTitleText"
:
""
,
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
},
},
{
{
"path"
:
"pages/test/index"
,
"path"
:
"pages/SyntaxCase/instanceTest"
,
"style"
:
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
{
"path"
:
"pages/test/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
...
@@ -186,7 +176,7 @@
...
@@ -186,7 +176,7 @@
"pagePath"
:
"pages/advance/advance"
,
"pagePath"
:
"pages/advance/advance"
,
"text"
:
"进阶"
"text"
:
"进阶"
},
{
},
{
"pagePath"
:
"pages/SystemAPI/SystemAPI"
,
"pagePath"
:
"pages/SystemAPI/SystemAPI"
,
"text"
:
"系统API"
"text"
:
"系统API"
},
{
},
{
"pagePath"
:
"pages/SDKIntegration/SDKIntegration"
,
"pagePath"
:
"pages/SDKIntegration/SDKIntegration"
,
...
...
pages/SyntaxCase/instanceTest.vue
0 → 100644
浏览文件 @
1c2eb11f
<
template
>
{{
ret
}}
<button
@
click=
"instanceCreate"
>
多实例创建测试
</button>
</
template
>
<
script
>
import
{
User
}
from
'
@/uni_modules/uts-advance
'
export
default
{
data
()
{
return
{
ret
:
''
}
},
methods
:
{
instanceCreate
()
{
const
user1
=
new
User
(
"
张三
"
,
20
);
let
userText1
=
user1
.
describeSelf
()
const
user2
=
new
User
(
"
李四
"
,
30
);
let
userText2
=
user2
.
describeSelf
()
const
user3
=
new
User
(
"
王五
"
,
40
);
let
userText3
=
user3
.
describeSelf
()
if
(
userText1
==
userText2
||
userText1
==
userText3
||
userText2
==
userText3
){
this
.
ret
=
'
测试未通过
'
}
else
{
this
.
ret
=
'
测试通过
'
}
}
}
}
</
script
>
<
style
>
</
style
>
\ No newline at end of file
pages/advance/advance.vue
浏览文件 @
1c2eb11f
...
@@ -28,6 +28,8 @@
...
@@ -28,6 +28,8 @@
</uni-list-item>
</uni-list-item>
<uni-list-item
@
tap=
"testConsole"
title=
"日志打印示例"
:clickable=
"true"
link
>
<uni-list-item
@
tap=
"testConsole"
title=
"日志打印示例"
:clickable=
"true"
link
>
</uni-list-item>
</uni-list-item>
<uni-list-item
@
tap=
"testInstance"
title=
"实例测试示例"
:clickable=
"true"
link
>
</uni-list-item>
<uni-list-item
@
tap=
"testGrammar"
title=
"基础语法测试例"
:clickable=
"true"
link
>
<uni-list-item
@
tap=
"testGrammar"
title=
"基础语法测试例"
:clickable=
"true"
link
>
</uni-list-item>
</uni-list-item>
</uni-list>
</uni-list>
...
@@ -205,6 +207,11 @@
...
@@ -205,6 +207,11 @@
url
:
'
/pages/test/index
'
url
:
'
/pages/test/index
'
})
})
},
},
testInstance
:
function
()
{
uni
.
navigateTo
({
url
:
'
/pages/SyntaxCase/instanceTest
'
})
},
testGetResourcePath
:
function
()
{
testGetResourcePath
:
function
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'
/pages/advance/iOS/getResourcePath
'
url
:
'
/pages/advance/iOS/getResourcePath
'
...
...
uni_modules/uts-advance/utssdk/app-android/index.uts
浏览文件 @
1c2eb11f
...
@@ -454,5 +454,21 @@ export function quitApp(){
...
@@ -454,5 +454,21 @@ export function quitApp(){
UTSAndroid.quitApp()
UTSAndroid.quitApp()
}
}
export class User {
private name : string;
private age : Int;
constructor(hostP : string, port : Int) {
this.name = hostP;
this.age = port;
}
describeSelf():string{
let text = "name = " + this.name + ";age = " + this.age
return text
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录