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.

chore(share): add douban#1140

Merged
mydearxym merged 1 commit intodevfromadd-douban-to-share
Aug 8, 2021
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file addedpublic/icons/static/social/douban-share.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletionssrc/containers/tool/Share/Platforms.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -70,6 +70,12 @@ const medias = [
},
{
id: '7',
title: 'Douban',
logo: `${ICON}/social/douban-share.png`,
type: SHARE_TYPE.DOUBAN,
},
{
id: '8',
title: 'Facebook',
logo: `${ICON}/social/facebook-share.png`,
type: SHARE_TYPE.FACEBOOK,
Expand Down
1 change: 1 addition & 0 deletionssrc/containers/tool/Share/constant.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,6 +11,7 @@ export const OUTSIDE_SHARE_TYPE = {
TELEGRAM:'telegram',
// QQ: 'qq',
WEIBO:'weibo',
DOUBAN:'douban',
FACEBOOK:'facebook',
}

Expand Down
7 changes: 7 additions & 0 deletionssrc/containers/tool/Share/logic.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -28,6 +28,8 @@ type TShareParam = {
subject?: string
body?: string
u?: string
href?: string
name?: string
}
const openShareWindow = (platformUrl: string, param: TShareParam): void => {
const safeParam = []
Expand DownExpand Up@@ -70,6 +72,11 @@ export const toPlatform = (type: string): void => {
return openShareWindow('https://facebook.com/share.php', param)
}

case SHARE_TYPE.DOUBAN: {
const param = { href: url, name: title }
return openShareWindow('https://shuo.douban.com/!service/share', param)
}

case SHARE_TYPE.WEIBO: {
const param = { url, title }
return openShareWindow('https://service.weibo.com/share/share.php', param)
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp