Silent 6 years ago
parent
commit
195f30900a

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

@@ -162,7 +162,7 @@ class ApiController extends Controller
             return response()->json(['status' => 'fail', 'info' => '找不到用户']);
             return response()->json(['status' => 'fail', 'info' => '找不到用户']);
         }
         }
         if(empty($request->input('phone')) || empty($student = Student::where('phone', $request->input('phone'))->first())) {
         if(empty($request->input('phone')) || empty($student = Student::where('phone', $request->input('phone'))->first())) {
-            return response()->json(['status' => 'error', 'info' => '找不到学员']);
+            return response()->json(['status' => 'fail', 'info' => '找不到学员']);
         }
         }
 
 
         $res = $student->update([
         $res = $student->update([

+ 1 - 0
wechat/pages/bind-phone/index.js

@@ -31,6 +31,7 @@ Page({
           'phone': e.detail.value.phone
           'phone': e.detail.value.phone
         },
         },
         success: res => {
         success: res => {
+          console.log(res)
           if (res.data.status == 'success') {
           if (res.data.status == 'success') {
             wx.setStorageSync('pt_student', res.data.data)
             wx.setStorageSync('pt_student', res.data.data)
             wx.switchTab({
             wx.switchTab({