Browse Source

新增AIR页面

master
向顺璞 4 years ago
parent
commit
cccb6b4721
  1. BIN
      .DS_Store
  2. BIN
      assets/.DS_Store
  3. BIN
      assets/images/.DS_Store
  4. 0
      assets/images/tab-tag.png
  5. 17
      pages/index/index.js
  6. 47
      pages/index/index.wxml
  7. 103
      pages/index/index.wxss
  8. 1
      project.config.json
  9. 6
      project.private.config.json

BIN
.DS_Store vendored

Binary file not shown.

BIN
assets/.DS_Store vendored

Binary file not shown.

BIN
assets/images/.DS_Store vendored

Binary file not shown.

0
assets/images/矩形.png → assets/images/tab-tag.png

Before

Width:  |  Height:  |  Size: 615 B

After

Width:  |  Height:  |  Size: 615 B

17
pages/index/index.js

@ -4,7 +4,16 @@ const app = getApp()
Page({ Page({
data: { data: {
active: 1,
tabList:[{id:1,name:'已挂牌'},{id:2,name:'拟挂牌'},{id:3,name:'土地推介'},{id:4,name:'报告'},{id:5,name:'研究'}],
list:[
{title:'CQ210003-九龙坡区大桥石S区十组245-2',timer:'2021/01/01',state:1},
{title:'CQ210003-九龙坡区大桥石S区十组245-2',timer:'2021/01/01',state:2},
{title:'CQ210003-九龙坡区大桥石S区十组245-2',timer:'2021/01/01',state:3},
{title:'CQ210003-九龙坡区大桥石S区十组245-2',timer:'2021/01/01',state:2},
{title:'CQ210003-九龙坡区大桥石S区十组245-2',timer:'2021/01/01',state:3},
{title:'CQ210003-九龙坡区大桥石S区十组245-2',timer:'2021/01/01',state:1},
],
}, },
onShow(){ onShow(){
if (typeof this.getTabBar === 'function' && if (typeof this.getTabBar === 'function' &&
@ -13,5 +22,11 @@ Page({
selected: 2 selected: 2
}) })
} }
},
tabDowm(e){
let active = e.currentTarget.dataset.id
if(active!==this.data.active){
this.setData({active})
}
} }
}) })

47
pages/index/index.wxml

@ -1,4 +1,49 @@
<!--index.wxml--> <!--index.wxml-->
<wxs module="filter">
var setTag = function(state) {
var obj = {}
if(state===1){
obj = {
sname:'ycj',
text:'已成交'
}
}else if(state===2){
obj = {
sname:'wcj',
text:'未成交'
}
}else{
obj = {
sname:'gsz',
text:'公示中'
}
}
return obj
};
module.exports = {setTag:setTag};
</wxs>
<view class="pages"> <view class="pages">
<mp-navigation-bar ext-class="set-bar" title="AIR" back="{{false}}"></mp-navigation-bar>
<view class="tab">
<view class="tab-item {{item.id===active?'active':''}}" wx:for="{{tabList}}" wx:for-index="i" wx:for-item="item" wx:key="id" bindtap="tabDowm" data-id="{{item.id}}">
<text class="tab-title">{{item.name}}</text>
<image class="tab-tag" src="../../assets/images/tab-tag.png"></image>
</view>
</view>
<view class="main">
<scroll-view class="list" scroll-y="true" enable-flex="true" refresher-enabled>
<view class="list-item" wx:for="{{list}}" wx:for-index="i" wx:for-item="item">
<view class="list-info">
<view class="list-title">
{{item.title}}
</view>
<view class="list-tag center {{filter.setTag(item.state).sname}}">
{{filter.setTag(item.state).text}}
</view>
</view>
<view class="list-timer">挂牌日期:{{item.timer}}</view>
</view>
<view class="bottom"></view>
</scroll-view>
</view> </view>
</view>

103
pages/index/index.wxss

@ -1,19 +1,102 @@
/**index.wxss**/ /**index.wxss**/
.userinfo { .main{
padding-bottom: 0;
}
.tab{
display: flex;
justify-content: space-between;
padding: 30rpx;
}
.tab-item{
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
color: #aaa;
} }
.userinfo-avatar { .tab-title{
overflow: hidden; font-size: 30rpx;
width: 128rpx; font-weight: bold;
height: 128rpx; color: #565A6B;
margin: 20rpx; }
border-radius: 50%;
.tab-tag{
width: 44rpx;
height: 10rpx;
display: none;
}
.active .tab-title{
font-size: 34rpx;
font-weight: bold;
color: #262936;
}
.active .tab-tag{
display: block;
}
.list{
height: 100%;
display: flex;
flex-direction: column;
align-items: center ;
}
.list-item{
width: 688rpx;
height: 208rpx;
background: #FFFFFF;
box-shadow: 0 2rpx 23rpx 0 rgba(191, 191, 191, 0.15);
border-radius: 18rpx;
margin-bottom: 24rpx;
padding: 30rpx;
box-sizing: border-box;
}
.list-info{
display: flex;
justify-content: space-between;
}
.list-title{
max-width: 488rpx;
font-size: 33rpx;
color: #262936;
line-height: 47rpx;
}
.list-tag{
width: 89rpx;
height: 34rpx;
line-height: 34rpx;
border-radius: 4rpx;
font-size: 22rpx;
font-weight: bold;
color: #FFFFFF;
margin-top: 10rpx;
}
.ycj{
background-color: #FF652F;
}
.wcj{
background-color: #666A7A;
}
.gsz{
background-color: #02D775;
}
.list-timer{
margin-top: 10rpx;
font-size: 26rpx;
color: #838B99;
} }
.usermotto { .bottom{
margin-top: 200px; width: 688rpx;
height: 208rpx;
} }

1
project.config.json

@ -30,6 +30,7 @@
"outputPath": "" "outputPath": ""
}, },
"enableEngineNative": false, "enableEngineNative": false,
"bundle": false,
"useIsolateContext": true, "useIsolateContext": true,
"useCompilerModule": true, "useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false, "userConfirmedUseCompilerModuleSwitch": false,

6
project.private.config.json

@ -23,6 +23,12 @@
"pathName": "pages/message/message", "pathName": "pages/message/message",
"query": "", "query": "",
"scene": null "scene": null
},
{
"name": "AIR",
"pathName": "pages/index/index",
"query": "",
"scene": null
} }
] ]
} }

Loading…
Cancel
Save