You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
444 B
13 lines
444 B
// Return only to a validated survey route after identity completion.
|
|
export function returnToSurvey(id) {
|
|
if (!/^[1-9]\d*$/.test(String(id || ''))) return Promise.reject(new Error('问卷地址无效'))
|
|
const url = '/packages/surveyFill/index?id=' + id
|
|
return new Promise((resolve, reject) => {
|
|
uni.redirectTo({
|
|
url,
|
|
success: resolve,
|
|
fail: () => uni.reLaunch({ url, success: resolve, fail: reject })
|
|
})
|
|
})
|
|
}
|