rabin 1 år sedan
förälder
incheckning
3b2aad9177
36 ändrade filer med 43 tillägg och 366 borttagningar
  1. BIN
      package/admin/favicon.ico
  2. 0 0
      package/admin/json/china.json
  3. 0 4
      package/admin/static/css/213.89045697.css
  4. 0 4
      package/admin/static/css/780.4065063c.css
  5. 0 6
      package/admin/static/css/app.d065fbce.css
  6. 0 96
      package/admin/static/css/loading.css
  7. 0 4
      package/admin/static/css/vab-chunk-c6f52c3a.fc344e71.css
  8. 0 4
      package/admin/static/css/vab-plugins.f6f5c03c.css
  9. BIN
      package/admin/static/fonts/remixicon.31d28485.f12fd1a0.eot
  10. BIN
      package/admin/static/fonts/remixicon.881fbc46.1e0fb76b.woff
  11. BIN
      package/admin/static/fonts/remixicon.888e61f0.e313410c.ttf
  12. BIN
      package/admin/static/fonts/remixicon.9915fef9.5400338c.woff2
  13. BIN
      package/admin/static/img/403.d6bd8853.png
  14. BIN
      package/admin/static/img/404.f02775f8.png
  15. BIN
      package/admin/static/img/background-1.31e3a0ac.png
  16. BIN
      package/admin/static/img/background.2f742bae.jpg
  17. BIN
      package/admin/static/img/login_form.242d2e10.png
  18. 0 153
      package/admin/static/img/remixicon.95138f36.2b2ee314.svg
  19. 0 5
      package/admin/static/js/213.a290e4ad.js
  20. 0 5
      package/admin/static/js/592.41e25131.js
  21. 0 5
      package/admin/static/js/780.ba71496f.js
  22. 0 5
      package/admin/static/js/962.faf0c7f7.js
  23. 0 4
      package/admin/static/js/app.13bda67f.js
  24. 0 5
      package/admin/static/js/vab-chunk-0b9a05e8.3a2acba3.js
  25. 0 5
      package/admin/static/js/vab-chunk-54e012b3.6818ec02.js
  26. 0 5
      package/admin/static/js/vab-chunk-844ca20f.8fd468cb.js
  27. 0 5
      package/admin/static/js/vab-chunk-b3a4eaa1.509e2c01.js
  28. 0 5
      package/admin/static/js/vab-chunk-c6f52c3a.ac704231.js
  29. 0 5
      package/admin/static/js/vab-plugins.a55981e6.js
  30. 1 1
      package/manage/group.html
  31. 1 1
      package/manage/group_config.js
  32. 1 0
      src/dai/channel/table/card.php
  33. 20 2
      src/dai/seller/api/Manage.php
  34. 18 31
      src/dai/seller/lib/Manage.php
  35. 1 5
      src/dai/seller/lib/Order.php
  36. 1 1
      src/dai/seller/table/manage/info.php

BIN
package/admin/favicon.ico


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
package/admin/json/china.json


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 4
package/admin/static/css/213.89045697.css


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 4
package/admin/static/css/780.4065063c.css


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 6
package/admin/static/css/app.d065fbce.css


+ 0 - 96
package/admin/static/css/loading.css

@@ -1,96 +0,0 @@
-.first-loading-wrp {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  justify-content: center;
-  height: 90vh;
-  min-height: 90vh;
-}
-
-.first-loading-wrp > h1 {
-  font-size: 28px;
-  font-weight: bolder;
-}
-
-.first-loading-wrp .loading-wrp {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  padding: 98px;
-}
-
-.dot {
-  position: relative;
-  box-sizing: border-box;
-  display: inline-block;
-  width: 64px;
-  height: 64px;
-  font-size: 64px;
-  transform: rotate(45deg);
-  animation: antRotate 1.2s infinite linear;
-}
-
-.dot i {
-  position: absolute;
-  display: block;
-  width: 28px;
-  height: 28px;
-  background-color: #1890ff;
-  border-radius: 100%;
-  opacity: 0.3;
-  transform: scale(0.75);
-  transform-origin: 50% 50%;
-  animation: antSpinMove 1s infinite linear alternate;
-}
-
-.dot i:nth-child(1) {
-  top: 0;
-  left: 0;
-}
-
-.dot i:nth-child(2) {
-  top: 0;
-  right: 0;
-  -webkit-animation-delay: 0.4s;
-  animation-delay: 0.4s;
-}
-
-.dot i:nth-child(3) {
-  right: 0;
-  bottom: 0;
-  -webkit-animation-delay: 0.8s;
-  animation-delay: 0.8s;
-}
-
-.dot i:nth-child(4) {
-  bottom: 0;
-  left: 0;
-  -webkit-animation-delay: 1.2s;
-  animation-delay: 1.2s;
-}
-
-@keyframes antRotate {
-  to {
-    -webkit-transform: rotate(405deg);
-    transform: rotate(405deg);
-  }
-}
-
-@-webkit-keyframes antRotate {
-  to {
-    -webkit-transform: rotate(405deg);
-    transform: rotate(405deg);
-  }
-}
-
-@keyframes antSpinMove {
-  to {
-    opacity: 1;
-  }
-}
-
-@-webkit-keyframes antSpinMove {
-  to {
-    opacity: 1;
-  }
-}

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 4
package/admin/static/css/vab-chunk-c6f52c3a.fc344e71.css


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 4
package/admin/static/css/vab-plugins.f6f5c03c.css


BIN
package/admin/static/fonts/remixicon.31d28485.f12fd1a0.eot


BIN
package/admin/static/fonts/remixicon.881fbc46.1e0fb76b.woff


BIN
package/admin/static/fonts/remixicon.888e61f0.e313410c.ttf


BIN
package/admin/static/fonts/remixicon.9915fef9.5400338c.woff2


BIN
package/admin/static/img/403.d6bd8853.png


BIN
package/admin/static/img/404.f02775f8.png


BIN
package/admin/static/img/background-1.31e3a0ac.png


BIN
package/admin/static/img/background.2f742bae.jpg


BIN
package/admin/static/img/login_form.242d2e10.png


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 153
package/admin/static/img/remixicon.95138f36.2b2ee314.svg


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 5
package/admin/static/js/213.a290e4ad.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 5
package/admin/static/js/592.41e25131.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 5
package/admin/static/js/780.ba71496f.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 5
package/admin/static/js/962.faf0c7f7.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 4
package/admin/static/js/app.13bda67f.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 5
package/admin/static/js/vab-chunk-0b9a05e8.3a2acba3.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 5
package/admin/static/js/vab-chunk-54e012b3.6818ec02.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 5
package/admin/static/js/vab-chunk-844ca20f.8fd468cb.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 5
package/admin/static/js/vab-chunk-b3a4eaa1.509e2c01.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 5
package/admin/static/js/vab-chunk-c6f52c3a.ac704231.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 5
package/admin/static/js/vab-plugins.a55981e6.js


+ 1 - 1
package/admin/index.html → package/manage/group.html

@@ -1,5 +1,5 @@
 <!doctype html><html lang="zh-cmn-Hans"><head><meta charset="utf-8"/><meta content="IE=edge" http-equiv="X-UA-Compatible"/><meta content="webkit" name="renderer"/><meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport"/><link href="favicon.ico" rel="icon"/><title>Dever Manage</title><meta content="Dever,PHP,PHP框架,轻量,微服务,组件化,接口,低代码,后台,自定义后台,开发,快速开发,AI,人工智能,文档,轻应用,应用,时空之翼,神秘城" name="keywords"/><meta content="rabin@shemic.com" name="author"/><link href="static/css/loading.css?random=2024-01-25 17:34:35-shemic" rel="stylesheet"/><script>document.write(
-        "<script type='text/javascript' src='config.js?" +
+        "<script type='text/javascript' src='group_config.js?" +
           Math.random() +
           "'><\/script>"
       )</script><script defer="defer" src="static/js/app.13bda67f.js"></script><script defer="defer" src="static/js/213.a290e4ad.js"></script><link href="static/css/app.d065fbce.css" rel="stylesheet"><link href="static/css/213.89045697.css" rel="stylesheet"></head><body><noscript></noscript><div id="app"><div class="first-loading-wrp"><div class="loading-wrp"><span class="dot dot-spin"><i></i> <i></i> <i></i> <i></i></span></div><h1>Dever Manage</h1></div></div></body></html>

+ 1 - 1
package/admin/config.js → package/manage/group_config.js

@@ -6,7 +6,7 @@ if (location.port == '15000') {
   //url = 'http://127.0.0.1/dever2/package/manage'
   url = 'http://127.0.0.1/api2/package/manage/api'
 } else {
-  url = location.origin + location.pathname.replace('admin', 'manage') + 'api'
+  url = location.origin + location.pathname.replace('group.html', '') + 'api'
 }
 deverConfig = {
   // 一些基本配置,定义后台title

+ 1 - 0
src/dai/channel/table/card.php

@@ -74,6 +74,7 @@ return array
             (
                 1 => '未使用',
                 2 => '已使用',
+                3 => '已占用',
             ),
         ),
     ),

+ 20 - 2
src/dai/seller/api/Manage.php

@@ -151,8 +151,20 @@ class Manage extends Auth
         return $result;
     }
 
+    # 提取卡密
+    public function tqKmManage()
+    {
+        return $this->tqKmRun(2);
+    }
+
     # 提取卡密
     public function tqKm()
+    {
+        return $this->tqKmRun(1);
+    }
+
+    # 提取卡密
+    public function tqKmRun($type = 1)
     {
         $value = Dever::input('value');
         $id = Dever::input('order_id');
@@ -170,6 +182,14 @@ class Manage extends Auth
         if (!preg_match(Dever::rule('email'), $value)) {
             Dever::error('请输入正确的邮箱');
         }
+        if ($type == 1) {
+            $log['seller_id'] = $order['seller_id'];
+            $log['order_id'] = $id;
+            $order_km = Dever::db('order_km', 'seller')->find($log);
+            if ($order_km) {
+                Dever::error('您已经提取过卡密,无法重复提取,如需再次提取请联系商务');
+            }
+        }
 
         $result = array();
         $result['msg'] = '提取成功';
@@ -177,8 +197,6 @@ class Manage extends Auth
         \Dever\Helper\Cmd::run('seller/manage.tqKmAct', array('order_id' => $order['id'], 'value' => $value));
 
         # 增加提取日志
-        $log['seller_id'] = $order['seller_id'];
-        $log['order_id'] = $id;
         $log['admin_id'] = $this->uid;
         $log['system_id'] = $this->system['id'];
         $log['admin_name'] = $this->user['name'];

+ 18 - 31
src/dai/seller/lib/Manage.php

@@ -172,41 +172,21 @@ class Manage extends Auth
                         Dever::error('未分配渠道');
                     }
                     if ($channel['type'] == 2) {
-                        # 获取卡密并占用
-                        $param['seller_id'] = array('in', '-1,' . $info['seller_id']);
-                        $param['channel_id'] = $channel['id'];
-                        $param['goods_id'] = $info['goods_id'];
-                        $param['sku_id'] = $info['sku_id'];
+                        # 审核通过
+                        $param['order_id'] = $info['id'];
                         $param['status'] = 1;
-                        $param['use_status'] = 1;
-                        $card = Dever::db('card', 'channel')->select($param, array('order' => 'seller_id desc','limit' => '0, ' . $info['num']), true);
-                        $total = count($card);
-                        if ($total < $info['num']) {
-                            Dever::error('卡密剩余数量不足');
-                        }
-                        foreach ($card as $k1 => $v1) {
-                            Dever::db('card', 'channel')->update($v1['id'], array('use_status' => 2, 'order_id' => $info['id']));
-                        }
-                        $result['status'] = 1;
-
-                        $update = array();
-                        $update['channel_id'] = $channel['id'];
-                        $update['channel_order_date'] = time();
-                        if (isset($channel['goods']['id'])) {
-                            $update['channel_goods_id'] = $channel['goods']['id'];
-                        }
-                        $update['channel_goods_discount'] = $channel['discount'];
-                        if (isset($channel['goods']['discount']) && $channel['goods']['discount']) {
-                            $update['channel_goods_discount'] = $channel['goods']['discount'];
-                        }
-                        if (!$update['channel_goods_discount']) {
-                            $update['channel_goods_discount'] = 1;
-                        }
-                        $update['buy_price'] = round($info['cash'] * $update['channel_goods_discount'], 2) * $info['num'];
-                        Dever::db('order', 'seller')->update($info['id'], $update);
+                        $param['use_status'] = 3;
+                        Dever::db('card', 'channel')->update($param, array('use_status' => 2));
                     }
                 }
                 if ($info['status'] == 11) {
+                    if ($channel['type'] == 2) {
+                        # 审核失败
+                        $param['order_id'] = $info['id'];
+                        $param['status'] = 1;
+                        $param['use_status'] = 3;
+                        Dever::db('card', 'channel')->update($param, array('use_status' => 1));
+                    }
                     # 失败,余额加回来
                     Dever::load('info', 'seller')->inc($info['seller_id'], $info['price']);
                     Dever::load('info', 'seller')->log($info['seller_id'], $info['id'], $info['price'], 4);
@@ -428,6 +408,13 @@ class Manage extends Auth
                 'content' => array
                 (
                     array('提取密码', '<font style="color:red">' . $code . '</font>'),
+                    array('提取邮箱', array
+                    (
+                        'input' => '请输入邮箱',
+                        'value' => $seller['email'],
+                        'button' => '提取',
+                        'remote' => Dever::url('seller/manage.tqKmManage', array('order_id' => $data['id'])),
+                    )),
                 ), 
             );
         }

+ 1 - 5
src/dai/seller/lib/Order.php

@@ -99,7 +99,6 @@ class Order
             $result = Dever::load('func/api', 'connect')->run(1, $info['cate_id'], $channel, $param);
         } elseif ($channel['type'] == 2) {
             # 需要审核
-            return 'ok';
             # 获取卡密并占用
             $param['seller_id'] = array('in', '-1,' . $info['seller_id']);
             $param['channel_id'] = $channel['id'];
@@ -113,7 +112,7 @@ class Order
                 return $this->notify($info, '卡密剩余数量不足', $update);
             }
             foreach ($card as $k => $v) {
-                Dever::db('card', 'channel')->update($v['id'], array('use_status' => 2, 'order_id' => $info['id']));
+                Dever::db('card', 'channel')->update($v['id'], array('use_status' => 3, 'order_id' => $info['id']));
             }
             $result['status'] = 1;
         } elseif ($channel['type'] == 11) {
@@ -143,9 +142,6 @@ class Order
         if ($result['status'] == 1) {
             # 下单成功
             Dever::db('order', 'seller')->update($info['id'], $update);
-            if ($channel['type'] == 2) {
-                return $this->notify($info, 'ok', $update);
-            }
             return 'ok';
         } else {
             # 下单失败

+ 1 - 1
src/dai/seller/table/manage/info.php

@@ -69,7 +69,7 @@ return array
             (
                 'name' => '后台地址',
                 'type' => 'show',
-                'default' => Dever::host() . 'package/admin/#/login',
+                'default' => Dever::host() . 'package/manage/group.html#/login',
             ),
             'show_mobile' => array
             (

Vissa filer visades inte eftersom för många filer har ändrats