...
|
...
|
@@ -77,7 +77,7 @@ Page({ |
|
|
this.setData({ content: e.detail.value });
|
|
|
},
|
|
|
//发送评论/回复
|
|
|
clickComment() {
|
|
|
clickComment(e) {
|
|
|
this.setData({ display: false });
|
|
|
if(this.data.content === '' ) {
|
|
|
wx.showToast({title:'请输入内容',icon:'none'})
|
...
|
...
|
@@ -88,6 +88,7 @@ Page({ |
|
|
activeId:this.data.detail_id,
|
|
|
commonId: this.data.is_ask?0:this.data.commet_id,
|
|
|
content:this.data.content,
|
|
|
formId:e.detail.formId,
|
|
|
};
|
|
|
app.post(url,params,{}).then((res)=>{
|
|
|
console.log('提交评论',res);
|
...
|
...
|
@@ -109,12 +110,13 @@ Page({ |
|
|
},
|
|
|
//回复
|
|
|
reply(e) {
|
|
|
console.log('回复', e);
|
|
|
const id = e.currentTarget.dataset.id;
|
|
|
this.setData({
|
|
|
display: !this.data.display,
|
|
|
is_ask:false,is_reply:true,
|
|
|
commet_id:id,content:'' ,
|
|
|
placeholder:'输入您的回复'
|
|
|
placeholder:'输入您的回复',
|
|
|
});
|
|
|
// wx.navigateTo({
|
|
|
// url: '/pages/comment/comment?is_reply=' + true
|
...
|
...
|
@@ -231,7 +233,7 @@ Page({ |
|
|
"token": wx.getStorageSync('token')
|
|
|
};
|
|
|
app.post(url, params, {}).then((res) => {
|
|
|
console.log('获取详情', res, app.initTime(res.data.active.surplus));
|
|
|
// console.log('获取详情', res, app.initTime(res.data.active.surplus));
|
|
|
if (+res.code === 1) {
|
|
|
self.setData({
|
|
|
detail: res.data.active,
|
...
|
...
|
@@ -242,6 +244,7 @@ Page({ |
|
|
commentList: res.data.common,
|
|
|
is_collect: res.data.is_collect,
|
|
|
count: res.data.count, // 留言板
|
|
|
is_send:res.data.is_send,//能否参加1:不能2:能
|
|
|
});
|
|
|
// (0全部,2待拼成,3人数不足未拼成,4已拼成,5已取消,6已完成,7已评价,8已拼成(活动未结束),9删除
|
|
|
const status = res.data.active.status;
|
...
|
...
|
@@ -288,7 +291,7 @@ Page({ |
|
|
// console.log('surplus', this.data.detail.surplus);
|
|
|
// t = setTimeout(this.countDown, 1000);
|
|
|
const time = app.initTime(this.data.detail.surplus);
|
|
|
console.log('time', time);
|
|
|
// console.log('time', time);
|
|
|
obj = {
|
|
|
day: time[0].day,
|
|
|
hou: time[0].hou,
|
...
|
...
|
@@ -349,6 +352,7 @@ Page({ |
|
|
confirmJoin(e) {
|
|
|
const self = this;
|
|
|
console.log('已参与人数',self.data.join_people.length);
|
|
|
if(+self.data.is_send === 2){ //可参与
|
|
|
if(self.data.join_people.length + self.data.num > self.data.detail.max) {
|
|
|
wx.showToast({title:'参加人数已超过剩余名额',icon:'none'})
|
|
|
}else if(self.data.join_people.length + self.data.num == self.data.detail.max){
|
...
|
...
|
@@ -375,12 +379,13 @@ Page({ |
|
|
}
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onLoad: function (options) {
|
|
|
console.log('详情options', options);
|
|
|
// console.log('详情options', options);
|
|
|
this.setData({detail_id: +options.id ? +options.id : ''});
|
|
|
},
|
|
|
|
...
|
...
|
|