new framwork

This commit is contained in:
archer
2023-06-09 12:57:42 +08:00
parent d9450bd7ee
commit ba9d9c3d5f
263 changed files with 12269 additions and 11599 deletions

17
client/src/utils/user.ts Normal file
View File

@@ -0,0 +1,17 @@
import { PRICE_SCALE } from '@/constants/common';
import { loginOut } from '@/api/user';
export const clearCookie = () => {
try {
loginOut();
} catch (error) {
error;
}
};
/**
* 把数据库读取到的price转化成元
*/
export const formatPrice = (val = 0, multiple = 1) => {
return Number(((val / PRICE_SCALE) * multiple).toFixed(10));
};