2 次程式碼提交

作者 SHA1 備註 提交日期
  Your Name e8b047eef5 Merge branch 'develop' of https://gitea.zx2049.com/yituan/opkpm into local-develop 1 周之前
  Your Name c3e7f04d77 修改接口问题 1 周之前
共有 1 個檔案被更改,包括 16 行新增3 行删除
  1. 16
    3
      app/api/logic/ShopContentLogic.php

+ 16
- 3
app/api/logic/ShopContentLogic.php 查看文件

145
                     $data = [
145
                     $data = [
146
                         'status' => 100,
146
                         'status' => 100,
147
                         'msg' => "绑定机器码成功!",
147
                         'msg' => "绑定机器码成功!",
148
-                        'is_gi' => $is_gi
148
+                        'is_gi' => $is_gi,
149
+                        'count' => $shop['hksy_count']
149
                     ];
150
                     ];
150
                 } else {
151
                 } else {
151
                     $data = [
152
                     $data = [
179
                     $data = [
180
                     $data = [
180
                         'status' => 100,
181
                         'status' => 100,
181
                         'msg' => "已绑定该机器码!",
182
                         'msg' => "已绑定该机器码!",
182
-                        'is_gi' => $is_gi
183
+                        'is_gi' => $is_gi,
184
+                        'count' => $shop['hksy_count']
183
                     ];
185
                     ];
184
                 }
186
                 }
185
             }
187
             }
837
      */
839
      */
838
     public static function subHKSYCount($post) {
840
     public static function subHKSYCount($post) {
839
         $code = $post["code"] ?? '';
841
         $code = $post["code"] ?? '';
842
+        $mcode = $post["mcode"] ?? '0000';
843
+
840
         //$count = $post["count"] ?? 1; //默认就是1
844
         //$count = $post["count"] ?? 1; //默认就是1
841
         $count = 1;
845
         $count = 1;
842
         $remark = $post["remark"] ?? '';
846
         $remark = $post["remark"] ?? '';
843
 
847
 
844
-        if ($count <= 0 || empty($remark)) {
848
+        if ($count <= 0 || empty($remark) || empty($mcode)) {
845
             self::$errCode = 1;
849
             self::$errCode = 1;
846
             self::$error = "参数错误";
850
             self::$error = "参数错误";
847
             return false;
851
             return false;
848
         }
852
         }
849
 
853
 
854
+        //没有必要验证机器码 后续需要对接口进行加密传输,解密操作,验证来源 防篡改,使用token也不安全,秘钥和机器码和token都会暴露;
855
+        /*$where001 = [
856
+            "del" => 0,
857
+            "is_show" => 1,
858
+            "pid" => 0, //必须是电脑
859
+            "code" => $code
860
+        ];
861
+        $item = EquiCategoryModel::where($where001)->find();*/
862
+
850
         $shop = self::getShopByCode($code);
863
         $shop = self::getShopByCode($code);
851
         if (empty($shop)) {
864
         if (empty($shop)) {
852
             self::$errCode = 9;
865
             self::$errCode = 9;

Loading…
取消
儲存