Browse Source

首页改版

release
zhaoyongnian 5 years ago
parent
commit
5530b4f356
  1. BIN
      images/down.png
  2. BIN
      images/ic_dang2.png
  3. BIN
      images/logout.png
  4. BIN
      images/notice.png
  5. 2
      pages/index/index.json
  6. 92
      pages/index/index.wxml
  7. 81
      pages/index/index.wxss

BIN
images/down.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 B

BIN
images/ic_dang2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
images/logout.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 726 B

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
images/notice.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

2
pages/index/index.json

@ -1,5 +1,7 @@
{ {
"navigationBarTitleText": "微笑榆山", "navigationBarTitleText": "微笑榆山",
"navigationBarBackgroundColor": "#BB0300",
"navigationBarTextStyle": "white",
"usingComponents": { "usingComponents": {
"wux-icon": "../../dist/icon/index", "wux-icon": "../../dist/icon/index",
"wux-grids": "../../dist/grids/index", "wux-grids": "../../dist/grids/index",

92
pages/index/index.wxml

@ -1,12 +1,12 @@
<view class="page"> <view class="page">
<view class="title"> <!-- <view class="title">
<view class="banner"> <view class="banner"> -->
<!-- 背景图 --> <!-- 背景图 -->
<image src="/images/banner.png" class="banner-bg" mode="widthFix" /> <!-- <image src="/images/banner.png" class="banner-bg" mode="widthFix" />
<view class="info"> <view class="info">
<view class="name">{{curGridName}}</view> <view class="name">{{curGridName}}</view> -->
<!-- <image bindtap="toSetUp" class="icon icon-right-1" src="/images/shezhi.png"></image> --> <!-- <image bindtap="toSetUp" class="icon icon-right-1" src="/images/shezhi.png"></image> -->
<image bindtap="logout" class="icon icon-right-1" src="/images/logout.png"></image> <!-- <image bindtap="logout" class="icon icon-right-1" src="/images/logout.png"></image>
<image bindtap="toNotice" wx:if="{{notice == 0}}" class="icon icon-right-2" src="/images/notice.png"></image> <image bindtap="toNotice" wx:if="{{notice == 0}}" class="icon icon-right-2" src="/images/notice.png"></image>
<image bindtap="toNotice" wx:else class="icon icon-right-2" src="/images/notice-xz.png"></image> <image bindtap="toNotice" wx:else class="icon icon-right-2" src="/images/notice-xz.png"></image>
</view> </view>
@ -24,7 +24,7 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view> -->
<!-- 书记在线 --> <!-- 书记在线 -->
<!-- <view class="sudoku clerkOnline" wx:if="{{panel.length !==0}}"> <!-- <view class="sudoku clerkOnline" wx:if="{{panel.length !==0}}">
<view class="content"> <view class="content">
@ -36,38 +36,58 @@
</view> </view>
</view> --> </view> -->
<!-- 九宫格循环 --> <!-- 九宫格循环 -->
<block wx:for="{{panel}}" wx:for-item="itemPanel"> <view class="title-new">
<view class="detailed"> <view class="grid-any">
<view class="detailed-name">{{itemPanel.mainLabel}}</view> <view bindtap="gridChange" class="grid-name">
<view class="sudoku"> <view>{{curGridName}}</view>
<view class="content"> <image src="/images/down.png"></image>
<view wx:for="{{itemPanel.childNav}}" wx:for-index="index" wx:for-item="itemChild" data-state="{{index}}" data-tmp="{{itemPanel.templateInfo.templateCode}}" data-navcode="{{itemChild.navCode}}" bindtap="toTabs" hover-stay-time="150" hover-class="grid-hover" class="item"> </view>
<image src="{{itemChild.icon}}" /> <view class="grid-set">
<view class="name">{{itemChild.label}}</view> <image wx:if="{{notice == 0}}" bindtap="toNotice" class="notice" src="/images/notice.png"></image>
<!-- 书记在线特殊处理 --> <image bindtap="toNotice" wx:else class="notice" src="/images/notice-xz.png"></image>
<button wx:if="{{itemChild.navCode == 10011 && checkUpdateAvatar}}" class="button" open-type="getUserInfo" catchgetuserinfo="getInfo" hover-stop-propagation="{{propagation}}"></button> <image bindtap="logout" class="logout" src="/images/logout.png"></image>
<!-- 工作日志特殊处理 --> </view>
<view wx:if="{{itemChild.navCode == 10021 && workCheckUpdateAvatar}}" class="but" data-navCode="{{itemChild.navCode}}" catchtap="navigateToUd" hover-stop-propagation="{{propagation}}"> </view>
<button data-navCode="{{itemChild.navCode}}" class="button button-wid" open-type="getUserInfo" bindgetuserinfo="getInfoWork"></button> <view class="explain-new">
</view> <image src="/images/ic_dang2.png"></image>
<!-- 周报告 --> <view class="explain-name-new">可按照网格支部查看</view>
<view wx:if="{{itemChild.navCode == 10022 && workCheckUpdateAvatar}}" class="but button-weekly" data-navCode="{{itemChild.navCode}}" catchtap="navigateToUd" hover-stop-propagation="{{propagation}}"> </view>
<button data-navCode="{{itemChild.navCode}}" class="button button-wid button-weekly" open-type="getUserInfo" bindgetuserinfo="getInfoWork"></button> </view>
</view> <view class="list-all">
<!-- 月报告 --> <block wx:for="{{panel}}" wx:for-item="itemPanel">
<view wx:if="{{itemChild.navCode == 10023 && workCheckUpdateAvatar}}" class="but button-monthly" data-navCode="{{itemChild.navCode}}" catchtap="navigateToUd" hover-stop-propagation="{{propagation}}"> <view class="detailed">
<button data-navCode="{{itemChild.navCode}}" class="button button-wid button-monthly" open-type="getUserInfo" bindgetuserinfo="getInfoWork"></button> <view class="detailed-name">{{itemPanel.mainLabel}}</view>
</view> <view class="sudoku">
<view wx:if="{{itemChild.navCode == 10024 && workCheckUpdateAvatar}}" class="but button-left" data-navCode="{{itemChild.navCode}}" catchtap="navigateToUd" hover-stop-propagation="{{propagation}}"> <view class="content">
<button data-navCode="{{itemChild.navCode}}" class="button button-wid button-left" open-type="getUserInfo" bindgetuserinfo="getInfoWork"></button> <view wx:for="{{itemPanel.childNav}}" wx:for-index="index" wx:for-item="itemChild" data-state="{{index}}" data-tmp="{{itemPanel.templateInfo.templateCode}}" data-navcode="{{itemChild.navCode}}" bindtap="toTabs" hover-stay-time="150" hover-class="grid-hover" class="item">
</view> <image src="{{itemChild.icon}}" />
<view wx:if="{{itemChild.num>0}}" class="number {{itemChild.label.length === 2 ? 'number-left-2': itemChild.label.length === 3 ? 'number-left-3': itemChild.label.length === 4 ? 'number-left-4':itemChild.label.length === 5 ? 'number-left-5':itemChild.label.length === 6 ? 'number-left-6' :''}}"> <view class="name">{{itemChild.label}}</view>
<text wx:if="{{itemChild.num > 999}}">999+</text> <!-- 书记在线特殊处理 -->
<text wx:else>{{itemChild.num}}</text> <button wx:if="{{itemChild.navCode == 10011 && checkUpdateAvatar}}" class="button" open-type="getUserInfo" catchgetuserinfo="getInfo" hover-stop-propagation="{{propagation}}"></button>
<!-- 工作日志特殊处理 -->
<view wx:if="{{itemChild.navCode == 10021 && workCheckUpdateAvatar}}" class="but" data-navCode="{{itemChild.navCode}}" catchtap="navigateToUd" hover-stop-propagation="{{propagation}}">
<button data-navCode="{{itemChild.navCode}}" class="button button-wid" open-type="getUserInfo" bindgetuserinfo="getInfoWork"></button>
</view>
<!-- 周报告 -->
<view wx:if="{{itemChild.navCode == 10022 && workCheckUpdateAvatar}}" class="but button-weekly" data-navCode="{{itemChild.navCode}}" catchtap="navigateToUd" hover-stop-propagation="{{propagation}}">
<button data-navCode="{{itemChild.navCode}}" class="button button-wid button-weekly" open-type="getUserInfo" bindgetuserinfo="getInfoWork"></button>
</view>
<!-- 月报告 -->
<view wx:if="{{itemChild.navCode == 10023 && workCheckUpdateAvatar}}" class="but button-monthly" data-navCode="{{itemChild.navCode}}" catchtap="navigateToUd" hover-stop-propagation="{{propagation}}">
<button data-navCode="{{itemChild.navCode}}" class="button button-wid button-monthly" open-type="getUserInfo" bindgetuserinfo="getInfoWork"></button>
</view>
<view wx:if="{{itemChild.navCode == 10024 && workCheckUpdateAvatar}}" class="but button-left" data-navCode="{{itemChild.navCode}}" catchtap="navigateToUd" hover-stop-propagation="{{propagation}}">
<button data-navCode="{{itemChild.navCode}}" class="button button-wid button-left" open-type="getUserInfo" bindgetuserinfo="getInfoWork"></button>
</view>
<view wx:if="{{itemChild.num>0}}" class="number {{itemChild.label.length === 2 ? 'number-left-2': itemChild.label.length === 3 ? 'number-left-3': itemChild.label.length === 4 ? 'number-left-4':itemChild.label.length === 5 ? 'number-left-5':itemChild.label.length === 6 ? 'number-left-6' :''}}">
<text wx:if="{{itemChild.num > 999}}">999+</text>
<text wx:else>{{itemChild.num}}</text>
</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </block>
</block> </view>
</view> </view>

81
pages/index/index.wxss

@ -1,5 +1,5 @@
page { page {
background: #fff; background: #f7f7f7;
} }
.title { .title {
@ -136,9 +136,13 @@ page {
/* 文字样式 */ /* 文字样式 */
.detailed { .detailed {
width: 100%; width: calc(100% - 40rpx);
border-top: 10rpx solid #f6f8f8; /* border-top: 10rpx solid #f6f8f8; */
margin: 20rpx;
border-radius: 16rpx;
padding: 30rpx 0; padding: 30rpx 0;
background: #ffffff;
} }
.detailed .detailed-name { .detailed .detailed-name {
@ -273,3 +277,74 @@ page {
margin-left: 102rpx; margin-left: 102rpx;
margin-top: 5rpx; margin-top: 5rpx;
} }
/* 首页改版 */
.title-new{
width: 100%;
height: 200rpx;
background: #BB0300;
overflow:hidden;
/* padding-top: 38rpx; */
}
.title-new .grid-any{
margin-top: 38rpx;
width: calc(100% - 44rpx);
height: 40rpx;
margin-left: 22rpx;
background: #BB0300;
display: flex;
justify-content: space-between;
align-items: center;
}
.title-new .grid-any .grid-name {
display: flex;
justify-content: space-between;
align-items: center;
}
.title-new .grid-any .grid-name view{
font-size: 34rpx;
font-weight: 500;
color: #FFFFFF;
}
.title-new .grid-any .grid-name image{
width: 24rpx;
height: 16rpx;
margin-left: 13rpx;
}
.title-new .grid-any .grid-set{
display: flex;
justify-content: space-between;
align-items: center;
}
.title-new .grid-any .grid-set .logout{
width: 40rpx;
height: 40rpx;
}
.title-new .grid-any .grid-set .notice{
width: 40rpx;
height: 40rpx;
margin-right: 80rpx;
}
.list-all{
margin-top: -60rpx;
}
.explain-new{
margin-top: 23rpx;
width: calc(100% - 18rpx);
height: 24rpx;
margin-left: 18rpx;
background: #BB0300;
display: flex;
align-items: center;
}
.explain-new image{
width: 24rpx;
height: 24rpx;
}
.explain-new .explain-name-new{
font-size: 24rpx;
font-weight: 500;
color: #FFFFFF;
opacity: 0.5;
}

Loading…
Cancel
Save