Skip to content

Commit 8e1fe6c

Browse files
committed
refactor: use cdn images
1 parent 42bafee commit 8e1fe6c

6 files changed

Lines changed: 24 additions & 24 deletions

File tree

src/mock/chat.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const mockData = [
1212
{
1313
userId: 1,
1414
name: 'Novlan',
15-
avatar: '/static/chat/avatar-Novlan.jpeg',
15+
avatar: 'https://cdn.uwayfly.com/tdesign-uniapp/starter/chat/avatar-Novlan.jpeg',
1616
messages: [
1717
{ messageId: 1, from: 1, content: '那明天准时见哦😊', time: 1690646400000, read: true },
1818
{ messageId: 2, from: 0, content: '好的,我会记得的', time: 1690646400000, read: true },
@@ -29,25 +29,25 @@ const mockData = [
2929
{
3030
userId: 2,
3131
name: 'Mollymolly',
32-
avatar: '/static/chat/avatar-Mollymolly.png',
32+
avatar: 'https://cdn.uwayfly.com/tdesign-uniapp/starter/chat/avatar-Mollymolly.png',
3333
messages: [{ messageId: 5, from: 1, content: '好久不见,最近咋样?', time: 1692100800000, read: true }],
3434
},
3535
{
3636
userId: 3,
3737
name: 'Andrew',
38-
avatar: '/static/chat/avatar-Andrew.png',
38+
avatar: 'https://cdn.uwayfly.com/tdesign-uniapp/starter/chat/avatar-Andrew.png',
3939
messages: [{ messageId: 6, from: 0, content: '现在没空,晚点再联系你哈', time: 1690084800000, read: true }],
4040
},
4141
{
4242
userId: 4,
4343
name: 'Kingdom',
44-
avatar: '/static/chat/avatar-Kingdom.png',
44+
avatar: 'https://cdn.uwayfly.com/tdesign-uniapp/starter/chat/avatar-Kingdom.png',
4545
messages: [{ messageId: 7, from: 1, content: '真的吗?', time: 1656880200000, read: true }],
4646
},
4747
{
4848
userId: 5,
4949
name: 'Paige',
50-
avatar: '/static/chat/avatar-Paige.png',
50+
avatar: 'https://cdn.uwayfly.com/tdesign-uniapp/starter/chat/avatar-Paige.png',
5151
messages: [
5252
{ messageId: 8, from: 1, content: '此次要评审的首页和专区页改版的交互方案', time: 1652963880000, read: true },
5353
],

src/mock/index.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,39 +9,39 @@ export function initMock() {
99
message: '请求成功',
1010
data: [
1111
{
12-
url: '/static/home/card0.png',
12+
url: 'https://cdn.uwayfly.com/tdesign-uniapp/starter/home/card0.png',
1313
desc: '少年,星空与梦想',
1414
tags: [
1515
{ text: 'AI绘画', theme: 'primary' },
1616
{ text: '版权素材', theme: 'success' },
1717
],
1818
},
1919
{
20-
url: '/static/home/card1.png',
20+
url: 'https://cdn.uwayfly.com/tdesign-uniapp/starter/home/card1.png',
2121
desc: '仰望星空的少女',
2222
tags: [
2323
{ text: 'AI绘画', theme: 'primary' },
2424
{ text: '版权素材', theme: 'success' },
2525
],
2626
},
2727
{
28-
url: '/static/home/card3.png',
28+
url: 'https://cdn.uwayfly.com/tdesign-uniapp/starter/home/card3.png',
2929
desc: '仰望星空的少年',
3030
tags: [
3131
{ text: 'AI绘画', theme: 'primary' },
3232
{ text: '版权素材', theme: 'success' },
3333
],
3434
},
3535
{
36-
url: '/static/home/card2.png',
36+
url: 'https://cdn.uwayfly.com/tdesign-uniapp/starter/home/card2.png',
3737
desc: '少年,星空与梦想',
3838
tags: [
3939
{ text: 'AI绘画', theme: 'primary' },
4040
{ text: '版权素材', theme: 'success' },
4141
],
4242
},
4343
{
44-
url: '/static/home/card4.png',
44+
url: 'https://cdn.uwayfly.com/tdesign-uniapp/starter/home/card4.png',
4545
desc: '多彩的天空',
4646
tags: [
4747
{ text: 'AI绘画', theme: 'primary' },
@@ -55,9 +55,9 @@ export function initMock() {
5555
code: 200,
5656
message: '请求成功',
5757
data: [
58-
{ image: '/static/home/swiper0.png' },
59-
{ image: '/static/home/card0.png' },
60-
{ image: '/static/home/card1.png' },
58+
{ image: 'https://cdn.uwayfly.com/tdesign-uniapp/starter/home/swiper0.png' },
59+
{ image: 'https://cdn.uwayfly.com/tdesign-uniapp/starter/home/card0.png' },
60+
{ image: 'https://cdn.uwayfly.com/tdesign-uniapp/starter/home/card1.png' },
6161
],
6262
};
6363

@@ -97,10 +97,10 @@ export function initMock() {
9797
code: 200,
9898
data: {
9999
service: [
100-
{ name: '帮助中心', image: '/static/icon_doc.png', url: '' },
101-
{ name: '官方地图', image: '/static/icon_map.png', url: '' },
102-
{ name: 'QQ群', image: '/static/icon_qq.png', url: '' },
103-
{ name: 'TDesign', image: '/static/icon_td.png', url: '' },
100+
{ name: '帮助中心', image: 'https://cdn.uwayfly.com/tdesign-uniapp/starter/icon_doc.png', url: '' },
101+
{ name: '官方地图', image: 'https://cdn.uwayfly.com/tdesign-uniapp/starter/icon_map.png', url: '' },
102+
{ name: 'QQ群', image: 'https://cdn.uwayfly.com/tdesign-uniapp/starter/icon_qq.png', url: '' },
103+
{ name: 'TDesign', image: 'https://cdn.uwayfly.com/tdesign-uniapp/starter/icon_td.png', url: '' },
104104
],
105105
},
106106
};
@@ -109,16 +109,16 @@ export function initMock() {
109109
code: 200,
110110
data: {
111111
name: 'TDesign',
112-
image: '/static/avatar.jpeg',
112+
image: 'https://cdn.uwayfly.com/tdesign-uniapp/starter/avatar.jpeg',
113113
star: 'Lv.5',
114114
city: '深圳',
115115
gender: 0,
116116
birth: '2020-01-01',
117117
address: ['440000', '440300'],
118118
introduction: 'TDesign 是腾讯各业务团队在服务业务过程中沉淀的一套企业级设计体系。',
119119
photos: [
120-
{ url: '/static/image1.png', name: 'image1.png', type: 'image' },
121-
{ url: '/static/image2.png', name: 'image2.png', type: 'image' },
120+
{ url: 'https://cdn.uwayfly.com/tdesign-uniapp/starter/image1.png', name: 'image1.png', type: 'image' },
121+
{ url: 'https://cdn.uwayfly.com/tdesign-uniapp/starter/image2.png', name: 'image2.png', type: 'image' },
122122
],
123123
},
124124
};

src/pages/chat/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ interface Message {
119119
read: boolean;
120120
}
121121
122-
const myAvatar = ref('/static/chat/avatar.png');
122+
const myAvatar = ref('https://cdn.uwayfly.com/tdesign-uniapp/starter/chat/avatar.png');
123123
const userId = ref<number | null>(null);
124124
const avatar = ref('');
125125
const name = ref('');

src/pages/my/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<view class="my">
44
<image
55
class="nav-bg"
6-
src="/static/bg_navbar.png"
6+
src="https://cdn.uwayfly.com/tdesign-uniapp/starter/bg_navbar.png"
77
/>
88
<Nav title-text="我的" />
99
<view class="my-info">

src/pages/release/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ import type { UploadFile } from '@tdesign/uniapp/upload/type.ts';
8383
import { navigateBack } from '@/utils/navigate';
8484
8585
const originFiles = ref<UploadFile[]>([
86-
{ url: '/static/image1.png', name: 'uploaded1.png', type: 'image', status: 'done' },
87-
{ url: '/static/image2.png', name: 'uploaded2.png', type: 'image', status: 'done' },
86+
{ url: 'https://cdn.uwayfly.com/tdesign-uniapp/starter/image1.png', name: 'uploaded1.png', type: 'image', status: 'done' },
87+
{ url: 'https://cdn.uwayfly.com/tdesign-uniapp/starter/image2.png', name: 'uploaded2.png', type: 'image', status: 'done' },
8888
]);
8989
9090
const gridConfig = ref({

src/static/logo.png

-3.93 KB
Binary file not shown.

0 commit comments

Comments
 (0)