Browse Source

new font and card style

master 1.6.0
OhYee 7 months ago
parent
commit
9866002233
  1. 6
      components/card/card.module.scss
  2. 36
      styles/global.scss
  3. 2
      styles/theme.scss
  4. 7
      utils/request.ts

6
components/card/card.module.scss

@ -1,7 +1,11 @@ @@ -1,7 +1,11 @@
.card {
// 据说加个圆角会好一点
border-radius: 3px;
border-radius: 20px;
.main {
padding: 20px;
}
:global(.image-container), :global(.image) {
border-radius:20px 20px 0 0 !important;
}
}

36
styles/global.scss

@ -1,4 +1,38 @@ @@ -1,4 +1,38 @@
:root {
@font-face {
font-family: 'shetumodengxiaofangti';
font-display: swap;
src: url('//static.oyohyee.com/font/shetumodengxiaofangti.woff') format('woff');
font-weight: normal;
font-style: normal;
}
// bitter 英文字体
@font-face {
font-family: 'bitter';
font-display: swap;
src: url('https://cdn.jsdelivr.net/gh/OhYee/cdn@master/font/bitter.woff') format('woff');
}
// 鸿蒙字体
@font-face {
font-family: 'harmony';
font-display: swap;
src: url('https://cdn.jsdelivr.net/gh/OhYee/cdn@master/font/harmony.woff2') format('woff2');
}
// 阿里巴巴普惠体
@font-face {
font-family: 'alibabapuhuiti';
font-display: swap;
src: url('//at.alicdn.com/t/webfont_6u7eiz3v8pq.eot'); /* IE9*/
src: url('//at.alicdn.com/t/webfont_6u7eiz3v8pq.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('//at.alicdn.com/t/webfont_6u7eiz3v8pq.woff2') format('woff2'),
url('//at.alicdn.com/t/webfont_6u7eiz3v8pq.woff') format('woff'), /* chromefirefox */
url('//at.alicdn.com/t/webfont_6u7eiz3v8pq.ttf') format('truetype'), /* chromefirefoxoperaSafari, Android, iOS 4.2+*/
url('//at.alicdn.com/t/webfont_6u7eiz3v8pq.svg#Alibaba-PuHuiTi-Regular') format('svg'); /* iOS 4.1- */
}
:root, body {
font-size: 15px;
font-family: var(--default-font);
tab-size: 4;

2
styles/theme.scss

@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
--transition-time: 0.25s ease-in-out 0.1s; // 动画时间
--transition: all var(--transition-time); // 动画配置
--default-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
--default-font: bitter, harmony, alibabapuhuiti, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Apple Color Emoji',
'Segoe UI Emoji', 'Segoe UI Symbol';
--code-font: 'Lucida Console', Consolas, 'Courier', monospace, 'SFMono-Regular', 'Liberation Mono',

7
utils/request.ts

@ -5,7 +5,9 @@ import { env } from 'process'; @@ -5,7 +5,9 @@ import { env } from 'process';
// 超时时间 15 秒
axios.defaults.timeout = 15 * 1000;
const backendURI = !!process.env["backendURI"] ? process.env["backendURI"]: 'http://127.0.0.1:50000'
export const backendURI = !!process.env['backendURI']
? process.env['backendURI']
: 'http://127.0.0.1:50000';
function parseURL(url: string): string {
return (url.length > 0 && url[0] !== '/') || typeof document !== 'undefined'
@ -53,6 +55,7 @@ export const request = async <T>( @@ -53,6 +55,7 @@ export const request = async <T>(
url: parseURL(url),
params: method === 'get' ? data : undefined,
data: method === 'post' ? data : undefined,
withCredentials: true,
});
} catch (e) {
console.log(e);
@ -63,7 +66,7 @@ export const request = async <T>( @@ -63,7 +66,7 @@ export const request = async <T>(
}
}
if (callback) {
if (!!callback) {
callback(r.data);
}
return r.data;

Loading…
Cancel
Save