refactor: 收口业务提供项接口契约

This commit is contained in:
que01 committed 2026-09-21 17:39:07 +08:00
1 parent 844a3bd715
commit fe7005d4d0
5 files changed
+16 -9

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@ Page({
template: getTemplate("personal"),
},
onLoad(query) {
Promise.all([request("/public/services"), request("/public/brand")])
Promise.all([request("/public/offerings"), request("/public/brand")])
.then(([services, brand]) => {
const list = Array.isArray(services) ? services : [];
const service =
+1 -1
View File
@@ -9,7 +9,7 @@ Page({
},
load() {
this.setData({ loading: true, error: "" });
Promise.all([request("/public/brand"), request("/public/services")])
Promise.all([request("/public/brand"), request("/public/offerings")])
.then(([brand, services]) => {
getApp().globalData.brand = brand;
wx.setNavigationBarTitle({ title: brand.name || "个人品牌" });
+2 -2
View File
@@ -9,12 +9,12 @@ Page({
this.setData({ loading: true, error: "" });
Promise.all([
request("/public/offerings"),
request("/public/services"),
request("/public/offerings"),
request("/public/brand"),
])
.then(([offerings, services, brand]) => {
const labels = getTemplate(brand.templateKey);
const source = offerings.length ? offerings : services;
const source = offerings;
const mapped = source.map((item) => ({
...item,
coverUrl: