获取activity_code问题

This commit is contained in:
lf 2024-06-14 09:38:21 +08:00
parent a5fc245a3f
commit d315bb2ab8
2 changed files with 8 additions and 4 deletions

View File

@ -50,7 +50,7 @@ const exchange = () => {
uni.hideLoading()
// uni.stopPullDownRefresh();
uni.navigateTo({
url: '/pages/coupon/index',
url: '/pages/coupon/index?activity_code=' + route.activity_code,
})
} else {
uni.showToast({

View File

@ -76,9 +76,13 @@ const getUrlParm = () => {
}
const getUrlPathName = () => {
const url = window.location.pathname.length > 1 ? window.location.pathname : window.location.href
const str = url.split('/')
return str[str.length - 1] || ''
const url = window.location.href
const str = url.split('#/')[1]
if (str.indexOf('/') === -1) {
return str || ''
} else {
return str.split('/')[0]
}
}
window.parent.addEventListener('message', function (event) {