Просмотр исходного кода

Merge branch 'story-237' of ssh://121.43.162.141:10022/six.fe/health.applet into story-238

# Conflicts:
#	.idea/workspace.xml
#	miniprogram/module/care/pages/care/verifyRecord.ts
张田田 1 месяц назад
Родитель
Сommit
3c051ac179

+ 7 - 21
miniprogram/module/article/pages/add-address/add-address.ts

@@ -172,29 +172,15 @@ Page({
         await this.onAddress(this.data.formData);
       }
       this.setData({ saving: false });
-      // if (this.data.type === "orderDetail") {
-      //   // 订单详情页
-      //   wx.redirectTo({
-      //     url: "/module/article/pages/order-detail/order-detail",
-      //   });
-      // } else if (this.data.type === "orderList") {
-      //   // 订单列表页
-      //   wx.redirectTo({
-      //     url: "/module/article/pages/order-list/order-list",
-      //   });
-      // }
-      // 返回上一页
+      // 返回上一页(避免 redirectTo 造成 manage-address 重复入栈)
       const pages = getCurrentPages();
       if (pages.length > 1) {
-        const prevPage = pages[pages.length - 2];
-        if (
-          prevPage.route ===
-          "module/article/pages/manage-address/manage-address"
-        ) {
-          wx.redirectTo({
-            url: "/module/article/pages/manage-address/manage-address",
-          });
-        }
+        wx.navigateBack();
+      } else {
+        // 极端情况下没有上一页(比如被 reLaunch 打开),兜底回地址管理
+        wx.redirectTo({
+          url: "/module/article/pages/manage-address/manage-address",
+        });
       }
       // 保存成功后可自动跳转或提示
     } catch (error: any) {

+ 20 - 8
miniprogram/module/article/pages/foot-print/foot-print.ts

@@ -3,6 +3,7 @@ import tickleBehavior, {
   getTickleContext,
 } from "../../../../core/behavior/tickle.behavior";
 import { getFootPrintListMethod } from "../../request";
+import { Get } from "../../../../lib/request/method";
 Page({
   behaviors: [PageContainerBehavior, tickleBehavior],
   lifetimes: {
@@ -10,19 +11,30 @@ Page({
   },
   properties: {},
   data: {
-    articleList: [],
+    articleList: [] as any[],
   },
-  goDetail(e: any) {
+  async goDetail(e: any) {
     const type = e.currentTarget.dataset.type;
     const item = e.currentTarget.dataset.item;
-    // type 1 中医科普 2 药膳 4 茶饮
+    // type ,1-健康宣教 2-药膳 3-膳食 4-茶饮
     // 药膳详情
     if (type === "1") {
-      wx.navigateTo({
-        url: `/module/article/pages/science-info/science-info?id=${item.sourceId}`,
-      }).then((res) => {
-        res.eventChannel.emit("load", item);
-      });
+      try {
+        const res: any = await Get(`/psarticle/clickPsarticle`, {
+          params: { popularScienceArticleId: item.sourceId },
+        });
+        const url = res?.data;
+        const detailPayload = {
+          url,
+        };
+        wx.navigateTo({
+          url: `/module/article/pages/science-info/science-info`,
+        }).then((res) => {
+          res.eventChannel.emit("load", detailPayload);
+        });
+      } catch (error) {
+        console.log(error);
+      }
     } else if (type === "2" || type === "4") {
       wx.navigateTo({
         url: `/module/article/pages/diet-info/diet-info?id=${item.sourceId}`,

+ 1 - 4
miniprogram/module/care/pages/care/verifyRecord.ts

@@ -6,7 +6,7 @@ Page({
     recordListId: '',
     recordList: [],
     showAppointmentSuccess: true,
-    //是否显示修改预约按钮 
+    //是否显示修改预约按钮
     isShowUpdateButton: false,
     //isShowCancleButton
     isShowCancleButton: false,
@@ -23,8 +23,6 @@ Page({
   },
   onLoad(options: any) {
     if (options.id) {
-      this.setData({ id: options.id });
-
       this.setData({
         id: options?.id
       })
@@ -82,7 +80,6 @@ Page({
   },
   // 去评价
   onReview(e: WechatMiniprogram.TouchEvent) {
-    ;
     const { evaluateTime } = e.currentTarget.dataset.goods;
     if (evaluateTime) {
       // 线下服务评价详情

+ 4 - 4
miniprogram/module/order/pages/confirme-order/confirme-order.scss

@@ -320,10 +320,10 @@
     }
   }
 
-  &.address-card--disabled {
-    opacity: 0.9;
-    pointer-events: none;
-  }
+  // &.address-card--disabled {
+  //   opacity: 0.9;
+  //   pointer-events: none;
+  // }
 }
 
 .address-content {

+ 1 - 1
miniprogram/module/order/pages/confirme-order/confirme-order.wxml

@@ -3,7 +3,7 @@
 <scroll-view class="page-scroll__container bottom" type="list" scroll-y style="{{containerStyle}}">
   <view class="info-box {{ showDetail ? ' ' : 'show-bttom' }}">
     <!-- 收货人信息卡片 -->
-    <view class="address-card address-card--disabled" bindtap="changeAddress">
+    <view class="address-card" bindtap="changeAddress">
       <view class="delivery-address" wx:if="{{showDetail}}">
         请选择配送地址
       </view>

+ 1 - 1
miniprogram/module/order/pages/offline-evaluate/offline-evaluate.ts

@@ -210,7 +210,7 @@ Page({
       wx.hideLoading();
       wx.showToast({ title: "发布成功", icon: "success" });
       wx.redirectTo({
-        url: `/module/order/pages/offline-evaluate/offline-evaluate`,
+        url: `/module/care/pages/care/verifyRecord?id=${this.data.service?.patientConditioningProgramId}`,
       });
     } catch (error: any) {
       wx.hideLoading();