修改功能

This commit is contained in:
fengjignqi
2026-11-14 09:42:57 +08:00
parent dae233e651
commit 673eb7e59c
139 changed files with 9742 additions and 6235 deletions

View File

@@ -0,0 +1,23 @@
import { readFile, writeFile } from 'node:fs/promises';
const credentials = JSON.parse(await readFile('C:/Users/Admin/.config/lanhu-design/credentials.json', 'utf8'));
process.env.LANHU_COOKIE = credentials.credential.value;
const { getDesignSchema } = await import('file:///C:/Users/Admin/.codex/skills/lanhu-design/scripts/lanhu-client.mjs');
const url = 'https://lanhuapp.com/web/#/item/project/stage?pid=f72a7b3f-fb7d-4c6c-bcb0-a68da4c0ed3b&tid=f0e0b575-2d65-4ac8-9464-1cd44e56810f';
for (const index of [20, 3]) {
const { sketchData } = await getDesignSchema(url, String(index));
await writeFile(`.lanhu/shop_${index}_raw.json`, JSON.stringify(sketchData), 'utf8');
const photos = [];
function walk(value, path = '') {
if (!value || typeof value !== 'object') return;
if (value.name && (value.fills || value.image || value.images)) {
photos.push({ name: value.name, frame: value.frame, rect: value.rect, fills: value.fills, image: value.image, images: value.images });
}
for (const [key, child] of Object.entries(value)) {
if (child && typeof child === 'object') walk(child, path + '/' + key);
}
}
walk(sketchData);
await writeFile(`.lanhu/shop_${index}_photos.json`, JSON.stringify(photos, null, 2), 'utf8');
console.log(JSON.stringify({ index, photoLayers: photos.length }));
}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 511 KiB

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,857 @@
{
"ok": true,
"data": {
"status": "success",
"project_name": "电饼铛项目",
"total_designs": 84,
"designs": [
{
"index": 1,
"id": "02d56e88-d164-4c6a-aaf6-475ec0fb2ecf",
"name": "首页",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover0ca2ab74f6257a1ef38599fd42b5a63c.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.632679Z"
},
{
"index": 2,
"id": "3bd202ec-29e0-43cf-8ab3-b05367814864",
"name": "详情页3离线",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover257982e29f021f66c62d3a16dd448dce.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.622703Z"
},
{
"index": 3,
"id": "b4ea89a2-29cc-4f1e-8299-59798167a602",
"name": "个人中心",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover2a2224421eb83e91214616bfe0b3fd7d.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.607993Z"
},
{
"index": 4,
"id": "e181192b-7500-4120-8814-fdc6861691bf",
"name": "提货订单统计",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover1f61cffd75324dfc6c853248ca9fd56c.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.597339Z"
},
{
"index": 5,
"id": "055195fd-6925-4f49-8f23-6c46decfca29",
"name": "商品入库2",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCoveraaf90f817c7cdfd3cf83b4d417e5c006.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.586229Z"
},
{
"index": 6,
"id": "ec3ec6ef-f636-4afa-8656-910e19f4fd56",
"name": "待激活设备",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCoverc56c3da0ac1a9ad66fa899ed73985c29.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.575417Z"
},
{
"index": 7,
"id": "3dece5cb-c615-4660-8828-bf4e2b80c95a",
"name": "故障分析",
"width": 196.5,
"height": 591.5,
"url": "https://alipic.lanhuapp.com/MasterCoverbd477bed7fa12ed46c60bdcc1cd6d6a6.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.564322Z"
},
{
"index": 8,
"id": "31a94bdb-a067-4c7c-a8ec-56cfe4d3af5a",
"name": "登录1",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover74d0bf142d82efb5707a1d8c72989989.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.558926Z"
},
{
"index": 9,
"id": "3985ee10-c8cc-45c4-bc7b-db5a3583189e",
"name": "提货核销2",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover3c0c4c24bf3c20844a403f41f909fa29.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.540263Z"
},
{
"index": 10,
"id": "8d83ed46-22d3-41e2-a459-b0a12bb9726e",
"name": "用户管理",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover3acc17af0c371e0e999b21a2d823f2bd.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.515534Z"
},
{
"index": 11,
"id": "b2d1c8a2-8d62-454f-8ad7-53638abf3e3a",
"name": "用户详情",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCoverf60daf6d611f8fd7949da57ae19b25ff.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.525669Z"
},
{
"index": 12,
"id": "26869666-464f-422d-91a2-0b70d52a6765",
"name": "数据统计",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover6feef9e7d68e900ce5193b35d69f8ca0.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.510836Z"
},
{
"index": 13,
"id": "18dc65cb-e6e7-4cc0-9411-93aec5211589",
"name": "商品管理",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover1222992d0bb3b36f84526913482d861f.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.507912Z"
},
{
"index": 14,
"id": "a7aeda8d-6f0a-4b4f-bfe5-c22d3b8fa778",
"name": "详情页1在线",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover64ddadf3ebe07074c7cffba348500789.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.482683Z"
},
{
"index": 15,
"id": "1523b5b4-dd4e-4bd8-a43c-7803fce4c553",
"name": "详情页2故障",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCoverf1c2c3eac72a1f9c8a33044487edf5c3.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.483629Z"
},
{
"index": 16,
"id": "caa6049d-aa89-423f-b3fb-efa155e6cc16",
"name": "单位信息",
"width": 196.5,
"height": 684.5,
"url": "https://alipic.lanhuapp.com/MasterCoverf4c42cc3aa3e7d89c07a5f51e7cfedb4.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.462147Z"
},
{
"index": 17,
"id": "3a64a9a2-b148-49b9-978f-1fe62015f752",
"name": "使用手册",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover6726e5394171f6a985f322b774f2b888.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.448198Z"
},
{
"index": 18,
"id": "90a01613-c734-418a-a2e6-6625cfb4e9e1",
"name": "关于/用户协议/隐私政策",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover1fedad235c7e7151effd4c905d3003e5.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.440547Z"
},
{
"index": 19,
"id": "cd7600bc-28f5-43de-8d4b-1beab5c21235",
"name": "登录2",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover028dc349e2df7c7e2673a7165ba5cfbf.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.429503Z"
},
{
"index": 20,
"id": "3322bbd1-d542-4472-a5ec-a539eb594577",
"name": "提货核销1",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover33f554a36dc5596f424a3f22a285fb16.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.408024Z"
},
{
"index": 21,
"id": "bc2eaf3b-6d22-41d0-9a4a-3293f95384fc",
"name": "客服",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover308ad39151c5637aeabdbd889f46d15f.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.417873Z"
},
{
"index": 22,
"id": "75199f05-584c-4d8f-9901-2978217db041",
"name": "消息中心",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover7d2fdb12f09c4ee543d79c3ef42a3f7d.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.401258Z"
},
{
"index": 23,
"id": "d172dc00-1f17-4205-9d51-69e0e32dd72a",
"name": "商品入库1",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCoverbf40aacc94303363bdb9c7d678756112.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.393876Z"
},
{
"index": 24,
"id": "0e17bcc1-5359-4516-a7f9-ee926e19a219",
"name": "页面1",
"width": 196.5,
"height": 556,
"url": "https://alipic.lanhuapp.com/MasterCoverf8363132bd87397401241ad4942ef756.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:48.026197Z"
},
{
"index": 25,
"id": "8dc7eb63-c9b6-4402-97f2-50f733b8146f",
"name": "退款",
"width": 196.5,
"height": 525,
"url": "https://alipic.lanhuapp.com/MasterCovera4e5c711af741e71156b1aeaf391194f.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:48.022664Z"
},
{
"index": 26,
"id": "1c522fe4-c62f-4e23-b222-83c8a18cec77",
"name": "我的评价",
"width": 196.5,
"height": 525,
"url": "https://alipic.lanhuapp.com/MasterCovercacb6c0dfcb19f9cd22d0623739cccb3.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:48.019349Z"
},
{
"index": 27,
"id": "cd97492c-c028-49fb-92c0-dd464a68ec51",
"name": "申请退款",
"width": 196.5,
"height": 525,
"url": "https://alipic.lanhuapp.com/MasterCover003286b2dc9d9f9b0bc43c40cf24c7d3.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:48.015762Z"
},
{
"index": 28,
"id": "2b8bf885-d7c3-4e80-b48a-39b72c55714e",
"name": "优惠券",
"width": 196.5,
"height": 505.5,
"url": "https://alipic.lanhuapp.com/MasterCover48ff5cccc1494a18e84ad9f6221f6d21.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:48.012328Z"
},
{
"index": 29,
"id": "f1e7a9cf-31c0-4d93-8541-81cbcc791319",
"name": "我的订单",
"width": 196.5,
"height": 432.5,
"url": "https://alipic.lanhuapp.com/MasterCover4b68985c2d67d1db044e1afb7d0eb739.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:48.008611Z"
},
{
"index": 30,
"id": "be543b19-02c5-4c80-9dc7-c79170b9492f",
"name": "购物车",
"width": 196.5,
"height": 432.5,
"url": "https://alipic.lanhuapp.com/MasterCover97b784bf50c2fcae7af6eaee5b593a85.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:48.00525Z"
},
{
"index": 31,
"id": "f5486036-61ac-48eb-800e-9c94e4044ae2",
"name": "购物车",
"width": 196.5,
"height": 396,
"url": "https://alipic.lanhuapp.com/MasterCover6aa542be3583747e762a3814292c31d0.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:48.001731Z"
},
{
"index": 32,
"id": "b51487c3-0c59-41c5-ac8a-caf3d9ec1e03",
"name": "我的团队",
"width": 196.5,
"height": 393.5,
"url": "https://alipic.lanhuapp.com/MasterCoverb0373872e7bbe6d15c85aac731adc553.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.995086Z"
},
{
"index": 33,
"id": "7ef03b31-224a-4a12-b4bb-0e50993fac9d",
"name": "分享收益",
"width": 196.5,
"height": 393.5,
"url": "https://alipic.lanhuapp.com/MasterCover48a2ef45a758cfe12e5a908d1b699632.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.987551Z"
},
{
"index": 34,
"id": "635b82be-74cc-4bad-ad07-10e4c9dfb1c9",
"name": "分享收益",
"width": 196.5,
"height": 393.5,
"url": "https://alipic.lanhuapp.com/MasterCoverce4f9a4be2e220fd4992ab99eb0d682e.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.984255Z"
},
{
"index": 35,
"id": "c59098c4-8117-4b8f-adb2-0109ab429960",
"name": "编辑",
"width": 196.5,
"height": 393,
"url": "https://alipic.lanhuapp.com/MasterCover4acb28ac4ee4f338ef83bd3e0db43346.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.980244Z"
},
{
"index": 36,
"id": "362c91f9-f324-4a22-84b8-566c73469608",
"name": "新增",
"width": 196.5,
"height": 393,
"url": "https://alipic.lanhuapp.com/MasterCoverf875729d4351ebb7d67d15fcd94aafce.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.976864Z"
},
{
"index": 37,
"id": "c081b034-376c-4c85-ae4e-535152a9ec71",
"name": "收货地址",
"width": 196.5,
"height": 393,
"url": "https://alipic.lanhuapp.com/MasterCoverf2a023c2b8274e63a3e815f544328b9c.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.972878Z"
},
{
"index": 38,
"id": "cf9fde6f-1c24-4431-90d1-cd94724b700a",
"name": "组 266",
"width": 165,
"height": 170.5,
"url": "https://alipic.lanhuapp.com/MasterCover65c2a21a3d1fd86f5dca9b63abbf7241.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.962429Z"
},
{
"index": 39,
"id": "cdef0f9b-2361-43d7-b906-47c6463d4e1f",
"name": "详情",
"width": 196.5,
"height": 486.5,
"url": "https://alipic.lanhuapp.com/MasterCoveraec8ea002491d585f95ed31e44d639cd.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.948478Z"
},
{
"index": 40,
"id": "bc20f58d-163b-4c5c-b86a-2e904a29066d",
"name": "积分订单",
"width": 196.5,
"height": 483.5,
"url": "https://alipic.lanhuapp.com/MasterCoverc3bb5b5c72b2b2e5d47f3ccf1dace435.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.94476Z"
},
{
"index": 41,
"id": "0e54f35b-153d-4f49-a090-9a729f93abd9",
"name": "推广码",
"width": 196.5,
"height": 402,
"url": "https://alipic.lanhuapp.com/MasterCover62a2031be6bcf00da691f8f3166cb977.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.934047Z"
},
{
"index": 42,
"id": "fc264a99-b383-4493-bde7-7e33788fbca7",
"name": "绑定手机号-已绑定",
"width": 196.5,
"height": 402,
"url": "https://alipic.lanhuapp.com/MasterCover31e5612cd45ac6af3b6f8508c6ab1e4b.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.92704Z"
},
{
"index": 43,
"id": "e5193dd6-ca70-43e5-96f0-ab4c9d47bcd2",
"name": "弹窗",
"width": 196.5,
"height": 402,
"url": "https://alipic.lanhuapp.com/MasterCover691292e6b9d53cee5f202516362489fc.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.92319Z"
},
{
"index": 44,
"id": "c7ac8b0c-0ee6-4182-80ec-1703847f4da7",
"name": "查看全部",
"width": 196.5,
"height": 372,
"url": "https://alipic.lanhuapp.com/MasterCover5d918b3b92a666a3218689c595cbb795.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.901177Z"
},
{
"index": 45,
"id": "1cb83b22-f4a0-43f9-9efe-1c325452ac86",
"name": "定时",
"width": 196.5,
"height": 393.5,
"url": "https://alipic.lanhuapp.com/MasterCover07ef6f140a5186844a5fac43175bcf79.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.858347Z"
},
{
"index": 46,
"id": "e2e52d03-53a3-42a1-8e55-94f8c1358e6f",
"name": "设备定位",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCoverc09b14917f1ca043e6dae94bb9289a1c.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.851192Z"
},
{
"index": 47,
"id": "6b0a75f7-c29b-40b0-850c-1573961ed552",
"name": "正在配网",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCover0de7b9710dd10df7789851ca77e0c63f.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.843878Z"
},
{
"index": 48,
"id": "0cb8e2f7-66c8-4918-900f-93f4132ce8a1",
"name": "wifi连接设备",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCover9cfad224e3b86ed3aed3dcd8c375ad8e.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.840275Z"
},
{
"index": 49,
"id": "5ca72163-0bca-4a0a-a3de-9820ebc5ce30",
"name": "浮层",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCover30a67f4ff5f35f7936010c4a5e636e8d.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.836729Z"
},
{
"index": 50,
"id": "78c82ccc-a50a-41ae-9350-7025d732c95a",
"name": "蓝牙连接设备",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCover72765d2d90e56c97794f99351761d3c7.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.832579Z"
},
{
"index": 51,
"id": "242b3037-6e46-4c36-8c25-5428036b6070",
"name": "查看自提点",
"width": 196.5,
"height": 393,
"url": "https://alipic.lanhuapp.com/MasterCovera1e92d4c3697cb34397ec31a7a6aac48.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.965864Z"
},
{
"index": 52,
"id": "03773c81-720c-42bb-bcbf-d9da1cb7d961",
"name": "个人中心",
"width": 196.5,
"height": 781,
"url": "https://alipic.lanhuapp.com/MasterCover175dc0272fa91da5adc80b9b82f493b7.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.958869Z"
},
{
"index": 53,
"id": "489c3e4e-c9f5-4a50-aefb-798782c2c5b9",
"name": "页面1",
"width": 196.5,
"height": 575.5,
"url": "https://alipic.lanhuapp.com/MasterCover706dfaa108d6dc9252a093769b89fb92.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.955422Z"
},
{
"index": 54,
"id": "a25e7ed0-b592-4b50-a110-09f000e43ff6",
"name": "积分记录",
"width": 196.5,
"height": 483.5,
"url": "https://alipic.lanhuapp.com/MasterCovere4e495ce31f1be65592a25de0916a61a.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.94133Z"
},
{
"index": 55,
"id": "5ebb9453-c1e5-439b-8a36-f5005c617afd",
"name": "支付",
"width": 196.5,
"height": 402,
"url": "https://alipic.lanhuapp.com/MasterCoverddaba8a6f3536bc4bb1ba0b13b7812b4.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.916208Z"
},
{
"index": 56,
"id": "1f758184-0800-4b66-8ef7-7464bc523712",
"name": "详情",
"width": 196.5,
"height": 402,
"url": "https://alipic.lanhuapp.com/MasterCover8a903af0ffc3ac5cceb321b7b42a745d.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.909175Z"
},
{
"index": 57,
"id": "9c1b4080-d8df-41ce-9624-fdec9553c9a8",
"name": "碳积分",
"width": 196.5,
"height": 446,
"url": "https://alipic.lanhuapp.com/MasterCovera79e99dbd1152c490954d4917626cc11.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.89392Z"
},
{
"index": 58,
"id": "01b3bba9-170b-4636-bb33-8a31c855443b",
"name": "首页",
"width": 196.5,
"height": 431.5,
"url": "https://alipic.lanhuapp.com/MasterCover2f7e8aef4b39fe3585b570f2498e8215.png",
"has_comment": false,
"update_time": "2026-11-09T08:31:59.840805Z"
},
{
"index": 59,
"id": "4fb0ee24-5391-472a-b741-9086de056cda",
"name": "碳排放统计",
"width": 196.5,
"height": 446,
"url": "https://alipic.lanhuapp.com/MasterCover6f8cf620ae395f6feef05dbb35fb4ee2.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.885875Z"
},
{
"index": 60,
"id": "e734a5ec-21bb-4fb5-8efb-31cbea24e3e7",
"name": "设备详情",
"width": 196.5,
"height": 461,
"url": "https://alipic.lanhuapp.com/MasterCover20c739a567f246ac566161c1ed2e1503.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.897518Z"
},
{
"index": 61,
"id": "843eeb8f-c587-4cb1-981c-f58d289bb0c3",
"name": "设置定时",
"width": 196.5,
"height": 393.5,
"url": "https://alipic.lanhuapp.com/MasterCover21a52ff9573f37f5df48c5abc5a5c75a.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.863617Z"
},
{
"index": 62,
"id": "67e81d54-e079-4081-a52e-897fe14c5967",
"name": "碳排放详情",
"width": 196.5,
"height": 446,
"url": "https://alipic.lanhuapp.com/MasterCover5f7ad8eb66106020b8d304ebc944e9a8.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.889491Z"
},
{
"index": 63,
"id": "88984514-2726-407c-bac5-7b34a955f181",
"name": "设备操作页",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCoveraf4d81e9d42f434256a155c4419ea4ea.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.878653Z"
},
{
"index": 64,
"id": "accb566b-0258-44cf-9ec0-ca69a09e32b7",
"name": "空首页",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCover5e52a4f013f3a55d57c3cda48b114b30.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.828888Z"
},
{
"index": 65,
"id": "950736dd-8d0c-4714-8f2e-8c374990879c",
"name": "手机验证码登录",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCoverb65da5cca7eacbba6528bde1bd3b49b6.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.816522Z"
},
{
"index": 66,
"id": "ca4404b3-9471-4270-95ea-1156763ed067",
"name": "邮箱登录",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCover61b08f8e34576efd6ee858e3f76ad99b.png",
"has_comment": false,
"update_time": "2026-11-09T08:20:08.244797Z"
},
{
"index": 67,
"id": "11e073f0-4e71-401f-806a-4d1ba2856976",
"name": "页面1",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCover8713b16369b0ad31e05fc8b3b4270545.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.847489Z"
},
{
"index": 68,
"id": "cbce188b-6828-410c-8baa-74f63c460e7c",
"name": "详情",
"width": 196.5,
"height": 402,
"url": "https://alipic.lanhuapp.com/MasterCover67310a2e66a4f7b3769ea51a2344c72e.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.912894Z"
},
{
"index": 69,
"id": "2f5a9af6-2205-48d7-9c70-9a54b6a563e2",
"name": "美食",
"width": 196.5,
"height": 494,
"url": "https://alipic.lanhuapp.com/MasterCover7d03f803448e8201d66922dd3a642d4d.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.951831Z"
},
{
"index": 70,
"id": "cc14e010-1c3c-4502-97f5-9faf483c1655",
"name": "消息中心",
"width": 196.5,
"height": 393.5,
"url": "https://alipic.lanhuapp.com/MasterCover0de1d8ecbbcfc4a8c175a361c8425fa5.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.875253Z"
},
{
"index": 71,
"id": "3b34eb81-d889-44a7-91a4-2b4396eb6602",
"name": "减排明细数据",
"width": 196.5,
"height": 393.5,
"url": "https://alipic.lanhuapp.com/MasterCovera8142a9aecec31b2e8067fe53d284991.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.86997Z"
},
{
"index": 72,
"id": "5b23f1f5-3625-48a3-a456-d572f2aa2a10",
"name": "故障",
"width": 196.5,
"height": 393.5,
"url": "https://alipic.lanhuapp.com/MasterCovereb4bee32773e08f663762e9b157b5305.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.991153Z"
},
{
"index": 73,
"id": "5ba21d6a-b745-4a09-b2bb-622eeee56638",
"name": "设备信息",
"width": 196.5,
"height": 393.5,
"url": "https://alipic.lanhuapp.com/MasterCover379bd2670197363045d142f5f427ad38.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.854844Z"
},
{
"index": 74,
"id": "c74f62dd-1ba2-4d49-bca3-ddc124b4bc6e",
"name": "商品入库",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCoverb20b40ce94d3230e398d8a730a78c9ca.png",
"has_comment": false,
"update_time": "2026-11-09T08:20:08.252874Z"
},
{
"index": 75,
"id": "8b83aff8-48eb-455a-a9eb-94e78818d798",
"name": "商城",
"width": 196.5,
"height": 391,
"url": "https://alipic.lanhuapp.com/MasterCover7301cb2ed5354cb72af3a931213cae15.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.905512Z"
},
{
"index": 76,
"id": "ebdb49a2-4cc2-4934-b7ed-87b7b41992a0",
"name": "商品入库",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCovera07052a786086ade763cb8fb5d99813d.png",
"has_comment": false,
"update_time": "2026-11-09T08:20:08.254672Z"
},
{
"index": 77,
"id": "e1dc0720-3e94-422b-bb20-faf5e6bb2868",
"name": "首页",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCover4dd491e40825b0ece8bcbeff77cd90ce.png",
"has_comment": false,
"update_time": "2026-11-09T08:20:08.25078Z"
},
{
"index": 78,
"id": "5b46dc9f-677b-4c3e-9881-f2420fafbc8f",
"name": "密码登录",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCover8e793a1fb71853fe3461a28e7a097a3b.png",
"has_comment": false,
"update_time": "2026-11-09T08:20:08.248658Z"
},
{
"index": 79,
"id": "9789439e-3147-4ddf-8bf8-7fe715a4e58e",
"name": "页面1",
"width": 196.5,
"height": 402,
"url": "https://alipic.lanhuapp.com/MasterCover7345d8894e5fc237968985c2bdbfd9f6.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.919861Z"
},
{
"index": 80,
"id": "dff47302-5c3d-42b5-93ff-33f19e96c172",
"name": "我的设备",
"width": 196.5,
"height": 402,
"url": "https://alipic.lanhuapp.com/MasterCoverf59e3f1f03542a2980661552b04f2f4d.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.937752Z"
},
{
"index": 81,
"id": "e03f1234-7422-4d5d-bc0c-a6888c27aca5",
"name": "绑定邮箱-修改绑定",
"width": 196.5,
"height": 402,
"url": "https://alipic.lanhuapp.com/MasterCover6c8edec154e16d13d1f709d77d36c4b2.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.930378Z"
},
{
"index": 82,
"id": "a8ad7711-64e4-4b8f-abe1-5fc693befcaa",
"name": "组 139",
"width": 711.5,
"height": 217,
"url": "https://alipic.lanhuapp.com/MasterCover51a412347fb816d7e3e7e483afed95a2.png",
"has_comment": false,
"update_time": "2026-11-09T08:05:41.600562Z"
},
{
"index": 83,
"id": "a24ba568-8ba9-4a29-8524-340022ebe22b",
"name": "评价",
"width": 196.5,
"height": 393,
"url": "https://alipic.lanhuapp.com/MasterCoverfe521dd373315664485f301fbb40801d.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.969516Z"
},
{
"index": 84,
"id": "e8edad89-2c7a-4471-b7ae-b20a861ed196",
"name": "专属客服热线",
"width": 196.5,
"height": 393.5,
"url": "https://alipic.lanhuapp.com/MasterCover478de39f9ca019c8d5630b020086defa.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.998524Z"
}
]
},
"meta": {
"command": "designs",
"version": "1.4.2",
"durationMs": 3656,
"warnings": []
},
"error": null
}

View File

@@ -0,0 +1,12 @@
{
"status": "success",
"design_id": "cdef0f9b-2361-43d7-b906-47c6463d4e1f",
"design_name": "详情",
"version": "f1d50aa0-8508-48bb-956c-7f272f91c91d",
"canvas_size": {
"width": 196.5,
"height": 486.5
},
"total_slices": 0,
"slices": []
}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 910 B

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"44:7581": "icon_message_system_notice"}

View File

@@ -0,0 +1,50 @@
{
"status": "success",
"design_id": "cc14e010-1c3c-4502-97f5-9faf483c1655",
"design_name": "消息中心",
"version": "b6108b46-81f4-4a94-b0ea-77d6ad5b5380",
"canvas_size": {
"width": 196.5,
"height": 393.5
},
"total_slices": 1,
"slices": [
{
"id": "44:7581",
"name": "组 654",
"type": "artboard",
"download_url": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG720e81f6a55378da1a65b63ff2b9f767.png",
"size": "52x52",
"format": "png",
"svg_url": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSliceSVGb05618ef-e2e3-480f-9d2a-7cee8b605ef2.svg",
"scale_urls": {
"1x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG720e81f6a55378da1a65b63ff2b9f767.png?x-oss-process=image/resize,w_52,h_52/format,png",
"2x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG720e81f6a55378da1a65b63ff2b9f767.png?x-oss-process=image/resize,w_104,h_104/format,png",
"3x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG720e81f6a55378da1a65b63ff2b9f767.png?x-oss-process=image/resize,w_156,h_156/format,png",
"ios_1x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG720e81f6a55378da1a65b63ff2b9f767.png?x-oss-process=image/resize,w_52,h_52/format,png",
"ios_2x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG720e81f6a55378da1a65b63ff2b9f767.png?x-oss-process=image/resize,w_104,h_104/format,png",
"ios_3x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG720e81f6a55378da1a65b63ff2b9f767.png?x-oss-process=image/resize,w_156,h_156/format,png",
"android_mdpi": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG720e81f6a55378da1a65b63ff2b9f767.png?x-oss-process=image/resize,w_52,h_52/format,png",
"android_hdpi": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG720e81f6a55378da1a65b63ff2b9f767.png?x-oss-process=image/resize,w_78,h_78/format,png",
"android_xhdpi": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG720e81f6a55378da1a65b63ff2b9f767.png?x-oss-process=image/resize,w_104,h_104/format,png",
"android_xxhdpi": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG720e81f6a55378da1a65b63ff2b9f767.png?x-oss-process=image/resize,w_156,h_156/format,png",
"android_xxxhdpi": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG720e81f6a55378da1a65b63ff2b9f767.png"
},
"logical_size": {
"width": 52,
"height": 52,
"note": "1x logical px; stored at 4x = 208x208px"
},
"position": {
"x": 44,
"y": 148
},
"parent_name": "组 653",
"layer_path": "消息中心/组 652/组 653/组 654",
"metadata": {
"opacity": 1,
"border_radius": []
}
}
]
}

File diff suppressed because one or more lines are too long

857
.lanhu/message_designs.json Normal file
View File

@@ -0,0 +1,857 @@
{
"ok": true,
"data": {
"status": "success",
"project_name": "电饼铛项目",
"total_designs": 84,
"designs": [
{
"index": 1,
"id": "02d56e88-d164-4c6a-aaf6-475ec0fb2ecf",
"name": "首页",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover0ca2ab74f6257a1ef38599fd42b5a63c.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.632679Z"
},
{
"index": 2,
"id": "3bd202ec-29e0-43cf-8ab3-b05367814864",
"name": "详情页3离线",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover257982e29f021f66c62d3a16dd448dce.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.622703Z"
},
{
"index": 3,
"id": "b4ea89a2-29cc-4f1e-8299-59798167a602",
"name": "个人中心",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover2a2224421eb83e91214616bfe0b3fd7d.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.607993Z"
},
{
"index": 4,
"id": "e181192b-7500-4120-8814-fdc6861691bf",
"name": "提货订单统计",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover1f61cffd75324dfc6c853248ca9fd56c.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.597339Z"
},
{
"index": 5,
"id": "055195fd-6925-4f49-8f23-6c46decfca29",
"name": "商品入库2",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCoveraaf90f817c7cdfd3cf83b4d417e5c006.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.586229Z"
},
{
"index": 6,
"id": "ec3ec6ef-f636-4afa-8656-910e19f4fd56",
"name": "待激活设备",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCoverc56c3da0ac1a9ad66fa899ed73985c29.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.575417Z"
},
{
"index": 7,
"id": "3dece5cb-c615-4660-8828-bf4e2b80c95a",
"name": "故障分析",
"width": 196.5,
"height": 591.5,
"url": "https://alipic.lanhuapp.com/MasterCoverbd477bed7fa12ed46c60bdcc1cd6d6a6.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.564322Z"
},
{
"index": 8,
"id": "31a94bdb-a067-4c7c-a8ec-56cfe4d3af5a",
"name": "登录1",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover74d0bf142d82efb5707a1d8c72989989.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.558926Z"
},
{
"index": 9,
"id": "3985ee10-c8cc-45c4-bc7b-db5a3583189e",
"name": "提货核销2",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover3c0c4c24bf3c20844a403f41f909fa29.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.540263Z"
},
{
"index": 10,
"id": "8d83ed46-22d3-41e2-a459-b0a12bb9726e",
"name": "用户管理",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover3acc17af0c371e0e999b21a2d823f2bd.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.515534Z"
},
{
"index": 11,
"id": "b2d1c8a2-8d62-454f-8ad7-53638abf3e3a",
"name": "用户详情",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCoverf60daf6d611f8fd7949da57ae19b25ff.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.525669Z"
},
{
"index": 12,
"id": "26869666-464f-422d-91a2-0b70d52a6765",
"name": "数据统计",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover6feef9e7d68e900ce5193b35d69f8ca0.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.510836Z"
},
{
"index": 13,
"id": "18dc65cb-e6e7-4cc0-9411-93aec5211589",
"name": "商品管理",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover1222992d0bb3b36f84526913482d861f.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.507912Z"
},
{
"index": 14,
"id": "a7aeda8d-6f0a-4b4f-bfe5-c22d3b8fa778",
"name": "详情页1在线",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover64ddadf3ebe07074c7cffba348500789.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.482683Z"
},
{
"index": 15,
"id": "1523b5b4-dd4e-4bd8-a43c-7803fce4c553",
"name": "详情页2故障",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCoverf1c2c3eac72a1f9c8a33044487edf5c3.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.483629Z"
},
{
"index": 16,
"id": "caa6049d-aa89-423f-b3fb-efa155e6cc16",
"name": "单位信息",
"width": 196.5,
"height": 684.5,
"url": "https://alipic.lanhuapp.com/MasterCoverf4c42cc3aa3e7d89c07a5f51e7cfedb4.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.462147Z"
},
{
"index": 17,
"id": "3a64a9a2-b148-49b9-978f-1fe62015f752",
"name": "使用手册",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover6726e5394171f6a985f322b774f2b888.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.448198Z"
},
{
"index": 18,
"id": "90a01613-c734-418a-a2e6-6625cfb4e9e1",
"name": "关于/用户协议/隐私政策",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover1fedad235c7e7151effd4c905d3003e5.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.440547Z"
},
{
"index": 19,
"id": "cd7600bc-28f5-43de-8d4b-1beab5c21235",
"name": "登录2",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover028dc349e2df7c7e2673a7165ba5cfbf.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.429503Z"
},
{
"index": 20,
"id": "3322bbd1-d542-4472-a5ec-a539eb594577",
"name": "提货核销1",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover33f554a36dc5596f424a3f22a285fb16.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.408024Z"
},
{
"index": 21,
"id": "bc2eaf3b-6d22-41d0-9a4a-3293f95384fc",
"name": "客服",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover308ad39151c5637aeabdbd889f46d15f.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.417873Z"
},
{
"index": 22,
"id": "75199f05-584c-4d8f-9901-2978217db041",
"name": "消息中心",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover7d2fdb12f09c4ee543d79c3ef42a3f7d.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.401258Z"
},
{
"index": 23,
"id": "d172dc00-1f17-4205-9d51-69e0e32dd72a",
"name": "商品入库1",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCoverbf40aacc94303363bdb9c7d678756112.png",
"has_comment": false,
"update_time": "2026-11-10T16:08:41.393876Z"
},
{
"index": 24,
"id": "0e17bcc1-5359-4516-a7f9-ee926e19a219",
"name": "页面1",
"width": 196.5,
"height": 556,
"url": "https://alipic.lanhuapp.com/MasterCoverf8363132bd87397401241ad4942ef756.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:48.026197Z"
},
{
"index": 25,
"id": "8dc7eb63-c9b6-4402-97f2-50f733b8146f",
"name": "退款",
"width": 196.5,
"height": 525,
"url": "https://alipic.lanhuapp.com/MasterCovera4e5c711af741e71156b1aeaf391194f.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:48.022664Z"
},
{
"index": 26,
"id": "1c522fe4-c62f-4e23-b222-83c8a18cec77",
"name": "我的评价",
"width": 196.5,
"height": 525,
"url": "https://alipic.lanhuapp.com/MasterCovercacb6c0dfcb19f9cd22d0623739cccb3.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:48.019349Z"
},
{
"index": 27,
"id": "cd97492c-c028-49fb-92c0-dd464a68ec51",
"name": "申请退款",
"width": 196.5,
"height": 525,
"url": "https://alipic.lanhuapp.com/MasterCover003286b2dc9d9f9b0bc43c40cf24c7d3.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:48.015762Z"
},
{
"index": 28,
"id": "2b8bf885-d7c3-4e80-b48a-39b72c55714e",
"name": "优惠券",
"width": 196.5,
"height": 505.5,
"url": "https://alipic.lanhuapp.com/MasterCover48ff5cccc1494a18e84ad9f6221f6d21.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:48.012328Z"
},
{
"index": 29,
"id": "f1e7a9cf-31c0-4d93-8541-81cbcc791319",
"name": "我的订单",
"width": 196.5,
"height": 432.5,
"url": "https://alipic.lanhuapp.com/MasterCover4b68985c2d67d1db044e1afb7d0eb739.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:48.008611Z"
},
{
"index": 30,
"id": "be543b19-02c5-4c80-9dc7-c79170b9492f",
"name": "购物车",
"width": 196.5,
"height": 432.5,
"url": "https://alipic.lanhuapp.com/MasterCover97b784bf50c2fcae7af6eaee5b593a85.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:48.00525Z"
},
{
"index": 31,
"id": "f5486036-61ac-48eb-800e-9c94e4044ae2",
"name": "购物车",
"width": 196.5,
"height": 396,
"url": "https://alipic.lanhuapp.com/MasterCover6aa542be3583747e762a3814292c31d0.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:48.001731Z"
},
{
"index": 32,
"id": "b51487c3-0c59-41c5-ac8a-caf3d9ec1e03",
"name": "我的团队",
"width": 196.5,
"height": 393.5,
"url": "https://alipic.lanhuapp.com/MasterCoverb0373872e7bbe6d15c85aac731adc553.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.995086Z"
},
{
"index": 33,
"id": "7ef03b31-224a-4a12-b4bb-0e50993fac9d",
"name": "分享收益",
"width": 196.5,
"height": 393.5,
"url": "https://alipic.lanhuapp.com/MasterCover48a2ef45a758cfe12e5a908d1b699632.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.987551Z"
},
{
"index": 34,
"id": "635b82be-74cc-4bad-ad07-10e4c9dfb1c9",
"name": "分享收益",
"width": 196.5,
"height": 393.5,
"url": "https://alipic.lanhuapp.com/MasterCoverce4f9a4be2e220fd4992ab99eb0d682e.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.984255Z"
},
{
"index": 35,
"id": "c59098c4-8117-4b8f-adb2-0109ab429960",
"name": "编辑",
"width": 196.5,
"height": 393,
"url": "https://alipic.lanhuapp.com/MasterCover4acb28ac4ee4f338ef83bd3e0db43346.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.980244Z"
},
{
"index": 36,
"id": "362c91f9-f324-4a22-84b8-566c73469608",
"name": "新增",
"width": 196.5,
"height": 393,
"url": "https://alipic.lanhuapp.com/MasterCoverf875729d4351ebb7d67d15fcd94aafce.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.976864Z"
},
{
"index": 37,
"id": "c081b034-376c-4c85-ae4e-535152a9ec71",
"name": "收货地址",
"width": 196.5,
"height": 393,
"url": "https://alipic.lanhuapp.com/MasterCoverf2a023c2b8274e63a3e815f544328b9c.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.972878Z"
},
{
"index": 38,
"id": "cf9fde6f-1c24-4431-90d1-cd94724b700a",
"name": "组 266",
"width": 165,
"height": 170.5,
"url": "https://alipic.lanhuapp.com/MasterCover65c2a21a3d1fd86f5dca9b63abbf7241.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.962429Z"
},
{
"index": 39,
"id": "cdef0f9b-2361-43d7-b906-47c6463d4e1f",
"name": "详情",
"width": 196.5,
"height": 486.5,
"url": "https://alipic.lanhuapp.com/MasterCoveraec8ea002491d585f95ed31e44d639cd.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.948478Z"
},
{
"index": 40,
"id": "bc20f58d-163b-4c5c-b86a-2e904a29066d",
"name": "积分订单",
"width": 196.5,
"height": 483.5,
"url": "https://alipic.lanhuapp.com/MasterCoverc3bb5b5c72b2b2e5d47f3ccf1dace435.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.94476Z"
},
{
"index": 41,
"id": "0e54f35b-153d-4f49-a090-9a729f93abd9",
"name": "推广码",
"width": 196.5,
"height": 402,
"url": "https://alipic.lanhuapp.com/MasterCover62a2031be6bcf00da691f8f3166cb977.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.934047Z"
},
{
"index": 42,
"id": "fc264a99-b383-4493-bde7-7e33788fbca7",
"name": "绑定手机号-已绑定",
"width": 196.5,
"height": 402,
"url": "https://alipic.lanhuapp.com/MasterCover31e5612cd45ac6af3b6f8508c6ab1e4b.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.92704Z"
},
{
"index": 43,
"id": "e5193dd6-ca70-43e5-96f0-ab4c9d47bcd2",
"name": "弹窗",
"width": 196.5,
"height": 402,
"url": "https://alipic.lanhuapp.com/MasterCover691292e6b9d53cee5f202516362489fc.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.92319Z"
},
{
"index": 44,
"id": "c7ac8b0c-0ee6-4182-80ec-1703847f4da7",
"name": "查看全部",
"width": 196.5,
"height": 372,
"url": "https://alipic.lanhuapp.com/MasterCover5d918b3b92a666a3218689c595cbb795.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.901177Z"
},
{
"index": 45,
"id": "1cb83b22-f4a0-43f9-9efe-1c325452ac86",
"name": "定时",
"width": 196.5,
"height": 393.5,
"url": "https://alipic.lanhuapp.com/MasterCover07ef6f140a5186844a5fac43175bcf79.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.858347Z"
},
{
"index": 46,
"id": "e2e52d03-53a3-42a1-8e55-94f8c1358e6f",
"name": "设备定位",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCoverc09b14917f1ca043e6dae94bb9289a1c.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.851192Z"
},
{
"index": 47,
"id": "6b0a75f7-c29b-40b0-850c-1573961ed552",
"name": "正在配网",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCover0de7b9710dd10df7789851ca77e0c63f.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.843878Z"
},
{
"index": 48,
"id": "0cb8e2f7-66c8-4918-900f-93f4132ce8a1",
"name": "wifi连接设备",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCover9cfad224e3b86ed3aed3dcd8c375ad8e.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.840275Z"
},
{
"index": 49,
"id": "5ca72163-0bca-4a0a-a3de-9820ebc5ce30",
"name": "浮层",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCover30a67f4ff5f35f7936010c4a5e636e8d.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.836729Z"
},
{
"index": 50,
"id": "78c82ccc-a50a-41ae-9350-7025d732c95a",
"name": "蓝牙连接设备",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCover72765d2d90e56c97794f99351761d3c7.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.832579Z"
},
{
"index": 51,
"id": "242b3037-6e46-4c36-8c25-5428036b6070",
"name": "查看自提点",
"width": 196.5,
"height": 393,
"url": "https://alipic.lanhuapp.com/MasterCovera1e92d4c3697cb34397ec31a7a6aac48.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.965864Z"
},
{
"index": 52,
"id": "03773c81-720c-42bb-bcbf-d9da1cb7d961",
"name": "个人中心",
"width": 196.5,
"height": 781,
"url": "https://alipic.lanhuapp.com/MasterCover175dc0272fa91da5adc80b9b82f493b7.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.958869Z"
},
{
"index": 53,
"id": "489c3e4e-c9f5-4a50-aefb-798782c2c5b9",
"name": "页面1",
"width": 196.5,
"height": 575.5,
"url": "https://alipic.lanhuapp.com/MasterCover706dfaa108d6dc9252a093769b89fb92.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.955422Z"
},
{
"index": 54,
"id": "a25e7ed0-b592-4b50-a110-09f000e43ff6",
"name": "积分记录",
"width": 196.5,
"height": 483.5,
"url": "https://alipic.lanhuapp.com/MasterCovere4e495ce31f1be65592a25de0916a61a.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.94133Z"
},
{
"index": 55,
"id": "5ebb9453-c1e5-439b-8a36-f5005c617afd",
"name": "支付",
"width": 196.5,
"height": 402,
"url": "https://alipic.lanhuapp.com/MasterCoverddaba8a6f3536bc4bb1ba0b13b7812b4.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.916208Z"
},
{
"index": 56,
"id": "1f758184-0800-4b66-8ef7-7464bc523712",
"name": "详情",
"width": 196.5,
"height": 402,
"url": "https://alipic.lanhuapp.com/MasterCover8a903af0ffc3ac5cceb321b7b42a745d.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.909175Z"
},
{
"index": 57,
"id": "9c1b4080-d8df-41ce-9624-fdec9553c9a8",
"name": "碳积分",
"width": 196.5,
"height": 446,
"url": "https://alipic.lanhuapp.com/MasterCovera79e99dbd1152c490954d4917626cc11.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.89392Z"
},
{
"index": 58,
"id": "01b3bba9-170b-4636-bb33-8a31c855443b",
"name": "首页",
"width": 196.5,
"height": 431.5,
"url": "https://alipic.lanhuapp.com/MasterCover2f7e8aef4b39fe3585b570f2498e8215.png",
"has_comment": false,
"update_time": "2026-11-09T08:31:59.840805Z"
},
{
"index": 59,
"id": "4fb0ee24-5391-472a-b741-9086de056cda",
"name": "碳排放统计",
"width": 196.5,
"height": 446,
"url": "https://alipic.lanhuapp.com/MasterCover6f8cf620ae395f6feef05dbb35fb4ee2.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.885875Z"
},
{
"index": 60,
"id": "e734a5ec-21bb-4fb5-8efb-31cbea24e3e7",
"name": "设备详情",
"width": 196.5,
"height": 461,
"url": "https://alipic.lanhuapp.com/MasterCover20c739a567f246ac566161c1ed2e1503.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.897518Z"
},
{
"index": 61,
"id": "843eeb8f-c587-4cb1-981c-f58d289bb0c3",
"name": "设置定时",
"width": 196.5,
"height": 393.5,
"url": "https://alipic.lanhuapp.com/MasterCover21a52ff9573f37f5df48c5abc5a5c75a.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.863617Z"
},
{
"index": 62,
"id": "67e81d54-e079-4081-a52e-897fe14c5967",
"name": "碳排放详情",
"width": 196.5,
"height": 446,
"url": "https://alipic.lanhuapp.com/MasterCover5f7ad8eb66106020b8d304ebc944e9a8.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.889491Z"
},
{
"index": 63,
"id": "88984514-2726-407c-bac5-7b34a955f181",
"name": "设备操作页",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCoveraf4d81e9d42f434256a155c4419ea4ea.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.878653Z"
},
{
"index": 64,
"id": "accb566b-0258-44cf-9ec0-ca69a09e32b7",
"name": "空首页",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCover5e52a4f013f3a55d57c3cda48b114b30.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.828888Z"
},
{
"index": 65,
"id": "950736dd-8d0c-4714-8f2e-8c374990879c",
"name": "手机验证码登录",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCoverb65da5cca7eacbba6528bde1bd3b49b6.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.816522Z"
},
{
"index": 66,
"id": "ca4404b3-9471-4270-95ea-1156763ed067",
"name": "邮箱登录",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCover61b08f8e34576efd6ee858e3f76ad99b.png",
"has_comment": false,
"update_time": "2026-11-09T08:20:08.244797Z"
},
{
"index": 67,
"id": "11e073f0-4e71-401f-806a-4d1ba2856976",
"name": "页面1",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCover8713b16369b0ad31e05fc8b3b4270545.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.847489Z"
},
{
"index": 68,
"id": "cbce188b-6828-410c-8baa-74f63c460e7c",
"name": "详情",
"width": 196.5,
"height": 402,
"url": "https://alipic.lanhuapp.com/MasterCover67310a2e66a4f7b3769ea51a2344c72e.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.912894Z"
},
{
"index": 69,
"id": "2f5a9af6-2205-48d7-9c70-9a54b6a563e2",
"name": "美食",
"width": 196.5,
"height": 494,
"url": "https://alipic.lanhuapp.com/MasterCover7d03f803448e8201d66922dd3a642d4d.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.951831Z"
},
{
"index": 70,
"id": "cc14e010-1c3c-4502-97f5-9faf483c1655",
"name": "消息中心",
"width": 196.5,
"height": 393.5,
"url": "https://alipic.lanhuapp.com/MasterCover0de1d8ecbbcfc4a8c175a361c8425fa5.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.875253Z"
},
{
"index": 71,
"id": "3b34eb81-d889-44a7-91a4-2b4396eb6602",
"name": "减排明细数据",
"width": 196.5,
"height": 393.5,
"url": "https://alipic.lanhuapp.com/MasterCovera8142a9aecec31b2e8067fe53d284991.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.86997Z"
},
{
"index": 72,
"id": "5b23f1f5-3625-48a3-a456-d572f2aa2a10",
"name": "故障",
"width": 196.5,
"height": 393.5,
"url": "https://alipic.lanhuapp.com/MasterCovereb4bee32773e08f663762e9b157b5305.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.991153Z"
},
{
"index": 73,
"id": "5ba21d6a-b745-4a09-b2bb-622eeee56638",
"name": "设备信息",
"width": 196.5,
"height": 393.5,
"url": "https://alipic.lanhuapp.com/MasterCover379bd2670197363045d142f5f427ad38.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.854844Z"
},
{
"index": 74,
"id": "c74f62dd-1ba2-4d49-bca3-ddc124b4bc6e",
"name": "商品入库",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCoverb20b40ce94d3230e398d8a730a78c9ca.png",
"has_comment": false,
"update_time": "2026-11-09T08:20:08.252874Z"
},
{
"index": 75,
"id": "8b83aff8-48eb-455a-a9eb-94e78818d798",
"name": "商城",
"width": 196.5,
"height": 391,
"url": "https://alipic.lanhuapp.com/MasterCover7301cb2ed5354cb72af3a931213cae15.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.905512Z"
},
{
"index": 76,
"id": "ebdb49a2-4cc2-4934-b7ed-87b7b41992a0",
"name": "商品入库",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCovera07052a786086ade763cb8fb5d99813d.png",
"has_comment": false,
"update_time": "2026-11-09T08:20:08.254672Z"
},
{
"index": 77,
"id": "e1dc0720-3e94-422b-bb20-faf5e6bb2868",
"name": "首页",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCover4dd491e40825b0ece8bcbeff77cd90ce.png",
"has_comment": false,
"update_time": "2026-11-09T08:20:08.25078Z"
},
{
"index": 78,
"id": "5b46dc9f-677b-4c3e-9881-f2420fafbc8f",
"name": "密码登录",
"width": 196.5,
"height": 417.5,
"url": "https://alipic.lanhuapp.com/MasterCover8e793a1fb71853fe3461a28e7a097a3b.png",
"has_comment": false,
"update_time": "2026-11-09T08:20:08.248658Z"
},
{
"index": 79,
"id": "9789439e-3147-4ddf-8bf8-7fe715a4e58e",
"name": "页面1",
"width": 196.5,
"height": 402,
"url": "https://alipic.lanhuapp.com/MasterCover7345d8894e5fc237968985c2bdbfd9f6.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.919861Z"
},
{
"index": 80,
"id": "dff47302-5c3d-42b5-93ff-33f19e96c172",
"name": "我的设备",
"width": 196.5,
"height": 402,
"url": "https://alipic.lanhuapp.com/MasterCoverf59e3f1f03542a2980661552b04f2f4d.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.937752Z"
},
{
"index": 81,
"id": "e03f1234-7422-4d5d-bc0c-a6888c27aca5",
"name": "绑定邮箱-修改绑定",
"width": 196.5,
"height": 402,
"url": "https://alipic.lanhuapp.com/MasterCover6c8edec154e16d13d1f709d77d36c4b2.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.930378Z"
},
{
"index": 82,
"id": "a8ad7711-64e4-4b8f-abe1-5fc693befcaa",
"name": "组 139",
"width": 711.5,
"height": 217,
"url": "https://alipic.lanhuapp.com/MasterCover51a412347fb816d7e3e7e483afed95a2.png",
"has_comment": false,
"update_time": "2026-11-09T08:05:41.600562Z"
},
{
"index": 83,
"id": "a24ba568-8ba9-4a29-8524-340022ebe22b",
"name": "评价",
"width": 196.5,
"height": 393,
"url": "https://alipic.lanhuapp.com/MasterCoverfe521dd373315664485f301fbb40801d.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.969516Z"
},
{
"index": 84,
"id": "e8edad89-2c7a-4471-b7ae-b20a861ed196",
"name": "专属客服热线",
"width": 196.5,
"height": 393.5,
"url": "https://alipic.lanhuapp.com/MasterCover478de39f9ca019c8d5630b020086defa.png",
"has_comment": false,
"update_time": "2026-11-09T08:07:47.998524Z"
}
]
},
"meta": {
"command": "designs",
"version": "1.4.2",
"durationMs": 1650,
"warnings": []
},
"error": null
}

File diff suppressed because one or more lines are too long

BIN
.lanhu/shop_20/商城.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
[]

1
.lanhu/shop_20_raw.json Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,12 @@
{
"status": "success",
"design_id": "1beca6fc-692d-4b35-a4c7-4a35d0b43864",
"design_name": "商城",
"version": "ed8c7f85-c4c9-49b1-8610-d25597fe1ce2",
"canvas_size": {
"width": 196.5,
"height": 426
},
"total_slices": 0,
"slices": []
}

864
.lanhu/shop_20_specs.json Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 KiB

File diff suppressed because one or more lines are too long

54
.lanhu/shop_3_photos.json Normal file
View File

@@ -0,0 +1,54 @@
[
{
"name": "组 1655",
"frame": {
"left": 78,
"top": 719,
"height": 14,
"width": 14
},
"image": {
"imageUrl": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNGda331ab13a199bdbb4531f06143ecf11.png",
"svgUrl": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSliceSVGac343efb-8bca-4afc-a854-1fa80ccbb083.svg"
}
},
{
"name": "组 1656",
"frame": {
"left": 78,
"top": 697,
"height": 14,
"width": 14
},
"image": {
"imageUrl": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG0779cabde5679529d2abaa30db842502.png",
"svgUrl": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSliceSVG0a73fa3e-7770-40d0-9275-2e01dc696d1f.svg"
}
},
{
"name": "组 944",
"frame": {
"left": 36.72509765625,
"top": 767,
"height": 22,
"width": 22
},
"image": {
"imageUrl": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG0b8b7a71668b47f314d7046e17aed108.png",
"svgUrl": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSliceSVG6a1ad062-5c8d-49f9-b32b-c78132b3146c.svg"
}
},
{
"name": "图标 102",
"frame": {
"left": 36.72509765625,
"top": 767,
"height": 22,
"width": 22
},
"image": {
"imageUrl": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG87342e3d0365d66655b7d8756831393d.png",
"svgUrl": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSliceSVG4f25f360-9e1b-4fc5-ad69-d2a6240dc991.svg"
}
}
]

1
.lanhu/shop_3_raw.json Normal file

File diff suppressed because one or more lines are too long

161
.lanhu/shop_3_slices.json Normal file
View File

@@ -0,0 +1,161 @@
{
"status": "success",
"design_id": "a96d9677-d542-4814-b8ef-819bf78b445f",
"design_name": "商品详情1",
"version": "8cad4bb6-1c9a-4456-93b4-b23fcd03883f",
"canvas_size": {
"width": 196.5,
"height": 426
},
"total_slices": 4,
"slices": [
{
"id": "83:45802",
"name": "组 1655",
"type": "groupLayer",
"download_url": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNGda331ab13a199bdbb4531f06143ecf11.png",
"size": "14x14",
"format": "png",
"svg_url": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSliceSVGac343efb-8bca-4afc-a854-1fa80ccbb083.svg",
"scale_urls": {
"1x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNGda331ab13a199bdbb4531f06143ecf11.png?x-oss-process=image/resize,w_14,h_14/format,png",
"2x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNGda331ab13a199bdbb4531f06143ecf11.png?x-oss-process=image/resize,w_28,h_28/format,png",
"3x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNGda331ab13a199bdbb4531f06143ecf11.png?x-oss-process=image/resize,w_42,h_42/format,png",
"ios_1x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNGda331ab13a199bdbb4531f06143ecf11.png?x-oss-process=image/resize,w_14,h_14/format,png",
"ios_2x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNGda331ab13a199bdbb4531f06143ecf11.png?x-oss-process=image/resize,w_28,h_28/format,png",
"ios_3x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNGda331ab13a199bdbb4531f06143ecf11.png?x-oss-process=image/resize,w_42,h_42/format,png",
"android_mdpi": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNGda331ab13a199bdbb4531f06143ecf11.png?x-oss-process=image/resize,w_14,h_14/format,png",
"android_hdpi": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNGda331ab13a199bdbb4531f06143ecf11.png?x-oss-process=image/resize,w_21,h_21/format,png",
"android_xhdpi": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNGda331ab13a199bdbb4531f06143ecf11.png?x-oss-process=image/resize,w_28,h_28/format,png",
"android_xxhdpi": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNGda331ab13a199bdbb4531f06143ecf11.png?x-oss-process=image/resize,w_42,h_42/format,png",
"android_xxxhdpi": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNGda331ab13a199bdbb4531f06143ecf11.png"
},
"logical_size": {
"width": 14,
"height": 14,
"note": "1x logical px; stored at 4x = 56x56px"
},
"position": {
"x": 78,
"y": 719
},
"parent_name": "组 246",
"layer_path": "商品详情1/组 246/组 1655",
"metadata": {
"opacity": 1,
"border_radius": []
}
},
{
"id": "83:45789",
"name": "组 1656",
"type": "groupLayer",
"download_url": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG0779cabde5679529d2abaa30db842502.png",
"size": "14x14",
"format": "png",
"svg_url": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSliceSVG0a73fa3e-7770-40d0-9275-2e01dc696d1f.svg",
"scale_urls": {
"1x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG0779cabde5679529d2abaa30db842502.png?x-oss-process=image/resize,w_14,h_14/format,png",
"2x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG0779cabde5679529d2abaa30db842502.png?x-oss-process=image/resize,w_28,h_28/format,png",
"3x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG0779cabde5679529d2abaa30db842502.png?x-oss-process=image/resize,w_42,h_42/format,png",
"ios_1x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG0779cabde5679529d2abaa30db842502.png?x-oss-process=image/resize,w_14,h_14/format,png",
"ios_2x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG0779cabde5679529d2abaa30db842502.png?x-oss-process=image/resize,w_28,h_28/format,png",
"ios_3x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG0779cabde5679529d2abaa30db842502.png?x-oss-process=image/resize,w_42,h_42/format,png",
"android_mdpi": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG0779cabde5679529d2abaa30db842502.png?x-oss-process=image/resize,w_14,h_14/format,png",
"android_hdpi": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG0779cabde5679529d2abaa30db842502.png?x-oss-process=image/resize,w_21,h_21/format,png",
"android_xhdpi": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG0779cabde5679529d2abaa30db842502.png?x-oss-process=image/resize,w_28,h_28/format,png",
"android_xxhdpi": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG0779cabde5679529d2abaa30db842502.png?x-oss-process=image/resize,w_42,h_42/format,png",
"android_xxxhdpi": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG0779cabde5679529d2abaa30db842502.png"
},
"logical_size": {
"width": 14,
"height": 14,
"note": "1x logical px; stored at 4x = 56x56px"
},
"position": {
"x": 78,
"y": 697
},
"parent_name": "组 246",
"layer_path": "商品详情1/组 246/组 1656",
"metadata": {
"opacity": 1,
"border_radius": []
}
},
{
"id": "83:45916",
"name": "组 944",
"type": "artboard",
"download_url": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG0b8b7a71668b47f314d7046e17aed108.png",
"size": "22x22",
"format": "png",
"svg_url": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSliceSVG6a1ad062-5c8d-49f9-b32b-c78132b3146c.svg",
"scale_urls": {
"1x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG0b8b7a71668b47f314d7046e17aed108.png?x-oss-process=image/resize,w_22,h_22/format,png",
"2x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG0b8b7a71668b47f314d7046e17aed108.png?x-oss-process=image/resize,w_44,h_44/format,png",
"3x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG0b8b7a71668b47f314d7046e17aed108.png?x-oss-process=image/resize,w_66,h_66/format,png",
"ios_1x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG0b8b7a71668b47f314d7046e17aed108.png?x-oss-process=image/resize,w_22,h_22/format,png",
"ios_2x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG0b8b7a71668b47f314d7046e17aed108.png?x-oss-process=image/resize,w_44,h_44/format,png",
"ios_3x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG0b8b7a71668b47f314d7046e17aed108.png?x-oss-process=image/resize,w_66,h_66/format,png",
"android_mdpi": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG0b8b7a71668b47f314d7046e17aed108.png?x-oss-process=image/resize,w_22,h_22/format,png",
"android_hdpi": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG0b8b7a71668b47f314d7046e17aed108.png?x-oss-process=image/resize,w_33,h_33/format,png",
"android_xhdpi": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG0b8b7a71668b47f314d7046e17aed108.png?x-oss-process=image/resize,w_44,h_44/format,png",
"android_xxhdpi": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG0b8b7a71668b47f314d7046e17aed108.png?x-oss-process=image/resize,w_66,h_66/format,png",
"android_xxxhdpi": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG0b8b7a71668b47f314d7046e17aed108.png"
},
"logical_size": {
"width": 22,
"height": 22,
"note": "1x logical px; stored at 4x = 88x88px"
},
"position": {
"x": 37,
"y": 767
},
"parent_name": "组 943",
"layer_path": "商品详情1/组 942/组 943/组 944",
"metadata": {
"opacity": 1,
"border_radius": []
}
},
{
"id": "83:45917",
"name": "图标 102",
"type": "artboard",
"download_url": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG87342e3d0365d66655b7d8756831393d.png",
"size": "22x22",
"format": "png",
"svg_url": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSliceSVG4f25f360-9e1b-4fc5-ad69-d2a6240dc991.svg",
"scale_urls": {
"1x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG87342e3d0365d66655b7d8756831393d.png?x-oss-process=image/resize,w_22,h_22/format,png",
"2x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG87342e3d0365d66655b7d8756831393d.png?x-oss-process=image/resize,w_44,h_44/format,png",
"3x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG87342e3d0365d66655b7d8756831393d.png?x-oss-process=image/resize,w_66,h_66/format,png",
"ios_1x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG87342e3d0365d66655b7d8756831393d.png?x-oss-process=image/resize,w_22,h_22/format,png",
"ios_2x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG87342e3d0365d66655b7d8756831393d.png?x-oss-process=image/resize,w_44,h_44/format,png",
"ios_3x": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG87342e3d0365d66655b7d8756831393d.png?x-oss-process=image/resize,w_66,h_66/format,png",
"android_mdpi": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG87342e3d0365d66655b7d8756831393d.png?x-oss-process=image/resize,w_22,h_22/format,png",
"android_hdpi": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG87342e3d0365d66655b7d8756831393d.png?x-oss-process=image/resize,w_33,h_33/format,png",
"android_xhdpi": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG87342e3d0365d66655b7d8756831393d.png?x-oss-process=image/resize,w_44,h_44/format,png",
"android_xxhdpi": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG87342e3d0365d66655b7d8756831393d.png?x-oss-process=image/resize,w_66,h_66/format,png",
"android_xxxhdpi": "https://lanhu-oss-2537-2.lanhuapp.com/MasterSlicePNG87342e3d0365d66655b7d8756831393d.png"
},
"logical_size": {
"width": 22,
"height": 22,
"note": "1x logical px; stored at 4x = 88x88px"
},
"position": {
"x": 37,
"y": 767
},
"parent_name": "组 944",
"layer_path": "商品详情1/组 942/组 943/组 944/图标 102",
"metadata": {
"opacity": 1,
"border_radius": []
}
}
]
}

460
.lanhu/shop_3_specs.json Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"83:45802": "icon_shop_location", "83:45789": "icon_shop_phone", "83:45916": "icon_shop_cart"}

1
.lanhu/shop_assets.json Normal file

File diff suppressed because one or more lines are too long

717
.lanhu/shop_designs.json Normal file
View File

@@ -0,0 +1,717 @@
{
"ok": true,
"data": {
"status": "success",
"project_name": "电饼铛",
"total_designs": 70,
"designs": [
{
"index": 1,
"id": "b07050a2-b8f7-421f-a96e-264a07b28252",
"name": "单位信息",
"width": 196.5,
"height": 689.5,
"url": "https://alipic.lanhuapp.com/MasterCoverfce9876cebce77d5d233d36ce6dad4e5.png",
"has_comment": false,
"update_time": "2026-11-12T11:04:35.731249Z"
},
{
"index": 2,
"id": "aed6fc8e-60e7-4659-8b83-fa474e02b884",
"name": "登录1",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCoverb7477df13bfb417f9a1ae3f6c86f9dc1.png",
"has_comment": false,
"update_time": "2026-11-12T10:19:49.715894Z"
},
{
"index": 3,
"id": "a96d9677-d542-4814-b8ef-819bf78b445f",
"name": "商品详情1",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCoverb3f4ef94ce54cf340125b52bc9681547.png",
"has_comment": false,
"update_time": "2026-11-12T10:02:17.358928Z"
},
{
"index": 4,
"id": "654b7f19-c3bd-452d-bc8d-a5d6dafd96ad",
"name": "登录2",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover418ebccca5c6f371d286a55a6b1740f5.png",
"has_comment": false,
"update_time": "2026-11-12T10:00:13.663119Z"
},
{
"index": 5,
"id": "a92dc2f5-1536-4c88-935b-fb4709753957",
"name": "登录3",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover7f007dae5cc33ce3dc0730f187433d1b.png",
"has_comment": false,
"update_time": "2026-11-12T10:00:13.632936Z"
},
{
"index": 6,
"id": "b58aa011-dc68-47cf-83a9-838e5d4177cf",
"name": "语言",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover3df5e25d93ffa2a109b9d6aac6502078.png",
"has_comment": false,
"update_time": "2026-11-12T09:58:59.362329Z"
},
{
"index": 7,
"id": "1224d35b-12e4-402a-8148-e3696ba1eb83",
"name": "优惠券2",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover216bf0f7c23317d2e10315e979f73e98.png",
"has_comment": false,
"update_time": "2026-11-12T09:57:20.131223Z"
},
{
"index": 8,
"id": "5ecb3e55-06f4-4eda-9e42-a85e859c7cb9",
"name": "已通过/已拒绝",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover4ebd0d22582410c2e8e35a9687e9121a.png",
"has_comment": false,
"update_time": "2026-11-12T09:56:19.472755Z"
},
{
"index": 9,
"id": "49ecbf5e-0f31-4307-b42d-1ed4cb5fbfb0",
"name": "选择自提点",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCoverb10a23e898fd09c5f8f0e20996194aac.png",
"has_comment": false,
"update_time": "2026-11-12T09:48:38.289844Z"
},
{
"index": 10,
"id": "614d5ab2-7198-4119-a06c-027e3e1c9ca4",
"name": "登录4",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover3f0c7f54161a595529af36c9bfde2bbb.png",
"has_comment": false,
"update_time": "2026-11-12T10:00:13.649365Z"
},
{
"index": 11,
"id": "b59c03de-552b-4328-a1c2-3c19d15871f1",
"name": "购买成功",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover804a6e9dc0ee9b85e87689664263ad06.png",
"has_comment": false,
"update_time": "2026-11-12T08:59:24.924444Z"
},
{
"index": 12,
"id": "c3402436-6e12-48a1-b50d-8cd3ad3d21ea",
"name": "购物车3",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCovereb070cd0c806f39002e001d222a9fd75.png",
"has_comment": false,
"update_time": "2026-11-12T08:58:02.913677Z"
},
{
"index": 13,
"id": "6cae62bc-a2d4-4977-943c-b2d12a124c16",
"name": "退款2",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover521b02761f64ebf160708c40ca2c94f5.png",
"has_comment": false,
"update_time": "2026-11-12T08:58:02.895356Z"
},
{
"index": 14,
"id": "a7c1b7e7-2595-479c-b3b0-34c2c496a974",
"name": "用户详情",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCoverb0aacb904fd8219ca39c8bde8651d6e0.png",
"has_comment": false,
"update_time": "2026-11-12T08:51:08.635686Z"
},
{
"index": 15,
"id": "f88e202b-c19f-4c18-b049-01e65e670a4b",
"name": "设备操作",
"width": 196.5,
"height": 531.5,
"url": "https://alipic.lanhuapp.com/MasterCoverd54f31ad126d957695857ce632469ecc.png",
"has_comment": false,
"update_time": "2026-11-12T08:42:45.175518Z"
},
{
"index": 16,
"id": "0615b906-e01f-4358-b85f-1c5583cef07f",
"name": "美食2",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover5935cb34698fb468f6bb07a0a640dff0.png",
"has_comment": false,
"update_time": "2026-11-12T08:42:45.172273Z"
},
{
"index": 17,
"id": "23f399b0-e97a-4fec-8a8c-c6d577e63e3c",
"name": "美食2",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCoverba3b75f23fb1d6945af017090f24af5b.png",
"has_comment": false,
"update_time": "2026-11-12T08:42:45.17078Z"
},
{
"index": 18,
"id": "c0928f37-8802-442d-901e-fb128711aa85",
"name": "报修工单2待处理",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover78e479374d166d5eaa2ab67fc8a101f1.png",
"has_comment": false,
"update_time": "2026-11-12T08:42:45.168971Z"
},
{
"index": 19,
"id": "677727d1-9edf-4027-ad9c-7f42737f633c",
"name": "线上支付无地址",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover10bfe21c625ff73ac481ac4579e6e77e.png",
"has_comment": false,
"update_time": "2026-11-12T08:42:45.167295Z"
},
{
"index": 20,
"id": "1beca6fc-692d-4b35-a4c7-4a35d0b43864",
"name": "商城",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover060e54cc9a813e9d1213be472ff26802.png",
"has_comment": false,
"update_time": "2026-11-12T08:42:45.162289Z"
},
{
"index": 21,
"id": "4b53b612-b124-481e-b1a1-d3de88e0f3cf",
"name": "首页",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCovereed56315b98e9ebf019cd6427091e0df.png",
"has_comment": false,
"update_time": "2026-11-12T08:42:45.160226Z"
},
{
"index": 22,
"id": "8da26fba-0813-4a48-bb3b-626ee7eb318d",
"name": "空首页",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCoverb71b0d283c9880ecb2e7e02773c94b66.png",
"has_comment": false,
"update_time": "2026-11-12T08:42:45.158384Z"
},
{
"index": 23,
"id": "6d203861-7b82-46c9-9c5e-6cf3313481ca",
"name": "容器 132",
"width": 196.5,
"height": 30,
"url": "https://alipic.lanhuapp.com/MasterCover73b908cb42b6fd3cd7a38954dce704bc.png",
"has_comment": false,
"update_time": "2026-11-12T08:42:45.15497Z"
},
{
"index": 24,
"id": "05a3deb2-96fa-4e61-b349-f2e8a9aa5a0a",
"name": "个人中心",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover159fa5e76812b7ea8626926e2610417a.png",
"has_comment": false,
"update_time": "2026-11-12T08:42:45.152783Z"
},
{
"index": 25,
"id": "0ce134ca-b4b2-4387-85d5-3f3f8707fd26",
"name": "优惠券选择",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover5408acd82d035631a6715fc72505e2b1.png",
"has_comment": false,
"update_time": "2026-11-12T08:42:45.165768Z"
},
{
"index": 26,
"id": "d4bad447-3ea9-4425-98d1-e87d9279b64e",
"name": "美食1",
"width": 196.5,
"height": 513.5,
"url": "https://alipic.lanhuapp.com/MasterCoverd0d376393599217aaa88cc44d46cd727.png",
"has_comment": false,
"update_time": "2026-11-12T08:42:45.174042Z"
},
{
"index": 27,
"id": "249aa851-16ef-4f0d-9578-d98e8a9552db",
"name": "容器 133",
"width": 196.5,
"height": 30,
"url": "https://alipic.lanhuapp.com/MasterCover8fb1cc84cbfb96782762e049b223bc10.png",
"has_comment": false,
"update_time": "2026-11-12T08:42:45.156938Z"
},
{
"index": 28,
"id": "c0ce296f-2aee-4c14-ab5e-579ead6a63b8",
"name": "报修工单1待处理",
"width": 196.5,
"height": 628,
"url": "https://alipic.lanhuapp.com/MasterCoverb6bb0c77aebe2fef17f4aeded5782454.png",
"has_comment": false,
"update_time": "2026-11-12T08:34:29.254605Z"
},
{
"index": 29,
"id": "edacb339-ea36-4453-b3b6-f11ea1819d29",
"name": "待发货1",
"width": 196.5,
"height": 448,
"url": "https://alipic.lanhuapp.com/MasterCoverd6764b0cf170199966b7abafd139286e.png",
"has_comment": false,
"update_time": "2026-11-12T08:34:29.24977Z"
},
{
"index": 30,
"id": "a1aa32bd-db04-49ed-83c2-e3b1c5875776",
"name": "待发货2",
"width": 196.5,
"height": 429.5,
"url": "https://alipic.lanhuapp.com/MasterCoverc90fdd5600c365487db0a4fe46d84706.png",
"has_comment": false,
"update_time": "2026-11-12T08:34:29.245407Z"
},
{
"index": 31,
"id": "8adbd297-9c40-4238-8190-253d5874d466",
"name": "优惠券1",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover92be7879734494e25f203f345cc15726.png",
"has_comment": false,
"update_time": "2026-11-12T08:34:29.242313Z"
},
{
"index": 32,
"id": "bf756850-3f7f-44bd-a2a1-aae6e3be862e",
"name": "审核中",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCoverde571ca99f81193fc074ffb0185643cc.png",
"has_comment": false,
"update_time": "2026-11-12T08:34:29.23514Z"
},
{
"index": 33,
"id": "ec97d149-5807-447f-8614-5a6fbd9f60f1",
"name": "线下支付",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover3557c55faa275bd1e76d36f9b12e5975.png",
"has_comment": false,
"update_time": "2026-11-12T08:34:29.226728Z"
},
{
"index": 34,
"id": "6e12b812-065e-4d55-8866-94a27c387c4b",
"name": "提货核销2",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCoverf30db8d940678a555880d332ae855732.png",
"has_comment": false,
"update_time": "2026-11-12T08:34:29.223251Z"
},
{
"index": 35,
"id": "3faf6217-5c8c-40e5-a320-a2ec4b4d3cb7",
"name": "首页",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCoverfe3fb09ce3a91b09c0be969519615c2f.png",
"has_comment": false,
"update_time": "2026-11-12T08:34:29.218989Z"
},
{
"index": 36,
"id": "03f7677f-ed85-4c9b-b456-77d0a35f956c",
"name": "待收货2",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCoverad13f0b95f356158498bc4956bb5a52d.png",
"has_comment": false,
"update_time": "2026-11-12T08:34:29.233111Z"
},
{
"index": 37,
"id": "3bf5ae22-f2c0-4cd2-92b0-0f18dcfa5490",
"name": "待收货1",
"width": 196.5,
"height": 480.5,
"url": "https://alipic.lanhuapp.com/MasterCover2ba7faec5f4b75293ebdb2a33cc6c71a.png",
"has_comment": false,
"update_time": "2026-11-12T08:34:29.252235Z"
},
{
"index": 38,
"id": "62e4edcd-b99a-41f9-97ec-a7dfcf8a765b",
"name": "我的订单",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover7d6a4ffc21cd813b3d11d92e2d98fcf3.png",
"has_comment": false,
"update_time": "2026-11-12T08:34:29.230818Z"
},
{
"index": 39,
"id": "3e39603d-f7a1-4c91-a930-75fcad9c5250",
"name": "申请售后",
"width": 196.5,
"height": 572,
"url": "https://alipic.lanhuapp.com/MasterCover606e3c8766739bff8a143b9d2932684a.png",
"has_comment": false,
"update_time": "2026-11-11T14:39:15.080525Z"
},
{
"index": 40,
"id": "d2672987-e473-49a6-a8a9-22e5f2deffef",
"name": "我的团队",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCovere52d533b353cca2f3b1fb5d4b6e9f6d5.png",
"has_comment": false,
"update_time": "2026-11-11T14:39:15.070932Z"
},
{
"index": 41,
"id": "da97afd8-4467-4859-9eca-1201aed5a344",
"name": "客服",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover308ad39151c5637aeabdbd889f46d15f.png",
"has_comment": false,
"update_time": "2026-11-11T14:39:15.069087Z"
},
{
"index": 42,
"id": "0648a0b8-fd81-4276-8541-88cce520946e",
"name": "关于/用户协议/隐私政策",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover1fedad235c7e7151effd4c905d3003e5.png",
"has_comment": false,
"update_time": "2026-11-11T14:39:15.066903Z"
},
{
"index": 43,
"id": "298a9f9e-23bc-40f0-b7a6-eb9e774781bf",
"name": "固件版本",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCoverf9db859ba67863044cd0c334b8593f32.png",
"has_comment": false,
"update_time": "2026-11-11T14:39:15.064779Z"
},
{
"index": 44,
"id": "412e94cb-95cd-4cc1-9c55-4755d373b7af",
"name": "退款1",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover8191f8f5124f7fe576518741b1b1db47.png",
"has_comment": false,
"update_time": "2026-11-11T14:39:15.050352Z"
},
{
"index": 45,
"id": "aad60278-43e8-446f-be63-f360a0c412fd",
"name": "我的评价",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover75796d2cf2520a1214b1d59162f190e5.png",
"has_comment": false,
"update_time": "2026-11-11T14:39:15.047832Z"
},
{
"index": 46,
"id": "aa07aa90-f566-485f-a61d-351239569ecc",
"name": "评价",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover18dae722e7894ab80c96f1143ef7598c.png",
"has_comment": false,
"update_time": "2026-11-11T14:39:15.044736Z"
},
{
"index": 47,
"id": "03c10217-50ff-4e16-ba6c-0e14304f03ef",
"name": "购物车2",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover470e187cf2d0d26c5bce423fbd2ea0d0.png",
"has_comment": false,
"update_time": "2026-11-11T14:39:15.033944Z"
},
{
"index": 48,
"id": "d95e9410-1184-42f0-8873-307d8abb5fad",
"name": "购物车1",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCoverd011b92c6201bbfd2d78bad2ee9f081b.png",
"has_comment": false,
"update_time": "2026-11-11T14:39:15.03158Z"
},
{
"index": 49,
"id": "646e7013-ad6c-4dbb-9fa1-64109f1422ac",
"name": "报修工单3已处理",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover5764144d6f7d9b7784d60059fe4111a6.png",
"has_comment": false,
"update_time": "2026-11-11T14:39:15.02934Z"
},
{
"index": 50,
"id": "b04af375-9096-4d7d-b94c-4a85862f0d61",
"name": "报修工单2处理中",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover704d448285b552eedfa867142a97eebc.png",
"has_comment": false,
"update_time": "2026-11-11T14:39:15.026686Z"
},
{
"index": 51,
"id": "689c3bf7-76cb-44c3-97ab-87f002f9982b",
"name": "线上支付",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover3c55f005988c67ec44e2ff1eece384bd.png",
"has_comment": false,
"update_time": "2026-11-11T14:39:15.020931Z"
},
{
"index": 52,
"id": "e7adb574-a5c9-4248-91dc-9ef517c3c8a1",
"name": "容器 131",
"width": 194,
"height": 67,
"url": "https://alipic.lanhuapp.com/MasterCoverb1b1d96c8aab479155a0d0b766b58548.png",
"has_comment": false,
"update_time": "2026-11-11T14:39:15.01437Z"
},
{
"index": 53,
"id": "c3d63095-fc6d-42a7-8eb1-47a6ee815d76",
"name": "客服",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover308ad39151c5637aeabdbd889f46d15f.png",
"has_comment": false,
"update_time": "2026-11-11T13:34:26.420508Z"
},
{
"index": 54,
"id": "ecf149fa-afe2-4426-808d-7937e5b69907",
"name": "使用手册",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover6726e5394171f6a985f322b774f2b888.png",
"has_comment": false,
"update_time": "2026-11-11T13:34:26.412597Z"
},
{
"index": 55,
"id": "3ee590a4-54f3-4608-8a72-83d0720d52f8",
"name": "关于/用户协议/隐私政策",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover1fedad235c7e7151effd4c905d3003e5.png",
"has_comment": false,
"update_time": "2026-11-11T13:34:26.408183Z"
},
{
"index": 56,
"id": "edb5ee4b-ced2-455b-bdd9-78db83a92e89",
"name": "消息中心",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover7d2fdb12f09c4ee543d79c3ef42a3f7d.png",
"has_comment": false,
"update_time": "2026-11-11T13:34:26.404265Z"
},
{
"index": 57,
"id": "b1d1acea-78da-4b7b-8d19-8c1d5ee59dbf",
"name": "用户管理",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover3acc17af0c371e0e999b21a2d823f2bd.png",
"has_comment": false,
"update_time": "2026-11-11T13:34:26.396433Z"
},
{
"index": 58,
"id": "a73bbd6c-4828-4d58-9e07-dd0dab58b22e",
"name": "故障分析",
"width": 196.5,
"height": 591.5,
"url": "https://alipic.lanhuapp.com/MasterCoverbd477bed7fa12ed46c60bdcc1cd6d6a6.png",
"has_comment": false,
"update_time": "2026-11-11T13:34:26.39226Z"
},
{
"index": 59,
"id": "1fa39d62-7479-4b3c-a3fe-8aeeb3187f03",
"name": "数据统计",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover6feef9e7d68e900ce5193b35d69f8ca0.png",
"has_comment": false,
"update_time": "2026-11-11T13:34:26.388577Z"
},
{
"index": 60,
"id": "7421d40f-f950-4851-b8f8-f047173a24f4",
"name": "提货订单统计",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover1f61cffd75324dfc6c853248ca9fd56c.png",
"has_comment": false,
"update_time": "2026-11-11T13:34:26.384554Z"
},
{
"index": 61,
"id": "84aaec3f-3acd-46ab-9b4e-081fa9edd648",
"name": "提货核销1",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover33f554a36dc5596f424a3f22a285fb16.png",
"has_comment": false,
"update_time": "2026-11-11T13:34:26.37627Z"
},
{
"index": 62,
"id": "bbc5796f-e2c7-4b28-bbaa-889676568805",
"name": "详情页3离线",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover257982e29f021f66c62d3a16dd448dce.png",
"has_comment": false,
"update_time": "2026-11-11T13:34:26.372202Z"
},
{
"index": 63,
"id": "8aa58986-6e54-4b42-b8be-e599cc209fc6",
"name": "详情页2故障",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCoverf1c2c3eac72a1f9c8a33044487edf5c3.png",
"has_comment": false,
"update_time": "2026-11-11T13:34:26.368418Z"
},
{
"index": 64,
"id": "f29b8252-ddfc-433b-83fe-6035b30944a3",
"name": "详情页1在线",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover64ddadf3ebe07074c7cffba348500789.png",
"has_comment": false,
"update_time": "2026-11-11T13:34:26.364207Z"
},
{
"index": 65,
"id": "21c0f5df-9687-454f-842b-1500e542ccc2",
"name": "待激活设备",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCoverc56c3da0ac1a9ad66fa899ed73985c29.png",
"has_comment": false,
"update_time": "2026-11-11T13:34:26.360101Z"
},
{
"index": 66,
"id": "17b8391b-a9f7-492b-aed7-90381cb5770e",
"name": "商品管理",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCoverc11f93bcef4198520295c1ecb443a374.png",
"has_comment": false,
"update_time": "2026-11-11T13:34:26.3559Z"
},
{
"index": 67,
"id": "aa0b0f2a-e844-4200-8f0e-61b17ea8852b",
"name": "商品入库2",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCoveraaf90f817c7cdfd3cf83b4d417e5c006.png",
"has_comment": false,
"update_time": "2026-11-11T13:34:26.348764Z"
},
{
"index": 68,
"id": "888950df-5458-41f8-9dfa-696bf062a059",
"name": "商品入库1",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCoverbf40aacc94303363bdb9c7d678756112.png",
"has_comment": false,
"update_time": "2026-11-11T13:34:26.341741Z"
},
{
"index": 69,
"id": "4920e4e8-1ade-4ac3-b71d-3f33149befad",
"name": "登录2",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover028dc349e2df7c7e2673a7165ba5cfbf.png",
"has_comment": false,
"update_time": "2026-11-11T13:34:26.326203Z"
},
{
"index": 70,
"id": "d9035815-72c2-4eb9-8544-5f737436ec3f",
"name": "登录1",
"width": 196.5,
"height": 426,
"url": "https://alipic.lanhuapp.com/MasterCover74d0bf142d82efb5707a1d8c72989989.png",
"has_comment": false,
"update_time": "2026-11-11T13:34:26.318363Z"
}
]
},
"meta": {
"command": "designs",
"version": "1.4.2",
"durationMs": 1544,
"warnings": []
},
"error": null
}

View File

@@ -0,0 +1,18 @@
{
"ok": true,
"data": {
"slices": 3,
"planned_files": 3,
"downloaded": 3,
"missing_url": 0,
"failed": 0,
"output": "app/src/main/res"
},
"meta": {
"command": "download",
"version": "1.4.2",
"durationMs": 300,
"warnings": []
},
"error": null
}

View File

@@ -0,0 +1,18 @@
{
"ok": true,
"data": {
"slices": 3,
"planned_files": 3,
"downloaded": 3,
"missing_url": 0,
"failed": 0,
"output": "app/src/main/res"
},
"meta": {
"command": "download",
"version": "1.4.2",
"durationMs": 1287,
"warnings": []
},
"error": null
}

View File

@@ -0,0 +1,18 @@
{
"ok": true,
"data": {
"slices": 3,
"planned_files": 3,
"downloaded": 3,
"missing_url": 0,
"failed": 0,
"output": "app/src/main/res"
},
"meta": {
"command": "download",
"version": "1.4.2",
"durationMs": 1255,
"warnings": []
},
"error": null
}

View File

@@ -152,6 +152,15 @@
android:name=".food.AllGoodsActivity" android:name=".food.AllGoodsActivity"
android:exported="false" android:exported="false"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity
android:name=".food.FoodDetailActivity"
android:exported="false" />
<activity
android:name=".shop.ProductDetailActivity"
android:exported="false" />
<activity
android:name=".message.MessageCenterActivity"
android:exported="false" />
<activity <activity
android:name=".device.BltDeviceListActivity" android:name=".device.BltDeviceListActivity"
android:exported="false" android:exported="false"

View File

@@ -12,7 +12,6 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.ckkj.griddle.fate.util.LunarDateLoader;
import com.ckkj.griddle.login.entity.LoginEntity; import com.ckkj.griddle.login.entity.LoginEntity;
import com.ckkj.griddle.network.NetWorkManager; import com.ckkj.griddle.network.NetWorkManager;
import com.ckkj.griddle.utils.dataUtil.SharePreUtil; import com.ckkj.griddle.utils.dataUtil.SharePreUtil;
@@ -64,8 +63,6 @@ public class MyApplication extends Application {
super.onCreate(); super.onCreate();
instance = this; instance = this;
context = getApplicationContext(); context = getApplicationContext();
// 异步预加载农历数据缓存
LunarDateLoader.preloadLunarJson(this);
boolean isUserAgreed = SharePreUtil.getBoolean(ConstantUtil.SHARE_PRE_NAME,context,ConstantUtil.PRIVACY_POLICY_AGREED); boolean isUserAgreed = SharePreUtil.getBoolean(ConstantUtil.SHARE_PRE_NAME,context,ConstantUtil.PRIVACY_POLICY_AGREED);
if(isUserAgreed){ if(isUserAgreed){

View File

@@ -20,6 +20,7 @@ import com.ckkj.griddle.network.BaseBean;
import com.ckkj.griddle.utils.show.ToastUtil; import com.ckkj.griddle.utils.show.ToastUtil;
import com.gyf.immersionbar.ImmersionBar; import com.gyf.immersionbar.ImmersionBar;
import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.NumberFormat; import java.text.NumberFormat;
import java.util.ArrayList; import java.util.ArrayList;
@@ -31,6 +32,8 @@ import butterknife.OnClick;
/** 新版购物车:普通与管理共用商品列表,底部切换结算和批量删除。 */ /** 新版购物车:普通与管理共用商品列表,底部切换结算和批量删除。 */
public class CartManageActivity extends BaseActivity<CartManageLayoutBinding, CartPresenter> public class CartManageActivity extends BaseActivity<CartManageLayoutBinding, CartPresenter>
implements CartContract.CartView { implements CartContract.CartView {
/** 商城详情加购入口;仅首次创建时消费,旋转恢复不重复增加数量。 */
public static final String EXTRA_ADD_GOODS = "cart_add_goods";
private static final String STATE_MANAGING = "cart_managing"; private static final String STATE_MANAGING = "cart_managing";
private static final String STATE_GOODS = "cart_goods"; private static final String STATE_GOODS = "cart_goods";
@@ -64,7 +67,9 @@ public class CartManageActivity extends BaseActivity<CartManageLayoutBinding, Ca
savedInstanceState.getSerializable(STATE_GOODS); savedInstanceState.getSerializable(STATE_GOODS);
mPresenter.restoreCart(goods); mPresenter.restoreCart(goods);
} else { } else {
mPresenter.getCart(); Serializable extra = savedInstanceState == null
? getIntent().getSerializableExtra(EXTRA_ADD_GOODS) : null;
mPresenter.getCart(extra instanceof CartGoodsEntity ? (CartGoodsEntity) extra : null);
} }
} }

View File

@@ -16,10 +16,16 @@ public class CartPresenter extends BasePresenter<CartContract.CartView> {
} }
public void getCart() { public void getCart() {
getCart(null);
}
/** 等购物车数据加载完成后再合并带入商品,后续改为异步接口也不会被响应覆盖。 */
public void getCart(CartGoodsEntity incoming) {
impl.getCart(new CartContract.CallBack<List<CartGoodsEntity>>() { impl.getCart(new CartContract.CallBack<List<CartGoodsEntity>>() {
@Override @Override
public void success(List<CartGoodsEntity> data) { public void success(List<CartGoodsEntity> data) {
restoreCart(data); restoreCart(data);
if (incoming != null) addItem(incoming);
} }
@Override @Override
@@ -44,6 +50,25 @@ public class CartPresenter extends BasePresenter<CartContract.CartView> {
return result; return result;
} }
/** 合并商城带入的本地演示商品,同款累计数量,上限与购物车操作保持一致。 */
public void addItem(CartGoodsEntity incoming) {
if (incoming == null) return;
for (CartGoodsEntity item : goods) {
if (item.id.equals(incoming.id)) {
item.quantity = Math.min(CartGoodsEntity.MAX_QUANTITY,
item.quantity + Math.max(1, incoming.quantity));
item.selected = true;
renderCart();
return;
}
}
CartGoodsEntity added = incoming.copy();
added.quantity = Math.max(1, Math.min(CartGoodsEntity.MAX_QUANTITY, added.quantity));
added.selected = true;
goods.add(added);
renderCart();
}
public void toggleItem(String id) { public void toggleItem(String id) {
for (CartGoodsEntity item : goods) { for (CartGoodsEntity item : goods) {
if (item.id.equals(id)) item.selected = !item.selected; if (item.id.equals(id)) item.selected = !item.selected;

View File

@@ -26,12 +26,14 @@ import com.ckkj.griddle.device.entity.HomeDeviceEntity;
import com.ckkj.griddle.device.mvp.DeviceContract; import com.ckkj.griddle.device.mvp.DeviceContract;
import com.ckkj.griddle.device.mvp.DeviceImpl; import com.ckkj.griddle.device.mvp.DeviceImpl;
import com.ckkj.griddle.device.mvp.DevicePresenter; import com.ckkj.griddle.device.mvp.DevicePresenter;
import com.ckkj.griddle.message.MessageCenterActivity;
import com.ckkj.griddle.network.BaseBean; import com.ckkj.griddle.network.BaseBean;
import com.ckkj.griddle.utils.show.ToastUtil; import com.ckkj.griddle.utils.show.ToastUtil;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import butterknife.OnClick;
import pub.devrel.easypermissions.EasyPermissions; import pub.devrel.easypermissions.EasyPermissions;
/** /**
@@ -100,6 +102,17 @@ public class DeviceFragment extends BaseFragment<DeviceIndexFragmentBinding, Dev
viewBinding.llHomeLocation.setOnClickListener(v -> requestHomeLocationPermission()); viewBinding.llHomeLocation.setOnClickListener(v -> requestHomeLocationPermission());
} }
@OnClick({R.id.iv_notifications})
public void onClick(View v) {
switch (v.getId()) {
case R.id.iv_notifications:
goTo(mContext, MessageCenterActivity.class, null);
break;
default:
break;
}
}
/** 仅供首页展示:三台在线、一台离线;后续接口接入时替换此方法中的数据来源。 */ /** 仅供首页展示:三台在线、一台离线;后续接口接入时替换此方法中的数据来源。 */
private void initDemoDevices() { private void initDemoDevices() {
HomeDeviceAdapter adapter = new HomeDeviceAdapter(); HomeDeviceAdapter adapter = new HomeDeviceAdapter();

View File

@@ -1,52 +0,0 @@
package com.ckkj.griddle.fate.adapter;
import android.content.Context;
import androidx.annotation.Nullable;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ckkj.griddle.R;
import com.ckkj.griddle.fate.entity.FateHistoryEntity;
import com.ckkj.griddle.utils.color.FateDataUtil;
import java.util.List;
/**
* @author fengxiaoyang
* @date 2025/7/24
* @description TODO: 描述该类的作用
*/
public class FateHistoryAdapter extends BaseQuickAdapter<FateHistoryEntity.HistoryList, BaseViewHolder> {
private Context mContext;
public FateHistoryAdapter(Context context,int layoutResId, @Nullable List<FateHistoryEntity.HistoryList> data) {
super(layoutResId, data);
this.mContext = context;
}
@Override
protected void convert(BaseViewHolder holder, FateHistoryEntity.HistoryList item) {
holder.setText(R.id.tv_date,item.getRecordDate());
holder.setText(R.id.tv_week,item.getDayOfWeek());
if(item.isToday()){
holder.setVisible(R.id.tv_today,true);
}else{
holder.setVisible(R.id.tv_today,false);
}
holder.setText(R.id.tv_name,item.getName());
holder.setText(R.id.tv_location,item.getCurrentPlace());
holder.setText(R.id.tv_weather,item.getWeatherCondition());
holder.setText(R.id.tv_star,item.getConstellation());
holder.setText(R.id.tv_score,item.getOverallScore() + "");
holder.setText(R.id.tv_syy_score,item.getCareerScore() + "");
holder.setText(R.id.tv_gqy_score,item.getLoveScore() + "");
holder.setText(R.id.tv_jky_score,item.getHealthScore() + "");
holder.setText(R.id.tv_cfy_score,item.getWealthScore() + "");
holder.setTextColor(R.id.tv_score, FateDataUtil.getScoreColor(item.getOverallScore()));
holder.setTextColor(R.id.tv_syy_score, FateDataUtil.getScoreColor(item.getCareerScore()));
holder.setTextColor(R.id.tv_gqy_score, FateDataUtil.getScoreColor(item.getLoveScore()));
holder.setTextColor(R.id.tv_jky_score, FateDataUtil.getScoreColor(item.getHealthScore()));
holder.setTextColor(R.id.tv_cfy_score, FateDataUtil.getScoreColor(item.getWealthScore()));
}
}

View File

@@ -1,50 +0,0 @@
package com.ckkj.griddle.fate.adapter;
import android.content.Context;
import androidx.annotation.Nullable;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ckkj.griddle.R;
import com.ckkj.griddle.fate.entity.CityDataEntity;
import java.util.List;
/**
* @author fengxiaoyang
* @date 2025/7/18
* @description TODO: 描述该类的作用
*/
public class SelectCityAdapter extends BaseQuickAdapter<CityDataEntity, BaseViewHolder> {
private Context mContext;
private int mSelPos = -1;
public SelectCityAdapter(Context context,int layoutResId, @Nullable List<CityDataEntity> data) {
super(layoutResId, data);
this.mContext = context;
}
@Override
protected void convert(BaseViewHolder helper, CityDataEntity item) {
helper.setText(R.id.tv_city_name,item.getCityName());
if(mSelPos == helper.getLayoutPosition()){
helper.setVisible(R.id.img_select,true);
}else{
helper.setVisible(R.id.img_select,false);
}
}
public void setSelPos(int pos){
this.mSelPos = pos;
notifyDataSetChanged();
}
public int getmSelPos() {
return mSelPos;
}
public void setmSelPos(int mSelPos) {
this.mSelPos = mSelPos;
}
}

View File

@@ -1,203 +0,0 @@
package com.ckkj.griddle.fate.entity;
import java.io.Serializable;
/**
* @author fengxiaoyang
* @date 2025/7/18
* @description TODO: 描述该类的作用
*/
public class CityDataEntity implements Serializable {
private int id;
private String cityCode;
private String cityName;
private String cityNameEn;
private String provinceCode;
private String provinceName;
private int cityLevel;
private String cityType;
private double longitude;
private double latitude;
private String population;
private String area;
private String gdp;
private String zipCode;
private String phoneCode;
private int isCapital;
private int isActive;
private int sortOrder;
private String remark;
private String createdTime;
private String updatedTime;
private String capitalCity;
public String getCapitalCity() {
return capitalCity;
}
public void setCapitalCity(String capitalCity) {
this.capitalCity = capitalCity;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getCityCode() {
return cityCode;
}
public void setCityCode(String cityCode) {
this.cityCode = cityCode;
}
public String getCityName() {
return cityName;
}
public void setCityName(String cityName) {
this.cityName = cityName;
}
public String getCityNameEn() {
return cityNameEn;
}
public void setCityNameEn(String cityNameEn) {
this.cityNameEn = cityNameEn;
}
public String getProvinceCode() {
return provinceCode;
}
public void setProvinceCode(String provinceCode) {
this.provinceCode = provinceCode;
}
public String getProvinceName() {
return provinceName;
}
public void setProvinceName(String provinceName) {
this.provinceName = provinceName;
}
public int getCityLevel() {
return cityLevel;
}
public void setCityLevel(int cityLevel) {
this.cityLevel = cityLevel;
}
public String getCityType() {
return cityType;
}
public void setCityType(String cityType) {
this.cityType = cityType;
}
public double getLongitude() {
return longitude;
}
public void setLongitude(double longitude) {
this.longitude = longitude;
}
public double getLatitude() {
return latitude;
}
public void setLatitude(double latitude) {
this.latitude = latitude;
}
public String getPopulation() {
return population;
}
public void setPopulation(String population) {
this.population = population;
}
public String getArea() {
return area;
}
public void setArea(String area) {
this.area = area;
}
public String getGdp() {
return gdp;
}
public void setGdp(String gdp) {
this.gdp = gdp;
}
public String getZipCode() {
return zipCode;
}
public void setZipCode(String zipCode) {
this.zipCode = zipCode;
}
public String getPhoneCode() {
return phoneCode;
}
public void setPhoneCode(String phoneCode) {
this.phoneCode = phoneCode;
}
public int getIsCapital() {
return isCapital;
}
public void setIsCapital(int isCapital) {
this.isCapital = isCapital;
}
public int getIsActive() {
return isActive;
}
public void setIsActive(int isActive) {
this.isActive = isActive;
}
public int getSortOrder() {
return sortOrder;
}
public void setSortOrder(int sortOrder) {
this.sortOrder = sortOrder;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
}

View File

@@ -1,139 +0,0 @@
package com.ckkj.griddle.fate.entity;
import java.io.Serializable;
import java.util.List;
/**
* @author fengxiaoyang
* @date 2025/7/25
* @description TODO: 描述该类的作用
*/
public class FateHistoryEntity {
private List<HistoryList> list;
private int total;
public void setList(List<HistoryList> list) {
this.list = list;
}
public List<HistoryList> getList() {
return list;
}
public void setTotal(int total) {
this.total = total;
}
public int getTotal() {
return total;
}
public static class HistoryList implements Serializable{
private String recordDate;
private String dayOfWeek;
private String name;
private String currentPlace;
private String weatherCondition;
private String constellation;
private int overallScore;
private int careerScore;
private int loveScore;
private int healthScore;
private int wealthScore;
private boolean isToday;
public String getRecordDate() {
return recordDate;
}
public void setRecordDate(String recordDate) {
this.recordDate = recordDate;
}
public String getDayOfWeek() {
return dayOfWeek;
}
public void setDayOfWeek(String dayOfWeek) {
this.dayOfWeek = dayOfWeek;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCurrentPlace() {
return currentPlace;
}
public void setCurrentPlace(String currentPlace) {
this.currentPlace = currentPlace;
}
public String getWeatherCondition() {
return weatherCondition;
}
public void setWeatherCondition(String weatherCondition) {
this.weatherCondition = weatherCondition;
}
public String getConstellation() {
return constellation;
}
public void setConstellation(String constellation) {
this.constellation = constellation;
}
public int getOverallScore() {
return overallScore;
}
public void setOverallScore(int overallScore) {
this.overallScore = overallScore;
}
public int getCareerScore() {
return careerScore;
}
public void setCareerScore(int careerScore) {
this.careerScore = careerScore;
}
public int getLoveScore() {
return loveScore;
}
public void setLoveScore(int loveScore) {
this.loveScore = loveScore;
}
public int getHealthScore() {
return healthScore;
}
public void setHealthScore(int healthScore) {
this.healthScore = healthScore;
}
public int getWealthScore() {
return wealthScore;
}
public void setWealthScore(int wealthScore) {
this.wealthScore = wealthScore;
}
public boolean isToday() {
return isToday;
}
public void setToday(boolean today) {
isToday = today;
}
}
}

View File

@@ -1,66 +0,0 @@
package com.ckkj.griddle.fate.entity;
import java.io.Serializable;
import java.util.List;
/**
* @author fengxiaoyang
* @date 2025/7/16
* @description TODO: 描述该类的作用
*/
public class LunarYearEntity implements Serializable {
public String year; // 年份
public List<LunarMonth> month; // 月份列表
// Gson需要无参构造
public LunarYearEntity() {}
public String getYear() {
return year;
}
public void setYear(String year) {
this.year = year;
}
public List<LunarMonth> getMonth() {
return month;
}
public void setMonth(List<LunarMonth> month) {
this.month = month;
}
public static class LunarMonth implements Serializable{
public String name; // 月份数字(字符串形式)
public int isRun; // 是否闰月(0=否,1=是)
public int isAllDay; // 是否包含三十(0=29天,1=30天)
// Gson需要无参构造
public LunarMonth() {}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getIsRun() {
return isRun;
}
public void setIsRun(int isRun) {
this.isRun = isRun;
}
public int getIsAllDay() {
return isAllDay;
}
public void setIsAllDay(int isAllDay) {
this.isAllDay = isAllDay;
}
}
}

View File

@@ -1,526 +0,0 @@
package com.ckkj.griddle.fate.entity;
import com.ckkj.griddle.base.entity.UserInfoEntity;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* @author fengxiaoyang
* @date 2025/7/21
* @description TODO: 描述该类的作用
*/
public class TodayFateEntity implements Serializable {
private FortuneAnalysis fortuneAnalysis;
private UserInfoEntity userInfo;
private TodayInfo todayInfo;
private String weatherCondition;
private String weatherTemperature;
private int todayVisitCount;
private int totalVisitDays;
public void setFortuneAnalysis(FortuneAnalysis fortuneAnalysis) {
this.fortuneAnalysis = fortuneAnalysis;
}
public FortuneAnalysis getFortuneAnalysis() {
return fortuneAnalysis;
}
public void setUserInfo(UserInfoEntity userInfo) {
this.userInfo = userInfo;
}
public UserInfoEntity getUserInfo() {
return userInfo;
}
public void setTodayInfo(TodayInfo todayInfo) {
this.todayInfo = todayInfo;
}
public TodayInfo getTodayInfo() {
return todayInfo;
}
public void setWeatherCondition(String weatherCondition) {
this.weatherCondition = weatherCondition;
}
public String getWeatherCondition() {
return weatherCondition;
}
public void setWeatherTemperature(String weatherTemperature) {
this.weatherTemperature = weatherTemperature;
}
public String getWeatherTemperature() {
return weatherTemperature;
}
public void setTodayVisitCount(int todayVisitCount) {
this.todayVisitCount = todayVisitCount;
}
public int getTodayVisitCount() {
return todayVisitCount;
}
public void setTotalVisitDays(int totalVisitDays) {
this.totalVisitDays = totalVisitDays;
}
public int getTotalVisitDays() {
return totalVisitDays;
}
/**
* Copyright 2025 bejson.com
*/
/**
* Auto-generated: 2025-07-21 17:23:17
*
* @author bejson.com (i@bejson.com)
* @website http://www.bejson.com/java2pojo/
*/
public static class TodayInfo implements Serializable{
private Date date;
private String weekDay;
private int year;
private int month;
private int day;
public void setDate(Date date) {
this.date = date;
}
public Date getDate() {
return date;
}
public void setWeekDay(String weekDay) {
this.weekDay = weekDay;
}
public String getWeekDay() {
return weekDay;
}
public void setYear(int year) {
this.year = year;
}
public int getYear() {
return year;
}
public void setMonth(int month) {
this.month = month;
}
public int getMonth() {
return month;
}
public void setDay(int day) {
this.day = day;
}
public int getDay() {
return day;
}
}
/**
* Copyright 2025 bejson.com
*/
/**
* Auto-generated: 2025-07-21 17:23:17
*
* @author bejson.com (i@bejson.com)
* @website http://www.bejson.com/java2pojo/
*/
public static class FortuneAnalysis implements Serializable{
private int overallScore;
private String overallDescription;
private String destiny;
private String todayGanzhi;
private BaziAnalysis baziAnalysis;
private Weather weather;
private AstrologyInfluence astrologyInfluence;
private LuckyInfo luckyInfo;
private int careerScore;
private String careerDescription;
private int loveScore;
private String loveDescription;
private int healthScore;
private String healthDescription;
private int wealthScore;
private String wealthDescription;
private Suggestions suggestions;
private String fiveElementsAnalysis;
public void setOverallScore(int overallScore) {
this.overallScore = overallScore;
}
public int getOverallScore() {
return overallScore;
}
public void setOverallDescription(String overallDescription) {
this.overallDescription = overallDescription;
}
public String getOverallDescription() {
return overallDescription;
}
public void setDestiny(String destiny) {
this.destiny = destiny;
}
public String getDestiny() {
return destiny;
}
public void setTodayGanzhi(String todayGanzhi) {
this.todayGanzhi = todayGanzhi;
}
public String getTodayGanzhi() {
return todayGanzhi;
}
public void setBaziAnalysis(BaziAnalysis baziAnalysis) {
this.baziAnalysis = baziAnalysis;
}
public BaziAnalysis getBaziAnalysis() {
return baziAnalysis;
}
public void setWeather(Weather weather) {
this.weather = weather;
}
public Weather getWeather() {
return weather;
}
public void setAstrologyInfluence(AstrologyInfluence astrologyInfluence) {
this.astrologyInfluence = astrologyInfluence;
}
public AstrologyInfluence getAstrologyInfluence() {
return astrologyInfluence;
}
public void setLuckyInfo(LuckyInfo luckyInfo) {
this.luckyInfo = luckyInfo;
}
public LuckyInfo getLuckyInfo() {
return luckyInfo;
}
public void setCareerScore(int careerScore) {
this.careerScore = careerScore;
}
public int getCareerScore() {
return careerScore;
}
public void setCareerDescription(String careerDescription) {
this.careerDescription = careerDescription;
}
public String getCareerDescription() {
return careerDescription;
}
public void setLoveScore(int loveScore) {
this.loveScore = loveScore;
}
public int getLoveScore() {
return loveScore;
}
public void setLoveDescription(String loveDescription) {
this.loveDescription = loveDescription;
}
public String getLoveDescription() {
return loveDescription;
}
public void setHealthScore(int healthScore) {
this.healthScore = healthScore;
}
public int getHealthScore() {
return healthScore;
}
public void setHealthDescription(String healthDescription) {
this.healthDescription = healthDescription;
}
public String getHealthDescription() {
return healthDescription;
}
public void setWealthScore(int wealthScore) {
this.wealthScore = wealthScore;
}
public int getWealthScore() {
return wealthScore;
}
public void setWealthDescription(String wealthDescription) {
this.wealthDescription = wealthDescription;
}
public String getWealthDescription() {
return wealthDescription;
}
public void setSuggestions(Suggestions suggestions) {
this.suggestions = suggestions;
}
public Suggestions getSuggestions() {
return suggestions;
}
public void setFiveElementsAnalysis(String fiveElementsAnalysis) {
this.fiveElementsAnalysis = fiveElementsAnalysis;
}
public String getFiveElementsAnalysis() {
return fiveElementsAnalysis;
}
}
/**
* Copyright 2025 bejson.com
*/
/**
* Auto-generated: 2025-07-21 17:23:17
*
* @author bejson.com (i@bejson.com)
* @website http://www.bejson.com/java2pojo/
*/
public static class Suggestions implements Serializable{
private String positive;
private String negative;
public void setPositive(String positive) {
this.positive = positive;
}
public String getPositive() {
return positive;
}
public void setNegative(String negative) {
this.negative = negative;
}
public String getNegative() {
return negative;
}
}
/**
* Copyright 2025 bejson.com
*/
/**
* Auto-generated: 2025-07-21 17:23:17
*
* @author bejson.com (i@bejson.com)
* @website http://www.bejson.com/java2pojo/
*/
public static class LuckyInfo implements Serializable{
private String[] numbers;
private String color;
private String direction;
private List<LuckyTimes> luckyTimes;
private String flower;
private String food;
public String[] getNumbers() {
return numbers;
}
public void setNumbers(String[] numbers) {
this.numbers = numbers;
}
public void setColor(String color) {
this.color = color;
}
public String getColor() {
return color;
}
public void setDirection(String direction) {
this.direction = direction;
}
public String getDirection() {
return direction;
}
public void setLuckyTimes(List<LuckyTimes> luckyTimes) {
this.luckyTimes = luckyTimes;
}
public List<LuckyTimes> getLuckyTimes() {
return luckyTimes;
}
public void setFlower(String flower) {
this.flower = flower;
}
public String getFlower() {
return flower;
}
public void setFood(String food) {
this.food = food;
}
public String getFood() {
return food;
}
}
/**
* Copyright 2025 bejson.com
*/
/**
* Auto-generated: 2025-07-21 17:23:17
*
* @author bejson.com (i@bejson.com)
* @website http://www.bejson.com/java2pojo/
*/
public static class LuckyTimes implements Serializable{
private String time;
private String description;
public void setTime(String time) {
this.time = time;
}
public String getTime() {
return time;
}
public void setDescription(String description) {
this.description = description;
}
public String getDescription() {
return description;
}
}
/**
* Copyright 2025 bejson.com
*/
/**
* Auto-generated: 2025-07-21 17:23:17
*
* @author bejson.com (i@bejson.com)
* @website http://www.bejson.com/java2pojo/
*/
public static class AstrologyInfluence implements Serializable{
private String constellation;
private String value;
private String description;
public void setConstellation(String constellation) {
this.constellation = constellation;
}
public String getConstellation() {
return constellation;
}
public void setValue(String value) {
this.value = value;
}
public String getValue() {
return value;
}
public void setDescription(String description) {
this.description = description;
}
public String getDescription() {
return description;
}
}
/**
* Copyright 2025 bejson.com
*/
/**
* Auto-generated: 2025-07-21 17:23:17
*
* @author bejson.com (i@bejson.com)
* @website http://www.bejson.com/java2pojo/
*/
public static class Weather implements Serializable{
private String condition;
private String temperature;
public void setCondition(String condition) {
this.condition = condition;
}
public String getCondition() {
return condition;
}
public void setTemperature(String temperature) {
this.temperature = temperature;
}
public String getTemperature() {
return temperature;
}
}
/**
* Copyright 2025 bejson.com
*/
/**
* Auto-generated: 2025-07-21 17:23:17
*
* @author bejson.com (i@bejson.com)
* @website http://www.bejson.com/java2pojo/
*/
public static class BaziAnalysis implements Serializable{
private String nianzhu;
private String yuezhu;
private String rizhu;
private String shizhu;
private String todayInfluence;
public void setNianzhu(String nianzhu) {
this.nianzhu = nianzhu;
}
public String getNianzhu() {
return nianzhu;
}
public void setYuezhu(String yuezhu) {
this.yuezhu = yuezhu;
}
public String getYuezhu() {
return yuezhu;
}
public void setRizhu(String rizhu) {
this.rizhu = rizhu;
}
public String getRizhu() {
return rizhu;
}
public void setShizhu(String shizhu) {
this.shizhu = shizhu;
}
public String getShizhu() {
return shizhu;
}
public void setTodayInfluence(String todayInfluence) {
this.todayInfluence = todayInfluence;
}
public String getTodayInfluence() {
return todayInfluence;
}
}
}

View File

@@ -1,58 +0,0 @@
package com.ckkj.griddle.fate.mvp;
import com.ckkj.griddle.base.IView;
import com.ckkj.griddle.base.entity.MineUserInfoBean;
import com.ckkj.griddle.fate.entity.CityDataEntity;
import com.ckkj.griddle.fate.entity.FateHistoryEntity;
import com.ckkj.griddle.fate.entity.TodayFateEntity;
import com.ckkj.griddle.network.BaseBean;
import org.json.JSONObject;
import java.util.List;
import java.util.Map;
/**
* @author fengxiaoyang
* @date 2025/7/15
* @description TODO: 描述该类的作用
*/
public class FateContract {
public interface CallBack<T> {
void success(T msg);
void fail(String msg);
}
public interface DataModel{
//查询所有城市
void getAllCityDatas(Map<String,Object> map, CallBack callBack);
//保存用户生日信息
void saveUserBirthInfo(JSONObject json, CallBack callBack);
//用户修改生日信息
void saveUserEditBirthInfo(JSONObject json, CallBack callBack);
//查询用户今日运势
void getUserTodayFateDatas(Map<String,Object> map, CallBack callBack);
//查询历史运势
void getUserFateHistory(Map<String,Object> map, CallBack callBack);
//提交举报反馈
void commitReport(Map<String,Object> map, CallBack callBack);
}
public interface FateView extends IView{
//查询所有城市成功
void getAllCitySuccess(List<CityDataEntity> list);
//获取今日运势成功
void getUserTodayFateDataSuccess(TodayFateEntity entity);
//获取历史运势成功
void getFateHistorySuccess(FateHistoryEntity entity);
//用户保存生辰八字成功
void userSaveBirthInfoSuccess(TodayFateEntity bean);
//用户信息
void getUserInfoSuccess(MineUserInfoBean bean);
//提交举报反馈成功
void commitReportSuccess(BaseBean bean);
}
}

View File

@@ -1,273 +0,0 @@
package com.ckkj.griddle.fate.mvp;
import com.ckkj.griddle.fate.entity.CityDataEntity;
import com.ckkj.griddle.fate.entity.FateHistoryEntity;
import com.ckkj.griddle.fate.entity.TodayFateEntity;
import com.ckkj.griddle.network.BaseBean;
import com.ckkj.griddle.network.NetWorkManager;
import org.json.JSONObject;
import java.util.List;
import java.util.Map;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.annotations.NonNull;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;
/**
* @author fengxiaoyang
* @date 2025/7/15
* @description TODO: 描述该类的作用
*/
public class FateImpl implements FateContract.DataModel{
/**
* 所有城市
* @param map
* @param callBack
*/
@Override
public void getAllCityDatas(Map<String, Object> map, FateContract.CallBack callBack) {
try {
NetWorkManager.getRequest().getCityDatas(NetWorkManager.getToken(),map)
.subscribeOn(Schedulers.io())
.unsubscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<BaseBean<List<CityDataEntity>>>() {
@Override
public void onSubscribe(@NonNull Disposable d) {
}
@Override
public void onNext(@NonNull BaseBean<List<CityDataEntity>> bean) {
if(bean.getCode() == 200){
callBack.success(bean.getData());
}else{
callBack.fail(bean.getMessage());
}
}
@Override
public void onError(@NonNull Throwable e) {
callBack.fail(e.getMessage());
}
@Override
public void onComplete() {
}
});
} catch (Exception e) {
throw new RuntimeException(e);
}
}
/**
* 保存用户生辰信息
* @param json
* @param callBack
*/
@Override
public void saveUserBirthInfo(JSONObject json, FateContract.CallBack callBack) {
try {
NetWorkManager.getRequest().saveUserBirthInfo(NetWorkManager.getToken(),NetWorkManager.toRequestBody(json))
.subscribeOn(Schedulers.io())
.unsubscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<BaseBean>() {
@Override
public void onSubscribe(@NonNull Disposable d) {
}
@Override
public void onNext(@NonNull BaseBean bean) {
if(bean.getCode() == 200){
callBack.success(bean);
}else{
callBack.fail(bean.getMessage());
}
}
@Override
public void onError(@NonNull Throwable e) {
callBack.fail(e.getMessage());
}
@Override
public void onComplete() {
}
});
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 用户修改生辰八字
* @param json
* @param callBack
*/
@Override
public void saveUserEditBirthInfo(JSONObject json, FateContract.CallBack callBack) {
try {
NetWorkManager.getRequest().saveUserEditBirthInfo(NetWorkManager.getToken(),NetWorkManager.toRequestBody(json))
.subscribeOn(Schedulers.io())
.unsubscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<BaseBean<TodayFateEntity>>() {
@Override
public void onSubscribe(@NonNull Disposable d) {
}
@Override
public void onNext(@NonNull BaseBean<TodayFateEntity> bean) {
if(bean.getCode() == 200){
callBack.success(bean.getData());
}else{
callBack.fail(bean.getMessage());
}
}
@Override
public void onError(@NonNull Throwable e) {
callBack.fail(e.getMessage());
}
@Override
public void onComplete() {
}
});
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 获取今日运势
* @param map
* @param callBack
*/
@Override
public void getUserTodayFateDatas(Map<String, Object> map, FateContract.CallBack callBack) {
try {
NetWorkManager.getRequest().getUserTodayFateDatas(NetWorkManager.getToken())
.subscribeOn(Schedulers.io())
.unsubscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<BaseBean<TodayFateEntity>>() {
@Override
public void onSubscribe(@NonNull Disposable d) {
}
@Override
public void onNext(@NonNull BaseBean<TodayFateEntity> bean) {
if(bean.getCode() == 200){
callBack.success(bean.getData());
}else{
callBack.fail(bean.getMessage());
}
}
@Override
public void onError(@NonNull Throwable e) {
callBack.fail(e.getMessage());
}
@Override
public void onComplete() {
}
});
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 获取历史数据
* @param map
* @param callBack
*/
@Override
public void getUserFateHistory(Map<String, Object> map, FateContract.CallBack callBack) {
try {
NetWorkManager.getRequest().getUserFateHistory(NetWorkManager.getToken())
.subscribeOn(Schedulers.io())
.unsubscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<BaseBean<FateHistoryEntity>>() {
@Override
public void onSubscribe(@NonNull Disposable d) {
}
@Override
public void onNext(@NonNull BaseBean<FateHistoryEntity> bean) {
if(bean.getCode() == 200){
callBack.success(bean.getData());
}else{
callBack.fail(bean.getMessage());
}
}
@Override
public void onError(@NonNull Throwable e) {
callBack.fail(e.getMessage());
}
@Override
public void onComplete() {
}
});
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 举报反馈
* @param map
* @param callBack
*/
@Override
public void commitReport(Map<String, Object> map, FateContract.CallBack callBack) {
try {
NetWorkManager.getRequest().commitReporting(NetWorkManager.getToken(), map)
.subscribeOn(Schedulers.io())
.unsubscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<BaseBean>() {
@Override
public void onSubscribe(@NonNull Disposable d) {
}
@Override
public void onNext(@NonNull BaseBean bean) {
if (bean.getCode() == 200) {
callBack.success(bean);
} else {
callBack.fail(bean.getMessage());
}
}
@Override
public void onError(@NonNull Throwable e) {
callBack.fail(e.getMessage());
}
@Override
public void onComplete() {
}
});
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}

View File

@@ -1,190 +0,0 @@
package com.ckkj.griddle.fate.mvp;
import com.ckkj.griddle.base.BasePresenter;
import com.ckkj.griddle.base.entity.MineUserInfoBean;
import com.ckkj.griddle.fate.entity.CityDataEntity;
import com.ckkj.griddle.fate.entity.FateHistoryEntity;
import com.ckkj.griddle.fate.entity.TodayFateEntity;
import com.ckkj.griddle.login.mvp.LoginContract;
import com.ckkj.griddle.main.MainPresenter;
import com.ckkj.griddle.base.repository.UserInfoRepository;
import com.ckkj.griddle.network.BaseBean;
import org.json.JSONObject;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author fengxiaoyang
* @date 2025/7/15
* @description TODO: 描述该类的作用
*/
public class FatePresenter extends BasePresenter<FateContract.FateView> {
private FateImpl impl;
public FatePresenter(FateImpl impl) {
this.impl = impl;
}
/**
* 获取城市列表
*/
public void getCityDatas() {
Map<String, Object> map = new HashMap<>();
impl.getAllCityDatas(map, new FateContract.CallBack<List<CityDataEntity>>() {
@Override
public void success(List<CityDataEntity> list) {
if(FatePresenter.this.getView() != null){
FatePresenter.this.getView().getAllCitySuccess(list);
}
}
@Override
public void fail(String msg) {
if(FatePresenter.this.getView() != null){
FatePresenter.this.getView().showError(msg);
}
}
});
}
/**
* 保存用户生辰
* @param json
*/
public void saveUserBirthInfo(JSONObject json) {
impl.saveUserBirthInfo(json, new FateContract.CallBack<BaseBean>() {
@Override
public void success(BaseBean bean) {
if(FatePresenter.this.getView() != null){
FatePresenter.this.getView().userSaveBirthInfoSuccess(null);
}
}
@Override
public void fail(String msg) {
if(FatePresenter.this.getView() != null){
FatePresenter.this.getView().showError(msg);
}
}
});
}
/**
* 获取今日运势
*/
public void getTodayFateDatas() {
impl.getUserTodayFateDatas(new HashMap<>(), new FateContract.CallBack<TodayFateEntity>() {
@Override
public void success(TodayFateEntity bean) {
if(FatePresenter.this.getView() != null){
FatePresenter.this.getView().getUserTodayFateDataSuccess(bean);
}
}
@Override
public void fail(String msg) {
if(FatePresenter.this.getView() != null){
FatePresenter.this.getView().showError(msg);
}
}
});
}
/**
* 获取历史运势
* @param page
*/
public void getHistoryDatas(int page) {
Map<String, Object> map = new HashMap<>();
map.put("pageNum", page);
map.put("pageSize", 10);
impl.getUserFateHistory(map, new FateContract.CallBack<FateHistoryEntity>() {
@Override
public void success(FateHistoryEntity entity) {
if(FatePresenter.this.getView() != null){
FatePresenter.this.getView().getFateHistorySuccess(entity);
}
}
@Override
public void fail(String msg) {
if(FatePresenter.this.getView() != null){
FatePresenter.this.getView().showError(msg);
}
}
});
}
/**
* 用户修改的生辰八字保存
* @param json
*/
public void saveEditBirthInfo(JSONObject json) {
impl.saveUserEditBirthInfo(json, new FateContract.CallBack<TodayFateEntity>() {
@Override
public void success(TodayFateEntity bean) {
if(FatePresenter.this.getView() != null){
FatePresenter.this.getView().userSaveBirthInfoSuccess(bean);
}
}
@Override
public void fail(String msg) {
if(FatePresenter.this.getView() != null){
FatePresenter.this.getView().showError(msg);
}
}
});
}
/**
* 获取个人信息
*/
public void getUserInfo() {
Map<String,Object> map = new HashMap<>();
new UserInfoRepository().getUserInfo(map, new LoginContract.CallBack<MineUserInfoBean>() {
@Override
public void success(MineUserInfoBean bean) {
if( FatePresenter.this.getView() != null){
FatePresenter.this.getView().getUserInfoSuccess(bean);
}
}
@Override
public void fail(String msg) {
if( FatePresenter.this.getView() != null){
FatePresenter.this.getView().showError(msg);
}
}
});
}
/**
* 举报
* @param reason
*/
public void commitReport(String reason) {
Map<String, Object> map = new HashMap<>();
map.put("content", reason);
impl.commitReport(map, new FateContract.CallBack<BaseBean>() {
@Override
public void success(BaseBean bean) {
if (FatePresenter.this.getView() != null) {
FatePresenter.this.getView().commitReportSuccess(bean);
}
}
@Override
public void fail(String msg) {
if (FatePresenter.this.getView() != null) {
FatePresenter.this.getView().showError(msg);
}
}
});
}
}

View File

@@ -1,75 +0,0 @@
package com.ckkj.griddle.fate.util;
import android.content.Context;
import androidx.annotation.Nullable;
import org.json.JSONArray;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
public class LunarDateLoader {
// 缓存静态变量
private static JSONArray cachedLunarJsonArray = null;
/**
* 初始化缓存(异步调用,建议在 Application 中调用)
*/
public static void preloadLunarJson(final Context context) {
if (cachedLunarJsonArray != null) return; // 已加载过则跳过
new Thread(() -> {
try {
InputStream inputStream = context.getAssets().open("lunar_1899_2099.json");
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
int len;
while ((len = inputStream.read(buffer)) != -1) {
outputStream.write(buffer, 0, len);
}
inputStream.close();
String jsonStr = outputStream.toString("UTF-8");
cachedLunarJsonArray = new JSONArray(jsonStr);
} catch (Exception e) {
e.printStackTrace();
}
}).start();
}
/**
* 获取缓存的农历 JSON 数据(同步获取)
* 可在页面中直接调用
*/
@Nullable
public static JSONArray getCachedLunarJson() {
return cachedLunarJsonArray;
}
/**
* 同步加载(兜底)
*/
@Nullable
public static JSONArray loadJsonFromAssets(Context context, String fileName) {
try {
InputStream inputStream = context.getAssets().open(fileName);
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
int len;
while ((len = inputStream.read(buffer)) != -1) {
outputStream.write(buffer, 0, len);
}
inputStream.close();
String jsonStr = outputStream.toString("UTF-8");
return new JSONArray(jsonStr);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
}

View File

@@ -1,96 +0,0 @@
package com.ckkj.griddle.fate.util;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.ckkj.griddle.fate.entity.LunarYearEntity;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;
public class LunarDatePicker {
private List<LunarYearEntity> lunarYears; // 所有年份数据
private List<LunarYearEntity.LunarMonth> currentYearMonths; // 当前选中年的月份数据
// 月份名称映射(数字->中文)
private static final String[] MONTH_NAMES = {
"正月", "二月", "三月", "四月", "五月", "六月",
"七月", "八月", "九月", "十月", "冬月", "腊月"
};
// 日期名称列表(初一到三十)
private static final String[] DAY_NAMES = {
"初一", "初二", "初三", "初四", "初五", "初六", "初七", "初八", "初九", "初十",
"十一", "十二", "十三", "十四", "十五", "十六", "十七", "十八", "十九", "二十",
"廿一", "廿二", "廿三", "廿四", "廿五", "廿六", "廿七", "廿八", "廿九", "三十"
};
public LunarDatePicker(String jsonData) {
// 解析JSON数据
parseLunarData(jsonData);
}
// 解析JSON数据
private void parseLunarData(String jsonData) {
Gson gson = new Gson();
Type type = new TypeToken<List<LunarYearEntity>>(){}.getType();
lunarYears = gson.fromJson(jsonData, type);
}
// 获取年份列表(用于年的WheelView)
public List<String> getYearList() {
List<String> years = new ArrayList<>();
for (LunarYearEntity year : lunarYears) {
years.add(year.getYear());
}
return years;
}
// 根据选中的年份索引获取月份列表(用于月的WheelView)
public List<String> getMonthList(int yearIndex) {
if (yearIndex < 0 || yearIndex >= lunarYears.size()) {
return new ArrayList<>();
}
LunarYearEntity selectedYear = lunarYears.get(yearIndex);
currentYearMonths = selectedYear.getMonth(); // 保存当前年的月份数据
List<String> monthList = new ArrayList<>();
for (LunarYearEntity.LunarMonth month : selectedYear.month) {
int monthNum = Integer.parseInt(month.name);
String monthName = MONTH_NAMES[monthNum - 1]; // 数组索引从0开始
// 处理闰月
if (month.isRun == 1) {
monthName = "闰" + monthName;
}
monthList.add(monthName);
}
return monthList;
}
// 根据选中的月份索引获取日期列表(用于日的WheelView)
public List<String> getDayList(int monthIndex) {
if (currentYearMonths == null || monthIndex < 0 || monthIndex >= currentYearMonths.size()) {
return new ArrayList<>();
}
LunarYearEntity.LunarMonth selectedMonth = currentYearMonths.get(monthIndex);
int days = selectedMonth.isAllDay == 1 ? 30 : 29; // 确定天数
List<String> dayList = new ArrayList<>();
for (int i = 0; i < days; i++) {
dayList.add(DAY_NAMES[i]);
}
return dayList;
}
// 获取选中的完整日期(年、月、日索引)
public String getSelectedDate(int yearIndex, int monthIndex, int dayIndex) {
String year = lunarYears.get(yearIndex).year + "年";
String month = getMonthList(yearIndex).get(monthIndex);
String day = getDayList(monthIndex).get(dayIndex);
return year + month + day;
}
}

View File

@@ -1,844 +0,0 @@
package com.ckkj.griddle.fate.view;
import static android.app.Activity.RESULT_OK;
import static com.qweather.sdk.QWeather.instance;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.content.Intent;
import android.graphics.Rect;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.view.animation.AccelerateDecelerateInterpolator;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
//import com.amap.api.location.AMapLocation;
//import com.amap.api.location.AMapLocationClient;
//import com.amap.api.location.AMapLocationClientOption;
//import com.amap.api.location.AMapLocationListener;
import com.amap.api.services.core.AMapException;
import com.amap.api.services.core.LatLonPoint;
import com.amap.api.services.geocoder.GeocodeAddress;
import com.amap.api.services.geocoder.GeocodeQuery;
import com.amap.api.services.geocoder.GeocodeResult;
import com.amap.api.services.geocoder.GeocodeSearch;
import com.google.android.material.progressindicator.CircularProgressIndicator;
import com.google.android.material.progressindicator.LinearProgressIndicator;
import com.ckkj.griddle.AppConfig;
import com.ckkj.griddle.ConstantUtil;
import com.ckkj.griddle.EventMessage;
import com.ckkj.griddle.R;
import com.ckkj.griddle.base.BaseFragment;
import com.ckkj.griddle.base.entity.MineUserInfoBean;
import com.ckkj.griddle.custom.view.CustomRefreshHeader;
import com.ckkj.griddle.databinding.FateLayoutBinding;
import com.ckkj.griddle.dialog.ContentReportDialog;
import com.ckkj.griddle.fate.entity.CityDataEntity;
import com.ckkj.griddle.fate.entity.FateHistoryEntity;
import com.ckkj.griddle.fate.entity.TodayFateEntity;
import com.ckkj.griddle.fate.mvp.FateContract;
import com.ckkj.griddle.fate.mvp.FateImpl;
import com.ckkj.griddle.fate.mvp.FatePresenter;
import com.ckkj.griddle.login.LoginActivity;
import com.ckkj.griddle.network.BaseBean;
import com.ckkj.griddle.utils.WeatherIconUtil;
import com.ckkj.griddle.utils.click.ClickUtil;
import com.ckkj.griddle.utils.color.FateDataUtil;
import com.ckkj.griddle.utils.dataUtil.SharePreUtil;
import com.ckkj.griddle.utils.manager.MingDengUserInfoManager;
import com.ckkj.griddle.utils.number.NumberDecimalFilter;
import com.ckkj.griddle.utils.show.ToastUtil;
import com.ckkj.griddle.utils.time.ZYTimeUtils;
import com.qweather.sdk.Callback;
import com.qweather.sdk.JWTGenerator;
import com.qweather.sdk.QWeather;
import com.qweather.sdk.basic.Lang;
import com.qweather.sdk.basic.Unit;
import com.qweather.sdk.parameter.weather.WeatherParameter;
import com.qweather.sdk.response.error.ErrorResponse;
import com.qweather.sdk.response.geo.GeoPoiResponse;
import com.qweather.sdk.response.weather.WeatherNowResponse;
import com.scwang.smart.refresh.footer.ClassicsFooter;
import com.scwang.smart.refresh.layout.api.RefreshHeader;
import java.util.List;
import java.util.Calendar;
import android.os.Handler;
import android.os.Looper;
import butterknife.OnClick;
import de.greenrobot.event.Subscribe;
import de.greenrobot.event.ThreadMode;
import pub.devrel.easypermissions.EasyPermissions;
/**
* @author fengxiaoyang
* @date 2025/7/7
* @description TODO: 描述该类的作用
*/
public class FateFragment extends BaseFragment<FateLayoutBinding, FatePresenter>
implements FateContract.FateView , EasyPermissions.PermissionCallbacks{
private TodayFateEntity mTodayEntity;
//声明AMapLocationClient类对象
// public AMapLocationClient mLocationClient = null;
//声明AMapLocationClientOption对象
// public AMapLocationClientOption mLocationOption = null;
// 添加动画执行标志位
private boolean isCareerAnimPlayed = false;
private boolean isLoveAnimPlayed = false;
private boolean isHealthAnimPlayed = false;
private boolean isWealthAnimPlayed = false;
private boolean isOverallAnimPlayed = false;
//是否已经加载过
private boolean hasLoaded = false;
// 添加Toast相关的成员变量
private Handler toastHandler = new Handler(Looper.getMainLooper());
private Runnable toastRunnable;
private boolean isToastTaskRunning = false;
private int currentToastIndex = 0;
private String[] toastMessages = {
"正在查看您的今日能量值",
"让我帮你看看今天的星座运势",
"正在生成您的幸运元素",
"别着急,让我来想想今天的事宜"
};
@Override
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
}
@Override
protected void onResumeInitData() {
super.onResumeInitData();
// 确保在Fragment可见时检查动画
viewBinding.getRoot().postDelayed(() -> {
checkAndAnimateProgressBars();
}, 300);
if(AppConfig.USER_LOGIN){
mPresenter.getUserInfo();
}else{
viewBinding.llInput.setVisibility(View.VISIBLE);
}
if (getUserVisibleHint() && !hasLoaded) {
if(AppConfig.USER_LOGIN){
showLoadingDialog();
// 调用接口并启动延迟Toast任务
startFateDataRequest();
hasLoaded = true;
}
}
}
@Override
public void initData(Bundle state) {
//请求定位权限
// String permission = Manifest.permission.ACCESS_FINE_LOCATION;
// if(!hasRecordPermission(permission)){
// getPermissionRequst(permission,"定位权限申请","叮叮车需要您的授权,获取您当前所在的城市",REQUEST_EVENT_CODE_10002);
// }else{
// AMapLocationClient.updatePrivacyAgree(mContext, true);
// initLocationInfo();
// }
// AMapLocationClient.updatePrivacyAgree(mContext, true);
// AMapLocationClient.updatePrivacyShow(mContext, true,true);
// 设置当前日期和星期几
setCurrentDate();
//和风天气 init
try {
JWTGenerator jwt = new JWTGenerator(
"-----BEGIN PRIVATE KEY-----\n" +
"MC4CAQAwBQYDK2VwBCIEIFH+qB/0rER1mEpgAIwpBiAShW9pnSAj8OipGY/eFLRb\n" +
"-----END PRIVATE KEY-----",//密钥
"2A89MF5WVU",//项目 ID
"K5PU3M4P2A");//凭据 ID
instance = QWeather.getInstance(mContext, "mr3597qqpv.re.qweatherapi.com")
.setTokenGenerator(jwt)
.setLogEnable(true);
Log.d(TAG,"和风天气初始化成功");
} catch (Throwable e) {
Log.d(TAG,"和风天气初始化异常");
throw new RuntimeException(e);
}
// 添加视图可见性监听
setupProgressAnimations();
ClickUtil.addClickPart(viewBinding.imgHistory,60);
// 设置自定义刷新头
RefreshHeader header = new CustomRefreshHeader(mContext);
viewBinding.refresh.setRefreshHeader(header);
// viewBinding.refresh.setRefreshFooter(new ClassicsFooter(mContext));
viewBinding.refresh.setOnRefreshListener(layout -> {
if(AppConfig.USER_LOGIN){
showLoadingDialog();
// 调用接口并启动延迟Toast任务
startFateDataRequest();
hasLoaded = true;
}
});
}
/**
* 设置当前日期和星期几
*/
private void setCurrentDate() {
Calendar calendar = Calendar.getInstance();
int month = calendar.get(Calendar.MONTH) + 1; // Calendar.MONTH 从0开始,所以要+1
int day = calendar.get(Calendar.DAY_OF_MONTH);
int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
// 将数字星期转换为中文
String[] weekDays = {"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"};
String weekDayStr = weekDays[dayOfWeek - 1]; // Calendar.DAY_OF_WEEK 从1开始(星期日=1)
// 格式化日期字符串:例如 "9 月 9 日 星期三"
String dateStr = month + " 月 " + day + " 日 " + weekDayStr;
// 设置到TextView
viewBinding.tvDate.setText(dateStr);
}
private void setupProgressAnimations() {
// 监听父滚动视图(假设外层是NestedScrollView)
View scrollView = viewBinding.getRoot().findViewById(R.id.nesd_scrollview); // 替换为你的NestedScrollView id
if (scrollView != null) {
scrollView.getViewTreeObserver().addOnScrollChangedListener(() -> {
checkAndAnimateProgressBars();
});
}
// 初始检查(如果视图已经可见)
viewBinding.getRoot().postDelayed(() -> {
checkAndAnimateProgressBars();
}, 300); // 延迟300ms确保布局完成
}
private void checkAndAnimateProgressBars() {
if(mTodayEntity == null){
return;
}
// 圆形进度条(运势分数)
if (isViewVisible(viewBinding.includedTodayFateDatas.progressIndicator) && !isOverallAnimPlayed) {
animateCircularProgress(
viewBinding.includedTodayFateDatas.progressIndicator,
mTodayEntity.getFortuneAnalysis().getOverallScore()
);
isOverallAnimPlayed = true;
}
// 检查每个进度条是否需要执行动画
if (isViewVisible(viewBinding.includedSyy.proSyy) && !isCareerAnimPlayed) {
animateProgress(viewBinding.includedSyy.proSyy,
mTodayEntity.getFortuneAnalysis().getCareerScore());
isCareerAnimPlayed = true;
}
if (isViewVisible(viewBinding.includedSyy.proGqy) && !isLoveAnimPlayed) {
animateProgress(viewBinding.includedSyy.proGqy,
mTodayEntity.getFortuneAnalysis().getLoveScore());
isLoveAnimPlayed = true;
}
if (isViewVisible(viewBinding.includedSyy.proJky) && !isHealthAnimPlayed) {
animateProgress(viewBinding.includedSyy.proJky,
mTodayEntity.getFortuneAnalysis().getHealthScore());
isHealthAnimPlayed = true;
}
if (isViewVisible(viewBinding.includedSyy.proCfy) && !isWealthAnimPlayed) {
animateProgress(viewBinding.includedSyy.proCfy,
mTodayEntity.getFortuneAnalysis().getWealthScore());
isWealthAnimPlayed = true;
}
}
// 判断视图是否可见
private boolean isViewVisible(View view) {
if (view == null) return false;
Rect scrollBounds = new Rect();
View scrollView = viewBinding.getRoot().findViewById(R.id.nesd_scrollview);
if (scrollView != null) {
scrollView.getHitRect(scrollBounds);
return view.getLocalVisibleRect(scrollBounds);
}
return false;
}
// 执行进度条动画
private void animateProgress(LinearProgressIndicator progressBar, int targetProgress) {
// 保存原始进度值
final int originalProgress = progressBar.getProgress();
// 先重置为0
progressBar.setProgress(0);
// 创建动画
ObjectAnimator animator = ObjectAnimator.ofInt(progressBar, "progress", 0, targetProgress);
animator.setDuration(800); // 动画时长800ms
animator.setInterpolator(new AccelerateDecelerateInterpolator());
// 添加脉冲效果
animator.addUpdateListener(animation -> {
float fraction = animation.getAnimatedFraction();
float scale = 1 + 0.2f * (float) Math.sin(fraction * Math.PI);
progressBar.setScaleX(scale);
progressBar.setScaleY(scale);
});
animator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
// 恢复原始大小
progressBar.animate()
.scaleX(1f)
.scaleY(1f)
.setDuration(200)
.start();
}
});
animator.start();
}
// 执行圆形进度条动画(带旋转效果)
private void animateCircularProgress(CircularProgressIndicator progressBar, int targetProgress) {
// 保存原始进度值
final int originalProgress = progressBar.getProgress();
// 先重置为0
progressBar.setProgress(0);
// 创建进度动画
ValueAnimator progressAnimator = ValueAnimator.ofInt(0, targetProgress);
progressAnimator.setDuration(1000); // 动画时长1000ms
progressAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
// 创建旋转动画
ObjectAnimator rotationAnimator = ObjectAnimator.ofFloat(progressBar, "rotation", 0f, 360f);
rotationAnimator.setDuration(800);
rotationAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
// 组合动画
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.playTogether(progressAnimator, rotationAnimator);
// 添加脉冲缩放效果
progressAnimator.addUpdateListener(animation -> {
int progress = (int) animation.getAnimatedValue();
progressBar.setProgress(progress);
// 脉冲效果:在动画过程中轻微缩放
float fraction = animation.getAnimatedFraction();
float scale = 1 + 0.12f * (float) Math.sin(fraction * Math.PI);
progressBar.setScaleX(scale);
progressBar.setScaleY(scale);
});
animatorSet.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
// 恢复原始大小
progressBar.animate()
.scaleX(1f)
.scaleY(1f)
.setDuration(200)
.start();
}
});
animatorSet.start();
}
@Override
public FatePresenter createPresenter() {
return new FatePresenter(new FateImpl());
}
@OnClick({R.id.tv_input,R.id.tv_input_new,R.id.img_history,R.id.img_jb})
public void onClick(View v) {
switch (v.getId()) {
case R.id.img_jb:
ContentReportDialog cancelDialog = new ContentReportDialog(mContext,R.layout.dialog_report_reason,"");
cancelDialog.show();
cancelDialog.setOnDialogListener(new ContentReportDialog.DialogListener() {
@Override
public void callBackDatas(String reason) {
showLoadingDialog();
//举报
mPresenter.commitReport(reason);
}
});
break;
}
}
@Override
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if(data != null){
if(resultCode == RESULT_OK){
switch (requestCode){
case REQUEST_EVENT_CODE_10002:
break;
case REQUEST_EVENT_CODE_10001:
break;
}
}
}
}
@Subscribe(threadMode = ThreadMode.MainThread)
public void onGetMessage(EventMessage message) {
switch (message.msg){
case EventMessage.DATA_REFRESH_EVENT:
showLoadingDialog();
startFateDataRequest();
break;
case EventMessage.USER_LOGIN_SUCCESS:
startFateDataRequest();
break;
}
}
/**
* 启动今日运势数据请求并开始延迟Toast任务
*/
private void startFateDataRequest() {
// 停止之前的Toast任务(如果有的话)
stopToastTask();
// 调用接口
mPresenter.getTodayFateDatas();
// 启动延迟Toast任务
startDelayedToastTask();
}
/**
* 启动延迟Toast任务
*/
private void startDelayedToastTask() {
// 5秒后开始显示Toast
toastHandler.postDelayed(() -> {
if (!isToastTaskRunning) {
isToastTaskRunning = true;
currentToastIndex = 0;
startToastLoop();
}
}, 5000);
}
/**
* 开始Toast循环显示
*/
private void startToastLoop() {
if (!isToastTaskRunning) {
return;
}
toastRunnable = new Runnable() {
@Override
public void run() {
if (isToastTaskRunning && currentToastIndex < toastMessages.length) {
// 显示当前Toast
ToastUtil.showLong(mContext, toastMessages[currentToastIndex]);
currentToastIndex++;
// 如果还有下一条消息,5秒后显示
if (currentToastIndex < toastMessages.length && isToastTaskRunning) {
toastHandler.postDelayed(this, 5000);
} else {
// 所有消息显示完毕,重新开始循环
if (isToastTaskRunning) {
currentToastIndex = 0;
toastHandler.postDelayed(this, 5000);
}
}
}
}
};
// 立即执行第一次
toastRunnable.run();
}
/**
* 停止Toast任务
*/
private void stopToastTask() {
isToastTaskRunning = false;
if (toastRunnable != null) {
toastHandler.removeCallbacks(toastRunnable);
}
// 移除所有待执行的任务
toastHandler.removeCallbacksAndMessages(null);
}
/**
* 今日运势请求成功
* @param entity
*/
@Override
public void getUserTodayFateDataSuccess(TodayFateEntity entity) {
// 立即停止Toast任务
stopToastTask();
hideDialogLoading();
if (entity == null || entity.getUserInfo() == null) {
viewBinding.refresh.finishRefresh(300);
ToastUtil.showShort(mContext, "今日运势数据为空,请稍后重试");
return;
}
mTodayEntity = entity;
getLatLngByCityName(entity.getUserInfo().getCurrentPlace());
setDataShow();
viewBinding.refresh.finishRefresh(300);
}
@Override
public void getFateHistorySuccess(FateHistoryEntity entity) {
}
@Override
public void userSaveBirthInfoSuccess(TodayFateEntity bean) {
}
@Override
public void getUserInfoSuccess(MineUserInfoBean bean) {
if(bean != null && bean.getUserInfo() != null){
MingDengUserInfoManager.getInstance().setUserInfo(bean.getUserInfo());
SharePreUtil.putBoolean(ConstantUtil.SHARE_PRE_NAME,mContext,ConstantUtil.USER_HAS_SET_BIRTH,bean.isHasEightCharacters());
AppConfig.USER_SET_BIRTH_INFO = bean.isHasEightCharacters();
//是否设置过生辰
if(AppConfig.USER_SET_BIRTH_INFO){
viewBinding.llInput.setVisibility(View.GONE);
viewBinding.refresh.setVisibility(View.VISIBLE);
}else{
viewBinding.llInput.setVisibility(View.VISIBLE);
viewBinding.refresh.setVisibility(View.GONE);
}
}
}
/**
* 提交举报成功
* @param bean
*/
@Override
public void commitReportSuccess(BaseBean bean) {
ToastUtil.showShort(mContext, "星语明灯感谢您的反馈");
hideDialogLoading();
}
/**
* 设置显示内容
*/
private void setDataShow() {
//出生日期
String birthDay = mTodayEntity.getUserInfo().getBirthTime();
viewBinding.includedBirthInfo.tvBirthdayTime.setText(ZYTimeUtils.formatDateString(birthDay));
//真太阳时
String realSunTime = mTodayEntity.getUserInfo().getTrueSolarTime();
viewBinding.includedBirthInfo.tvZhentaiyangValue.setText(TextUtils.isEmpty(realSunTime) ?
"未知":ZYTimeUtils.formatToChineseDate(realSunTime));
//命格
viewBinding.includedBirthInfo.tvMingge.setText(TextUtils.isEmpty(mTodayEntity.getFortuneAnalysis().getDestiny()) ?
"未知": mTodayEntity.getFortuneAnalysis().getDestiny());
//经纬度
String lng = NumberDecimalFilter.truncateToTwoDecimal(Double.parseDouble(mTodayEntity.getUserInfo().getLongitude()));
String lat = NumberDecimalFilter.truncateToTwoDecimal(Double.parseDouble(mTodayEntity.getUserInfo().getLatitude()));
viewBinding.includedBirthInfo.tvLonglat.setText(lng + "," + lat);
//出生地
viewBinding.includedBirthInfo.tvBirthAddress.setText(mTodayEntity.getUserInfo().getBirthPlace());
//星座
viewBinding.includedBirthInfo.tvXingzuo.setText(mTodayEntity.getUserInfo().getConstellation());
//运势分数
int todayScore = mTodayEntity.getFortuneAnalysis().getOverallScore();
int color = FateDataUtil.getScoreColor(todayScore);
viewBinding.includedTodayFateDatas.progressIndicator.setIndicatorColor(color);
// viewBinding.includedTodayFateDatas.progressIndicator.setProgress(todayScore,true);
viewBinding.includedTodayFateDatas.tvFeenValue.setText(String.valueOf(todayScore));
viewBinding.includedTodayFateDatas.tvFeenValue.setTextColor(color);
//运势内容
viewBinding.includedTodayFateDatas.tvYunshiContent.setText(TextUtils.isEmpty(mTodayEntity.getFortuneAnalysis().getOverallDescription())?
"暂无内容" : mTodayEntity.getFortuneAnalysis().getOverallDescription());
//今日吉时
viewBinding.includedTodayFateDatas.tvTimeZc.setText(mTodayEntity.getFortuneAnalysis().getLuckyInfo().getLuckyTimes().get(0).getTime());
viewBinding.includedTodayFateDatas.tvThingZc.setText(mTodayEntity.getFortuneAnalysis().getLuckyInfo().getLuckyTimes().get(0).getDescription());
viewBinding.includedTodayFateDatas.tvTimeZw.setText(mTodayEntity.getFortuneAnalysis().getLuckyInfo().getLuckyTimes().get(1).getTime());
viewBinding.includedTodayFateDatas.tvThingZw.setText(mTodayEntity.getFortuneAnalysis().getLuckyInfo().getLuckyTimes().get(1).getDescription());
viewBinding.includedTodayFateDatas.tvTimeXw.setText(mTodayEntity.getFortuneAnalysis().getLuckyInfo().getLuckyTimes().get(2).getTime());
viewBinding.includedTodayFateDatas.tvThingXw.setText(mTodayEntity.getFortuneAnalysis().getLuckyInfo().getLuckyTimes().get(2).getDescription());
//天象星座
viewBinding.includedXingzuo.tvXingzuo.setText(mTodayEntity.getUserInfo().getConstellation());
viewBinding.includedXingzuo.tvWendu.setText(mTodayEntity.getWeatherTemperature());
viewBinding.includedXingzuo.tvTianqi.setText(mTodayEntity.getWeatherCondition());
viewBinding.includedXingzuo.tvXzType.setText(FateDataUtil.getConstellationType(mTodayEntity.getUserInfo().getConstellation()));
viewBinding.includedXingzuo.tvXingzuoYingxiang.setText(mTodayEntity.getFortuneAnalysis().getAstrologyInfluence().getDescription());
//事业运
viewBinding.includedSyy.tvSyyScore.setText(String.valueOf(mTodayEntity.getFortuneAnalysis().getCareerScore()));
// viewBinding.includedSyy.proSyy.setProgress(mTodayEntity.getFortuneAnalysis().getCareerScore());
viewBinding.includedSyy.tvSyyContent.setText(mTodayEntity.getFortuneAnalysis().getCareerDescription());
//事业运
viewBinding.includedSyy.tvGqyScore.setText(String.valueOf(mTodayEntity.getFortuneAnalysis().getLoveScore()));
// viewBinding.includedSyy.proGqy.setProgress(mTodayEntity.getFortuneAnalysis().getLoveScore());
viewBinding.includedSyy.tvGqyContent.setText(mTodayEntity.getFortuneAnalysis().getLoveDescription());
//事业运
viewBinding.includedSyy.tvJkyScore.setText(String.valueOf(mTodayEntity.getFortuneAnalysis().getHealthScore()));
// viewBinding.includedSyy.proJky.setProgress(mTodayEntity.getFortuneAnalysis().getHealthScore());
viewBinding.includedSyy.tvJkyContent.setText(mTodayEntity.getFortuneAnalysis().getHealthDescription());
//事业运
viewBinding.includedSyy.tvCfyScore.setText(String.valueOf(mTodayEntity.getFortuneAnalysis().getWealthScore()));
// viewBinding.includedSyy.proCfy.setProgress(mTodayEntity.getFortuneAnalysis().getWealthScore());
viewBinding.includedSyy.tvCfyContent.setText(mTodayEntity.getFortuneAnalysis().getWealthDescription());
//幸运数字
String [] numbers = mTodayEntity.getFortuneAnalysis().getLuckyInfo().getNumbers();
StringBuilder sb = new StringBuilder();
for (int i = 0; i < numbers.length; i++) {
sb.append(numbers[i]);
if (i < numbers.length - 1) {
sb.append("、");
}
}
viewBinding.includeXingyun.tvLuckNum.setText(sb.toString());
//幸运颜色
viewBinding.includeXingyun.tvLuckColor.setText(mTodayEntity.getFortuneAnalysis().getLuckyInfo().getColor());
//幸运方位
viewBinding.includeXingyun.tvLuckFw.setText(mTodayEntity.getFortuneAnalysis().getLuckyInfo().getDirection());
//幸运时间
viewBinding.includeXingyun. tvLuckTime.setText(mTodayEntity.getFortuneAnalysis().getLuckyInfo().getLuckyTimes().get(0).getTime());
//幸运花卉
viewBinding.includeXingyun.tvLuckFlower.setText(mTodayEntity.getFortuneAnalysis().getLuckyInfo().getFlower());
//幸运方位
viewBinding.includeXingyun.tvLuckFood.setText(mTodayEntity.getFortuneAnalysis().getLuckyInfo().getFood());
//宜 忌
String positive = mTodayEntity.getFortuneAnalysis().getSuggestions().getPositive();
String negative = mTodayEntity.getFortuneAnalysis().getSuggestions().getNegative();
viewBinding.includeYsjy.tvPositive.setText(positive);
viewBinding.includeYsjy.tvNegative.setText(negative);
//五行分析
viewBinding.includeYsjy.tvFive.setText(mTodayEntity.getFortuneAnalysis().getFiveElementsAnalysis());
// 重置动画标志位
resetAnimationFlags();
}
/**
* 通过城市逆地理编码,获取经纬度
* @param cityName
*/
private void getLatLngByCityName(String cityName) {
try {
GeocodeSearch geocodeSearch = new GeocodeSearch(mContext);
geocodeSearch.setOnGeocodeSearchListener(new GeocodeSearch.OnGeocodeSearchListener() {
@Override
public void onRegeocodeSearched(com.amap.api.services.geocoder.RegeocodeResult regeocodeResult, int i) {
// Not used here
}
@Override
public void onGeocodeSearched(GeocodeResult geocodeResult, int rCode) {
if (rCode == AMapException.CODE_AMAP_SUCCESS) {
List<GeocodeAddress> addressList = geocodeResult.getGeocodeAddressList();
if (addressList != null && !addressList.isEmpty()) {
GeocodeAddress address = addressList.get(0);
LatLonPoint latLonPoint = address.getLatLonPoint();
String lat = String.valueOf(NumberDecimalFilter.roundToTwoDecimalPlaces(latLonPoint.getLatitude()));
String lng = String.valueOf(NumberDecimalFilter.roundToTwoDecimalPlaces(latLonPoint.getLongitude()));
WeatherParameter parameter = new WeatherParameter(lng + "," + lat)
.lang(Lang.ZH_HANS)
.unit(Unit.METRIC);
instance.weatherNow(parameter, new Callback<WeatherNowResponse>() {
@Override
public void onSuccess(WeatherNowResponse response) {
mContext.runOnUiThread(new Runnable() {
@Override
public void run() {
try {
WeatherIconUtil.loadWeatherIcon(mContext,viewBinding.includedBirthInfo.imgWeather,response.getNow().getIcon());
viewBinding.includedBirthInfo.tvTianqi.setText(response.getNow().getText() + " " +response.getNow().getTemp() + "℃");
} catch (Exception e) {
throw new RuntimeException(e);
}
}
});
}
@Override
public void onFailure(ErrorResponse errorResponse) {
Log.d(TAG,"调用和风 API--onFailure" + errorResponse.toString());
}
@Override
public void onException(Throwable e) {
Log.d(TAG,"调用和风 API--onException" + e.getMessage());
e.printStackTrace();
}
});
} else {
Log.d("GeoUtil", "未找到城市: " + cityName);
}
} else {
Log.e("GeoUtil", "查询失败,错误码: " + rCode);
}
}
});
// 创建 GeocodeQuery,第一个参数是城市名,第二个参数可指定省份(可选)
GeocodeQuery query = new GeocodeQuery(cityName, null);
geocodeSearch.getFromLocationNameAsyn(query); // 异步查询
} catch (AMapException e) {
throw new RuntimeException(e);
}
}
// 重置动画标志位
private void resetAnimationFlags() {
isOverallAnimPlayed = false;
isCareerAnimPlayed = false;
isLoveAnimPlayed = false;
isHealthAnimPlayed = false;
isWealthAnimPlayed = false;
}
@Override
public void onPause() {
super.onPause();
// 停止Toast任务
stopToastTask();
// 重置标志位以便下次可见时重新动画
resetAnimationFlags();
}
@Override
public void onDestroy() {
super.onDestroy();
// 清理资源
stopToastTask();
}
@Override
public void onNetChange(int netModel) {
}
@Override
public void showError(String message) {
// 停止Toast任务
stopToastTask();
hideDialogLoading();
ToastUtil.showShort(mContext,message);
}
@Override
public void logOut(BaseBean bean) {
}
@Override
public void getAllCitySuccess(List<CityDataEntity> list) {
}
/* 高德定位依赖已移除
private void initLocationInfo() {
try {
// 初始化高德地图SDK
AMapLocationClient.setApiKey(AppConfig.GAODE_MAP_APP_KEY);
//高德要求,更新隐私合规
AMapLocationClient.updatePrivacyShow(mContext, true, true);
//初始化定位
mLocationClient = new AMapLocationClient(mContext);
//设置定位回调监听
mLocationClient.setLocationListener(locationListener);
//初始化AMapLocationClientOption对象
mLocationOption = new AMapLocationClientOption();
mLocationOption.setLocationMode(AMapLocationClientOption.AMapLocationMode.Hight_Accuracy);
//该方法默认为false。单次定位
mLocationOption.setOnceLocation(true);
//获取最近3s内精度最高的一次定位结果:
//设置setOnceLocationLatest(boolean b)接口为true,启动定位时SDK会返回最近3s内精度最高的一次定位结果。
// 如果设置其为true,setOnceLocation(boolean b)接口也会被设置为true,反之不会,默认为false
mLocationOption.setOnceLocationLatest(true);
//设置是否返回地址信息(默认返回地址信息)
mLocationOption.setNeedAddress(true);
//设置是否允许模拟位置,默认为true,允许模拟位置
mLocationOption.setMockEnable(true);
//单位是毫秒,默认30000毫秒,建议超时时间不要低于8000毫秒。
mLocationOption.setHttpTimeOut(20000);
//给定位客户端对象设置定位参数
mLocationClient.setLocationOption(mLocationOption);
//启动定位
mLocationClient.startLocation();
} catch (Exception e) {
e.printStackTrace();
}
}
*/
/* 高德定位依赖已移除
AMapLocationListener locationListener = new AMapLocationListener() {
@Override
public void onLocationChanged(AMapLocation aMapLocation) {
if(aMapLocation != null){
hideDialogLoading();
if(aMapLocation.getErrorCode() == 0){
}
}
}
};
*/
private void getCurrentCityWeather(GeoPoiResponse response) {
}
@Override
public void onPermissionsGranted(int requestCode, @NonNull List<String> perms) {
// AMapLocationClient.updatePrivacyAgree(mContext, true);
// initLocationInfo();
}
@Override
public void onPermissionsDenied(int requestCode, @NonNull List<String> perms) {
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
hidePermissionDialog();
if(requestCode == REQUEST_EVENT_CODE_10002){
if(grantResults[0] == 0){
ToastUtil.showShort(mContext,"定位获取成功");
}
}
}
}

View File

@@ -15,6 +15,7 @@ import com.ckkj.griddle.network.BaseBean;
import com.ckkj.griddle.food.adapter.ShopFoodAdapter; import com.ckkj.griddle.food.adapter.ShopFoodAdapter;
import com.ckkj.griddle.food.entity.ShopBannerEntity; import com.ckkj.griddle.food.entity.ShopBannerEntity;
import com.ckkj.griddle.food.entity.ShopCategoryEntity; import com.ckkj.griddle.food.entity.ShopCategoryEntity;
import com.ckkj.griddle.food.entity.ShopGoodsEntity;
import com.ckkj.griddle.food.entity.ShopGoodsPageEntity; import com.ckkj.griddle.food.entity.ShopGoodsPageEntity;
import com.ckkj.griddle.food.mock.FoodMockData; import com.ckkj.griddle.food.mock.FoodMockData;
import com.ckkj.griddle.food.mvp.ShopContract; import com.ckkj.griddle.food.mvp.ShopContract;
@@ -73,6 +74,8 @@ public class AllGoodsActivity extends BaseActivity<AllGoodsLayoutBinding, ShopPr
/** 美食页使用独立卡片样式,保留商城 Tab 原有的商品卡片。 */ /** 美食页使用独立卡片样式,保留商城 Tab 原有的商品卡片。 */
private void initGoodsList() { private void initGoodsList() {
goodsAdapter = new ShopFoodAdapter(R.layout.food_recommend_item); goodsAdapter = new ShopFoodAdapter(R.layout.food_recommend_item);
goodsAdapter.setOnItemClickListener((adapter, view, position) ->
openFoodDetail(goodsAdapter.getItem(position)));
viewBinding.rvAllGoods.setLayoutManager(new StaggeredGridLayoutManager( viewBinding.rvAllGoods.setLayoutManager(new StaggeredGridLayoutManager(
2, StaggeredGridLayoutManager.VERTICAL)); 2, StaggeredGridLayoutManager.VERTICAL));
viewBinding.rvAllGoods.setItemAnimator(null); viewBinding.rvAllGoods.setItemAnimator(null);
@@ -82,6 +85,14 @@ public class AllGoodsActivity extends BaseActivity<AllGoodsLayoutBinding, ShopPr
oldLeft, oldTop, oldRight, oldBottom) -> updateRecipeColumns(right - left)); oldLeft, oldTop, oldRight, oldBottom) -> updateRecipeColumns(right - left));
} }
/** 通过父类统一路由传递所选美食,返回时保留当前列表和分页位置。 */
private void openFoodDetail(ShopGoodsEntity food) {
if (food == null) {
return;
}
goTo(mContext, FoodDetailActivity.class, FoodDetailActivity.createBundle(food));
}
/** 根据列表实际可用宽度更新列数,适配折叠展开、横屏及分屏。 */ /** 根据列表实际可用宽度更新列数,适配折叠展开、横屏及分屏。 */
private void updateRecipeColumns(int widthPx) { private void updateRecipeColumns(int widthPx) {
if (widthPx <= 0 || viewBinding == null) { if (widthPx <= 0 || viewBinding == null) {

View File

@@ -0,0 +1,144 @@
package com.ckkj.griddle.food;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import androidx.recyclerview.widget.LinearLayoutManager;
import com.bumptech.glide.Glide;
import com.ckkj.griddle.R;
import com.ckkj.griddle.base.BaseActivity;
import com.ckkj.griddle.databinding.FoodDetailLayoutBinding;
import com.ckkj.griddle.food.adapter.FoodIngredientAdapter;
import com.ckkj.griddle.food.entity.FoodDetailEntity;
import com.ckkj.griddle.food.entity.ShopGoodsEntity;
import com.ckkj.griddle.food.mvp.FoodDetailContract;
import com.ckkj.griddle.food.mvp.FoodDetailImpl;
import com.ckkj.griddle.food.mvp.FoodDetailPresenter;
import com.ckkj.griddle.network.BaseBean;
import com.ckkj.griddle.utils.show.ToastUtil;
import com.gyf.immersionbar.ImmersionBar;
import java.io.Serializable;
import java.util.ArrayList;
import butterknife.OnClick;
/** 美食详情:展示封面、完整名称、简介及动态食材列表。 */
public class FoodDetailActivity extends BaseActivity<FoodDetailLayoutBinding, FoodDetailPresenter>
implements FoodDetailContract.DetailView {
private static final String EXTRA_FOOD = "food_detail_food";
private FoodIngredientAdapter ingredientAdapter;
private ShopGoodsEntity selectedFood;
/** 首页及全部美食列表复用同一参数,保留所点条目的 ID、名称和封面。 */
public static Bundle createBundle(ShopGoodsEntity food) {
Bundle bundle = new Bundle();
bundle.putSerializable(EXTRA_FOOD, food);
return bundle;
}
@Override
public FoodDetailPresenter createPresenter() {
return new FoodDetailPresenter(new FoodDetailImpl());
}
@Override
public int getLayoutResId(Bundle savedInstanceState) {
return R.layout.food_detail_layout;
}
@Override
public void initData(Bundle savedInstanceState) {
super.initData(savedInstanceState);
// 页面、标题栏与系统状态栏保持相同底色,避免出现颜色分层。
ImmersionBar.with(this)
.statusBarColor(R.color.f9f9f9)
.statusBarDarkFont(true)
.navigationBarColor(R.color.f9f9f9)
.init();
initIngredients();
Serializable extra = getIntent().getSerializableExtra(EXTRA_FOOD);
if (extra instanceof ShopGoodsEntity) {
selectedFood = (ShopGoodsEntity) extra;
}
mPresenter.getFoodDetail(selectedFood);
}
private void initIngredients() {
ingredientAdapter = new FoodIngredientAdapter();
viewBinding.rvFoodIngredients.setLayoutManager(new LinearLayoutManager(this));
viewBinding.rvFoodIngredients.setNestedScrollingEnabled(false);
viewBinding.rvFoodIngredients.setItemAnimator(null);
viewBinding.rvFoodIngredients.setAdapter(ingredientAdapter);
}
@Override
public void showFoodDetail(FoodDetailEntity detail) {
if (detail == null) {
showError(null);
return;
}
String name = TextUtils.isEmpty(detail.getName())
? getString(R.string.food_detail_title) : detail.getName();
viewBinding.tvFoodDetailTitle.setText(name);
viewBinding.tvFoodDetailName.setText(name);
viewBinding.ivFoodDetailCover.setContentDescription(name);
setTitle(name);
String cover = detail.getCover();
Glide.with(this)
.load(TextUtils.isEmpty(cover) ? null : cover.trim())
.placeholder(R.drawable.food_cover_placeholder)
.fallback(R.drawable.food_cover_placeholder)
.error(R.drawable.food_cover_placeholder)
.centerCrop()
.into(viewBinding.ivFoodDetailCover);
// 设计稿简介区域没有正文;接口返回内容时再显示,不预留空白正文高度。
viewBinding.tvFoodDetailDescription.setText(detail.getDescription());
viewBinding.tvFoodDetailDescription.setVisibility(
TextUtils.isEmpty(detail.getDescription()) ? View.GONE : View.VISIBLE);
ingredientAdapter.setNewData(new ArrayList<>(detail.getIngredients()));
viewBinding.tvFoodDetailState.setVisibility(View.GONE);
viewBinding.scrollFoodDetail.setVisibility(View.VISIBLE);
}
@OnClick({R.id.iv_food_detail_back, R.id.tv_food_detail_state})
public void onClick(View v) {
switch (v.getId()) {
case R.id.iv_food_detail_back:
finish();
break;
case R.id.tv_food_detail_state:
mPresenter.getFoodDetail(selectedFood);
break;
default:
break;
}
}
@Override
public void showError(String message) {
String error = TextUtils.isEmpty(message)
? getString(R.string.food_detail_unavailable) : message;
viewBinding.scrollFoodDetail.setVisibility(View.GONE);
viewBinding.tvFoodDetailState.setText(error);
viewBinding.tvFoodDetailState.setVisibility(View.VISIBLE);
ToastUtil.showShort(mContext, error);
}
@Override
public void logOut(BaseBean bean) {
// 登录失效沿用父类统一处理。
}
@Override
protected void onDestroy() {
viewBinding.rvFoodIngredients.setAdapter(null);
super.onDestroy();
}
}

View File

@@ -153,6 +153,10 @@ public class ShopFragment extends BaseFragment<ShopFragmentBinding, ShopPresente
}); });
breakfastAdapter = new ShopFoodAdapter(R.layout.food_breakfast_item); breakfastAdapter = new ShopFoodAdapter(R.layout.food_breakfast_item);
recommendationAdapter = new ShopFoodAdapter(R.layout.food_recommend_item); recommendationAdapter = new ShopFoodAdapter(R.layout.food_recommend_item);
breakfastAdapter.setOnItemClickListener((adapter, view, position) ->
openFoodDetail(breakfastAdapter.getItem(position)));
recommendationAdapter.setOnItemClickListener((adapter, view, position) ->
openFoodDetail(recommendationAdapter.getItem(position)));
viewBinding.rvFoodCategories.setAdapter(categoryAdapter); viewBinding.rvFoodCategories.setAdapter(categoryAdapter);
viewBinding.rvFoodBreakfast.setAdapter(breakfastAdapter); viewBinding.rvFoodBreakfast.setAdapter(breakfastAdapter);
viewBinding.rvFoodRecommend.setAdapter(recommendationAdapter); viewBinding.rvFoodRecommend.setAdapter(recommendationAdapter);
@@ -161,6 +165,14 @@ public class ShopFragment extends BaseFragment<ShopFragmentBinding, ShopPresente
oldLeft, oldTop, oldRight, oldBottom) -> updateRecommendationColumns(right - left)); oldLeft, oldTop, oldRight, oldBottom) -> updateRecommendationColumns(right - left));
} }
/** 首页分类区和推荐区统一进入同一详情页。 */
private void openFoodDetail(ShopGoodsEntity food) {
if (food == null) {
return;
}
goTo(mContext, FoodDetailActivity.class, FoodDetailActivity.createBundle(food));
}
private void updateRecommendationColumns(int widthPx) { private void updateRecommendationColumns(int widthPx) {
if (widthPx <= 0 || viewBinding == null) { if (widthPx <= 0 || viewBinding == null) {
return; return;

View File

@@ -0,0 +1,18 @@
package com.ckkj.griddle.food.adapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ckkj.griddle.R;
/** 食材条目按数据动态排列,长文案自然换行。 */
public class FoodIngredientAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
public FoodIngredientAdapter() {
super(R.layout.item_food_ingredient);
}
@Override
protected void convert(BaseViewHolder helper, String item) {
helper.setText(R.id.tv_food_ingredient, item);
}
}

View File

@@ -0,0 +1,45 @@
package com.ckkj.griddle.food.entity;
import java.util.Collections;
import java.util.List;
/** 美食详情,名称、封面、简介和食材均由数据层提供。 */
public class FoodDetailEntity {
private String name;
private String cover;
private String description;
private List<String> ingredients;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCover() {
return cover;
}
public void setCover(String cover) {
this.cover = cover;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public List<String> getIngredients() {
return ingredients == null ? Collections.emptyList() : ingredients;
}
public void setIngredients(List<String> ingredients) {
this.ingredients = ingredients;
}
}

View File

@@ -1,16 +1,20 @@
package com.ckkj.griddle.food.mock; package com.ckkj.griddle.food.mock;
import android.content.Context; import android.content.Context;
import android.text.TextUtils;
import androidx.annotation.ArrayRes;
import androidx.annotation.StringRes; import androidx.annotation.StringRes;
import com.ckkj.griddle.R; import com.ckkj.griddle.R;
import com.ckkj.griddle.food.entity.FoodDetailEntity;
import com.ckkj.griddle.food.entity.ShopBannerEntity; import com.ckkj.griddle.food.entity.ShopBannerEntity;
import com.ckkj.griddle.food.entity.ShopCategoryEntity; import com.ckkj.griddle.food.entity.ShopCategoryEntity;
import com.ckkj.griddle.food.entity.ShopGoodsEntity; import com.ckkj.griddle.food.entity.ShopGoodsEntity;
import com.ckkj.griddle.food.entity.ShopGoodsPageEntity; import com.ckkj.griddle.food.entity.ShopGoodsPageEntity;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.List; import java.util.List;
/** /**
@@ -106,6 +110,32 @@ public final class FoodMockData {
return paginate(goods, page, pageSize); return paginate(goods, page, pageSize);
} }
/**
* 临时详情沿用列表条目的名称及封面,食材按展示菜品分组填充。
* TODO 接入详情接口时与本类其他模拟数据一并删除。
*/
public static FoodDetailEntity getDetail(Context context, ShopGoodsEntity food) {
FoodDetailEntity detail = new FoodDetailEntity();
detail.setName(food.getGoodsName());
detail.setCover(food.getGoodsImg());
// 设计稿的简介区仅展示标题和分隔线,暂不添加设计稿之外的模拟正文。
detail.setDescription("");
String image = TextUtils.isEmpty(food.getGoodsImg()) ? "" : food.getGoodsImg();
@ArrayRes int ingredientsRes = R.array.food_mock_ingredients_main;
if (image.contains("noodles") || image.contains("pasta")) {
ingredientsRes = R.array.food_mock_ingredients_noodles;
} else if (image.contains("fried_rice")) {
ingredientsRes = R.array.food_mock_ingredients_rice;
} else if (image.contains("egg_tart")) {
ingredientsRes = R.array.food_mock_ingredients_pastry;
} else if (image.contains("fruit_drinks")) {
ingredientsRes = R.array.food_mock_ingredients_drinks;
}
detail.setIngredients(new ArrayList<>(Arrays.asList(
context.getResources().getStringArray(ingredientsRes))));
return detail;
}
/** 总数始终为完整数据量,越界页返回空列表,避免反复加载相同数据。 */ /** 总数始终为完整数据量,越界页返回空列表,避免反复加载相同数据。 */
private static ShopGoodsPageEntity paginate(List<ShopGoodsEntity> goods, private static ShopGoodsPageEntity paginate(List<ShopGoodsEntity> goods,
int page, int pageSize) { int page, int pageSize) {

View File

@@ -0,0 +1,20 @@
package com.ckkj.griddle.food.mvp;
import com.ckkj.griddle.base.IView;
import com.ckkj.griddle.food.entity.FoodDetailEntity;
import com.ckkj.griddle.food.entity.ShopGoodsEntity;
/** 美食详情页面与数据层的基础协议。 */
public final class FoodDetailContract {
private FoodDetailContract() {
}
public interface DataModel {
void getFoodDetail(ShopGoodsEntity food, ShopContract.CallBack<FoodDetailEntity> callback);
}
public interface DetailView extends IView {
void showFoodDetail(FoodDetailEntity detail);
}
}

View File

@@ -0,0 +1,27 @@
package com.ckkj.griddle.food.mvp;
import android.content.Context;
import com.ckkj.griddle.MyApplication;
import com.ckkj.griddle.R;
import com.ckkj.griddle.food.entity.FoodDetailEntity;
import com.ckkj.griddle.food.entity.ShopGoodsEntity;
import com.ckkj.griddle.food.mock.FoodMockData;
import com.ckkj.griddle.utils.AppLanguageUtil;
/** 详情暂用本地模拟数据,后续联调在此替换为详情接口。 */
public class FoodDetailImpl implements FoodDetailContract.DataModel {
@Override
public void getFoodDetail(ShopGoodsEntity food,
ShopContract.CallBack<FoodDetailEntity> callback) {
// 数据层不持有 Activity,读取资源时使用应用当前选择的语言。
Context context = AppLanguageUtil.wrap(MyApplication.getContext());
if (food == null) {
callback.fail(context.getString(R.string.food_detail_unavailable));
return;
}
// TODO 美食接口联调时,改用 food.getId() 查询详情并删除此模拟数据调用。
callback.success(FoodMockData.getDetail(context, food));
}
}

View File

@@ -0,0 +1,33 @@
package com.ckkj.griddle.food.mvp;
import com.ckkj.griddle.base.BasePresenter;
import com.ckkj.griddle.food.entity.FoodDetailEntity;
import com.ckkj.griddle.food.entity.ShopGoodsEntity;
/** 美食详情协调层,页面沿用项目现有 MVP 关联方式。 */
public class FoodDetailPresenter extends BasePresenter<FoodDetailContract.DetailView> {
private final FoodDetailContract.DataModel impl;
public FoodDetailPresenter(FoodDetailContract.DataModel impl) {
this.impl = impl;
}
public void getFoodDetail(ShopGoodsEntity food) {
impl.getFoodDetail(food, new ShopContract.CallBack<FoodDetailEntity>() {
@Override
public void success(FoodDetailEntity detail) {
if (getView() != null) {
getView().showFoodDetail(detail);
}
}
@Override
public void fail(String message) {
if (getView() != null) {
getView().showError(message);
}
}
});
}
}

View File

@@ -94,7 +94,7 @@ public class LaunchActivity extends BaseActivity<GuideLayoutBinding, MainPresent
if(AppConfig.USER_LOGIN && !TextUtils.isEmpty(AppConfig.USER_TOKEN)){ if(AppConfig.USER_LOGIN && !TextUtils.isEmpty(AppConfig.USER_TOKEN)){
goTo(mContext, MainActivity.class, null); goTo(mContext, MainActivity.class, null);
}else{ }else{
Intent intent = new Intent(mContext, MainActivity.class); Intent intent = new Intent(mContext, LoginActivity.class);
startActivity(intent); startActivity(intent);
} }
finish(); finish();

View File

@@ -22,7 +22,6 @@ import com.ckkj.griddle.base.BaseActivity;
import com.ckkj.griddle.base.entity.MineUserInfoBean; import com.ckkj.griddle.base.entity.MineUserInfoBean;
import com.ckkj.griddle.databinding.MainActivityLayoutBinding; import com.ckkj.griddle.databinding.MainActivityLayoutBinding;
import com.ckkj.griddle.dialog.DialogAppUpdate; import com.ckkj.griddle.dialog.DialogAppUpdate;
import com.ckkj.griddle.food.AllGoodsFragment;
import com.ckkj.griddle.main.MainContract; import com.ckkj.griddle.main.MainContract;
import com.ckkj.griddle.main.MainImpl; import com.ckkj.griddle.main.MainImpl;
import com.ckkj.griddle.main.MainPresenter; import com.ckkj.griddle.main.MainPresenter;
@@ -123,7 +122,8 @@ public class MainActivity extends BaseActivity<MainActivityLayoutBinding, MainPr
mFragmentList.clear(); mFragmentList.clear();
mFragmentList.add(new DeviceFragment()); mFragmentList.add(new DeviceFragment());
mFragmentList.add(new ShopFragment()); mFragmentList.add(new ShopFragment());
mFragmentList.add(new AllGoodsFragment()); // 美食继续使用 food.ShopFragment,商城独立使用 shop 模块。
mFragmentList.add(new com.ckkj.griddle.shop.ShopFragment());
mFragmentList.add(new MineFragment()); mFragmentList.add(new MineFragment());
// 重新设置适配器 // 重新设置适配器
@@ -196,6 +196,9 @@ public class MainActivity extends BaseActivity<MainActivityLayoutBinding, MainPr
if (selected == TAB_FOOD) { if (selected == TAB_FOOD) {
return R.color.food_page_background; return R.color.food_page_background;
} }
if (selected == TAB_SHOP) {
return R.color.shop_mall_background;
}
return R.color.f9f9f9; return R.color.f9f9f9;
} }

View File

@@ -0,0 +1,148 @@
package com.ckkj.griddle.message;
import android.graphics.Rect;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.ckkj.griddle.R;
import com.ckkj.griddle.base.BaseActivity;
import com.ckkj.griddle.base.BaseFragment;
import com.ckkj.griddle.databinding.MessageCenterLayoutBinding;
import com.ckkj.griddle.message.adapter.MessageAdapter;
import com.ckkj.griddle.message.entity.MessageEntity;
import com.ckkj.griddle.message.mvp.MessageContract;
import com.ckkj.griddle.message.mvp.MessageImpl;
import com.ckkj.griddle.message.mvp.MessagePresenter;
import com.ckkj.griddle.network.BaseBean;
import com.ckkj.griddle.utils.show.ToastUtil;
import com.gyf.immersionbar.ImmersionBar;
import java.util.ArrayList;
import java.util.List;
import butterknife.OnClick;
/** 消息中心:常规浅色标题栏,支持查看通知及全部标记已读。 */
public class MessageCenterActivity extends BaseActivity<MessageCenterLayoutBinding, MessagePresenter>
implements MessageContract.MessageView {
private MessageAdapter adapter;
@Override
public MessagePresenter createPresenter() {
return new MessagePresenter(new MessageImpl());
}
@Override
public int getLayoutResId(Bundle savedInstanceState) {
return R.layout.message_center_layout;
}
@Override
public void initData(Bundle savedInstanceState) {
super.initData(savedInstanceState);
// 根布局处理系统边距,状态栏和常规标题栏保持白底深色文字。
ImmersionBar.with(this).statusBarColor(R.color.white).statusBarDarkFont(true)
.navigationBarColor(R.color.message_center_background).navigationBarDarkIcon(true).init();
adapter = new MessageAdapter();
viewBinding.rvMessageCenter.setLayoutManager(new LinearLayoutManager(this));
viewBinding.rvMessageCenter.setItemAnimator(null);
viewBinding.rvMessageCenter.setAdapter(adapter);
final int gap = Math.round(12 * getResources().getDisplayMetrics().density);
viewBinding.rvMessageCenter.addItemDecoration(new RecyclerView.ItemDecoration() {
@Override
public void getItemOffsets(@NonNull Rect outRect, @NonNull View view,
@NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
outRect.set(0, parent.getChildAdapterPosition(view) > 0 ? gap : 0, 0, 0);
}
});
adapter.setOnItemClickListener((baseAdapter, view, position) -> openMessage(position));
mPresenter.getMessages();
}
@OnClick({R.id.iv_message_center_back, R.id.tv_message_center_read_all, R.id.tv_message_center_state})
public void onClick(View v) {
switch (v.getId()) {
case R.id.iv_message_center_back:
finish();
break;
case R.id.tv_message_center_read_all:
mPresenter.markAllRead();
break;
case R.id.tv_message_center_state:
mPresenter.getMessages();
break;
default:
break;
}
}
private void openMessage(int position) {
if (position < 0 || position >= adapter.getData().size()
|| (dialog != null && dialog.isShowing())) return;
MessageEntity item = adapter.getItem(position);
if (item == null) return;
// 当前稿未提供详情页,复用父类弹窗查看完整通知,不扩展新的 Activity。
if (!item.read) mPresenter.markRead(item.id);
showDialogtext(null, false, false, true,
getString(item.titleRes), getString(item.contentRes), null,
getString(R.string.message_center_close), new BaseFragment.OnDialogClick() {
@Override
public void onCancelClick() {
// 关闭弹窗,保留消息列表。
}
@Override
public void onConfirmClick() {
// 已读记录由数据层维护,无需重复更新。
}
});
// 父类只在双按钮都有文案时赋值,单按钮弹窗在此补齐本地化文字。
TextView closeButton = dialog.findViewById(R.id.btnRight);
if (closeButton != null) closeButton.setText(R.string.message_center_close);
}
@Override
public void showMessages(List<MessageEntity> messages) {
List<MessageEntity> data = messages == null ? new ArrayList<>() : new ArrayList<>(messages);
adapter.setNewData(data);
viewBinding.tvMessageCenterState.setText(R.string.message_center_empty);
viewBinding.tvMessageCenterState.setVisibility(data.isEmpty() ? View.VISIBLE : View.GONE);
boolean hasUnread = false;
for (MessageEntity item : data) {
if (!item.read) {
hasUnread = true;
break;
}
}
viewBinding.tvMessageCenterReadAll.setEnabled(hasUnread);
viewBinding.tvMessageCenterReadAll.setAlpha(hasUnread ? 1f : 0.45f);
}
@Override
public void showError(String message) {
String error = TextUtils.isEmpty(message) ? getString(R.string.message_center_load_failed) : message;
if (adapter != null && adapter.getData().isEmpty()) {
viewBinding.tvMessageCenterState.setText(error);
viewBinding.tvMessageCenterState.setVisibility(View.VISIBLE);
}
ToastUtil.showShort(mContext, error);
}
@Override
public void logOut(BaseBean bean) {
// 登录失效沿用父类统一处理。
}
@Override
protected void onDestroy() {
viewBinding.rvMessageCenter.setAdapter(null);
if (dialog != null && dialog.isShowing()) dialog.dismiss();
super.onDestroy();
}
}

View File

@@ -0,0 +1,25 @@
package com.ckkj.griddle.message.adapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ckkj.griddle.R;
import com.ckkj.griddle.message.entity.MessageEntity;
/** 消息卡片:摘要最多两行,完整内容在点击后展示。 */
public class MessageAdapter extends BaseQuickAdapter<MessageEntity, BaseViewHolder> {
public MessageAdapter() {
super(R.layout.item_message_center);
}
@Override
protected void convert(BaseViewHolder helper, MessageEntity item) {
helper.setText(R.id.tv_message_item_title, mContext.getString(item.titleRes));
helper.setText(R.id.tv_message_item_content, mContext.getString(item.contentRes));
helper.setText(R.id.tv_message_item_time, mContext.getString(item.timeRes));
// 已读不额外添加设计稿之外的角标,通过辅助描述提供状态信息。
helper.itemView.setContentDescription(mContext.getString(R.string.message_center_item_description,
mContext.getString(item.titleRes),
mContext.getString(item.read ? R.string.message_center_read : R.string.message_center_unread),
mContext.getString(item.contentRes)));
}
}

View File

@@ -0,0 +1,18 @@
package com.ckkj.griddle.message.entity;
/** 消息列表条目;本地示例文案通过资源 ID 随应用语言切换。 */
public class MessageEntity {
public final String id;
public final int titleRes;
public final int contentRes;
public final int timeRes;
public final boolean read;
public MessageEntity(String id, int titleRes, int contentRes, int timeRes, boolean read) {
this.id = id;
this.titleRes = titleRes;
this.contentRes = contentRes;
this.timeRes = timeRes;
this.read = read;
}
}

View File

@@ -0,0 +1,29 @@
package com.ckkj.griddle.message.mvp;
import com.ckkj.griddle.base.IView;
import com.ckkj.griddle.message.entity.MessageEntity;
import java.util.List;
/** 消息中心基础协议,页面不直接维护数据来源及已读记录。 */
public final class MessageContract {
private MessageContract() { }
public interface CallBack<T> {
void success(T data);
void fail(String message);
}
public interface DataModel {
void getMessages(CallBack<List<MessageEntity>> callback);
void markRead(String id, CallBack<List<MessageEntity>> callback);
void markAllRead(CallBack<List<MessageEntity>> callback);
}
public interface MessageView extends IView {
void showMessages(List<MessageEntity> messages);
}
}

View File

@@ -0,0 +1,47 @@
package com.ckkj.griddle.message.mvp;
import android.content.Context;
import android.content.SharedPreferences;
import com.ckkj.griddle.MyApplication;
import com.ckkj.griddle.R;
import com.ckkj.griddle.message.entity.MessageEntity;
import java.util.ArrayList;
import java.util.List;
/** 消息数据层:暂用设计稿示例,接口联调时统一替换此处。 */
public class MessageImpl implements MessageContract.DataModel {
private static final String DEMO_MESSAGE_ID = "demo_system_maintenance";
private static final String PREVIEW_READ_STATE = "message_center_preview_read_state";
private SharedPreferences getReadState() {
// 仅保存模拟消息已读状态,单独命名,避免与后续服务端消息记录混用。
return MyApplication.getContext().getSharedPreferences(PREVIEW_READ_STATE, Context.MODE_PRIVATE);
}
@Override
public void getMessages(MessageContract.CallBack<List<MessageEntity>> callback) {
List<MessageEntity> messages = new ArrayList<>();
messages.add(new MessageEntity(DEMO_MESSAGE_ID, R.string.message_center_system_notice,
R.string.message_center_demo_content, R.string.message_center_demo_time,
getReadState().getBoolean(DEMO_MESSAGE_ID, false)));
callback.success(messages);
}
@Override
public void markRead(String id, MessageContract.CallBack<List<MessageEntity>> callback) {
if (!DEMO_MESSAGE_ID.equals(id)) {
callback.fail(null);
return;
}
getReadState().edit().putBoolean(id, true).apply();
getMessages(callback);
}
@Override
public void markAllRead(MessageContract.CallBack<List<MessageEntity>> callback) {
getReadState().edit().putBoolean(DEMO_MESSAGE_ID, true).apply();
getMessages(callback);
}
}

View File

@@ -0,0 +1,41 @@
package com.ckkj.griddle.message.mvp;
import com.ckkj.griddle.base.BasePresenter;
import com.ckkj.griddle.message.entity.MessageEntity;
import java.util.List;
/** 消息中心协调层,加载、单条已读和全部已读共用列表回显。 */
public class MessagePresenter extends BasePresenter<MessageContract.MessageView> {
private final MessageContract.DataModel impl;
public MessagePresenter(MessageContract.DataModel impl) {
this.impl = impl;
}
public void getMessages() {
impl.getMessages(createCallback());
}
public void markRead(String id) {
impl.markRead(id, createCallback());
}
public void markAllRead() {
impl.markAllRead(createCallback());
}
private MessageContract.CallBack<List<MessageEntity>> createCallback() {
return new MessageContract.CallBack<List<MessageEntity>>() {
@Override
public void success(List<MessageEntity> messages) {
if (getView() != null) getView().showMessages(messages);
}
@Override
public void fail(String message) {
if (getView() != null) getView().showError(message);
}
};
}
}

View File

@@ -3,14 +3,8 @@ package com.ckkj.griddle.network;
import com.ckkj.griddle.base.entity.MineUserInfoBean; import com.ckkj.griddle.base.entity.MineUserInfoBean;
import com.ckkj.griddle.fate.entity.CityDataEntity;
import com.ckkj.griddle.fate.entity.FateHistoryEntity;
import com.ckkj.griddle.fate.entity.TodayFateEntity;
import com.ckkj.griddle.login.entity.LoginEntity; import com.ckkj.griddle.login.entity.LoginEntity;
import com.ckkj.griddle.main.entity.CheckVersionEntity; import com.ckkj.griddle.main.entity.CheckVersionEntity;
import com.ckkj.griddle.plate.entity.BaziResultBean;
import com.ckkj.griddle.plate.entity.BaziSaveSuccessEntity;
import com.ckkj.griddle.plate.entity.PaipanHistoryEntity;
import com.ckkj.griddle.food.entity.ShopBannerEntity; import com.ckkj.griddle.food.entity.ShopBannerEntity;
import com.ckkj.griddle.food.entity.ShopCategoryEntity; import com.ckkj.griddle.food.entity.ShopCategoryEntity;
import com.ckkj.griddle.food.entity.ShopGoodsPageEntity; import com.ckkj.griddle.food.entity.ShopGoodsPageEntity;
@@ -46,15 +40,6 @@ public interface Request {
//版本检测更新 //版本检测更新
@POST("mine/api/versionNum") @POST("mine/api/versionNum")
Observable<BaseBean<CheckVersionEntity>> getVersionCheck(@HeaderMap Map<String, String> headMap, @QueryMap Map<String, Object> map); Observable<BaseBean<CheckVersionEntity>> getVersionCheck(@HeaderMap Map<String, String> headMap, @QueryMap Map<String, Object> map);
//获取城市列表
@GET("mobile/chinaCites")
Observable<BaseBean<List<CityDataEntity>>> getCityDatas(@HeaderMap Map<String, String> headMap, @QueryMap Map<String, Object> map);
//保存用户的生辰八字
@POST("mobile/yourhoroscope")
Observable<BaseBean> saveUserBirthInfo(@HeaderMap Map<String, String> headMap,@Body RequestBody requestBody);
//修改用户的生辰八字
@POST("mobile/yourhoroscope/modify")
Observable<BaseBean<TodayFateEntity>> saveUserEditBirthInfo(@HeaderMap Map<String, String> headMap,@Body RequestBody requestBody);
//发送验证码 //发送验证码
@POST("mobile/sendCode") @POST("mobile/sendCode")
Observable<BaseBean> sendPhoneCode(@HeaderMap Map<String, String> headMap,@Body RequestBody requestBody); Observable<BaseBean> sendPhoneCode(@HeaderMap Map<String, String> headMap,@Body RequestBody requestBody);
@@ -73,30 +58,6 @@ public interface Request {
//获取个人信息 //获取个人信息
@GET("mobile/userInfo") @GET("mobile/userInfo")
Observable<BaseBean<MineUserInfoBean>> getMineUserInfo(@HeaderMap Map<String, String> headMap, @QueryMap Map<String, Object> map); Observable<BaseBean<MineUserInfoBean>> getMineUserInfo(@HeaderMap Map<String, String> headMap, @QueryMap Map<String, Object> map);
//获取今日运势
@POST("mobile/yourhoroscope/today")
Observable<BaseBean<TodayFateEntity>> getUserTodayFateDatas(@HeaderMap Map<String, String> headMap);
//获取运势历史列表
@GET("mobile/yourhoroscope/history")
Observable<BaseBean<FateHistoryEntity>> getUserFateHistory(@HeaderMap Map<String, String> headMap);
//保存排盘结果
@POST("mobile/paiPan")
Observable<BaseBean<BaziSaveSuccessEntity>> startPaipan(@HeaderMap Map<String, String> headMap, @Body RequestBody requestBody);
//AI解析排盘结果
@POST("mobile/paiPan/ai")
Observable<BaseBean> aiParesBaziResult(@HeaderMap Map<String, String> headMap, @Body RequestBody requestBody);
//开始排盘
@POST("https://api.yuanfenju.com/index.php/v1/Bazi/jingpan")
Observable<BaseYfjApiBean<BaziResultBean>> startPaipanByYfj(@HeaderMap Map<String, String> headMap, @QueryMap Map<String, Object> map);
//获取运势历史列表
@GET("mobile/paiPan/records")
Observable<BaseBean<PaipanHistoryEntity>> getPaipanHistoryList(@HeaderMap Map<String, String> headMap);
//删除历史记录
@POST("mobile/paiPan/record")
Observable<BaseBean> deletePaipanRecordById(@HeaderMap Map<String, String> headMap, @QueryMap Map<String, Object> map);
//问题反馈
@POST("mobile/reporting")
Observable<BaseBean> commitReporting(@HeaderMap Map<String, String> headMap,@QueryMap Map<String, Object> map);
/** /**
* 获取商城顶部轮播商品,接口最多返回三个在售商品。 * 获取商城顶部轮播商品,接口最多返回三个在售商品。
*/ */

View File

@@ -1,40 +0,0 @@
package com.ckkj.griddle.plate.adapter;
import android.content.Context;
import android.graphics.Color;
import androidx.annotation.Nullable;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ckkj.griddle.R;
import com.ckkj.griddle.utils.helper.FiveElementsHelper;
import java.util.List;
/**
* @author fengxiaoyang
* @date 2025/8/6
* @description TODO: 描述该类的作用
*/
public class CangGanAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
private Context mContext;
private List<String> mDzGodList;
public CangGanAdapter(Context context, int layoutResId, @Nullable List<String> data,List<String> dzGodList) {
super(layoutResId, data);
this.mContext = context;
this.mDzGodList = dzGodList;
}
public void setmDzGodList(List<String> mDzGodList) {
this.mDzGodList = mDzGodList;
}
@Override
protected void convert(BaseViewHolder holder, String item) {
holder.setText(R.id.tv_cg_gan,item);
holder.setTextColor(R.id.tv_cg_gan, Color.parseColor(FiveElementsHelper.getElementInfo(item).get("color")));
holder.setText(R.id.tv_cg_shishen,mDzGodList.get(holder.getLayoutPosition()));
}
}

View File

@@ -1,77 +0,0 @@
package com.ckkj.griddle.plate.adapter;
import android.content.Context;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ckkj.griddle.R;
import com.ckkj.griddle.plate.entity.BaziResultBean;
import com.ckkj.griddle.utils.helper.ShiShen;
import com.ckkj.griddle.utils.helper.ShiShenCalculator;
import java.util.List;
/**
* @author fengxiaoyang
* @date 2025/8/5
* @description TODO: 描述该类的作用
*/
public class DayunAdapter extends BaseQuickAdapter<BaziResultBean.DetailInfoDTO.DayunInfoDTO, BaseViewHolder> {
private Context mContext;
private int mSelPos = -1;
public DayunAdapter(Context context,int layoutResId, @Nullable List<BaziResultBean.DetailInfoDTO.DayunInfoDTO> data,
BaziResultBean.DetailInfoDTO.SizhuInfoDTO sizhuInfoDTO) {
super(layoutResId, data);
this.mContext = context;
}
public int getmSelPos() {
return mSelPos;
}
@Override
protected void convert(BaseViewHolder holder, BaziResultBean.DetailInfoDTO.DayunInfoDTO item) {
holder.setText(R.id.tv_year,item.getDayunStartYear() + "");
if(holder.getLayoutPosition() != 0){
holder.setText(R.id.tv_age,item.getDayunStartAge() + "岁");
holder.setText(R.id.tv_gan_value,ShiShenCalculator.getAbbreviation(item.getDayunShishen()));
holder.setText(R.id.tv_zhi_value,ShiShenCalculator.getAbbreviation(item.getDayunYearDzGod().get(0)));
holder.setGone(R.id.tv_gan_value,true);
holder.setGone(R.id.tv_zhi_value,true);
holder.setGone(R.id.tv_zhi_key,true);
holder.setText(R.id.tv_gan_key,item.getDayunYearTg());
holder.setText(R.id.tv_zhi_key,item.getDayunYearDz());
}else{
int dyStart = item.getDayunStartYear();
int dyEnd = item.getDayunEndYear();
if(dyStart > dyEnd){
holder.setText(R.id.tv_age,"0岁");
}else if(dyStart == dyEnd){
holder.setText(R.id.tv_age,"1岁");
}else{
holder.setText(R.id.tv_age,item.getDayunStartAge() + "-" + item.getDayunEndAge() + "岁");
}
holder.setGone(R.id.tv_gan_value,false);
holder.setGone(R.id.tv_zhi_value,false);
holder.setText(R.id.tv_gan_key,item.getDayunTongxian());
holder.setGone(R.id.tv_zhi_key,false);
holder.setGone(R.id.tv_zhi_value,false);
}
if(holder.getLayoutPosition() == mSelPos){
holder.setBackgroundColor(R.id.ll_item, ContextCompat.getColor(mContext,R.color.divider));
}else{
holder.setBackgroundColor(R.id.ll_item, ContextCompat.getColor(mContext,R.color.white));
}
}
public void setSelPostion(int pos){
this.mSelPos = pos;
notifyDataSetChanged();
}
}

View File

@@ -1,167 +0,0 @@
package com.ckkj.griddle.plate.adapter;
import android.content.Context;
import android.graphics.Color;
import android.text.TextUtils;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ckkj.griddle.R;
import com.ckkj.griddle.plate.entity.BaziResultBean;
import com.ckkj.griddle.utils.helper.FiveElementsHelper;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* @author fengxiaoyang
* @date 2025/8/6
* @description 大运、流年、流月柱状图适配器
*/
public class DayunColumnAdapter extends BaseQuickAdapter<BaziResultBean.DetailInfoDTO.DayunInfoDTO, BaseViewHolder> {
private Context mContext;
private int mDayunTypeCode = 100;
private CangGanAdapter mCangganAdapter;
private ShenshaAdapter mShenshaAdapter;
private int mSelectXiaoyunPos = -1;
public DayunColumnAdapter(Context context, int layoutResId,
@Nullable List<BaziResultBean.DetailInfoDTO.DayunInfoDTO> data,
int typeCode) {
super(layoutResId, data);
this.mContext = context;
this.mDayunTypeCode = typeCode;
}
@Override
protected void convert(BaseViewHolder holder, BaziResultBean.DetailInfoDTO.DayunInfoDTO item) {
RecyclerView rvDatas = holder.getView(R.id.rv_canggan);
RecyclerView rvShenShaData = holder.getView(R.id.rv_shensha_data);
holder.setGone(R.id.viewline,true);
switch (mDayunTypeCode) {
case 100: // 大运
// 第一个item(bornBean)童限 的特殊处理
holder.setText(R.id.tv_shishen, item.isTongXian() ?
item.getXiaoyunInfo().get(0).getXiaoyunShishen() : item.getDayunShishen());
holder.setText(R.id.tv_tg, item.isTongXian() ?
item.getXiaoyunInfo().get(0).getXiaoyunYearTg() : item.getDayunYearTg());
holder.setText(R.id.tv_dz, item.isTongXian() ?
item.getXiaoyunInfo().get(0).getXiaoyunYearDz() : item.getDayunYearDz());
holder.setTextColor(R.id.tv_tg, Color.parseColor(FiveElementsHelper.getElementInfo
(item.isTongXian() ?
item.getXiaoyunInfo().get(0).getXiaoyunYearTg() : item.getDayunYearTg()).get("color")));
holder.setTextColor(R.id.tv_dz, Color.parseColor(FiveElementsHelper.getElementInfo
(item.isTongXian() ?
item.getXiaoyunInfo().get(0).getXiaoyunYearTg() : item.getDayunYearTg()).get("color")));
holder.setText(R.id.tv_xingyun, item.isTongXian() ?
item.getXiaoyunInfo().get(0).getXiaoyunDzStarCs() : item.getDayunDzStarCs());
holder.setText(R.id.tv_zizuo, item.isTongXian() ?
item.getXiaoyunInfo().get(0).getXiaoyunDzSelfCs() : item.getDayunDzSelfCs());
holder.setText(R.id.tv_kongwang, item.isTongXian() ?
item.getXiaoyunInfo().get(0).getXiaoyunKongwang() : item.getDayunKongwang());
holder.setText(R.id.tv_nayin, item.isTongXian() ?
item.getXiaoyunInfo().get(0).getXiaoyunNayin() : item.getDayunNayin());
// bornBean可能没有藏干和神煞数据,需要特殊处理
if (mCangganAdapter == null) {
mCangganAdapter = new CangGanAdapter(mContext,
R.layout.paipan_canggan_item,
item.isTongXian() ? item.getXiaoyunInfo().get(0).getXiaoyunYearCg() : item.getDayunYearCg(),
item.isTongXian() ? item.getXiaoyunInfo().get(0).getXiaoyunDzGod() : item.getDayunYearDzGod());
rvDatas.setAdapter(mCangganAdapter);
} else {
mCangganAdapter.setNewData(item.isTongXian() ?
item.getXiaoyunInfo().get(0).getXiaoyunYearCg() : item.getDayunYearCg());
mCangganAdapter.setmDzGodList(item.isTongXian() ?
item.getXiaoyunInfo().get(0).getXiaoyunDzGod() : item.getDayunYearDzGod());
}
List<String> shenshaList = new ArrayList<>();
if (item.isTongXian()) {
String shensha = item.getXiaoyunInfo().get(0).getXiaoyunShensha();
if (!TextUtils.isEmpty(shensha)) {
shenshaList = Arrays.asList(shensha.split(" "));
}
} else {
String shensha = item.getDayunShensha();
if (!TextUtils.isEmpty(shensha)) {
shenshaList = Arrays.asList(shensha.split(" "));
}
}
if (mShenshaAdapter == null) {
mShenshaAdapter = new ShenshaAdapter(mContext, R.layout.paipan_shensha_item, shenshaList);
rvShenShaData.setAdapter(mShenshaAdapter);
} else {
mShenshaAdapter.setNewData(shenshaList);
}
break;
case 200: // 流年
BaziResultBean.DetailInfoDTO.DayunInfoDTO.XiaoyunInfoDTO xiaoyunEntity = item.getXiaoyunInfo().get(mSelectXiaoyunPos);
// 第一个item(bornBean)的特殊处理
holder.setText(R.id.tv_shishen, xiaoyunEntity.getXiaoyunShishen());
holder.setText(R.id.tv_tg, xiaoyunEntity.getXiaoyunYearTg());
holder.setText(R.id.tv_dz, xiaoyunEntity.getXiaoyunYearDz());
holder.setTextColor(R.id.tv_tg, Color.parseColor(FiveElementsHelper.getElementInfo(xiaoyunEntity.getXiaoyunYearTg()).get("color")));
holder.setTextColor(R.id.tv_dz, Color.parseColor(FiveElementsHelper.getElementInfo(xiaoyunEntity.getXiaoyunYearDz()).get("color")));
holder.setText(R.id.tv_xingyun, xiaoyunEntity.getXiaoyunDzStarCs());
holder.setText(R.id.tv_zizuo, xiaoyunEntity.getXiaoyunDzSelfCs());
holder.setText(R.id.tv_kongwang, xiaoyunEntity.getXiaoyunKongwang());
holder.setText(R.id.tv_nayin, xiaoyunEntity.getXiaoyunNayin());
// bornBean的流年数据可能为空,需要特殊处理
if (mCangganAdapter == null) {
mCangganAdapter = new CangGanAdapter(mContext, R.layout.paipan_canggan_item,
xiaoyunEntity.getXiaoyunYearCg(), xiaoyunEntity.getXiaoyunDzGod());
rvDatas.setAdapter(mCangganAdapter);
}else{
mCangganAdapter.setNewData(xiaoyunEntity.getXiaoyunYearCg());
mCangganAdapter.setmDzGodList(xiaoyunEntity.getXiaoyunDzGod());
}
if (mShenshaAdapter == null) {
String shensha = xiaoyunEntity.getXiaoyunShensha();
mShenshaAdapter = new ShenshaAdapter(mContext, R.layout.paipan_shensha_item, Arrays.asList(shensha.split(" ")));
rvShenShaData.setAdapter(mShenshaAdapter);
}else{
String shensha = xiaoyunEntity.getXiaoyunShensha();
mShenshaAdapter.setNewData(Arrays.asList(shensha.split(" ")));
}
break;
case 300: // 流月
// 第一个item(bornBean)的特殊处理
holder.setText(R.id.tv_shishen, "小运");
holder.setText(R.id.tv_tg, item.getDayunYearTg());
holder.setText(R.id.tv_dz, item.getDayunYearDz());
holder.setTextColor(R.id.tv_tg, Color.parseColor(FiveElementsHelper.getElementInfo(item.getDayunYearTg()).get("color")));
holder.setTextColor(R.id.tv_dz, Color.parseColor(FiveElementsHelper.getElementInfo(item.getDayunYearDz()).get("color")));
holder.setText(R.id.tv_xingyun, "");
holder.setText(R.id.tv_zizuo, "");
holder.setText(R.id.tv_kongwang, "");
holder.setText(R.id.tv_nayin, "");
// bornBean的流月数据可能为空,需要特殊处理
if (mCangganAdapter == null) {
mCangganAdapter = new CangGanAdapter(mContext, R.layout.paipan_canggan_item,
Arrays.asList(), Arrays.asList());
rvDatas.setAdapter(mCangganAdapter);
}
if (mShenshaAdapter == null) {
mShenshaAdapter = new ShenshaAdapter(mContext, R.layout.paipan_shensha_item, Arrays.asList());
rvShenShaData.setAdapter(mShenshaAdapter);
}
break;
}
}
public void setColumnCode(int code,int xiaoyunPos) {
mDayunTypeCode = code;
mSelectXiaoyunPos = xiaoyunPos;
notifyDataSetChanged();
}
}

View File

@@ -1,77 +0,0 @@
package com.ckkj.griddle.plate.adapter;
import android.content.Context;
import android.graphics.Color;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ckkj.griddle.R;
import com.ckkj.griddle.plate.entity.BaziResultBean;
import com.ckkj.griddle.utils.helper.FiveElementsHelper;
import java.util.Arrays;
import java.util.List;
/**
* @author fengxiaoyang
* @date 2025/8/7
* @description TODO: 描述该类的作用
*/
public class LiuNianColumnAdapter extends BaseQuickAdapter
<BaziResultBean.DetailInfoDTO.DayunInfoDTO.LiunianInfoDTO, BaseViewHolder> {
private CangGanAdapter mCangganAdapter;
private ShenshaAdapter mShenshaAdapter;
private Context mContext;
private List<BaziResultBean.DetailInfoDTO.DayunInfoDTO.XiaoyunInfoDTO> xiaoyunInfo;
public LiuNianColumnAdapter(Context context, int layoutResId,
@Nullable List<BaziResultBean.DetailInfoDTO.DayunInfoDTO.LiunianInfoDTO> data,
List<BaziResultBean.DetailInfoDTO.DayunInfoDTO.XiaoyunInfoDTO> xiaoyunInfo) {
super(layoutResId, data);
this.mContext = context;
this.xiaoyunInfo = xiaoyunInfo;
}
@Override
protected void convert(BaseViewHolder holder, BaziResultBean.DetailInfoDTO.DayunInfoDTO.LiunianInfoDTO item) {
RecyclerView rvDatas = holder.getView(R.id.rv_canggan);
RecyclerView rvShenShaData = holder.getView(R.id.rv_shensha_data);
// 第一个item(bornBean)的特殊处理
holder.setText(R.id.tv_shishen, item.getLiunianShishen());
holder.setText(R.id.tv_tg, item.getLiunianYearTg());
holder.setText(R.id.tv_dz, item.getLiunianYearDz());
holder.setTextColor(R.id.tv_tg, Color.parseColor(FiveElementsHelper.getElementInfo(item.getLiunianYearTg()).get("color")));
holder.setTextColor(R.id.tv_dz, Color.parseColor(FiveElementsHelper.getElementInfo(item.getLiunianYearDz()).get("color")));
holder.setText(R.id.tv_xingyun, item.getLiunianDzStarCs());
holder.setText(R.id.tv_zizuo, item.getLiunianDzSelfCs());
holder.setText(R.id.tv_kongwang, item.getLiunianKongwang());
holder.setText(R.id.tv_nayin, item.getLiunianNayin());
// bornBean的流年数据可能为空,需要特殊处理
if (mCangganAdapter == null) {
mCangganAdapter = new CangGanAdapter(mContext, R.layout.paipan_canggan_item,
item.getLiunianYearCg(), item.getLiunianDzGod());
rvDatas.setAdapter(mCangganAdapter);
}else{
mCangganAdapter.setNewData(item.getLiunianYearCg());
mCangganAdapter.setmDzGodList(item.getLiunianDzGod());
}
if (mShenshaAdapter == null) {
mShenshaAdapter = new ShenshaAdapter(mContext, R.layout.paipan_shensha_item, Arrays.asList(item.getLiunianShensha().split(" ")));
rvShenShaData.setAdapter(mShenshaAdapter);
}else{
String shensha = item.getLiunianShensha();
mShenshaAdapter.setNewData(Arrays.asList(shensha.split(" ")));
}
}
public void setXiaoyunDatas(List<BaziResultBean.DetailInfoDTO.DayunInfoDTO.XiaoyunInfoDTO> xiaoyunInfoDTOList) {
this.xiaoyunInfo = xiaoyunInfoDTOList;
}
}

View File

@@ -1,75 +0,0 @@
package com.ckkj.griddle.plate.adapter;
import android.content.Context;
import android.graphics.Color;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ckkj.griddle.R;
import com.ckkj.griddle.plate.entity.BaziResultBean;
import com.ckkj.griddle.utils.helper.FiveElementsHelper;
import java.util.Arrays;
import java.util.List;
/**
* @author fengxiaoyang
* @date 2025/8/7
* @description TODO: 描述该类的作用
*/
public class LiuYueColumnAdapter extends BaseQuickAdapter
<BaziResultBean.DetailInfoDTO.DayunInfoDTO.LiunianInfoDTO.LiuyueInfoDTO, BaseViewHolder> {
private CangGanAdapter mCangganAdapter;
private ShenshaAdapter mShenshaAdapter;
private Context mContext;
private List<BaziResultBean.DetailInfoDTO.DayunInfoDTO.XiaoyunInfoDTO> xiaoyunInfo;
public LiuYueColumnAdapter(Context context, int layoutResId,
@Nullable List<BaziResultBean.DetailInfoDTO.DayunInfoDTO.LiunianInfoDTO.LiuyueInfoDTO> data) {
super(layoutResId, data);
this.mContext = context;
}
@Override
protected void convert(BaseViewHolder holder, BaziResultBean.DetailInfoDTO.DayunInfoDTO.LiunianInfoDTO.LiuyueInfoDTO item) {
RecyclerView rvDatas = holder.getView(R.id.rv_canggan);
RecyclerView rvShenShaData = holder.getView(R.id.rv_shensha_data);
// 第一个item(bornBean)的特殊处理
holder.setText(R.id.tv_shishen, item.getLiuyueShishen());
holder.setText(R.id.tv_tg, item.getLiuyueMonthTg());
holder.setText(R.id.tv_dz, item.getLiuyueMonthDz());
holder.setTextColor(R.id.tv_tg, Color.parseColor(FiveElementsHelper.getElementInfo(item.getLiuyueMonthTg()).get("color")));
holder.setTextColor(R.id.tv_dz, Color.parseColor(FiveElementsHelper.getElementInfo(item.getLiuyueMonthDz()).get("color")));
holder.setText(R.id.tv_xingyun, item.getLiuyueDzStarCs());
holder.setText(R.id.tv_zizuo, item.getLiuyueDzSelfCs());
holder.setText(R.id.tv_kongwang, item.getLiuyueKongwang());
holder.setText(R.id.tv_nayin, item.getLiuyueNayin());
// bornBean的流年数据可能为空,需要特殊处理
if (mCangganAdapter == null) {
mCangganAdapter = new CangGanAdapter(mContext, R.layout.paipan_canggan_item,
item.getLiuyueMonthCg(), item.getLiuyueMonthDzGod());
rvDatas.setAdapter(mCangganAdapter);
}else{
mCangganAdapter.setNewData(item.getLiuyueMonthCg());
mCangganAdapter.setmDzGodList(item.getLiuyueMonthDzGod());
}
if (mShenshaAdapter == null) {
mShenshaAdapter = new ShenshaAdapter(mContext, R.layout.paipan_shensha_item, Arrays.asList(item.getLiuyueShensha().split(" ")));
rvShenShaData.setAdapter(mShenshaAdapter);
}else{
String shensha = item.getLiuyueShensha();
mShenshaAdapter.setNewData(Arrays.asList(shensha.split(" ")));
}
}
// public void setXiaoyunDatas(List<BaziResultBean.DetailInfoDTO.DayunInfoDTO.XiaoyunInfoDTO> xiaoyunInfoDTOList) {
// this.xiaoyunInfo = xiaoyunInfoDTOList;
// }
}

View File

@@ -1,63 +0,0 @@
package com.ckkj.griddle.plate.adapter;
import android.content.Context;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ckkj.griddle.R;
import com.ckkj.griddle.plate.entity.BaziResultBean;
import com.ckkj.griddle.utils.helper.ShiShenCalculator;
import java.util.ArrayList;
import java.util.List;
/**
* @author fengxiaoyang
* @date 2025/8/6
* @description TODO: 描述该类的作用
*/
public class LiunianAdapter extends BaseQuickAdapter<BaziResultBean.DetailInfoDTO.DayunInfoDTO.LiunianInfoDTO, BaseViewHolder> {
private Context mContext;
private int mSelPos = -1;
private List<BaziResultBean.DetailInfoDTO.DayunInfoDTO.XiaoyunInfoDTO> xiaoyunList =
new ArrayList<>();
public LiunianAdapter(Context context, int layoutResId,
@Nullable List<BaziResultBean.DetailInfoDTO.DayunInfoDTO.LiunianInfoDTO> data,
List<BaziResultBean.DetailInfoDTO.DayunInfoDTO.XiaoyunInfoDTO> xiaoyunInfo) {
super(layoutResId, data);
this.mContext = context;
this.xiaoyunList = xiaoyunInfo;
}
@Override
protected void convert(BaseViewHolder holder, BaziResultBean.DetailInfoDTO.DayunInfoDTO.LiunianInfoDTO item) {
holder.setText(R.id.tv_year,item.getLiunianYear() + "");
holder.setGone(R.id.tv_age,false);
holder.setText(R.id.tv_gan_value, ShiShenCalculator.getAbbreviation(item.getLiunianTgGod()));
holder.setText(R.id.tv_zhi_value,ShiShenCalculator.getAbbreviation(item.getLiunianDzGod().get(0)));
holder.setText(R.id.tv_gan_key,item.getLiunianYearTg());
holder.setText(R.id.tv_zhi_key,item.getLiunianYearDz());
holder.setGone(R.id.tv_xiaoyun,true);
holder.setText(R.id.tv_xiaoyun,xiaoyunList.get(holder.getLayoutPosition()).getXiaoyunGanzhi());
if(holder.getLayoutPosition() == mSelPos){
holder.setBackgroundColor(R.id.ll_item, ContextCompat.getColor(mContext,R.color.divider));
}else{
holder.setBackgroundColor(R.id.ll_item, ContextCompat.getColor(mContext,R.color.white));
}
}
public void setSelPostion(int pos){
this.mSelPos = pos;
notifyDataSetChanged();
}
public int getmSelPos() {
return mSelPos;
}
}

View File

@@ -1,64 +0,0 @@
package com.ckkj.griddle.plate.adapter;
import android.content.Context;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ckkj.griddle.R;
import com.ckkj.griddle.plate.entity.BaziResultBean;
import com.ckkj.griddle.utils.helper.ShiShenCalculator;
import com.ckkj.griddle.utils.time.ZYTimeUtils;
import java.util.ArrayList;
import java.util.List;
/**
* @author fengxiaoyang
* @date 2025/8/6
* @description TODO: 描述该类的作用
*/
public class LiuyueAdapter extends BaseQuickAdapter<BaziResultBean.DetailInfoDTO.DayunInfoDTO.
LiunianInfoDTO.LiuyueInfoDTO, BaseViewHolder> {
private Context mContext;
private int mSelPos = -1;
private List<BaziResultBean.DetailInfoDTO.DayunInfoDTO.LiunianInfoDTO.LiunianJieqiDTO> jieqiList =
new ArrayList<>();
public LiuyueAdapter(Context context,int layoutResId, @Nullable List<BaziResultBean.DetailInfoDTO.DayunInfoDTO.LiunianInfoDTO.LiuyueInfoDTO> data,
List<BaziResultBean.DetailInfoDTO.DayunInfoDTO.LiunianInfoDTO.LiunianJieqiDTO> jieqiList) {
super(layoutResId, data);
this.mContext = context;
this.jieqiList = jieqiList;
}
@Override
protected void convert(BaseViewHolder holder, BaziResultBean.DetailInfoDTO.DayunInfoDTO.LiunianInfoDTO.LiuyueInfoDTO item) {
holder.setText(R.id.tv_year,jieqiList.get(holder.getLayoutPosition()).getJieqiName());
holder.setGone(R.id.tv_age,true);
//节气日期转换
String jieqiDate = ZYTimeUtils.formatToMonthDay(jieqiList.get(holder.getLayoutPosition()).getJieqiSolarYmdhms());
holder.setText(R.id.tv_age, jieqiDate);
holder.setText(R.id.tv_gan_value, ShiShenCalculator.getAbbreviation(item.getLiuyueMonthTgGod()));
holder.setText(R.id.tv_zhi_value,ShiShenCalculator.getAbbreviation(item.getLiuyueMonthDzGod().get(0)));
holder.setText(R.id.tv_gan_key,item.getLiuyueMonthTg());
holder.setText(R.id.tv_zhi_key,item.getLiuyueMonthDz());
holder.setGone(R.id.tv_xiaoyun,false);
if(holder.getLayoutPosition() == mSelPos){
holder.setBackgroundColor(R.id.ll_item, ContextCompat.getColor(mContext,R.color.divider));
}else{
holder.setBackgroundColor(R.id.ll_item, ContextCompat.getColor(mContext,R.color.white));
}
}
public void setSelPostion(int pos){
this.mSelPos = pos;
notifyDataSetChanged();
}
public int getmSelPos() {
return mSelPos;
}
}

View File

@@ -1,60 +0,0 @@
package com.ckkj.griddle.plate.adapter;
import android.content.Context;
import android.graphics.Color;
import androidx.annotation.Nullable;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ckkj.griddle.R;
import com.ckkj.griddle.plate.entity.PaipanHistoryEntity;
import com.ckkj.griddle.utils.click.ClickUtil;
import com.ckkj.griddle.utils.helper.FiveElementsHelper;
import java.util.List;
/**
* @author fengxiaoyang
* @date 2025/8/9
* @description TODO: 描述该类的作用
*/
public class PaipanHistoryAdapter extends BaseQuickAdapter<PaipanHistoryEntity.RecordsDTO, BaseViewHolder> {
private Context mContext;
public PaipanHistoryAdapter(Context context,int layoutResId, @Nullable List<PaipanHistoryEntity.RecordsDTO> data) {
super(layoutResId, data);
this.mContext = context;
}
@Override
protected void convert(BaseViewHolder holder, PaipanHistoryEntity.RecordsDTO item) {
String []nianArr = item.getNianZhu().split(",");
String []yueArr = item.getYueZhu().split(",");
String []riArr = item.getRiZhu().split(",");
String []shiArr = item.getShiZhu().split(",");
holder.setText(R.id.tv_nian_tg,nianArr[0]);
holder.setText(R.id.tv_nian_dz,nianArr[1]);
holder.setText(R.id.tv_yue_tg,yueArr[0]);
holder.setText(R.id.tv_yue_dz,yueArr[1]);
holder.setText(R.id.tv_ri_tg,riArr[0]);
holder.setText(R.id.tv_ri_dz,riArr[1]);
holder.setText(R.id.tv_shi_tg,shiArr[0]);
holder.setText(R.id.tv_shi_dz,shiArr[1]);
holder.setTextColor(R.id.tv_nian_tg, Color.parseColor(FiveElementsHelper.getElementInfo(nianArr[0]).get("color")));
holder.setTextColor(R.id.tv_nian_dz, Color.parseColor(FiveElementsHelper.getElementInfo(nianArr[1]).get("color")));
holder.setTextColor(R.id.tv_yue_tg, Color.parseColor(FiveElementsHelper.getElementInfo(yueArr[0]).get("color")));
holder.setTextColor(R.id.tv_yue_dz, Color.parseColor(FiveElementsHelper.getElementInfo(yueArr[1]).get("color")));
holder.setTextColor(R.id.tv_ri_tg, Color.parseColor(FiveElementsHelper.getElementInfo(riArr[0]).get("color")));
holder.setTextColor(R.id.tv_ri_dz, Color.parseColor(FiveElementsHelper.getElementInfo(riArr[1]).get("color")));
holder.setTextColor(R.id.tv_shi_tg, Color.parseColor(FiveElementsHelper.getElementInfo(shiArr[0]).get("color")));
holder.setTextColor(R.id.tv_shi_dz, Color.parseColor(FiveElementsHelper.getElementInfo(shiArr[1]).get("color")));
holder.setText(R.id.tv_user_name,item.getName());
holder.setText(R.id.tv_user_sex,Integer.parseInt(item.getGender()) == 0 ? "男":"女");
holder.setText(R.id.tv_user_birthtime,Integer.parseInt(item.getBirthType()) == 1 ?
"公历:" + item.getYangLiBirthTime():
"农历:" + item.getYinLiBirthTime());
ClickUtil.addClickPart(holder.getView(R.id.img_delete),80);
holder.addOnClickListener(R.id.img_delete);
}
}

View File

@@ -1,30 +0,0 @@
package com.ckkj.griddle.plate.adapter;
import android.content.Context;
import androidx.annotation.Nullable;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ckkj.griddle.R;
import java.util.List;
/**
* @author fengxiaoyang
* @date 2025/8/6
* @description TODO: 描述该类的作用
*/
public class ShenshaAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
private Context mContext;
public ShenshaAdapter(Context context,int layoutResId, @Nullable List<String> data) {
super(layoutResId, data);
this.mContext = context;
}
@Override
protected void convert(BaseViewHolder helper, String item) {
helper.setText(R.id.tv_shensha_value,item);
}
}

View File

@@ -1,128 +0,0 @@
package com.ckkj.griddle.plate.adapter;
import android.content.Context;
import android.graphics.Color;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ckkj.griddle.R;
import com.ckkj.griddle.plate.entity.BaziResultBean;
import com.ckkj.griddle.utils.helper.FiveElementsHelper;
import java.util.Arrays;
import java.util.List;
/**
* @author fengxiaoyang
* @date 2025/8/6
* @description TODO: 描述该类的作用
*/
public class SizhuAdapter extends BaseQuickAdapter<BaziResultBean.DetailInfoDTO.SizhuInfoDTO, BaseViewHolder> {
private Context mContext;
private int mSizhuTypeCode = 100;
private CangGanAdapter mCangganAdapter;
private ShenshaAdapter mShenshaAdapter;
public SizhuAdapter(Context context,int layoutResId,
@Nullable List<BaziResultBean.DetailInfoDTO.SizhuInfoDTO> data,
int typeCode) {
super(layoutResId, data);
this.mContext = context;
this.mSizhuTypeCode = typeCode;
}
@Override
protected void convert(BaseViewHolder holder, BaziResultBean.DetailInfoDTO.SizhuInfoDTO item) {
RecyclerView rvDatas = holder.getView(R.id.rv_canggan);
RecyclerView rvShenShaData = holder.getView(R.id.rv_shensha_data);
switch (mSizhuTypeCode){
case 100: // 年柱
holder.setText(R.id.tv_shishen,item.getYear().getTgGod());
holder.setText(R.id.tv_tg,item.getYear().getTg());
holder.setText(R.id.tv_dz,item.getYear().getDz());
holder.setTextColor(R.id.tv_tg, Color.parseColor(FiveElementsHelper.getElementInfo(item.getYear().getTg()).get("color")));
holder.setTextColor(R.id.tv_dz, Color.parseColor(FiveElementsHelper.getElementInfo(item.getYear().getDz()).get("color")));
holder.setText(R.id.tv_xingyun,item.getYear().getDzStarCs());
holder.setText(R.id.tv_zizuo,item.getYear().getDzSelfCs());
holder.setText(R.id.tv_kongwang,item.getYear().getKw());
holder.setText(R.id.tv_nayin,item.getYear().getNy());
if(mCangganAdapter == null){
mCangganAdapter = new CangGanAdapter(mContext,R.layout.paipan_canggan_item,
item.getYear().getCg(), item.getYear().getDzGod());
rvDatas.setAdapter(mCangganAdapter);
}
if(mShenshaAdapter == null){
List<String> shenshaList = Arrays.asList(item.getYear().getShensha().split(" "));
mShenshaAdapter = new ShenshaAdapter(mContext,R.layout.paipan_shensha_item,shenshaList);
rvShenShaData.setAdapter(mShenshaAdapter);
}
break;
case 200: // 月柱
holder.setText(R.id.tv_shishen,item.getMonth().getTgGod());
holder.setText(R.id.tv_tg,item.getMonth().getTg());
holder.setText(R.id.tv_dz,item.getMonth().getDz());
holder.setTextColor(R.id.tv_tg, Color.parseColor(FiveElementsHelper.getElementInfo(item.getMonth().getTg()).get("color")));
holder.setTextColor(R.id.tv_dz, Color.parseColor(FiveElementsHelper.getElementInfo(item.getMonth().getDz()).get("color")));
holder.setText(R.id.tv_xingyun,item.getMonth().getDzStarCs());
holder.setText(R.id.tv_zizuo,item.getMonth().getDzSelfCs());
holder.setText(R.id.tv_kongwang,item.getMonth().getKw());
holder.setText(R.id.tv_nayin,item.getMonth().getNy());
if(mCangganAdapter == null){
mCangganAdapter = new CangGanAdapter(mContext,R.layout.paipan_canggan_item,
item.getMonth().getCg(), item.getMonth().getDzGod());
rvDatas.setAdapter(mCangganAdapter);
}
if(mShenshaAdapter == null){
List<String> shenshaList = Arrays.asList(item.getMonth().getShensha().split(" "));
mShenshaAdapter = new ShenshaAdapter(mContext,R.layout.paipan_shensha_item,shenshaList);
rvShenShaData.setAdapter(mShenshaAdapter);
}
break;
case 300: // 日柱
holder.setText(R.id.tv_shishen,item.getDay().getTgGod());
holder.setText(R.id.tv_tg,item.getDay().getTg());
holder.setText(R.id.tv_dz,item.getDay().getDz());
holder.setTextColor(R.id.tv_tg, Color.parseColor(FiveElementsHelper.getElementInfo(item.getDay().getTg()).get("color")));
holder.setTextColor(R.id.tv_dz, Color.parseColor(FiveElementsHelper.getElementInfo(item.getDay().getDz()).get("color")));
holder.setText(R.id.tv_xingyun,item.getDay().getDzStarCs());
holder.setText(R.id.tv_zizuo,item.getDay().getDzSelfCs());
holder.setText(R.id.tv_kongwang,item.getDay().getKw());
holder.setText(R.id.tv_nayin,item.getDay().getNy());
if(mCangganAdapter == null){
mCangganAdapter = new CangGanAdapter(mContext,R.layout.paipan_canggan_item,
item.getDay().getCg(), item.getDay().getDzGod());
rvDatas.setAdapter(mCangganAdapter);
}
if(mShenshaAdapter == null){
List<String> shenshaList = Arrays.asList(item.getDay().getShensha().split(" "));
mShenshaAdapter = new ShenshaAdapter(mContext,R.layout.paipan_shensha_item,shenshaList);
rvShenShaData.setAdapter(mShenshaAdapter);
}
break;
case 400: // 时柱
holder.setText(R.id.tv_shishen,item.getHour().getTgGod());
holder.setText(R.id.tv_tg,item.getHour().getTg());
holder.setText(R.id.tv_dz,item.getHour().getDz());
holder.setTextColor(R.id.tv_tg, Color.parseColor(FiveElementsHelper.getElementInfo(item.getHour().getTg()).get("color")));
holder.setTextColor(R.id.tv_dz, Color.parseColor(FiveElementsHelper.getElementInfo(item.getHour().getDz()).get("color")));
holder.setText(R.id.tv_xingyun,item.getHour().getDzStarCs());
holder.setText(R.id.tv_zizuo,item.getHour().getDzSelfCs());
holder.setText(R.id.tv_kongwang,item.getHour().getKw());
holder.setText(R.id.tv_nayin,item.getHour().getNy());
if(mCangganAdapter == null){
mCangganAdapter = new CangGanAdapter(mContext,R.layout.paipan_canggan_item,
item.getHour().getCg(), item.getHour().getDzGod());
rvDatas.setAdapter(mCangganAdapter);
}
if(mShenshaAdapter == null){
List<String> shenshaList = Arrays.asList(item.getHour().getShensha().split(" "));
mShenshaAdapter = new ShenshaAdapter(mContext,R.layout.paipan_shensha_item,shenshaList);
rvShenShaData.setAdapter(mShenshaAdapter);
}
break;
}
}
}

View File

@@ -1,661 +0,0 @@
package com.ckkj.griddle.plate.entity;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
import java.util.List;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author fengxiaoyang
* @date 2025/8/5
* @description TODO: 描述该类的作用
*/
@NoArgsConstructor
@Data
public class BaziResultBean implements Serializable {
@SerializedName("base_info")
private BaseInfoDTO baseInfo;
@SerializedName("detail_info")
private DetailInfoDTO detailInfo;
@NoArgsConstructor
@Data
public static class BaseInfoDTO implements Serializable {
@SerializedName("sex")
private String sex;
@SerializedName("name")
private String name;
@SerializedName("gongli")
private String gongli;
@SerializedName("nongli")
private String nongli;
@SerializedName("qiyun")
private String qiyun;
@SerializedName("jiaoyun")
private String jiaoyun;
@SerializedName("taiyuan")
private String taiyuan;
@SerializedName("taiyuan_nayin")
private String taiyuanNayin;
@SerializedName("taixi")
private String taixi;
@SerializedName("taixi_nayin")
private String taixiNayin;
@SerializedName("minggong")
private String minggong;
@SerializedName("minggong_nayin")
private String minggongNayin;
@SerializedName("shengong")
private String shengong;
@SerializedName("shengong_nayin")
private String shengongNayin;
@SerializedName("shengxiao")
private String shengxiao;
@SerializedName("xingzuo")
private String xingzuo;
@SerializedName("siling")
private String siling;
@SerializedName("jiaoyun_mang")
private String jiaoyunMang;
@SerializedName("xingxiu")
private String xingxiu;
@SerializedName("minggua")
private MingguaDTO minggua;
@SerializedName("wuxing_wangdu")
private String wuxingWangdu;
@SerializedName("tiangan_liuyi")
private String tianganLiuyi;
@SerializedName("dizhi_liuyi")
private String dizhiLiuyi;
@SerializedName("zhengge")
private String zhengge;
@SerializedName("xiyongshen")
private XiyongshenDTO xiyongshen;
@SerializedName("wuxing_xiji")
private String wuxingXiji;
@NoArgsConstructor
@Data
public static class MingguaDTO implements Serializable {
@SerializedName("minggua_name")
private String mingguaName;
@SerializedName("minggua_fangwei")
private String mingguaFangwei;
}
@NoArgsConstructor
@Data
public static class XiyongshenDTO implements Serializable {
@SerializedName("qiangruo")
private String qiangruo;
@SerializedName("xiyongshen")
private String xiyongshen;
@SerializedName("jishen")
private String jishen;
@SerializedName("xiyongshen_desc")
private String xiyongshenDesc;
@SerializedName("jin_number")
private Integer jinNumber;
@SerializedName("mu_number")
private Integer muNumber;
@SerializedName("shui_number")
private Integer shuiNumber;
@SerializedName("huo_number")
private Integer huoNumber;
@SerializedName("tu_number")
private Integer tuNumber;
@SerializedName("zidang")
private Integer zidang;
@SerializedName("yidang")
private Integer yidang;
@SerializedName("zidang_percent")
private String zidangPercent;
@SerializedName("yidang_percent")
private String yidangPercent;
@SerializedName("tonglei")
private String tonglei;
@SerializedName("yilei")
private String yilei;
@SerializedName("rizhu_tiangan")
private String rizhuTiangan;
@SerializedName("jin_score")
private Integer jinScore;
@SerializedName("mu_score")
private Integer muScore;
@SerializedName("shui_score")
private Integer shuiScore;
@SerializedName("huo_score")
private Integer huoScore;
@SerializedName("tu_score")
private Integer tuScore;
@SerializedName("jin_score_percent")
private String jinScorePercent;
@SerializedName("mu_score_percent")
private String muScorePercent;
@SerializedName("shui_score_percent")
private String shuiScorePercent;
@SerializedName("huo_score_percent")
private String huoScorePercent;
@SerializedName("tu_score_percent")
private String tuScorePercent;
@SerializedName("yinyang")
private String yinyang;
}
}
@NoArgsConstructor
@Data
public static class DetailInfoDTO implements Serializable {
@SerializedName("dayun_info")
private List<DayunInfoDTO> dayunInfo;
@SerializedName("dayun_born_info")
private DayunInfoDTO dayunBornInfo;
@SerializedName("sizhu_info")
private SizhuInfoDTO sizhuInfo;
@SerializedName("taishen_info")
private TaishenInfoDTO taishenInfo;
@NoArgsConstructor
@Data
public static class SizhuInfoDTO implements Serializable {
@SerializedName("year")
private YearDTO year;
@SerializedName("month")
private MonthDTO month;
@SerializedName("day")
private DayDTO day;
@SerializedName("hour")
private HourDTO hour;
@NoArgsConstructor
@Data
public static class YearDTO implements Serializable {
@SerializedName("tg_god")
private String tgGod;
@SerializedName("tg")
private String tg;
@SerializedName("dz")
private String dz;
@SerializedName("cg")
private List<String> cg;
@SerializedName("dz_god")
private List<String> dzGod;
@SerializedName("dz_star_cs")
private String dzStarCs;
@SerializedName("dz_self_cs")
private String dzSelfCs;
@SerializedName("kw")
private String kw;
@SerializedName("ny")
private String ny;
@SerializedName("wx")
private String wx;
@SerializedName("xun")
private String xun;
@SerializedName("shensha")
private String shensha;
}
@NoArgsConstructor
@Data
public static class MonthDTO implements Serializable {
@SerializedName("tg_god")
private String tgGod;
@SerializedName("tg")
private String tg;
@SerializedName("dz")
private String dz;
@SerializedName("cg")
private List<String> cg;
@SerializedName("dz_god")
private List<String> dzGod;
@SerializedName("dz_star_cs")
private String dzStarCs;
@SerializedName("dz_self_cs")
private String dzSelfCs;
@SerializedName("kw")
private String kw;
@SerializedName("ny")
private String ny;
@SerializedName("wx")
private String wx;
@SerializedName("xun")
private String xun;
@SerializedName("shensha")
private String shensha;
}
@NoArgsConstructor
@Data
public static class DayDTO implements Serializable {
@SerializedName("tg_god")
private String tgGod;
@SerializedName("tg")
private String tg;
@SerializedName("dz")
private String dz;
@SerializedName("cg")
private List<String> cg;
@SerializedName("dz_god")
private List<String> dzGod;
@SerializedName("dz_star_cs")
private String dzStarCs;
@SerializedName("dz_self_cs")
private String dzSelfCs;
@SerializedName("kw")
private String kw;
@SerializedName("ny")
private String ny;
@SerializedName("wx")
private String wx;
@SerializedName("xun")
private String xun;
@SerializedName("shensha")
private String shensha;
}
@NoArgsConstructor
@Data
public static class HourDTO implements Serializable {
@SerializedName("tg_god")
private String tgGod;
@SerializedName("tg")
private String tg;
@SerializedName("dz")
private String dz;
@SerializedName("cg")
private List<String> cg;
@SerializedName("dz_god")
private List<String> dzGod;
@SerializedName("dz_star_cs")
private String dzStarCs;
@SerializedName("dz_self_cs")
private String dzSelfCs;
@SerializedName("kw")
private String kw;
@SerializedName("ny")
private String ny;
@SerializedName("wx")
private String wx;
@SerializedName("xun")
private String xun;
@SerializedName("shensha")
private String shensha;
}
}
@NoArgsConstructor
@Data
public static class TaishenInfoDTO implements Serializable {
@SerializedName("taiyuan")
private TaiyuanDTO taiyuan;
@SerializedName("taixi")
private TaixiDTO taixi;
@SerializedName("minggong")
private MinggongDTO minggong;
@SerializedName("shengong")
private ShengongDTO shengong;
@NoArgsConstructor
@Data
public static class TaiyuanDTO implements Serializable {
@SerializedName("ganzhi")
private String ganzhi;
@SerializedName("xun")
private String xun;
@SerializedName("kongwang")
private String kongwang;
@SerializedName("changsheng")
private String changsheng;
@SerializedName("gan")
private String gan;
@SerializedName("zhi")
private String zhi;
@SerializedName("dz_cg")
private List<String> dzCg;
@SerializedName("tg_god")
private String tgGod;
@SerializedName("dz_god")
private List<String> dzGod;
@SerializedName("dz_star_cs")
private String dzStarCs;
@SerializedName("dz_self_cs")
private String dzSelfCs;
@SerializedName("nayin")
private String nayin;
@SerializedName("wuxing")
private String wuxing;
@SerializedName("tg_liuyi")
private String tgLiuyi;
@SerializedName("dz_liuyi")
private String dzLiuyi;
@SerializedName("shensha")
private String shensha;
}
@NoArgsConstructor
@Data
public static class TaixiDTO implements Serializable {
@SerializedName("ganzhi")
private String ganzhi;
@SerializedName("xun")
private String xun;
@SerializedName("kongwang")
private String kongwang;
@SerializedName("changsheng")
private String changsheng;
@SerializedName("gan")
private String gan;
@SerializedName("zhi")
private String zhi;
@SerializedName("dz_cg")
private List<String> dzCg;
@SerializedName("tg_god")
private String tgGod;
@SerializedName("dz_god")
private List<String> dzGod;
@SerializedName("dz_star_cs")
private String dzStarCs;
@SerializedName("dz_self_cs")
private String dzSelfCs;
@SerializedName("nayin")
private String nayin;
@SerializedName("wuxing")
private String wuxing;
@SerializedName("tg_liuyi")
private String tgLiuyi;
@SerializedName("dz_liuyi")
private String dzLiuyi;
@SerializedName("shensha")
private String shensha;
}
@NoArgsConstructor
@Data
public static class MinggongDTO implements Serializable {
@SerializedName("ganzhi")
private String ganzhi;
@SerializedName("xun")
private String xun;
@SerializedName("kongwang")
private String kongwang;
@SerializedName("changsheng")
private String changsheng;
@SerializedName("gan")
private String gan;
@SerializedName("zhi")
private String zhi;
@SerializedName("dz_cg")
private List<String> dzCg;
@SerializedName("tg_god")
private String tgGod;
@SerializedName("dz_god")
private List<String> dzGod;
@SerializedName("dz_star_cs")
private String dzStarCs;
@SerializedName("dz_self_cs")
private String dzSelfCs;
@SerializedName("nayin")
private String nayin;
@SerializedName("wuxing")
private String wuxing;
@SerializedName("tg_liuyi")
private String tgLiuyi;
@SerializedName("dz_liuyi")
private String dzLiuyi;
@SerializedName("shensha")
private String shensha;
}
@NoArgsConstructor
@Data
public static class ShengongDTO implements Serializable {
@SerializedName("ganzhi")
private String ganzhi;
@SerializedName("xun")
private String xun;
@SerializedName("kongwang")
private String kongwang;
@SerializedName("changsheng")
private String changsheng;
@SerializedName("gan")
private String gan;
@SerializedName("zhi")
private String zhi;
@SerializedName("dz_cg")
private List<String> dzCg;
@SerializedName("tg_god")
private String tgGod;
@SerializedName("dz_god")
private List<String> dzGod;
@SerializedName("dz_star_cs")
private String dzStarCs;
@SerializedName("dz_self_cs")
private String dzSelfCs;
@SerializedName("nayin")
private String nayin;
@SerializedName("wuxing")
private String wuxing;
@SerializedName("tg_liuyi")
private String tgLiuyi;
@SerializedName("dz_liuyi")
private String dzLiuyi;
@SerializedName("shensha")
private String shensha;
}
}
@NoArgsConstructor
@Data
public static class DayunInfoDTO implements Serializable {
@SerializedName("dayun_is_tongxian")
private boolean isTongXian = false;
@SerializedName("dayun_tongxian")
private String dayunTongxian;
@SerializedName("dayun_index")
private Integer dayunIndex;
@SerializedName("dayun_start_year")
private Integer dayunStartYear;
@SerializedName("dayun_start_age")
private Integer dayunStartAge;
@SerializedName("dayun_end_year")
private Integer dayunEndYear;
@SerializedName("dayun_end_age")
private Integer dayunEndAge;
@SerializedName("dayun_start_ganzhi")
private String dayunStartGanzhi;
@SerializedName("dayun_xun")
private String dayunXun;
@SerializedName("dayun_kongwang")
private String dayunKongwang;
@SerializedName("dayun_shishen")
private String dayunShishen;
@SerializedName("dayun_changsheng")
private String dayunChangsheng;
@SerializedName("dayun_year_tg")
private String dayunYearTg;
@SerializedName("dayun_year_dz")
private String dayunYearDz;
@SerializedName("dayun_year_cg")
private List<String> dayunYearCg;
@SerializedName("dayun_year_tg_god")
private String dayunYearTgGod;
@SerializedName("dayun_year_dz_god")
private List<String> dayunYearDzGod;
@SerializedName("dayun_dz_star_cs")
private String dayunDzStarCs;
@SerializedName("dayun_dz_self_cs")
private String dayunDzSelfCs;
@SerializedName("dayun_nayin")
private String dayunNayin;
@SerializedName("dayun_wuxing")
private String dayunWuxing;
@SerializedName("dayun_tg_liuyi")
private String dayunTgLiuyi;
@SerializedName("dayun_dz_liuyi")
private String dayunDzLiuyi;
@SerializedName("liunian_info")
private List<LiunianInfoDTO> liunianInfo;
@SerializedName("xiaoyun_info")
private List<XiaoyunInfoDTO> xiaoyunInfo;
@SerializedName("dayun_shensha")
private String dayunShensha;
@NoArgsConstructor
@Data
public static class LiunianInfoDTO implements Serializable {
@SerializedName("liunian_index")
private Integer liunianIndex;
@SerializedName("liunian_year")
private Integer liunianYear;
@SerializedName("liunian_age")
private Integer liunianAge;
@SerializedName("liunian_ganzhi")
private String liunianGanzhi;
@SerializedName("liunian_xun")
private String liunianXun;
@SerializedName("liunian_kongwang")
private String liunianKongwang;
@SerializedName("liunian_shishen")
private String liunianShishen;
@SerializedName("liunian_changsheng")
private String liunianChangsheng;
@SerializedName("liunian_jieqi")
private List<LiunianJieqiDTO> liunianJieqi;
@SerializedName("liunian_year_tg")
private String liunianYearTg;
@SerializedName("liunian_year_dz")
private String liunianYearDz;
@SerializedName("liunian_year_cg")
private List<String> liunianYearCg;
@SerializedName("liunian_tg_god")
private String liunianTgGod;
@SerializedName("liunian_dz_god")
private List<String> liunianDzGod;
@SerializedName("liunian_dz_star_cs")
private String liunianDzStarCs;
@SerializedName("liunian_dz_self_cs")
private String liunianDzSelfCs;
@SerializedName("liunian_nayin")
private String liunianNayin;
@SerializedName("liunian_wuxing")
private String liunianWuxing;
@SerializedName("liunian_tg_liuyi")
private String liunianTgLiuyi;
@SerializedName("liunian_dz_liuyi")
private String liunianDzLiuyi;
@SerializedName("liunian_shensha")
private String liunianShensha;
@SerializedName("liuyue_info")
private List<LiuyueInfoDTO> liuyueInfo;
@NoArgsConstructor
@Data
public static class LiunianJieqiDTO implements Serializable {
@SerializedName("jieqi_name")
private String jieqiName;
@SerializedName("jieqi_solar_ymdhms")
private String jieqiSolarYmdhms;
@SerializedName("jieqi_lunar_ymdhms_isleap")
private String jieqiLunarYmdhmsIsleap;
@SerializedName("jieqi_lunar_ymdhms")
private String jieqiLunarYmdhms;
}
@NoArgsConstructor
@Data
public static class LiuyueInfoDTO implements Serializable {
@SerializedName("liuyue_index")
private Integer liuyueIndex;
@SerializedName("liuyue_month")
private String liuyueMonth;
@SerializedName("liuyue_ganzhi")
private String liuyueGanzhi;
@SerializedName("liuyue_xun")
private String liuyueXun;
@SerializedName("liuyue_kongwang")
private String liuyueKongwang;
@SerializedName("liuyue_shishen")
private String liuyueShishen;
@SerializedName("liuyue_changsheng")
private String liuyueChangsheng;
@SerializedName("liuyue_month_tg")
private String liuyueMonthTg;
@SerializedName("liuyue_month_dz")
private String liuyueMonthDz;
@SerializedName("liuyue_month_cg")
private List<String> liuyueMonthCg;
@SerializedName("liuyue_month_tg_god")
private String liuyueMonthTgGod;
@SerializedName("liuyue_month_dz_god")
private List<String> liuyueMonthDzGod;
@SerializedName("liuyue_dz_star_cs")
private String liuyueDzStarCs;
@SerializedName("liuyue_dz_self_cs")
private String liuyueDzSelfCs;
@SerializedName("liuyue_nayin")
private String liuyueNayin;
@SerializedName("liuyue_wuxing")
private String liuyueWuxing;
@SerializedName("liuyue_tg_liuyi")
private String liuyueTgLiuyi;
@SerializedName("liuyue_dz_liuyi")
private String liuyueDzLiuyi;
@SerializedName("liuyue_shensha")
private String liuyueShensha;
}
}
@NoArgsConstructor
@Data
public static class XiaoyunInfoDTO implements Serializable {
@SerializedName("xiaoyun_index")
private Integer xiaoyunIndex;
@SerializedName("xiaoyun_year")
private Integer xiaoyunYear;
@SerializedName("xiaoyun_age")
private Integer xiaoyunAge;
@SerializedName("xiaoyun_ganzhi")
private String xiaoyunGanzhi;
@SerializedName("xiaoyun_xun")
private String xiaoyunXun;
@SerializedName("xiaoyun_kongwang")
private String xiaoyunKongwang;
@SerializedName("xiaoyun_shishen")
private String xiaoyunShishen;
@SerializedName("xiaoyun_changsheng")
private String xiaoyunChangsheng;
@SerializedName("xiaoyun_year_tg")
private String xiaoyunYearTg;
@SerializedName("xiaoyun_year_dz")
private String xiaoyunYearDz;
@SerializedName("xiaoyun_year_cg")
private List<String> xiaoyunYearCg;
@SerializedName("xiaoyun_tg_god")
private String xiaoyunTgGod;
@SerializedName("xiaoyun_dz_god")
private List<String> xiaoyunDzGod;
@SerializedName("xiaoyun_dz_star_cs")
private String xiaoyunDzStarCs;
@SerializedName("xiaoyun_dz_self_cs")
private String xiaoyunDzSelfCs;
@SerializedName("xiaoyun_nayin")
private String xiaoyunNayin;
@SerializedName("xiaoyun_wuxing")
private String xiaoyunWuxing;
@SerializedName("xiaoyun_tg_liuyi")
private String xiaoyunTgLiuyi;
@SerializedName("xiaoyun_dz_liuyi")
private String xiaoyunDzLiuyi;
@SerializedName("xiaoyun_shensha")
private String xiaoyunShensha;
}
}
}
}

View File

@@ -1,62 +0,0 @@
package com.ckkj.griddle.plate.entity;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author fengxiaoyang
* @date 2025/8/11
* @description TODO: 描述该类的作用
*/
@NoArgsConstructor
@Data
public class BaziSaveSuccessEntity implements Serializable {
@SerializedName("recordId")
private String recordId;
@SerializedName("savedData")
private SavedDataDTO savedData;
@SerializedName("message")
private String message;
@SerializedName("saveTime")
private String saveTime;
@NoArgsConstructor
@Data
public static class SavedDataDTO {
@SerializedName("recordId")
private String recordId;
@SerializedName("birthPlace")
private String birthPlace;
@SerializedName("gender")
private String gender;
@SerializedName("yinLiBirthTime")
private String yinLiBirthTime;
@SerializedName("siZhu")
private SiZhuDTO siZhu;
@SerializedName("name")
private String name;
@SerializedName("yangLiBirthTime")
private String yangLiBirthTime;
@SerializedName("openSolarTime")
private String openSolarTime;
@NoArgsConstructor
@Data
public static class SiZhuDTO {
@SerializedName("yueZhu")
private String yueZhu;
@SerializedName("shiZhu")
private String shiZhu;
@SerializedName("riZhu")
private String riZhu;
@SerializedName("nianZhu")
private String nianZhu;
}
}
}

View File

@@ -1,17 +0,0 @@
package com.ckkj.griddle.plate.entity;
public class PaipanCache {
private static BaziResultBean cachedResult;
public static void set(BaziResultBean result) {
cachedResult = result;
}
public static BaziResultBean get() {
return cachedResult;
}
public static void clear() {
cachedResult = null;
}
}

View File

@@ -1,76 +0,0 @@
package com.ckkj.griddle.plate.entity;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
import java.util.List;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author fengxiaoyang
* @date 2025/8/9
* @description TODO: 描述该类的作用
*/
@NoArgsConstructor
@Data
public class PaipanHistoryEntity implements Serializable {
@SerializedName("total")
private Integer total;
@SerializedName("pages")
private Integer pages;
@SerializedName("records")
private List<RecordsDTO> records;
@SerializedName("hasNextPage")
private Boolean hasNextPage;
@SerializedName("pageSize")
private Integer pageSize;
@SerializedName("hasPreviousPage")
private Boolean hasPreviousPage;
@SerializedName("userId")
private Long userId;
@SerializedName("pageNum")
private Integer pageNum;
@NoArgsConstructor
@Data
public static class RecordsDTO implements Serializable{
@SerializedName("id")
private String id;
@SerializedName("userId")
private Long userId;
@SerializedName("name")
private String name;
@SerializedName("gender")
private String gender;
@SerializedName("birthType")
private String birthType;
@SerializedName("yangLiBirthTime")
private String yangLiBirthTime;
@SerializedName("yinLiBirthTime")
private String yinLiBirthTime;
@SerializedName("birthPlace")
private String birthPlace;
@SerializedName("openSolarTime")
private String openSolarTime;
@SerializedName("nianZhu")
private String nianZhu;
@SerializedName("yueZhu")
private String yueZhu;
@SerializedName("riZhu")
private String riZhu;
@SerializedName("shiZhu")
private String shiZhu;
@SerializedName("apiStatus")
private Integer apiStatus;
@SerializedName("apiMessage")
private String apiMessage;
@SerializedName("requestIp")
private String requestIp;
@SerializedName("remark")
private Object remark;
}
}

View File

@@ -0,0 +1,252 @@
package com.ckkj.griddle.shop;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import androidx.core.widget.ImageViewCompat;
import androidx.viewpager2.widget.ViewPager2;
import com.bumptech.glide.Glide;
import com.ckkj.griddle.R;
import com.ckkj.griddle.base.BaseActivity;
import com.ckkj.griddle.base.BaseFragment;
import com.ckkj.griddle.cart.CartManageActivity;
import com.ckkj.griddle.cart.CheckoutActivity;
import com.ckkj.griddle.cart.entity.CartGoodsEntity;
import com.ckkj.griddle.databinding.ShopProductDetailLayoutBinding;
import com.ckkj.griddle.network.BaseBean;
import com.ckkj.griddle.shop.adapter.ProductImageAdapter;
import com.ckkj.griddle.shop.entity.ProductEntity;
import com.ckkj.griddle.shop.mvp.ShopContract;
import com.ckkj.griddle.shop.mvp.ShopImpl;
import com.ckkj.griddle.shop.mvp.ShopPresenter;
import com.ckkj.griddle.utils.show.ToastUtil;
import com.gyf.immersionbar.ImmersionBar;
import java.util.ArrayList;
import butterknife.OnClick;
/** 商品详情:图片、商品说明和店铺信息共用一页,底部关联现有购物车及下单流程。 */
public class ProductDetailActivity extends BaseActivity<ShopProductDetailLayoutBinding, ShopPresenter>
implements ShopContract.DetailView {
private static final String EXTRA_PRODUCT_ID = "shop_product_id";
private static final String STATE_IMAGE_INDEX = "shop_image_index";
private ProductEntity product;
private int restoredImageIndex;
private boolean toolbarCollapsed;
private final ViewPager2.OnPageChangeCallback imageCallback =
new ViewPager2.OnPageChangeCallback() {
@Override
public void onPageSelected(int position) {
renderImageCounter(position);
}
};
public static Bundle createBundle(String productId) {
Bundle bundle = new Bundle();
bundle.putString(EXTRA_PRODUCT_ID, productId);
return bundle;
}
@Override
public ShopPresenter createPresenter() {
return new ShopPresenter(new ShopImpl());
}
@Override
public int getLayoutResId(Bundle savedInstanceState) {
return R.layout.shop_product_detail_layout;
}
@Override
public void initData(Bundle savedInstanceState) {
super.initData(savedInstanceState);
// 状态栏和标题栏覆盖在主图上;滚动离开主图后同步切换为白底深色文字。
ImmersionBar.with(this)
.transparentStatusBar()
.statusBarView(viewBinding.shopDetailStatusBar)
.statusBarDarkFont(false)
.navigationBarColor(R.color.white)
.init();
restoredImageIndex = savedInstanceState == null ? 0
: savedInstanceState.getInt(STATE_IMAGE_INDEX, 0);
viewBinding.vpShopProductImages.registerOnPageChangeCallback(imageCallback);
viewBinding.scrollShopDetail.setOnScrollChangeListener(
(androidx.core.widget.NestedScrollView.OnScrollChangeListener)
(v, scrollX, scrollY, oldScrollX, oldScrollY) -> updateToolbar(scrollY));
setProductActionsEnabled(false);
mPresenter.getProduct(getIntent().getStringExtra(EXTRA_PRODUCT_ID));
}
@Override
public void showProduct(ProductEntity data) {
if (data == null) {
showError(null);
return;
}
product = data;
viewBinding.tvShopDetailName.setText(data.nameRes);
viewBinding.tvShopDetailPrice.setText(ShopPriceFormatter.format(this, data.cashCents));
viewBinding.tvShopDetailSold.setText(getString(R.string.shop_mall_sold, data.sold));
viewBinding.tvShopDetailDescription.setText(data.descriptionRes);
int[] images = data.getImages();
viewBinding.vpShopProductImages.setAdapter(new ProductImageAdapter(Glide.with(this), images));
int page = Math.max(0, Math.min(restoredImageIndex, images.length - 1));
viewBinding.vpShopProductImages.setCurrentItem(page, false);
renderImageCounter(page);
viewBinding.tvShopDetailState.setVisibility(View.GONE);
viewBinding.scrollShopDetail.setVisibility(View.VISIBLE);
setProductActionsEnabled(true);
viewBinding.scrollShopDetail.post(() -> updateToolbar(viewBinding.scrollShopDetail.getScrollY()));
}
private void renderImageCounter(int position) {
if (product == null) return;
viewBinding.tvShopImageCounter.setText(getString(R.string.shop_mall_image_counter,
position + 1, product.getImages().length));
}
private void setProductActionsEnabled(boolean enabled) {
viewBinding.tvShopAddCart.setEnabled(enabled);
viewBinding.tvShopBuyNow.setEnabled(enabled);
viewBinding.tvShopAddCart.setAlpha(enabled ? 1f : 0.5f);
viewBinding.tvShopBuyNow.setAlpha(enabled ? 1f : 0.5f);
}
private void updateToolbar(int scrollY) {
boolean collapsed = viewBinding.shopDetailHero.getHeight() > 0
&& scrollY >= viewBinding.shopDetailHero.getHeight() - viewBinding.shopDetailToolbar.getHeight();
if (toolbarCollapsed == collapsed) return;
toolbarCollapsed = collapsed;
int foreground = collapsed ? ContextCompat.getColor(this, R.color.shop_mall_text) : Color.WHITE;
viewBinding.shopDetailToolbar.setBackgroundColor(collapsed ? Color.WHITE : Color.TRANSPARENT);
viewBinding.tvShopDetailTitle.setTextColor(foreground);
ImageViewCompat.setImageTintList(viewBinding.ivShopDetailBack, ColorStateList.valueOf(foreground));
ImmersionBar.with(this).statusBarDarkFont(collapsed).init();
}
@OnClick({R.id.iv_shop_detail_back, R.id.ll_shop_detail_cart, R.id.tv_shop_add_cart,
R.id.tv_shop_buy_now, R.id.ll_shop_store, R.id.ll_shop_store_phone, R.id.tv_shop_detail_state})
public void onClick(View v) {
switch (v.getId()) {
case R.id.iv_shop_detail_back:
finish();
break;
case R.id.ll_shop_detail_cart:
goTo(mContext, CartManageActivity.class, null);
break;
case R.id.tv_shop_add_cart:
addToCart();
break;
case R.id.tv_shop_buy_now:
buyNow();
break;
case R.id.ll_shop_store_phone:
dialStore();
break;
case R.id.ll_shop_store:
showStoreInfo();
break;
case R.id.tv_shop_detail_state:
mPresenter.getProduct(getIntent().getStringExtra(EXTRA_PRODUCT_ID));
break;
default:
break;
}
}
/** 本地演示阶段将所选商品传入购物车,正式加购接口联调时替换此入口。 */
private void addToCart() {
if (product == null) return;
Bundle bundle = new Bundle();
bundle.putSerializable(CartManageActivity.EXTRA_ADD_GOODS, product.toCartGoods());
goTo(mContext, CartManageActivity.class, bundle);
}
private void buyNow() {
if (product == null) return;
ArrayList<CartGoodsEntity> goods = new ArrayList<>();
goods.add(product.toCartGoods());
Bundle bundle = new Bundle();
bundle.putSerializable(CheckoutActivity.EXTRA_GOODS, goods);
goTo(mContext, CheckoutActivity.class, bundle);
}
private void dialStore() {
// 调起系统拨号盘,不直接拨打,因此无需申请电话权限。
try {
startActivity(new Intent(Intent.ACTION_DIAL,
Uri.fromParts("tel", getString(R.string.shop_mall_store_phone), null)));
} catch (ActivityNotFoundException e) {
ToastUtil.showShort(mContext, getString(R.string.shop_mall_no_dialer));
}
}
private void showStoreInfo() {
if (dialog != null && dialog.isShowing()) return;
String content = getString(R.string.shop_mall_store_name) + "\n"
+ getString(R.string.shop_mall_store_phone) + "\n"
+ getString(R.string.shop_mall_store_address);
showDialogtext(null, false, false, false,
getString(R.string.shop_mall_store_title), content,
getString(android.R.string.cancel), getString(R.string.shop_mall_call),
new BaseFragment.OnDialogClick() {
@Override
public void onCancelClick() {
// 关闭后继续浏览商品。
}
@Override
public void onConfirmClick() {
dialStore();
}
});
}
@Override
public void showError(String message) {
setProductActionsEnabled(false);
viewBinding.scrollShopDetail.setVisibility(View.GONE);
viewBinding.tvShopDetailState.setText(TextUtils.isEmpty(message)
? getString(R.string.shop_mall_detail_failed) : message);
viewBinding.tvShopDetailState.setVisibility(View.VISIBLE);
// 异常页面没有主图承托标题,使用同一白色背景保证可读性。
toolbarCollapsed = true;
viewBinding.shopDetailToolbar.setBackgroundColor(Color.WHITE);
viewBinding.tvShopDetailTitle.setTextColor(ContextCompat.getColor(this, R.color.shop_mall_text));
ImageViewCompat.setImageTintList(viewBinding.ivShopDetailBack,
ColorStateList.valueOf(ContextCompat.getColor(this, R.color.shop_mall_text)));
ImmersionBar.with(this).statusBarDarkFont(true).init();
}
@Override
public void logOut(BaseBean bean) {
// 登录失效沿用父类统一处理。
}
@Override
protected void onSaveInstanceState(@NonNull Bundle outState) {
outState.putInt(STATE_IMAGE_INDEX, viewBinding.vpShopProductImages.getCurrentItem());
super.onSaveInstanceState(outState);
}
@Override
protected void onDestroy() {
viewBinding.vpShopProductImages.unregisterOnPageChangeCallback(imageCallback);
viewBinding.vpShopProductImages.setAdapter(null);
viewBinding.scrollShopDetail.setOnScrollChangeListener(
(androidx.core.widget.NestedScrollView.OnScrollChangeListener) null);
super.onDestroy();
}
}

View File

@@ -0,0 +1,140 @@
package com.ckkj.griddle.shop;
import android.graphics.Rect;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.ckkj.griddle.R;
import com.ckkj.griddle.base.BaseFragment;
import com.ckkj.griddle.databinding.ShopMallFragmentBinding;
import com.ckkj.griddle.network.BaseBean;
import com.ckkj.griddle.shop.adapter.ShopProductAdapter;
import com.ckkj.griddle.shop.entity.ProductEntity;
import com.ckkj.griddle.shop.mvp.ShopContract;
import com.ckkj.griddle.shop.mvp.ShopImpl;
import com.ckkj.griddle.shop.mvp.ShopPresenter;
import java.util.ArrayList;
import java.util.List;
import butterknife.OnClick;
/** 主页面商城入口,与美食模块分离;普通手机三列,宽窗口按可用宽度增加列数。 */
public class ShopFragment extends BaseFragment<ShopMallFragmentBinding, ShopPresenter>
implements ShopContract.ListView {
private ShopProductAdapter adapter;
private GridLayoutManager layoutManager;
private boolean viewReady;
private final View.OnLayoutChangeListener widthListener =
(v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) -> {
if (right - left != oldRight - oldLeft) updateColumns(right - left);
};
@Override
public ShopPresenter createPresenter() {
return new ShopPresenter(new ShopImpl());
}
@Override
public void initData(Bundle savedInstanceState) {
viewReady = true;
adapter = new ShopProductAdapter();
layoutManager = new GridLayoutManager(mContext, 3);
viewBinding.rvShopProducts.setLayoutManager(layoutManager);
viewBinding.rvShopProducts.setItemAnimator(null);
viewBinding.rvShopProducts.setAdapter(adapter);
viewBinding.rvShopProducts.addOnLayoutChangeListener(widthListener);
viewBinding.rvShopProducts.addItemDecoration(new RecyclerView.ItemDecoration() {
@Override
public void getItemOffsets(@NonNull Rect outRect, @NonNull View view,
@NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
int position = parent.getChildAdapterPosition(view);
if (position == RecyclerView.NO_POSITION) return;
int count = layoutManager.getSpanCount();
int column = position % count;
int gap = dp(10);
outRect.left = column * gap / count;
outRect.right = gap - (column + 1) * gap / count;
outRect.bottom = gap;
}
});
adapter.setOnItemClickListener((baseAdapter, view, position) -> openProduct(position));
adapter.setOnItemChildClickListener((baseAdapter, view, position) -> openProduct(position));
mPresenter.getProducts();
}
/** 按列表实际宽度计算,折叠屏、分屏和旋转后重新排版,不依赖物理屏幕宽度。 */
private void updateColumns(int width) {
if (!viewReady || width <= 0) return;
int available = width - viewBinding.rvShopProducts.getPaddingLeft()
- viewBinding.rvShopProducts.getPaddingRight();
int columns = Math.max(2, Math.min(6, (available + dp(10)) / dp(118)));
if (layoutManager.getSpanCount() != columns) {
layoutManager.setSpanCount(columns);
viewBinding.rvShopProducts.invalidateItemDecorations();
}
}
private int dp(int value) {
return Math.round(value * getResources().getDisplayMetrics().density);
}
private void openProduct(int position) {
if (position < 0 || position >= adapter.getData().size()) return;
ProductEntity product = adapter.getItem(position);
if (product != null) {
goTo(mContext, ProductDetailActivity.class, ProductDetailActivity.createBundle(product.id));
}
}
@Override
public void showProducts(List<ProductEntity> products) {
if (!viewReady) return;
adapter.setNewData(products == null ? new ArrayList<>() : new ArrayList<>(products));
viewBinding.tvShopMallState.setText(R.string.shop_mall_empty);
viewBinding.tvShopMallState.setVisibility(adapter.getData().isEmpty() ? View.VISIBLE : View.GONE);
}
@OnClick(R.id.tv_shop_mall_state)
public void onClick(View v) {
switch (v.getId()) {
case R.id.tv_shop_mall_state:
mPresenter.getProducts();
break;
default:
break;
}
}
@Override
public void showError(String message) {
if (!viewReady) return;
viewBinding.tvShopMallState.setText(TextUtils.isEmpty(message)
? getString(R.string.shop_mall_load_failed) : message);
viewBinding.tvShopMallState.setVisibility(View.VISIBLE);
}
@Override
public void onNetChange(int netModel) {
// 模拟阶段不因网络变化重新加载,避免打断列表浏览。
}
@Override
public void logOut(BaseBean bean) {
// 登录失效沿用父类处理。
}
@Override
public void onDestroyView() {
viewReady = false;
viewBinding.rvShopProducts.removeOnLayoutChangeListener(widthListener);
viewBinding.rvShopProducts.setAdapter(null);
super.onDestroyView();
}
}

View File

@@ -0,0 +1,22 @@
package com.ckkj.griddle.shop;
import android.content.Context;
import com.ckkj.griddle.R;
import java.math.BigDecimal;
import java.text.NumberFormat;
/** 列表和详情统一格式化现金价格,避免使用浮点数。 */
public final class ShopPriceFormatter {
private ShopPriceFormatter() { }
public static String format(Context context, long cashCents) {
NumberFormat format = NumberFormat.getNumberInstance(
context.getResources().getConfiguration().getLocales().get(0));
format.setMinimumFractionDigits(2);
format.setMaximumFractionDigits(2);
return context.getString(R.string.shop_mall_price,
format.format(BigDecimal.valueOf(cashCents, 2)));
}
}

View File

@@ -0,0 +1,59 @@
package com.ckkj.griddle.shop.adapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.RequestManager;
import com.ckkj.griddle.R;
/** 详情图片轮播,页数来自真实图片集合,不固定显示设计稿中的五张。 */
public class ProductImageAdapter extends RecyclerView.Adapter<ProductImageAdapter.ImageHolder> {
private final RequestManager requestManager;
private final int[] images;
public ProductImageAdapter(@NonNull RequestManager requestManager, int[] images) {
// 由页面在生命周期有效时传入,加载和回收始终复用同一个请求管理器。
this.requestManager = requestManager;
this.images = images.clone();
}
@NonNull
@Override
public ImageHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
return new ImageHolder(LayoutInflater.from(parent.getContext())
.inflate(R.layout.item_shop_product_image, parent, false));
}
@Override
public void onBindViewHolder(@NonNull ImageHolder holder, int position) {
holder.image.setContentDescription(holder.itemView.getContext()
.getString(R.string.shop_mall_image_description, position + 1, images.length));
requestManager.load(images[position]).centerCrop().into(holder.image);
}
@Override
public int getItemCount() {
return images.length;
}
@Override
public void onViewRecycled(@NonNull ImageHolder holder) {
// Activity 销毁时也会回收图片,不能在此通过 View 重新获取 Glide 管理器。
requestManager.clear(holder.image);
super.onViewRecycled(holder);
}
static class ImageHolder extends RecyclerView.ViewHolder {
final ImageView image;
ImageHolder(View view) {
super(view);
image = view.findViewById(R.id.iv_shop_gallery_image);
}
}
}

View File

@@ -0,0 +1,29 @@
package com.ckkj.griddle.shop.adapter;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ckkj.griddle.R;
import com.ckkj.griddle.shop.ShopPriceFormatter;
import com.ckkj.griddle.shop.entity.ProductEntity;
/** 三列商品卡片;标题最多四行,长名称省略,按钮交由页面统一路由。 */
public class ShopProductAdapter extends BaseQuickAdapter<ProductEntity, BaseViewHolder> {
public ShopProductAdapter() {
super(R.layout.item_shop_product);
}
@Override
protected void convert(BaseViewHolder helper, ProductEntity item) {
helper.setText(R.id.tv_shop_product_name, mContext.getString(item.nameRes));
helper.setText(R.id.tv_shop_product_sold, mContext.getString(R.string.shop_mall_sold, item.sold));
helper.setText(R.id.tv_shop_product_price, ShopPriceFormatter.format(mContext, item.cashCents));
ImageView cover = helper.getView(R.id.iv_shop_product_cover);
cover.setContentDescription(mContext.getString(item.nameRes));
Glide.with(cover).load(item.coverRes).centerCrop().into(cover);
helper.addOnClickListener(R.id.tv_shop_product_redeem);
}
}

View File

@@ -0,0 +1,38 @@
package com.ckkj.griddle.shop.entity;
import com.ckkj.griddle.cart.entity.CartGoodsEntity;
import java.io.Serializable;
/** 商城商品演示模型;金额以分保存,商品 ID 在列表、详情和下单之间保持一致。 */
public class ProductEntity implements Serializable {
private static final long serialVersionUID = 1L;
public final String id;
public final int nameRes;
public final int coverRes;
public final int descriptionRes;
public final long cashCents;
public final int sold;
private final int[] images;
public ProductEntity(String id, int nameRes, int coverRes, int descriptionRes,
long cashCents, int sold, int[] images) {
this.id = id;
this.nameRes = nameRes;
this.coverRes = coverRes;
this.descriptionRes = descriptionRes;
this.cashCents = cashCents;
this.sold = sold;
this.images = images == null ? new int[0] : images.clone();
}
public int[] getImages() {
return images.length == 0 ? new int[]{coverRes} : images.clone();
}
/** 复用现有购物车与结算模型,不另外维护一套金额、数量计算。 */
public CartGoodsEntity toCartGoods() {
return new CartGoodsEntity(id, nameRes, coverRes, 0, cashCents, 1, true);
}
}

View File

@@ -0,0 +1,33 @@
package com.ckkj.griddle.shop.mvp;
import com.ckkj.griddle.base.IView;
import com.ckkj.griddle.shop.entity.ProductEntity;
import java.util.List;
/** 商城列表与商品详情共用的数据协议。 */
public final class ShopContract {
private ShopContract() { }
public interface CallBack<T> {
void success(T data);
void fail(String message);
}
public interface DataModel {
void getProducts(CallBack<List<ProductEntity>> callback);
void getProduct(String productId, CallBack<ProductEntity> callback);
}
public interface ShopView extends IView { }
public interface ListView extends ShopView {
void showProducts(List<ProductEntity> products);
}
public interface DetailView extends ShopView {
void showProduct(ProductEntity product);
}
}

View File

@@ -0,0 +1,39 @@
package com.ckkj.griddle.shop.mvp;
import com.ckkj.griddle.R;
import com.ckkj.griddle.shop.entity.ProductEntity;
import java.util.ArrayList;
import java.util.List;
/** 商城数据层:暂用本地模拟数据,联调时统一替换此处,不在页面拼装接口数据。 */
public class ShopImpl implements ShopContract.DataModel {
private List<ProductEntity> createProducts() {
List<ProductEntity> products = new ArrayList<>();
for (int i = 0; i < 12; i++) {
// 原稿沿用同款商品演示;每项 ID 独立,照片仅使用实际准备的本地预览图。
products.add(new ProductEntity("shop_demo_" + (i + 1),
R.string.shop_mall_product_name, R.drawable.shop_product_preview,
R.string.shop_mall_product_description, 20800, i == 0 ? 1000 : 0,
new int[]{R.drawable.shop_detail_preview, R.drawable.shop_product_preview}));
}
return products;
}
@Override
public void getProducts(ShopContract.CallBack<List<ProductEntity>> callback) {
callback.success(createProducts());
}
@Override
public void getProduct(String productId, ShopContract.CallBack<ProductEntity> callback) {
for (ProductEntity product : createProducts()) {
if (product.id.equals(productId)) {
callback.success(product);
return;
}
}
callback.fail(null);
}
}

View File

@@ -0,0 +1,47 @@
package com.ckkj.griddle.shop.mvp;
import com.ckkj.griddle.base.BasePresenter;
import com.ckkj.griddle.shop.entity.ProductEntity;
import java.util.List;
/** 商城协调层;分别向列表和详情派发数据,沿用项目 attachView 生命周期。 */
public class ShopPresenter extends BasePresenter<ShopContract.ShopView> {
private final ShopContract.DataModel impl;
public ShopPresenter(ShopContract.DataModel impl) {
this.impl = impl;
}
public void getProducts() {
impl.getProducts(new ShopContract.CallBack<List<ProductEntity>>() {
@Override
public void success(List<ProductEntity> data) {
if (getView() instanceof ShopContract.ListView) {
((ShopContract.ListView) getView()).showProducts(data);
}
}
@Override
public void fail(String message) {
if (getView() != null) getView().showError(message);
}
});
}
public void getProduct(String productId) {
impl.getProduct(productId, new ShopContract.CallBack<ProductEntity>() {
@Override
public void success(ProductEntity data) {
if (getView() instanceof ShopContract.DetailView) {
((ShopContract.DetailView) getView()).showProduct(data);
}
}
@Override
public void fail(String message) {
if (getView() != null) getView().showError(message);
}
});
}
}

View File

@@ -1,171 +0,0 @@
package com.ckkj.griddle.utils;
import android.content.Context;
import android.util.Log;
import com.ckkj.griddle.fate.entity.CityDataEntity;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
/**
* @author fengxiaoyang
* @date 2025/8/11
* @description 城市信息JSON处理工具类
*/
public class YfjJsonHadnlerUtil {
private static final String TAG = "YfjJsonHadnlerUtil";
private static final String CITY_INFO_FILE = "yfj_city_info.json";
private static JSONObject cityInfoJson = null;
/**
* 初始化城市信息数据
* @param context 上下文
*/
public static void initCityInfo(Context context) {
if (cityInfoJson == null) {
cityInfoJson = loadCityInfoFromAssets(context);
}
}
/**
* 从assets文件夹加载城市信息JSON文件
* @param context 上下文
* @return JSONObject 城市信息数据
*/
private static JSONObject loadCityInfoFromAssets(Context context) {
try {
InputStream inputStream = context.getAssets().open(CITY_INFO_FILE);
int size = inputStream.available();
byte[] buffer = new byte[size];
inputStream.read(buffer);
inputStream.close();
String jsonString = new String(buffer, StandardCharsets.UTF_8);
return new JSONObject(jsonString);
} catch (IOException | JSONException e) {
Log.e(TAG, "加载城市信息文件失败: " + e.getMessage());
return null;
}
}
/**
* 根据城市名称查找匹配的城市信息
* @param cityEntity 城市名称,如"济宁市"、"北京市"、"XX地区"
* @return 匹配的城市名称,如果找不到则返回空字符串
*/
public static String findCityByName(CityDataEntity cityEntity) {
String cityResult = "";
if (cityInfoJson == null) {
Log.e(TAG, "城市信息未初始化,请先调用initCityInfo方法");
return "";
}
if (cityEntity == null || cityEntity.getCityName().trim().isEmpty()) {
return "";
}
try {
// 遍历所有省份/直辖市
JSONArray provinceNames = cityInfoJson.names();
if (provinceNames != null) {
for (int i = 0; i < provinceNames.length(); i++) {
String provinceName = provinceNames.getString(i);
// 检查省份名称是否包含城市名称
if (cityEntity.getCityName().contains(provinceName) || provinceName.contains(cityEntity.getCityName())) {
String proName = provinceName.replace("市","");
return proName;
}else if(cityEntity.getCityType().equals("特别行政区")){
}
if(cityEntity.getProvinceName().equals(provinceName)){
// 获取该省份下的城市列表
JSONArray cityList = cityInfoJson.getJSONArray(provinceName);
if (cityList != null) {
for (int j = 0; j < cityList.length(); j++) {
String city = cityList.getString(j);
// 检查城市名称是否包含城市名称参数,或者城市名称参数是否包含城市名称
if ((cityEntity.getCityName().contains(city) || city.contains(cityEntity.getCityName()))
&& cityEntity.getProvinceName().equals(provinceName)) {
cityResult = city;
return cityResult;
}else{
cityResult = cityEntity.getCapitalCity();
}
}
}
}
}
}
} catch (JSONException e) {
Log.e(TAG, "解析城市信息失败: " + e.getMessage());
}
return cityResult;
}
/**
* 获取所有省份名称
* @return 省份名称列表
*/
public static List<String> getAllProvinces() {
List<String> provinces = new ArrayList<>();
if (cityInfoJson == null) {
return provinces;
}
try {
JSONArray provinceNames = cityInfoJson.names();
if (provinceNames != null) {
for (int i = 0; i < provinceNames.length(); i++) {
provinces.add(provinceNames.getString(i));
}
}
} catch (JSONException e) {
Log.e(TAG, "获取省份列表失败: " + e.getMessage());
}
return provinces;
}
/**
* 根据省份名称获取该省份下的城市列表
* @param provinceName 省份名称
* @return 城市列表
*/
public static List<String> getCitiesByProvince(String provinceName) {
List<String> cities = new ArrayList<>();
if (cityInfoJson == null || provinceName == null || provinceName.trim().isEmpty()) {
return cities;
}
try {
if (cityInfoJson.has(provinceName)) {
JSONArray cityList = cityInfoJson.getJSONArray(provinceName);
if (cityList != null) {
for (int i = 0; i < cityList.length(); i++) {
cities.add(cityList.getString(i));
}
}
}
} catch (JSONException e) {
Log.e(TAG, "获取城市列表失败: " + e.getMessage());
}
return cities;
}
}

View File

@@ -1,69 +0,0 @@
package com.ckkj.griddle.wxapi;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import androidx.annotation.Nullable;
import com.ckkj.griddle.AppConfig;
import com.ckkj.griddle.EventMessage;
import com.ckkj.griddle.utils.show.ToastUtil;
//import com.tencent.mm.opensdk.constants.ConstantsAPI;
//import com.tencent.mm.opensdk.modelbase.BaseReq;
//import com.tencent.mm.opensdk.modelbase.BaseResp;
//import com.tencent.mm.opensdk.openapi.IWXAPI;
//import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler;
//import com.tencent.mm.opensdk.openapi.WXAPIFactory;
import de.greenrobot.event.EventBus;
public class WXPayEntryActivity extends Activity {
// private IWXAPI api;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// 微信 SDK 依赖已移除
// api = WXAPIFactory.createWXAPI(this, AppConfig.WX_APPID);
// api.handleIntent(getIntent(), this);
finish();
}
/* 微信 SDK 依赖已移除
@Override
public void onReq(BaseReq baseReq) {
if(baseReq != null){
}
}
@Override
public void onResp(BaseResp baseResp) {
if (baseResp.getType() == ConstantsAPI.COMMAND_PAY_BY_WX) {
int code = baseResp.errCode;
switch (code){
case 0://支付成功
EventBus.getDefault().post(new EventMessage(EventMessage.WX_PAY_SUCCESS));
finish();
break;
case -2:
ToastUtil.showShort(WXPayEntryActivity.this,"取消支付");
finish();
break;
case -1:
ToastUtil.showShort(WXPayEntryActivity.this,"参数错误");
finish();
break;
}
}
}
*/
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
setIntent(intent);
// api.handleIntent(intent, this);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Some files were not shown because too many files have changed in this diff Show More