index.tsx 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605
  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(); showAlert('已从保险柜移出'); }
  178. };
  179. const handleTakeGoods = () => {
  180. const selected = Object.values(checkMap);
  181. if (selected.length === 0) { showAlert('请至少选择一个商品!'); return; }
  182. setCheckoutVisible(true);
  183. };
  184. const handleCheckoutSuccess = () => {
  185. setCheckoutVisible(false);
  186. setCheckMap({});
  187. handleRefresh();
  188. };
  189. const showAlert = (msg: string) => {
  190. if (Platform.OS === 'web') window.alert(msg);
  191. else Alert.alert('提示', msg);
  192. };
  193. const renderStoreItem = ({ item, index }: { item: StoreItem; index: number }) => {
  194. const levelInfo = LEVEL_MAP[item.level] || LEVEL_MAP.D;
  195. const isChecked = !!checkMap[item.id];
  196. const canSelect = mainTabIndex === 1 || item.safeFlag !== 1;
  197. return (
  198. <ImageBackground source={{ uri: Images.mine.storeItemBg }} style={styles.cell} resizeMode="stretch">
  199. <View style={styles.cellContent}>
  200. <TouchableOpacity style={styles.cellHeader} onPress={() => canSelect && handleChoose(item)}>
  201. <View style={styles.headerLeft}>
  202. {canSelect && (
  203. <View style={[styles.checkBox, isChecked && styles.checkBoxChecked]}>
  204. {isChecked && <Text style={styles.checkIcon}>✓</Text>}
  205. </View>
  206. )}
  207. <Text style={[styles.levelTitle, { color: levelInfo.color }]}>{levelInfo.title}</Text>
  208. </View>
  209. <TouchableOpacity style={styles.lockBox} onPress={() => item.safeFlag !== 1 ? handleLock(item, index) : handleUnlock(item, index)}>
  210. <Text style={styles.lockText}>{item.safeFlag !== 1 ? '锁定' : '解锁'}</Text>
  211. <Image source={{ uri: item.safeFlag !== 1 ? Images.mine.lock : Images.mine.unlock }} style={styles.lockIcon} />
  212. </TouchableOpacity>
  213. </TouchableOpacity>
  214. <View style={styles.cellBody}>
  215. <ImageBackground source={{ uri: Images.mine.storeGoodsImgBg }} style={styles.goodsImgBg}>
  216. <Image source={{ uri: item.spu?.cover }} style={styles.goodsImg} contentFit="contain" />
  217. </ImageBackground>
  218. <View style={styles.goodsInfo}>
  219. <Text style={styles.goodsName} numberOfLines={2}>{item.spu?.name}</Text>
  220. <Text style={styles.goodsSource}>从{FROM_TYPE_MAP[item.fromRelationType] || '其他'}获得</Text>
  221. </View>
  222. <Text style={styles.arrow}>{'>'}</Text>
  223. </View>
  224. </View>
  225. </ImageBackground>
  226. );
  227. };
  228. const copyToClipboard = (text: string) => {
  229. showAlert(`订单号已复制: ${text}`);
  230. };
  231. const showExpress = (item: PickupItem) => {
  232. router.push({ pathname: '/store/packages' as any, params: { tradeNo: item.tradeNo } });
  233. };
  234. const renderPickupItem = ({ item }: { item: PickupItem & { groupedList?: Array<{ total: number; data: any }> } }) => {
  235. const statusInfo = STATUS_MAP[item.status] || { text: '未知', color: '#999' };
  236. return (
  237. <ImageBackground source={{ uri: Images.mine.storeItemBg }} style={styles.pickupCell} resizeMode="stretch">
  238. {/* 顶部信息 */}
  239. <View style={styles.pickupTop}>
  240. <Text style={styles.pickupTime}>下单时间:{item.createTime}</Text>
  241. <Text style={[styles.pickupStatus, { color: statusInfo.color }]}>{statusInfo.text}</Text>
  242. </View>
  243. {item.status === 0 && item.paymentTimeoutTime && (
  244. <Text style={styles.pickupTimeout}>{item.paymentTimeoutTime} 将自动取消该订单,如有优惠券,将自动退回</Text>
  245. )}
  246. {/* 收货地址 */}
  247. <View style={styles.pickupAddress}>
  248. <Text style={styles.locationIcon}>📍</Text>
  249. <View style={styles.addressInfo}>
  250. <Text style={styles.addressName}>{item.contactName},{item.contactNo}</Text>
  251. <Text style={styles.addressDetail}>{item.province}{item.city}{item.district}{item.address}</Text>
  252. </View>
  253. </View>
  254. {/* 商品列表 */}
  255. <View style={styles.pickupGoodsBox}>
  256. <ScrollView horizontal showsHorizontalScrollIndicator={false} style={styles.pickupGoodsList}>
  257. {(item.groupedList || []).map((goods, idx) => (
  258. <View key={idx} style={styles.pickupGoodsItem}>
  259. <Image source={{ uri: goods.data.cover }} style={styles.pickupGoodsImg} contentFit="contain" />
  260. <View style={styles.pickupGoodsCount}>
  261. <Text style={styles.pickupGoodsCountText}>x{goods.total}</Text>
  262. </View>
  263. </View>
  264. ))}
  265. </ScrollView>
  266. </View>
  267. {/* 订单号 */}
  268. <View style={styles.pickupOrderRow}>
  269. <Text style={styles.pickupOrderLabel}>订单号:</Text>
  270. <Text style={styles.pickupOrderNo} numberOfLines={1}>{item.tradeNo}</Text>
  271. <TouchableOpacity style={styles.copyBtn} onPress={() => copyToClipboard(item.tradeNo)}>
  272. <Text style={styles.copyBtnText}>复制</Text>
  273. </TouchableOpacity>
  274. </View>
  275. {item.paymentTime && (
  276. <View style={styles.pickupInfoRow}>
  277. <Text style={styles.pickupInfoLabel}>付款时间:</Text>
  278. <Text style={styles.pickupInfoValue}>{item.paymentTime}</Text>
  279. </View>
  280. )}
  281. {item.status === 12 && item.cancelRemark && (
  282. <View style={styles.pickupInfoRow}>
  283. <Text style={styles.pickupInfoLabel}>备注</Text>
  284. <Text style={[styles.pickupInfoValue, { color: '#ff6b00' }]}>{item.cancelRemark}</Text>
  285. </View>
  286. )}
  287. {/* 底部操作 */}
  288. <View style={styles.pickupBottom}>
  289. <Text style={styles.pickupExpressAmount}>配送费:<Text style={styles.priceText}>¥{item.expressAmount}</Text></Text>
  290. {[1, 2, 99].includes(item.status) && (
  291. <TouchableOpacity style={styles.expressBtn} onPress={() => showExpress(item)}>
  292. <Text style={styles.expressBtnText}>物流信息</Text>
  293. </TouchableOpacity>
  294. )}
  295. </View>
  296. </ImageBackground>
  297. );
  298. };
  299. const selectedCount = Object.keys(checkMap).length;
  300. return (
  301. <View style={styles.container}>
  302. <StatusBar barStyle="light-content" />
  303. <ImageBackground source={{ uri: Images.mine.kaixinMineBg }} style={styles.background} resizeMode="cover">
  304. <Image source={{ uri: Images.mine.kaixinMineHeadBg }} style={styles.headerBg} contentFit="cover" />
  305. <View style={[styles.header, { paddingTop: insets.top }]}>
  306. <TouchableOpacity style={styles.backBtn} onPress={() => router.back()}>
  307. <Text style={styles.backIcon}>‹</Text>
  308. </TouchableOpacity>
  309. <Text style={styles.title}>仓库</Text>
  310. <View style={styles.placeholder} />
  311. </View>
  312. <View style={[styles.content, { paddingTop: insets.top + 50 }]}>
  313. <View style={styles.mainTabs}>
  314. {mainTabs.map((tab, index) => {
  315. const isActive = mainTabIndex === index;
  316. // Use Yellow L bg for active, Grey (Hui) for inactive
  317. const bg = isActive ? Images.common.butBgL : Images.common.butBgHui;
  318. return (
  319. <TouchableOpacity key={index} style={styles.mainTabItem} onPress={() => setMainTabIndex(index)}>
  320. <ImageBackground source={{ uri: bg }} style={styles.mainTabBg} resizeMode="contain">
  321. <Text style={isActive ? styles.mainTabTextActive : styles.mainTabText}>{tab}</Text>
  322. </ImageBackground>
  323. </TouchableOpacity>
  324. );
  325. })}
  326. </View>
  327. {mainTabIndex === 0 && (
  328. <View style={styles.levelTabs}>
  329. {LEVEL_TABS.map((tab, index) => {
  330. const isActive = levelTabIndex === index;
  331. return (
  332. <TouchableOpacity
  333. key={index}
  334. style={[styles.levelTabItem, isActive && styles.levelTabItemActive]}
  335. onPress={() => setLevelTabIndex(index)}
  336. >
  337. {isActive && <View style={styles.decorTL} />}
  338. <Text style={[styles.levelTabText, isActive && styles.levelTabTextActive]}>{tab.title}</Text>
  339. {isActive && <View style={styles.decorBR} />}
  340. </TouchableOpacity>
  341. );
  342. })}
  343. </View>
  344. )}
  345. <FlatList
  346. data={list as any[]}
  347. renderItem={mainTabIndex === 2 ? renderPickupItem as any : renderStoreItem as any}
  348. keyExtractor={(item: any, index) => item.id || item.tradeNo || index.toString()}
  349. contentContainerStyle={styles.listContent}
  350. refreshControl={<RefreshControl refreshing={refreshing} onRefresh={handleRefresh} tintColor="#fff" />}
  351. onEndReached={handleLoadMore}
  352. onEndReachedThreshold={0.3}
  353. ListHeaderComponent={mainTabIndex === 2 ? (
  354. <View style={styles.pickupTip}>
  355. <Text style={styles.pickupTipIcon}>⚠️</Text>
  356. <Text style={styles.pickupTipText}>您的包裹一般在5个工作日内发货,如遇特殊情况可能会有延迟,敬请谅解~</Text>
  357. </View>
  358. ) : null}
  359. ListFooterComponent={loading && list.length > 0 ? <ActivityIndicator color="#fff" style={{ marginVertical: 10 }} /> : null}
  360. ListEmptyComponent={!loading ? <View style={styles.emptyBox}><Text style={styles.emptyText}>暂无物品</Text></View> : null}
  361. />
  362. </View>
  363. {mainTabIndex !== 2 && list.length > 0 && (
  364. <View style={[styles.bottomBar, { paddingBottom: insets.bottom + 10 }]}>
  365. <TouchableOpacity style={styles.bottomBtn} onPress={mainTabIndex === 0 ? handleTakeGoods : handleMoveOutAll}>
  366. <ImageBackground source={{ uri: Images.common.butBgL }} style={styles.bottomBtnBg} resizeMode="stretch">
  367. <Text style={styles.bottomBtnText}>{mainTabIndex === 0 ? '立即提货' : '移出保险柜'}</Text>
  368. </ImageBackground>
  369. </TouchableOpacity>
  370. <Text style={styles.bottomInfoText}>已选 <Text style={styles.bottomInfoCount}>{selectedCount}</Text> 件商品</Text>
  371. </View>
  372. )}
  373. {/* 提货弹窗 */}
  374. <CheckoutModal
  375. visible={checkoutVisible}
  376. selectedItems={Object.values(checkMap)}
  377. onClose={() => setCheckoutVisible(false)}
  378. onSuccess={handleCheckoutSuccess}
  379. />
  380. </ImageBackground>
  381. </View>
  382. );
  383. }
  384. const styles = StyleSheet.create({
  385. container: { flex: 1, backgroundColor: '#1a1a2e' },
  386. background: { flex: 1 },
  387. headerBg: { position: 'absolute', top: 0, left: 0, width: '100%', height: 160 },
  388. header: { position: 'absolute', top: 0, left: 0, right: 0, zIndex: 100, flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', paddingHorizontal: 10, paddingBottom: 10 },
  389. backBtn: { width: 40, height: 40, justifyContent: 'center', alignItems: 'center' },
  390. backIcon: { fontSize: 32, color: '#fff', fontWeight: 'bold' },
  391. title: { color: '#fff', fontSize: 16, fontWeight: 'bold' },
  392. placeholder: { width: 40 },
  393. content: { flex: 1 },
  394. mainTabs: {
  395. flexDirection: 'row',
  396. justifyContent: 'space-between',
  397. paddingHorizontal: 12, // Reduced from 15 to match everything else
  398. paddingBottom: 2
  399. },
  400. mainTabItem: {
  401. width: '30%',
  402. height: 44, // Slightly taller
  403. justifyContent: 'center',
  404. alignItems: 'center'
  405. },
  406. mainTabBg: {
  407. width: '100%',
  408. height: '100%',
  409. justifyContent: 'center',
  410. alignItems: 'center'
  411. },
  412. mainTabText: { fontSize: 15, color: '#333', fontWeight: 'bold' },
  413. mainTabTextActive: { fontSize: 16, color: '#000', fontWeight: 'bold' },
  414. mainTabLine: { display: 'none' },
  415. levelTabs: {
  416. flexDirection: 'row',
  417. alignItems: 'center',
  418. paddingHorizontal: 10, // Add some padding back for the text content since container is full width
  419. paddingVertical: 12,
  420. borderBottomWidth: 1,
  421. borderBottomColor: 'rgba(255,255,255,0.15)'
  422. },
  423. levelTabItem: {
  424. marginRight: 25,
  425. alignItems: 'center',
  426. justifyContent: 'center',
  427. paddingHorizontal: 6,
  428. paddingVertical: 2,
  429. position: 'relative',
  430. minWidth: 40
  431. },
  432. levelTabItemActive: { backgroundColor: 'transparent' },
  433. levelTabText: { color: '#666', fontSize: 15, fontWeight: 'bold' },
  434. levelTabTextActive: {
  435. color: '#ff6b00',
  436. fontSize: 17,
  437. fontWeight: '900',
  438. textShadowColor: 'rgba(0, 0, 0, 0.3)',
  439. textShadowOffset: { width: 1, height: 1 },
  440. textShadowRadius: 1
  441. },
  442. // Corner Decorations - Larger and jagged simulation
  443. decorTL: {
  444. position: 'absolute',
  445. top: 0,
  446. left: -4,
  447. width: 0,
  448. height: 0,
  449. borderTopWidth: 8,
  450. borderRightWidth: 8,
  451. borderTopColor: '#ff6b00',
  452. borderRightColor: 'transparent',
  453. },
  454. decorBR: {
  455. position: 'absolute',
  456. bottom: 0,
  457. right: -4,
  458. width: 0,
  459. height: 0,
  460. borderBottomWidth: 8,
  461. borderLeftWidth: 8,
  462. borderBottomColor: '#ff6b00',
  463. borderLeftColor: 'transparent',
  464. },
  465. levelInd: { display: 'none' },
  466. listContent: {
  467. paddingHorizontal: 8,
  468. paddingVertical: 10,
  469. paddingBottom: 150,
  470. },
  471. cell: {
  472. marginBottom: 0,
  473. width: '100%',
  474. minHeight: 154, // 原项目 308rpx
  475. },
  476. cellContent: {
  477. paddingTop: 15,
  478. paddingBottom: 15,
  479. paddingLeft: 18,
  480. paddingRight: 18, // 原项目 36rpx
  481. },
  482. cellHeader: {
  483. flexDirection: 'row',
  484. justifyContent: 'space-between',
  485. alignItems: 'center',
  486. marginBottom: 10,
  487. paddingBottom: 10,
  488. borderBottomWidth: 1,
  489. borderBottomColor: 'rgba(0,0,0,0.15)',
  490. },
  491. headerLeft: { flexDirection: 'row', alignItems: 'center' },
  492. checkBox: { width: 16, height: 16, borderWidth: 2, borderColor: '#000', marginRight: 8, justifyContent: 'center', alignItems: 'center', backgroundColor: '#fff' },
  493. checkBoxChecked: { backgroundColor: '#000' },
  494. checkIcon: { color: '#fff', fontSize: 10, fontWeight: 'bold' },
  495. levelTitle: { fontSize: 16, fontWeight: 'bold', textShadowColor: '#000', textShadowOffset: { width: 1, height: 1 }, textShadowRadius: 0 },
  496. lockBox: { flexDirection: 'row', alignItems: 'center' },
  497. lockText: { fontSize: 12, color: '#666', marginRight: 4 },
  498. lockIcon: { width: 16, height: 16 },
  499. cellBody: {
  500. flexDirection: 'row',
  501. alignItems: 'center',
  502. },
  503. goodsImgBg: { width: 65, height: 65, justifyContent: 'center', alignItems: 'center', marginRight: 12, padding: 7 },
  504. goodsImg: { width: '100%', height: '100%' },
  505. goodsInfo: { flex: 1, justifyContent: 'center', paddingRight: 8 },
  506. goodsName: { fontSize: 15, color: '#333', fontWeight: 'bold', marginBottom: 6 },
  507. goodsDesc: { fontSize: 12, color: '#999' },
  508. arrowIcon: { fontSize: 18, color: '#ccc', marginLeft: 8 },
  509. bottomBar: {
  510. position: 'absolute',
  511. bottom: 0,
  512. left: 0,
  513. right: 0,
  514. height: 100, // Taller for Top Button / Bottom Text layout
  515. paddingBottom: 20,
  516. alignItems: 'center',
  517. justifyContent: 'center',
  518. backgroundColor: 'transparent' // Screenshot shows transparent or gradient?
  519. },
  520. bottomBtn: { width: '80%', height: 45, marginBottom: 5 },
  521. bottomBtnBg: { width: '100%', height: '100%', justifyContent: 'center', alignItems: 'center' },
  522. bottomBtnText: { color: '#000', fontSize: 16, fontWeight: 'bold' },
  523. bottomInfoText: { color: '#333', fontSize: 12 }, // Text below button
  524. bottomInfoCount: { fontWeight: 'bold' },
  525. emptyBox: { marginTop: 100, alignItems: 'center' },
  526. emptyText: { color: '#999', fontSize: 14 },
  527. pickupCell: { width: '100%', marginBottom: 10, padding: 12 },
  528. pickupTop: { flexDirection: 'row', justifyContent: 'space-between', paddingBottom: 8, borderBottomWidth: 1, borderBottomColor: '#eee' },
  529. pickupTime: { fontSize: 12, color: '#999' },
  530. pickupStatus: { fontSize: 12, fontWeight: 'bold' },
  531. pickupTimeout: { fontSize: 11, color: '#ff6b00', marginTop: 4 },
  532. pickupAddress: { flexDirection: 'row', paddingVertical: 10, borderBottomWidth: 1, borderBottomColor: '#eee' },
  533. locationIcon: { fontSize: 16, marginRight: 8 },
  534. addressInfo: { flex: 1 },
  535. addressName: { fontSize: 14, fontWeight: 'bold', color: '#333' },
  536. addressDetail: { fontSize: 12, color: '#666', marginTop: 4 },
  537. pickupGoodsBox: { paddingVertical: 10 },
  538. pickupGoodsList: { flexDirection: 'row' },
  539. pickupGoodsItem: { marginRight: 10, alignItems: 'center' },
  540. pickupGoodsImg: { width: 60, height: 60, borderRadius: 4 },
  541. pickupGoodsCount: { position: 'absolute', right: 0, bottom: 0, backgroundColor: 'rgba(0,0,0,0.5)', paddingHorizontal: 4, borderRadius: 4 },
  542. pickupGoodsCountText: { color: '#fff', fontSize: 10 },
  543. pickupOrderRow: { flexDirection: 'row', alignItems: 'center', paddingVertical: 8 },
  544. pickupOrderLabel: { fontSize: 12, color: '#666' },
  545. pickupOrderNo: { flex: 1, fontSize: 12, color: '#333' },
  546. copyBtn: { paddingHorizontal: 8, paddingVertical: 4, backgroundColor: '#f5f5f5', borderRadius: 4 },
  547. copyBtnText: { fontSize: 12, color: '#666' },
  548. pickupInfoRow: { flexDirection: 'row', paddingVertical: 4 },
  549. pickupInfoLabel: { fontSize: 12, color: '#666' },
  550. pickupInfoValue: { fontSize: 12, color: '#333' },
  551. pickupBottom: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', paddingTop: 10 },
  552. pickupExpressAmount: { fontSize: 12, color: '#333' },
  553. priceText: { color: '#ff6b00', fontWeight: 'bold' },
  554. expressBtn: { paddingHorizontal: 12, paddingVertical: 6, backgroundColor: '#fec433', borderRadius: 4 },
  555. expressBtnText: { fontSize: 12, color: '#000', fontWeight: 'bold' },
  556. pickupTip: { flexDirection: 'row', alignItems: 'center', padding: 10, backgroundColor: 'rgba(255,235,200,0.8)', marginHorizontal: 8, borderRadius: 6, marginBottom: 10 },
  557. pickupTipIcon: { fontSize: 14, marginRight: 6 },
  558. pickupTipText: { flex: 1, fontSize: 11, color: '#ff6b00' },
  559. goodsSource: { fontSize: 12, color: '#666', opacity: 0.8 },
  560. arrow: { fontSize: 18, color: '#fec433', marginLeft: 8 },
  561. });