新增:优惠券、积分明细
This commit is contained in:
@@ -108,6 +108,20 @@ export function truncateText(text: string, maxLength: number = 30): string {
|
||||
return text.substring(0, maxLength);
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化货币
|
||||
* @param amount
|
||||
* @param currency
|
||||
*/
|
||||
export function formatCurrency(amount: number, currency: string = 'CNY'): string {
|
||||
return new Intl.NumberFormat('zh-CN', {
|
||||
style: 'currency',
|
||||
currency: currency,
|
||||
minimumFractionDigits: 2,
|
||||
maximumFractionDigits: 2
|
||||
}).format(amount);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成订单标题
|
||||
* @param goodsNames 商品名称数组
|
||||
|
||||
@@ -4,8 +4,8 @@ import {User} from "@/api/system/user/model";
|
||||
// 模版套餐ID - 请根据实际情况修改
|
||||
export const TEMPLATE_ID = '10550';
|
||||
// 服务接口 - 请根据实际情况修改
|
||||
export const SERVER_API_URL = 'https://server.websoft.top/api';
|
||||
// export const SERVER_API_URL = 'http://127.0.0.1:8000/api';
|
||||
// export const SERVER_API_URL = 'https://server.websoft.top/api';
|
||||
export const SERVER_API_URL = 'http://127.0.0.1:8000/api';
|
||||
/**
|
||||
* 保存用户信息到本地存储
|
||||
* @param token
|
||||
|
||||
Reference in New Issue
Block a user