update
parent
28c2adc9ec
commit
77fc731426
|
|
@ -79,6 +79,9 @@ export function registrationSubmit (data) {
|
||||||
export function verifyRegistrationRecord (data) {
|
export function verifyRegistrationRecord (data) {
|
||||||
return req.post('/verifyRegistrationRecord', data)
|
return req.post('/verifyRegistrationRecord', data)
|
||||||
}
|
}
|
||||||
|
export function getVerifyRegistrationRecordList (data) {
|
||||||
|
return req.get('/getVerifyRegistrationRecordList', data)
|
||||||
|
}
|
||||||
|
|
||||||
export function registrationRecordList (data) {
|
export function registrationRecordList (data) {
|
||||||
return req.get('/registrationRecordList', data)
|
return req.get('/registrationRecordList', data)
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,29 @@ export default function detail () {
|
||||||
|
|
||||||
const { isLoading, activeInfo = {}, visible, formInfo, checked, status } = state
|
const { isLoading, activeInfo = {}, visible, formInfo, checked, status } = state
|
||||||
|
|
||||||
|
const handleConfirm = async () => {
|
||||||
|
if (!checked) {
|
||||||
|
const res = await Taro.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: `请先阅读并同意${appName}活动细则`,
|
||||||
|
showCancel: true,
|
||||||
|
cancel: '取消',
|
||||||
|
cancelText: '拒绝',
|
||||||
|
confirmText: '同意',
|
||||||
|
cancelColor: '#a5a5a5',
|
||||||
|
confirmColor: '#000'
|
||||||
|
})
|
||||||
|
if (!res.confirm) return
|
||||||
|
setState((draft) => {
|
||||||
|
draft.checked = true
|
||||||
|
draft.visible = true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
setState((draft) => {
|
||||||
|
draft.visible = true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const renderFooter = () => {
|
const renderFooter = () => {
|
||||||
if (isLoading || status === 'passed') {
|
if (isLoading || status === 'passed') {
|
||||||
return null
|
return null
|
||||||
|
|
@ -77,28 +100,7 @@ export default function detail () {
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View onClick={async () => {
|
<View onClick={handleConfirm} className={"btn"}>{!status ? '确认报名' : status === 'pending' ? '报名中' : '已报名'}</View>
|
||||||
if (!checked) {
|
|
||||||
const res = await Taro.showModal({
|
|
||||||
title: '提示',
|
|
||||||
content: `请先阅读并同意${appName}活动细则`,
|
|
||||||
showCancel: true,
|
|
||||||
cancel: '取消',
|
|
||||||
cancelText: '拒绝',
|
|
||||||
confirmText: '同意',
|
|
||||||
cancelColor: '#a5a5a5',
|
|
||||||
confirmColor: '#000'
|
|
||||||
})
|
|
||||||
if (!res.confirm) return
|
|
||||||
setState((draft) => {
|
|
||||||
draft.checked = true
|
|
||||||
draft.visible = true
|
|
||||||
})
|
|
||||||
}
|
|
||||||
setState((draft) => {
|
|
||||||
draft.visible = true
|
|
||||||
})
|
|
||||||
}} className={"btn"}>{!status ? '确认报名' : status === 'pending' ? '报名中' : '已报名'}</View>
|
|
||||||
</View>
|
</View>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -139,23 +141,22 @@ export default function detail () {
|
||||||
activity_id: activeInfo.activity_id
|
activity_id: activeInfo.activity_id
|
||||||
})
|
})
|
||||||
if (status) {
|
if (status) {
|
||||||
// Taro.showToast({
|
|
||||||
// title: '报名成功',
|
|
||||||
// icon: 'none'
|
|
||||||
// })
|
|
||||||
setState((draft) => {
|
setState((draft) => {
|
||||||
draft.visible = false
|
draft.visible = false
|
||||||
draft.status = status
|
draft.status = status
|
||||||
})
|
})
|
||||||
|
const templeparams = {
|
||||||
|
temp_name: 'yykweishop',
|
||||||
|
source_type: 'activity'
|
||||||
|
}
|
||||||
|
const { template_id } = await api.user.newWxaMsgTmpl(templeparams)
|
||||||
|
console.log("🚀 ~ template_id:", template_id)
|
||||||
Taro.requestSubscribeMessage({
|
Taro.requestSubscribeMessage({
|
||||||
tmplIds: ['tGJR7BS3HM9xLD4QUdBwtTAJkgzfl7cw_8-ngd74JM4'],
|
tmplIds: template_id,
|
||||||
success: () => {
|
success: () => {
|
||||||
// onSubscribe()
|
|
||||||
console.log("🚀 ~ onSubscribe:", 'onSubscribe')
|
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
console.log("🚀 ~ err:", err)
|
console.log("🚀 ~ err:", err)
|
||||||
// onSubscribe()
|
|
||||||
},
|
},
|
||||||
complete: () => {
|
complete: () => {
|
||||||
Taro.navigateTo({ url: '/pages/recommend/status?success=true&id=' + activeInfo.activity_id })
|
Taro.navigateTo({ url: '/pages/recommend/status?success=true&id=' + activeInfo.activity_id })
|
||||||
|
|
|
||||||
|
|
@ -60,8 +60,8 @@ export default function scan () {
|
||||||
}
|
}
|
||||||
|
|
||||||
const getRecords = async () => {
|
const getRecords = async () => {
|
||||||
const data = await api.user.registrationRecordList()
|
const data = await api.user.getVerifyRegistrationRecordList({ activity_id: 1 })
|
||||||
const _list = (data?.list || []).filter(n => n.is_write_off == 1).map(item => {
|
const _list = (data?.list || []).map(item => {
|
||||||
let formData = item.content?.[0]?.formdata || []
|
let formData = item.content?.[0]?.formdata || []
|
||||||
if (formData.length > 0) {
|
if (formData.length > 0) {
|
||||||
formData.forEach(_item => {
|
formData.forEach(_item => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue