完成对公初始操作和专区

This commit is contained in:
2024-09-09 15:57:59 +08:00
parent 9a6c4d30f4
commit 927b7a6470
12 changed files with 97 additions and 45 deletions

View File

@@ -30,7 +30,6 @@ Component({
*/
methods: {
async getData() {
console.log(this.data.page, this.data.id, this.id)
const page = this.data.page;
const id = this.id;
const { code, data, message, total } = await getEncyclopediaList(id, page);

View File

@@ -3,7 +3,8 @@
"usingComponents": {
"pagination": "/components/pagination/index",
"navigator": "/components/navigator/index",
"van-field": "@vant/weapp/field/index"
"van-field": "@vant/weapp/field/index",
"empty": "/components/empty/index"
},
"navigationStyle": "custom"
}

View File

@@ -1,15 +1,21 @@
<!--pages/encyclopedia/components/item/index.wxml-->
<van-field
wx:for="{{list}}"
value="{{ item.title }}"
readonly
border="{{ true }}"
wx:key="id"
bind:tap="jumpToDetail"
data-data="{{item}}"
/>
<pagination
currentIndex="{{page}}"
totalPage="{{totalPage}}"
bind:pagingChange="onChangePage"
/>
<view wx:if="{{list.length}}">
<van-field
wx:for="{{list}}"
value="{{ item.title }}"
readonly
border="{{ true }}"
wx:key="id"
bind:tap="jumpToDetail"
data-data="{{item}}"
/>
<pagination
currentIndex="{{page}}"
totalPage="{{totalPage}}"
bind:pagingChange="onChangePage"
/>
</view>
<view wx:else>
<empty bind:refresh="getData" />
</view>