2026-07-29 11:25:29 +08:00

37 lines
991 B
Vue

<template>
<view class="redirect-page">跳转中...</view>
</template>
<script setup>
import { onLoad } from "@dcloudio/uni-app";
onLoad((options = {}) => {
const type = options.type === "coupon" ? "coupon" : "rights";
const params = [
options.corpId ? `corpId=${encodeURIComponent(options.corpId)}` : "",
options.teamId ? `teamId=${encodeURIComponent(options.teamId)}` : "",
options.customerId ? `customerId=${encodeURIComponent(options.customerId)}` : "",
options.memberId ? `memberId=${encodeURIComponent(options.memberId)}` : "",
options.name ? `name=${encodeURIComponent(options.name)}` : "",
]
.filter(Boolean)
.join("&");
const target =
type === "coupon"
? `/pages/experience-coupon/my-coupons?${params}`
: `/pages/experience-coupon/my-rights?${params}`;
uni.redirectTo({ url: target });
});
</script>
<style scoped>
.redirect-page {
padding: 120rpx 0;
text-align: center;
color: #999;
font-size: 28rpx;
}
</style>