diff --git a/pages/index/index.js b/pages/index/index.js
index 3081582..b6404a2 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -253,6 +253,7 @@ Page({
datas[i].typeImg = imgUrl + datas[i].typeImg
}
}
+ console.log(datas)
that.setData({
fiveImages:datas
})
diff --git a/pages/message/clubmessage/clubmessage.js b/pages/message/clubmessage/clubmessage.js
index dbdf7fe..3c6d4d8 100644
--- a/pages/message/clubmessage/clubmessage.js
+++ b/pages/message/clubmessage/clubmessage.js
@@ -1,24 +1,48 @@
// pages/message/clubmessage/clubmessage.js
+var Api = require('../../../utils/common.js');
+var re = require('../../../utils/request.js');
Page({
/**
* 页面的初始数据
*/
data: {
- cluber:[
- {clubname:'众行天下',time:'3小时前',img:'../../../images/ava.png',name:'王华',content:'会员邀请加入',status:'1'},
- {clubname:'众行天下',time:'3小时前',img:'../../../images/ava.png',name:'王华',content:'会员邀请加入',status:'2'},
- {clubname:'众行天下',time:'3小时前',img:'../../../images/ava.png',name:'王华',content:'会员邀请加入',status:'2'},
- {clubname:'众行天下',time:'3小时前',img:'../../../images/ava.png',name:'王华',content:'会员邀请加入',status:'3'},
- {clubname:'众行天下',time:'3小时前',img:'../../../images/ava.png',name:'王华',content:'会员邀请加入',status:'1'}
- ]
+ pageSize: 10,
+ page:1,
+ cluber:[
+ {clubname:'众行天下',time:'3小时前',img:'../../../images/ava.png',name:'王华',content:'会员邀请加入',status:'1'},
+ {clubname:'众行天下',time:'3小时前',img:'../../../images/ava.png',name:'王华',content:'会员邀请加入',status:'2'},
+ {clubname:'众行天下',time:'3小时前',img:'../../../images/ava.png',name:'王华',content:'会员邀请加入',status:'2'},
+ {clubname:'众行天下',time:'3小时前',img:'../../../images/ava.png',name:'王华',content:'会员邀请加入',status:'3'},
+ {clubname:'众行天下',time:'3小时前',img:'../../../images/ava.png',name:'王华',content:'会员邀请加入',status:'1'}
+ ]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
-
+ this.getClubMessageList();
+ },
+
+ getClubMessageList: function(){
+ var that = this;
+ let postData = {
+ pageSize: that.data.pageSize,
+ pageNum: that.data.page
+ };
+ var header = {
+ token: wx.getStorageSync('token'),
+ "Content-Type": "application/x-www-form-urlencoded"
+ };
+ re.request(Api.getClubMessagePage(), postData, header).then((res) => {
+ let datas = res.data.rows;
+ if(datas.length!=0){
+ that.setData({
+ cluber: datas
+ })
+ }
+ })
},
/**
diff --git a/pages/message/clubmessage/clubmessage.wxml b/pages/message/clubmessage/clubmessage.wxml
index 8b5f2cf..d4de6a8 100644
--- a/pages/message/clubmessage/clubmessage.wxml
+++ b/pages/message/clubmessage/clubmessage.wxml
@@ -7,22 +7,22 @@
- {{item.clubname}}{{item.time}}
+ {{item.clubName}}{{item.createdTime}}
-
- {{item.name}}
+
+ {{item.memberName}} {{item.massageContent}}
-
- 会员邀请加入
+
diff --git a/pages/message/message.wxml b/pages/message/message.wxml
index e958944..ffdb4d3 100644
--- a/pages/message/message.wxml
+++ b/pages/message/message.wxml
@@ -1,5 +1,5 @@
-
+
@@ -29,7 +29,7 @@
-
+
diff --git a/pages/message/sysmessage/sysmessage.js b/pages/message/sysmessage/sysmessage.js
index 4853c38..02bcb7f 100644
--- a/pages/message/sysmessage/sysmessage.js
+++ b/pages/message/sysmessage/sysmessage.js
@@ -1,10 +1,14 @@
// pages/message/sysmessage/sysmessage.js
+var Api = require('../../../utils/common.js');
+var re = require('../../../utils/request.js');
Page({
/**
* 页面的初始数据
*/
data: {
+ pageSize: 10,
+ page:1,
sysList:[
{time:'08-31 14:50',title:'俱乐部申请通过',content:'您创建的俱乐部已通过审核,可以使用提现功能,请遵守国家法律法规,文明发布活动。'},
{time:'08-31 14:50',title:'俱乐部申请通过',content:'您创建的俱乐部未通过审核,原因:(后台变量),请修改后重新提交。'},
@@ -17,7 +21,27 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
-
+ this.getSystemMessageList();
+ },
+
+ getSystemMessageList: function(){
+ var that = this;
+ let postData = {
+ pageSize: that.data.pageSize,
+ pageNum: that.data.page
+ };
+ var header = {
+ token: wx.getStorageSync('token'),
+ "Content-Type": "application/x-www-form-urlencoded"
+ };
+ re.request(Api.getSystemMessagePage(), postData, header).then((res) => {
+ let datas = res.data.rows;
+ if(datas.length!=0){
+ that.setData({
+ sysList: datas
+ })
+ }
+ })
},
/**
diff --git a/pages/message/sysmessage/sysmessage.wxml b/pages/message/sysmessage/sysmessage.wxml
index 1dbe3e5..daa29bc 100644
--- a/pages/message/sysmessage/sysmessage.wxml
+++ b/pages/message/sysmessage/sysmessage.wxml
@@ -7,10 +7,10 @@
- {{item.title}}{{item.time}}
+ {{item.createdTime}}
- {{item.content}}
+ {{item.massageTitle}}
diff --git a/pages/release/addactive/addactive.js b/pages/release/addactive/addactive.js
index d1c813e..08c91e4 100644
--- a/pages/release/addactive/addactive.js
+++ b/pages/release/addactive/addactive.js
@@ -1,8 +1,8 @@
var Api = require('../../../utils/common.js');
var re = require('../../../utils/request.js');
var WxParse = require('../../../wxParse/wxParse.js');
-var dateTimePicker = require('../../dateTimePicker.js')
-
+var dateTimePicker = require('../../dateTimePicker.js');
+var util = require('../../../utils/util.js');
Page({
/**
@@ -28,8 +28,8 @@ Page({
year: new Date().getFullYear(),
clubId: '',
endRegisterTime: '2021-06-01',
- startTime: '2021-06-01',
- endTime: '2021-06-01',
+ startTime: util.getNowDate(new Date()),
+ endTime: util.getNowDate(new Date()),
nofree: true,
flag: true,
array:[],
@@ -41,7 +41,7 @@ Page({
addrLon: '',
createdTel:'',
costList:[],
- isFree: '0', //kaishi
+ isFree: '1', //kaishi
imgIndex: 0,
imageLength: 0,
firstCon: '',
@@ -337,17 +337,16 @@ console.log(startT);
})
var startTFour = dateTimePicker.formatPickerDateTime(this.data.dateTimeArrayFour, this.data.dateTimeFour)
-console.log(startTFour);
this.setData({
startTFour: startTFour
})
},
onLoad: function (options) {
- this.getClubHave();
+ var nowDate = util.formatTimeTwo(new Date());
// 时间ONE
- var start = '2019-04-26 15:26'
+ var start = nowDate;
var obj = dateTimePicker.dateTimePicker(2000,this.data.year,start);
this.setData({
dateTime: obj.dateTime,
@@ -360,7 +359,7 @@ console.log(startTFour);
})
// 时间Two
- var startTwo = '2019-04-26 15:26'
+ var startTwo = nowDate;
var objTwo = dateTimePicker.dateTimePicker(2000,this.data.year,startTwo);
this.setData({
dateTimeTwo: objTwo.dateTime,
@@ -373,7 +372,7 @@ console.log(startTFour);
})
// 时间three
- var startThree= '2019-04-26 15:26'
+ var startThree= nowDate;
var objThree = dateTimePicker.dateTimePicker(2000,this.data.year,startThree);
this.setData({
dateTimeThree: objThree.dateTime,
@@ -386,7 +385,7 @@ console.log(startTFour);
// 时间Four
- var startFour= '2019-04-26 15:26'
+ var startFour= nowDate;
var objFour = dateTimePicker.dateTimePicker(2000,this.data.year,startFour);
this.setData({
dateTimeFour: objFour.dateTime,
@@ -396,7 +395,7 @@ console.log(startTFour);
this.setData({
startTFour: startTFour
})
-
+ this.getClubHave();
},
@@ -408,9 +407,11 @@ console.log(startTFour);
};
re.request(Api.getClubHave(), '', header).then((res) => {
let datas = res.data.data;
- console.log(datas);
+ if(datas.length > 0){
+ that.data.clubId = datas[0].clubId;
+ }
that.setData({
- array:datas,
+ array: datas,
})
})
},
@@ -603,8 +604,6 @@ uploadfront: function (e) {
// , isHaveInsurance
}
costLists.push(costListItem);
- console.log(costLists);
- console.log(that.data.clubId)
var postData = {
activityAddr: that.data.address,
activityContent: JSON.stringify(content),
@@ -649,7 +648,7 @@ uploadfront: function (e) {
wx.showToast({
title: '请先阅读并同意此协议',
icon: 'none',
- duration: 1000
+ duration: 1500
})
}else{
re.request(Api.createActive(), postData, header).then((res) => {
@@ -657,11 +656,13 @@ uploadfront: function (e) {
wx.showToast({
title: '提交成功,等待审核',
icon: 'none',
- duration: 1000
- })
- wx.navigateBack({
- delta: 1
+ duration: 1500
})
+ setTimeout(function(){
+ wx.navigateBack({
+ delta: 1
+ })
+ },1500)
})
}
},
diff --git a/pages/release/addactive/addactive.wxml b/pages/release/addactive/addactive.wxml
index 77cf282..4b9e5ee 100644
--- a/pages/release/addactive/addactive.wxml
+++ b/pages/release/addactive/addactive.wxml
@@ -117,16 +117,16 @@
-
+
报名费用
-
+
-
+
费用名称
@@ -208,11 +208,11 @@
-
+
保险
-
+
买保险方式
diff --git a/pages/release/release.js b/pages/release/release.js
index e84f849..498a1ee 100644
--- a/pages/release/release.js
+++ b/pages/release/release.js
@@ -33,9 +33,26 @@ Page({
})
},
manageac:function(){
- wx.navigateTo({
- url: './manageac/manageac'
- })
+ var header = {
+ token:wx.getStorageSync('token'),
+ "Content-Type": "application/x-www-form-urlencoded"
+ };
+ var postData={
+ };
+ re.request(Api.checkUserClubActivity(), postData, header).then((res) => {
+ let msg = res.data.msg;
+ if(msg != 'OK'){
+ wx.showToast({
+ title: msg,
+ icon: 'none',
+ duration: 3000
+ })
+ }else{
+ wx.navigateTo({
+ url: './manageac/manageac'
+ })
+ }
+ })
},
sendMassege:function(){
wx.navigateTo({
diff --git a/utils/common.js b/utils/common.js
index 7fb200b..1dcb869 100644
--- a/utils/common.js
+++ b/utils/common.js
@@ -100,7 +100,8 @@ var HOST_URI = 'http://127.0.0.1:8088';
let API_memberList='/open/club/member/setList'//成员列表
let API_Setmember='/open/club/member/edit'//成员列表
-
+ let API_getClubMessagePage= '/open/massage/club/pages' //俱乐部消息
+let API_getSystemMessagePage= '/open/massage/system/pages' //系统消息
function SetMember(){
return HOST_URI + API_Setmember;
}
@@ -152,6 +153,9 @@ function checkUserClubRole(){
function getphone() {//获取手机
return HOST_URI + API_getphone;
}
+ function getSystemMessagePage() {//获取手机
+ return HOST_URI + API_getSystemMessagePage;
+ }
function getUserInfo() {//获取信息
return HOST_URI + API_getUserInfo;
}
@@ -214,6 +218,9 @@ function checkUserClubRole(){
}
function checkUserClubActivity() {
return HOST_URI + API_checkUserClubActivity;
+}
+function getClubMessagePage(){
+ return HOST_URI + API_getClubMessagePage;
}
function getLike() {
return HOST_URI + API_getLike;
@@ -447,5 +454,7 @@ function checkUserClubRole(){
selectgrade,
getRegisterAll,
checkUserClubRole,
- checkUserClubActivity
+ checkUserClubActivity,
+ getClubMessagePage,
+ getSystemMessagePage
};
diff --git a/utils/util.js b/utils/util.js
index 764bc2c..a8bb622 100644
--- a/utils/util.js
+++ b/utils/util.js
@@ -6,7 +6,24 @@ const formatTime = date => {
const minute = date.getMinutes()
const second = date.getSeconds()
- return `${[year, month, day].map(formatNumber).join('/')} ${[hour, minute, second].map(formatNumber).join(':')}`
+ return `${[year, month, day].map(formatNumber).join('-')} ${[hour, minute, second].map(formatNumber).join(':')}`
+}
+
+const formatTimeTwo = date => {
+ const year = date.getFullYear()
+ const month = date.getMonth() + 1
+ const day = date.getDate()
+ const hour = date.getHours()
+ const minute = date.getMinutes()
+
+ return `${[year, month, day].map(formatNumber).join('-')} ${[hour, minute].map(formatNumber).join(':')}`
+}
+
+const getNowDate = date => {
+ const year = date.getFullYear()
+ const month = date.getMonth() + 1
+ const day = date.getDate()
+ return [year, month,day].map(formatNumber).join('-')
}
const formatNumber = n => {
@@ -15,5 +32,7 @@ const formatNumber = n => {
}
module.exports = {
- formatTime
+ formatTime:formatTime,
+ getNowDate:getNowDate,
+ formatTimeTwo:formatTimeTwo
}