index.tsx 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650
  1. import { Image } from 'expo-image';
  2. import { useRouter } from 'expo-router';
  3. import React, { useCallback, useEffect, useState } from 'react';
  4. import {
  5. ActivityIndicator,
  6. Alert,
  7. FlatList,
  8. ImageBackground,
  9. Platform,
  10. RefreshControl,
  11. ScrollView,
  12. StatusBar,
  13. StyleSheet,
  14. Text,
  15. TouchableOpacity,
  16. View
  17. } from 'react-native';
  18. import { useSafeAreaInsets } from 'react-native-safe-area-context';
  19. import { Images } from '@/constants/images';
  20. import {
  21. getStore,
  22. getTakeList,
  23. moveOutSafeStore,
  24. moveToSafeStore,
  25. } from '@/services/award';
  26. import CheckoutModal from './components/CheckoutModal';
  27. const LEVEL_MAP: Record<string, { title: string; color: string }> = {
  28. A: { title: '超神', color: '#ff0000' }, // 红色
  29. B: { title: '欧皇', color: '#ffae00' }, // 黄色
  30. C: { title: '隐藏', color: '#9745e6' },
  31. D: { title: '普通', color: '#666666' },
  32. SUBSTITUTE: { title: '置换款', color: '#666666' },
  33. OTHER: { title: '其他', color: '#666666' },
  34. };
  35. const LEVEL_TABS = [
  36. { title: '全部', value: '' },
  37. { title: '普通', value: 'D' },
  38. { title: '隐藏', value: 'C' },
  39. { title: '欧皇', value: 'B' },
  40. { title: '超神', value: 'A' },
  41. { title: '其他', value: 'OTHER' },
  42. ];
  43. const FROM_TYPE_MAP: Record<string, string> = {
  44. LUCK: '奖池', MALL: '商城', LUCK_ROOM: '福利房', LUCK_WHEEL: '魔天轮',
  45. DOLL_MACHINE: '扭蛋', ACTIVITY: '活动', SUBSTITUTE: '商品置换', TRANSFER: '商品转赠',
  46. DISTRIBUTION: '分销', LUCK_PICKUP: '商品提货', LUCK_EXCHANGE: '商品兑换',
  47. RECHARGE: '充值', WITHDRAW: '提现', OFFICIAL: '官方',
  48. LUCK_ACTIVITY: '奖池活动', CONSUMPTION_ACTIVITY: '消费活动',
  49. NEW_USER_RANK_ACTIVITY: '拉新排名活动', CONSUMPTION_RANK_ACTIVITY: '消费排行榜活动',
  50. WHEEL_ACTIVITY: '大转盘活动', TA_ACTIVITY: '勇者之塔活动',
  51. ISLAND_ACTIVITY: '海岛活动', REDEEM_CODE_ACTIVITY: '兑换码活动',
  52. };
  53. interface StoreItem {
  54. id: string;
  55. level: string;
  56. safeFlag: number;
  57. magicAmount?: number;
  58. fromRelationType: string;
  59. spu: { id: string; name: string; cover: string };
  60. }
  61. interface PickupItem {
  62. tradeNo: string;
  63. createTime: string;
  64. status: number;
  65. contactName: string;
  66. contactNo: string;
  67. province: string;
  68. city: string;
  69. district: string;
  70. address: string;
  71. expressAmount: number;
  72. paymentTime?: string;
  73. paymentTimeoutTime?: string;
  74. cancelRemark?: string;
  75. itemList: Array<{ id: string; spuId: string; level: string; cover: string }>;
  76. }
  77. const STATUS_MAP: Record<number, { text: string; color: string }> = {
  78. 0: { text: '待支付运费', color: '#ff6b00' },
  79. 1: { text: '已进仓库进行配货', color: '#ff6b00' },
  80. 2: { text: '待收货', color: '#ff6b00' },
  81. 10: { text: '已取消', color: '#ff6b00' },
  82. 11: { text: '超时取消', color: '#ff6b00' },
  83. 12: { text: '系统取消', color: '#ff6b00' },
  84. 99: { text: '已完成', color: '#52c41a' },
  85. };
  86. export default function StoreScreen() {
  87. const router = useRouter();
  88. const insets = useSafeAreaInsets();
  89. const [mainTabIndex, setMainTabIndex] = useState(0);
  90. const [levelTabIndex, setLevelTabIndex] = useState(0);
  91. const [list, setList] = useState<any[]>([]);
  92. const [loading, setLoading] = useState(false);
  93. const [refreshing, setRefreshing] = useState(false);
  94. const [page, setPage] = useState(1);
  95. const [hasMore, setHasMore] = useState(true);
  96. const [checkMap, setCheckMap] = useState<Record<string, StoreItem>>({});
  97. const [checkoutVisible, setCheckoutVisible] = useState(false);
  98. const mainTabs = ['未使用', '保险柜', '已提货'];
  99. const loadData = useCallback(async (pageNum: number, isRefresh = false) => {
  100. if (loading && !isRefresh) return;
  101. if (!hasMore && pageNum > 1 && !isRefresh) return;
  102. try {
  103. if (pageNum === 1) setLoading(true);
  104. let res: any;
  105. if (mainTabIndex === 0) {
  106. res = await getStore(pageNum, 20, 0, LEVEL_TABS[levelTabIndex].value);
  107. } else if (mainTabIndex === 1) {
  108. res = await getStore(pageNum, 20, 1);
  109. } else {
  110. res = await getTakeList(pageNum, 20);
  111. }
  112. let records = Array.isArray(res) ? res : (res?.records || res || []);
  113. // 处理已提货数据,合并相同商品
  114. if (mainTabIndex === 2 && records.length > 0) {
  115. records = records.map((item: PickupItem) => {
  116. const goodsMap: Record<string, { total: number; data: any }> = {};
  117. (item.itemList || []).forEach((goods: any) => {
  118. const key = `${goods.spuId}_${goods.level}`;
  119. if (goodsMap[key]) {
  120. goodsMap[key].total += 1;
  121. } else {
  122. goodsMap[key] = { total: 1, data: goods };
  123. }
  124. });
  125. return { ...item, groupedList: Object.values(goodsMap) };
  126. });
  127. }
  128. if (records.length < 20) setHasMore(false);
  129. if (pageNum === 1 || isRefresh) setList(records);
  130. else setList(prev => [...prev, ...records]);
  131. } catch (e) {
  132. console.error('加载仓库数据失败:', e);
  133. } finally {
  134. setLoading(false);
  135. setRefreshing(false);
  136. }
  137. }, [mainTabIndex, levelTabIndex, loading, hasMore]);
  138. useEffect(() => {
  139. setPage(1); setList([]); setHasMore(true); setCheckMap({});
  140. loadData(1, true);
  141. }, [mainTabIndex]);
  142. useEffect(() => {
  143. if (mainTabIndex === 0) {
  144. setPage(1); setList([]); setHasMore(true); setCheckMap({});
  145. loadData(1, true);
  146. }
  147. }, [levelTabIndex]);
  148. const handleRefresh = () => { setRefreshing(true); setPage(1); setHasMore(true); loadData(1, true); };
  149. const handleLoadMore = () => { if (!loading && hasMore) { const np = page + 1; setPage(np); loadData(np); } };
  150. const handleChoose = (item: StoreItem) => {
  151. if (item.safeFlag === 1 && mainTabIndex === 0) return;
  152. setCheckMap(prev => {
  153. const newMap = { ...prev };
  154. if (newMap[item.id]) delete newMap[item.id];
  155. else newMap[item.id] = item;
  156. return newMap;
  157. });
  158. };
  159. const handleLock = async (item: StoreItem, index: number) => {
  160. const res = await moveToSafeStore([item.id]);
  161. if (res) {
  162. const newList = [...list]; newList[index] = { ...item, safeFlag: 1 }; setList(newList);
  163. setCheckMap(prev => { const m = { ...prev }; delete m[item.id]; return m; });
  164. }
  165. };
  166. const handleUnlock = async (item: StoreItem, index: number) => {
  167. const res = await moveOutSafeStore([item.id]);
  168. if (res) {
  169. if (mainTabIndex === 1) setList(list.filter((_, i) => i !== index));
  170. else { const newList = [...list]; newList[index] = { ...item, safeFlag: 0 }; setList(newList); }
  171. }
  172. };
  173. const handleMoveOutAll = async () => {
  174. const selected = Object.values(checkMap);
  175. if (selected.length === 0) { showAlert('请至少选择一个商品!'); return; }
  176. const res = await moveOutSafeStore(selected.map(i => i.id));
  177. if (res) { setCheckMap({}); handleRefresh(); }
  178. };
  179. const handleTakeGoods = () => {
  180. const selected = Object.values(checkMap);
  181. if (selected.length === 0) { showAlert('请至少选择一个商品!'); return; }
  182. setCheckoutVisible(true);
  183. };
  184. const handleSelectAll = () => {
  185. const allSelected = list.every(item => checkMap[item.id]);
  186. if (allSelected) {
  187. setCheckMap({});
  188. } else {
  189. const newMap: Record<string, StoreItem> = {};
  190. list.forEach(item => {
  191. newMap[item.id] = item;
  192. });
  193. setCheckMap(newMap);
  194. }
  195. };
  196. const handleCheckoutSuccess = () => {
  197. setCheckoutVisible(false);
  198. setCheckMap({});
  199. handleRefresh();
  200. };
  201. const showAlert = (msg: string) => {
  202. if (Platform.OS === 'web') window.alert(msg);
  203. else Alert.alert('提示', msg);
  204. };
  205. const renderStoreItem = ({ item, index }: { item: StoreItem; index: number }) => {
  206. const levelInfo = LEVEL_MAP[item.level] || LEVEL_MAP.D;
  207. const isChecked = !!checkMap[item.id];
  208. const canSelect = mainTabIndex === 1 || item.safeFlag !== 1;
  209. return (
  210. <ImageBackground source={{ uri: Images.mine.storeItemBg }} style={styles.cell} resizeMode="stretch">
  211. <View style={styles.cellContent}>
  212. <TouchableOpacity style={styles.cellHeader} onPress={() => canSelect && handleChoose(item)}>
  213. <View style={styles.headerLeft}>
  214. {canSelect && (
  215. <View style={[styles.checkBox, isChecked && styles.checkBoxChecked]}>
  216. {isChecked && <Text style={styles.checkIcon}>✓</Text>}
  217. </View>
  218. )}
  219. <Text style={[styles.levelTitle, { color: levelInfo.color }]}>{levelInfo.title}</Text>
  220. </View>
  221. <TouchableOpacity style={styles.lockBox} onPress={() => item.safeFlag !== 1 ? handleLock(item, index) : handleUnlock(item, index)}>
  222. <Text style={styles.lockText}>{item.safeFlag !== 1 ? '锁定' : '解锁'}</Text>
  223. <Image source={{ uri: item.safeFlag !== 1 ? Images.mine.lock : Images.mine.unlock }} style={styles.lockIcon} />
  224. </TouchableOpacity>
  225. </TouchableOpacity>
  226. <View style={styles.cellBody}>
  227. <ImageBackground source={{ uri: Images.mine.storeGoodsImgBg }} style={styles.goodsImgBg}>
  228. <Image source={{ uri: item.spu?.cover }} style={styles.goodsImg} contentFit="contain" />
  229. </ImageBackground>
  230. <View style={styles.goodsInfo}>
  231. <Text style={styles.goodsName} numberOfLines={2}>{item.spu?.name}</Text>
  232. <Text style={styles.goodsSource}>从{FROM_TYPE_MAP[item.fromRelationType] || '其他'}获得</Text>
  233. </View>
  234. <Text style={styles.arrow}>{'>'}</Text>
  235. </View>
  236. </View>
  237. </ImageBackground>
  238. );
  239. };
  240. const copyToClipboard = (text: string) => {
  241. showAlert(`订单号已复制: ${text}`);
  242. };
  243. const showExpress = (item: PickupItem) => {
  244. router.push({ pathname: '/store/packages' as any, params: { tradeNo: item.tradeNo } });
  245. };
  246. const renderPickupItem = ({ item }: { item: PickupItem & { groupedList?: Array<{ total: number; data: any }> } }) => {
  247. const statusInfo = STATUS_MAP[item.status] || { text: '未知', color: '#999' };
  248. return (
  249. <ImageBackground source={{ uri: Images.mine.storeItemBg }} style={styles.pickupCell} resizeMode="stretch">
  250. {/* 顶部信息 */}
  251. <View style={styles.pickupTop}>
  252. <Text style={styles.pickupTime}>下单时间:{item.createTime}</Text>
  253. <Text style={[styles.pickupStatus, { color: statusInfo.color }]}>{statusInfo.text}</Text>
  254. </View>
  255. {item.status === 0 && item.paymentTimeoutTime && (
  256. <Text style={styles.pickupTimeout}>{item.paymentTimeoutTime} 将自动取消该订单,如有优惠券,将自动退回</Text>
  257. )}
  258. {/* 收货地址 */}
  259. <View style={styles.pickupAddress}>
  260. <Text style={styles.locationIcon}>📍</Text>
  261. <View style={styles.addressInfo}>
  262. <Text style={styles.addressName}>{item.contactName},{item.contactNo}</Text>
  263. <Text style={styles.addressDetail}>{item.province}{item.city}{item.district}{item.address}</Text>
  264. </View>
  265. </View>
  266. {/* 商品列表 */}
  267. <View style={styles.pickupGoodsBox}>
  268. <ScrollView horizontal showsHorizontalScrollIndicator={false} style={styles.pickupGoodsList}>
  269. {(item.groupedList || []).map((goods, idx) => (
  270. <View key={idx} style={styles.pickupGoodsItem}>
  271. <Image source={{ uri: goods.data.cover }} style={styles.pickupGoodsImg} contentFit="contain" />
  272. <View style={styles.pickupGoodsCount}>
  273. <Text style={styles.pickupGoodsCountText}>x{goods.total}</Text>
  274. </View>
  275. </View>
  276. ))}
  277. </ScrollView>
  278. </View>
  279. {/* 订单号 */}
  280. <View style={styles.pickupOrderRow}>
  281. <Text style={styles.pickupOrderLabel}>订单号:</Text>
  282. <Text style={styles.pickupOrderNo} numberOfLines={1}>{item.tradeNo}</Text>
  283. <TouchableOpacity style={styles.copyBtn} onPress={() => copyToClipboard(item.tradeNo)}>
  284. <Text style={styles.copyBtnText}>复制</Text>
  285. </TouchableOpacity>
  286. </View>
  287. {item.paymentTime && (
  288. <View style={styles.pickupInfoRow}>
  289. <Text style={styles.pickupInfoLabel}>付款时间:</Text>
  290. <Text style={styles.pickupInfoValue}>{item.paymentTime}</Text>
  291. </View>
  292. )}
  293. {item.status === 12 && item.cancelRemark && (
  294. <View style={styles.pickupInfoRow}>
  295. <Text style={styles.pickupInfoLabel}>备注</Text>
  296. <Text style={[styles.pickupInfoValue, { color: '#ff6b00' }]}>{item.cancelRemark}</Text>
  297. </View>
  298. )}
  299. {/* 底部操作 */}
  300. <View style={styles.pickupBottom}>
  301. <Text style={styles.pickupExpressAmount}>配送费:<Text style={styles.priceText}>¥{item.expressAmount}</Text></Text>
  302. {[1, 2, 99].includes(item.status) && (
  303. <TouchableOpacity style={styles.expressBtn} onPress={() => showExpress(item)}>
  304. <Text style={styles.expressBtnText}>物流信息</Text>
  305. </TouchableOpacity>
  306. )}
  307. </View>
  308. </ImageBackground>
  309. );
  310. };
  311. const selectedCount = Object.keys(checkMap).length;
  312. return (
  313. <View style={styles.container}>
  314. <StatusBar barStyle="light-content" />
  315. <ImageBackground source={{ uri: Images.mine.kaixinMineBg }} style={styles.background} resizeMode="cover">
  316. <Image source={{ uri: Images.mine.kaixinMineHeadBg }} style={styles.headerBg} contentFit="cover" />
  317. <View style={[styles.header, { paddingTop: insets.top }]}>
  318. <TouchableOpacity style={styles.backBtn} onPress={() => router.back()}>
  319. <Text style={styles.backIcon}>‹</Text>
  320. </TouchableOpacity>
  321. <Text style={styles.title}>仓库</Text>
  322. <View style={styles.placeholder} />
  323. </View>
  324. <View style={[styles.content, { paddingTop: insets.top + 50 }]}>
  325. <View style={styles.mainTabs}>
  326. {mainTabs.map((tab, index) => {
  327. const isActive = mainTabIndex === index;
  328. // Use Yellow L bg for active, Grey (Hui) for inactive
  329. const bg = isActive ? Images.common.butBgL : Images.common.butBgHui;
  330. return (
  331. <TouchableOpacity key={index} style={styles.mainTabItem} onPress={() => setMainTabIndex(index)}>
  332. <ImageBackground source={{ uri: bg }} style={styles.mainTabBg} resizeMode="contain">
  333. <Text style={isActive ? styles.mainTabTextActive : styles.mainTabText}>{tab}</Text>
  334. </ImageBackground>
  335. </TouchableOpacity>
  336. );
  337. })}
  338. </View>
  339. {mainTabIndex === 0 && (
  340. <View style={styles.levelTabs}>
  341. {LEVEL_TABS.map((tab, index) => {
  342. const isActive = levelTabIndex === index;
  343. return (
  344. <TouchableOpacity
  345. key={index}
  346. style={[styles.levelTabItem, isActive && styles.levelTabItemActive]}
  347. onPress={() => setLevelTabIndex(index)}
  348. >
  349. {isActive && <View style={styles.decorTL} />}
  350. <Text style={[styles.levelTabText, isActive && styles.levelTabTextActive]}>{tab.title}</Text>
  351. {isActive && <View style={styles.decorBR} />}
  352. </TouchableOpacity>
  353. );
  354. })}
  355. </View>
  356. )}
  357. <FlatList
  358. data={list as any[]}
  359. renderItem={mainTabIndex === 2 ? renderPickupItem as any : renderStoreItem as any}
  360. keyExtractor={(item: any, index) => item.id || item.tradeNo || index.toString()}
  361. contentContainerStyle={styles.listContent}
  362. refreshControl={<RefreshControl refreshing={refreshing} onRefresh={handleRefresh} tintColor="#fff" />}
  363. onEndReached={handleLoadMore}
  364. onEndReachedThreshold={0.3}
  365. ListHeaderComponent={mainTabIndex === 2 ? (
  366. <View style={styles.pickupTip}>
  367. <Text style={styles.pickupTipIcon}>⚠️</Text>
  368. <Text style={styles.pickupTipText}>您的包裹一般在5个工作日内发货,如遇特殊情况可能会有延迟,敬请谅解~</Text>
  369. </View>
  370. ) : null}
  371. ListFooterComponent={loading && list.length > 0 ? <ActivityIndicator color="#fff" style={{ marginVertical: 10 }} /> : null}
  372. ListEmptyComponent={!loading ? <View style={styles.emptyBox}><Text style={styles.emptyText}>暂无物品</Text></View> : null}
  373. />
  374. </View>
  375. {mainTabIndex !== 2 && list.length > 0 && (
  376. <View style={[styles.bottomBar, { paddingBottom: insets.bottom + 10 }]}>
  377. {mainTabIndex === 1 ? (
  378. <View style={styles.buttonRow}>
  379. <TouchableOpacity
  380. style={[styles.actionBtn, styles.selectAllBtn]}
  381. onPress={handleSelectAll}
  382. >
  383. <Text style={styles.selectAllText}>
  384. {list.length > 0 && list.every(item => checkMap[item.id]) ? '取消全选' : '全选'}
  385. </Text>
  386. </TouchableOpacity>
  387. <TouchableOpacity
  388. style={[styles.actionBtn, styles.removeBtn]}
  389. onPress={handleMoveOutAll}
  390. >
  391. <ImageBackground source={{ uri: Images.common.butBgL }} style={styles.btnBg} resizeMode="stretch">
  392. <Text style={styles.removeText}>移出保险柜</Text>
  393. </ImageBackground>
  394. </TouchableOpacity>
  395. </View>
  396. ) : (
  397. <TouchableOpacity style={styles.bottomBtn} onPress={handleTakeGoods}>
  398. <ImageBackground source={{ uri: Images.common.butBgL }} style={styles.bottomBtnBg} resizeMode="stretch">
  399. <Text style={styles.bottomBtnText}>立即提货</Text>
  400. </ImageBackground>
  401. </TouchableOpacity>
  402. )}
  403. <Text style={styles.bottomInfoText}>已选 <Text style={styles.bottomInfoCount}>{selectedCount}</Text> 件商品</Text>
  404. </View>
  405. )}
  406. {/* 提货弹窗 */}
  407. <CheckoutModal
  408. visible={checkoutVisible}
  409. selectedItems={Object.values(checkMap)}
  410. onClose={() => setCheckoutVisible(false)}
  411. onSuccess={handleCheckoutSuccess}
  412. />
  413. </ImageBackground>
  414. </View>
  415. );
  416. }
  417. const styles = StyleSheet.create({
  418. container: { flex: 1, backgroundColor: '#1a1a2e' },
  419. background: { flex: 1 },
  420. headerBg: { position: 'absolute', top: 0, left: 0, width: '100%', height: 160 },
  421. header: { position: 'absolute', top: 0, left: 0, right: 0, zIndex: 100, flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', paddingHorizontal: 10, paddingBottom: 10 },
  422. backBtn: { width: 40, height: 40, justifyContent: 'center', alignItems: 'center' },
  423. backIcon: { fontSize: 32, color: '#fff', fontWeight: 'bold' },
  424. title: { color: '#fff', fontSize: 16, fontWeight: 'bold' },
  425. placeholder: { width: 40 },
  426. content: { flex: 1 },
  427. mainTabs: {
  428. flexDirection: 'row',
  429. justifyContent: 'space-between',
  430. paddingHorizontal: 12, // Reduced from 15 to match everything else
  431. paddingBottom: 2
  432. },
  433. mainTabItem: {
  434. width: '30%',
  435. height: 44, // Slightly taller
  436. justifyContent: 'center',
  437. alignItems: 'center'
  438. },
  439. mainTabBg: {
  440. width: '100%',
  441. height: '100%',
  442. justifyContent: 'center',
  443. alignItems: 'center'
  444. },
  445. mainTabText: { fontSize: 15, color: '#333', fontWeight: 'bold' },
  446. mainTabTextActive: { fontSize: 16, color: '#000', fontWeight: 'bold' },
  447. mainTabLine: { display: 'none' },
  448. levelTabs: {
  449. flexDirection: 'row',
  450. alignItems: 'center',
  451. paddingHorizontal: 10, // Add some padding back for the text content since container is full width
  452. paddingVertical: 12,
  453. borderBottomWidth: 1,
  454. borderBottomColor: 'rgba(255,255,255,0.15)'
  455. },
  456. levelTabItem: {
  457. marginRight: 25,
  458. alignItems: 'center',
  459. justifyContent: 'center',
  460. paddingHorizontal: 6,
  461. paddingVertical: 2,
  462. position: 'relative',
  463. minWidth: 40
  464. },
  465. levelTabItemActive: { backgroundColor: 'transparent' },
  466. levelTabText: { color: '#666', fontSize: 15, fontWeight: 'bold' },
  467. levelTabTextActive: {
  468. color: '#ff6b00',
  469. fontSize: 17,
  470. fontWeight: '900',
  471. textShadowColor: 'rgba(0, 0, 0, 0.3)',
  472. textShadowOffset: { width: 1, height: 1 },
  473. textShadowRadius: 1
  474. },
  475. // Corner Decorations - Larger and jagged simulation
  476. decorTL: {
  477. position: 'absolute',
  478. top: 0,
  479. left: -4,
  480. width: 0,
  481. height: 0,
  482. borderTopWidth: 8,
  483. borderRightWidth: 8,
  484. borderTopColor: '#ff6b00',
  485. borderRightColor: 'transparent',
  486. },
  487. decorBR: {
  488. position: 'absolute',
  489. bottom: 0,
  490. right: -4,
  491. width: 0,
  492. height: 0,
  493. borderBottomWidth: 8,
  494. borderLeftWidth: 8,
  495. borderBottomColor: '#ff6b00',
  496. borderLeftColor: 'transparent',
  497. },
  498. levelInd: { display: 'none' },
  499. listContent: {
  500. paddingHorizontal: 8,
  501. paddingVertical: 10,
  502. paddingBottom: 150,
  503. },
  504. cell: {
  505. marginBottom: 0,
  506. width: '100%',
  507. minHeight: 154, // 原项目 308rpx
  508. },
  509. cellContent: {
  510. paddingTop: 15,
  511. paddingBottom: 15,
  512. paddingLeft: 18,
  513. paddingRight: 18, // 原项目 36rpx
  514. },
  515. cellHeader: {
  516. flexDirection: 'row',
  517. justifyContent: 'space-between',
  518. alignItems: 'center',
  519. marginBottom: 10,
  520. paddingBottom: 10,
  521. borderBottomWidth: 1,
  522. borderBottomColor: 'rgba(0,0,0,0.15)',
  523. },
  524. headerLeft: { flexDirection: 'row', alignItems: 'center' },
  525. checkBox: { width: 16, height: 16, borderWidth: 2, borderColor: '#000', marginRight: 8, justifyContent: 'center', alignItems: 'center', backgroundColor: '#fff' },
  526. checkBoxChecked: { backgroundColor: '#000' },
  527. checkIcon: { color: '#fff', fontSize: 10, fontWeight: 'bold' },
  528. levelTitle: { fontSize: 16, fontWeight: 'bold', textShadowColor: '#000', textShadowOffset: { width: 1, height: 1 }, textShadowRadius: 0 },
  529. lockBox: { flexDirection: 'row', alignItems: 'center' },
  530. lockText: { fontSize: 12, color: '#666', marginRight: 4 },
  531. lockIcon: { width: 16, height: 16 },
  532. cellBody: {
  533. flexDirection: 'row',
  534. alignItems: 'center',
  535. },
  536. goodsImgBg: { width: 65, height: 65, justifyContent: 'center', alignItems: 'center', marginRight: 12, padding: 7 },
  537. goodsImg: { width: '100%', height: '100%' },
  538. goodsInfo: { flex: 1, justifyContent: 'center', paddingRight: 8 },
  539. goodsName: { fontSize: 15, color: '#333', fontWeight: 'bold', marginBottom: 6 },
  540. goodsDesc: { fontSize: 12, color: '#999' },
  541. arrowIcon: { fontSize: 18, color: '#ccc', marginLeft: 8 },
  542. bottomBar: {
  543. position: 'absolute',
  544. bottom: 0,
  545. left: 0,
  546. right: 0,
  547. height: 100, // Taller for Top Button / Bottom Text layout
  548. paddingBottom: 20,
  549. alignItems: 'center',
  550. justifyContent: 'center',
  551. backgroundColor: 'transparent' // Screenshot shows transparent or gradient?
  552. },
  553. bottomBtn: { width: '80%', height: 45, marginBottom: 5 },
  554. buttonRow: { flexDirection: 'row', justifyContent: 'center', width: '100%', paddingHorizontal: 20, marginBottom: 5 },
  555. actionBtn: { height: 45, borderRadius: 22, justifyContent: 'center', alignItems: 'center' },
  556. selectAllBtn: { width: '30%', backgroundColor: '#fff', marginRight: 10, borderWidth: 1, borderColor: '#ccc' },
  557. removeBtn: { width: '65%' },
  558. btnBg: { width: '100%', height: '100%', justifyContent: 'center', alignItems: 'center' },
  559. selectAllText: { fontSize: 16, fontWeight: 'bold', color: '#333' },
  560. removeText: { fontSize: 16, fontWeight: 'bold', color: '#000' },
  561. bottomBtnSecondary: { display: 'none' }, // Removed
  562. bottomBtnSecondaryText: { display: 'none' }, // Removed
  563. bottomBtnBg: { width: '100%', height: '100%', justifyContent: 'center', alignItems: 'center' },
  564. bottomBtnText: { color: '#000', fontSize: 16, fontWeight: 'bold' },
  565. bottomInfoText: { color: '#333', fontSize: 12 }, // Text below button
  566. bottomInfoCount: { fontWeight: 'bold' },
  567. emptyBox: { marginTop: 100, alignItems: 'center' },
  568. emptyText: { color: '#999', fontSize: 14 },
  569. pickupCell: { width: '100%', marginBottom: 10, padding: 12 },
  570. pickupTop: { flexDirection: 'row', justifyContent: 'space-between', paddingBottom: 8, borderBottomWidth: 1, borderBottomColor: '#eee' },
  571. pickupTime: { fontSize: 12, color: '#999' },
  572. pickupStatus: { fontSize: 12, fontWeight: 'bold' },
  573. pickupTimeout: { fontSize: 11, color: '#ff6b00', marginTop: 4 },
  574. pickupAddress: { flexDirection: 'row', paddingVertical: 10, borderBottomWidth: 1, borderBottomColor: '#eee' },
  575. locationIcon: { fontSize: 16, marginRight: 8 },
  576. addressInfo: { flex: 1 },
  577. addressName: { fontSize: 14, fontWeight: 'bold', color: '#333' },
  578. addressDetail: { fontSize: 12, color: '#666', marginTop: 4 },
  579. pickupGoodsBox: { paddingVertical: 10 },
  580. pickupGoodsList: { flexDirection: 'row' },
  581. pickupGoodsItem: { marginRight: 10, alignItems: 'center' },
  582. pickupGoodsImg: { width: 60, height: 60, borderRadius: 4 },
  583. pickupGoodsCount: { position: 'absolute', right: 0, bottom: 0, backgroundColor: 'rgba(0,0,0,0.5)', paddingHorizontal: 4, borderRadius: 4 },
  584. pickupGoodsCountText: { color: '#fff', fontSize: 10 },
  585. pickupOrderRow: { flexDirection: 'row', alignItems: 'center', paddingVertical: 8 },
  586. pickupOrderLabel: { fontSize: 12, color: '#666' },
  587. pickupOrderNo: { flex: 1, fontSize: 12, color: '#333' },
  588. copyBtn: { paddingHorizontal: 8, paddingVertical: 4, backgroundColor: '#f5f5f5', borderRadius: 4 },
  589. copyBtnText: { fontSize: 12, color: '#666' },
  590. pickupInfoRow: { flexDirection: 'row', paddingVertical: 4 },
  591. pickupInfoLabel: { fontSize: 12, color: '#666' },
  592. pickupInfoValue: { fontSize: 12, color: '#333' },
  593. pickupBottom: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', paddingTop: 10 },
  594. pickupExpressAmount: { fontSize: 12, color: '#333' },
  595. priceText: { color: '#ff6b00', fontWeight: 'bold' },
  596. expressBtn: { paddingHorizontal: 12, paddingVertical: 6, backgroundColor: '#fec433', borderRadius: 4 },
  597. expressBtnText: { fontSize: 12, color: '#000', fontWeight: 'bold' },
  598. pickupTip: { flexDirection: 'row', alignItems: 'center', padding: 10, backgroundColor: 'rgba(255,235,200,0.8)', marginHorizontal: 8, borderRadius: 6, marginBottom: 10 },
  599. pickupTipIcon: { fontSize: 14, marginRight: 6 },
  600. pickupTipText: { flex: 1, fontSize: 11, color: '#ff6b00' },
  601. goodsSource: { fontSize: 12, color: '#666', opacity: 0.8 },
  602. arrow: { fontSize: 18, color: '#fec433', marginLeft: 8 },
  603. });