原先团购处理
This commit is contained in:
parent
9d138814f2
commit
7bbf436a1c
@ -112,7 +112,7 @@ export default {
|
||||
if(options?.path?.includes('ticketsBuy/ticketsBuy') && options?.query.couponsId) {
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: 'pages/common/groupbuy/index?id=' + options?.query.couponsId
|
||||
url: 'pages/common/groupbuy/detail?id=' + options?.query.couponsId
|
||||
});
|
||||
}, 500);
|
||||
}
|
||||
|
@ -38,6 +38,12 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "肃客会员"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/coupons/ticketsBuy/ticketsBuy",
|
||||
"style": {
|
||||
"navigationBarTitleText": "团购详情"
|
||||
}
|
||||
}
|
||||
],
|
||||
"subPackages": [
|
||||
|
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>
|
@ -86,7 +86,7 @@ const submenuList = [
|
||||
title: '注册有礼',
|
||||
icon: assetsUrl('ic_register_gift2.png'),
|
||||
path: '/pages/common/register/reward'
|
||||
// path: '/pages/common/register/index'
|
||||
// path: '/pages/coupons/ticketsBuy/ticketsBuy?couponsId=1797773484774432769'
|
||||
},
|
||||
{
|
||||
title: '团购秒杀',
|
||||
|
@ -80,7 +80,7 @@ const params = ref<{
|
||||
nickName: userInfo.value.nickName,
|
||||
telephone: userInfo.value.telephone,
|
||||
gender: userInfo.value.gender,
|
||||
birthday: userInfo.value.birthday
|
||||
birthday: userInfo.value.birthday|| dayjs().format('YYYY-MM-DD')
|
||||
});
|
||||
|
||||
onLoad(() => {
|
||||
@ -135,7 +135,7 @@ const save = async () => {
|
||||
|
||||
const result = await updateProfile({
|
||||
...params.value,
|
||||
birthday: dayjs(params.value.birthday).format('YYYY-MM-DD HH:mm:ss'),
|
||||
birthday: dayjs(birthday.value).isValid() ? dayjs(birthday.value).format('YYYY-MM-DD HH:mm:ss') : dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
birthdayType: 0
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user