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,6 +60,29 @@ export default function detail () {
|
|||
|
||||
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 = () => {
|
||||
if (isLoading || status === 'passed') {
|
||||
return null
|
||||
|
|
@ -77,28 +100,7 @@ export default function detail () {
|
|||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
<View onClick={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
|
||||
})
|
||||
}} className={"btn"}>{!status ? '确认报名' : status === 'pending' ? '报名中' : '已报名'}</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