Silent 6 年之前
父節點
當前提交
7db3482a9c
共有 2 個文件被更改,包括 12 次插入6 次删除
  1. 5 1
      app/Http/Controllers/WeChat/ApiController.php
  2. 7 5
      wechat/pages/index/index.js

+ 5 - 1
app/Http/Controllers/WeChat/ApiController.php

@@ -213,7 +213,11 @@ class ApiController extends Controller
                 $result = 'ok';
                 $result = 'ok';
             }
             }
         }
         }
-        return response()->json(['status' => 'success', 'result' => $result]);
+        $now = Carbon::today()->toDateTimeString();
+        $checkCard = CheckCard::where([
+            ['begin_date_time', '>', $now]
+        ])->whereNotNull('end_date_time')->orderBy('begin_date_time', 'desc')->first();
+        return response()->json(['status' => 'success', 'result' => $result, 'checkCard' => $checkCard]);
     }
     }
 
 
     public function startCheckCard(Request $request)
     public function startCheckCard(Request $request)

+ 7 - 5
wechat/pages/index/index.js

@@ -125,7 +125,8 @@ Page({
   },
   },
   hidePhotoPopup() {
   hidePhotoPopup() {
     this.setData({
     this.setData({
-      showPopup: false
+      showPopup: false,
+      clock: '00:00:00'
     })
     })
   },
   },
   handleBtnClick() {
   handleBtnClick() {
@@ -301,13 +302,14 @@ Page({
     wx.saveImageToPhotosAlbum({
     wx.saveImageToPhotosAlbum({
       filePath: this.data.shareTempFilePath,
       filePath: this.data.shareTempFilePath,
       success: (res) => {
       success: (res) => {
-        this.setData({
-          showPopup: false
-        })
+        // this.setData({
+        //   showPopup: false
+        // })
       },
       },
       complete: res => {
       complete: res => {
         this.setData({
         this.setData({
-          showPopup: false
+          showPopup: false,
+          clock: '00:00:00'
         })
         })
       }
       }
     })
     })