From 37b03a317f91c3069cf64dc0d76b6fdc0d19bd63 Mon Sep 17 00:00:00 2001 From: al Date: Fri, 27 Sep 2024 17:30:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E6=B6=88=E6=81=AF=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/images/exam.png | Bin 0 -> 1666 bytes assets/images/logo.png | Bin 0 -> 2054 bytes assets/images/star.png | Bin 0 -> 2132 bytes screeens/HomeTab/index.jsx | 4 +- screeens/NoticeDetail/NoticeNav/index.jsx | 513 ++++++++++++++-------- 5 files changed, 333 insertions(+), 184 deletions(-) create mode 100644 assets/images/exam.png create mode 100644 assets/images/logo.png create mode 100644 assets/images/star.png diff --git a/assets/images/exam.png b/assets/images/exam.png new file mode 100644 index 0000000000000000000000000000000000000000..9f922ffbdcf3913f4d3f5b4545f31176f5bed9df GIT binary patch literal 1666 zcmV-|27UR7P)uW80+1-`*3CqPj)Q5GI#@G6#xlucF`DVwYeyDTDkNDctx0^kEg8nPlb3OG`f zMHa><@c0BwHgTAq?w9vdRb4#{QhItM&mzxmy8CtgeD&2=uYLw$j*T8Zdq8A=hPzzcvoZJKRDg%S zZ?2|ka!v><0?@EAzYefr_ciOEK|Z3j)@Qv-sA2Tr!2u7pEqkFuJUi>w2K@efv%Po+ zUZc}j$);yn`PL?&^I1#aY6$RgU8ct^ftuE8(K#bnrXnY~py2;`0hAL)7l?y$z(U?7 zO+ok4oQ|NO)dD>H?a>nk&}INAV5k5EBNQqq25MmW(&s|&a$z9}sFR(4-hl>I3osV& zSOMk*v#YE+Q2Z{y*e8rr37q7Tw1H{B9cW;+!Wvh2-$enDt;ttg;#l=sCI-hM*GEa= zzgdR+(7@`&;f(INXeAI3d`M87hFu_{iy0J#w0Z11tUv>+1(+qF)e2Zd2im`by(vZ# z(BMOxh(exFd2Tqj)?;`C19S{|hB2CZ$l(z!C}z`y*9IC`x`GB)FRbNosiS_xKxO3T zjM2S&pGJofW9Fy^BZinuL-}rL2r_&F4XhU6Jckoz84Lt7nKNk$TI7P>r*{D@(Zhg~ z=F#*7$I!rP0lt$g9y7ozMQ^|Z z?@+o}n4^rBK72<9Qr;|0vnrUooV!~7L@J8CR838+MjZ8w1oixZfkHQF`vLYK9?pwDi%Tz=A38!`JZ zQ)|RH+Gww#~-*KBNtiA7c+IQ2|QzmrBg)gcu97Bv#(i4Pk zmeEP8`?A)q`BuQg?#AjOB>SwujycO6u&Z9(7&gE(>7xtB=$4&+k?*T1+&0CplFJgS zM*{kAfoc8(zx(waj02``J8fEQz2-d2A**d`Yu#k4P^H%RBH1oT3($9eIg|O#MW`u~ho!PSfl_d- zvE(*8V!285vm|fFh$kloT>;G7^$t2@VOQpdv&IzU36Q1BjZNOc4ZsENRQU{p}?o1JENoC0Q^QSG$z9Y zK;?X_pS@lYqH-x}0N!Y3=s!-kfIs5TFLx#a*0dWNtK7QBP~`*p1l&#~wZ(3&B(F(y zS6|_(WR2>#qT0+PL6>k z{d^uf6Bc-P4#A4G-QuTW0(c(5njxPsjakCZUB3D-e>Q;8Xm8y4FJsf#{fEGoWdHyG M07*qoM6N<$f*TteWB>pF literal 0 HcmV?d00001 diff --git a/assets/images/logo.png b/assets/images/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..6f19da23fb31044d0aecef48582ce5c2fb46e360 GIT binary patch literal 2054 zcmV+h2>JJkP)7wAe$VtgkZLSkY9Q8v0T#xYU?#)LNh0kp=1LqJa)3%Cf`C1dL2A2{BSE36y8&_?_oH=gv$Yv`zSuJNKT)J@XFaS(Z}Q`NsG);SvFgUXXGThhfwu|zZpi$hBgEX?Y ziUrWTVCC-5*)q`=P1nFY6Dh;tbPg%xGVS+$s-4&Y)@fPWNym0q=EKqytn3?T$IZ5r zJfmnt9CEAyxcWW|#z*)1MTrAJhD&;${RFpVjyJ3HG)dbC z#@(}|A-U^^BIe_)>^)fGo)fV_G}2Q9#sW0f!9dg$>S~6Q4Y^HK+{G3e*%<{A9~88n z3U#`Y(Hx+T0sV274@z=`{ zSh?qL0kia%m0olA^f5=+%}-!Xnqe*<`Wcv+(ZHDCxr#cKFdI8d$6nit;4LuF z{d!R+j;xDO*NzwF2db!*6M? zMcFsj?v^$>OH_noABljYc0Zku0NbC#f~m8O=Rd<-z6WgE%m7>B@!uzbA1|`H+(xP@ zoj^eNBP7utxRG>6 zkw{jUy4Kq7IIf0ztJ{wnu+gN|PVPbP%Ev*Fo0j zDvk=fkXrEc71rPDSQ06q2U$wjW&?ko%ShF!0zb~mQ4d!C&SJ2xuyYRC>9Q;EM*e(o zb-2ta;inUPzX$76)kVI@l(x@@+@wm!yUGz*I=-XK6UsKrp)~9AN)8_&uCfFF`XUxZ ziksj63w&}}VyfnVkmsV;SwS{MwTz>|aGA6Q+x1J4Gp@0QwSHKks$ij1<3-N?ONIGC zo@TdqX4?4Ds1CFFGC;`IUgln<;m0>M1gin>{`Dk-c|)I))NFa957jc~1n#3z!5kah-{|$}{?y&&Xty z*>|oo{ZsetMiM89IVxPco;hKJUt4d6PZo#Q4WvX z2%XxHY|61n^oc!^^5wW{oTuTAEoeY>$47MRl?tmtzmFa=OvJ&>XCW6|9Tn!I{(vsA>0ai2lh~_)QLK?$>B}_}n1h=9 z0m5~e_W-(Wbj!MBUtl^TB6r3rGG|%#@~4lm60m1!64PwQY)lb4q4ZCe7Z$5UPoW&?Yx66exh^#h~2vM-d{|!yhWL&+W068lLuL+>*8O z=qs}CNO0)la)hXi k+1hy)P=$_ml(7W*A8wV5;6{w`&Hw-a07*qoM6N<$f^<#kC;$Ke literal 0 HcmV?d00001 diff --git a/assets/images/star.png b/assets/images/star.png new file mode 100644 index 0000000000000000000000000000000000000000..20729ff0e8a399fdd88f4f956a56c49b68ebca01 GIT binary patch literal 2132 zcmV-a2&?yrP)y*%XsMI z7EF-}m;x!_;vBPU1Js%TB8z$xu(k;MYUg76ZYa>o^^?KsR6xV+GaUv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w`(-v*WvY>5TuZQJKzq45E-UDwsZUS#()6v+%Q`rLggI z9(7rdy)rJPs8HQT6(SBvB_^Y>pn39Eh?B+a0DVGzhgkMQY#D(D%fG>L=#Xxj9Jnr2 z!KQP3K}TUi8VUM`t1s(i4EP}+XsQqHHR7VAo`R*c@m=+`gr3ODq7!;T50u@BNdLz7 ze=W9Pub_$g3)yypxwZsS0jE<9JotlInBNy^(&=LFNnQgBtlxGMcAg0@^Vmes^v0AdC8kP_|NjnJ1+Ay@sat4ojeK zvcSIPx-A|$&yr>yViPGRwB=#CBG5yJ9zL`KJ;bjK*bQj8!pf3kPxxa#$y1|(NYhJ<+KcISM#?N* z#AhC@f3kKXK99|Q+Wz+H^F97KW{KjjUIIR3iyb<_5RMHnI~wA@Gxb$Al&xr3dIO>E z&ZH9bOtNupyL|Z3`loB7CV6c3lQY-K{$b{IzB1sD3{bCxg9NZ1_uGImG%__^zjpjs ztyX*mRa8!S5r3>aIrI4<{7*XDf3}SUogzQMimM|%t%%Ee0zdm^91k4VVV#aQnJEM3 zi^u4(SXu { @@ -36,22 +39,23 @@ export default function Message({ navigation }) { body: JSON.stringify(body), } ); - const detailResponse = await fetch( - `${apiUrl}/api/contact_customer_service_session/list_by_mid?signature=${signature}`, - { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify({ - ...base, - mid: base.b_mid, - }), - } - ); - const detailData = await detailResponse.json(); - console.log(detailData); - const session_id = detailData.data.session.id; + // const detailResponse = await fetch( + // `${apiUrl}/api/contact_customer_service_session/list_by_mid?signature=${signature}`, + // { + // method: "POST", + // headers: { + // "Content-Type": "application/json", + // }, + // body: JSON.stringify({ + // ...base, + // mid: base.b_mid, + // }), + // } + // ); + // console.log("xxxx", detailResponse); + // const detailData = await detailResponse.json(); + // console.log(detailData); + // const session_id = detailData.data.session.id; // const message_response = await fetch( // `${apiUrl}/api/contact_customer_service/query_unread_num?signature=${signature}`, // { @@ -63,7 +67,9 @@ export default function Message({ navigation }) { // } // ); // console.log(JSON.stringify({ ...base, session_id })); + console.log("cccc", notice_response); const notice_data = await notice_response.json(); + console.log("xxxx", notice_data); // const message_data = await message_response.json(); // const _data = await _response.json(); // if (_data.ret === -1) { @@ -80,216 +86,359 @@ export default function Message({ navigation }) { console.error(error); } }; + const fadeAnimOne = useRef(new Animated.Value(-44)).current; + const fadeAnimTwo = useRef(new Animated.Value(8)).current; + const fadeAnimThree = useRef(new Animated.Value(20)).current; + const fadeAnimFour = useRef(new Animated.Value(50)).current; + const fadeAnimUpBtn = useRef(new Animated.Value(0)).current; + const fadeAnimShadow = useRef(new Animated.Value(0.8)).current; + const fadeAnimShadowTwo = useRef(new Animated.Value(0.5)).current; + const fadeIn = (object, toValue) => { + // Will change fadeAnim value to 1 in 5 seconds + Animated.timing(object, { + toValue, + duration: 400, + useNativeDriver: true, + }).start(); + }; + const fadeInBack = (object, toValue) => { + // Will change fadeAnim value to 1 in 5 seconds + Animated.timing(object, { + toValue, + duration: 400, + useNativeDriver: true, + }).start(); + }; return ( {/* 广告轮播 */} + {/* 搜索清楚 */} + + navigation.navigate("Search")} + > + + 搜索Ta的昵称或id + + + + + + + {/* 官方消息 */} - navigation.navigate("SystemNotice")} + - - - - - - - - 系统通知 - - - 官方 - - - - 官方消息通知 - - - + + 官方消息 + + { + fadeInBack(fadeAnimFour, 50); + fadeInBack(fadeAnimThree, 20); + fadeInBack(fadeAnimTwo, 8); + fadeInBack(fadeAnimOne, -44); + fadeInBack(fadeAnimUpBtn, 0); + fadeInBack(fadeAnimShadow, 0.8); + fadeInBack(fadeAnimShadowTwo, 0.5); + setOpenNotices(false); + }} style={{ - ...tailwind("w-12 flex flex-col items-start"), - width: 60, + ...tailwind("flex justify-center py-1 px-4 rounded-full mb-2"), + backgroundColor: "#FF669E1a", }} > - - 11:00 - - - - - - navigation.navigate("ActiveNotice")} - style={{ - ...tailwind("flex flex-row items-center py-4 rounded-xl"), - backgroundColor: "#ffffff1a", - }} - > - - + + + + - - - - 活动消息 - - + + navigation.navigate("SystemNotice")} style={{ - ...tailwind("font-medium mr-2 px-1 rounded-full"), - backgroundColor: "#ffffff6d", + ...tailwind("relative"), }} > - 官方 - - - - 展示相关活动推送信息 - + navigation.navigate("SystemNotice")} + /> + + + + + + + - + + + + navigation.navigate("SystemNotice")} > - - 11:00 - - {/* navigation.navigate("SystemNotice")} + /> + - - 99 - - */} - - - - - - {/* 私聊消息 */} - - - navigation.navigate("MessageDetail", { - mid: 1, - }) - } + + + + + + + - - - - - - - - 铁粉空间官网 - - - 官方客服 - - - - 请回复您的相关消息 - - - + { + if (!openNotices) { + fadeIn(fadeAnimFour, 214); + fadeIn(fadeAnimThree, 184); + fadeIn(fadeAnimTwo, 114); + fadeIn(fadeAnimOne, 0); + fadeIn(fadeAnimUpBtn, 1); + fadeIn(fadeAnimShadow, 0); + fadeIn(fadeAnimShadowTwo, 0); + setOpenNotices(true); + } else { + navigation.navigate("SystemNotice"); + } }} > - - 11:00 - - navigation.navigate("SystemNotice")} /> - - - + + + + {/* 私聊消息 */} + + + navigation.navigate("SystemNotice")} + /> + + ); } + +const MessageItem = ({ + title, + newestContent, + time, + count, + backgroundColor, + paddingVertical, + navigation, + badge, + icon, +}) => { + const tailwind = useTailwind(); + return ( + + + + + + + + + {title} + + {badge && ( + + {badge} + + )} + + + {newestContent} + + + + + {time} + + + + + + ); +};