完成对公初始操作和专区
This commit is contained in:
@@ -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);
|
||||
|
@@ -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"
|
||||
}
|
@@ -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>
|
@@ -1,6 +1,6 @@
|
||||
<!--pages/encyclopedia/index.wxml-->
|
||||
<navigator title="电力百科" canBack="{{true}}" />
|
||||
<van-tabs active="{{ active }}" bind:change="onChange">
|
||||
<van-tabs active="{{ active }}" bind:change="onChange" swipeable>
|
||||
<van-tab wx:for="{{categoryList}}" wx:key="id" title="{{item.name}}">
|
||||
<item id="{{item.id}}" wx:if="{{index === active}}" />
|
||||
</van-tab>
|
||||
|
Reference in New Issue
Block a user