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

bug修复

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