Browse Source

优化

master
zhaoyongnian 5 years ago
parent
commit
f25baee820
  1. 23
      pages/heartNew/components/volunteer/volunteer.js
  2. 4
      pages/heartNew/components/volunteer/volunteer.json
  3. 18
      pages/heartNew/components/volunteer/volunteer.wxml
  4. 48
      pages/heartNew/components/volunteer/volunteer.wxss
  5. 34
      pages/heartNew/heartNew.js
  6. 3
      pages/heartNew/heartNew.json
  7. 53
      pages/heartNew/heartNew.wxml
  8. 199
      pages/heartNew/heartNew.wxss
  9. 2
      pages/indexNew/indexNew.js
  10. BIN
      subpages/discussion/images/edit.png
  11. 11
      subpages/discussion/pages/addIssue/addIssue.js
  12. 7
      subpages/discussion/pages/addIssue/addIssue.wxml
  13. 12
      subpages/discussion/pages/addIssue/addIssue.wxss

23
pages/heartNew/components/volunteer/volunteer.js

@ -0,0 +1,23 @@
// pages/indexNew/components/volunteer/volunteer.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})

4
pages/heartNew/components/volunteer/volunteer.json

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

18
pages/heartNew/components/volunteer/volunteer.wxml

@ -0,0 +1,18 @@
<view class="box">
<view class="item">
<image src="https://epdc-shibei.elinkservice.cn/epdcFile/M00/02/B2/rBAAM16W7SqAY1XjAAMWUuGo2D4654.jpg" />
<view class="name">李先生</view>
<view class="autograph">我志愿我骄傲</view>
</view>
<view class="item">
<image src="https://epdc-shibei.elinkservice.cn/epdcFile/M00/02/B2/rBAAM16W7SqAY1XjAAMWUuGo2D4654.jpg" />
<view class="name">李先生</view>
<view class="autograph">我志愿我骄傲</view>
</view>
<view class="item">
<image src="https://epdc-shibei.elinkservice.cn/epdcFile/M00/02/B2/rBAAM16W7SqAY1XjAAMWUuGo2D4654.jpg" />
<view class="name">李先生</view>
<view class="autograph">我志愿我骄傲</view>
</view>
</view>
<view class="show">*按姓氏拼音排序</view>

48
pages/heartNew/components/volunteer/volunteer.wxss

@ -0,0 +1,48 @@
.box {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
padding: 0rpx 40rpx 19rpx 40rpx;
}
.box .item {
width: 320rpx;
height: 282rpx;
margin-top: 20rpx;
background: #fff;
border-radius: 20rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.box .item image {
width: 110rpx;
height: 110rpx;
border-radius: 50%;
margin-top: 40rpx;
}
.box .item .name {
margin-top: 11rpx;
font-size: 30rpx;
font-weight: bold;
color: rgba(51, 51, 51, 1);
}
.box .item .autograph {
margin-top: 18rpx;
font-size:26rpx;
font-weight:500;
color:rgba(193,193,193,1);
}
.show {
padding: 0rpx 40rpx;
height: 24rpx;
font-size: 24rpx;
line-height: 24rpx;
font-weight: 500;
color: #C5C5C5;
}

34
pages/heartNew/heartNew.js

@ -9,6 +9,22 @@ Page({
statusHeight: 0, // 自定义头部状态栏高度
navigationHeight: 0, // 自定义头部导航栏高度
selectedTab: 'tab0',
// banner 相关
banner: [{
actId:'1',
bannerImg:'https://epdc-shibei.elinkservice.cn/epdcFile/M00/02/B2/rBAAM16W7SqAY1XjAAMWUuGo2D4654.jpg',
},
{
actId:'2',
bannerImg:'https://epdc-shibei.elinkservice.cn/epdcFile/M00/02/B2/rBAAM16W7SqAY1XjAAMWUuGo2D4654.jpg',
}],
indicatorDots: false, //指示点
autoplay: true, //true false,//自动播放
circular: true, //衔接滑动
interval: 4000, //自动播放间隔时长(ms)
duration: 500, //幻灯片切换时长(ms)
currentSwiper: 0
// banner 相关end
},
/**
@ -22,10 +38,28 @@ Page({
},
// tab 切换
tabBarChange(e) {
console.log(e.currentTarget.dataset.tab)
if (e.currentTarget.dataset.tab == 'tab3') {
wx.navigateTo({
url: `/subpages/heart/pages/leaderboardNew/leaderboardNew`
})
}
this.setData({
selectedTab: e.currentTarget.dataset.tab
})
},
//返回上一级
goback() {
wx.navigateBack({
delta: 1
})
},
// banner 切换
swiperChange: function(e) {
this.setData({
currentSwiper: e.detail.current
})
},
/**
* 生命周期函数--监听页面初次渲染完成

3
pages/heartNew/heartNew.json

@ -7,7 +7,8 @@
"wux-tab": "/dist/tab/index",
"activity": "../../components/activity/activity",
"load-more": "../../components/loadMore/loadMore",
"no-data": "../../components/nodata/nodata"
"no-data": "../../components/nodata/nodata",
"volunteer-list":"./components/volunteer/volunteer"
},
"enablePullDownRefresh": true,
"backgroundColor": "#f8f8f8",

53
pages/heartNew/heartNew.wxml

@ -1,7 +1,15 @@
<view class="header" style="height: {{statusHeight + navigationHeight}}px;">
<image class="header-bg" src="https://epdc-kongcun.elinkit.com.cn/epdcFile/M00/00/06/rBAB7160-w6AJBH6AAAk6D4lsPc207.png" />
<view class="navigation" style="height: {{navigationHeight}}px; top: {{statusHeight}}px;">
志愿者去哪儿
<view class="goback" bindtap="goback">
<image src="../../images/goback.png" />
</view>
<view class="title">
<view class="title-right">志愿者去哪儿</view>
</view>
<!-- 志愿者去哪儿 -->
</view>
</view>
<view class="home" style="margin-top: {{statusHeight + navigationHeight}}px">
@ -17,7 +25,38 @@
</view>
</view>
</view>
<view class="banner"></view>
<view class="banner-main">
<view class="page-body">
<view class="page-section page-section-spacing swiper">
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" circular="{{circular}}" interval="{{interval}}" duration="{{duration}}" bindchange="swiperChange">
<block wx:if="{{banner.length > 0}}">
<block wx:for="{{banner}}" wx:key="*this">
<swiper-item>
<view bindtap="toActDetail" class="swiper-item" data-id="{{item.actId}}">
<image class="banner" src='{{item.bannerImg}}' mode="aspectFill" />
</view>
</swiper-item>
</block>
</block>
<block wx:else>
<swiper-item>
<view>
<image class="banner" src="https://epdc-shibei.elinkservice.cn/epdcFile/M00/02/B2/rBAAM16W7SqAY1XjAAMWUuGo2D4654.jpg" mode="aspectFill" />
</view>
</swiper-item>
</block>
</swiper>
<!-- 重置小圆点的样式 -->
<view class="dots">
<block wx:for="{{ banner }}" wx:key="index">
<view class="dot {{index == currentSwiper ? ' active' : '' }}"></view>
</block>
</view>
</view>
</view>
</view>
<view class="tab-all">
<view class="tab-bar">
<view class="tab tab0 {{selectedTab === 'tab0' ? 'select' : ''}}" data-tab="tab0" bindtap="tabBarChange">
@ -34,4 +73,12 @@
</view>
<view class="select-bar {{selectedTab}}"></view>
</view>
</view>
</view>
<block wx:if="{{ selectedTab == 'tab0' }}">
<view class="details-top">2222</view>
</block>
<block wx:elif="{{ selectedTab == 'tab1' }}">
<view class="details-top">
<volunteer-list></volunteer-list>
</view>
</block>

199
pages/heartNew/heartNew.wxss

@ -22,18 +22,46 @@ page {
top: 0;
}
.header .navigation {
width: 100%;
/* width: calc(100% - 46rpx);
margin-left: 46rpx; */
display: flex;
align-items: center;
/* justify-content: center; */
position: relative;
z-index: 100;
}
.header .navigation .goback {
width: 16rpx;
margin-left: 30rpx;
display: flex;
align-items: center;
justify-content: center;
}
.header .navigation .goback image {
width: 16rpx;
height: 28rpx;
}
.header .navigation .title {
display: flex;
align-items: center;
justify-content: center;
width: calc(100% - 46rpx);
margin-left: 46rpx;
color: rgba(255, 255, 255, 0.9);
font-size: 32rpx;
position: relative;
z-index: 100;
letter-spacing: 2rpx;
}
.header .navigation .title .title-right {
margin-right: 46rpx;
}
.home {
width: 100%;
}
@ -94,18 +122,173 @@ page {
}
/* banner 样式 */
.banner {
.banner-main {
position: absolute;
width: calc(100% - 60rpx);
height: 300rpx;
margin-left: 30rpx;
background-color: royalblue;
background-color: #fff;
z-index: 999;
margin-top: -36rpx;
box-shadow: 0px 6px 21px 0px rgba(122, 122, 122, 0.23);
border-radius: 14rpx;
}
.page-body {
/* padding-top: 30rpx; */
/* background: #fff; */
}
.page-section {
width: 100%;
margin-bottom: 60rpx;
}
.page-section_center {
display: flex;
flex-direction: column;
align-items: center;
}
.page-section:last-child {
margin-bottom: 0;
}
.page-section-gap {
box-sizing: border-box;
padding: 0 30rpx;
}
.page-section-spacing {
box-sizing: border-box;
/* padding: 0 20rpx; */
height: 300rpx;
}
swiper {
height: 300rpx;
}
.page-section-title {
font-size: 28rpx;
color: #999;
margin-bottom: 10rpx;
padding-left: 30rpx;
padding-right: 30rpx;
}
.page-section-gap .page-section-title {
padding-left: 0;
padding-right: 0;
}
.demo-text-1 {
position: relative;
align-items: center;
justify-content: center;
background-color: #1aad19;
color: #fff;
font-size: 36rpx;
}
.demo-text-1:before {
content: 'A';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.demo-text-2 {
position: relative;
align-items: center;
justify-content: center;
background-color: #2782d7;
color: #fff;
font-size: 36rpx;
}
.demo-text-2:before {
content: 'B';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.demo-text-3 {
position: relative;
align-items: center;
justify-content: center;
background-color: #f1f1f1;
color: #353535;
font-size: 36rpx;
}
.demo-text-3:before {
content: 'C';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
button {
margin-bottom: 30rpx;
}
button:last-child {
margin-bottom: 0;
}
.page-section-title {
padding: 0;
}
.swiper-item {
display: block;
height: 300rpx;
}
.banner {
overflow: hidden;
height: 300rpx;
display: flex;
width: 100%;
border-radius: 16rpx;
}
.dots {
display: flex;
justify-content: center;
margin-top: -23rpx;
z-index: 999;
position: relative;
/* padding-bottom: 10rpx; */
}
.dots .dot {
width: 20rpx;
height: 6rpx;
margin-left: 8rpx;
background: rgba(247, 247, 247, 1);
opacity: 0.38;
border-radius: 3rpx;
transition: all 0.3s;
}
.dots .dot.active {
width: 20rpx;
background: rgba(247, 247, 247, 1);
border-radius: 3rpx;
opacity: 1;
/* background-image: linear-gradient(90deg, #fc5555 58%, #fc5555 100%); */
}
/* banner end */
.tab-all {
position: absolute;
width: 100%;
@ -177,4 +360,10 @@ page {
.tab-bar .hover-tab {
background: #f7f7f7;
}
/* 内容 */
.details-top {
margin-top: 370rpx;
}

2
pages/indexNew/indexNew.js

@ -400,7 +400,7 @@ Page({
// 志愿者去哪
goheart() {
wx.navigateTo({
url: `../heart/heart`
url: `../heartNew/heartNew`
})
},
// 跳转我的

BIN
subpages/discussion/images/edit.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

11
subpages/discussion/pages/addIssue/addIssue.js

@ -13,7 +13,8 @@ Page({
uploadImageList: [],
imageId: 1,
dialogVisible: false,
publishIssuePrevious: 0
publishIssuePrevious: 0,
focus: false
},
onLoad () {
this.data.qqMapWX = new QQMapWX({
@ -250,5 +251,11 @@ Page({
wx.navigateBack({
delta: 1
})
}
},
// Textarea获取焦点
clickTextarea() {
this.setData({
focus: true
})
},
})

7
subpages/discussion/pages/addIssue/addIssue.wxml

@ -23,10 +23,13 @@
</view>
<view class="issue-location">
<textarea maxlength="80" placeholder="请输入地址" placeholder-class="address-placeholder" value="{{addressContent}}" bindinput="bindAddressInput"></textarea>
<textarea focus='{{focus}}' maxlength="80" placeholder="请输入地址" placeholder-class="address-placeholder" value="{{addressContent}}" bindinput="bindAddressInput"></textarea>
<view bindtap="clickTextarea" class="edit">
<image src="../../images/edit.png" />
</view>
<view class="address">
<image src="../../images/ic_yitidingwei@2x.png" />
<view>议题定位</view>
<view>若地址不符,可点击编辑文字</view>
</view>
</view>

12
subpages/discussion/pages/addIssue/addIssue.wxss

@ -86,11 +86,21 @@ page {
align-items: center;
}
.add-issue .issue-location textarea {
width:100%;
width:calc(100% - 70rpx);
height: 88rpx;
color: #333;
font-size: 34rpx;
line-height: 46rpx;
float: left;
}
.add-issue .issue-location .edit{
width:70rpx;
height: 88rpx;
float: left;
}
.add-issue .issue-location .edit image{
width: 38rpx;
height: 36rpx;
}
.add-issue .issue-location .address-placeholder {
font-size: 32rpx;

Loading…
Cancel
Save