Commit c6bbab6a authored by 王永阿飞's avatar 王永阿飞

修改了bug

parent ba1e886d
......@@ -76,4 +76,14 @@ export function addUnifiedOrder(orderVo) {
method: 'post',
data: orderVo
})
}
//微信支付回调下
export function addUnifiedOrderWx(orderVo) {
return request({
url: 'http://bin001.free.idcfengye.com/dealFlow/stream/wxPayNotify',
method: 'post',
data: orderVo
})
}
\ No newline at end of file
......@@ -220,8 +220,8 @@
.image {
position: absolute;
border-top-left-radius: 15rpx;
border-top-right-radius: 15rpx;
border-top-left-radius: 30rpx;
border-top-right-radius: 30rpx;
height: 400rpx;
width: 100%;
}
......@@ -230,6 +230,7 @@
// justify-content: end;
position: absolute;
padding-left: 86%;
// right: 0.01rpx;
top: 0rpx;
width: 98rpx;
height: 98rpx;
......
......@@ -104,6 +104,8 @@
export default {
data() {
return {
//加载一次导航
isGoNavigate: false,
activityId: null,
wechatId: 1,
activityObject:{},
......@@ -122,6 +124,7 @@
onLoad(options) {
console.log('onLoad')
this.activityId =Number.parseInt(options.activity_id)
this.isGoNavigate = true
console.log(this.activityId)
this.getList(this.activityId)
},
......@@ -264,39 +267,21 @@
for (var i = 0; i < this.activityObject.tjtActivityProjectVoList.length; i++) {
limitSum = limitSum + this.activityObject.tjtActivityProjectVoList[i].limitPeople
}
console.log(signInSum)
console.log(limitSum)
if(signInSum === limitSum)
return uni.$showMsg('报名人数已满1!')
return uni.$showMsg('报名人数已满!')
if (this.activityObject.activityStatus === '2') {
return uni.$showMsg('活动已结束!')
}
// let signupTime = Date.parse(this.activityObject.signupTime)
// console.log('signupTime'+signupTime)
// console.log('now'+Date.parse(new Date))
// if(signupTime <= Date.parse(new Date)){
// return uni.$showMsg('报名已结束!')}
console.log(Date.parse(this.activityObject.signupTime))
console.log(Date.parse(new Date()))
if (Date.parse(this.activityObject.signupTime.replace(/-/g, '/')) < Date.parse(new Date())) {
return wx.showToast({
title: '报名已结束!',
icon: 'none',
duration: 2000})
}
else{
uni.navigateTo({
url: '/pages_activity/activity_immedSignIn/activity_immedSignIn?activity_id=' + this.activityId
})
}
return uni.$showMsg('报名已结束!')}
if(Date.parse(this.activityObject.activityEnd.replace(/-/g, '/'))< new Date()){
return uni.$showMsg('报名已结束!')}
else{
uni.navigateTo({
url: '/pages_activity/activity_immedSignIn/activity_immedSignIn?activity_id=' + this.activityId
})
}
this.isGoNavigate = false
},
}
}
......
......@@ -59,7 +59,7 @@ import {
mapState
} from 'vuex'
import {
getProjectInfo,addsignInInfo,addUnifiedOrder
getProjectInfo,addsignInInfo,addUnifiedOrder,addUnifiedOrderWx
} from "@/api/activity.js";
export default {
data() {
......@@ -243,12 +243,11 @@ import {
if(this.projectFee !== 0){
this.info.status = '0'
addsignInInfo(this.info).then(response=>{
console.log(response)
if(response.data.status ==='1')
console.log(response) //存在的话就返回报错
if(response.data.code === 500)
return uni.$showMsg(response.msg)
this.orderVo.signupId = response.data.signupId
this.orderVo.wechatId = this.info.wechatId
if(response.data.status === '0'){
addUnifiedOrder(this.orderVo).then(response =>{
console.log(response)
uni.requestPayment({
......@@ -274,7 +273,7 @@ import {
}
})
})
}
})
}else{
this.info.status = '1'
......
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