|
@@ -21,7 +21,6 @@ Page({
|
|
|
healthReports: [],
|
|
healthReports: [],
|
|
|
statusText: "未知状态",
|
|
statusText: "未知状态",
|
|
|
loading: true,
|
|
loading: true,
|
|
|
- isShow: false,
|
|
|
|
|
isShowDelivery: false,
|
|
isShowDelivery: false,
|
|
|
},
|
|
},
|
|
|
onCardRecord(e: any) {
|
|
onCardRecord(e: any) {
|
|
@@ -64,7 +63,7 @@ Page({
|
|
|
});
|
|
});
|
|
|
res.items.forEach((item: any) => {
|
|
res.items.forEach((item: any) => {
|
|
|
item.carouselMediaList = [];
|
|
item.carouselMediaList = [];
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 添加photo
|
|
// 添加photo
|
|
|
if (item.conditioningProgramDetail?.photo) {
|
|
if (item.conditioningProgramDetail?.photo) {
|
|
|
item.carouselMediaList.push({
|
|
item.carouselMediaList.push({
|
|
@@ -73,7 +72,7 @@ Page({
|
|
|
title: '商品图片'
|
|
title: '商品图片'
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 添加itemImgFirst
|
|
// 添加itemImgFirst
|
|
|
if (item?.conditioningProgramDetail?.itemImgFirst) {
|
|
if (item?.conditioningProgramDetail?.itemImgFirst) {
|
|
|
item.carouselMediaList.push({
|
|
item.carouselMediaList.push({
|
|
@@ -82,7 +81,7 @@ Page({
|
|
|
title: '操作图片'
|
|
title: '操作图片'
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 添加itemVideoFirst
|
|
// 添加itemVideoFirst
|
|
|
if (item?.conditioningProgramDetail?.itemVideoFirst) {
|
|
if (item?.conditioningProgramDetail?.itemVideoFirst) {
|
|
|
item.carouselMediaList.push({
|
|
item.carouselMediaList.push({
|
|
@@ -91,7 +90,7 @@ Page({
|
|
|
title: '操作视频'
|
|
title: '操作视频'
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
this.setData({
|
|
this.setData({
|
|
@@ -102,7 +101,11 @@ Page({
|
|
|
console.log(res, "服务包详情数据");
|
|
console.log(res, "服务包详情数据");
|
|
|
let isShowDelivery = false;
|
|
let isShowDelivery = false;
|
|
|
console.log(res.items, "服务包详情数据");
|
|
console.log(res.items, "服务包详情数据");
|
|
|
-
|
|
|
|
|
|
|
+ if (res.items.length > 0) {
|
|
|
|
|
+ isShowDelivery = res.items.some((item: any) => {
|
|
|
|
|
+ return item.conditioningProgramDetail?.isDelivery === "Y";
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
this.setData({
|
|
this.setData({
|
|
|
isShowDelivery,
|
|
isShowDelivery,
|
|
|
});
|
|
});
|
|
@@ -135,17 +138,11 @@ Page({
|
|
|
careDetail: {},
|
|
careDetail: {},
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
- if (JSON.stringify(this.data.careDetail) !== "{}") {
|
|
|
|
|
- this.setData({
|
|
|
|
|
- isShow: true,
|
|
|
|
|
- });
|
|
|
|
|
- } else {
|
|
|
|
|
- this.setData({
|
|
|
|
|
- isShow: false,
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- } catch (error) {
|
|
|
|
|
- console.log(error);
|
|
|
|
|
|
|
+ } catch (error: any) {
|
|
|
|
|
+ wx.showToast({
|
|
|
|
|
+ title: error.message,
|
|
|
|
|
+ icon: "none",
|
|
|
|
|
+ });
|
|
|
wx.hideLoading();
|
|
wx.hideLoading();
|
|
|
this.setData({
|
|
this.setData({
|
|
|
isShow: false,
|
|
isShow: false,
|