🐛 fix(api): Server and order
This commit is contained in:
@@ -17,8 +17,8 @@ NEXT_PUBLIC_FACEBOOK_LINK=https://github.com/perfect-panel/ppanel-user-web
|
||||
NEXT_PUBLIC_GITHUB_LINK=https://github.com/perfect-panel/ppanel-user-web
|
||||
|
||||
# Default Login User
|
||||
NEXT_PUBLIC_DEFAULT_USER_EMAIL=support@ppanel.dev
|
||||
NEXT_PUBLIC_DEFAULT_USER_PASSWORD=support@ppanel.dev
|
||||
NEXT_PUBLIC_DEFAULT_USER_EMAIL=admin@ppanel.dev
|
||||
NEXT_PUBLIC_DEFAULT_USER_PASSWORD=admin-password
|
||||
|
||||
# Please put in the .env file, otherwise the i18n command will not work
|
||||
# OpenAI API key and proxy URL required for i18n command (optional)
|
||||
|
||||
@@ -141,7 +141,7 @@ export default function Page() {
|
||||
<SubscribeBilling
|
||||
order={{
|
||||
...data,
|
||||
coupon: data?.reduction,
|
||||
coupon_discount: data?.coupon_discount,
|
||||
quantity: data?.quantity,
|
||||
unit_price: data?.subscribe?.unit_price,
|
||||
type: data?.type,
|
||||
|
||||
@@ -10,8 +10,8 @@ interface SubscribeBillingProps {
|
||||
subscribe_id?: number;
|
||||
quantity?: number;
|
||||
price?: number;
|
||||
reduction?: number;
|
||||
coupon?: number;
|
||||
discount?: number;
|
||||
coupon_discount?: number;
|
||||
fee_amount?: number;
|
||||
amount?: number;
|
||||
unit_price?: number;
|
||||
@@ -42,13 +42,13 @@ export function SubscribeBilling({ order }: SubscribeBillingProps) {
|
||||
<li>
|
||||
<span className='text-muted-foreground'>{t('productDiscount')}</span>
|
||||
<span>
|
||||
<Display type='currency' value={order?.reduction} />
|
||||
<Display type='currency' value={order?.discount} />
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span className='text-muted-foreground'>{t('couponDiscount')}</span>
|
||||
<span>
|
||||
<Display type='currency' value={order?.coupon} />
|
||||
<Display type='currency' value={order?.coupon_discount} />
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
@@ -40,7 +40,7 @@ export default function Page() {
|
||||
return (
|
||||
<>
|
||||
<Tabs value={group} onValueChange={setGroup} className='space-y-4'>
|
||||
{groups?.length && (
|
||||
{groups && groups.length > 0 && (
|
||||
<>
|
||||
<h1 className='text-muted-foreground w-full'>{t('category')}</h1>
|
||||
<TabsList>
|
||||
|
||||
@@ -22,7 +22,7 @@ export default function Page() {
|
||||
<div className='flex bg-cover bg-center lg:w-1/2 lg:flex-auto'>
|
||||
<div className='lg:py-15 md:px-15 flex w-full flex-col items-center justify-center px-5 py-7'>
|
||||
<Link className='mb-0 flex flex-col items-center lg:mb-12' href='/'>
|
||||
<Image src={site.site_logo} height={48} width={48} alt='logo' />
|
||||
<Image src={site.site_logo} height={48} width={48} alt='logo' unoptimized />
|
||||
<span className='text-2xl font-semibold'>{site.site_name}</span>
|
||||
</Link>
|
||||
<LoginIcon className='mx-auto hidden w-[275px] md:w-1/2 lg:block xl:w-[500px]' />
|
||||
|
||||
@@ -14,7 +14,9 @@ export default function Header() {
|
||||
const { site } = common;
|
||||
const Logo = (
|
||||
<Link href='/' className='flex items-center gap-2 text-lg font-bold'>
|
||||
{site.site_logo && <Image src={site.site_logo} width={48} height={48} alt='logo' />}
|
||||
{site.site_logo && (
|
||||
<Image src={site.site_logo} width={48} height={48} alt='logo' unoptimized />
|
||||
)}
|
||||
<span>{site.site_name}</span>
|
||||
</Link>
|
||||
);
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
const config = [
|
||||
{
|
||||
requestLibPath: "import request from '@/utils/request';",
|
||||
schemaPath: 'https://swagger.ppanel.dev/common.json',
|
||||
schemaPath: 'https://docs.ppanel.dev/swagger/common.json',
|
||||
serversPath: './services',
|
||||
projectName: 'common',
|
||||
},
|
||||
{
|
||||
requestLibPath: "import request from '@/utils/request';",
|
||||
schemaPath: 'https://swagger.ppanel.dev/user.json',
|
||||
schemaPath: 'https://docs.ppanel.dev/swagger/user.json',
|
||||
serversPath: './services',
|
||||
projectName: 'user',
|
||||
},
|
||||
|
||||
Vendored
+9
-7
@@ -93,17 +93,18 @@ declare namespace API {
|
||||
id: number;
|
||||
orderNo: string;
|
||||
type: number;
|
||||
subscribe_id: number;
|
||||
subscribe: SubscribeInfo;
|
||||
quantity: number;
|
||||
price: number;
|
||||
amount: number;
|
||||
fee_amount: number;
|
||||
discount: number;
|
||||
coupon: string;
|
||||
reduction: number;
|
||||
trade_no: string;
|
||||
coupon_discount: number;
|
||||
method: string;
|
||||
fee_amount: number;
|
||||
trade_no: string;
|
||||
status: number;
|
||||
subscribe_id: number;
|
||||
subscribe: SubscribeInfo;
|
||||
created_at: number;
|
||||
};
|
||||
|
||||
@@ -122,9 +123,10 @@ declare namespace API {
|
||||
type PreOrderResponse = {
|
||||
price: number;
|
||||
amount: number;
|
||||
discount: number;
|
||||
coupon: string;
|
||||
coupon_discount: number;
|
||||
fee_amount: number;
|
||||
coupon: number;
|
||||
reduction: number;
|
||||
};
|
||||
|
||||
type PreRenewalOrderResponse = {
|
||||
|
||||
Reference in New Issue
Block a user