Browse Source

添加宣传栏、园区、企业等页面

master
lqq 6 years ago
parent
commit
cab7e47f4d
  1. 7
      app.json
  2. 28
      components/card/index.js
  3. 4
      components/card/index.json
  4. 5
      components/card/index.wxml
  5. 18
      components/card/index.wxss
  6. 5
      components/cell/index.js
  7. 2
      components/cell/index.wxml
  8. BIN
      images/billboard/1.png
  9. BIN
      images/billboard/2.png
  10. BIN
      images/billboard/3.png
  11. BIN
      images/temp_1.png
  12. 68
      pages/billboards/firm/index.js
  13. 6
      pages/billboards/firm/index.json
  14. 8
      pages/billboards/firm/index.wxml
  15. 12
      pages/billboards/firm/index.wxss
  16. 18
      pages/billboards/index.js
  17. 1
      pages/billboards/index.json
  18. 6
      pages/billboards/index.wxml
  19. 12
      pages/billboards/index.wxss
  20. 68
      pages/billboards/park/index.js
  21. 6
      pages/billboards/park/index.json
  22. 8
      pages/billboards/park/index.wxml
  23. 12
      pages/billboards/park/index.wxss
  24. 66
      pages/billboards/policy/index.js
  25. 4
      pages/billboards/policy/index.json
  26. 2
      pages/billboards/policy/index.wxml
  27. 1
      pages/billboards/policy/index.wxss
  28. 6
      pages/home/index.js
  29. 7
      pages/home/index.wxml
  30. 22
      project.config.json

7
app.json

@ -3,12 +3,15 @@
"pages/home/index", "pages/home/index",
"pages/user/index", "pages/user/index",
"pages/billboards/index", "pages/billboards/index",
"pages/topics/index" "pages/topics/index",
"pages/billboards/firm/index",
"pages/billboards/park/index",
"pages/billboards/policy/index"
], ],
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff", "navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "凤栖市北", "navigationBarTitleText": "市北人才",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
}, },
"tabBar": { "tabBar": {

28
components/card/index.js

@ -0,0 +1,28 @@
// components/card/index.js
Component({
externalClasses:['tag-class'],
/**
* 组件的属性列表
*/
properties: {
cId: String,
image: String,
title: String
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
onTap () {
this.triggerEvent('clickCardItem', this.properties.cId)
}
}
})

4
components/card/index.json

@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

5
components/card/index.wxml

@ -0,0 +1,5 @@
<!--components/card/index.wxml-->
<view class="card tag-class" bindtap="onTap">
<image class="card_logo" src="/images/temp_1.png"/>
<view class="card_title">橡胶谷园区</view>
</view>

18
components/card/index.wxss

@ -0,0 +1,18 @@
/* components/card/index.wxss */
.card {
border: 1px solid #e7e7e7;
box-shadow: 1px 1px 1px #eee;
}
.card_logo {
width: 100%;
height: 106px;
}
.card_title {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
height: 41px;
color: #373737;
font-size: 12px;
}

5
components/cell/index.js

@ -4,6 +4,7 @@ Component({
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
cId: String,
title: String, title: String,
time: String, time: String,
showTop: { showTop: {
@ -23,6 +24,8 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
onTap () {
this.triggerEvent('clickListItem', { id: this.properties.cId})
}
} }
}) })

2
components/cell/index.wxml

@ -1,5 +1,5 @@
<!--components/cell/index.wxml--> <!--components/cell/index.wxml-->
<view class="cell" id="e-cell"> <view class="cell" id="e-cell" bindtap="onTap">
<view class="cell_title">{{title}}</view> <view class="cell_title">{{title}}</view>
<view class="cell_info"> <view class="cell_info">
<view class="cell_info_meta">{{time}}</view> <view class="cell_info_meta">{{time}}</view>

BIN
images/billboard/1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
images/billboard/2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
images/billboard/3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
images/temp_1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

68
pages/billboards/firm/index.js

@ -0,0 +1,68 @@
// pages/billboards/firm/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
clickCardItem(e) {
console.log(e.detail)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

6
pages/billboards/firm/index.json

@ -0,0 +1,6 @@
{
"navigationBarTitleText": "重点企业",
"usingComponents": {
"e-card": "/components/card/index"
}
}

8
pages/billboards/firm/index.wxml

@ -0,0 +1,8 @@
<!--pages/billboards/firm/index.wxml-->
<view class="container">
<block wx:for="{{[1,3,4]}}" wx:key="*this">
<e-card cId="{{index}}"
tag-class="e_card"
bind:clickCardItem="clickCardItem"/>
</block>
</view>

12
pages/billboards/firm/index.wxss

@ -0,0 +1,12 @@
/* pages/billboards/firm/index.wxss */
.container {
padding: 0 3vw;
display: flex;
flex-direction: row;
justify-content: space-between;
flex-wrap: wrap;
}
.e_card {
width: 45vw;
margin-bottom: 13px;
}

18
pages/billboards/index.js

@ -14,7 +14,23 @@ Page({
onLoad: function (options) { onLoad: function (options) {
}, },
onClickItem (e) {
const {index} = e.currentTarget.dataset
console.log(index)
if (index == 1) {
wx.navigateTo({
url: '/pages/billboards/policy/index',
})
} else if (index == 2) {
wx.navigateTo({
url: '/pages/billboards/park/index',
})
} else {
wx.navigateTo({
url: '/pages/billboards/firm/index',
})
}
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */

1
pages/billboards/index.json

@ -1,3 +1,4 @@
{ {
"navigationBarTitleText": "宣传栏",
"usingComponents": {} "usingComponents": {}
} }

6
pages/billboards/index.wxml

@ -1,2 +1,6 @@
<!--pages/billboards/index.wxml--> <!--pages/billboards/index.wxml-->
<text>pages/billboards/index.wxml</text> <view class="container">
<image bindtap="onClickItem" data-index="1" class="billboard_item" src="/images/billboard/1.png"></image>
<image bindtap="onClickItem" data-index="2" class="billboard_item" src="/images/billboard/2.png"></image>
<image bindtap="onClickItem" data-index="3" class="billboard_item" src="/images/billboard/3.png"></image>
</view>

12
pages/billboards/index.wxss

@ -1 +1,13 @@
/* pages/billboards/index.wxss */ /* pages/billboards/index.wxss */
.container {
height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.billboard_item {
margin-top: 25px;
width: 90%;
height: 120px;
}

68
pages/billboards/park/index.js

@ -0,0 +1,68 @@
// pages/billboards/park/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
clickCardItem (e) {
console.log(e.detail)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

6
pages/billboards/park/index.json

@ -0,0 +1,6 @@
{
"navigationBarTitleText": "创业园区",
"usingComponents": {
"e-card": "/components/card/index"
}
}

8
pages/billboards/park/index.wxml

@ -0,0 +1,8 @@
<!--pages/billboards/park/index.wxml-->
<view class="container">
<block wx:for="{{[1,3,4]}}" wx:key="*this">
<e-card cId="{{index}}"
tag-class="e_card"
bind:clickCardItem="clickCardItem"/>
</block>
</view>

12
pages/billboards/park/index.wxss

@ -0,0 +1,12 @@
/* pages/billboards/park/index.wxss */
.container {
padding: 0 3vw;
display: flex;
flex-direction: row;
justify-content: space-between;
flex-wrap: wrap;
}
.e_card {
width: 45vw;
margin-bottom: 13px;
}

66
pages/billboards/policy/index.js

@ -0,0 +1,66 @@
// pages/billboards/policy/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

4
pages/billboards/policy/index.json

@ -0,0 +1,4 @@
{
"navigationBarTitleText": "人才政策",
"usingComponents": {}
}

2
pages/billboards/policy/index.wxml

@ -0,0 +1,2 @@
<!--pages/billboards/policy/index.wxml-->
<text>pages/billboards/policy/index.wxml</text>

1
pages/billboards/policy/index.wxss

@ -0,0 +1 @@
/* pages/billboards/policy/index.wxss */

6
pages/home/index.js

@ -6,16 +6,19 @@ Page({
data: { data: {
list: [ list: [
{ {
id: '1',
title: '啦啦啦量阿拉蕾阿拉啦', title: '啦啦啦量阿拉蕾阿拉啦',
showTop: true, showTop: true,
time: '刚刚' time: '刚刚'
}, },
{ {
id: '2',
title: '一条大河,向东流', title: '一条大河,向东流',
showTop: false, showTop: false,
time: '1分钟前' time: '1分钟前'
}, },
{ {
id: '3',
title: '啦啦啦量阿拉蕾阿拉啦', title: '啦啦啦量阿拉蕾阿拉啦',
showTop: false, showTop: false,
time: '1小时前' time: '1小时前'
@ -30,5 +33,8 @@ Page({
}, },
tapFocusItem (e) { tapFocusItem (e) {
console.log(e.detail) console.log(e.detail)
},
clickListItem (e) {
console.log(e.detail)
} }
}) })

7
pages/home/index.wxml

@ -3,6 +3,11 @@
<e-swiper bind:tapSwiperItem="tapSwiperItem"/> <e-swiper bind:tapSwiperItem="tapSwiperItem"/>
<e-focus bind:tapFocusItem="tapFocusItem"/> <e-focus bind:tapFocusItem="tapFocusItem"/>
<block wx:for="{{list}}" wx:key="*this"> <block wx:for="{{list}}" wx:key="*this">
<e-cell title="{{item.title}}" time="{{item.time}}" showTop="{{item.showTop}}" /> <e-cell
cId="{{item.id}}"
title="{{item.title}}"
time="{{item.time}}"
showTop="{{item.showTop}}"
bind:clickListItem="clickListItem"/>
</block> </block>
</view> </view>

22
project.config.json

@ -41,13 +41,31 @@
"current": -1, "current": -1,
"list": [] "list": []
}, },
"plugin": {
"current": -1,
"list": []
},
"game": { "game": {
"currentL": -1, "currentL": -1,
"list": [] "list": []
}, },
"miniprogram": { "miniprogram": {
"current": -1, "current": 1,
"list": [] "list": [
{
"id": -1,
"name": "Boillboard",
"pathName": "pages/billboards/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "Park",
"pathName": "pages/billboards/park/index",
"scene": null
}
]
} }
} }
} }
Loading…
Cancel
Save