提交 75f8c90c 编写于 作者: 2 222000134

发布小队活动连接云函数部分代码不小心注释掉了,创建小队默认头像失效了,修复bug

上级 7f8d1f9b
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
export default { export default {
data() { data() {
return { return {
signStatus: '报名', signStatus: '',
userId: '', userId: '',
icon: '', icon: '',
activityId: '', activityId: '',
...@@ -73,6 +73,22 @@ ...@@ -73,6 +73,22 @@
} }
}, },
methods: { methods: {
happenTimeFun(){//时间戳数据处理
let date = new Date();
//时间戳为10位需*1000,时间戳为13位的话不需乘1000
let y = date.getFullYear();
let MM = date.getMonth() + 1;
MM = MM < 10 ? ('0' + MM) : MM;//月补0
let d = date.getDate();
d = d < 10 ? ('0' + d) : d;//天补0
let h = date.getHours();
h = h < 10 ? ('0' + h) : h;//小时补0
let m = date.getMinutes();
m = m < 10 ? ('0' + m) : m;//分钟补0
let s = date.getSeconds();
s = s < 10 ? ('0' + s) : s;//秒补0
return y + '-' + MM + '-' + d + ' ' + h + ':' + m+ ':' + s;
},
goBack() { goBack() {
uni.navigateBack({ uni.navigateBack({
delta: 1, //返回层数,2则上上页 delta: 1, //返回层数,2则上上页
...@@ -199,6 +215,11 @@ ...@@ -199,6 +215,11 @@
}).catch((err => { }).catch((err => {
console.log(err) console.log(err)
})) }))
if(this.happenTimeFun()>this.startDate){
console.log(this.happenTimeFun(),'this.happenTimeFun()')
console.log(this.startDate,'this.startDate')
this.signStatus="报名时间截止"
}
} }
} }
</script> </script>
......
...@@ -120,35 +120,35 @@ ...@@ -120,35 +120,35 @@
return; return;
} }
// uniCloud.callFunction({ uniCloud.callFunction({
// name: 'fe-team-createActivity', name: 'fe-team-createActivity',
// data: { data: {
// title: this.name, title: this.name,
// content: this.content, content: this.content,
// startDate: this.start_date, startDate: this.start_date,
// endDate: this.end_date, endDate: this.end_date,
// userId: this.userId, userId: this.userId,
// place: this.place, place: this.place,
// participants: this.object, participants: this.object,
// contact: this.contact, contact: this.contact,
// } }
// }) })
// .then(res => { .then(res => {
// console.log(res) console.log(res)
// if (res.result.code == 200) { if (res.result.code == 200) {
// uni.showToast({ uni.showToast({
// title: '提交成功', title: '提交成功',
// icon: 'success' icon: 'success'
// }); });
// this.goBack() this.goBack()
// } else { } else {
// uni.showToast({ uni.showToast({
// title: '提交失败', title: '提交失败',
// icon: 'error' icon: 'error'
// }); });
// } }
// }) })
}, },
handleDateChange1(event) { handleDateChange1(event) {
this.start_date = event.detail.value this.start_date = event.detail.value
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
} }
if (this.avatar == '') { if (this.avatar == '') {
this.avatar = this.avatar =
'https://mp-6f6feaec-a026-4402-8e8d-18f7572890da.cdn.bspapp.com/cloudstorage/7d3feb79-8efe-4686-b745-3b7dc5d5df36.png' 'https://mp-6f6feaec-a026-4402-8e8d-18f7572890da.cdn.bspapp.com/cloudstorage/433d3cc6-4b8f-475c-83e1-35acc747cab2.jpg'
} }
await uniCloud.callFunction({ await uniCloud.callFunction({
name: 'fe-team-createTeam', name: 'fe-team-createTeam',
......
...@@ -95,6 +95,7 @@ ...@@ -95,6 +95,7 @@
}; };
}, },
methods: { methods: {
tabChange(index) { tabChange(index) {
this.current = index.index; this.current = index.index;
if (index.index == 1) { if (index.index == 1) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册