提交 f818161d 编写于 作者: 芊里

添加banner默认数据,并忽略该文件

上级 75896edd
......@@ -3,4 +3,5 @@ unpackage/
node_modules
.DS_Store
uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/config.json
manifest.json
\ No newline at end of file
manifest.json
pages/grid/banner.json
\ No newline at end of file
......@@ -27,7 +27,7 @@
<uni-list :class="{ 'uni-list--waterfall': options.waterfall }">
<!-- 通过 uni-list--waterfall 类决定页面布局方向 -->
<!-- to 属性携带参数跳转详情页面,当前只为参考 -->
<uni-list-item :border="!options.waterfall" :to="'./detail?id='+item._id+'&title='+item.title" class="uni-list-item--waterfall" title="自定义商品列表"
<uni-list-item :border="!options.waterfall" :to="'./detail?id='+item._id+'&title='+item.title" class="uni-list-item--waterfall" title="自定义列表"
v-for="item in data" :key="item._id">
<!-- 通过header插槽定义列表左侧图片 -->
<template v-slot:header>
......@@ -54,6 +54,7 @@
</uni-list>
<!-- 通过 loadMore 组件实现上拉加载效果,如需自定义显示内容,可参考:https://ext.dcloud.net.cn/plugin?id=29 -->
<uni-load-more v-if="!error && (loading || options.status === 'noMore') " :status="options.status" />
<uni-nodata v-if="data.length == 0" @retry="refresh"></uni-nodata>
</unicloud-db>
</view>
</view>
......@@ -107,7 +108,7 @@
},
methods: {
/**
* 切换商品列表布局方向
* 切换列表布局方向
*/
select() {
this.formData.waterfall = !this.formData.waterfall;
......
// 在本文件中可配置云数据库初始化,数据格式见:https://uniapp.dcloud.io/uniCloud/cf-database?id=db_init
// 编写完毕后对本文件点右键,可按配置规则创建表和添加数据
{
"opendb-banner": {
"data": [{
"bannerfile": "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/094a9dc0-50c0-11eb-b680-7980c8a877b8.jpg",
"open_url": "https://www.dcloud.io/",
"title": "内容 A",
"sort": 0,
"category_id": "grid",
"status": true,
"description": "备注"
},
{
"bannerfile": "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/094a9dc0-50c0-11eb-b680-7980c8a877b8.jpg",
"open_url": "https://www.dcloud.io/",
"title": "内容 B",
"sort": 0,
"category_id": "grid",
"status": true,
"description": "备注"
}, {
"bannerfile": "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/094a9dc0-50c0-11eb-b680-7980c8a877b8.jpg",
"open_url": "https://www.dcloud.io/",
"title": "内容 C",
"sort": 0,
"category_id": "grid",
"status": true,
"description": "备注"
}, {
"bannerfile": "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/094a9dc0-50c0-11eb-b680-7980c8a877b8.jpg",
"open_url": "https://www.dcloud.io/",
"title": "内容 D",
"sort": 0,
"category_id": "grid",
"status": true,
"description": "备注"
}
]
},
"opendb-news-articles-detail": {
"data": [{
"article_status": 1,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册