原先团购处理
This commit is contained in:
29
src/pages/coupons/ticketsBuy/ticketsBuy.vue
Normal file
29
src/pages/coupons/ticketsBuy/ticketsBuy.vue
Normal file
@@ -0,0 +1,29 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<script lang='ts' setup>
|
||||
onLoad((options) => {
|
||||
getApp().logger?.info('ticketsBuy options: ', options);
|
||||
let couponId = options?.couponsId;
|
||||
if(options?.query && couponId == undefined) {
|
||||
const params = decodeURIComponent(options?.query);
|
||||
couponId = getQueryParam(params, 'couponsId');
|
||||
}
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: `/pages/common/groupbuy/detail?id=${couponId}`
|
||||
});
|
||||
}, 300);
|
||||
});
|
||||
|
||||
function getQueryParam(queryParams: string, key: string) {
|
||||
let regex = new RegExp('(?:[?&]|^)' + key + '=([^&]+)'),
|
||||
match = queryParams.match(regex);
|
||||
return match && match[1];
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
|
||||
</style>
|
Reference in New Issue
Block a user