Browse Source

政策资讯列表+详情页

epass
wangyx 3 months ago
parent
commit
81f1916597
  1. 4
      api/index.js
  2. 4
      app.json
  3. 3
      app.wxss
  4. 14
      project.private.config.json
  5. 66
      subpages/index/policy/detail/detail.js
  6. 11
      subpages/index/policy/detail/detail.json
  7. 25
      subpages/index/policy/detail/detail.wxml
  8. 13
      subpages/index/policy/detail/detail.wxss
  9. BIN
      subpages/index/policy/images/banner.png
  10. 71
      subpages/index/policy/index/index.js
  11. 11
      subpages/index/policy/index/index.json
  12. 43
      subpages/index/policy/index/index.wxml
  13. 18
      subpages/index/policy/index/index.wxss
  14. 2
      utils/config.js
  15. 5
      utils/request.js

4
api/index.js

@ -0,0 +1,4 @@
var fly = require('../utils/request')
export function mzPolicy(data) {
return fly.get(`mzPolicy`,data)
}

4
app.json

@ -28,7 +28,9 @@
"root": "subpages/index",
"name": "index",
"pages": [
"renewalApplication/renewalApplication"
"renewalApplication/renewalApplication",
"policy/index/index",
"policy/detail/detail"
]
}
],

3
app.wxss

@ -142,6 +142,9 @@ page{
.text-30{
font-size: 30rpx;
}
.text-indent{
text-indent: 2em;
}
.font-bold{
font-weight: 600;
}

14
project.private.config.json

@ -14,6 +14,20 @@
"condition": {
"miniprogram": {
"list": [
{
"name": "subpages/index/policy/detail/detail",
"pathName": "subpages/index/policy/detail/detail",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "subpages/index/policy/index/index",
"pathName": "subpages/index/policy/index/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "subpages/OCRCard/pages/confirm/confirm",
"pathName": "subpages/OCRCard/pages/confirm/confirm",

66
subpages/index/policy/detail/detail.js

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

11
subpages/index/policy/detail/detail.json

@ -0,0 +1,11 @@
{
"navigationStyle": "custom",
"usingComponents": {
"navigationBar": "/components/navigationBar/navigationBar",
"van-image": "@vant/weapp/image/index",
"van-button": "@vant/weapp/button/index",
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index",
"van-divider": "@vant/weapp/divider/index"
}
}

25
subpages/index/policy/detail/detail.wxml

@ -0,0 +1,25 @@
<!--subpages/index/policy/detail/detail.wxml-->
<navigationBar title="详情" isSowArrow titleAlign="center"></navigationBar>
<view class="cont">
<view class="ad">
<van-image width="100%" height="144" src="/subpages/index/policy/images/banner.png" />
</view>
<view class="card mt-16">
<view class="flex flex-col">
<view class="flex">
<view class="flex-1 flex flex-col flex-sb">
<view class="ellipsis-2 ">青岛人彩棉租住房申请条件的先骨干说明</view>
<view class="flex flex-sb mt-16">
<view class=" text-26 pl-16 color-gray">住房政策</view>
<view class=" text-26 color-gray px-20">2025-04-27 05:50:32</view>
</view>
</view>
</view>
<van-divider />
</view>
<view class="text-indent text-30 des">
在政策适用对象方面,主要是来青岛求职、在青岛就业创业的毕业3年内全日制专科及以上学历高校毕业生。其中,相比国内其他城市政策,该市把毕业学年内待就业的在校大学生,以及技工院校高级工班、预备技师班、技师班的毕业生纳入政策保障。
</view>
</view>
</view>

13
subpages/index/policy/detail/detail.wxss

@ -0,0 +1,13 @@
/* subpages/index/policy/detail/detail.wxss */
.cont{
position: relative;
}
.card{
position: absolute;
background: #fff;
border-radius: 16rpx;
top: 260rpx;
}
.des{
line-height: 48rpx;
}

BIN
subpages/index/policy/images/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 KiB

71
subpages/index/policy/index/index.js

@ -0,0 +1,71 @@
// subpages/index/policy/index/index.js
import { mzPolicy } from "../../../../api/index";
Page({
/**
* 页面的初始数据
*/
data: {
tabs: [
{ title: "最新" },
{ title: "住房政策" },
{ title: "人才政策" },
{ title: "就业政策" },
],
active: 0,
currentCont: 0,
pageNo: 1,
pageSize: 10,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getPolicyList();
},
async getPolicyList() {
const res = await mzPolicy({
pageNo: this.data.pageNo,
pageSize: this.data.pageSize,
});
},
onChange(event) {
this.setData({
active: event.detail,
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {},
});

11
subpages/index/policy/index/index.json

@ -0,0 +1,11 @@
{
"navigationStyle": "custom",
"usingComponents": {
"navigationBar": "/components/navigationBar/navigationBar",
"van-image": "@vant/weapp/image/index",
"van-button": "@vant/weapp/button/index",
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index",
"van-divider": "@vant/weapp/divider/index"
}
}

43
subpages/index/policy/index/index.wxml

@ -0,0 +1,43 @@
<!-- subpages/index/policy/index/index.wxml -->
<navigationBar title="政策资讯" isSowArrow titleAlign="center"></navigationBar>
<view class="ad">
<van-image width="100%" height="144" src="/subpages/index/policy/images/banner.png" />
<view class="flex flex-center-j des">为您提供最新政策资讯内容</view>
</view>
<view class="content">
<view class="tab">
<van-tabs active="{{ active }}" ellipsis='{{false}}' title-active-color="#07a6a6" color="#07a6a6" line-width='80rpx' bind:change="onChange">
<van-tab wx:for="{{tabs}}" wx:key="index" title="{{item.title}}"></van-tab>
</van-tabs>
</view>
<view wx:if="{{active === 0}}" class="card mt-16">
<view class="flex flex-col" wx:for="{{3}}">
<view class="flex">
<view class="flex-1 flex flex-col flex-sb">
<view class="ellipsis-2 ">青岛人彩棉租住房申请条件的先骨干说明</view>
<view class="flex flex-sb">
<view class=" text-26 pl-16 color-gray">住房政策</view>
<view class=" text-26 color-gray px-20">2025-04-27 05:50:32</view>
</view>
</view>
<image src="/images/zixun.png" style="width:230rpx;height:154rpx" />
</view>
<van-divider />
</view>
</view>
<view wx:if="{{active === 1}}" class="card mt-16">
<view class="flex flex-col" wx:for="{{3}}">
<view class="flex">
<view class="flex-1 flex flex-col flex-sb">
<view class="ellipsis-2 ">青岛人彩棉租住房申请条件的先骨干说明</view>
<view class="flex flex-sb">
<view class=" text-26 pl-16 color-gray">住房政策</view>
<view class=" text-26 color-gray px-20">2025-04-27 05:50:32</view>
</view>
</view>
<image src="/images/zixun.png" style="width:230rpx;height:154rpx" />
</view>
<van-divider />
</view>
</view>
</view>

18
subpages/index/policy/index/index.wxss

@ -0,0 +1,18 @@
/* subpages/index/policy/index/index.wxss */
.ad {
position: relative;
}
.des {
position: absolute;
bottom: 104rpx;
left: 0;
right: 0;
color: #005FA2;
font-size: 24rpx;
}
.van-tab--active {
font-weight: bold !important;
}

2
utils/config.js

@ -13,7 +13,7 @@ module.exports = {
};
function BASEURL() {
return 'https://zl.linyicszh.com/api/'
return 'http://192.168.1.144:8080/mz-api/'
// return 'http://192.168.1.140/api/'
// return 'https://epmet-test.elinkservice.cn/api/'
}

5
utils/request.js

@ -21,10 +21,7 @@ const request = function (url, options) {
'Content-Type': 'application/json; charset=UTF-8',
'Authorization': token,
'token':token,
'client':'web',
'app':'volunteer',
'appuserid':'',
'customerId':''
},
success (response) {
// console.log(response);

Loading…
Cancel
Save