作者 niufei

修改

... ... @@ -94,7 +94,7 @@ App({
url: '/pages/start/start'
})
} else if (res.cancel) {
// console.log('用户点击取消')
}
}
})
... ... @@ -134,7 +134,6 @@ App({
dateObj.week = show_day[day];
dateObj.dataday = date.getFullYear() + '-' + ((date.getMonth() + 1) < 10 ? ("0" + (date.getMonth() + 1)) : date.getMonth() + 1) + '-' + (date.getDate() < 10 ? ("0" + date.getDate()) : date.getDate());
dateObj.houser = date.getHours();//当前时间点
console.log(date.getHours())
dateObj.housers = (date.getHours() < 10 ? ("0" + date.getHours()) : date.getHours()) + ':00:00';//当前时间点
dateObj.datadayhouser = date.getFullYear() + '/' + ((date.getMonth() + 1) < 10 ? ("0" + (date.getMonth() + 1)) : date.getMonth() + 1) + '/' + (date.getDate() < 10 ? ("0" + date.getDate()) : date.getDate()) + ' ' + (date.getHours() < 10 ? ("0" + date.getHours()) : date.getHours()) + ':00';//当前时间并时间点
return dateObj;
... ...
... ... @@ -26,13 +26,14 @@ Page({
})
if (e.detail.value == 0) {
that.setData({
type: 0
ztype: 0
})
} else {
that.setData({
type: 1
ztype: 1
})
}
},
selecte_startTime(e) {
this.setData({
... ... @@ -219,7 +220,6 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
console.log(options)
let that = this;
if (options.type == 1){
wx.setNavigationBarTitle({
... ...
... ... @@ -5,7 +5,6 @@
<view class='text_title'>{{datalist.activity_name}}</view>
<view class='text_time' wx:if='{{status=="1"}}'>{{datalist.time}}</view>
<view class='text_content'>
<!-- <rich-text nodes="{{datalist.content}}" bindtap="tap"></rich-text> -->
<import src="../../wxParse/wxParse.wxml" />
<template is='wxParse' data='{{wxParseData:content.nodes}}' />
</view>
... ... @@ -19,29 +18,31 @@
</view>
<view wx:if="{{type!= 1}}">
<view class='foot' bindtap='enroll' wx:if='{{datalist.button_status == 1}}'>报名</view>
<view class='foot' wx:if='{{datalist.button_status == 2}}'>待审核</view>
<view class='foot' wx:if='{{datalist.button_status == 2}}' style='background: #FFD700; color: #fff;'>待审核</view>
<view class='foot' bindtap='sign' wx:if='{{datalist.button_status == 3}}'>签到</view>
<view class='foot' wx:if='{{datalist.button_status == 4}}'>已签到</view>
<view class='foot' wx:if='{{datalist.button_status == 5}}'>已结束</view>
<view class='foot' wx:if='{{datalist.button_status == 4}}' style='background: #ccc;color: #fff;'>已签到</view>
<view class='foot' wx:if='{{datalist.button_status == 5}}' style='background: #ccc;color: #fff;'>已结束</view>
<navigator url='/pages/result/result' class='foot' wx:if='{{datalist.button_status == 6}}'>成为志愿者</navigator>
<view class='cover' style='width:100%;height:{{height}};' wx:if='{{cover_type}}'>
<view class='toast_box'>
<view class='cover_box' catchtap=''>
<view class='cover_box' >
<view class='title'>报名方式</view>
<image src='/imgs/del.png' class='close' bindtap='change_cover'></image>
<picker range='{{enroll_arr}}' bindchange='selectenroll'>
<picker range='{{enroll_arr}}' bindchange='selectenroll' value='{{enroll}}'>
<view class="enroll ">
{{enroll}}
</view>
</picker>
<picker mode='date' bindchange='selecte_startTime' wx:if='{{type}}'>
<picker mode='date' bindchange='selecte_startTime' wx:if='{{ztype}}'>
<view class='time'>
{{starTime}}
</view>
</picker>
<picker mode='date' bindchange='selecte_endTime' wx:if='{{type}}'>
<picker mode='date' bindchange='selecte_endTime' wx:if='{{ztype}}'>
<view class='time'>
{{endTime}}
</view>
... ...
... ... @@ -19,7 +19,6 @@ Page({
category: '选择分类',
},
selecteCtiy(e){
console.log(e)
this.setData({
city: this.data.city_arr[e.detail.value],
city_id: this.data.city_arrid[e.detail.value]
... ... @@ -27,7 +26,6 @@ Page({
this.city_active()
},
selecteClass(e) {
console.log(e)
this.setData({
category: this.data.class_arr[e.detail.value],
type: this.data.class_arrid[e.detail.value]
... ... @@ -38,7 +36,6 @@ Page({
* 切换
*/
clicktab(e) {
console.log(e)
let that = this
let id = e.currentTarget.dataset.id
if (id == '2') {
... ...
.index_newbox {
}
.new_box {
... ... @@ -50,8 +49,8 @@
font-size: 28rpx;
}
.wz_box{
overflow: hidden;
.wz_box {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
... ... @@ -64,18 +63,22 @@
align-items: center;
justify-content: space-between;
}
.title_box image{
.title_box image {
width: 30rpx;
height: 30rpx;
margin-right: 10rpx;
}
.title_box .word{
.title_box .word {
max-width: 200rpx;
color: #666;
font-size: 24rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tabbar {
width: 100%;
height: 100rpx;
... ... @@ -98,6 +101,9 @@
text-align: center;
font-family: PingFang-SC-Medium;
margin: 0 auto;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.titleActive {
... ... @@ -105,7 +111,7 @@
border-bottom: 3rpx solid RGBA(152, 97, 225, 1);
}
.empty{
.empty {
width: 100%;
font-size: 32rpx;
font-family: PingFang-SC-Medium;
... ... @@ -113,4 +119,4 @@
color: #97a0a8;
text-align: center;
margin-top: 50rpx;
}
\ No newline at end of file
}
... ...
... ... @@ -24,7 +24,6 @@ Page({
activity_pageNum: 4
}
app.post(url, params, head).then((res) => {
console.log(res)
if (res.news.length > 0) {
that.setData({
page_type: true
... ... @@ -67,7 +66,6 @@ Page({
openid: res.openid
}
app.post(url, params).then((res) => {
console.log(res);
if (res.data) {
wx.setStorageSync('token', res.data);
that.setData({
... ... @@ -85,7 +83,7 @@ Page({
})
}).catch((errMsg) => {
console.log(errMsg);
})
}
}
... ... @@ -97,12 +95,6 @@ Page({
onLoad: function(options) {
let that = this;
that.get_token();
// let windowHeight = wx.getSystemInfoSync().windowHeight; // 屏幕的高度
// let windowWidth = wx.getSystemInfoSync().windowWidth // 屏幕的宽度
// this.setData({
// scroll_height: windowHeight * 750 / windowWidth
// })
},
/**
... ... @@ -154,11 +146,9 @@ Page({
})
return false
}
console.log(that.data.activity_page)
that.setData({
activity_page: that.data.activity_page + 1
})
console.log(that.data.activity_page)
that.getdatalist()
},
... ...
... ... @@ -20,12 +20,11 @@ Page({
datalist: res
})
}).catch((err) => {
console.log(err)
})
},
goamdin() {
let that = this;
wx.navigateTo({
url: '/pages/admin/admin'
})
... ...
... ... @@ -15,36 +15,11 @@ Page({
}
let params = {}
app.post(url, params, head).then((res) => {
console.log(res)
that.setData({
activity: res
})
// let activity = res.activity;
// let tem = [];
// let temactivity = [];
// for (let i = 0; i < activity.length; i++) {
// tem.push(activity[i])
// if ((i + 1) != activity.length) {
// if ((i + 1) % 2 == 0) {
// temactivity.push(tem);
// tem = [];
// }
// } else {
// temactivity.push(tem);
// tem = [];
// }
// }
// let dataactivity = that.data.activity;
// let temdataactivity = dataactivity.concat(temactivity);
// that.setData({
// datalist: res,
// activity: temdataactivity,
// activity_page: res.activity_page
// })
}).catch((err) => {
console.log(err)
})
},
... ...
... ... @@ -15,12 +15,11 @@ Page({
'XX-Token':wx.getStorageSync('token')
}
app.post(url, {}, head).then((res)=>{
console.log(res)
that.setData({
datalist:res
})
}).catch((err)=>{
console.log(err)
})
},
... ...
... ... @@ -25,7 +25,7 @@ Page({
app.post(url, param).then((res) => {
that.login(res.openid, res.session_key, e.detail.encryptedData, e.detail.iv);
}).catch((errMsg) => {
console.log(errMsg);
})
}
}
... ... @@ -46,7 +46,7 @@ Page({
url: '/pages/index/index',
})
}).catch((errMsg) => {
console.log(errMsg);
})
},
... ...