diff --git a/apis/modules/activity.js b/apis/modules/activity.js
index b1fe976..c41df16 100644
--- a/apis/modules/activity.js
+++ b/apis/modules/activity.js
@@ -24,4 +24,7 @@ export const cancelRegistration = (id) => {
}
export const categoryList = (id) => {
return post(`competition/competitionClassification/categoryList`)
+}
+export const explosiveList = (data) => {
+ return post(`nakadai/explosiveRecommendation/explosiveList`, data)
}
\ No newline at end of file
diff --git a/config/request.js b/config/request.js
index aea2d7a..9ded45d 100644
--- a/config/request.js
+++ b/config/request.js
@@ -5,8 +5,8 @@
*/
export default {
- // baseURL: 'http://192.168.31.217:10010/',
- baseURL: 'http://124.71.79.122/',
+ baseURL: 'http://192.168.31.217:10010/',
+ // baseURL: 'http://124.71.79.122/',
headers: {
'Content-Type': 'application/json;charset=UTF-8'
},
diff --git a/other/activityDetail/activityDetail.vue b/other/activityDetail/activityDetail.vue
index 4d4f943..197e712 100644
--- a/other/activityDetail/activityDetail.vue
+++ b/other/activityDetail/activityDetail.vue
@@ -11,7 +11,7 @@
状态:
- 进行中
+ {{ statusList[comStatus] }}
人数限制:
@@ -37,7 +37,7 @@
- 活动详情
- - 活动通知
+
- 已报名人员({{ form.applicantNum }}/{{ form.quantityLimit }})
@@ -55,7 +55,7 @@
- {{ form.signed ? '取消报名' : '立刻报名' }}
+ {{ comStatus === 1 ? (signed ? '取消报名' : '立刻报名') : statusList[comStatus] }}
@@ -73,6 +73,9 @@
return {
Common,
id: '',
+ statusList: ['未开始', '进行中', '已截止报名', '已结束'],
+ comStatus: 0,
+ signed: 0,
curTab: 0,
reachBottom: 0, // 是否是上拉加载。0->否,1->是,-1->加载完所有数据
status: 'more', // 上拉加载状态 more|loading|noMore
@@ -151,18 +154,26 @@
// 定时处理时间及状态
handleStatus () {
const data = this.form
- let signing = 0 // 当前处于报名时间内
+ let status = 0
let signed = 0 // 是否已经报了名
const signUpStartTime = new Date(data.signUpStartTime) // 报名开始时间
const signUpEndTime = new Date(data.signUpEndTime) // 报名结束时间
+ const playStartTime = new Date(data.playStartTime) // 活动结束时间
+ const playEndTime = new Date(data.playEndTime) // 活动结束时间
const { now } = this
// 报名中(whetherToSignUp 是否已报名 1已报名,0未报名)
- if (now > signUpStartTime && now < signUpEndTime) {
- signing = 1
+ if (now < signUpStartTime) {
+ status = 0
+ } else if (now > signUpStartTime && now < signUpEndTime) {
+ status = 1
if (data.competitionRegistration) signed = 1
+ } else if (now > signUpEndTime && now < playEndTime) {
+ status = 2
+ } else if (now > playEndTime) {
+ status = 3
}
- this.$set(this.form, 'signing', signing)
- this.$set(this.form, 'signed', signed)
+ this.comStatus = status
+ this.signed = signed
},
// 已报名人员
getRegList() {
@@ -196,7 +207,7 @@
},
// 报名前的判断
async presign() {
- if (!this.form.signing) return this.$util.errMsg('现在不在报名时间!')
+ if (this.comStatus !== 1) return false
if (this.form.competitionRegistration) { // 取消报名
this.cancelSign()
} else { // 报名
diff --git a/pages/index/index.vue b/pages/index/index.vue
index b236f15..7368a57 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -9,7 +9,14 @@
-
+
+
+
+
+
+
+
+
@@ -18,7 +25,14 @@
爆款推荐
-
+
+
+
+
+
+
+
+
@@ -58,13 +72,23 @@