Skip to content

Commit cc2f311

Browse files
committed
增加财联社电报
1 parent 5a92e3c commit cc2f311

16 files changed

+174
-86
lines changed

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@widget-js/hotspot",
33
"type": "module",
4-
"version": "1.4.0",
4+
"version": "1.5.0",
55
"private": true,
66
"author": "Widget JS",
77
"license": "MIT",
@@ -18,8 +18,8 @@
1818
},
1919
"dependencies": {
2020
"@vueuse/core": "^12.4.0",
21-
"@widget-js/core": "^24.1.1-beta.44",
22-
"@widget-js/vue3": "^24.1.1-beta.48",
21+
"@widget-js/core": "^24.1.1-beta.58",
22+
"@widget-js/vue3": "^24.1.1-beta.49",
2323
"axios": "^1.1.3",
2424
"color": "^4.2.3",
2525
"colorthief": "^2.4.0",
@@ -40,7 +40,7 @@
4040
"@vue/cli-service": "~5.0.0",
4141
"@vue/compiler-sfc": "^3.2.45",
4242
"@vueuse/shared": "^10.1.2",
43-
"@widget-js/cli": "^24.1.1-beta.40",
43+
"@widget-js/cli": "^24.1.1-beta.43",
4444
"@widget-js/vite-plugin-widget": "^24.1.1-beta.41",
4545
"css-loader": "^6.7.2",
4646
"eslint": "8.48.0",
@@ -53,6 +53,7 @@
5353
"style-loader": "^3.3.1",
5454
"tsconfig-paths-webpack-plugin": "^4.0.0",
5555
"typescript": "^5.2.2",
56+
"unocss": "^66.1.1",
5657
"unplugin-auto-import": "^0.11.5",
5758
"unplugin-vue-components": "^0.22.11",
5859
"vite": "^5.2.8",

public/cn.widgetjs.widgets.hotspot.json

Lines changed: 23 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cn.widgetjs.widgets.hotspot",
3-
"version": "1.4.0",
3+
"version": "1.5.0",
44
"author": "Neo Fu",
55
"homepage": "https://widgetjs.cn",
66
"title": {
@@ -22,12 +22,12 @@
2222
"url": "",
2323
"widgets": [
2424
{
25-
"name": "cn.widgetjs.widgets.hotspot.zhihu",
25+
"name": "ccn.widgetjs.widgets.hotspot.weibo",
2626
"title": {
27-
"zh-CN": "知乎"
27+
"zh-CN": "微博热搜"
2828
},
2929
"description": {
30-
"zh-CN": "知乎热榜与日报"
30+
"zh-CN": "微博热搜"
3131
},
3232
"keywords": [
3333
"recommend"
@@ -39,23 +39,23 @@
3939
"height": 3,
4040
"maxWidth": 6,
4141
"webviewTag": false,
42-
"maxHeight": 4,
42+
"maxHeight": 6,
4343
"minWidth": 4,
4444
"minHeight": 3,
4545
"movable": true,
4646
"singleton": false,
4747
"resizable": true,
48-
"path": "/widget/zhihu",
48+
"path": "/widget/weibo",
4949
"meta": {},
5050
"backgroundThrottling": true,
51-
"previewImage": "/images/preview_zhihu.png",
51+
"previewImage": "/images/weibo_hot_search.png",
5252
"categories": [
5353
"news"
5454
],
5555
"supportDeployMode": 17,
5656
"routes": [
5757
{
58-
"url": "/widget/zhihu",
58+
"url": "/widget/weibo",
5959
"name": "index"
6060
}
6161
],
@@ -67,12 +67,12 @@
6767
]
6868
},
6969
{
70-
"name": "ccn.widgetjs.widgets.hotspot.weibo",
70+
"name": "cn.widgetjs.widgets.hotspot.douyin",
7171
"title": {
72-
"zh-CN": "微博热搜"
72+
"zh-CN": "抖音热榜"
7373
},
7474
"description": {
75-
"zh-CN": "微博热搜"
75+
"zh-CN": "抖音热榜"
7676
},
7777
"keywords": [
7878
"recommend"
@@ -90,17 +90,17 @@
9090
"movable": true,
9191
"singleton": false,
9292
"resizable": true,
93-
"path": "/widget/weibo",
93+
"path": "/widget/douyin",
9494
"meta": {},
9595
"backgroundThrottling": true,
96-
"previewImage": "/images/weibo_hot_search.png",
96+
"previewImage": "/images/preview_douyin.png",
9797
"categories": [
9898
"news"
9999
],
100100
"supportDeployMode": 17,
101101
"routes": [
102102
{
103-
"url": "/widget/weibo",
103+
"url": "/widget/douyin",
104104
"name": "index"
105105
}
106106
],
@@ -112,12 +112,12 @@
112112
]
113113
},
114114
{
115-
"name": "cn.widgetjs.widgets.hotspot.douyin",
115+
"name": "cn.widgetjs.widgets.hotspot.cls_telegraph",
116116
"title": {
117-
"zh-CN": "抖音热榜"
117+
"zh-CN": "财联社电报"
118118
},
119119
"description": {
120-
"zh-CN": "抖音热榜"
120+
"zh-CN": "每5分钟刷新一次"
121121
},
122122
"keywords": [
123123
"recommend"
@@ -126,35 +126,25 @@
126126
"permissions": [],
127127
"lang": "zh-CN",
128128
"width": 4,
129-
"height": 3,
129+
"height": 4,
130130
"maxWidth": 6,
131131
"webviewTag": false,
132132
"maxHeight": 6,
133133
"minWidth": 4,
134-
"minHeight": 3,
134+
"minHeight": 4,
135135
"movable": true,
136136
"singleton": false,
137137
"resizable": true,
138-
"path": "/widget/douyin",
138+
"path": "/widget/cls_telegraph",
139139
"meta": {},
140140
"backgroundThrottling": true,
141-
"previewImage": "/images/preview_douyin.png",
141+
"previewImage": "/images/preview_cls_telegraph.png",
142142
"categories": [
143+
"finance",
143144
"news"
144145
],
145146
"supportDeployMode": 17,
146-
"routes": [
147-
{
148-
"url": "/widget/douyin",
149-
"name": "index"
150-
}
151-
],
152-
"socialLinks": [
153-
{
154-
"name": "github",
155-
"link": "https://github.com/widget-js/hotspot"
156-
}
157-
]
147+
"routes": []
158148
},
159149
{
160150
"name": "cn.widgetjs.widgets.hotspot.bilibili_rcmd",
23.7 KB
Loading

public/widget.json

Lines changed: 23 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cn.widgetjs.widgets.hotspot",
3-
"version": "1.4.0",
3+
"version": "1.5.0",
44
"author": "Neo Fu",
55
"homepage": "https://widgetjs.cn",
66
"title": {
@@ -22,12 +22,12 @@
2222
"url": "",
2323
"widgets": [
2424
{
25-
"name": "cn.widgetjs.widgets.hotspot.zhihu",
25+
"name": "ccn.widgetjs.widgets.hotspot.weibo",
2626
"title": {
27-
"zh-CN": "知乎"
27+
"zh-CN": "微博热搜"
2828
},
2929
"description": {
30-
"zh-CN": "知乎热榜与日报"
30+
"zh-CN": "微博热搜"
3131
},
3232
"keywords": [
3333
"recommend"
@@ -39,23 +39,23 @@
3939
"height": 3,
4040
"maxWidth": 6,
4141
"webviewTag": false,
42-
"maxHeight": 4,
42+
"maxHeight": 6,
4343
"minWidth": 4,
4444
"minHeight": 3,
4545
"movable": true,
4646
"singleton": false,
4747
"resizable": true,
48-
"path": "/widget/zhihu",
48+
"path": "/widget/weibo",
4949
"meta": {},
5050
"backgroundThrottling": true,
51-
"previewImage": "/images/preview_zhihu.png",
51+
"previewImage": "/images/weibo_hot_search.png",
5252
"categories": [
5353
"news"
5454
],
5555
"supportDeployMode": 17,
5656
"routes": [
5757
{
58-
"url": "/widget/zhihu",
58+
"url": "/widget/weibo",
5959
"name": "index"
6060
}
6161
],
@@ -67,12 +67,12 @@
6767
]
6868
},
6969
{
70-
"name": "ccn.widgetjs.widgets.hotspot.weibo",
70+
"name": "cn.widgetjs.widgets.hotspot.douyin",
7171
"title": {
72-
"zh-CN": "微博热搜"
72+
"zh-CN": "抖音热榜"
7373
},
7474
"description": {
75-
"zh-CN": "微博热搜"
75+
"zh-CN": "抖音热榜"
7676
},
7777
"keywords": [
7878
"recommend"
@@ -90,17 +90,17 @@
9090
"movable": true,
9191
"singleton": false,
9292
"resizable": true,
93-
"path": "/widget/weibo",
93+
"path": "/widget/douyin",
9494
"meta": {},
9595
"backgroundThrottling": true,
96-
"previewImage": "/images/weibo_hot_search.png",
96+
"previewImage": "/images/preview_douyin.png",
9797
"categories": [
9898
"news"
9999
],
100100
"supportDeployMode": 17,
101101
"routes": [
102102
{
103-
"url": "/widget/weibo",
103+
"url": "/widget/douyin",
104104
"name": "index"
105105
}
106106
],
@@ -112,12 +112,12 @@
112112
]
113113
},
114114
{
115-
"name": "cn.widgetjs.widgets.hotspot.douyin",
115+
"name": "cn.widgetjs.widgets.hotspot.cls_telegraph",
116116
"title": {
117-
"zh-CN": "抖音热榜"
117+
"zh-CN": "财联社电报"
118118
},
119119
"description": {
120-
"zh-CN": "抖音热榜"
120+
"zh-CN": "每5分钟刷新一次"
121121
},
122122
"keywords": [
123123
"recommend"
@@ -126,35 +126,25 @@
126126
"permissions": [],
127127
"lang": "zh-CN",
128128
"width": 4,
129-
"height": 3,
129+
"height": 4,
130130
"maxWidth": 6,
131131
"webviewTag": false,
132132
"maxHeight": 6,
133133
"minWidth": 4,
134-
"minHeight": 3,
134+
"minHeight": 4,
135135
"movable": true,
136136
"singleton": false,
137137
"resizable": true,
138-
"path": "/widget/douyin",
138+
"path": "/widget/cls_telegraph",
139139
"meta": {},
140140
"backgroundThrottling": true,
141-
"previewImage": "/images/preview_douyin.png",
141+
"previewImage": "/images/preview_cls_telegraph.png",
142142
"categories": [
143+
"finance",
143144
"news"
144145
],
145146
"supportDeployMode": 17,
146-
"routes": [
147-
{
148-
"url": "/widget/douyin",
149-
"name": "index"
150-
}
151-
],
152-
"socialLinks": [
153-
{
154-
"name": "github",
155-
"link": "https://github.com/widget-js/hotspot"
156-
}
157-
]
147+
"routes": []
158148
},
159149
{
160150
"name": "cn.widgetjs.widgets.hotspot.bilibili_rcmd",

src/assets/icons/cls.png

1.75 KB
Loading

src/common/css/common.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,3 @@ button:active {
8181
display: flex;
8282
align-items: flex-end;
8383
}
84-
85-
.gap-1 {
86-
gap: 1rem;
87-
}
88-
89-
.gap-2 {
90-
gap: 2rem;
91-
}

src/main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import App from './App.vue'
55
import router from './router'
66
import '@widget-js/vue3/dist/style.css'
77
import 'dayjs/locale/zh-cn'
8+
import 'virtual:uno.css'
89

910
dayjs.locale('zh-cn')
1011
createApp(App).use(WidgetJsPlugin).use(router).mount('body')

src/utils/ClsUtils.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export class ClsUtils {
2+
private params = {
3+
appName: 'CailianpressWeb',
4+
os: 'web',
5+
sv: '7.7.5',
6+
}
7+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { Widget, WidgetKeyword } from '@widget-js/core'
2+
3+
const ClsTelegraphWidget = new Widget({
4+
name: '.cls_telegraph',
5+
title: { 'zh-CN': '财联社电报' },
6+
description: { 'zh-CN': '每5分钟刷新一次' },
7+
keywords: [WidgetKeyword.RECOMMEND],
8+
categories: ['finance', 'news'],
9+
lang: 'zh-CN',
10+
width: 4,
11+
height: 4,
12+
minWidth: 4,
13+
maxWidth: 6,
14+
minHeight: 4,
15+
maxHeight: 6,
16+
previewImage: '/images/preview_cls_telegraph.png',
17+
path: '/widget/cls_telegraph',
18+
configPagePath: undefined,
19+
})
20+
21+
export default ClsTelegraphWidget
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import type { RouteRecordRaw } from 'vue-router'
2+
import ClsTelegraphWidget from './ClsTelegraph.widget'
3+
4+
const path = ClsTelegraphWidget.path
5+
const name = ClsTelegraphWidget.name
6+
7+
const ClsTelegraphWidgetRoutes: RouteRecordRaw[] = [
8+
{
9+
path,
10+
name: `${name}`,
11+
component: () => import('./ClsTelegraphWidgetView.vue'),
12+
},
13+
]
14+
15+
export default ClsTelegraphWidgetRoutes

0 commit comments

Comments
 (0)