n
This commit is contained in:
@@ -24,6 +24,7 @@ const ActivityDetail = () => {
|
||||
const headerBg = useTransform(scrollY, [0, 60], ['rgba(255,255,255,0)', 'rgba(255,255,255,1)']);
|
||||
const headerShadow = useTransform(scrollY, [0, 60], ['none', '0 2px 8px rgba(0,0,0,0.1)']);
|
||||
const headerColor = useTransform(scrollY, [0, 60], ['rgba(255,255,255,1)', 'rgba(0,0,0,0.85)']);
|
||||
const titleOpacity = useTransform(scrollY, [100, 200], [0, 1]);
|
||||
|
||||
const { data: activity, isLoading, error } = useQuery({
|
||||
queryKey: ['activity', id],
|
||||
@@ -140,7 +141,7 @@ const ActivityDetail = () => {
|
||||
<ArrowLeftOutlined />
|
||||
</motion.div>
|
||||
<motion.div
|
||||
style={{ color: headerColor, fontWeight: 600, opacity: useTransform(scrollY, [100, 200], [0, 1]) }}
|
||||
style={{ color: headerColor, fontWeight: 600, opacity: titleOpacity }}
|
||||
>
|
||||
{activity.title}
|
||||
</motion.div>
|
||||
@@ -222,6 +223,15 @@ const ActivityDetail = () => {
|
||||
{signUpMutation.isPending ? '提交中...' : activity.is_signed_up ? '已报名' : '立即报名'}
|
||||
</motion.button>
|
||||
</div>
|
||||
|
||||
<LoginModal
|
||||
visible={loginVisible}
|
||||
onClose={() => setLoginVisible(false)}
|
||||
onLoginSuccess={(userData) => {
|
||||
login(userData);
|
||||
// Auto trigger signup after login if needed, or just let user click again
|
||||
}}
|
||||
/>
|
||||
</motion.div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -32,13 +32,6 @@ const config = {
|
||||
enable: false // Disable cache to fix prebundle error
|
||||
},
|
||||
mini: {
|
||||
webpackChain(chain) {
|
||||
chain.module
|
||||
.rule('script')
|
||||
.include
|
||||
.add(path.resolve('src'))
|
||||
.add(path.resolve('node_modules/marked'))
|
||||
},
|
||||
postcss: {
|
||||
pxtransform: {
|
||||
enable: true,
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
"@tarojs/runtime": "3.6.20",
|
||||
"@tarojs/shared": "3.6.20",
|
||||
"@tarojs/taro": "3.6.20",
|
||||
"marked": "^4.3.0",
|
||||
"marked": "^4.0.18",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0",
|
||||
"taro-ui": "^3.0.0-alpha.10"
|
||||
|
||||
Reference in New Issue
Block a user