Silent 6 anni fa
parent
commit
7db3482a9c

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

xqd
@@ -213,7 +213,11 @@ class ApiController extends Controller
                 $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)

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

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