Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commite6e7aaf

Browse files
authored
chore(share): add douban (#1140)
1 parentac51ebf commite6e7aaf

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed
10.1 KB
Loading

‎src/containers/tool/Share/Platforms.tsx‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ const medias = [
7070
},
7171
{
7272
id:'7',
73+
title:'Douban',
74+
logo:`${ICON}/social/douban-share.png`,
75+
type:SHARE_TYPE.DOUBAN,
76+
},
77+
{
78+
id:'8',
7379
title:'Facebook',
7480
logo:`${ICON}/social/facebook-share.png`,
7581
type:SHARE_TYPE.FACEBOOK,

‎src/containers/tool/Share/constant.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export const OUTSIDE_SHARE_TYPE = {
1111
TELEGRAM:'telegram',
1212
// QQ: 'qq',
1313
WEIBO:'weibo',
14+
DOUBAN:'douban',
1415
FACEBOOK:'facebook',
1516
}
1617

‎src/containers/tool/Share/logic.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ type TShareParam = {
2828
subject?:string
2929
body?:string
3030
u?:string
31+
href?:string
32+
name?:string
3133
}
3234
constopenShareWindow=(platformUrl:string,param:TShareParam):void=>{
3335
constsafeParam=[]
@@ -70,6 +72,11 @@ export const toPlatform = (type: string): void => {
7072
returnopenShareWindow('https://facebook.com/share.php',param)
7173
}
7274

75+
caseSHARE_TYPE.DOUBAN:{
76+
constparam={href:url,name:title}
77+
returnopenShareWindow('https://shuo.douban.com/!service/share',param)
78+
}
79+
7380
caseSHARE_TYPE.WEIBO:{
7481
constparam={ url, title}
7582
returnopenShareWindow('https://service.weibo.com/share/share.php',param)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp