diff --git a/pages.json b/pages.json
index 80ad54f89cb164a20eb017f403edc2533a899c50..a5a462939edcd9076da8552a2ca58777023a0bcd 100644
--- a/pages.json
+++ b/pages.json
@@ -283,32 +283,32 @@
}
},
{
- "path": "pages/component/unicloud-db/unicloud-db",
+ "path": "pages/component/unicloud-db/unicloud-db/contacts/list",
"style": {
"navigationBarTitleText": "联系人",
"enablePullDownRefresh": true
}
},
{
- "path": "pages/component/unicloud-db/add",
+ "path": "pages/component/unicloud-db/unicloud-db/contacts/add",
"style": {
"navigationBarTitleText": "新增联系人"
}
},
{
- "path": "pages/component/unicloud-db/edit",
+ "path": "pages/component/unicloud-db/unicloud-db/contacts/edit",
"style": {
"navigationBarTitleText": "编辑联系人"
}
},
{
- "path": "pages/component/unicloud-db/detail",
+ "path": "pages/component/unicloud-db/unicloud-db/contacts/detail",
"style": {
"navigationBarTitleText": ""
}
},
{
- "path": "pages/component/unicloud-db/unicloud-db/mixin-datacom",
+ "path": "pages/component/unicloud-db/unicloud-db/mixin-datacom/mixin-datacom",
"style": {
"navigationBarTitleText": "mixinDatacom"
}
@@ -886,14 +886,14 @@
// #endif
// #ifdef APP || WEB
{
- "path": "pages/API/request-payment-uni-pay/request-payment-uni-pay",
+ "path": "pages/API/request-payment/request-payment/request-payment-uni-pay",
"style": {
"navigationBarTitleText": "uni-pay示例",
"enablePullDownRefresh": false
}
},
{
- "path": "pages/API/request-payment-uni-pay/order-detail",
+ "path": "pages/API/request-payment/request-payment/order-detail",
"style": {
"navigationBarTitleText": "订单详情示例",
"enablePullDownRefresh": false
diff --git a/pages/API/request-payment-uni-pay/order-detail.uvue b/pages/API/request-payment/request-payment/order-detail.uvue
similarity index 100%
rename from pages/API/request-payment-uni-pay/order-detail.uvue
rename to pages/API/request-payment/request-payment/order-detail.uvue
diff --git a/pages/API/request-payment-uni-pay/request-payment-uni-pay.uvue b/pages/API/request-payment/request-payment/request-payment-uni-pay.uvue
similarity index 100%
rename from pages/API/request-payment-uni-pay/request-payment-uni-pay.uvue
rename to pages/API/request-payment/request-payment/request-payment-uni-pay.uvue
diff --git a/pages/API/unicloud-call-function/unicloud-call-function.test.js b/pages/API/unicloud-call-function/unicloud-call-function.test.js
deleted file mode 100644
index 2917aef6f27db4e672ea04f5e87469588d60b3de..0000000000000000000000000000000000000000
--- a/pages/API/unicloud-call-function/unicloud-call-function.test.js
+++ /dev/null
@@ -1,33 +0,0 @@
-const PAGE_PATH = '/pages/API/unicloud-call-function/unicloud-call-function'
-
-describe('unicloud-call-function', () => {
- let page
- beforeAll(async () => {
- page = await program.reLaunch(PAGE_PATH)
- await page.waitFor(500)
- await page.setData({
- isUniTest: true
- })
- })
-
- it('callFunction', async () => {
- await page.callMethod('callFunction')
- const {
- callFunctionResult,
- callFunctionError,
- } = await page.data()
- console.error(callFunctionResult)
- console.error(callFunctionError)
- expect(callFunctionResult['showMessage']).toBe("Hello uniCloud function")
- expect(callFunctionResult['event']['num']).toBe(1)
- expect(callFunctionResult['event']['str']).toBe('ABC')
- })
-
- it('callFunctionWithGeneric', async () => {
- await page.callMethod('callFunctionWithGeneric')
- const {
- genericDemoShowMessage,
- } = await page.data()
- expect(genericDemoShowMessage).toBe("Hello uniCloud function")
- })
-})
diff --git a/pages/API/unicloud-call-function/unicloud-call-function.uvue b/pages/API/unicloud-call-function/unicloud-call-function.uvue
deleted file mode 100644
index 58f3284106c118e22183ecdd96e6304fcec4eb18..0000000000000000000000000000000000000000
--- a/pages/API/unicloud-call-function/unicloud-call-function.uvue
+++ /dev/null
@@ -1,108 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/API/unicloud-database/unicloud-database.uvue b/pages/API/unicloud-database/unicloud-database.uvue
deleted file mode 100644
index f37730e2ee561ff5eab5fe85bc0cd33da99b4733..0000000000000000000000000000000000000000
--- a/pages/API/unicloud-database/unicloud-database.uvue
+++ /dev/null
@@ -1,322 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/API/unicloud-import-object/unicloud-import-object.uvue b/pages/API/unicloud-import-object/unicloud-import-object.uvue
deleted file mode 100644
index 1b71ea1ea97b4217f82888c7612a2f2ee76eb94a..0000000000000000000000000000000000000000
--- a/pages/API/unicloud-import-object/unicloud-import-object.uvue
+++ /dev/null
@@ -1,161 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/API/unicloud/unicloud/call-function.test.js b/pages/API/unicloud/unicloud/call-function.test.js
index acd034b692cd443538da940e26c1ad951b3fc5c9..65d0cf040c99808687dec581d31ec3ea350d58cc 100644
--- a/pages/API/unicloud/unicloud/call-function.test.js
+++ b/pages/API/unicloud/unicloud/call-function.test.js
@@ -1,4 +1,4 @@
-const PAGE_PATH = '/pages/API/call-function/call-function'
+const PAGE_PATH = '/pages/API/unicloud/unicloud/call-function'
describe('unicloud-call-function', () => {
let page
diff --git a/pages/API/unicloud-import-object/unicloud-import-object.test.js b/pages/API/unicloud/unicloud/cloud-object.test.js
similarity index 93%
rename from pages/API/unicloud-import-object/unicloud-import-object.test.js
rename to pages/API/unicloud/unicloud/cloud-object.test.js
index 46fbf87ca1c953642d4af7da22f7b7998e43d954..ec731d2015ef2eb00f0c7676f063e4a85baa1eaf 100644
--- a/pages/API/unicloud-import-object/unicloud-import-object.test.js
+++ b/pages/API/unicloud/unicloud/cloud-object.test.js
@@ -1,4 +1,4 @@
-const PAGE_PATH = '/pages/API/unicloud-import-object/unicloud-import-object'
+const PAGE_PATH = '/pages/API/unicloud/unicloud/cloud-object'
describe('unicloud-import-object', () => {
let page
diff --git a/pages/API/unicloud-database/unicloud-database.test.js b/pages/API/unicloud/unicloud/database.test.js
similarity index 95%
rename from pages/API/unicloud-database/unicloud-database.test.js
rename to pages/API/unicloud/unicloud/database.test.js
index cec19a63b982c7d2461344fa0bb682f917934fb4..d268f97dee8d42e1bf179fbae29d8125f4607eb5 100644
--- a/pages/API/unicloud-database/unicloud-database.test.js
+++ b/pages/API/unicloud/unicloud/database.test.js
@@ -1,4 +1,4 @@
-const PAGE_PATH = '/pages/API/unicloud-database/unicloud-database'
+const PAGE_PATH = '/pages/API/unicloud/unicloud/database'
describe('unicloud-database', () => {
let page
diff --git a/pages/API/websocket/websocket-socketTask.test.js b/pages/API/websocket/websocket-socketTask.test.js
new file mode 100644
index 0000000000000000000000000000000000000000..0b53e85d85e748df3d717d9f88b7ed339a81f9dd
--- /dev/null
+++ b/pages/API/websocket/websocket-socketTask.test.js
@@ -0,0 +1,18 @@
+const PAGE_PATH = '/pages/API/websocket/websocket-socketTask'
+
+describe('ExtApi-WebSocket', () => {
+
+ let page;
+ let res;
+ beforeAll(async () => {
+ page = await program.reLaunch(PAGE_PATH)
+ await page.waitFor(600);
+ await page.callMethod('jest_connectSocket');
+ await page.waitFor(1500);
+ res = await page.data('jest_result');
+ });
+
+ it('Check ', async () => {
+ expect(res).toBe(2);
+ });
+});
diff --git a/pages/component/unicloud-db/add.uvue b/pages/component/unicloud-db/add.uvue
deleted file mode 100644
index fd216944c21d71a025443996c04b3241c6c69171..0000000000000000000000000000000000000000
--- a/pages/component/unicloud-db/add.uvue
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/component/unicloud-db/detail.uvue b/pages/component/unicloud-db/detail.uvue
deleted file mode 100644
index 0585a9dcffe352a86251de5fe5f33032d090c70f..0000000000000000000000000000000000000000
--- a/pages/component/unicloud-db/detail.uvue
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
- {{error.errMsg}}
- 正在加载...
-
-
- 姓名
- {{data[0]['username']}}
-
-
- 电话
- {{data[0]['mobile']}}
-
-
- 邮箱
- {{data[0]['email']}}
-
-
- 备注
- {{data[0]['comment']}}
-
-
- 性别
- {{displayGender(data[0].getNumber('gender'))}}
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/component/unicloud-db/edit.uvue b/pages/component/unicloud-db/edit.uvue
deleted file mode 100644
index 083d971fc23fd0e17c046508f7351d618bde74db..0000000000000000000000000000000000000000
--- a/pages/component/unicloud-db/edit.uvue
+++ /dev/null
@@ -1,170 +0,0 @@
-
-
-
- {{error.errMsg}}
- 正在加载...
-
-
-
-
-
-
-
-
diff --git a/pages/component/unicloud-db/types.uts b/pages/component/unicloud-db/types.uts
deleted file mode 100644
index 4d204bfe4d93e698d6956bfa2b81c11729763a2c..0000000000000000000000000000000000000000
--- a/pages/component/unicloud-db/types.uts
+++ /dev/null
@@ -1,25 +0,0 @@
-export const COLLECTION_NAME = 'opendb-contacts'
-
-export type GenderType = {
- text : string,
- value : number,
-}
-
-export const GenderList = [
- {
- text: "未知",
- value: 0
- },
- {
- text: "男",
- value: 1
- },
- {
- text: "女",
- value: 2
- },
-] as GenderType[]
-
-export const UNICLOUD_DB_CONTACTS_ADD = 'unicloud-db-contacts-add'
-export const UNICLOUD_DB_CONTACTS_UPDATE = 'unicloud-db-contacts-update'
-export const UNICLOUD_DB_CONTACTS_DELETE = 'unicloud-db-contacts-delete'
diff --git a/pages/component/unicloud-db-contacts/add.uvue b/pages/component/unicloud-db/unicloud-db/contacts/add.uvue
similarity index 100%
rename from pages/component/unicloud-db-contacts/add.uvue
rename to pages/component/unicloud-db/unicloud-db/contacts/add.uvue
diff --git a/pages/component/unicloud-db-contacts/detail.uvue b/pages/component/unicloud-db/unicloud-db/contacts/detail.uvue
similarity index 100%
rename from pages/component/unicloud-db-contacts/detail.uvue
rename to pages/component/unicloud-db/unicloud-db/contacts/detail.uvue
diff --git a/pages/component/unicloud-db-contacts/edit.uvue b/pages/component/unicloud-db/unicloud-db/contacts/edit.uvue
similarity index 100%
rename from pages/component/unicloud-db-contacts/edit.uvue
rename to pages/component/unicloud-db/unicloud-db/contacts/edit.uvue
diff --git a/pages/component/unicloud-db-contacts/list.uvue b/pages/component/unicloud-db/unicloud-db/contacts/list.uvue
similarity index 100%
rename from pages/component/unicloud-db-contacts/list.uvue
rename to pages/component/unicloud-db/unicloud-db/contacts/list.uvue
diff --git a/pages/component/unicloud-db-contacts/types.uts b/pages/component/unicloud-db/unicloud-db/contacts/types.uts
similarity index 100%
rename from pages/component/unicloud-db-contacts/types.uts
rename to pages/component/unicloud-db/unicloud-db/contacts/types.uts
diff --git a/pages/component/unicloud-db/unicloud-db/datacom.uvue b/pages/component/unicloud-db/unicloud-db/datacom.uvue
deleted file mode 100644
index d6392ff818fd1b864fc7f43ed35e44ff395825a0..0000000000000000000000000000000000000000
--- a/pages/component/unicloud-db/unicloud-db/datacom.uvue
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
- Loading...
-
- 请求错误:{{mixinDatacomError}}
-
-
-
-
-
-
- {{item}}
-
-
-
-
- 无数据
-
-
-
-
-
-
-
diff --git a/pages/component/unicloud-db/unicloud-db/mixin-datacom.test.js b/pages/component/unicloud-db/unicloud-db/mixin-datacom.test.js
deleted file mode 100644
index 95a8804ada679250806617dfb9791491b2a6dd74..0000000000000000000000000000000000000000
--- a/pages/component/unicloud-db/unicloud-db/mixin-datacom.test.js
+++ /dev/null
@@ -1,20 +0,0 @@
-const PAGE_PATH = '/pages/component/mixin-datacom/mixin-datacom'
-
-describe('mixin-datacom', () => {
- if (process.env.uniTestPlatformInfo.startsWith('web')) {
- it('dummyTest', async () => {
- expect(1).toBe(1)
- })
- return
- }
- let page
- beforeAll(async () => {
- page = await program.reLaunch(PAGE_PATH)
- await page.waitFor(500)
- })
- it('mixinDatacomGet', async () => {
- const datacom = await page.$('.datacom')
- const children = await datacom.$$('.list-item')
- expect(children.length > 0).toBe(true)
- })
-})
diff --git a/pages/component/unicloud-db/unicloud-db/mixin-datacom.uvue b/pages/component/unicloud-db/unicloud-db/mixin-datacom.uvue
deleted file mode 100644
index 9f3ce40507fb2956b862afbcd1ec55b377048240..0000000000000000000000000000000000000000
--- a/pages/component/unicloud-db/unicloud-db/mixin-datacom.uvue
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/pages/component/datacom/datacom.uvue b/pages/component/unicloud-db/unicloud-db/mixin-datacom/datacom.uvue
similarity index 100%
rename from pages/component/datacom/datacom.uvue
rename to pages/component/unicloud-db/unicloud-db/mixin-datacom/datacom.uvue
diff --git a/pages/component/datacom/mixin-datacom.test.js b/pages/component/unicloud-db/unicloud-db/mixin-datacom/mixin-datacom.test.js
similarity index 100%
rename from pages/component/datacom/mixin-datacom.test.js
rename to pages/component/unicloud-db/unicloud-db/mixin-datacom/mixin-datacom.test.js
diff --git a/pages/component/datacom/mixin-datacom.uvue b/pages/component/unicloud-db/unicloud-db/mixin-datacom/mixin-datacom.uvue
similarity index 100%
rename from pages/component/datacom/mixin-datacom.uvue
rename to pages/component/unicloud-db/unicloud-db/mixin-datacom/mixin-datacom.uvue
diff --git a/pages/pages.test.js b/pages/pages.test.js
index a76970d8ac91ab58439cf1d0ea8c6c7291b00071..d22b57f64ad20babc3ec08afd314de09b3dc034c 100755
--- a/pages/pages.test.js
+++ b/pages/pages.test.js
@@ -76,12 +76,12 @@ const pages = [
// '/pages/component/web-view/web-view-local',
// 动态内容
// '/pages/component/unicloud-db/unicloud-db',
- '/pages/component/unicloud-db/add',
+ '/pages/component/unicloud-db/unicloud-db/contacts/add',
// 动态内容
- // '/pages/component/unicloud-db/edit',
+ // '/pages/component/unicloud-db/unicloud-db/contacts/edit',
// 动态内容
- // '/pages/component/unicloud-db/detail',
- '/pages/component/datacom/datacom',
+ // '/pages/component/unicloud-db/unicloud-db/contacts/detail',
+ '/pages/component/unicloud-db/unicloud-db/mixin-datacom/mixin-datacom',
// 单独测试例截图
// '/pages/component/general-attribute/general-attribute',
'/pages/component/general-event/general-event',
@@ -144,8 +144,10 @@ const pages = [
'/pages/API/websocket/websocket-socketTask',
// 页面销毁时会关闭socket连接,所以规避
// '/pages/API/websocket/websocket',
- '/pages/API/unicloud/call-function',
- '/pages/API/unicloud/import-object',
+ '/pages/API/unicloud/unicloud/cloud-function',
+ '/pages/API/unicloud/unicloud/cloud-object',
+ '/pages/API/unicloud/unicloud/database',
+ '/pages/API/unicloud/unicloud/cloud-storage',
'/pages/API/get-system-info/get-system-info',
'/pages/API/get-device-info/get-device-info',
'/pages/API/get-app-base-info/get-app-base-info',
@@ -155,13 +157,11 @@ const pages = [
'/pages/API/get-network-type/get-network-type',
'/pages/API/page-scroll-to/page-scroll-to',
'/pages/API/event-bus/event-bus',
- '/pages/API/unicloud-file-api/unicloud-file-api',
- '/pages/API/unicloud-database/unicloud-database',
'/pages/API/get-battery-info/get-battery-info',
'/pages/API/get-window-info/get-window-info',
'/pages/API/rpx2px/rpx2px',
- '/pages/API/request-payment-uni-pay/request-payment-uni-pay',
- '/pages/API/request-payment-uni-pay/order-detail',
+ '/pages/API/request-payment/request-payment/request-payment-uni-pay',
+ '/pages/API/request-payment/request-payment/order-detail',
// 单独测试例截图
// '/pages/API/resize-observer/resize-observer',
// 单独测试例截图
@@ -356,8 +356,8 @@ function getWaitForTagName(pagePath) {
return 'text'
}
if (
- pagePath === '/pages/component/unicloud-db-contacts/edit' ||
- pagePath === '/pages/component/unicloud-db-contacts/detail'
+ pagePath === '/pages/component/unicloud-db/unicloud-db/contacts/edit' ||
+ pagePath === '/pages/component/unicloud-db/unicloud-db/contacts/detail'
) {
return 'scroll-view'
}