feat:mock 的对接了首页、分类、商家列表和详情的接口
This commit is contained in:
1 parent
87cf7dfbaa
commit
d723eb1232
20 files changed
+3948
-333
No files matched your search
+2
-2
@@ -53,8 +53,8 @@ export const maskPhone = (phone) => {
|
||||
return `${p.slice(0, 3)}****${p.slice(-4)}`;
|
||||
};
|
||||
|
||||
/** 2026-09-12 → 2026.09.12 */
|
||||
export const dotDate = (str) => String(str || "").replace(/-/g, ".");
|
||||
/** 2026-09-12 / 2026-09-12T02:00:00Z → 2026.09.12(接口时间为 RFC3339 UTC,只取日期段) */
|
||||
export const dotDate = (str) => String(str || "").slice(0, 10).replace(/-/g, ".");
|
||||
|
||||
/** 有效期区间文案:2026.09.12 - 09.18 */
|
||||
export const dateRangeText = (from, to) => {
|
||||
|
||||
+3
-3
@@ -86,9 +86,9 @@ export const goCatalog = (sectionKey) => {
|
||||
uni.navigateTo({ url: `${ROUTES.CATALOG}?section=${sectionKey}` });
|
||||
};
|
||||
|
||||
/** 跳内容详情页 */
|
||||
export const goDetail = (collection, id) => {
|
||||
uni.navigateTo({ url: `${ROUTES.DETAIL}?collection=${collection}&id=${id}` });
|
||||
/** 跳内容详情页(接口按商家 id 直取详情,不再需要 collection) */
|
||||
export const goDetail = (id) => {
|
||||
uni.navigateTo({ url: `${ROUTES.DETAIL}?id=${id}` });
|
||||
};
|
||||
|
||||
/** 跳协议页 type: privacy | terms */
|
||||
|
||||
Reference in new issue
Block a user