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

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

@@ -172,7 +172,8 @@ class ApiController extends Controller
             'city' => $we_chat_user->city,
             'city' => $we_chat_user->city,
             'province' => $we_chat_user->province,
             'province' => $we_chat_user->province,
             'country' => $we_chat_user->country,
             'country' => $we_chat_user->country,
-            'avatar_url' => $we_chat_user->avatar_url
+            'avatar_url' => $we_chat_user->avatar_url,
+            'remark' => '已绑定'
         ]);
         ]);
         if(empty($res)) {
         if(empty($res)) {
             return response()->json(['status' => 'fail', 'info' => '数据更新失败']);
             return response()->json(['status' => 'fail', 'info' => '数据更新失败']);

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

@@ -20,6 +20,7 @@ Page({
   formSubmit: e => {
   formSubmit: e => {
     if(!e.detail.value.phone) {
     if(!e.detail.value.phone) {
       wx.showToast({
       wx.showToast({
+        icon: 'none',
         title: '手机号不能为空',
         title: '手机号不能为空',
       })
       })
     } else {
     } else {
@@ -31,7 +32,6 @@ 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({
@@ -39,6 +39,7 @@ Page({
             })
             })
           } else if (res.data.status == 'fail') {
           } else if (res.data.status == 'fail') {
             wx.showToast({
             wx.showToast({
+              icon: 'none',
               title: res.data.info,
               title: res.data.info,
             })
             })
           }
           }