张田田 hace 2 meses
padre
commit
994eee073e

+ 7 - 2
.idea/workspace.xml

@@ -5,7 +5,12 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="ade0a8c5-0639-4f05-956a-aae1181b5d18" name="更改" comment="">
-      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/miniprogram/app.json" beforeDir="false" afterPath="$PROJECT_DIR$/miniprogram/app.json" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/miniprogram/module/care/pages/care/verifyRecord.scss" beforeDir="false" afterPath="$PROJECT_DIR$/miniprogram/module/care/pages/care/verifyRecord.scss" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/miniprogram/module/care/pages/care/verifyRecord.ts" beforeDir="false" afterPath="$PROJECT_DIR$/miniprogram/module/care/pages/care/verifyRecord.ts" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/miniprogram/module/care/pages/care/verifyRecord.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/miniprogram/module/care/pages/care/verifyRecord.wxml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/miniprogram/pages/home/home.ts" beforeDir="false" afterPath="$PROJECT_DIR$/miniprogram/pages/home/home.ts" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/miniprogram/pages/home/home.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/miniprogram/pages/home/home.wxml" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -28,7 +33,7 @@
     "ModuleVcsDetector.initialDetectionPerformed": "true",
     "RunOnceActivity.ShowReadmeOnStart": "true",
     "RunOnceActivity.git.unshallow": "true",
-    "git-widget-placeholder": "story-237",
+    "git-widget-placeholder": "story-238",
     "junie.onboarding.icon.badge.shown": "true",
     "last_opened_file_path": "/Users/zhangtiantian/Desktop/six-health.applet",
     "node.js.detected.package.eslint": "true",

+ 2 - 1
miniprogram/app.json

@@ -83,7 +83,8 @@
         "pages/care/verifyRecord",
         "pages/offlineTreatment/offlineTreatment",
         "pages/careDetail/careDetail",
-        "pages/reportRecord/reportRecord"
+        "pages/reportRecord/reportRecord",
+        "pages/cancelAppointment/cancelAppointment"
       ]
     },
     {

+ 2 - 1
miniprogram/i18n/install.ts

@@ -6,8 +6,9 @@ import { flatRecordKeys } from './tool';
 let cache = null;
 
 export default async function request(url?: string) {
+  let env = 'release';
   try {
-    const { locales } = await Get(url ?? `${Locale_URL}/applet.${ENV}.json`, { notTransform: true, shareRequest: true });
+    const { locales } = await Get(url ?? `${Locale_URL}/applet.${env}.json`, { notTransform: true, shareRequest: true });
     return cache = flatRecordKeys(locales), cache;
   } catch (error) {
     return null;

+ 13 - 0
miniprogram/module/care/pages/cancelAppointment/cancelAppointment.json

@@ -0,0 +1,13 @@
+{
+  "renderer": "skyline",
+  "navigationBarTextStyle": "white",
+  "navigationBarBackgroundColor": "#0f2226",
+  "backgroundColor": "#0f2226",
+  "backgroundColorContent": "#ffffff",
+  "backgroundColorTop": "#0f2226",
+  "backgroundColorBottom": "#0f2226",
+  "component": true,
+  "usingComponents": {
+    "t-icon": "tdesign-miniprogram/icon/icon"
+  }
+}

+ 228 - 0
miniprogram/module/care/pages/cancelAppointment/cancelAppointment.scss

@@ -0,0 +1,228 @@
+.page-container {
+  background-color: #f3f3f3;
+  padding-top: 10px;
+  padding-bottom: 140rpx;
+  height: calc(100vh - 44px);
+  box-sizing: border-box;
+  -webkit-overflow-scrolling: touch;
+  .verify-record-page {
+    background: white;
+    // padding: 24rpx 0;
+    padding-bottom: 50px;
+  }
+  .title {
+    font-size: 32rpx;
+    font-weight: bold;
+    padding: 24rpx 32rpx 12rpx 32rpx;
+    color: #222;
+  }
+  .record-card {
+    background: #fff;
+    border-radius: 16rpx;
+    margin: 0 24rpx 24rpx 24rpx;
+    padding: 24rpx 24rpx 18rpx 24rpx;
+    box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.03);
+  }
+  .record-header {
+    font-size: 28rpx;
+    font-weight: 500;
+    color: #222;
+    margin-bottom: 12rpx;
+    display: flex;
+    align-items: center;
+  }
+  .record-index {
+    margin-right: 8rpx;
+  }
+  .record-time {
+    color: #222;
+  }
+  .record-row {
+    font-size: 26rpx;
+    color: #666;
+    margin-bottom: 8rpx;
+    display: flex;
+    flex-wrap: wrap;
+  }
+
+  .opt-img {
+    display: flex;
+    justify-content: baseline;
+    .img-box {
+      width: 300rpx;
+      height: 200rpx;
+      border-radius: 10rpx;
+    }
+  }
+  .label {
+    color: #999;
+    margin-right: 8rpx;
+  }
+}
+
+.bottom-actions {
+  position: fixed;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  padding: 24rpx 32rpx calc(24rpx + env(safe-area-inset-bottom));
+  background: #f3f3f3;
+  box-sizing: border-box;
+}
+
+.bottom-btn {
+  height: 88rpx;
+  line-height: 88rpx;
+  border-radius: 12rpx;
+  background: #1976d2;
+  color: #fff;
+  font-size: 30rpx;
+  text-align: center;
+}
+.empty-state {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  min-height: 300rpx;
+  padding: 40rpx;
+
+  .empty-text {
+    color: #999;
+    font-size: 28rpx;
+  }
+}
+// 预约成功卡片
+.appointment-success-card {
+  background: #fff;
+  border-radius: 16rpx;
+  // margin: 24rpx;
+  padding: 30rpx 32rpx 40rpx;
+  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.03);
+  margin-bottom: 20rpx;
+}
+
+.appointment-actions {
+  margin-top: 30rpx;
+  display: flex;
+  justify-content: center;
+  gap: 24rpx;
+}
+
+.action-btn {
+  min-width: 220rpx;
+  height: 72rpx;
+  line-height: 72rpx;
+  border-radius: 12rpx;
+  font-size: 28rpx;
+  text-align: center;
+  box-sizing: border-box;
+  padding: 0 24rpx;
+}
+
+.action-btn.cancel {
+  background: #fff;
+  color: #1976d2;
+  border: 2rpx solid #1976d2;
+  margin-right: 20px;
+}
+
+.action-btn.modify {
+  background: #1976d2;
+  color: #fff;
+  border: 2rpx solid #1976d2;
+}
+
+.appointment-success-title {
+  font-size: 48rpx;
+  font-weight: 600;
+  color: #000;
+  text-align: center;
+  margin-bottom: 30rpx;
+}
+
+// 二维码容器
+.qr-code-container {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  margin-bottom: 50rpx;
+}
+
+.qr-code-image {
+  width: 400rpx;
+  height: 400rpx;
+  background: #fff;
+}
+
+.qr-code-placeholder {
+  width: 260rpx;
+  height: 260rpx;
+  background: #f5f5f5;
+  border: 2rpx dashed #ddd;
+  border-radius: 8rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.qr-code-text {
+  font-size: 28rpx;
+  color: #999;
+}
+
+// 预约信息
+.appointment-info {
+  margin-bottom: 50rpx;
+  margin-left: 100rpx;
+}
+
+.info-item {
+  display: flex;
+  align-items: flex-start;
+  margin-bottom: 25rpx;
+  font-size: 30rpx;
+  line-height: 1.8;
+}
+
+.info-label {
+  color: #000;
+  margin-right: 16rpx;
+  // min-width: 180rpx;
+  flex-shrink: 0;
+}
+
+.info-value {
+  color: #000;
+  flex: 1;
+  word-break: break-all;
+  font-weight: 600;
+}
+
+// 提示信息
+// .appointment-tip {
+//   margin-top: 50rpx;
+//   padding-top: 40rpx;
+//   border-top: 1rpx solid #eee;
+// }
+
+.tip-text {
+  font-size: 26rpx;
+  color: #000;
+  line-height: 1.8;
+  text-align: center;
+}
+.evaluate-box{
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+.btn-review {
+  padding: 12rpx 40rpx;
+  border-radius: 12rpx;
+  font-size: 26rpx;
+  text-align: center;
+  background-color: #fff;
+  color: #1976d2;
+  border: 1px solid #1976d2;
+  margin-left: 20rpx;
+}

+ 22 - 0
miniprogram/module/care/pages/cancelAppointment/cancelAppointment.ts

@@ -0,0 +1,22 @@
+Page({
+  data: {
+    id: "",
+    appointmentInfo: {
+      operateTime: '',
+      operateDuration: '',
+      conditioningProgramSupplierName: '',
+      cpSupplierDetailAddress: '',
+      cpSupplierPhone: '',
+    },
+  },
+  onLoad(options: any) {
+    if (options.id) {
+      this.setData({ id: options.id });
+    }
+  },
+
+  onBack() {
+    wx.navigateBack({ delta: 1 });
+  },
+
+});

+ 41 - 0
miniprogram/module/care/pages/cancelAppointment/cancelAppointment.wxml

@@ -0,0 +1,41 @@
+<t-navbar title="取消预约" left-arrow />
+<scroll-view class="page-container" scroll-y>
+  <!-- 预约成功卡片 -->
+  <view class="appointment-success-card">
+    <!-- 标题 -->
+    <view class="appointment-success-title">取消预约成功</view>
+
+    <!-- 预约详情 -->
+    <view class="appointment-info">
+     <view class="info-item">
+        <text class="info-label">预约项目:</text>
+        <text class="info-value">{{appointmentInfo.arrangeTime}}</text>
+      </view>
+      <view class="info-item" wx:if="{{appointmentInfo.arrangeTime}}">
+        <text class="info-label">开始服务时间:</text>
+        <text class="info-value">{{appointmentInfo.arrangeTime}}</text>
+      </view>
+      <view class="info-item" wx:if="{{appointmentInfo.arrangeDuration}}">
+        <text class="info-label">服务所需时间:</text>
+        <text class="info-value">{{appointmentInfo.arrangeDuration}}分钟</text>
+      </view>
+      <view class="info-item" wx:if="{{appointmentInfo.conditioningProgramSupplierName}}">
+        <text class="info-label">服务机构:</text>
+        <text class="info-value" wx:if="{{appointmentInfo.pieTime}}">{{appointmentInfo.conditioningProgramSupplierName}}</text>
+        <text class="info-value" wx:else>待分配</text>
+      </view>
+      <view class="info-item" wx:if="{{appointmentInfo.cpSupplierDetailAddress}}">
+        <text class="info-label">服务地址:</text>
+        <text class="info-value">{{appointmentInfo.cpSupplierDetailAddress}}</text>
+      </view>
+      <view class="info-item" wx:if="{{appointmentInfo.cpSupplierPhone}}">
+        <text class="info-label">联系电话:</text>
+        <text class="info-value">{{appointmentInfo.cpSupplierPhone}}</text>
+      </view>
+    </view>
+  </view>
+  <!-- 返回按钮 -->
+  <view class="bottom-actions">
+    <view class="bottom-btn" catchtap="onBack">返回</view>
+  </view>
+</scroll-view>

+ 31 - 0
miniprogram/module/care/pages/care/verifyRecord.scss

@@ -80,6 +80,37 @@
   margin-bottom: 20rpx;
 }
 
+.appointment-actions {
+  margin-top: 30rpx;
+  display: flex;
+  justify-content: center;
+  gap: 24rpx;
+}
+
+.action-btn {
+  min-width: 220rpx;
+  height: 72rpx;
+  line-height: 72rpx;
+  border-radius: 12rpx;
+  font-size: 28rpx;
+  text-align: center;
+  box-sizing: border-box;
+  padding: 0 24rpx;
+}
+
+.action-btn.cancel {
+  background: #fff;
+  color: #1976d2;
+  border: 2rpx solid #1976d2;
+  margin-right: 20px;
+}
+
+.action-btn.modify {
+  background: #1976d2;
+  color: #fff;
+  border: 2rpx solid #1976d2;
+}
+
 .appointment-success-title {
   font-size: 48rpx;
   font-weight: 600;

+ 23 - 0
miniprogram/module/care/pages/care/verifyRecord.ts

@@ -17,6 +17,7 @@ Page({
   },
   onLoad(options: any) {
     if (options.id) {
+      this.setData({ id: options.id });
       this.getVerifyRecordList(options.id);
     }
   },
@@ -82,4 +83,26 @@ Page({
     }
   },
 
+  onCancelAppointment() {
+    wx.showModal({
+      title: "取消预约",
+      content: "预约取消后无法恢复!",
+      showCancel: true,
+      confirmText: "确定",
+      cancelText: "再想想",
+      success: (res) => {
+        if (res.confirm) {
+          // 跳转到取消预约页面
+          wx.navigateTo({
+            url: `/module/care/pages/cancelAppointment/cancelAppointment?id=${this.data.id}`,
+          });
+        }
+      },
+    });
+  },
+
+  onModifyAppointment() {
+    wx.showToast({ title: "功能开发中", icon: "none" });
+  },
+
 });

+ 5 - 0
miniprogram/module/care/pages/care/verifyRecord.wxml

@@ -39,6 +39,11 @@
     <view class="appointment-tip">
       <text class="tip-text">为了保证您的服务体验,请提前5分钟到达门店</text>
     </view>
+    <!-- 取消预约/修改预约 -->
+    <view class="appointment-actions">
+      <view class="action-btn cancel" catchtap="onCancelAppointment">取消预约</view>
+      <view class="action-btn modify" catchtap="onModifyAppointment">修改预约</view>
+    </view>
   </view>
   <view class="verify-record-page" wx:if="{{recordList.length>0}}">
     <block wx:for="{{recordList}}" wx:key="id">

+ 0 - 5
miniprogram/pages/home/home.ts

@@ -296,11 +296,6 @@ Page({
       });
     }
   },
-  goceshi() {
-    wx.navigateTo({
-      url: `/module/order/pages/test/test`,
-    });
-  },
   // 去预约
   onAppointment(e: any) {
     const id = e.currentTarget.dataset.id;

+ 0 - 1
miniprogram/pages/home/home.wxml

@@ -79,7 +79,6 @@
       </view>
     </view>
 
-<view bindtap="goceshi">测试</view>
     <view class="care-container" wx:if="{{displayList.length>0 && i18n.home.__showDisplay__}}">
       <view class="care-box">
         <view class="care-header">