update
parent
28c2adc9ec
commit
77fc731426
|
|
@ -79,6 +79,9 @@ export function registrationSubmit (data) {
|
|||
export function verifyRegistrationRecord (data) {
|
||||
return req.post('/verifyRegistrationRecord', data)
|
||||
}
|
||||
export function getVerifyRegistrationRecordList (data) {
|
||||
return req.get('/getVerifyRegistrationRecordList', data)
|
||||
}
|
||||
|
||||
export function registrationRecordList (data) {
|
||||
return req.get('/registrationRecordList', data)
|
||||
|
|
|
|||
|
|
@ -60,24 +60,7 @@ export default function detail () {
|
|||
|
||||
const { isLoading, activeInfo = {}, visible, formInfo, checked, status } = state
|
||||
|
||||
const renderFooter = () => {
|
||||
if (isLoading || status === 'passed') {
|
||||
return null
|
||||
}
|
||||
return <View className={"bottom"}>
|
||||
<View className='check-box'>
|
||||
<SpCheckbox checked={checked} colors="#000" onChange={() => setState((draft) => { draft.checked = !checked })} />
|
||||
<View>
|
||||
<Text onClick={() => setState((draft) => { draft.checked = !checked })} >我已经阅读并同意</Text>
|
||||
<Text
|
||||
onClick={() => Taro.navigateTo({ url: '/subpages/auth/reg-rule?type=member_logout' })}
|
||||
style={`color: #000000;text-decoration: underline;`}
|
||||
>
|
||||
{`《${appName}活动细则》`}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
<View onClick={async () => {
|
||||
const handleConfirm = async () => {
|
||||
if (!checked) {
|
||||
const res = await Taro.showModal({
|
||||
title: '提示',
|
||||
|
|
@ -98,7 +81,26 @@ export default function detail () {
|
|||
setState((draft) => {
|
||||
draft.visible = true
|
||||
})
|
||||
}} className={"btn"}>{!status ? '确认报名' : status === 'pending' ? '报名中' : '已报名'}</View>
|
||||
}
|
||||
|
||||
const renderFooter = () => {
|
||||
if (isLoading || status === 'passed') {
|
||||
return null
|
||||
}
|
||||
return <View className={"bottom"}>
|
||||
<View className='check-box'>
|
||||
<SpCheckbox checked={checked} colors="#000" onChange={() => setState((draft) => { draft.checked = !checked })} />
|
||||
<View>
|
||||
<Text onClick={() => setState((draft) => { draft.checked = !checked })} >我已经阅读并同意</Text>
|
||||
<Text
|
||||
onClick={() => Taro.navigateTo({ url: '/subpages/auth/reg-rule?type=member_logout' })}
|
||||
style={`color: #000000;text-decoration: underline;`}
|
||||
>
|
||||
{`《${appName}活动细则》`}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
<View onClick={handleConfirm} className={"btn"}>{!status ? '确认报名' : status === 'pending' ? '报名中' : '已报名'}</View>
|
||||
</View>
|
||||
}
|
||||
|
||||
|
|
@ -139,23 +141,22 @@ export default function detail () {
|
|||
activity_id: activeInfo.activity_id
|
||||
})
|
||||
if (status) {
|
||||
// Taro.showToast({
|
||||
// title: '报名成功',
|
||||
// icon: 'none'
|
||||
// })
|
||||
setState((draft) => {
|
||||
draft.visible = false
|
||||
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({
|
||||
tmplIds: ['tGJR7BS3HM9xLD4QUdBwtTAJkgzfl7cw_8-ngd74JM4'],
|
||||
tmplIds: template_id,
|
||||
success: () => {
|
||||
// onSubscribe()
|
||||
console.log("🚀 ~ onSubscribe:", 'onSubscribe')
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log("🚀 ~ err:", err)
|
||||
// onSubscribe()
|
||||
},
|
||||
complete: () => {
|
||||
Taro.navigateTo({ url: '/pages/recommend/status?success=true&id=' + activeInfo.activity_id })
|
||||
|
|
|
|||
|
|
@ -60,8 +60,8 @@ export default function scan () {
|
|||
}
|
||||
|
||||
const getRecords = async () => {
|
||||
const data = await api.user.registrationRecordList()
|
||||
const _list = (data?.list || []).filter(n => n.is_write_off == 1).map(item => {
|
||||
const data = await api.user.getVerifyRegistrationRecordList({ activity_id: 1 })
|
||||
const _list = (data?.list || []).map(item => {
|
||||
let formData = item.content?.[0]?.formdata || []
|
||||
if (formData.length > 0) {
|
||||
formData.forEach(_item => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue