From 437144f41c74505d362a5214a18cec3d01b3ce4b Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期一, 10 十月 2022 17:51:30 +0800
Subject: [PATCH] 2022.10.10

---
 pages/m_service/c_schedule/c_schedule.js |   44 ++++++++------------------------------------
 1 files changed, 8 insertions(+), 36 deletions(-)

diff --git a/pages/m_service/c_schedule/c_schedule.js b/pages/m_service/c_schedule/c_schedule.js
index 462e2ed..68d3b87 100644
--- a/pages/m_service/c_schedule/c_schedule.js
+++ b/pages/m_service/c_schedule/c_schedule.js
@@ -1,7 +1,9 @@
 // pages/m_service/c_schedule/c_schedule.js
-const moment = require('../../../utils/moment.min')
+import moment from '../../../utils/moment.min'
+import b_scheduleManager from '../behaviors/b_scheduleManager'
 
 Component({
+  behaviors: [b_scheduleManager],
   options: {
     addGlobalClass: true
   },
@@ -9,18 +11,7 @@
    * 缁勪欢鐨勫睘鎬у垪琛�
    */
   properties: {
-    title: {
-      type: String,
-      value: '钀ヤ笟鎵х収缁湡'
-    },
-    time: {
-      type: String,
-      value: '2022-9-10 鏄熸湡鍏�'
-    },
-    leftDays: {
-      type: Number,
-      value: 2
-    },
+    
   },
 
   /**
@@ -30,36 +21,17 @@
 
   },
 
-  lifetimes: {
-    attached: function () {
-      this._init()
-    }
-  },
-
   /**
    * 缁勪欢鐨勬柟娉曞垪琛�
    */
   methods: {
-    _init() {
-      moment.updateLocale('en', {
-        weekdays: '鏄熸湡鏃鏄熸湡涓�_鏄熸湡浜宊鏄熸湡涓塤鏄熸湡鍥沖鏄熸湡浜擾鏄熸湡鍏�'.split('_')
-      });
-      // console.log(moment.locales());
-      // moment.locale('ch')
-      const now = moment().hour(0).minute(0).second(0).millisecond(0)
-      const s = moment(now).add(3, 'days')
-
-      let leftDays = now.diff(s, 'days')
-      const time = s.format('YYYY-MM-DD dddd')
-      this.setData({
-        time,
-        leftDays
-      })
-    },
     goto() {
+      var that = this
       wx.navigateTo({
         url: '/pages/m_service/p_scheduledetail/p_scheduledetail',
-        success: (result) => {},
+        success: (res) => {
+          res.eventChannel.emit('acceptDataFromOpenerPage', that.data.thisSchedule)
+        },
       })
     }
   }

--
Gitblit v1.9.3