Skip to content

Commit

Permalink
feat(guide): 新增复制教秘通讯录逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
eleliauk committed Dec 11, 2024
1 parent 3f417ba commit 08ab7b1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
17 changes: 16 additions & 1 deletion src/modules/guide/components/Contact.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
import { Text, View } from '@tarojs/components';
import Taro from '@tarojs/taro';
import { memo } from 'react';
import { AtIcon } from 'taro-ui';

const Contact: React.FC = memo(() => {
const handleCopy = () => {
void Taro.setClipboardData({
data: 'https://jwc.ccnu.edu.cn/info/1048/9828.htm',
success: () => {
void Taro.showToast({
title: '已复制链接',
icon: 'success',
});
},
});
};
return (
<View className="fixed bottom-[16vh] right-8 flex flex-col items-center gap-2">
<View
className="fixed bottom-[16vh] right-8 flex flex-col items-center gap-2"
onClick={handleCopy}
>
<View className="flex aspect-square w-14 items-center justify-center rounded-full bg-[#f9f9f2] shadow-xl">
<AtIcon value="mail" size={30} color="#f18900" />
</View>
Expand Down
1 change: 0 additions & 1 deletion src/modules/guide/components/Guide.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const Guide: React.FC = memo(() => {
term: '全部',
});
const [isOpen, setIsOpen] = useState(false);

return (
<View className="flex h-[87vh] w-full flex-col items-center gap-4">
<Selector
Expand Down
1 change: 0 additions & 1 deletion src/modules/login/components/Popper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const Popper: React.FC<{ onClose: () => void }> = memo(({ onClose }) => (
const Content: React.FC<{ onClose: () => void }> = memo(({ onClose }) => (
<>
<View className="mx-auto max-w-3xl rounded-md bg-white p-4 shadow-md">
{/* 头部区域 */}
<View className="relative mb-4 flex w-full items-center justify-center">
<Text
className="absolute right-0 m-1 border-none bg-transparent p-2 text-2xl font-bold text-gray-500 focus:outline-none"
Expand Down

0 comments on commit 08ab7b1

Please sign in to comment.