Bladeren bron

暂时关闭登录验证码,新增测试接口

Kirin 1 jaar geleden
bovenliggende
commit
e55e6095e4
3 gewijzigde bestanden met toevoegingen van 52 en 7 verwijderingen
  1. 7 7
      app/controller/api/v1/LoginController.php
  2. 44 0
      app/jobs/integral/IntegralJob.php
  3. 1 0
      route/api.php

+ 7 - 7
app/controller/api/v1/LoginController.php

@@ -339,13 +339,13 @@ class LoginController
         }
 
         //验证验证码
-        $verifyCode = CacheService::get('code_' . $phone);
-        if (!$verifyCode)
-            return app('json')->fail('请先获取验证码');
-        $verifyCode = substr($verifyCode, 0, 6);
-        if ($verifyCode != $captcha) {
-            return app('json')->fail('验证码错误');
-        }
+//        $verifyCode = CacheService::get('code_' . $phone);
+//        if (!$verifyCode)
+//            return app('json')->fail('请先获取验证码');
+//        $verifyCode = substr($verifyCode, 0, 6);
+//        if ($verifyCode != $captcha) {
+//            return app('json')->fail('验证码错误');
+//        }
         $user_type = $request->getFromType() ? $request->getFromType() : 'h5';
         $token = $this->services->mobile($phone, $spread_spid, $user_type);
         if ($token) {

+ 44 - 0
app/jobs/integral/IntegralJob.php

@@ -0,0 +1,44 @@
+<?php
+
+namespace app\jobs\integral;
+
+use crmeb\basic\BaseJobs;
+use crmeb\traits\QueueTrait;
+
+/**
+ * 订单消息队列
+ * Class OrderJob
+ * @package app\jobs
+ */
+class IntegralJob extends BaseJobs
+{
+    use QueueTrait;
+
+    /**
+     * 减积分
+     * @param int $uid 用户
+     * @param float $static 静态积分
+     * @param float $action 动态积分
+     * @param float $cash 资金池
+     * @param int $link_id 关联ID
+     * @param string $mark 备注
+     */
+    public function decIntegral(int $uid, float $static, float $action, float $cash, int $link_id = 0, string $mark = '')
+    {
+        
+    }
+
+    /**
+     * 加积分
+     * @param int $uid 用户
+     * @param float $static 静态积分
+     * @param float $action 动态积分
+     * @param float $cash 资金池
+     * @param int $link_id 关联ID
+     * @param string $mark 备注
+     */
+    public function incIntegral(int $uid, float $static, float $action, float $cash, int $link_id = 0, string $mark = '')
+    {
+
+    }
+}

+ 1 - 0
route/api.php

@@ -50,6 +50,7 @@ Route::group('api', function () {
 	Route::group(function () {
 		//公共类
 		Route::get('index', 'v1.PublicController/index')->name('index');//首页
+		Route::any('test', 'v1.PublicController/test')->name('test');//测试
 		Route::get('menu/user', 'v1.PublicController/menu_user')->name('menuUser');//个人中心菜单
 
 		//商品类