Browse Source

人才政策

master
lqq 6 years ago
parent
commit
cf5b1343cc
  1. 3
      components/segment/index.wxss
  2. BIN
      images/billboard/arrow-down.png
  3. 22
      pages/billboards/policy/policy-list/index.js
  4. 11
      pages/billboards/policy/policy-list/index.wxml
  5. 61
      pages/billboards/policy/policy-list/index.wxss

3
components/segment/index.wxss

@ -7,6 +7,7 @@
}
.title {
min-width: 150rpx;
white-space: nowrap;
display: flex;
align-items: center;
justify-content: center;
@ -21,7 +22,7 @@
transition: 0.5s all ease-in-out;
}
.title-selected {
font-size: 16px;
font-size: 15px;
color: #292E3E;
}
.select-line{

BIN
images/billboard/arrow-down.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

22
pages/billboards/policy/policy-list/index.js

@ -11,7 +11,8 @@ Page({
nodes: '',
navs: [],
tags: [], // 导航的原始数据
curCode: ''
curCode: '',
show: false,
},
/**
@ -31,11 +32,28 @@ Page({
})
this.fetchPolicyArtice()
},
onShowAllButton () {
console.log('show All tbn')
const show = this.data.show
this.setData({
show: !show
})
},
onClickAllBtnItem (e) {
const index = e.currentTarget.dataset.index
this.setData({
navSelectIndex: index,
curCode: this.data.tags[index].code,
show: false,
})
this.fetchPolicyArtice()
},
tapSegemnt (e) {
//console.log(e.detail)
const index = e.detail.index
this.setData({
curCode: this.data.tags[index].code
curCode: this.data.tags[index].code,
show: false
})
this.fetchPolicyArtice()
},

11
pages/billboards/policy/policy-list/index.wxml

@ -1,14 +1,25 @@
<!--pages/billboards/policy/policy-list/index.wxml-->
<view class="container">
<view class="page_hd">
<view class="page_segment">
<e-segment
headerTitles="{{navs}}"
defaultSelectIndex="{{navSelectIndex}}"
bind:tapSegment="tapSegemnt"
/>
</view>
<view class="page_btn_all" bindtap="onShowAllButton">
<image class="arrow_btn" src="/images/billboard/arrow-down.png"></image>
</view>
</view>
<view class="page_bd">
<rich-text nodes="{{nodes}}"></rich-text>
</view>
<e-empty empty="{{nodes.length <= 0}}" message="暂无数据"/>
<view class="pop_view pop_view_layout {{show ? 'pop_show': 'pop_hidden'}}">
<block wx:for="{{navs}}" wx:key="pop_{{index}}">
<text bindtap="onClickAllBtnItem" data-index="{{index}}" class="pop_item">{{item}}</text>
</block>
</view>
</view>

61
pages/billboards/policy/policy-list/index.wxss

@ -1,15 +1,70 @@
/* pages/billboards/policy/policy-list/index.wxss */
.container {
position: relative;
}
.page_hd {
position: fixed;
border-bottom: 1px solid #f7f7f7;
top: 0;
height: 48px;
width: 100%;
height: 40px;
right: 0;
left: 0;
z-index: 10;
background-color: white;
display: flex;
flex-direction: row;
}
.page_segment {
width: 90vw;
}
.page_btn_all {
width: 10vw;
background-color: white;
display: flex;
justify-content: center;
align-items: center;
}
.arrow_btn {
width: 30px;
height: 30px;
}
.page_bd {
padding: 10px 10px 0 10px;
margin-top: 48px;
margin-top: 40px;
}
/* 弹出视图 */
.pop_view {
position: absolute;
left: 0;
right: 0;
top: 0px;
height: 150px;
overflow: scroll;
background-color: white;
transition: 0.2s all ease-in-out;
}
.pop_show {
top: 0;
}
.pop_hidden {
top: -150px;
}
.pop_view_layout {
/* 布局 */
padding: 0 10px;
border-bottom: 2px solid #f7f7f7;
}
.pop_item {
color: #999999;
font-size: 14px;
margin-top: 10px;
display: inline-block;
height: 20px;
margin-right: 10px;
white-space: nowrap;
padding: 8rpx 15rpx;
border-radius: 14px;
border: 1px solid #999999;
}
Loading…
Cancel
Save