Commit ce274c1d by biao

1111111

parent 2601cccb
......@@ -3,6 +3,22 @@ App({
url: 'https://www.koala-online.cn/compass/if/',
onLaunch: function () {
var that = this;
//获取窗口的高度,自定义顶部导航栏
let menuButtonObject = wx.getMenuButtonBoundingClientRect();
wx.getSystemInfo({
success: res => {
let statusBarHeight = res.statusBarHeight,
navTop = menuButtonObject.top,//胶囊按钮与顶部的距离
navHeight = statusBarHeight + menuButtonObject.height + (menuButtonObject.top - statusBarHeight) * 2;//导航高度
this.globalData.navHeight = navHeight;
this.globalData.navTop = navTop;
},
fail(err) {
console.log(err);
}
})
//调用wx用户登陆
wx.login({
success: res => {
......@@ -85,6 +101,8 @@ App({
},
globalData: {
userInfo: null,
config:null
config:null,
navTop:0,
navHeight:0
},
})
\ No newline at end of file
......@@ -56,7 +56,7 @@
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "",
"navigationStyle":"custom",
"navigationStyle": "custom",
"navigationBarTextStyle": "black"
},
"usingComponents": {
......@@ -76,7 +76,7 @@
"van-dialog": "/dist/dialog/index",
"van-notify": "/dist/notify/index",
"van-toast": "/dist/toast/index",
"topNavi": "/components/top-navi/top-navi"
"custom-navi": "/components/top-navi/index"
},
"permission": {
"scope.userLocation": {
......
......@@ -5,7 +5,7 @@ Component({
properties: {
text: {
type: String,
value: 'Wechat'
value: ''
},
back: {
type: Boolean,
......@@ -14,19 +14,23 @@ Component({
home: {
type: Boolean,
value: false
},
background: {
type: String,
value: "#fff"
}
},
data: {
statusBarHeight: app.globalData.statusBarHeight + 'px',
navigationBarHeight: (app.globalData.statusBarHeight + 44) + 'px'
navHeight: app.globalData.navHeight + 'px',
navTop: app.globalData.navTop + 'px',
},
methods: {
backHome: function () {
let pages = getCurrentPages()
wx.navigateBack({
delta: pages.length
})
home: function () {
//跳转到首页
wx.switchTab({
url: '../index/index',
});
},
back: function () {
wx.navigateBack({
......
<view class="navbar" style="height:{{navHeight}};background:{{background}}">
<view class='title-container' style="top:{{navTop}}">
<view class='capsule' wx:if="{{back||home}}">
<view bindtap='back' wx:if="{{back}}">
<image src='../../img/n1.png'></image>
</view>
<view bindtap='home' wx:if="{{home}}">
<image src='../../img/n2.png'></image>
</view>
</view>
<view class='title'>{{text}}</view>
</view>
</view>
<view style="{{'height: ' + navHeight}};background: white;"></view>
\ No newline at end of file
.navbar {
width: 100%;
background-color: #1797eb;
position: fixed;
top: 0;
left: 0;
z-index: 999;
}
.title-container {
height: 40px;
position: fixed;
display: flex;
align-items: center;
position: relative;
}
.capsule {
margin-left: 10px;
height: 30px;
background: rgba(255, 255, 255, 0.6);
border: 1px solid #fff;
border-radius: 16px;
border: 1px solid #ccc;
border-radius: 15px;
display: flex;
align-items: center;
}
......@@ -25,8 +23,10 @@
width: 45px;
height: 60%;
position: relative;
}
.capsule > view:nth-child(2) {
border-left: 1px solid #fff;
border-left: 1px solid #ccc;
}
.capsule image {
width: 50%;
......@@ -37,11 +37,8 @@
transform: translate(-50%,-50%);
}
.title {
color: white;
position: absolute;
top: 6px;
left: 104px;
right: 104px;
color: #000;
padding-left: 10px;
height: 30px;
line-height: 30px;
font-size: 14px;
......
<view class="navbar" style="{{'height: ' + navigationBarHeight}}">
<view style="{{'height: ' + statusBarHeight}}"></view>
<view class='title-container'>
<view class='capsule' wx:if="{{ back || home }}">
<view bindtap='back' wx:if="{{back}}">
<image src='/images/back.png'></image>
</view>
<view bindtap='backHome' wx:if="{{home}}">
<image src='/images/home.png'></image>
</view>
</view>
<view class='title'>{{text}}</view>
</view>
</view>
<view style="{{'height: ' + navigationBarHeight}};background: white;"></view>
\ No newline at end of file
<!--pages/activeDetails/activeDetails.wxml-->
<custom-navi text="活动详情" back="{{true}}" home="{{false}}"></custom-navi>
<view class='activeDetails'>
<image src='../../img/1.jpg'></image>
<view class='con_activeDetails'>
......
<!--pages/activeManagement/activeManagement.wxml-->
<custom-navi text="活动管理" back="{{true}}" home="{{false}}"></custom-navi>
<view class='volunteers'>
<view class='volunteersActive'>
<view style='font-size:14px;padding-left:15px'>
......
<!--pages/ageChange/ageChange.wxml-->
<custom-navi text="年龄选择" back="{{true}}" home="{{false}}"></custom-navi>
<view class='ageChange'>
<image src='../../img/2.jpg'></image>
<text>请选择您的孩子的年龄段</text>
......
<!--pages/area/area.wxml-->
<custom-navi text="区域管理" back="{{true}}" home="{{true}}"></custom-navi>
<view class='areaBox'>
<text class='topArea'>
管辖学校:<text>{{schoolCount}}</text>所 总能力分:<text>{{abilityPoint}}</text>分
......
<!--pages/checkJoinCircle/checkJoinCircle.wxml-->
<custom-navi text="入圈审核" back="{{true}}" home="{{true}}"></custom-navi>
<view class='checkJoinCircle'>
<view class='con_checkJoinCircle'>
<view class='btn'>
......
<!--pages/log/log.wxml-->
<custom-navi text="圈子" back="{{false}}" home="{{false}}"></custom-navi>
<view class='quanzi'>
<view style='padding:15px 0;background:#fff'>
<view class='topQuanzi'>
......
<!--pages/testCircle/testCircle.wxml-->
<custom-navi text="圈子详情" back="{{true}}" home="{{true}}"></custom-navi>
<view class='testCircle'>
<view class='top_testCircle'>
<image src='{{circleDat.front_image}}'></image>
......
<!--pages/circleEvents/circleEvents.wxml-->
<custom-navi text="圈子活动管理" back="{{true}}" home="{{true}}"></custom-navi>
<view class='activeManagement'>
<view class='publishButton'bindtap="newCircleEvent" wx:if="{{isOwner}}">
活动发布
......
<!--pages/peopleManagement/peopleManagement.wxml-->
<custom-navi text="圈子成员" back="{{true}}" home="{{true}}"></custom-navi>
<view class='peopleManagement'>
<view class='top_peopleManagement'>
<view class='topQuanzi'>
......
<!--pages/circleMoment/circleMoment.wxml-->
<custom-navi text="圈子动态" back="{{true}}" home="{{true}}"></custom-navi>
<view class='circleMoment'>
<view style='position: fixed;bottom: 0;left: 0;font-size:14px;color:#fff;background: #0D76ED;width: 100%;height: 40px;line-height: 40px;text-align: center;'bindtap="momentNew" wx:if="{{isOwner}}">
发布动态
......
<!--pages/circleNotice/circleNotice.wxml-->
<custom-navi text="圈子公告" back="{{true}}" home="{{true}}"></custom-navi>
<view class='circleNotice'>
<view style='position: fixed;bottom: 0;left: 0;font-size:14px;color:#fff;background: #0D76ED;width: 100%;height: 40px;line-height: 40px;text-align: center;'bindtap="noticeNew" wx:if="{{isOwner}}">
发布公告
......
<!--pages/joinSocialEvent/joinSocialEvent.wxml-->
<custom-navi text="圈子公告" back="{{true}}" home="{{true}}"></custom-navi>
<view class='uploadDocuments'>
<view style='width:100%;background:#fff'>
<view class='textTitle'>
......
<!--pages/classDetails/classDetails.wxml-->
<custom-navi text="课程详情" back="{{true}}" home="{{true}}"></custom-navi>
<view class='classDetails'>
<view class='top_classDetails'>
<text>{{courseTitle}}</text>
......
<!--pages/gongyiClass/gongyiClass.wxml-->
<custom-navi text="公益课程" back="{{true}}" home="{{true}}"></custom-navi>
<view class='gongyiClass'>
<view class='top_gongyiClass'>
<view style='border-bottom:1px solid #f0f0f0;height:46px'>
......
<!--pages/donationDetail/donationDetail.wxml-->
<custom-navi text="慈善募捐" back="{{true}}" home="{{false}}"></custom-navi>
<view class='donationDetail'>
<view class='donationInfo'>
<view class='frontImg'>
......
{
"usingComponents": {},
"navigationBarTitleText": "慈善募捐"
"usingComponents": {}
}
\ No newline at end of file
<!--pages/volunteers/volunteers.wxml-->
<custom-navi text="慈善募捐" back="{{true}}" home="{{true}}"></custom-navi>
<view class='volunteers'>
<view class='volunteersActive'>
<view style='font-size:15px;padding-left:15px'>
......
<!--pages/newQuanzi/newQuanzi.wxml-->
<custom-navi text="圈子编辑" back="{{true}}" home="{{true}}"></custom-navi>
<view class='newQuanzi'>
<view class='top_newQuanzi'>
服务区域:{{servicePlace}}
......
<!--pages/circleDetails/circleDetails.wxml-->
<custom-navi text="圈子编辑" back="{{true}}" home="{{true}}"></custom-navi>
<view class='circleDetails'>
<view class='top_circleDetails'>
<text>圈子头图</text>
......
<!--pages/familyEvent/familyEvent.wxml-->
<custom-navi text="亲子活动" back="{{true}}" home="{{true}}"></custom-navi>
<view class='familyEvent'>
<view class='listPractice'>
<scroll-view scroll-y="true" style='height:1100rpx;bottom:10rpx;' class="listPublicWelfare" bindscrolltolower='loadMore'>
......
<custom-navi text="亲子活动详情" back="{{true}}" home="{{true}}"></custom-navi>
<view class='activeDetails'>
<view class='top_familyEventDetail'>
<view>{{eventDat.title}}</view>
......
<!--pages/myCertificate/myCertificate.wxml-->
<custom-navi text="证书申领" back="{{true}}" home="{{true}}"></custom-navi>
<view class='myCertificate'>
<view style='font-size:12px;color:#666;float:right;padding-right:15px;'>
......
<!--pages/lishi/lishi.wxml-->
<custom-navi text="观看记录" back="{{true}}" home="{{true}}"></custom-navi>
<view>
<view class='listPublicWelfare'>
<view bindtap='classDetails' data-src='{{item.media}}' wx:for="{{list}}">
......
<!--pages/index/index.wxml-->
<custom-navi text="" back="{{false}}" home="{{false}}" background="#5296f4"></custom-navi>
<view class='indexBox'>
<view class="indexHeader">
<view class='con_indexHeader'>
......
<!--pages/inviteCircleMember/inviteCircleMember.wxml-->
<custom-navi text="成员邀请" back="{{true}}" home="{{true}}"></custom-navi>
<view class='inviteMember'>
<view class='title'>
<text style="color:#0D76ED">{{inviteUserName}}</text><text>邀请您加入圈子【{{circleDat.title}}】</text>
......
<!--pages/joinSocialEvent/joinSocialEvent.wxml-->
<custom-navi text="亲子活动" back="{{true}}" home="{{true}}"></custom-navi>
<view class='uploadDocuments'>
<view style='width:100%;background:#fff'>
<view class='uploadDocuments_title'>活动名称:<text>{{eventTitle}}</text></view>
......
<!--pages/joinSocialEvent/joinSocialEvent.wxml-->
<custom-navi text="社会实践" back="{{true}}" home="{{true}}"></custom-navi>
<view class='uploadDocuments'>
<view style='width:100%;background:#fff'>
<view class='uploadDocuments_title'>活动名称:<text>{{eventTitle}}</text></view>
......
<!--pages/leaderRegistered/leaderRegistered.wxml-->
<custom-navi text="注册" back="{{false}}" home="{{false}}"></custom-navi>
<view class='leaderRegistered'>
<image src='../../img/2.jpg'></image>
<view class='title_leaderRegistered'><text>{{leaderTitle}}领导:</text>欢迎来到志愿者平台!</view>
......
<!--pages/memberChange/memberChange.wxml-->
<custom-navi text="会员" back="{{true}}" home="{{true}}"></custom-navi>
<view class='memberChange'>
<view class='con_memberChange'>
<view class='top_memberChange'>
......
<!--pages/mine/mine.wxml-->
<custom-navi text="我的" back="{{false}}" home="{{false}}"></custom-navi>
<view class='mine'>
<view class='headerMine'>
<view class='topMine'>
......
<!--pages/myCertificate/myCertificate.wxml-->
<custom-navi text="证书管理" back="{{true}}" home="{{true}}"></custom-navi>
<view class='myCertificate'>
<view style='position: fixed;bottom: 0;left: 0;font-size:14px;color:#fff;background: #0D76ED;width: 100%;height: 40px;line-height: 40px;text-align: center;'bindtap="getCertificate">
申领证书
......
<!--pages/myNews/myNews.wxml-->
<custom-navi text="消息通知" back="{{true}}" home="{{true}}"></custom-navi>
<view class="myNews">
<view bindtap='newsDetail' wx:for="{{messageList}}" wx:if="{{!item.is_read}}" class="newsUnread" data-index="{{item.id}}" wx:key="{{index}}">
<image src='../../img/unread.png'></image>{{item.title}}
......
<!--pages/myNewsDetail/myNewsDetail.wxml-->
<custom-navi text="消息" back="{{true}}" home="{{true}}"></custom-navi>
<view class='myNewsDetail'>
<view class='firstpage' wx:if="{{attach_dat_type=='ORGNAZATION'}}">
<view class='title_firstpage'>{{messageDat.title}}</view>
......
<!--pages/newQuanzi/newQuanzi.wxml-->
<custom-navi text="新建圈子" back="{{true}}" home="{{true}}"></custom-navi>
<view class='newQuanzi'>
<view class='top_newQuanzi'>
服务区域:{{servicePlace}}
......
<!--pages/newCircleEvent/newCircleEvent.wxml-->
<custom-navi text="活动发布" back="{{true}}" home="{{true}}"></custom-navi>
<view class='newCircleEvent'>
<view class='con_newCircleEvent'>
<view>
......
<!--pages/newCircleMoment/newCircleMoment.wxml-->
<custom-navi text="圈子动态" back="{{true}}" home="{{true}}"></custom-navi>
<view class='circleDetails'>
<view class='bot_circleDetails'>
<view class='circleTitle'><text></text>添加动态</view>
......
<!--pages/familyUser/familyUser.wxml-->
<custom-navi text="用户注册" back="{{false}}" home="{{false}}"></custom-navi>
<view class='familyUser'>
<image src='../../img/2.jpg'></image>
<text>欢迎来到志愿者平台!</text>
......
<!--pages/schoolDetails/schoolDetails.wxml-->
<custom-navi text="学校详情" back="{{true}}" home="{{true}}"></custom-navi>
<view class='schoolDetailsBox'>
<view class='top_schoolDetailsBox'>
<text>{{schoolTitle}}:{{memberCount}}志愿者</text><text>总积分:{{abilityPoint}}分</text>
......
// pages/userDonation/userDonation.js
var app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var that = this;
var config = wx.getStorageSync('config');
wx: wx.request({
url: app.url + 'ajax_set_user_donation_dat.php',
data: {
unionId: config.unionId,
eventId: 0,
money:options.money,
comment:options.comment
},
header: { 'content-type': 'application/json' },
method: 'GET',
dataType: 'json',
success: function (res) {
console.log(res)
if (res.statusCode == 200) {
that.setData({
list: res.data.result.list
})
}
},
fail: function (res) { },
complete: function (res) { },
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--pages/userDonation/userDonation.wxml-->
<view class='userDonation'>
</view>
/* pages/userDonation/userDonation.wxss */
\ No newline at end of file
<!--pages/volunteers/volunteers.wxml-->
<custom-navi text="志愿者活动" back="{{true}}" home="{{true}}"></custom-navi>
<view class='volunteers'>
<text class='volunteersTitle'>所在区域:<text>{{place}}</text></text>
<view class='volunteersActive'>
......
<!--pages/activeDetails/activeDetails.wxml-->
<custom-navi text="志愿者活动" back="{{true}}" home="{{true}}"></custom-navi>
<view class='activeDetails'>
<image src='{{volunteerEventDat.front_image}}'></image>
<view class='con_activeDetails'>
......
<!--pages/volunteerRanking/volunteerRanking.wxml-->
<custom-navi text="志愿者排名" back="{{true}}" home="{{true}}"></custom-navi>
<view class='volunteerRanking'>
<view style="height:45px;">
<view class="title" style="text-align:left;margin-left: 30px;"><text style="color:#82A4D4;">级别:</text><text>省份</text></view>
......
<!--pages/volunteerRanking/volunteerRanking.wxml-->
<custom-navi text="志愿者排名" back="{{true}}" home="{{true}}"></custom-navi>
<view class='volunteerRanking'>
<view style="height:45px;">
<view class="title" style="text-align:left;margin-left: 30px;"><text style="color:#82A4D4;">级别:</text><text>城市</text></view>
......
<!--pages/volunteerRanking/volunteerRanking.wxml-->
<custom-navi text="志愿者排名" back="{{true}}" home="{{true}}"></custom-navi>
<view class='volunteerRanking'>
<view style="height:45px;">
<view class="title" style="text-align:left;margin-left: 30px;"><text style="color:#82A4D4;">级别:</text><text>区</text></view>
......
<!--pages/volunteerRanking/volunteerRanking.wxml-->
<custom-navi text="志愿者排名" back="{{true}}" home="{{true}}"></custom-navi>
<view class='volunteerRanking'>
<view style="height:45px;">
<view class="title" style="text-align:left;margin-left: 30px;"><text style="color:#82A4D4;">级别:</text><text>学校</text></view>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment