Commit 2601cccb by biao

1111111

parent a93a2acd
......@@ -77,6 +77,13 @@ if(!empty($title) && !empty($comment)) {
$district = $resultObj->address_components->district;
//登陆活动数据
//自动计算活动时长
ErrorLogger::doOutput("Compass...ajax_set_circle_event_new.php....startTime=" . $startTime, 0);
ErrorLogger::doOutput("Compass...ajax_set_circle_event_new.php....finishTime=" . $finishTime, 0);
$minutes=floor((strtotime($finishTime)-strtotime($startTime))%86400/60);
$timeLength = ceil($minutes/60) . "小时" . $minutes%60 . "分钟";
ErrorLogger::doOutput("Compass...ajax_set_circle_event_new.php....minutes=" . $minutes, 0);
$volunteerEventDat = new VolunteerEventDat();
$volunteerEventDat->title = $title;
$volunteerEventDat->comment = $comment;
......
......@@ -5,6 +5,15 @@ require_once ("../user_include.inc");
ErrorLogger::doOutput("Compass...test.php....Start.", 0);
$startTime = "20200401 12:00:00";
$finishTime = "20200401 18:20:00";
ErrorLogger::doOutput("Compass...ajax_set_circle_event_new.php....startTime=" . $startTime, 0);
ErrorLogger::doOutput("Compass...ajax_set_circle_event_new.php....finishTime=" . $finishTime, 0);
$minutes=floor((strtotime($finishTime)-strtotime($startTime))%86400/60);
ErrorLogger::doOutput("Compass...ajax_set_circle_event_new.php....minutes=" . $minutes, 0);
echo ceil($minutes/60) . "小时" . $minutes%60 . "分钟";
/**
$tmpMemberList = array();
//圈主
$circleMemberDat = new CircleMemberDat();
......@@ -87,7 +96,7 @@ if(!empty($tmpOrderList)) {
print_r($memberList);
/**
$userMst = UserMst::getById(31);
//管辖区域
......
......@@ -56,6 +56,7 @@
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "",
"navigationStyle":"custom",
"navigationBarTextStyle": "black"
},
"usingComponents": {
......@@ -74,7 +75,8 @@
"van-swipe-cell": "/dist/swipe-cell/index",
"van-dialog": "/dist/dialog/index",
"van-notify": "/dist/notify/index",
"van-toast": "/dist/toast/index"
"van-toast": "/dist/toast/index",
"topNavi": "/components/top-navi/top-navi"
},
"permission": {
"scope.userLocation": {
......
.navbar {
width: 100%;
background-color: #1797eb;
position: fixed;
top: 0;
left: 0;
z-index: 999;
}
.title-container {
height: 40px;
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;
display: flex;
align-items: center;
}
.capsule > view {
width: 45px;
height: 60%;
position: relative;
.capsule > view:nth-child(2) {
border-left: 1px solid #fff;
}
.capsule image {
width: 50%;
height: 100%;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
}
.title {
color: white;
position: absolute;
top: 6px;
left: 104px;
right: 104px;
height: 30px;
line-height: 30px;
font-size: 14px;
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
\ No newline at end of file
const app = getApp()
Component({
properties: {
text: {
type: String,
value: 'Wechat'
},
back: {
type: Boolean,
value: false
},
home: {
type: Boolean,
value: false
}
},
data: {
statusBarHeight: app.globalData.statusBarHeight + 'px',
navigationBarHeight: (app.globalData.statusBarHeight + 44) + 'px'
},
methods: {
backHome: function () {
let pages = getCurrentPages()
wx.navigateBack({
delta: pages.length
})
},
back: function () {
wx.navigateBack({
delta: 1
})
}
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<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
......@@ -132,12 +132,12 @@ Page({
console.log(res)
if (res.statusCode == 200) {
if (res.data.status =='NG'){
Toast('需要圈主同意,您才能进入!');
Toast('已经发送入圈申请!');
}
}
},
fail: function (res) { },
complete: function (res) { },
complete: function (res) {},
})
},
// 圈子首页获取数据
......
......@@ -111,11 +111,18 @@ Page({
Notify('请输入姓名')
return
}
if (that.data.mobile == null || that.data.name.mobile() == "") {
if (that.data.mobile == null || that.data.mobile.trim() == "") {
Notify('请输入手机号码')
return
}
if (that.address.mobile == null || that.data.address.mobile() == "") {
var myreg = /^[1][3,4,5,7,8][0-9]{9}$/;
if (!myreg.test(that.data.mobile)) {
Notify("手机格式错误");
return false;
}
if (that.data.address == null || that.data.address.trim() == "") {
Notify('请输入收件地址')
return
}
......
......@@ -12,7 +12,9 @@ Page({
fileList: [],
frontImage: '',
comment: "",
servicePlace:''
servicePlace:'',
canSubmit:true,//防止二次点击
},
/**
......@@ -107,6 +109,15 @@ Page({
return
}
if(that.data.canSubmit==false) {
return;
}
//设置为可以提交状态
this.setData({
canSubmit: false
})
//提交数据
wx.request({
url: app.url + 'ajax_circle_new.php',
......@@ -147,6 +158,10 @@ Page({
}
)
} else {
//设置为可以提交状态
this.setData({
canSubmit: true
})
Notify(res.data.message)
return
}
......
......@@ -226,10 +226,10 @@ Page({
}
//活动时长
if (that.data.timeLength == null || that.data.timeLength.trim() == "") {
Notify('请输入时长')
return
}
// if (that.data.timeLength == null || that.data.timeLength.trim() == "") {
// Notify('请输入时长')
// return
// }
//活动地点
if (that.data.position == null || that.data.position.trim() == "") {
......@@ -284,7 +284,7 @@ Page({
position: that.data.position,
includeSocialUser: that.data.includeSocialUser,
maxMember: that.data.maxMember,
timeLength: that.data.timeLength,
//timeLength: that.data.timeLength,
leaderName: that.data.leaderName,
leaderContact: that.data.leaderContact,
venue: that.data.venue,
......@@ -295,7 +295,7 @@ Page({
dataType: 'json',
success: function (res) {
if(res.data.status == "OK") {
if (that.data.frontImage != null && that.data.frontImage != undefined) {
if (that.data.frontImage) {
wx.uploadFile({
url: app.url + 'ajax_set_circle_event_new.php?unionId=' + config.unionId + "&circleId=" + that.data.circleId,
filePath: that.data.frontImage,
......@@ -303,15 +303,10 @@ Page({
header: { 'content-type': 'multipart/form-data' },
success: function (res) {
Notify('提交成功!请等待审核!')
//循环执行等待全部结束
var a = setInterval(function () {
//跳转到圈子活动首页
wx.navigateTo({
url: '../circleEvents/circleEvents?circleId=' + that.data.circleId,
});
//循环执行代码
clearInterval(a)
}, 1000) //循环时间 这里是1秒
//跳转到圈子活动首页
wx.navigateTo({
url: '../circleEvents/circleEvents?circleId=' + that.data.circleId,
});
},
fail: function (res) {
......@@ -320,6 +315,12 @@ Page({
complete: function (res) {
},
})
} else {
Notify('提交成功!请等待审核!')
//跳转到圈子活动首页
wx.navigateTo({
url: '../circleEvents/circleEvents?circleId=' + that.data.circleId,
});
}
}
if (res.data.status == "NG") {
......
......@@ -42,10 +42,12 @@
</picker >
</view>
</view>
<!--
<view>
<view class='textTitle'>活动时长</view>
<input class="inputTextBox" placeholder='请输入活动标题' bindinput="inputTimeLength" value='{{timeLength}}'></input>
<view class='textTitle'>活动时长</view>
<input class="inputTextBox" placeholder='请输入活动时长' bindinput="inputTimeLength" value='{{timeLength}}'></input>
</view>
-->
<view class='frontImageView'>
<view class='textTitle'>封面图片</view>
<view class='frontImage'>
......
......@@ -80,13 +80,6 @@
"pathName": "pages/donationIndex/donationIndex",
"query": "",
"scene": null
},
{
"id": -1,
"name": "圈子动态添加",
"pathName": "pages/newCircleMoment/newCircleMoment",
"query": "circleId=27",
"scene": null
}
]
}
......
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