Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
Hello UTS
提交
1c2eb11f
H
Hello UTS
项目概览
DCloud
/
Hello UTS
通知
1598
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
{
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path"
:
"pages/index/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/advance/advance"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/SystemAPI/SystemAPI"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/SystemAPI/Alert/alert"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"pages/component/helloView"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/SDKIntegration/SDKIntegration"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/SDKIntegration/TencentLocation/TencentLocation"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/SDKIntegration/Lottie/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/SDKIntegration/Toast/Toast"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/lifecycle/lifecycle"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/resource/resource"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/advance/android/decorview"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/advance/iOS/getResourcePath"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/advance/android/assetaudio"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/SystemAPI/ScreenListen/screenlisten"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/SyntaxCase/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/SyntaxCase/paramTest"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/SyntaxCase/consoleTest"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/test/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
}
],
{
"path"
:
"pages/index/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/advance/advance"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/SystemAPI/SystemAPI"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/SystemAPI/Alert/alert"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"pages/component/helloView"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/SDKIntegration/SDKIntegration"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/SDKIntegration/TencentLocation/TencentLocation"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/SDKIntegration/Lottie/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/SDKIntegration/Toast/Toast"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/lifecycle/lifecycle"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/resource/resource"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/advance/android/decorview"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/advance/iOS/getResourcePath"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/advance/android/assetaudio"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/SystemAPI/ScreenListen/screenlisten"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/SyntaxCase/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/SyntaxCase/paramTest"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/SyntaxCase/consoleTest"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/SyntaxCase/instanceTest"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/test/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
}
],
"tabBar"
:
{
"color"
:
"#7A7E83"
,
"selectedColor"
:
"#007AFF"
,
...
...
@@ -186,7 +176,7 @@
"pagePath"
:
"pages/advance/advance"
,
"text"
:
"进阶"
},
{
"pagePath"
:
"pages/SystemAPI/SystemAPI"
,
"pagePath"
:
"pages/SystemAPI/SystemAPI"
,
"text"
:
"系统API"
},
{
"pagePath"
:
"pages/SDKIntegration/SDKIntegration"
,
...
...
@@ -201,4 +191,4 @@
"backgroundColor"
:
"#F8F8F8"
},
"uniIdRouter"
:
{}
}
}
\ No newline at end of file
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 @@
</uni-list-item>
<uni-list-item
@
tap=
"testConsole"
title=
"日志打印示例"
:clickable=
"true"
link
>
</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>
</uni-list>
...
...
@@ -205,6 +207,11 @@
url
:
'
/pages/test/index
'
})
},
testInstance
:
function
()
{
uni
.
navigateTo
({
url
:
'
/pages/SyntaxCase/instanceTest
'
})
},
testGetResourcePath
:
function
()
{
uni
.
navigateTo
({
url
:
'
/pages/advance/iOS/getResourcePath
'
...
...
uni_modules/uts-advance/utssdk/app-android/index.uts
浏览文件 @
1c2eb11f
...
...
@@ -454,5 +454,21 @@ export function 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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录