Browse Source

部分修改

master
tianqian 2 years ago
parent
commit
e8ba8d9f4b
  1. 2
      miniprogram/custom-tab-bar/index.js
  2. 96
      miniprogram/pages/index/index.js
  3. 27
      miniprogram/pages/index/index.json
  4. 128
      miniprogram/pages/index/index.wxml
  5. 320
      miniprogram/pages/index/index.wxss
  6. 2
      miniprogram/subpages/knight/pages/knight/knight.wxml
  7. 2
      miniprogram/subpages/pioneer/pages/pioneer/pioneer.json
  8. 6
      miniprogram/subpages/pioneer/pages/pioneer/pioneer.wxml
  9. 2
      miniprogram/subpages/redGrider/pages/redGrider/redGrider.json
  10. 4
      miniprogram/subpages/redGrider/pages/redGrider/redGrider.wxml
  11. 2
      miniprogram/subpages/redSail/pages/redSail/redSail.json
  12. 2
      miniprogram/subpages/redSail/pages/redSail/redSail.wxml

2
miniprogram/custom-tab-bar/index.js

@ -6,7 +6,7 @@ Component({
selectedColor: "#F13A47",
"list": [
{
"pagePath": "/pages/home/home",
"pagePath": "/pages/index/index",
"text": "首页",
"iconPath": "/images/main/icon01.png",
"selectedIconPath": "/images/main/icon01-a.png"

96
miniprogram/pages/index/index.js

@ -1,3 +1,4 @@
const app = getApp()
const api = require("../../utils/api")
const homeApi = require("../../utils/home")
@ -40,63 +41,66 @@ Page({
signMsg: "",
signCode: 0,
isSignUp: 0,
communityId: "" // 社区id
communityId: "",// 社区id
statusHeight: app.globalData.deviceInfo.statusHeight, // 自定义头部状态栏高度
navigationHeight: app.globalData.deviceInfo.navigationHeight,
},
async onLoad(options) {
wx.showLoading({
title: "加载中,请稍后",
mask: true
})
if (options.shareType) {
const para = {
shareType: options.shareType,
detailId: options.detailId,
infoCompleted: options.infoCompleted ? options.infoCompleted : "",
type: options.detailType ? options.detailType : "",
showClassify: options.showClassify ? options.showClassify : "",
nowGridId: options.nowGridId ? options.nowGridId : ""
}
wx.setStorageSync("shareObj", JSON.stringify(para))
}
if (options.scene) {
this.setData({
statusHeight: app.globalData.deviceInfo.statusHeight,
navigationHeight: app.globalData.deviceInfo.navigationHeight,
gridId: options.scene,
})
} else {
this.setData({
statusHeight: app.globalData.deviceInfo.statusHeight,
navigationHeight: app.globalData.deviceInfo.navigationHeight,
})
}
// wx.showLoading({
// title: "加载中,请稍后",
// mask: true
// })
// if (options.shareType) {
// const para = {
// shareType: options.shareType,
// detailId: options.detailId,
// infoCompleted: options.infoCompleted ? options.infoCompleted : "",
// type: options.detailType ? options.detailType : "",
// showClassify: options.showClassify ? options.showClassify : "",
// nowGridId: options.nowGridId ? options.nowGridId : ""
// }
// wx.setStorageSync("shareObj", JSON.stringify(para))
// }
// if (options.scene) {
// this.setData({
// statusHeight: app.globalData.deviceInfo.statusHeight,
// navigationHeight: app.globalData.deviceInfo.navigationHeight,
// gridId: options.scene,
// })
// } else {
// this.setData({
// statusHeight: app.globalData.deviceInfo.statusHeight,
// navigationHeight: app.globalData.deviceInfo.navigationHeight,
// })
// }
// 切换网格的时候,更换网格id
if (options.departmentId) {
this.setData({
departmentId: options.departmentId
})
}
await this.getUserState()
this.data.isCarryLoad = true
// // 切换网格的时候,更换网格id
// if (options.departmentId) {
// this.setData({
// departmentId: options.departmentId
// })
// }
// // await this.getUserState()
// this.data.isCarryLoad = true
},
onTabItemTap() {
this.getUserState()
// this.getUserState()
},
onShow() {
// 检查版本更新
checkoutVersion()
this.getFirstInfo()
// checkoutVersion()
// this.getFirstInfo()
},
onReachBottom() {
this.setData({
loadMoreVisible: true
})
if (this.data.loadMoreType === "loading") {
this.data.pageNo += 1
this.getNewsList()
}
// this.setData({
// loadMoreVisible: true
// })
// if (this.data.loadMoreType === "loading") {
// this.data.pageNo += 1
// this.getNewsList()
// }
},
// 根据微信code查询用户当前状态
getUserState() {

27
miniprogram/pages/index/index.json

@ -1,18 +1,11 @@
{
"navigationBarTitleText": "党群e家",
"navigationStyle": "custom",
"navigationBarTextStyle": "white",
"usingComponents": {
"banner": "./components/banner/banner",
"sudoku": "./components/sudoku/sudoku",
"notice": "./components/notice/notice",
"project": "./components/project/project",
"news-list":"./components/newsList/newsList",
"load-more": "../../components/loadMore/loadMore",
"complete-info-dialog": "../../components/completeInfoDialog/completeInfoDialog",
"wux-popup": "../../dist/popup/index"
},
"enablePullDownRefresh": true,
"backgroundColor": "#f8f8f8",
"backgroundTextStyle": "dark"
}
"navigationBarTitleText": "党群e家",
"navigationStyle": "custom",
"navigationBarTextStyle": "white",
"usingComponents": {
},
"enablePullDownRefresh": true,
"backgroundColor": "#f8f8f8",
"backgroundTextStyle": "dark"
}

128
miniprogram/pages/index/index.wxml

@ -1,12 +1,86 @@
<view class="header" style="height: {{statusHeight + navigationHeight}}px;">
<image class="header-bg" src="../../images/home/home-status.png" />
<view class="navigation" style="height: {{navigationHeight}}px; top: {{statusHeight}}px;">
党群e家
</view>
<view class="header">
<image class="header-bg" src="../../images/main/home_top.png" mode="widthFix" />
<view class="navigation" style="height: {{navigationHeight}}px; top: {{statusHeight}}px;">
首页
</view>
</view>
<view class="bgw topf50">
<view class="gridouter">
<navigator url="/subpages/redSail/pages/redSail/redSail" class="grid">
<image src="../../images/main/home01.png" />
<view>新锋支部</view>
</navigator>
<navigator url="/subpages/knight/pages/knight/knight" class="grid">
<image src=" ../../images/main/home02.png" />
<view>骑士驿站</view>
</navigator>
<navigator url="/subpages/redGrider/pages/redGrider/redGrider" class="grid">
<image src="../../images/main/home03.png" />
<view>网格力量</view>
</navigator>
<navigator url="/subpages/pioneer/pages/pioneer/pioneer" class="grid">
<image src="../../images/main/home04.png" />
<view>北尚先锋</view>
</navigator>
</view>
<view class="grid2outer">
<navigator url="/subpages/checkIn/pages/checkIn/checkIn" class="grid2 blue">
<image src="../../images/main/home05.png" />
<view>
<view class="h1">在职党员</view>
<view class="h2">到居住社区报到</view>
</view>
</navigator>
<view class="w40"></view>
<navigator url="/subpages/volunteer/pages/volunteer/volunteer" class="grid2 red">
<image src="../../images/main/home06.png" />
<view>
<view class="h1">红色尖兵</view>
<view class="h2">志愿服务队</view>
</view>
</navigator>
</view>
</view>
<view class="home" style="margin-top: {{statusHeight + navigationHeight}}px">
<!-- 所属网格 -->
<view class="belong-grid">
<view class="bgw top16">
<view class="title01">推荐</view>
<view class="home_news_list">
<view class="item">
<image src="../../images/main/home_top.png"></image>
<view class="vbetween">
<view class="h1">围绕“经济抓党建,抓好党建促 发展”主题展开活动</view>
<view class="h2">
<view class="time">2023-05-22</view>XXX社区党支部
</view>
</view>
</view>
<view class="item">
<image src="../../images/main/home_top.png"></image>
<view class="vbetween">
<view class="h1">围绕“经济抓党建,抓好党建促 发展”主题展开活动</view>
<view class="h2">
<view class="time">2023-05-22</view>XXX社区党支部
</view>
</view>
</view>
<view class="item">
<image src="../../images/main/home_top.png"></image>
<view class="vbetween">
<view class="h1">围绕“经济抓党建,抓好党建促 发展”主题展开活动</view>
<view class="h2">
<view class="time">2023-05-22</view>XXX社区党支部
</view>
</view>
</view>
</view>
</view>
<!-- <view class="home" style="margin-top: {{statusHeight + navigationHeight}}px"> -->
<!-- <view class="belong-grid">
<image class="belong-grid-bg" src="../../images/home/home-grid-bg.png" />
<view class="newbelong-grid">
<view class="grid" bindtap="changeGrid">
@ -19,23 +93,23 @@
<image src="../../images/home/signined.png" wx:else />
</view>
</view>
</view>
<!-- banner列表 -->
<banner bind:navigatetoBannerDetail="navigatetoBannerDetail" bannerList="{{bannerList}}"></banner>
<!-- sudoku九宫格 -->
<sudoku sudokuState="{{sudokuState}}" userInfo="{{userInfo}}" bind:navigateToDemand="navigateToDemand" bind:navigateToTripReport="navigateToTripReport" bind:navigateToPartyMasses="navigateToPartyMasses" bind:navigateToQuestionnaire="navigateToQuestionnaire" bind:navigateToServiceGuide="navigateToServiceGuide" bind:navigatetoPartyElegant="navigatetoPartyElegant" bind:navigatetoUnionBuild="navigatetoUnionBuild" bind:navigateToAnytimeSay="navigateToAnytimeSay" bind:navigateToAnytimeSay_cc="navigateToAnytimeSay_cc" bind:navigateToAddIssue="navigateToAddIssue" bind:navigatetoConsultion="navigatetoConsultion" bind:navigateToNotice="navigateToNotice" bind:navigatetoAppraise="navigatetoAppraise"></sudoku>
<!-- 消息列表 -->
<notice bind:navigateToInfoList="navigateToInfoList" infoList="{{infoList}}" unreadnum="{{unReadNum}}"></notice>
<!-- 项目列表 -->
<project bind:navigatetoItemDetail="navigatetoItemDetail" projectList="{{projectList}}"></project>
<!-- 新闻列表 -->
<news-list newsList="{{newsList}}" bind:navigatetoNewsDetail="navigatetoNewsDetail"></news-list>
<!-- 加载更多提示 -->
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more>
<!-- 完善过信息提示框 -->
<complete-info-dialog completeInfoDialogVisible="{{completeInfoDialogVisible}}"></complete-info-dialog>
</view>
</view> -->
<!-- banner列表 -->
<!-- <banner bind:navigatetoBannerDetail="navigatetoBannerDetail" bannerList="{{bannerList}}"></banner> -->
<!-- sudoku九宫格 -->
<!-- <sudoku sudokuState="{{sudokuState}}" userInfo="{{userInfo}}" bind:navigateToDemand="navigateToDemand" bind:navigateToTripReport="navigateToTripReport" bind:navigateToPartyMasses="navigateToPartyMasses" bind:navigateToQuestionnaire="navigateToQuestionnaire" bind:navigateToServiceGuide="navigateToServiceGuide" bind:navigatetoPartyElegant="navigatetoPartyElegant" bind:navigatetoUnionBuild="navigatetoUnionBuild" bind:navigateToAnytimeSay="navigateToAnytimeSay" bind:navigateToAnytimeSay_cc="navigateToAnytimeSay_cc" bind:navigateToAddIssue="navigateToAddIssue" bind:navigatetoConsultion="navigatetoConsultion" bind:navigateToNotice="navigateToNotice" bind:navigatetoAppraise="navigatetoAppraise"></sudoku> -->
<!-- 消息列表 -->
<!-- <notice bind:navigateToInfoList="navigateToInfoList" infoList="{{infoList}}" unreadnum="{{unReadNum}}"></notice> -->
<!-- 项目列表 -->
<!-- <project bind:navigatetoItemDetail="navigatetoItemDetail" projectList="{{projectList}}"></project> -->
<!-- 新闻列表 -->
<!-- <news-list newsList="{{newsList}}" bind:navigatetoNewsDetail="navigatetoNewsDetail"></news-list> -->
<!-- 加载更多提示 -->
<!-- <load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more> -->
<!-- 完善过信息提示框 -->
<!-- <complete-info-dialog completeInfoDialogVisible="{{completeInfoDialogVisible}}"></complete-info-dialog> -->
<!-- </view> -->
<!-- 签到后提醒 -->
<wux-popup visible="{{visible}}" title="{{signCode === 0 ? '签到成功' : '签到失败'}}" content="{{signMsg}}" bind:close="onClose">
<view slot="footer" class="popup__button" bindtap="onClose">确定</view>
</wux-popup>
<!-- <wux-popup visible="{{visible}}" title="{{signCode === 0 ? '签到成功' : '签到失败'}}" content="{{signMsg}}" bind:close="onClose">
<view slot="footer" class="popup__button" bindtap="onClose">确定</view>
</wux-popup> -->

320
miniprogram/pages/index/index.wxss

@ -1,127 +1,287 @@
page {
width: 100%;
height: auto;
overflow-y: auto;
background: #f7f7f7;
width: 100%;
height: auto;
overflow-y: auto;
background: #f7f7f7;
font-family: PingFang SC;
}
.header {
position: fixed;
width: 100%;
top: 0;
left: 0;
z-index: 1000;
width: 100%;
height: 484rpx;
/* position: fixed;
top: 0;
left: 0;
z-index: 1000; */
}
.header .header-bg {
width: 100%;
height: 100%;
position: absolute;
z-index: 10;
left: 0;
top: 0;
width: 100%;
height: 100%;
/* position: absolute;
z-index: 10;
left: 0;
top: 0; */
position: absolute;
height: 100%;
z-index: -999;
}
.header .navigation {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
color: rgba(255,255,255, 0.9);
font-size: 32rpx;
position: relative;
z-index: 100;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
color: rgba(255, 255, 255, 0.9);
font-size: 32rpx;
position: relative;
z-index: 100;
}
.home {
width: 100%;
width: 100%;
}
.belong-grid {
width: 100%;
height: 100rpx;
position: relative;
width: 100%;
height: 100rpx;
position: relative;
}
.belong-grid .belong-grid-bg {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 10;
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 0;
}
.belong-grid .grid {
width: 100%;
height: 100%;
position: relative;
z-index: 100;
display: flex;
align-items: center;
width: 100%;
height: 100%;
position: relative;
z-index: 100;
display: flex;
align-items: center;
}
.belong-grid .grid .party-logo {
width: 32rpx;
height: 32rpx;
margin: 0 10rpx 0 23rpx;
width: 32rpx;
height: 32rpx;
margin: 0 10rpx 0 23rpx;
}
.belong-grid .grid .grid-name {
font-size: 32rpx;
color: #fff;
font-size: 32rpx;
color: #fff;
}
.belong-grid .grid .more-grid {
width: 18rpx;
height: 26rpx;
margin-left: 10rpx;
width: 18rpx;
height: 26rpx;
margin-left: 10rpx;
}
.belong-grid .newbelong-grid {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
width: 100%;
height: 100rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
width: 100%;
height: 100rpx;
}
.belong-grid .newbelong-grid .signin-btn {
width: 140rpx;
height: 44rpx;
position: absolute;
z-index: 99;
right: 30rpx;
width: 140rpx;
height: 44rpx;
position: absolute;
z-index: 99;
right: 30rpx;
}
.belong-grid .newbelong-grid .signin-btn image {
width: 100%;
height: 100%;
width: 100%;
height: 100%;
}
.belong-grid .newbelong-grid .grid {
/* width: 90%; */
width: calc(100% - 170rpx);
height: 34rpx;
position: relative;
z-index: 100;
display: flex;
align-items: center;
/* width: 90%; */
width: calc(100% - 170rpx);
height: 34rpx;
position: relative;
z-index: 100;
display: flex;
align-items: center;
}
.belong-grid .newbelong-grid .grid .party-logo {
width: 24rpx;
height: 30rpx;
margin: 0 14rpx 0 22rpx;
width: 24rpx;
height: 30rpx;
margin: 0 14rpx 0 22rpx;
}
.belong-grid .newbelong-grid .grid .grid-name {
font-size: 32rpx;
color: #fff;
font-size: 32rpx;
color: #fff;
}
.belong-grid .newbelong-grid .grid .more-grid {
width: 16rpx;
height: 22rpx;
margin-left: 10rpx;
margin-top: 5rpx;
width: 16rpx;
height: 22rpx;
margin-left: 10rpx;
margin-top: 5rpx;
}
.popup__button {
width: 100%;
text-align: center;
font-size: 36rpx;
color: #04BCA0;
width: 100%;
text-align: center;
font-size: 36rpx;
color: #04BCA0;
}
.bgw {
background-color: #fff;
margin: 20rpx;
border-radius: 20rpx;
padding: 40rpx 30rpx;
box-sizing: border-box;
z-index: 1;
}
.gridouter {
display: flex;
justify-content: space-around;
}
.grid {
width: 25%;
text-align: center;
font-size: 28rpx;
line-height: 56rpx;
color: #333333;
}
.grid image {
width: 80rpx;
height: 80rpx;
}
.grid2outer {
display: flex;
justify-content: space-between;
}
.grid2 {
flex: 1;
background: linear-gradient(90deg, #F5F9FE 0%, #FBFDFF 100%);
border-radius: 16rpx;
display: flex;
padding: 30rpx;
margin: 20rpx 0rpx 0rpx;
}
.grid2 .h1 {
font-size: 32rpx;
font-weight: bold;
line-height: 36rpx;
}
.grid2 .h2 {
height: 23rpx;
font-size: 24rpx;
line-height: 36rpx;
}
.grid2 image {
width: 64rpx;
height: 64rpx;
margin-right: 10rpx
}
.blue {
background: linear-gradient(90deg, #F5F9FE 0%, #FBFDFF 100%);
}
.blue .h1 {
color: #5A89B7;
}
.blue .h2 {
color: #80A4C7;
}
.red {
background: linear-gradient(90deg, #FEFBF0 0%, #FFFDF9 100%);
}
.red .h1 {
color: #CD9058;
}
.red .h2 {
color: #C89C74;
}
.topf50 {
margin-top: -50rpx;
}
.top16 {
margin-top: 16rpx
}
.w40 {
width: 40rpx;
}
.vbetween{
display: flex;
flex-direction: column;
justify-content:space-between;
}
.title01 {
font-size: 36rpx;
font-family: FZZongYi-M05;
font-weight: 400;
color: #121212;
line-height: 42rpx;
}
.home_news_list {
padding: 20rpx 0rpx
}
.home_news_list .item {
padding: 20rpx 0rpx;
border-bottom: solid #EAEAEA 1px;
display: flex;
}
.home_news_list .item image {
width: 220rpx;
height: 140rpx;
margin-right: 18rpx;
border-radius: 12rpx;
}
.home_news_list .item .h1 {
font-size: 32rpx;
color: #333333;
line-height: 40rpx;
}
.home_news_list .item .h2 {
font-size: 24rpx;
color: #AAAAAA;
line-height: 24rpx;
}
.home_news_list .item .h2 .time{
float: right;
}

2
miniprogram/subpages/knight/pages/knight/knight.wxml

@ -48,7 +48,7 @@
<view class="vcenter flex1">
<view class="h1">骑先锋</view>
<view class="h2">
申请加入红色网格员
申请加入网格力量
</view>
</view>
<view class="vcenter w20">

2
miniprogram/subpages/pioneer/pages/pioneer/pioneer.json

@ -1,5 +1,5 @@
{
"navigationBarTitleText": "西海岸先锋",
"navigationBarTitleText": "北尚先锋",
"navigationStyle": "custom",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": true,

6
miniprogram/subpages/pioneer/pages/pioneer/pioneer.wxml

@ -2,7 +2,7 @@
<image src="../../images/back2.png" class="back" style=" top: {{statusHeight}}px;" bindtap="back"></image>
<!-- <image class="header-bg" src="../../images/main/redSail_bg.png" mode="widthFix" /> -->
<view class="navigation" style="height: {{navigationHeight}}px; top: {{statusHeight}}px;">
西海岸先锋
北尚先锋
</view>
</view>
<view class="box">
@ -12,8 +12,8 @@
<image src="../../images/erweima.png" class="erweima" />
</view>
<view class="textcenter">
<view class="h1">扫码关注“西海岸先锋”</view>
<view class="h2">点击上图,长按可进入“西海岸先锋”公众号</view>
<view class="h1">扫码关注“北尚先锋”</view>
<view class="h2">点击上图,长按可进入“北尚先锋”公众号</view>
<button type="primary" class="btn01">返回</button>

2
miniprogram/subpages/redGrider/pages/redGrider/redGrider.json

@ -1,5 +1,5 @@
{
"navigationBarTitleText": "红色网格员",
"navigationBarTitleText": "网格力量",
"navigationStyle": "custom",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": true,

4
miniprogram/subpages/redGrider/pages/redGrider/redGrider.wxml

@ -2,7 +2,7 @@
<image src="../../images/back.png" class="back" style=" top: {{statusHeight}}px;" bindtap="back"></image>
<image class="header-bg" src="../../images/bg.png" mode="widthFix" />
<view class="navigation" style="height: {{navigationHeight}}px; top: {{statusHeight}}px;">
红色网格员
网格力量
</view>
</view>
<view class="mtf80">
@ -48,7 +48,7 @@
<view class="vcenter flex1">
<view class="h1">网格风采</view>
<view class="h2">
申请加入红色网格员
申请加入网格力量
</view>
</view>
<view class="vcenter w20">

2
miniprogram/subpages/redSail/pages/redSail/redSail.json

@ -1,5 +1,5 @@
{
"navigationBarTitleText": "红帆支队",
"navigationBarTitleText": "新锋支部",
"navigationStyle": "custom",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": true,

2
miniprogram/subpages/redSail/pages/redSail/redSail.wxml

@ -10,7 +10,7 @@
<view class="item ">
<image src="../../images/01.png" class="icon"></image>
<view class="vcenter flex1">
<view class="h1">红帆领航</view>
<view class="h1">新锋领航</view>
<view class="h2">
在认真完成《中国共产党章···
</view>

Loading…
Cancel
Save