提交 de03f3dc 编写于 作者: shutao-dc's avatar shutao-dc

Merge remote-tracking branch 'remotes/origin/dev' into alpha

...@@ -238,6 +238,12 @@ ...@@ -238,6 +238,12 @@
"navigationBarTitleText": "" "navigationBarTitleText": ""
} }
}, },
{
"path": "pages/component/mixin-datacom/mixin-datacom",
"style": {
"navigationBarTitleText": "mixinDatacom"
}
},
// #endif // #endif
{ {
"path": "pages/tabBar/API", "path": "pages/tabBar/API",
...@@ -345,7 +351,7 @@ ...@@ -345,7 +351,7 @@
} }
}, },
{ {
"path": "pages/API/filemanager/filemanager", "path": "pages/API/get-file-manager/get-file-manager",
"style": { "style": {
"navigationBarTitleText": "沙盒文件管理" "navigationBarTitleText": "沙盒文件管理"
} }
...@@ -579,7 +585,7 @@ ...@@ -579,7 +585,7 @@
} }
}, },
{ {
"path": "pages/API/uni-verify/uni-verify", "path": "pages/API/get-univerify-manager/get-univerify-manager",
"style": { "style": {
"navigationBarTitleText": "uni-verify", "navigationBarTitleText": "uni-verify",
"enablePullDownRefresh": false "enablePullDownRefresh": false
......
...@@ -52,8 +52,9 @@ ...@@ -52,8 +52,9 @@
*/ */
basePath: uni.env.USER_DATA_PATH, basePath: uni.env.USER_DATA_PATH,
copyToBasePath: uni.env.USER_DATA_PATH, copyToBasePath: uni.env.USER_DATA_PATH,
globalTempPath:uni.env.TEMP_PATH, globalTempPath:uni.env.CACHE_PATH,
globalRootPath:uni.env.ROOT_PATH, globalRootPath:uni.env.SANDBOX_PATH,
globalInnerRootPath:uni.env.ANDROID_INTERNAL_SANDBOX_PATH,
globalAppResourcePath:uni.env.APP_RESOURCE_PATH, globalAppResourcePath:uni.env.APP_RESOURCE_PATH,
globalUserDataPath:uni.env.USER_DATA_PATH globalUserDataPath:uni.env.USER_DATA_PATH
......
<template>
<view>
<view v-if="mixinDatacomLoading">Loading...</view>
<view v-else-if="mixinDatacomError">
请求错误:{{mixinDatacomError}}
</view>
<view v-else="mixinDatacomResData.length>0">
<!-- 需要自行处理数据及相关UI展现 -->
<!-- {{mixinDatacomResData}} -->
<list-view class="list-view" :scroll-y="true">
<list-item class="list-item" v-for="(item, _) in mixinDatacomResData">
<text>{{item}}</text>
</list-item>
</list-view>
</view>
</view>
</template>
<script lang="uts">
export default {
mixins: [uniCloud.mixinDatacom],
data() {
return {
}
},
created() {
this.load()
},
methods: {
load() {
if (this.mixinDatacomLoading == true) {
return
}
this.mixinDatacomLoading = true
this.mixinDatacomGet(null).then((res: UniCloudDBGetResult) => {
const data = res.data
// const count = res.count
this.mixinDatacomResData = data
}).catch((err) => {
this.mixinDatacomError = err as UniCloudError
}).finally(() => {
this.mixinDatacomLoading = false
})
},
// 当组件属性发生变化时
onMixinDatacomPropsChange(needReset: boolean, changed: Array<string>) {
console.log(needReset, changed);
// needReset=true 需要重置已加载数据和分页信息,例如 collection,orderby
// changed,变化的属性名,类型为 Array,例如 ['collection', 'orderby']
// if (needReset) {
// // 清空已加载的数据
// this.mixinDatacomResData = []
// // 重置分页数据,如果没有分页不需要处理
// this.mixinDatacomPage.size = this.pageSize // 重置分页大小
// this.mixinDatacomPage.current = 0 // 重置当前分页
// this.mixinDatacomPage.count = 0 // 重置数据总数
// }
}
}
}
</script>
<style>
</style>
const PAGE_PATH = '/pages/component/mixin-datacom/mixin-datacom'
describe('mixin-datacom', () => {
let page
beforeAll(async () => {
page = await program.reLaunch(PAGE_PATH)
await page.waitFor(500)
})
it('mixinDatacomGet', async () => {
const datacom = await page.$('.datacom')
const childCount = await datacom.$$('.list-item')
expect(childCount > 0).toBe(true)
})
})
<template>
<view class="content">
<datacom class="datacom" collection="unicloud-db-test"></datacom>
</view>
</template>
<script>
import datacom from './datacom.uvue';
export default {
components: {
datacom
},
data() {
return {
}
},
methods: {
}
}
</script>
<style>
.content {
flex: 1;
}
</style>
...@@ -405,7 +405,7 @@ ...@@ -405,7 +405,7 @@
pages: [ pages: [
{ {
name: 'fileSystemManager沙盒文件管理', name: 'fileSystemManager沙盒文件管理',
url: 'filemanager' url: 'get-file-manager'
}, },
] as Page[], ] as Page[],
}, },
...@@ -438,7 +438,7 @@ ...@@ -438,7 +438,7 @@
pages: [ pages: [
{ {
name: '一键登录', name: '一键登录',
url: 'uni-verify', url: 'get-univerify-manager',
}, },
{ {
name: '实人认证', name: '实人认证',
......
...@@ -240,6 +240,11 @@ export default { ...@@ -240,6 +240,11 @@ export default {
name: '联系人', name: '联系人',
enable: true, enable: true,
url: '/pages/component/unicloud-db-contacts/list' url: '/pages/component/unicloud-db-contacts/list'
},
{
name: 'mixinDatacom',
enable: true,
url: '/pages/component/mixin-datacom/mixin-datacom'
} }
] as Page[], ] as Page[],
}, },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册