提交 a77372ac authored 作者: matian's avatar matian

bug修复

上级 39ba0eaa
......@@ -165,6 +165,19 @@ export default {
a.push(infos)
return a
}, [])
// 表单提交company_id
params.users_info.forEach(item => {
if (item.company) {
this.$store.state.allSettings.company_map.forEach(it => {
if ((item.company = it.company_name)) {
item.company_id = it.id
} else {
item.company_id = ''
}
})
}
})
let flag = false
params.users_info.forEach(item => {
......
......@@ -41,6 +41,7 @@
:key="index"
@click="handleSignCheck(item)"
>
<div>
<div class="activity_list_top">
<div class="activity_list_top_tit">{{ item.name }}</div>
<div class="activity_list_top_date">{{ item.activity_time.split(' ')[0] }}</div>
......@@ -50,6 +51,7 @@
</div>
</div>
</div>
</div>
<!-- <van-pagination
v-model="currentPage"
:total-items="this.total"
......@@ -120,14 +122,13 @@ export default {
const params = { id: item.id }
getActivityDetail(params).then(res => {
this.detailList = res.data
this.handleSign(item)
})
},
handleSign(item) {
const time = new Date().getTime()
const startTime = new Date(item.start_time).getTime()
const endTime = new Date(item.end_time).getTime()
const startTime = new Date(item.start_time.replace(/-/g, '/')).getTime()
const endTime = new Date(item.end_time.replace(/-/g, '/')).getTime()
if (time >= startTime && time < endTime) {
if (this.detailList.other_fill_in.need_fill_in_status) {
// 有需要填写的步骤
......@@ -135,7 +136,7 @@ export default {
title: '提示',
message: '还有报名流程未交费',
confirmButtonText: '继续报名',
cancelButtonText: '开始学习',
cancelButtonText: this.detailList.self_fill_in.need_fill_in_status === false ? '开始学习' : '',
closeOnClickOverlay: true
})
.then(() => {
......@@ -149,6 +150,8 @@ export default {
.catch(() => {})
// 没有需要填写的步骤
} else if (!this.detailList.other_fill_in.need_fill_in_status) {
console.log('333')
if (this.detailList.self_fill_in.need_fill_in_status) {
this.$router.push({
path: '/SignMainPage',
......@@ -176,7 +179,7 @@ export default {
}
}
} else if (time >= endTime) {
console.log('111')
console.log('444')
Toast(`该活动已于${item.end_time}结束报名`)
} else if (time < startTime) {
Toast(`该活动已于${item.start_time}开始报名`)
......@@ -251,7 +254,6 @@ export default {
color: #333333;
}
.main_content_activity_list {
cursor: pointer;
box-sizing: border-box;
padding: 0.2rem 0.25rem 0.2rem 0.3rem;
width: 100%;
......@@ -261,6 +263,9 @@ export default {
background-color: #fff;
border-radius: 0.2rem;
margin-top: 0.24rem;
div {
cursor: pointer;
}
.activity_list_top {
display: flex;
justify-content: space-between;
......
......@@ -166,8 +166,15 @@ export default {
this.payDetail.order_id = res.data.order_id
this.isQrPageShow = true
}
if (res.code === 100) {
if (this.stepList.length === this.data.num) {
this.$router.push('/')
} else {
this.$emit('next')
}
}
// 订单为0元时,判断该步骤后面是否有步骤,若有就去下一步骤,否则返回首页
res.code === 100 && this.stepList.length === this.data.num ? this.$router.push('/') : this.$emit('next')
// res.code === 100 && this.stepList.length === this.data.num ? this.$router.push('/') : this.$emit('next')
})
}
}
......
......@@ -74,8 +74,8 @@ export default {
const data = res.data
// 复制链接进入活动时,判断活动报名时间弹窗
const time = new Date().getTime()
const startTime = new Date(data.activity.start_time).getTime()
const endTime = new Date(data.activity.end_time).getTime()
const startTime = new Date(data.activity.start_time.replace(/-/g, '/')).getTime()
const endTime = new Date(data.activity.end_time.replace(/-/g, '/')).getTime()
if (startTime > time || endTime < time) {
Dialog.alert({
title: '提示',
......
import Vue from 'vue'
import Vuex from 'vuex'
import { getUser, logout } from '@/api/base'
import { getUser, logout, getAllSetting } from '@/api/base'
Vue.use(Vuex)
......@@ -8,7 +8,8 @@ const store = new Vuex.Store({
state: {
user: {},
stepIndex: 0,
stepResult: []
stepResult: [],
allSettings: {}
},
mutations: {
setUser(state, user) {
......@@ -20,6 +21,9 @@ const store = new Vuex.Store({
setStepResult(state, stepResult) {
state.stepResult = stepResult
},
setAllSettings(state, allSettings) {
state.allSettings = allSettings
}
},
actions: {
......@@ -53,7 +57,14 @@ const store = new Vuex.Store({
return false
})
return isLogin
},
// 获取所有项目列表
getAllSetting({ commit }) {
getAllSetting().then(res => {
commit('setAllSettings', res.data)
})
}
}
})
store.dispatch('getAllSetting')
export default store
......@@ -64,7 +64,7 @@ httpRequest.interceptors.response.use(
Message({ message: '没有操作权限', type: 'error' })
return data
}
Message({ message: data.msg, type: 'error' })
Message({ message: data.message, type: 'error' })
return Promise.reject(data)
}
return data
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论