唐金木 4 months ago
parent
commit
cb9db53e1e
79 changed files with 2668 additions and 1251 deletions
  1. BIN
      BTS系统调整.docx
  2. BIN
      bts.zip
  3. 13 1
      php/adddata.sql
  4. 78 0
      php/app/admin/controller/Contents.php
  5. 12 6
      php/app/admin/controller/Finance.php
  6. 74 14
      php/app/admin/controller/Order.php
  7. 42 0
      php/app/admin/controller/Uploads.php
  8. 62 3
      php/app/admin/controller/Usermanage.php
  9. 24 1
      php/app/common.php
  10. 28 0
      php/app/common/controller/Message.php
  11. 14 8
      php/app/common/controller/Orde.php
  12. 11 38
      php/app/common/controller/Upfile.php
  13. 17 0
      php/app/common/model/Quotation.php
  14. 8 1
      php/app/middleware.php
  15. 1 0
      php/app/web/controller/Index.php
  16. 49 23
      php/app/web/controller/Login.php
  17. 98 17
      php/app/web/controller/My.php
  18. 60 0
      php/app/web/controller/Text.php
  19. 4 3
      php/app/web/model/Mail.php
  20. 55 12
      php/app/web/model/Orders.php
  21. 63 0
      php/app/web/model/Upfile.php
  22. 1 0
      php/app/worker/controller/User.php
  23. 7 0
      php/public/index.php
  24. BIN
      php/public/storage/uploads/20200615/07557fe43561157531e9f356046de104.png
  25. BIN
      php/public/storage/uploads/20200615/10af3f79448940125a65d72b31d12a1e.png
  26. BIN
      php/public/storage/uploads/20200615/19dab13c89d5a3aceb8b8afb8de39fda.png
  27. BIN
      php/public/storage/uploads/20200615/2faa32200d968f66829f1066f19b1a40.png
  28. BIN
      php/public/storage/uploads/20200615/44f7f4aa8e5387d8bc2734ba541f8078.png
  29. BIN
      php/public/storage/uploads/20200615/473e51a714fa03bd1a8933de71cbb6b5.png
  30. BIN
      php/public/storage/uploads/20200615/479b62aaf9451b55ac2ce49d1c2ca1ba.png
  31. BIN
      php/public/storage/uploads/20200615/5b6389239963e7d04d8fc2aa091e9f25.png
  32. BIN
      php/public/storage/uploads/20200615/6425aaa113528b8b7f234c52323f341d.png
  33. BIN
      php/public/storage/uploads/20200615/74bd5da31c97868b3fae5b2d654522e3.png
  34. BIN
      php/public/storage/uploads/20200615/77c92d2563885e46b78d2091dc9e3f0f.png
  35. BIN
      php/public/storage/uploads/20200615/7bb09d66b062b66ac6bb0e6259a777e3.png
  36. BIN
      php/public/storage/uploads/20200615/8fa3e5ad8ef2a1e967dc36cb8860c30c.png
  37. BIN
      php/public/storage/uploads/20200615/98dd7b1af95cae0caab9004d82e5dca6.png
  38. BIN
      php/public/storage/uploads/20200615/a60edf722fc02bd7e9ba2e7094dbe832.png
  39. BIN
      php/public/storage/uploads/20200615/b9db5395063f8d8d39ce7103ff67e098.png
  40. BIN
      php/public/storage/uploads/20200615/bdfb2744cc8c33efb2afe7499091861f.png
  41. BIN
      php/public/storage/uploads/20200615/d17cf99ab821918502211b5fad54f43a.png
  42. BIN
      php/public/storage/uploads/20200615/db92d3e132de5f0bf28bb064fd6730c7.png
  43. BIN
      php/public/storage/uploads/20200615/e9a90c32605b5c0a77e9e6a81d846fef.png
  44. BIN
      php/public/storage/uploads/20200615/efa475ceb5eead82ed4b7ffc7abfd4bd.png
  45. BIN
      php/public/storage/uploads/20200615/f1bbdd13106df81f5791fb8db4609779.png
  46. BIN
      php/public/storage/uploads/20200615/f52b6aa5900e587c3eb53197397e1fd0.png
  47. BIN
      php/public/storage/uploads/20200615/f925148781e1bf5285b2642d2adf4d6f.png
  48. BIN
      php/public/storage/uploads/20200615/fe4e2bce686aa754cbd8bf9b5a2fddde.png
  49. BIN
      php/public/storage/uploads/20200616/1448bf247283782080db200f9717dd1d.png
  50. BIN
      php/public/storage/uploads/20200616/462b854779403300ef548ba2ae5f3cee.png
  51. 0 14
      php/runtime/admin/log/202006/10.log
  52. 0 68
      php/runtime/admin/log/202006/15.log
  53. 364 0
      php/runtime/admin/log/202006/18.log
  54. 0 185
      php/runtime/admin/temp/14d50cc59972e0ab82b71f4b5f381353.php
  55. 0 111
      php/runtime/admin/temp/157ad27c00f93a337df4ad6bf5ff3f05.php
  56. 0 149
      php/runtime/admin/temp/193b3c530962981d3a4dc850749aaa8b.php
  57. 14 14
      php/runtime/admin/temp/4873d2c9774aee9f5bbaf0d4b529e2ff.php
  58. 180 0
      php/runtime/admin/temp/492b7ed1ae4d47eebdacd95ef84c73a4.php
  59. 187 0
      php/runtime/admin/temp/67d40489a97bd6c8b7b2927ecc1d4082.php
  60. 233 0
      php/runtime/admin/temp/8bc75152773522fd278829246e541697.php
  61. 0 139
      php/runtime/admin/temp/a5b87fd77913dd9b0ad9dd783203b8ce.php
  62. 307 0
      php/runtime/admin/temp/be7bf232a4fecabce4a8a121c31b6485.php
  63. 0 4
      php/runtime/cache/0b/dc60c1eb9bd2792cd1fa7f85d9c865.php
  64. 0 413
      php/runtime/log/202006/10.log
  65. BIN
      php/runtime/session/sess_15e326ecb6c80749e0fd744c498613f1
  66. 0 0
      php/runtime/session/sess_35795420a89e18257efa53636b4c8eed
  67. 14 7
      php/view/admin/contents/about.html
  68. 88 0
      php/view/admin/contents/configs.html
  69. 138 0
      php/view/admin/contents/quotation.html
  70. 10 4
      php/view/admin/finance/shenhe.html
  71. 1 1
      php/view/admin/index/index.html
  72. 2 2
      php/view/admin/login/index.html
  73. 28 6
      php/view/admin/order/buy.html
  74. 213 0
      php/view/admin/order/personl.html
  75. 12 5
      php/view/admin/order/push.html
  76. 2 1
      php/view/admin/usermanage/index.html
  77. 151 0
      php/view/admin/usermanage/push.html
  78. BIN
      ~$TS系统调整.docx
  79. 3 1
      服务器.txt

BIN
BTS系统调整.docx


BIN
bts.zip


+ 13 - 1
php/adddata.sql

@@ -276,4 +276,16 @@ CREATE TABLE `lm_about`  (
   `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
   `text` text  DEFAULT '' COMMENT '内容',
   PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '关于我们' ROW_FORMAT = Compact;
+) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '关于我们' ROW_FORMAT = Compact;
+
+
+
+DROP TABLE IF EXISTS `lm_quotation`;
+CREATE TABLE `lm_quotation`  (
+  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
+   `day` int (11) not null  DEFAULT '0' COMMENT '星期几',
+   `status` int (1) not null  DEFAULT '0' COMMENT '0 开启中 1 关闭',
+   `stat` int (11) not null  DEFAULT '0' COMMENT '开始时间',
+   `end` int (11) not null  DEFAULT '0' COMMENT '结束时间',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '开盘控制' ROW_FORMAT = Compact;

+ 78 - 0
php/app/admin/controller/Contents.php

@@ -7,6 +7,7 @@ namespace app\admin\controller;
 use app\common\controller\Backend;
 use app\common\model\Notice;
 use app\common\model\Problem;
+use app\common\model\Quotation;
 use think\facade\Db;
 use think\facade\Request;
 use think\facade\View;
@@ -484,4 +485,81 @@ class Contents extends Backend
         View::assign($view);
         return View::fetch();
     }
+
+    public function configs()
+    {
+        if (Request::isPost()){
+            $data = Request::post();
+            foreach ($data as $k=>$v){
+                $res =  Db::name('system')->where('name',$k)->update(['value'=>$v]);
+            }
+            json_result(200,"修改成功",$data);
+        }
+
+        $list = Db::name('system')
+            ->where(["type"=>"sys"])
+            ->field('name,value')
+            ->column('value','name');
+//        var_dump($list["open"]);die();
+
+
+        View::assign('config',json_encode($list));
+        $view = [
+            'info' => $list,
+            'title' => lang('add'),
+        ];
+        View::assign($view);
+        return View::fetch();
+    }
+
+
+    // 开盘控制 第二套
+    public function quotation()
+    {
+        if (Request::isPost()){
+
+            $page=input("page")?:1;
+            $limit=input("limit")?:10;
+            $name=input("name");
+            $where=[];
+            $list=Quotation::where($where)->order("id desc")->paginate(['list_rows' => $limit, 'page' => $page])->each(function ($item) {
+
+                return $item;
+            })->toArray();
+            return  $result = ['code' => 0, 'msg' => lang('get info success'), 'data' => $list['data']?:[], 'count' => $list['total']?:0];
+        }
+
+        return View::fetch();
+
+    }
+
+    // 更新状态
+    public function quotation_update()
+    {
+        $id=input("id");
+        $where["id"]=$id;
+        $quotation=Quotation::where($where)->find();
+        if ($quotation["status"]==1){
+            $update["status"]=0;
+        }else{
+            $update["status"]=1;
+        }
+        Quotation::update($update,$where);
+        json_result(200,"操作成功");
+    }
+
+    // 更新数据
+    public function quotation_update_data()
+    {
+        $id=input("id");
+        $field=input("field");
+        $value=input("value");
+
+        $where["id"]=$id;
+        $update[$field]=$value;
+        Quotation::update($update,$where);
+        json_result(200,"修改成功");
+    }
+    
+    
 }

+ 12 - 6
php/app/admin/controller/Finance.php

@@ -9,6 +9,7 @@
 namespace app\admin\controller;
 
 use app\common\controller\Backend;
+use app\common\controller\Message;
 use app\common\controller\Orde;
 use app\common\model\Bond;
 use app\common\model\GeneralFinance;
@@ -68,11 +69,11 @@ class Finance extends Backend
                 $item["user_name"] = $user->name;
                 $item["add_time"]=date("Y-m-d H:i:s",$item["add_time"]);
                 if ($item["status"]==0){
-                    $item["status"]="审核中";
+                    $item["statuss"]="审核中";
                 }elseif($item["status"]==1){
-                    $item["status"]="已通过";
+                    $item["statuss"]="已通过";
                 }else{
-                    $item["status"]="已拒绝";
+                    $item["statuss"]="已拒绝";
                 }
                 return $item;
 
@@ -88,7 +89,12 @@ class Finance extends Backend
     public function jujue()
     {
         $id=input("id");
+        $GeneralFinance=GeneralFinance::where(["id"=>$id])->find();
+
+        Message::add_message($GeneralFinance->user_id,1,"充值未通过","您充值".$GeneralFinance->money."通证,审核失败");
         GeneralFinance::update(["status"=>2],["id"=>$id]);
+
+
         json_result(200,"设置成功");
     }
 // 充值成功
@@ -98,12 +104,12 @@ class Finance extends Backend
         $bond=GeneralFinance::where(["id"=>$id])->find();
         // 给用户加钱
         $user=\app\common\model\User::where(["id"=>$bond->user_id])->find();
-        $money=$user->money+$bond->actual_money;
+        $money=$user->money+$bond->money;
         \app\common\model\User::update(["money"=>$money],["id"=>$bond->user_id]);
         GeneralFinance::update(["status"=>1],["id"=>$id]);
-
+        Message::add_message($bond->user_id,1,"充值成功","您充值".$bond->money."通证已到账");
         // 添加财务日记
-        Orde::Finance($bond->user_id,"您的充值申请审核通过",$bond->actual_money,0);
+        Orde::Finance($bond->user_id,"您的充值申请审核通过",$bond->money,0);
         json_result(200,"设置成功");
 
     }

+ 74 - 14
php/app/admin/controller/Order.php

@@ -9,8 +9,11 @@
 namespace app\admin\controller;
 
 
+use app\common\controller\Message;
 use app\common\controller\Orde;
 use app\common\model\State;
+use app\common\model\UserMessage;
+use think\facade\Db;
 use think\facade\Request;
 use think\facade\View;
 use app\common\controller\Backend;
@@ -29,15 +32,21 @@ class Order extends Backend
             $page = input("page") ?: 1;
             $limit = input("limit") ?: 10;
             $where = [];
-//            if ($name){
-//                $where["name"]=["like","% $name %"];
-//            }
-            $where["status"]=0;
-            $list = \app\common\model\Order::where($where)->order("id desc")->paginate(["list_row" => $limit, "page" => $page])->each(function ($item) {
-
-                $user = \app\common\model\User::where(["id" => $item["buy_user"]])->field("name")->find();
-                $item["user_name"] = $user->name;
+            if ($name){
+                $where["o.id|u.name|o.buy_user|push_user|u.phone|o.order|o.number|o.enlarge_quota"]=$name;
+            }
+            $where["o.status"]=0;
+            $list = Db::name("order")->alias("o")->where($where)
+                ->join("user u","u.id=o.buy_user")
+                   ->field("o.*,u.name user_name")
+                ->order("o.id desc")->paginate(["list_row" => $limit, "page" => $page])->each(function ($item) {
                 $item["add_time"]=date("Y-m-d H:i:s",$item["add_time"]);
+                if ($item["stat_time"]){
+                    $item["stat_time"]=date("Y-m-d H:i:s",$item["stat_time"]);
+                }
+                if ($item["end_time"]){
+                    $item["end_time"]=date("Y-m-d H:i:s",$item["end_time"]);
+                }
                 switch ($item["status"]){
                     case 0:$item["status"]="未匹配";break;
                     case 1:$item["status"]="已匹配或待支付";break;
@@ -49,7 +58,6 @@ class Order extends Backend
                 if ($item["image"]){
                     $item["image"]=explode(",",$item["image"]);
                 }
-
                 return $item;
 
             })->toArray();
@@ -77,13 +85,28 @@ class Order extends Backend
             $page = input("page") ?: 1;
             $limit = input("limit") ?: 10;
             $where = [];
-            $where[]=["status",">",0];
-            $where[]=["is_admin","=",0];
-            $list = \app\common\model\Order::where($where)->order("status asc,id desc")->paginate(["list_row" => $limit, "page" => $page])->each(function ($item) {
 
-                $user = \app\common\model\User::where(["id" => $item["buy_user"]])->field("name")->find();
-                $item["user_name"] = $user->name;
+            if ($name){
+                $where[]=["o.id|u.name|up.name|o.buy_user|push_user|u.phone|o.order|o.number|o.enlarge_quota","=",$name];
+            }
+            $where[]=["o.status",">",0];
+            $where[]=["o.is_admin","=",0];
+
+            $list = Db::name("order")->alias("o")->where($where)
+                ->join("user u","u.id=o.buy_user","left")
+                ->join("user up","up.id=o.push_user","left")
+                ->field("o.*,u.name user_name,up.name puser_name")
+                ->order("o.status asc,o.id desc")
+            ->paginate(["list_row" => $limit, "page" => $page])->each(function ($item) {
+//                $user = \app\common\model\User::where(["id" => $item["buy_user"]])->field("name")->find();
+//                $item["user_name"] = $user->name;
                 $item["add_time"]=date("Y-m-d H:i:s",$item["add_time"]);
+                if ($item["stat_time"]){
+                    $item["stat_time"]=date("Y-m-d H:i:s",$item["stat_time"]);
+                }
+                if ($item["end_time"]){
+                    $item["end_time"]=date("Y-m-d H:i:s",$item["end_time"]);
+                }
                 switch ($item["status"]){
                     case 0:$item["status"]="未匹配";break;
                     case 1:$item["status"]="已匹配或待支付";break;
@@ -124,6 +147,7 @@ class Order extends Backend
                 $user = \app\common\model\User::where(["id" => $item["user_id"]])->field("name")->find();
                 $item["user_name"] = $user->name;
                 $item["add_time"]=date("Y-m-d H:i:s",$item["add_time"]);
+
                 if ($item["image"]){
                     $item["image"]=explode(",",$item["image"]);
                 }
@@ -158,6 +182,8 @@ class Order extends Backend
         $update["is_admin"]=1;
         $update["stat_time"]=time()+1*3600;
         OrderS::update($update,["id"=>$order_id]);
+        $orders=OrderS::where(["id"=>$order_id])->field("buy_user,number,order")->find();
+        Message::add_message($orders->buy_user,2,"您有新交易","您有新的".$orders['number']."区交易匹配成功,编号【".$orders['order']."】,请在1小时内完成付款。");
         json_result(200,"匹配成功");
     }
 
@@ -176,6 +202,12 @@ class Order extends Backend
                 $user = \app\common\model\User::where(["id" => $item["buy_user"]])->field("name")->find();
                 $item["user_name"] = $user->name;
                 $item["add_time"]=date("Y-m-d H:i:s",$item["add_time"]);
+                if ($item["stat_time"]){
+                    $item["stat_time"]=date("Y-m-d H:i:s",$item["stat_time"]);
+                }
+                if ($item["end_time"]){
+                    $item["end_time"]=date("Y-m-d H:i:s",$item["end_time"]);
+                }
                 switch ($item["status"]){
                     case 0:$item["status"]="未匹配";break;
                     case 1:$item["status"]="已匹配或待支付";break;
@@ -223,8 +255,36 @@ class Order extends Backend
         if ($order->status==3){
             json_result(400,"该订单已经完成或交易失败");
         }
+
         Orde::order_success($order);
         json_result(200,"交易成功");
     }
 
+    // 个人信息
+    public function personl()
+    {
+        if (Request::isPost()) {
+            $data = Request::post();
+            $adminid=input("user_id");
+            $where["user_id"]=$adminid;
+            \app\common\model\UserMessage::update($data,$where);
+
+            json_result(200, "修改成功", $data);
+        }
+
+        $id=input("id");
+        $type=input("type");
+        $hre=input("hre");
+        $where["user_id"]=$id;
+        $code=\app\common\model\UserMessage::where($where)->find();
+        if (!$code){
+            \app\common\model\UserMessage::create($where);
+            $code=\app\common\model\UserMessage::where($where)->find();
+        }
+
+        View::assign("user",$code);
+        View::assign("hre",$hre);
+        return View::fetch();
+    }
+
 }

+ 42 - 0
php/app/admin/controller/Uploads.php

@@ -103,6 +103,48 @@ class Uploads {
         }
     }
 
+
+    /**
+     * 文件上传
+     * @return false|string
+     */
+    public function Uploads_image(){
+        //获取上传文件表单字段名
+        $fileKey = array_keys(request()->file());
+
+        for ($i = 0; $i < count($fileKey); $i++) {
+            //获取表单上传文件
+            $file = request()->file($fileKey[$i]);
+            try {
+                validate($this->uploadValidate)->check(self::objToArray($file));
+                $savename = \think\facade\Filesystem::disk('public')->putFile('uploads', $file);
+                $savename= str_replace('\\', "/",  $savename);
+                $path[] = '/storage/' . $savename;
+            } catch (\think\exception\ValidateException $e) {
+                $path = '';
+                $error = $e->getMessage();
+            }
+        }
+
+        if (!empty($path)) {
+            $result['code'] = 1;
+            //分辨是否截图上传,截图上传只能上传一个,非截图上传可以上传多个
+            if (Request::param('responseType') == 'json') {
+                $result["src"] = $path[0];
+            } else {
+                $result["src"] = $path;
+            }
+            $result["title"] = "";
+            $result['msg'] = lang('upload success');
+            return $result;
+        } else {
+            //上传失败获取错误信息
+            $result['src'] = '';
+            $result['msg'] = $error;
+            $result['code'] = 0;
+            return $result;
+        }
+    }
     /**
      * 文件上传
      * @return false|string

+ 62 - 3
php/app/admin/controller/Usermanage.php

@@ -10,6 +10,7 @@ namespace app\admin\controller;
 
 
 use app\common\controller\Backend;
+use app\common\controller\Message;
 use app\common\controller\Orde;
 use app\common\model\UserLevel;
 use think\facade\Db;
@@ -85,14 +86,18 @@ class Usermanage extends Backend
         $update[$field]=$value;
         User::update($update,$where);
         $status=0;
-        $name="后台充值";
+        $name="系统充值成功";
+
         if ($value<$user[$field]){// 查看账号增加还是减少
-            $name="后台扣除";
+            $name="系统扣除";
             $status=1;
             $moneys= $user[$field]-$value;
+            $content="系统已为您充值$moneys 通证";
         }else{
             $moneys=$value- $user[$field];
+            $content="系统已为您充值$moneys 保证金";
         }
+        Message::add_message($id,1,$name,$content);
 
         // 添加记录
       switch ($field){
@@ -102,7 +107,6 @@ class Usermanage extends Backend
           case "ensure_money":// 保证金
               Orde::bond_finance($id,$name."保证金",$moneys,$status);
               break;
-
           case "push_money":// 可售额度
 //              Orde::bond_finance($id,$name."可售额度",$moneys,$status);
               break;
@@ -307,4 +311,59 @@ class Usermanage extends Backend
         View::assign("user_id",$user_id);
         return View::fetch();
     }
+    /**
+     * 持有订单列表
+     */
+    public function push()
+    {
+        if (Request::isPost()) {
+            $name = input("name");
+            $page = input("page") ?: 1;
+            $limit = input("limit") ?: 10;
+            $where = [];
+            $user_id=input("user_id");
+            $where["buy_user|push_user"]=$user_id;
+//            $where[]=["status",">",0];
+//            $where[]=["is_admin","=",0];
+            $list = \app\common\model\Order::where($where)->order("status asc,id desc")->paginate(["list_row" => $limit, "page" => $page])->each(function ($item) use ($user_id) {
+
+                $user = \app\common\model\User::where(["id" => $item["buy_user"]])->field("name")->find();
+                $item["user_name"] = $user->name;
+                $item["add_time"]=date("Y-m-d H:i:s",$item["add_time"]);
+                if ($item["stat_time"]){
+                    $item["stat_time"]=date("Y-m-d H:i:s",$item["stat_time"]);
+                }
+                if ($item["end_time"]){
+                    $item["end_time"]=date("Y-m-d H:i:s",$item["end_time"]);
+                }
+                switch ($item["status"]){
+                    case 0:$item["status"]="未匹配";break;
+                    case 1:$item["status"]="已匹配或待支付";break;
+                    case 2:$item["status"]="已上传数据";break;
+                    case 3:$item["status"]="已完成";break;
+                    case 4:$item["status"]="已撤销";break;
+                    case 5:$item["status"]="交易失败";break;
+                }
+                $item["biaoshu"]="";
+                if ($user_id==$item["buy_user"]){
+                    $item["biaoshu"]="购买";
+                }elseif($user_id==$item["push_user"]){
+                    $item["biaoshu"]="卖出";
+                }
+
+                if ($item["image"]){
+                    $item["image"]=explode(",",$item["image"]);
+                }
+                return $item;
+
+            })->toArray();
+
+            return $result = ['code' => 0, 'msg' => lang('get info success'), 'data' => $list['data'] ?: [], 'count' => $list['total'] ?: 0];
+        }
+
+        $user_id=input("user_id");
+        View::assign("user_id",$user_id);
+        return View::fetch();
+    }
+
 }

+ 24 - 1
php/app/common.php

@@ -197,7 +197,6 @@ if (!function_exists("json_result")){
      * @param $data
      */
     function json_result($code=200,$msg="",$data=""){
-
         $dat["code"]=$code;
         $dat["msg"]=$msg;
         $dat["data"]=$data;
@@ -368,4 +367,28 @@ function sortArr($arrays,$sort_key,$sort_order=SORT_ASC,$sort_type=SORT_NUMERIC
     return $arrays;
 }
 
+//生成流水号
+function getordernum(){
+    //生成24位唯一流水号码,格式:YYYY-MMDD-HHII-SS-NNNN,NNNN-CC,其中:YYYY=年份,MM=月份,DD=日期,HH=24格式小时,II=分,SS=秒,NNNNNNNN=随机数,CC=检查码
+
+    @date_default_timezone_set("PRC");
+    //日期
+    $order_date = date('Y-m-d');
+
+    //流水号码主体(YYYYMMDDHHIISSNNNNNNNN)
+    $order_id_main = date('YmdHis') . rand(10000000,99999999);
+
+    //流水号码主体长度
+    $order_id_len = strlen($order_id_main);
+    $order_id_sum = 0;
+
+    for($i=0; $i<$order_id_len; $i++){
+        $order_id_sum += (int)(substr($order_id_main,$i,1));
+    }
+
+    //唯一流水号码(YYYYMMDDHHIISSNNNNNNNNCC)
+    $order_id = $order_id_main . str_pad((100 - $order_id_sum % 100) % 100,2,'0',STR_PAD_LEFT);
+    return $order_id;
+}
+
 

+ 28 - 0
php/app/common/controller/Message.php

@@ -0,0 +1,28 @@
+<?php
+/**
+ *
+ * User: anyluck
+ * Date: 2020/6/18
+ * Time: 10:12
+ */
+
+namespace app\common\controller;
+
+
+class Message
+{
+  // 全局消息通知
+
+
+    // 添加系统消息
+    public static function add_message($user_id,$type,$name,$content)
+    {
+        $add["user_id"]=$user_id;
+        $add["type"]=$type;
+        $add["name"]=$name;
+        $add["content"]=$content;
+        $add["add_time"]=time();
+        $add["status"]=0;
+        \app\common\model\Message::create($add);
+    }
+}

+ 14 - 8
php/app/common/controller/Orde.php

@@ -30,7 +30,7 @@ class Orde
     public static function push_order($user, $order_id, $push_user_id, $order, $count_order, $sxf_money = 0)
     {
         // 修改订单信息
-
+        Message::add_message($order->buy_user,2,"您有新交易","您有新的".$order["number"]."区交易匹配成功,编号【".$order["order"]."】,请在1小时内完成付款");
 //减去账号通证 和可售额度
         if ($count_order + 1 == 5) {
             $money = $user->money - $order->out_game;// 通行证
@@ -100,19 +100,20 @@ class Orde
 
 
     // 保证金操作
-    public static function bond_transfer($user, $user_id, $money, $ensure_money, $type)
+    public static function bond_transfer($user, $user_id, $money, $type)
     {
 
         if ($type == 0) {//0 充值 1 提现
-            $money = $user->money - $money;// 通证
-            $ensure_moneys = $user->ensure_money + $ensure_money;// 加保证金
-            User::update(["money" => $money, "ensure_money" => $ensure_moneys], ["id" => $user_id]);
+            $moneys = $user->money - $money;// 通证
+            $ensure_moneys = $user->ensure_money + $money;// 加保证金
+
+            User::update(["money" => $moneys, "ensure_money" => $ensure_moneys], ["id" => $user_id]);
             // 添加财务记录
             self::Finance($user_id, "保证金充值", $money, 1);
             self::bond_finance($user_id, "保证金充值", $money, 0);
         } else {
+            $ensure_moneys = $user->ensure_money - $money;// 加保证金
             $money = $user->money + $money;// 通证
-            $ensure_moneys = $user->ensure_money - $ensure_money;// 加保证金
             User::update(["money" => $money, "ensure_money" => $ensure_moneys], ["id" => $user_id]);
             // 添加财务记录
             self::Finance($user_id, "保证金提现", $money, 0);
@@ -143,6 +144,9 @@ class Orde
     // 订单失败处理,全局使用
     public static function order_fail($msg, $order)
     {
+        Message::add_message($order->buy_user,2,"交易关闭","您在".$order->number."区的订单,编号【".$order->order."】,交易关闭。关闭原因".$msg);
+        Message::add_message($order->push_user,2,"交易关闭","您在".$order->number."区的订单,编号【".$order->order."】,交易关闭。关闭原因".$msg);
+
         // 查找交易区块
         $mining = Mining::where(["id" => $order->mining_id])->find();
         // 扣除买入人的违约金
@@ -163,7 +167,8 @@ class Orde
         // 添加记录
         self::Finance($order->push_user, "交易失败退回手续费", $order->sxf_money, 0);
         self::Finance($order->push_user, "交易失败获得违约金", $ensure_money, 0);
-
+        Message::add_message($order->buy_user,2,"您有交易违约行为","您在".$order->number."区的订单,编号【".$order->order."】,交易违约。关闭原因".$msg."将从您的账户扣除".$ensure_money."保证金");
+        Message::add_message($order->push_user,2,"交易关闭","您在".$order->number."区的订单,编号【".$order->order."】,交易关闭。关闭原因".$msg."您将获得".$ensure_money."违约金作为补偿");
         // 更新订单状态
         $where_order["id"] = $order->id;
         $update_order["msg"] = $msg;
@@ -180,7 +185,8 @@ class Orde
      */
     public static function order_success($order)
     {
-
+        Message::add_message($order->buy_user,2,"交易完成","您在".$order->number."区的订单,编号【".$order->order."】,交易完成");
+        Message::add_message($order->push_user,2,"交易完成","您在".$order->number."区的订单,编号【".$order->order."】,交易完成");
         // 更新订单状态
         $update_order["status"]=3;
         $update_order["end_time"]=time();

+ 11 - 38
php/app/common/controller/Upfile.php

@@ -9,38 +9,16 @@
 namespace app\common\controller;
 
 
+use app\BaseController;
 use think\facade\Request;
 use lemo\helper\DataHelper;
 class Upfile
 {
 
     //上传验证规则
-    protected $uploadValidate = [
-        'image' => 'filesize:102400|fileExt:jpg,png,gif,jpeg,rar,zip,avi,mp4,rmvb,3gp,flv,mp3,txt,doc,xls,ppt,pdf,xls,docx,xlsx,doc,wmv'
+    protected  $uploadValidate = [
+        'image' => 'filesize:102400|fileExt:jpg,png,gif,jpeg,rar,zip,avi,mp4,rmvb,3gp,flv,mp3,txt,doc,xls,ppt,pdf,xls,docx,xlsx,doc'
     ];
-    protected $imageValidate = [
-        'image' => 'filesize:10240|fileExt:jpg,png,gif,jpeg,bmp,svg,wmv'
-
-    ];
-    protected $videoValidate = [
-        'file' => 'filesize:10240|avi,rmvb,3gp,flv,mp4,wmv'
-
-    ];
-    protected $voiceValidate = [
-        'file' => 'filesize:2048|mp3,wma,wav,amr,wmv'
-
-    ];
-
-    public function initialize()
-
-    {
-        $fileExt = getConfigByCode('upload_file_type');
-        $filemax = getConfigByCode('upload_file_max') * 1024;
-        $this->uploadValidate = ['image' =>
-            'filesize' . $filemax . '|' . $fileExt,
-        ];
-        parent::initialize(); // TODO: Change the autogenerated stub
-    }
 
     // TODO 文件类处理
 
@@ -48,41 +26,36 @@ class Upfile
      * 文件上传
      * @return false|string
      */
-    public function Uploads()
+    public  function Uploadss()
     {
-        //获取上传文件表单字段名
         $fileKey = array_keys(request()->file());
-
+        $error="";
         for ($i = 0; $i < count($fileKey); $i++) {
             //获取表单上传文件
             $file = request()->file($fileKey[$i]);
             try {
                 validate($this->uploadValidate)->check(DataHelper::objToArray($file));
                 $savename = \think\facade\Filesystem::disk('public')->putFile('uploads', $file);
-                $savename = str_replace('\\', "/", $savename);
+                $savename= str_replace('\\', "/",  $savename);
                 $path[] = '/storage/' . $savename;
             } catch (\think\exception\ValidateException $e) {
                 $path = '';
                 $error = $e->getMessage();
             }
         }
-
         if (!empty($path)) {
             $result['code'] = 1;
-            //分辨是否截图上传,截图上传只能上传一个,非截图上传可以上传多个
-            if (Request::param('responseType') == 'json') {
-                $result["url"] = $path[0];
-            } else {
-                $result["url"] = $path;
-            }
+            $result["url"] = $path[0];
             $result['msg'] = lang('upload success');
-            return $result;
+            json_result(1,"",$result);
         } else {
             //上传失败获取错误信息
             $result['url'] = '';
             $result['msg'] = $error;
             $result['code'] = 0;
-            return $result;
+//            return $result;
+            json_result(1,"",$result);
         }
     }
+
 }

+ 17 - 0
php/app/common/model/Quotation.php

@@ -0,0 +1,17 @@
+<?php
+/**
+ *
+ * User: anyluck
+ * Date: 2020/6/18
+ * Time: 13:53
+ */
+
+namespace app\common\model;
+
+
+use think\Model;
+
+class Quotation extends Model
+{
+
+}

+ 8 - 1
php/app/middleware.php

@@ -1,5 +1,9 @@
 <?php
 
+if( $_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
+    exit;
+}
+
 return [
     // 全局请求缓存 验证码会报错不显示,千万不要释放注释
     // \think\middleware\CheckRequestCache::class,
@@ -8,11 +12,14 @@ return [
     // Session初始化 //
      \think\middleware\SessionInit::class,
     // 跨域请求支持
-    \think\middleware\AllowCrossDomain::class,
+
 
 //    \think\middleware\FormTokenCheck::class,
 // 访问限制
 //    \think\middleware\Throttle::class,
 
     \think\addons\middleware\Addons::class,
+
+
+//    \think\middleware\AllowCrossDomain::class,
 ];

+ 1 - 0
php/app/web/controller/Index.php

@@ -128,6 +128,7 @@ class Index extends Base
         $where_user["id"]=$order->push_user;
         $user=User::where($where_user)->find();
         $content="您的订单买家已经打款请前去查看";
+        \app\common\controller\Message::add_message($order->push_user,2,"买家已付款","您在".$order->number."区的订单,编号【".$order->order."】,买家已付款,请审核");
 //dump($user);die();
         Order::update(["image"=>$image,"status"=>2],$where);
         if ($user->phone){

+ 49 - 23
php/app/web/controller/Login.php

@@ -15,6 +15,7 @@ use app\common\model\PhoneCode;
 use app\common\model\System;
 use app\common\model\User;
 use app\web\model\Mail;
+use app\web\model\Orders;
 use app\web\model\Send;
 use app\web\model\Team;
 use app\web\model\Tripartite;
@@ -27,11 +28,11 @@ class Login
     // 登录
     public function in_login()
     {
-        $phone = input("phone");
-        if (!$phone) json_result(400, "请输入手机号码或者邮箱账号");
-        $pwd = input("pwd");
+        $phone = trim(input("phone"));
+        if (!$phone) json_result(400, "请输入账号");
+        $pwd = trim(input("pwd"));
         if (!$pwd) json_result(400, "请输入登录密码");
-        $where["phone|mail"] = $phone;
+        $where["name"] = $phone;
         $user = User::where($where)->find();
         if (!$user) {
             json_result(400, "账号不存在");
@@ -56,7 +57,7 @@ class Login
     // 获取验证码
     public function code()
     {
-        $phone = input("phone");
+        $phone = trim(input("phone"));
         if (!$phone) json_result(400, "请输入手机号或者邮箱");
         $type = input("type") ?: 0;
 
@@ -75,24 +76,38 @@ class Login
     // 注册
     public function register()
     {
-        $phone = input("phone");
+        $phone = trim(input("phone"));
         if (!$phone) json_result(400, "请输入手机号或者邮箱");
-        $code = input("code");
+        $code = trim(input("code"));
         if (!$code) json_result(400, "请输入验证码");
-        $name = input("name");
-        if (!$name) json_result(400, "请输入账户呢称");
+        $name = trim(input("name"));
+        if (!$name) json_result(400, "请输入账户");
         $type = input("type") ?: 0;
-        $pwd = input("pwd");
+        $pwd = trim(input("pwd"));
         if (!$pwd) json_result(400, "请输入密码");
-        $pid = input("pid");
+        $pid = trim(input("pid"));
+
+
 
         // 查看账号是存在
+       $user_data= User::where(["name"=>$name])->find();
+
+       if ($user_data){
+           json_result(400,"账号已存在,请重新选一个名字吧");
+       }
+
         $where["phone|mail"] = $phone;
-        $user = User::where($where)->find();
-        if ($user) {
-            json_result(400, "账号已注册,请前去登录");
+
+        $user = User::where($where)->count();
+
+       $phone_email= Orders::phone_email();
+//        json_result(400, "验证码错误",$phone_email);
+        if ($user>=$phone_email) {
+            json_result(400, "账号手机号或邮箱已经注册超过".$phone_email);
         }
 
+
+
         // 验证码
         $phone_code = Tripartite::push_code($phone);
         if ($phone_code != $code) {
@@ -131,14 +146,15 @@ class Login
     // 忘记密码 第一部
     public function forget_password()
     {
-        $phone = input("phone");
+        $phone = trim(input("phone"));
         if (!$phone) json_result(400, "请输入手机号码或者邮箱");
         $type = input("type") ?: 0;
-        $code = input("code");
+        $code = trim(input("code"));
         if (!$code) json_result(400, "请输入验证码");
-        $name = input("name");
+        $name = trim(input("name"));
         // 查看账号是存在
-        $where["phone|mail"] = $phone;
+//        $where["phone|mail"] = $phone;
+        $where["name"] = $name;
         $user = User::where($where)->find();
         if (!$user) {
             json_result(400, "账号不存在");
@@ -154,9 +170,9 @@ class Login
     // 修改密码--第二步
     public function update_password()
     {
-        $pwd = input("pwd");
+        $pwd = trim(input("pwd"));
         if (!$pwd) json_result(400, "请输入密码");
-        $phone = input("phone");
+        $phone = trim(input("phone"));
         if (!$phone) json_result(400, "请输入手机号码或者邮箱");
         // 查看账号是存在
         $where["phone|mail"] = $phone;
@@ -172,9 +188,18 @@ class Login
     // 上传图片
     public function up_image()
     {
-        $upfile = new Upfile();
-        $ret = $upfile->Uploads();
-        json_result(200, "", $ret["url"]);
+//        json_result(200,"eqweqw");
+
+//        header('Control-type:image/*');
+//        header('Origin:*');
+//        header("Access-Control-Allow-Origin: *");
+//        header("Accept:Application/json, text/plain, */*");
+//        header("Access-Control-Allow-Methods:POST,GET");
+//        header("Access-Control-Allow-Headers:x-requested-with,content-type");
+//        header("Content-type:text/json;multipart/form-data;charset=utf-8");
+
+       \app\web\model\Upfile::Uploadss();
+//        json_result(200, "", $ret["url"]);
     }
 
     // 会员协议
@@ -182,6 +207,7 @@ class Login
     {
         $where["name"]="Membership";
         $data=System::where($where)->field("value")->find();
+
         json_result(200,"",$data->value?:"");
 
     }

+ 98 - 17
php/app/web/controller/My.php

@@ -25,6 +25,7 @@ use app\common\model\User;
 use app\common\model\UserLevel;
 use app\common\model\UserMessage;
 use app\common\model\VendibilityFinance;
+use app\web\model\Orders;
 use app\web\model\Team;
 use app\web\model\Tripartite;
 use think\facade\Db;
@@ -72,10 +73,18 @@ class My extends Base
 // 更新手机号码
     public function update_phone()
     {
-        $phone = input("phone");
+        $phone = trim(input("phone"));
         if (!$phone) json_result(400, "请输入手机号");
-        $code = input("code");
+        $code = trim(input("code"));
         if (!$code) json_result(400, "请输入验证码");
+
+        $wheres["phone|mail"] = $phone;
+        $user = User::where($wheres)->count();
+        $phone_email= Orders::phone_email();
+        if ($user>=$phone_email) {
+            json_result(400, "账号手机号或邮箱已经注册超过".$phone_email);
+        }
+
         $rest = Tripartite::push_code($phone, 0);
         if ($rest != $code) {
             json_result(400, "验证码错误");
@@ -89,14 +98,23 @@ class My extends Base
 // 更新邮箱
     public function update_mail()
     {
-        $phone = input("mail");
+        $phone = trim(input("mail"));
         if (!$phone) json_result(400, "请输入邮箱");
-        $code = input("code");
+        $code =trim(input("code"));
         if (!$code) json_result(400, "请输入验证码");
+
+        $wheres["phone|mail"] = $phone;
+        $user = User::where($wheres)->count();
+        $phone_email= Orders::phone_email();
+        if ($user>=$phone_email) {
+            json_result(400, "账号手机号或邮箱已经注册超过".$phone_email);
+        }
+
         $rest = Tripartite::push_code($phone, 1);
         if ($rest != $code) {
             json_result(400, "验证码错误");
         }
+
         $where["id"] = $this->user_id;
         $update["mail"] = $phone;
         User::update($update, $where);
@@ -123,13 +141,13 @@ class My extends Base
     {
         $id = input("id");
         if (!$id) json_result(400, "请上传更新id");
-        $data["phone"] = input("phone");
-        $data["name"] = input("name");
-        $data["bank_name"] = input("bank_name");
-        $data["bank_number"] = input("bank_number");
-        $data["bank_branch"] = input("bank_branch");
-        $data["ali_pay"] = input("ali_pay");
-        $data["wx_pay"] = input("wx_pay");
+        $data["phone"] = trim(input("phone"));
+        $data["name"] = trim(input("name"));
+        $data["bank_name"] =trim(input("bank_name"));
+        $data["bank_number"] = trim(input("bank_number"));
+        $data["bank_branch"] = trim(input("bank_branch"));
+        $data["ali_pay"] = trim(input("ali_pay"));
+        $data["wx_pay"] =trim( input("wx_pay"));
         $data["ali_pay_image"] = input("ali_pay_image");
         $data["wx_pay_image"] = input("wx_pay_image");
         $where["id"] = $id;
@@ -149,6 +167,13 @@ class My extends Base
         $data["notice"] = $notice?:new \ArrayObject();
         $data["message_jiaoyi"] = $message_jiaoyi?:new \ArrayObject();
         $data["message_zijin"] = $message_zijin?:new \ArrayObject();
+        $notice_count=Message::where(["type" => 0,"user_id"=>$this->user_id])->count();
+        $message_jiaoyi_count=Message::where(["type" => 2,"user_id"=>$this->user_id])->count();
+        $message_zijin_count=Message::where(["type" =>1,"user_id"=>$this->user_id])->count();
+
+        $data["notice_count"]=$notice_count;
+        $data["message_jiaoyi_count"]=$message_jiaoyi_count;
+        $data["message_zijin_count"]=$message_zijin_count;
         json_result(200, "", $data);
     }
 
@@ -219,9 +244,9 @@ class My extends Base
     public function update_pwd()
     {
 //        $phone=input("phone");// 系统内置手机号或邮件
-        $yuan = input("ypwd");
+        $yuan = trim(input("ypwd"));
         if (!$yuan) json_result(400, "请输入原密码");
-        $pwd = input("pwd");
+        $pwd =trim( input("pwd"));
         if (!$pwd) json_result(400, "请输入新密码");
         $where["id"] = $this->user_id;
         $update["pwd"] = password_hash($pwd, PASSWORD_DEFAULT);;
@@ -348,7 +373,7 @@ class My extends Base
             }
         }
         // 直接转账操作
-        Orde::bond_transfer($this->user,$this->user_id,$money,$this->user->ensure_money,$type);
+        Orde::bond_transfer($this->user,$this->user_id,$money,$type);
         // 添加记录
         $add["money"]=$money;
         $add["type"]=$type;
@@ -363,14 +388,34 @@ class My extends Base
     public function general()
     {
         $money=input("money");
-        $actual_money=input("actual_money");
-        $charge_money=input("charge_money");
+        $actual_moneys=input("actual_money");
+        $charge_moneys=input("charge_money");
+        $image=input("image");
+
+        $where["level"]=$this->user["vip_level"];
+        $level=UserLevel::where($where)->find();
+
+        $vip_bili=$level->bili;
+        $actual_money=$money;
+        $charge_money=0;
+        if ($vip_bili){
+            $charge_money=$money*($vip_bili/100);
+            $actual_money-=$charge_money;
+        }
+
+        if ($actual_money!=$actual_moneys){
+            json_result(400,"实际到账金额计算错误");
+        }
+        if ($charge_money!=$charge_moneys){
+            json_result(400,"优惠金额计算错误");
+        }
 
         $add["money"]=$money;
         $add["user_id"]=$this->user_id;
         $add["actual_money"]=$actual_money;
         $add["charge_money"]=$charge_money;
         $add["status"]=0;
+        $add["image"]=$image;
         $add["add_time"]=time();
         GeneralFinance::create($add);
         // 添加转账操作
@@ -378,6 +423,8 @@ class My extends Base
         json_result(200,"申请成功");
     }
 
+
+
     //通证转账
     public function general_transfer()
     {
@@ -386,7 +433,7 @@ class My extends Base
         if ($money>$this->user->money){
             json_result(400,"账号通证余额不足");
         }
-        $where["phone|mail"]=$account;
+        $where["name|uuid"]=$account;
         $user=User::where($where)->find();
         if (!$user){
             json_result(200,"账号不存在");
@@ -406,6 +453,7 @@ class My extends Base
         $jmoney=$this->user["money"]-$money;
         $name=$this->user["name"];
         Orde::transfer($this->user_id,$user->id,$money,$jmoney,$name);
+        \app\common\controller\Message::add_message($user->id,1,"好友转账","您的好友".$this->user['name'].",已为您转账".$money."通证");
         json_result(200,"转账成功");
     }
 
@@ -443,4 +491,37 @@ class My extends Base
         json_result(200,"",$data);
     }
 
+    // 设置性别
+    public function update_sex()
+    {
+        $sex=input("sex");
+        $where["id"]=$this->user_id;
+        $update["sex"]=$sex;
+        User::update($update,$where);
+        json_result(200,"设置成功");
+    }
+
+    // 获取二维码和推广码
+    public function code_url()
+    {
+        $where["name"]="register_url";
+        $url=System::where($where)->value("value");
+        $data["code"]=$this->user["code"];
+        $data["url"]=$url;
+        json_result(200,"",$data);
+    }
+
+    // 更新紧急联系人信息
+    public function urgent_user()
+    {
+        $urgent_name=trim(input("urgent_name"));
+        $urgent_phone=trim(input("urgent_phone"));
+        $where["id"]=$this->user_id;
+        $update["urgent_name"]=$urgent_name;
+        $update["urgent_phone"]=$urgent_phone;
+        User::update($update,$where);
+        json_result(200,"操作成功");
+    }
+
+
 }

+ 60 - 0
php/app/web/controller/Text.php

@@ -0,0 +1,60 @@
+<?php
+/**
+ *
+ * User: anyluck
+ * Date: 2020/6/15
+ * Time: 17:38
+ */
+
+namespace app\web\controller;
+use OSS\Core\OssException;
+use OSS\OssClient;
+use think\Config;
+
+use think\Image;
+
+class Text
+{
+//    public function config()
+//    {
+//        $config = [ 'KeyId'      => 'LTAI4GL7qTQwwU87nMsmAKmU',  //Access Key ID
+//            'KeySecret'  => '9ma10M1M3AgKjMSrYiMf5DgKr4jvWr',  //Access Key Secret
+//            'Endpoint'   => 'oss-cn-beijing.aliyuncs.com',  //阿里云oss 外网地址endpoint
+//            'Bucket'     => 'jiangnanmeiren',  //Bucket名称
+//        ];
+//
+//        return $config;
+//    }
+//    public function uploadFile($file)
+//    {
+//        $resResult = Image::open($file);
+//        // 尝试执行
+//        try {
+//            $config = $this->config(); //获取Oss的配置
+//            //实例化对象 将配置传入
+//            $ossClient = new OssClient($config['KeyId'], $config['KeySecret'], $config['Endpoint']);
+//            //这里是有sha1加密 生成文件名 之后连接上后缀
+//            $fileName = sha1(date('YmdHis', time()) . uniqid()) . '.' . $resResult->type();
+//            //执行阿里云上传
+//            $result = $ossClient->uploadFile($config['Bucket'], $fileName, $file->getInfo()['tmp_name']);
+//        } catch (OssException $e) {
+//            return $e->getMessage();
+//        }
+//        //将结果输出
+//        return $result['info']['url'];
+//    }
+//    public function upimage()
+//    {
+//
+//        json_result(200,"");
+//        $file = request()->file('image');
+//
+//        $data=$this->uploadFile($file);
+//
+//    }
+
+    public function days()
+    {
+        dump(date("w"));
+    }
+}

+ 4 - 3
php/app/web/model/Mail.php

@@ -46,10 +46,11 @@ class Mail
 //                }
             }
 
-
-            echo 'Message has been sent';
+            return 1;
+//            echo 'Message has been sent';
         } catch (\Exception $e) {
-            echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
+            return $mail->ErrorInfo;
+//            echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
         }
     }
 }

+ 55 - 12
php/app/web/model/Orders.php

@@ -13,6 +13,8 @@ use app\common\controller\Orde;
 use app\common\model\Mining;
 use app\common\model\Order;
 use app\common\model\OrderFrequency;
+use app\common\model\Quotation;
+use app\common\model\System;
 use app\common\model\User;
 use app\common\model\UserMessage;
 use app\common\model\VendibilityFinance;
@@ -48,7 +50,7 @@ class Orders
         }
 
         if ($num){//交易区块 大小
-            $where[]=["num","=",$num];
+            $where[]=["number","=",$num];
         }
         switch ($status){
             case 1:// 进行中的
@@ -89,6 +91,27 @@ class Orders
             ->column('value','name');
         return $list;
  }
+    // 开盘控制
+    public static function open_systems()
+    {
+        $day=date("w");
+        $day=(int)$day;
+        if ($day==0){
+            $day=7;
+        }
+        $where["id"]=$day;
+
+        $quer=Quotation::where($where)->find();
+        if ($quer["status"]==1){
+            json_result(400,"已经关盘,请等待开盘");
+        }
+        $now=date("H");
+        if ($quer["stat"]>$now||$quer["end"]<$now){
+            json_result(400,"开盘时间是".$quer["stat"]."点到".$quer["end"]."点");
+        }
+        return true;
+    }
+
 
 
     /** 买入和卖出
@@ -109,15 +132,15 @@ class Orders
             json_result(400,"请完善收账信息");
         }
         if ($type==0){// 直接卖出 更新原有数据
-            $open_system=self::open_system();
-            // 查看是否是否开盘
-            if (!$open_system["open"]){
-                json_result(400,"已经关盘,请等待开盘");
-            }
-            $now=date("H");
-            if ($open_system["open_start"]>$now||$open_system["open_end"]<$now){
-                json_result(400,"开盘时间是".$open_system["open_start"]."点到".$open_system["open_end"]."点");
-            }
+            $open_system=self::open_systems();
+//            // 查看是否是否开盘
+//            if (!$open_system["open"]){
+//                json_result(400,"已经关盘,请等待开盘");
+//            }
+//            $now=date("H");
+//            if ($open_system["open_start"]>$now||$open_system["open_end"]<$now){
+//                json_result(400,"开盘时间是".$open_system["open_start"]."点到".$open_system["open_end"]."点");
+//            }
 
 
             $where["id"]=$qit_id;
@@ -178,6 +201,14 @@ class Orders
 
 
         }else{// 下单买入
+
+            if (!$user["phone"]){
+                json_result(310,"请绑定手机号码");
+            }
+            if (!$user["urgent_name"]||!$user["urgent_phone"]){
+                json_result(320,"请完善紧急联系人");
+            }
+
             $where_ming["id"]=$ming_id;
             $mining=Mining::where($where_ming)->find();
             if (!$mining){
@@ -210,8 +241,10 @@ class Orders
 //                json_result(400,"当前账号通证不足");
 //            }
 
-            $uuid = Uuid::uuid4(time());
-            $order =  $uuid->getHex();
+//            $uuid = Uuid::uuid4(time());
+//            $order =  $uuid->getHex();
+            $order=getordernum();
+
             $add["type"]=0;
             $add["buy_user"]=$user_id;
             $add["push_user"]="";
@@ -309,6 +342,16 @@ class Orders
         Orde::order_fail($msg,$order);
         json_result(200,"处理成功");
     }
+//手机号和邮箱注册次数
+    public static function phone_email()
+    {
+        $phone_email=System::where(["name"=>"phone_email"])->value("value");
+        if ($phone_email){
+            return $phone_email;
+        }else{
+            return 1;
+        }
+    }
 
     /** 减去账号余额 或添加 并加加记录
      * @param $user_id 用户

+ 63 - 0
php/app/web/model/Upfile.php

@@ -0,0 +1,63 @@
+<?php
+/**
+ *
+ * User: anyluck
+ * Date: 2020/4/17
+ * Time: 9:56
+ */
+
+namespace app\web\model;
+
+
+use app\BaseController;
+use think\facade\Request;
+use lemo\helper\DataHelper;
+class Upfile
+{
+
+    //上传验证规则
+    protected static $uploadValidate = [
+        'image' => 'filesize:102400|fileExt:jpg,png,gif,jpeg,rar,zip,avi,mp4,rmvb,3gp,flv,mp3,txt,doc,xls,ppt,pdf,xls,docx,xlsx,doc'
+    ];
+
+    // TODO 文件类处理
+
+    /**
+     * 文件上传
+     * @return false|string
+     */
+    public static function Uploadss()
+    {
+
+        $fileKey = array_keys(request()->file());
+
+        $error="";
+        for ($i = 0; $i < count($fileKey); $i++) {
+            //获取表单上传文件
+            $file = request()->file($fileKey[$i]);
+            try {
+                validate(self::$uploadValidate)->check(DataHelper::objToArray($file));
+                $savename = \think\facade\Filesystem::disk('public')->putFile('uploads', $file);
+                $savename= str_replace('\\', "/",  $savename);
+                $path[] = '/storage/' . $savename;
+            } catch (\think\exception\ValidateException $e) {
+                $path = '';
+                $error = $e->getMessage();
+            }
+        }
+        if (!empty($path)) {
+            $result['code'] = 1;
+            $result["url"] = $path[0];
+            $result['msg'] = lang('upload success');
+            json_result(200,"",$result);
+        } else {
+            //上传失败获取错误信息
+            $result['url'] = '';
+            $result['msg'] = $error;
+            $result['code'] = 0;
+//            return $result;
+            json_result(200,"",$result);
+        }
+    }
+
+}

+ 1 - 0
php/app/worker/controller/User.php

@@ -66,6 +66,7 @@ class User
             ->where(["type"=>"fb"])
             ->field('name,value')
             ->column('value','name');
+
         if ($list["fbkg"]){// 开启了自动
             // 查询当前未交易数量
             $count=Order::where(["status"=>0])->count();

+ 7 - 0
php/public/index.php

@@ -48,6 +48,13 @@ if ($cur_time - $_SESSION['last_time'] < $seconds) {
 }
 
 
+header('Control-type:image/*');
+header("Access-Control-Allow-Origin: *");
+header("Access-Control-Allow-Methods:POST,GET");
+header("Access-Control-Allow-Headers:x-requested-with,content-type");
+header("Content-type:text/json;charset=utf-8");
+
+
 require __DIR__ . '/../vendor/autoload.php';
 define("app_paths", __DIR__ . "/../");
 define('APP_PATHS', __DIR__ . '/../app/');

BIN
php/public/storage/uploads/20200615/07557fe43561157531e9f356046de104.png


BIN
php/public/storage/uploads/20200615/10af3f79448940125a65d72b31d12a1e.png


BIN
php/public/storage/uploads/20200615/19dab13c89d5a3aceb8b8afb8de39fda.png


BIN
php/public/storage/uploads/20200615/2faa32200d968f66829f1066f19b1a40.png


BIN
php/public/storage/uploads/20200615/44f7f4aa8e5387d8bc2734ba541f8078.png


BIN
php/public/storage/uploads/20200615/473e51a714fa03bd1a8933de71cbb6b5.png


BIN
php/public/storage/uploads/20200615/479b62aaf9451b55ac2ce49d1c2ca1ba.png


BIN
php/public/storage/uploads/20200615/5b6389239963e7d04d8fc2aa091e9f25.png


BIN
php/public/storage/uploads/20200615/6425aaa113528b8b7f234c52323f341d.png


BIN
php/public/storage/uploads/20200615/74bd5da31c97868b3fae5b2d654522e3.png


BIN
php/public/storage/uploads/20200615/77c92d2563885e46b78d2091dc9e3f0f.png


BIN
php/public/storage/uploads/20200615/7bb09d66b062b66ac6bb0e6259a777e3.png


BIN
php/public/storage/uploads/20200615/8fa3e5ad8ef2a1e967dc36cb8860c30c.png


BIN
php/public/storage/uploads/20200615/98dd7b1af95cae0caab9004d82e5dca6.png


BIN
php/public/storage/uploads/20200615/a60edf722fc02bd7e9ba2e7094dbe832.png


BIN
php/public/storage/uploads/20200615/b9db5395063f8d8d39ce7103ff67e098.png


BIN
php/public/storage/uploads/20200615/bdfb2744cc8c33efb2afe7499091861f.png


BIN
php/public/storage/uploads/20200615/d17cf99ab821918502211b5fad54f43a.png


BIN
php/public/storage/uploads/20200615/db92d3e132de5f0bf28bb064fd6730c7.png


BIN
php/public/storage/uploads/20200615/e9a90c32605b5c0a77e9e6a81d846fef.png


BIN
php/public/storage/uploads/20200615/efa475ceb5eead82ed4b7ffc7abfd4bd.png


BIN
php/public/storage/uploads/20200615/f1bbdd13106df81f5791fb8db4609779.png


BIN
php/public/storage/uploads/20200615/f52b6aa5900e587c3eb53197397e1fd0.png


BIN
php/public/storage/uploads/20200615/f925148781e1bf5285b2642d2adf4d6f.png


BIN
php/public/storage/uploads/20200615/fe4e2bce686aa754cbd8bf9b5a2fddde.png


BIN
php/public/storage/uploads/20200616/1448bf247283782080db200f9717dd1d.png


BIN
php/public/storage/uploads/20200616/462b854779403300ef548ba2ae5f3cee.png


+ 0 - 14
php/runtime/admin/log/202006/10.log

@@ -1,14 +0,0 @@
-[2020-06-10T09:59:30+08:00][sql] CONNECT:[ UseTime:0.186372s ] mysql:host=120.78.128.100;port=3306;dbname=test;charset=utf8
-[2020-06-10T09:59:30+08:00][sql] SHOW FULL COLUMNS FROM `lm_auth_rule` [ RunTime:0.124745s ]
-[2020-06-10T09:59:30+08:00][sql] SELECT `href`,`href` FROM `lm_auth_rule` [ RunTime:0.124658s ]
-[2020-06-10T09:59:31+08:00][sql] CONNECT:[ UseTime:0.196306s ] mysql:host=120.78.128.100;port=3306;dbname=test;charset=utf8
-[2020-06-10T09:59:31+08:00][sql] SHOW FULL COLUMNS FROM `lm_auth_rule` [ RunTime:0.132154s ]
-[2020-06-10T09:59:31+08:00][sql] SELECT `href`,`href` FROM `lm_auth_rule` [ RunTime:0.122100s ]
-[2020-06-10T09:59:31+08:00][sql] SELECT * FROM `lm_auth_rule` WHERE  `href` = 'contents/fb' LIMIT 1 [ RunTime:0.122624s ]
-[2020-06-10T09:59:31+08:00][sql] SHOW FULL COLUMNS FROM `lm_admin_log` [ RunTime:0.122902s ]
-[2020-06-10T09:59:31+08:00][sql] INSERT INTO `lm_admin_log` SET `log_title` = '自动发币管理' , `log_content` = '点击菜单' , `log_url` = '/admin/contents/fb.html' , `admin_id` = 1 , `username` = 'admin' , `log_agent` = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36' , `log_ip` = '127.0.0.1' , `create_time` = 1591754371 , `update_time` = 1591754371 [ RunTime:0.123728s ]
-[2020-06-10T09:59:31+08:00][sql] SHOW FULL COLUMNS FROM `lm_system` [ RunTime:0.124554s ]
-[2020-06-10T09:59:31+08:00][sql] SELECT `name`,`value` FROM `lm_system` WHERE  `type` = 'fb' [ RunTime:0.123357s ]
-[2020-06-10T14:03:59+08:00][sql] CONNECT:[ UseTime:0.123888s ] mysql:host=120.26.179.166;port=3306;dbname=bts;charset=utf8
-[2020-06-10T14:03:59+08:00][sql] SHOW FULL COLUMNS FROM `lm_auth_rule` [ RunTime:0.084442s ]
-[2020-06-10T14:03:59+08:00][sql] SELECT `href`,`href` FROM `lm_auth_rule` [ RunTime:0.082645s ]

File diff suppressed because it is too large
+ 0 - 68
php/runtime/admin/log/202006/15.log


File diff suppressed because it is too large
+ 364 - 0
php/runtime/admin/log/202006/18.log


+ 0 - 185
php/runtime/admin/temp/14d50cc59972e0ab82b71f4b5f381353.php

@@ -1,185 +0,0 @@
-<?php /*a:1:{s:58:"D:\phpstudy_pro\WWW\cxy\bts\php\view\admin\index\main.html";i:1590993415;}*/ ?>
-<!DOCTYPE html>
-<html>
-<head>
-    <meta charset="utf-8">
-    <title>主页面</title>
-    <meta name="renderer" content="webkit">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-    <link rel="stylesheet" href="/static/plugins/font-awesome-4.7.0/css/font-awesome.min.css" media="all">
-    <link rel="stylesheet" href="/static/admin/css/main.css" media="all">
-    <link rel="stylesheet" href="/static/plugins/layui/css/layui.css" media="all">
-    <!--<style>-->
-        <!--.layui-card {border:1px solid #f2f2f2;border-radius:5px;}-->
-        <!--.icon {margin-right:10px;color:#1aa094;}-->
-        <!--.icon-cray {color:#ffb800!important;}-->
-        <!--.icon-blue {color:#1e9fff!important;}-->
-        <!--.icon-tip {color:#ff5722!important;}-->
-        <!--.LM-qiuck-module {text-align:center;margin-top: 10px}-->
-        <!--.LM-qiuck-module a i {display:inline-block;width:100%;height:60px;line-height:60px;text-align:center;border-radius:2px;font-size:30px;background-color:#F8F8F8;color:#333;transition:all .3s;-webkit-transition:all .3s;}-->
-        <!--.LM-qiuck-module a cite {position:relative;top:2px;display:block;color:#666;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:14px;}-->
-        <!--.welcome-module {width:100%;height:210px;}-->
-        <!--.panel {background-color:#fff;border:1px solid transparent;border-radius:3px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}-->
-        <!--.panel-body {padding:10px}-->
-        <!--.panel-title {margin-top:0;margin-bottom:0;font-size:12px;color:inherit}-->
-        <!--.label {display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em;margin-top: .3em;}-->
-        <!--.layui-red {color:red}-->
-        <!--.main_btn > p {height:40px;}-->
-        <!--.layui-bg-number {background-color:#F8F8F8;}-->
-        <!--.LM-notice:hover {background:#f6f6f6;}-->
-        <!--.LM-notice {padding:7px 16px;clear:both;font-size:12px !important;cursor:pointer;position:relative;transition:background 0.2s ease-in-out;}-->
-        <!--.LM-notice-title,.LM-notice-label {-->
-            <!--padding-right: 70px !important;text-overflow:ellipsis!important;overflow:hidden!important;white-space:nowrap!important;}-->
-        <!--.LM-notice-title {line-height:28px;font-size:14px;}-->
-        <!--.LM-notice-extra {position:absolute;top:50%;margin-top:-8px;right:16px;display:inline-block;height:16px;color:#999;}-->
-    <!--</style>-->
-
-    <style>
-        .center {
-            text-align: center;
-            background-color: #F9F9F9 !important;
-        }
-
-        .boder {
-            border: 1px solid #D2D2D2 !important;
-        }
-
-        .p-size {
-            font-weight: 700;
-            font-size: 20px;
-        }
-        .border-left{
-            border-left-width: 5px;
-            border-left-style: solid;
-        }
-    </style>
-</head>
-<body>
-<div class="LM-container">
-    <div class="LM-main">
-        <div class="layui-row layui-col-space15">
-
-首页
-
-        </div>
-    </div>
-</div>
-<script src="/static/plugins/layui/layui.js" charset="utf-8"></script>
-<script src="/static/plugins/echarts/echarts.min.js" charset="utf-8"></script>
-<script src="/static/plugins/echarts/echarts-theme.js" charset="utf-8"></script>
-<script>
-    // layui.config({
-    //     base: "/static/admin/js/"
-    // }).extend({
-    //     "LM": "LM"
-    // });
-    // layui.use(['layer', 'LM'], function () {
-    //     var $ = layui.jquery,
-    //         layer = layui.layer;
-    //
-    //     /**
-    //      * 查看公告信息
-    //      **/
-    //     $('body').on('click', '.LM-notice', function () {
-    //         var title = $(this).children('.LM-notice-title').text(),
-    //             noticeTime = $(this).children('.LM-notice-extra').text(),
-    //             content = $(this).children('.LM-notice-content').html();
-    //         var html = '<div style="padding:15px 20px; text-align:justify; line-height: 22px;border-bottom:1px solid #e2e2e2;background-color: #2f4056;color: #ffffff">\n' +
-    //             '<div style="text-align: center;margin-bottom: 20px;font-weight: bold;border-bottom:1px solid #718fb5;padding-bottom: 5px"><h4 class="text-danger">' + title + '</h4></div>\n' +
-    //             '<div style="font-size: 12px">' + content + '</div>\n' +
-    //             '</div>\n';
-    //         parent.layer.open({
-    //             type: 1,
-    //             title: '系统公告'+'<span style="float: right;right: 1px;font-size: 12px;color: #b1b3b9;margin-top: 1px">'+noticeTime+'</span>',
-    //             area: '300px;',
-    //             shade: 0.8,
-    //             id: 'LM-notice',
-    //             btn: ['查看', '取消'],
-    //             btnAlign: 'c',
-    //             moveType: 1,
-    //             content:html,
-    //             success: function (layero) {
-    //                 var btn = layero.find('.layui-layer-btn');
-    //                 btn.find('.layui-layer-btn0').attr({
-    //                     href: 'https://github.com/yue909/LEMOCMS',
-    //                     target: '_blank'
-    //                 });
-    //             }
-    //         });
-    //     });
-    //
-    //     /**
-    //      * 报表功能
-    //      */
-    //     var echartsRecords = echarts.init(document.getElementById('echarts-records'), 'walden');
-    //     var optionRecords = {
-    //         tooltip: {
-    //             trigger: 'axis'
-    //         },
-    //         legend: {
-    //             data:['邮件营销','联盟广告','视频广告','直接访问','搜索引擎']
-    //         },
-    //         grid: {
-    //             left: '3%',
-    //             right: '4%',
-    //             bottom: '3%',
-    //             containLabel: true
-    //         },
-    //         toolbox: {
-    //             feature: {
-    //                 saveAsImage: {}
-    //             }
-    //         },
-    //         xAxis: {
-    //             type: 'category',
-    //             boundaryGap: false,
-    //             data: ['周一','周二','周三','周四','周五','周六','周日']
-    //         },
-    //         yAxis: {
-    //             type: 'value'
-    //         },
-    //         series: [
-    //             {
-    //                 name:'邮件营销',
-    //                 type:'line',
-    //                 stack: '总量',
-    //                 data:[120, 132, 101, 134, 90, 230, 210]
-    //             },
-    //             {
-    //                 name:'联盟广告',
-    //                 type:'line',
-    //                 stack: '总量',
-    //                 data:[220, 182, 191, 234, 290, 330, 310]
-    //             },
-    //             {
-    //                 name:'视频广告',
-    //                 type:'line',
-    //                 stack: '总量',
-    //                 data:[150, 232, 201, 154, 190, 330, 410]
-    //             },
-    //             {
-    //                 name:'直接访问',
-    //                 type:'line',
-    //                 stack: '总量',
-    //                 data:[320, 332, 301, 334, 390, 330, 320]
-    //             },
-    //             {
-    //                 name:'搜索引擎',
-    //                 type:'line',
-    //                 stack: '总量',
-    //                 data:[820, 932, 901, 934, 1290, 1330, 1320]
-    //             }
-    //         ]
-    //     };
-    //     echartsRecords.setOption(optionRecords);
-    //
-    //     // echarts 窗口缩放自适应
-    //     window.onresize = function(){
-    //         echartsRecords.resize();
-    //     }
-    //
-    // });
-</script>
-</body>
-</html>

+ 0 - 111
php/runtime/admin/temp/157ad27c00f93a337df4ad6bf5ff3f05.php

@@ -1,111 +0,0 @@
-<?php /*a:1:{s:59:"D:\phpstudy_pro\WWW\cxy\bts\php\view\admin\error\error.html";i:1581911356;}*/ ?>
-<!DOCTYPE html>
-<html>
-<head>
-    <meta charset="UTF-8">
-    <title>404</title>
-    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-    <meta http-equiv="Access-Control-Allow-Origin" content="*">
-    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-    <meta name="apple-mobile-web-app-status-bar-style" content="black">
-    <meta name="apple-mobile-web-app-capable" content="yes">
-    <meta name="format-detection" content="telephone=no">
-    <link rel="stylesheet" href="/static/plugins/layui/css/layui.css" media="all">
-    <style>
-        .error .clip .shadow {height:180px;}
-        .error .clip:nth-of-type(2) .shadow {width:130px;}
-        .error .clip:nth-of-type(1) .shadow,.error .clip:nth-of-type(3) .shadow {width:250px;}
-        .error .digit {width:150px;height:150px;line-height:150px;font-size:120px;font-weight:bold;}
-        .error h2 {font-size:32px;}
-        .error .msg {top:-190px;left:30%;width:80px;height:80px;line-height:80px;font-size:32px;}
-        .error span.triangle {top:70%;right:0%;border-left:20px solid #535353;border-top:15px solid transparent;border-bottom:15px solid transparent;}
-        .error .container-error-404 {top: 50%;margin-top: 250px;position:relative;height:250px;padding-top:40px;}
-        .error .container-error-404 .clip {display:inline-block;transform:skew(-45deg);}
-        .error .clip .shadow {overflow:hidden;}
-        .error .clip:nth-of-type(2) .shadow {overflow:hidden;position:relative;box-shadow:inset 20px 0px 20px -15px rgba(150,150,150,0.8),20px 0px 20px -15px rgba(150,150,150,0.8);}
-        .error .clip:nth-of-type(3) .shadow:after,.error .clip:nth-of-type(1) .shadow:after {content:"";position:absolute;right:-8px;bottom:0px;z-index:9999;height:100%;width:10px;background:linear-gradient(90deg,transparent,rgba(173,173,173,0.8),transparent);border-radius:50%;}
-        .error .clip:nth-of-type(3) .shadow:after {left:-8px;}
-        .error .digit {position:relative;top:8%;color:white;background:#1aa094;border-radius:50%;display:inline-block;transform:skew(45deg);}
-        .error .clip:nth-of-type(2) .digit {left:-10%;}
-        .error .clip:nth-of-type(1) .digit {right:-20%;}
-        .error .clip:nth-of-type(3) .digit {left:-20%;}
-        .error h2 {font-size:24px;color:#A2A2A2;font-weight:bold;padding-bottom:20px;}
-        .error .tohome {font-size:16px;color:#07B3F9;}
-        .error .msg {position:relative;z-index:9999;display:block;background:#535353;color:#A2A2A2;border-radius:50%;font-style:italic;}
-        .error .triangle {position:absolute;z-index:999;transform:rotate(45deg);content:"";width:0;height:0;}
-        @media(max-width:767px) {.error .clip .shadow {height:100px;}
-            .error .clip:nth-of-type(2) .shadow {width:80px;}
-            .error .clip:nth-of-type(1) .shadow,.error .clip:nth-of-type(3) .shadow {width:100px;}
-            .error .digit {width:80px;height:80px;line-height:80px;font-size:52px;}
-            .error h2 {font-size:18px;}
-            .error .msg {top:-110px;left:15%;width:40px;height:40px;line-height:40px;font-size:18px;}
-            .error span.triangle {top:70%;right:-3%;border-left:10px solid #535353;border-top:8px solid transparent;border-bottom:8px solid transparent;}
-            .error .container-error-404 {height:150px;}
-        }
-    </style>
-</head>
-<body>
-<div class="error">
-    <div class="container-floud">
-        <div style="text-align: center">
-            <div class="container-error-404">
-                <div class="clip">
-                    <div class="shadow">
-                        <span class="digit thirdDigit"></span>
-                    </div>
-                </div>
-                <div class="clip">
-                    <div class="shadow">
-                        <span class="digit secondDigit"></span>
-                    </div>
-                </div>
-                <div class="clip">
-                    <div class="shadow">
-                        <span class="digit firstDigit"></span>
-                    </div>
-                </div>
-                <div class="msg">OH!
-                    <span class="triangle"></span>
-                </div>
-            </div>
-            <h2 class="h1">很抱歉,你访问的页面找不到了</h2>
-        </div>
-    </div>
-</div>
-<script src="/static/plugins/layui/layui.js" charset="utf-8"></script>
-<script>
-    function randomNum() {
-        return Math.floor(Math.random() * 9) + 1;
-    }
-
-    var loop1, loop2, loop3, time = 30, i = 0, number;
-    loop3 = setInterval(function () {
-        if (i > 40) {
-            clearInterval(loop3);
-            document.querySelector('.thirdDigit').textContent = 4;
-        } else {
-            document.querySelector('.thirdDigit').textContent = randomNum();
-            i++;
-        }
-    }, time);
-    loop2 = setInterval(function () {
-        if (i > 80) {
-            clearInterval(loop2);
-            document.querySelector('.secondDigit').textContent = 0;
-        } else {
-            document.querySelector('.secondDigit').textContent = randomNum();
-            i++;
-        }
-    }, time);
-    loop1 = setInterval(function () {
-        if (i > 100) {
-            clearInterval(loop1);
-            document.querySelector('.firstDigit').textContent = 4;
-        } else {
-            document.querySelector('.firstDigit').textContent = randomNum();
-            i++;
-        }
-    }, time);
-</script>
-</body>
-</html>

+ 0 - 149
php/runtime/admin/temp/193b3c530962981d3a4dc850749aaa8b.php

@@ -1,149 +0,0 @@
-<?php /*a:1:{s:59:"D:\phpstudy_pro\WWW\cxy\bts\php\view\admin\login\index.html";i:1591593521;}*/ ?>
-<!DOCTYPE html>
-<html>
-<head>
-    <meta charset="UTF-8">
-    <title><?php echo site_name(); ?>后台管理-登陆</title>
-    <meta name="keywords" content="thinkphp6,thinkphp,layui,easywechat框架,框架,组件">
-    <meta name="description" content="是一款采用 layui开发的极简后台管理框架 基于thinkphp6 ,easywechat,开发的cms后台管理系统,thinkphp,yii2,cms,php后台管理系统,cms,cms系统,restful api,thinkphp后台管理系统">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-    <meta http-equiv="Access-Control-Allow-Origin" content="*">
-    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-    <meta name="apple-mobile-web-app-status-bar-style" content="black">
-    <meta name="apple-mobile-web-app-capable" content="yes">
-    <meta name="format-detection" content="telephone=no">
-    <link rel="stylesheet" href="/static/plugins/layui/css/layui.css" media="all">
-    <!--[if lt IE 9]>
-    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
-    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
-    <![endif]-->
-    <style>
-        html, body {width: 100%;height: 100%;overflow: hidden}
-        body {background: #000;}
-        body:after {content:'';background-repeat:no-repeat;background-size:cover;-webkit-filter:blur(3px);-moz-filter:blur(3px);-o-filter:blur(3px);-ms-filter:blur(3px);filter:blur(3px);position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;}
-        .layui-container {width: 100%;height: 100%;overflow: hidden;}
-        .admin-login-background {width:360px;height:300px;position:absolute;left:50%;top:40%;margin-left:-180px;margin-top:-100px;}
-        .logo-title {text-align:center;letter-spacing:2px;padding:14px 0;}
-        .logo-title h1 {color:#009688;font-size:25px;font-weight:bold;}
-        .login-form {background-color:#fff;border:1px solid #fff;border-radius:3px;padding:14px 20px;box-shadow:0 0 8px #eeeeee;}
-        .login-form .layui-form-item {position:relative;}
-        .login-form .layui-form-item label {position:absolute;left:1px;top:1px;width:38px;line-height:36px;text-align:center;color:#d2d2d2;}
-        .login-form .layui-form-item input {padding-left:36px;}
-        .captcha {width:60%;display:inline-block;}
-        .captcha-img {display:inline-block;width:34%;float:right;}
-        .captcha-img img {height:34px;border:1px solid #e6e6e6;height:36px;width:100%;}
-        .copyright{font-size:12px;color: #ccc; text-align: center;}
-        @media screen  and (max-width: 320px) {
-            .admin-login-background {
-                width:300px;
-                left: 59%;
-            }
-        }
-
-    </style>
-</head>
-<body>
-<div id="canvas"></div>
-<div class="layui-container">
-    <div class="admin-login-background">
-        <div class="layui-form login-form">
-            <form class="layui-form" action="">
-                <div class="layui-form-item logo-title">
-                    <h1><?php echo site_name(); ?>管理后台</h1>
-                </div>
-                <div class="layui-form-item">
-                    <label class="layui-icon layui-icon-username" for="username"></label>
-                    <input type="text" name="username" lay-verify="required|account" placeholder="用户名或者邮箱" autocomplete="off" class="layui-input" value="">
-                </div>
-                <div class="layui-form-item">
-                    <label class="layui-icon layui-icon-password" for="password"></label>
-                    <input type="password" name="password" lay-verify="required|password" placeholder="密码" autocomplete="off" class="layui-input" value="">
-                </div>
-                <div class="layui-form-item">
-                    <label class="layui-icon layui-icon-vercode" for="captcha"></label>
-                    <input type="text" name="captcha" lay-verify="required|captcha" placeholder="图形验证码" autocomplete="off" class="layui-input verification captcha" value="">
-                    <div class="captcha-img">
-                        <img  id="captchaPic" src="<?php echo url('verify'); ?>?<?php echo time(); ?>" alt="captcha" onclick="this.src='<?php echo url("verify"); ?>?'+'id='+Math.random()"/>
-                    </div>
-                </div>
-                <div class="layui-form-item">
-                    <input type="checkbox" name="rememberMe" checked value="true" lay-skin="primary" title="记住密码">
-                    <input type="checkbox" name="daili"  value="true" lay-skin="primary" title="代理商登录">
-                </div>
-
-                <div class="layui-form-item">
-                    <button class="layui-btn layui-btn-fluid" lay-submit="" lay-filter="login">登 入</button>
-                </div>
-                <div class="copyright">
-                    © 2009-<?php echo date("Y");?> <a href="http://quyum.com" target="_blank">千翼科技</a> All Rights Reserved.
-                </div>
-            </form>
-        </div>
-    </div>
-</div>
-<script src="/static/plugins/jquery-3.4.1/jquery-3.4.1.min.js" charset="utf-8"></script>
-<script src="/static/plugins/layui/layui.js" charset="utf-8"></script>
-<script src="/static/plugins/firework/firework.js" charset="utf-8"></script>
-<script>
-    layui.use(['form'], function () {
-        var form = layui.form,
-            layer = layui.layer;
-        // 登录过期的时候,跳出ifram框架
-        if (top.location != self.location) top.location = self.location;
-
-        // 粒子线条背景
-        $(document).ready(function(){
-
-                $("#canvas").fireworks({
-                    width: "100%",
-                    height: "100%"
-                });
-
-        });
-
-        // 进行登录操作
-        form.on('submit(login)', function (data) {
-            data = data.field;
-
-            if (data.username == '') {
-                layer.msg('用户名不能为空');
-                return false;
-            }
-            if (data.password == '') {
-                layer.msg('密码不能为空');
-                return false;
-            }
-            if (data.captcha == '') {
-                layer.msg('验证码不能为空');
-                return false;
-            }
-
-            $.ajax({
-
-                method:'post',
-                data:data,
-                success:function (res) {
-                    if(res.code>0){
-                        layer.msg(res.msg, function () {
-                            window.location = "<?php echo url('index/index'); ?>";
-                        });
-                    }else{
-                        layer.msg(res.msg);
-                        $('#captchaPic').attr('src','<?php echo url("verify"); ?>?id='+Math.random());
-                        return false;
-                    }
-
-                },fail:function (res) {
-                    layer.msg(res.msg, function () {
-                        $('#captchaPic').attr('src','<?php echo url("verify"); ?>?id='+Math.random());
-                        return false;
-                    });
-                }
-            });
-
-            return false;
-        });
-    });
-</script>
-</body>
-</html>

+ 14 - 14
php/runtime/admin/temp/4873d2c9774aee9f5bbaf0d4b529e2ff.php

@@ -1,4 +1,4 @@
-<?php /*a:3:{s:59:"D:\phpstudy_pro\WWW\cxy\bts\php\view\admin\contents\fb.html";i:1591754262;s:61:"D:\phpstudy_pro\WWW\cxy\bts\php\view\admin\common\header.html";i:1591579556;s:61:"D:\phpstudy_pro\WWW\cxy\bts\php\view\admin\common\footer.html";i:1591579556;}*/ ?>
+<?php /*a:3:{s:62:"D:\phpstudy_pro\WWW\cxy\bts\php\view\admin\contents\opens.html";i:1591669434;s:61:"D:\phpstudy_pro\WWW\cxy\bts\php\view\admin\common\header.html";i:1591579556;s:61:"D:\phpstudy_pro\WWW\cxy\bts\php\view\admin\common\footer.html";i:1591579556;}*/ ?>
 <!DOCTYPE html>
 <html>
 <head>
@@ -27,30 +27,30 @@
             <!--<input type="hidden" name="id" id="id">-->
 
             <div class="layui-form-item">
-                <label class="layui-form-label">自动发币</label>
+                <label class="layui-form-label">开盘开关</label>
                 <div class="layui-input-block">
-                    <input type="checkbox" name="fbkg" lay-skin="switch" lay-text="ON|OFF">
+                    <input type="checkbox" name="open" lay-skin="switch" lay-text="ON|OFF">
                 </div>
             </div>
 
 
             <div class="layui-form-item">
-                <label class="layui-form-label">发币比例</label>
+                <label class="layui-form-label">开盘时间</label>
                 <div class="layui-input-inline">
-                    <input type="number" name="fbsamll" lay-verify="required" class="layui-input">
+                    <input type="number" name="open_start" lay-verify="required" class="layui-input">
                 </div>
                 <div class="layui-form-mid layui-word-aux">
-                    发币比例开始
+                    时间格式 如下午2点  写成14
                 </div>
             </div>
 
             <div class="layui-form-item">
-                <label class="layui-form-label">发币比例</label>
+                <label class="layui-form-label">闭盘时间</label>
                 <div class="layui-input-inline">
-                    <input type="number" name="fbbig" lay-verify="required" class="layui-input">
+                    <input type="number" name="open_end" lay-verify="required" class="layui-input">
                 </div>
                 <div class="layui-form-mid layui-word-aux">
-                    发币比例结束
+                    时间格式 如下午2点  写成14
                 </div>
             </div>
 
@@ -76,11 +76,11 @@
         var config = <?php echo $config; ?>;
 
         console.log("config",config)
-        // //日期范围
-        // laydate.render({
-        //     elem: '#date'
-        //     ,range: true
-        // });
+        //日期范围
+        laydate.render({
+            elem: '#date'
+            ,range: true
+        });
 
         form.val("form", config);
             console.log("config",config["open"])

+ 180 - 0
php/runtime/admin/temp/492b7ed1ae4d47eebdacd95ef84c73a4.php

@@ -0,0 +1,180 @@
+<?php /*a:3:{s:58:"D:\phpstudy_pro\WWW\cxy\bts\php\view\admin\order\push.html";i:1592445904;s:61:"D:\phpstudy_pro\WWW\cxy\bts\php\view\admin\common\header.html";i:1591579556;s:61:"D:\phpstudy_pro\WWW\cxy\bts\php\view\admin\common\footer.html";i:1591579556;}*/ ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <title><?php echo config('admin.sys_name'); ?>后台管理</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+    <meta name="apple-mobile-web-app-status-bar-style" content="black">
+    <meta name="apple-mobile-web-app-capable" content="yes">
+    <meta name="format-detection" content="telephone=no">
+    <link rel="stylesheet" href="/static/plugins/layui/css/layui.css" media="all" />
+    <link rel="stylesheet" href="/static/admin/css/main.css?v=<?php echo time(); ?>" media="all">
+    <link rel="stylesheet" href="/static/plugins/font-awesome-4.7.0/css/font-awesome.min.css" media="all">
+
+    <style id="LM-bg-color">
+    </style>
+
+</head>
+<style>
+    .upload-wrap {
+        position: relative;
+        display: inline-block;
+        overflow: hidden;
+        border: 1px solid #2d78f4;
+        border-radius: 3px;
+    }
+
+    .upload-wrap .file-ele {
+        position: absolute;
+        top: 0;
+        right: 0;
+        opacity: 0;
+        height: 100%;
+        width: 100%;
+        cursor: pointer;
+    }
+
+    .upload-wrap .file-open {
+        width: 90px;
+        height: 30px;
+        line-height: 30px;
+        text-align: center;
+        color: #fff;
+        background: #3385ff;
+    }
+
+</style>
+<div class="LM-container">
+    <div class="LM-main">
+        <fieldset class="layui-elem-field layui-field-title">
+            <legend>交易订单列表</legend>
+            <blockquote class="layui-elem-quote">
+                <div class="LM-table">
+                    <div class="layui-inline">
+                        <input type="text" id='name' name="name" lay-verify="required" placeholder="搜索关键字" autocomplete="off" class="layui-input">
+                    </div>
+                    <a href="javascript:;" class="layui-btn data-add-btn layui-btn-sm" lay-submit="" lay-filter="add"
+                       id="search">
+                        <?php echo lang('search'); ?>
+                    </a>
+                </div>
+
+            </blockquote>
+
+        </fieldset>
+
+        <table class="layui-table" id="list" lay-filter="list">
+
+        </table>
+    </div>
+</div>
+
+<script type="text/html" id="image">
+
+    {{# layui.each(d.image, function(index, item){ }}
+    <img src="/static/admin/images/image.gif"   onmouseover="layer.tips('<img src={{item}}>',this,{tips: [1, '#fff']});" onmouseout="layer.closeAll();">
+    {{# });
+    }}
+</script>
+<script type="text/html" id="barDemo">
+    <a href="<?php echo url('personl'); ?>?hre=push&id={{d.buy_user}}" class="layui-btn layui-btn-xs" >购买用户信息</a>
+    <a href="<?php echo url('personl'); ?>?hre=push&id={{d.push_user}}" class="layui-btn layui-btn-xs" >卖出用户信息</a>
+</script>
+<script src="/static/plugins/layui/layui.js" charset="utf-8"></script>
+<script src="/static/plugins/jquery-3.4.1/jquery-3.4.1.min.js"></script>
+<script src="/static/plugins/jquery-3.4.1/jquery-3.4.1.min.js"></script>
+<script>
+
+    layui.use(['form', 'table'], function () {
+        var $ = layui.jquery,
+            form = layui.form,
+            table = layui.table;
+
+        var tableIn = table.render({
+            elem: '#list',
+            url: '<?php echo url("push"); ?>',
+            method: 'post',
+            title: '反馈意见',
+            loading: true,
+            toolbar: '#toolbar', //开启头部工具栏,并为其绑定左侧模板
+
+            defaultToolbar: ['filter', 'exports', 'print', "excel", { //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可
+                title: '提示'
+                , layEvent: 'LAYTABLE_TIPS'
+                , icon: 'layui-icon-tips'
+            }],
+            cols: [[
+                // {checkbox: true, fixed: true},
+                {field: 'id', title: 'ID', width: 20, fixed: true, sort: true},
+                {field: 'buy_user', title: '购买用户id', width: 80, sort: true},
+                {field: 'push_user', title: '卖出用户id', width: 80, sort: true},
+                {field: 'user_name', title: '购买用户', width: 120, sort: true},
+                {field: 'puser_name', title: '卖出用户', width: 120, sort: true},
+                {field: 'number', title: '发布数量', width: 80, sort: true},
+                {field: 'enlarge_quota', title: '放大额度', width: 80, sort: true},
+                {field: 'order', title: '订单编号', width: 100, sort: true},
+                {field: 'add_time', title: '添加时间', width: 150, sort: true},
+                {field: 'stat_time', title: '未支付结束时间', width: 150, sort: true},
+                {field: 'end_time', title: '完成时间', width: 150, sort: true},
+                {field: 'msg', title: '失败原因', width: 150, sort: true},
+                {field: 'image', title: '凭证', width: 150, templet: '#image'},
+                {field: 'status', title: '订单状态', width: 150, sort: true},
+                {title: '操作', width: 350, align: "center", toolbar: "#barDemo"},
+            ]],
+            limits: [10, 15, 20, 25, 50, 100],
+            limit: 10,
+            page: true
+        });
+
+
+        table.on('tool(list)', function (obj) {
+            var data = obj.data;
+            let event = obj.event;
+            switch (event) {
+                case "check":
+                    layer.confirm('确定要进行这样的操作码', function (index) {
+                        loading = layer.load(1, {shade: [0.1, '#fff']});
+                        $.post("<?php echo url('status'); ?>", {id: data.id}, function (res) {
+                            layer.close(loading);
+                            layer.close(index);
+                            if (res.code == 1) {
+                                layer.msg(res.msg, {time: 1000, icon: 1});
+                                tableIn.reload();
+                            } else {
+                                layer.msg(res.msg, {time: 1000, icon: 2});
+                            }
+                        }, "json")
+                    })
+                    break;
+            }
+
+
+        });
+
+        form.on('switch(status)', function (data) {
+
+        });
+
+        $('#search').click(function () {
+            var $keys = $('#name').val();
+            if (!$keys) {
+                return layer.msg('请输入关键词');
+            }
+
+            tableIn.reload({page: {page: 1}, where: {name: $keys}});
+
+        })
+        // setInterval(function () {
+        //     tableIn.reload();
+        // }, 50000)
+
+
+
+
+
+    });
+
+</script>

+ 187 - 0
php/runtime/admin/temp/67d40489a97bd6c8b7b2927ecc1d4082.php

@@ -0,0 +1,187 @@
+<?php /*a:3:{s:62:"D:\phpstudy_pro\WWW\cxy\bts\php\view\admin\finance\shenhe.html";i:1592300540;s:61:"D:\phpstudy_pro\WWW\cxy\bts\php\view\admin\common\header.html";i:1591579556;s:61:"D:\phpstudy_pro\WWW\cxy\bts\php\view\admin\common\footer.html";i:1591579556;}*/ ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <title><?php echo config('admin.sys_name'); ?>后台管理</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+    <meta name="apple-mobile-web-app-status-bar-style" content="black">
+    <meta name="apple-mobile-web-app-capable" content="yes">
+    <meta name="format-detection" content="telephone=no">
+    <link rel="stylesheet" href="/static/plugins/layui/css/layui.css" media="all" />
+    <link rel="stylesheet" href="/static/admin/css/main.css?v=<?php echo time(); ?>" media="all">
+    <link rel="stylesheet" href="/static/plugins/font-awesome-4.7.0/css/font-awesome.min.css" media="all">
+
+    <style id="LM-bg-color">
+    </style>
+
+</head>
+<style>
+    .upload-wrap {
+        position: relative;
+        display: inline-block;
+        overflow: hidden;
+        border: 1px solid #2d78f4;
+        border-radius: 3px;
+    }
+
+    .upload-wrap .file-ele {
+        position: absolute;
+        top: 0;
+        right: 0;
+        opacity: 0;
+        height: 100%;
+        width: 100%;
+        cursor: pointer;
+
+    }
+
+    .upload-wrap .file-open {
+        width: 90px;
+        height: 30px;
+        line-height: 30px;
+        text-align: center;
+        color: #fff;
+        background: #3385ff;
+    }
+
+</style>
+<div class="LM-container">
+    <div class="LM-main">
+        <fieldset class="layui-elem-field layui-field-title">
+            <legend>财务统计</legend>
+            <blockquote class="layui-elem-quote">
+                <div class="LM-table">
+
+                </div>
+
+            </blockquote>
+
+        </fieldset>
+
+        <table class="layui-table" id="list" lay-filter="list">
+
+        </table>
+    </div>
+</div>
+
+
+<script type="text/html" id="barDemo">
+
+    {{# if(d.status ===0 ){ }}
+    <input type="button" class="layui-btn layui-btn-xs" lay-event="tongguo" value="审核通过">
+    <input type="button" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="jujue" value="拒绝">
+    {{# }}}
+
+</script>
+<script type="text/html" id="avatar">
+   <img  src="/static/admin/images/image.gif"
+                    onmouseover="layer.tips('<img  src={{d.image}}>',this,{tips: [1, '#fff']});"
+                    onmouseout="layer.closeAll();">
+</script>
+<script src="/static/plugins/layui/layui.js" charset="utf-8"></script>
+<script src="/static/plugins/jquery-3.4.1/jquery-3.4.1.min.js"></script>
+<script src="/static/plugins/jquery-3.4.1/jquery-3.4.1.min.js"></script>
+<script>
+
+    layui.use(['form', 'table'], function () {
+        var $ = layui.jquery,
+            form = layui.form,
+            table = layui.table;
+
+        var tableIn = table.render({
+            elem: '#list',
+            url: '<?php echo url("shenhe"); ?>',
+            method: 'post',
+            title: '反馈意见',
+            loading: true,
+            toolbar: '#toolbar', //开启头部工具栏,并为其绑定左侧模板
+
+            defaultToolbar: ['filter', 'exports', 'print', "excel", { //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可
+                title: '提示'
+                , layEvent: 'LAYTABLE_TIPS'
+                , icon: 'layui-icon-tips'
+            }],
+            cols: [[
+                // {checkbox: true, fixed: true},
+                {field: 'id', title: 'ID', width: 80, fixed: true, sort: true},
+                {field: 'user_id', title: '用户id', width: 120, sort: true},
+                {field: 'user_name', title: '用户', width: 120, sort: true},
+                {field: 'money', title: '充值数量', width: 120, sort: true},
+                {field: 'actual_money', title: '实际充值金额', width: 200, sort: true},
+                {field: 'charge_money', title: '优惠金额', width: 120, sort: true},
+                {field: 'statuss', title: '状态', width:200, sort: true},
+                {field: 'image', title: '上传凭证', width:200, sort: true,templet: "#avatar"},
+                {title: '操作', width: 300, align: "center", toolbar: "#barDemo"},
+            ]],
+            limits: [10, 15, 20, 25, 50, 100],
+            limit: 10,
+            page: true
+        });
+
+
+        table.on('tool(list)', function (obj) {
+            var data = obj.data;
+            let event = obj.event;
+            switch (event) {
+                case "jujue":
+                    layer.confirm('您确定要拒绝吗', function (index) {
+                        loading = layer.load(1, {shade: [0.1, '#fff']});
+                        $.post("<?php echo url('jujue'); ?>", {id: data.id}, function (res) {
+                            layer.close(loading);
+                            layer.close(index);
+                            if (res.code == 200) {
+                                layer.msg(res.msg, {time: 1000, icon: 1});
+                                tableIn.reload();
+                            } else {
+                                layer.msg(res.msg, {time: 1000, icon: 2});
+                            }
+                        }, "json")
+                    })
+                    break;
+                case "tongguo":
+                    // layer.confirm('确定要进行这样的操作码', function (index) {
+                        loading = layer.load(1, {shade: [0.1, '#fff']});
+                        $.post("<?php echo url('czcg'); ?>", {id: data.id}, function (res) {
+                            layer.close(loading);
+                            // layer.close(index);
+                            if (res.code == 200) {
+                                layer.msg(res.msg, {time: 1000, icon: 1});
+                                tableIn.reload();
+                            } else {
+                                layer.msg(res.msg, {time: 1000, icon: 2});
+                            }
+                        }, "json")
+                    // })
+                    break;
+            }
+
+
+        });
+
+        form.on('switch(status)', function (data) {
+
+        });
+
+        $('#search').click(function () {
+            var $keys = $('#name').val();
+            if (!$keys) {
+                return layer.msg('请输入关键词');
+            }
+
+            tableIn.reload({page: {page: 1}, where: {name: $keys}});
+
+        })
+        // setInterval(function () {
+        //     tableIn.reload();
+        // }, 50000)
+
+
+
+
+
+    });
+
+</script>

+ 233 - 0
php/runtime/admin/temp/8bc75152773522fd278829246e541697.php

@@ -0,0 +1,233 @@
+<?php /*a:3:{s:61:"D:\phpstudy_pro\WWW\cxy\bts\php\view\admin\order\personl.html";i:1592445936;s:61:"D:\phpstudy_pro\WWW\cxy\bts\php\view\admin\common\header.html";i:1591579556;s:61:"D:\phpstudy_pro\WWW\cxy\bts\php\view\admin\common\footer.html";i:1591579556;}*/ ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <title><?php echo config('admin.sys_name'); ?>后台管理</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+    <meta name="apple-mobile-web-app-status-bar-style" content="black">
+    <meta name="apple-mobile-web-app-capable" content="yes">
+    <meta name="format-detection" content="telephone=no">
+    <link rel="stylesheet" href="/static/plugins/layui/css/layui.css" media="all" />
+    <link rel="stylesheet" href="/static/admin/css/main.css?v=<?php echo time(); ?>" media="all">
+    <link rel="stylesheet" href="/static/plugins/font-awesome-4.7.0/css/font-awesome.min.css" media="all">
+
+    <style id="LM-bg-color">
+    </style>
+
+</head>
+<div class="LM-container">
+    <div class="LM-main">
+        <fieldset class="layui-elem-field layui-field-title">
+            <blockquote class="layui-elem-quote">
+                <a   href="<?php echo url($hre); ?>"  class="layui-btn  layui-btn-xs" lay-event="update_pwd">返回</a>
+            </blockquote>
+        </fieldset>
+
+        <form class="layui-form layui-form-pane" lay-filter="form">
+            <input type="hidden" name="id" id="id">
+            <div class="layui-form-item">
+                <label class="layui-form-label">手机号</label>
+                <div class="layui-input-inline">
+                    <input type="text"   name="phone"  value="" class="layui-input">
+                </div>
+
+            </div>
+
+            <div class="layui-form-item">
+                <label class="layui-form-label">银行卡持卡人</label>
+                <div class="layui-input-inline">
+                    <input type="text"   name="name"  value="" class="layui-input">
+                </div>
+
+            </div>
+
+            <div class="layui-form-item">
+                <label class="layui-form-label">银行卡名称</label>
+                <div class="layui-input-inline">
+                    <input type="text"  name="bank_name"  value="" class="layui-input">
+                </div>
+
+            </div>
+
+
+            <div class="layui-form-item">
+                <label class="layui-form-label">银行卡号</label>
+                <div class="layui-input-inline">
+                    <input type="text"   name="bank_number"  value="" class="layui-input">
+                </div>
+
+            </div>
+
+            <div class="layui-form-item">
+                <label class="layui-form-label">开户支行</label>
+                <div class="layui-input-inline">
+                    <input type="text"   name="bank_branch"  value="" class="layui-input">
+                </div>
+
+            </div>
+
+            <div class="layui-form-item">
+                <label class="layui-form-label">支付宝账号</label>
+                <div class="layui-input-inline">
+                    <input type="text"   name="ali_pay"  value="" class="layui-input">
+                </div>
+
+            </div>
+
+            <div class="layui-form-item">
+                <label class="layui-form-label">微信账号</label>
+                <div class="layui-input-inline">
+                    <input type="text"   name="wx_pay"  value="" class="layui-input">
+                </div>
+
+            </div>
+
+
+            <div class="layui-form-item">
+                <label class="layui-form-label">支付宝收款码</label>
+                <input type="hidden" name="ali_pay_image" id="logo">
+                <div class="layui-input-block">
+                    <div class="layui-upload">
+                        <button type="button" class="layui-btn layui-btn-primary" id="logoBtn"><i
+                                class="icon icon-upload3"></i><?php echo lang('upload'); ?>
+                        </button>
+                        <div class="layui-upload-list">
+                            <img class="layui-upload-img" id="site_logo">
+                            <p id="demoText"></p>
+                        </div>
+                    </div>
+                </div>
+                <div class="layui-form-mid layui-word-aux">
+                    支付宝收款码
+                </div>
+            </div>
+
+            <div class="layui-form-item">
+                <label class="layui-form-label">微信收款码</label>
+                <input type="hidden" name="wx_pay_image" id="logos">
+                <div class="layui-input-block">
+                    <div class="layui-upload">
+                        <button type="button" class="layui-btn layui-btn-primary" id="logoBtns"><i
+                                class="icon icon-upload3"></i><?php echo lang('upload'); ?>
+                        </button>
+                        <div class="layui-upload-list">
+                            <img class="layui-upload-img" id="site_logos">
+                            <p id="demoTexts"></p>
+                        </div>
+                    </div>
+                </div>
+                <div class="layui-form-mid layui-word-aux">
+                    微信收款码。
+                </div>
+            </div>
+
+
+            <div class="layui-form-item">
+                <div class="layui-input-inline">
+                    <button type="button" class="layui-btn" lay-submit="" lay-filter="submit"><?php echo lang('submit'); ?></button>
+                    <!--<a href="<?php echo url('hlep'); ?>" class="layui-btn layui-btn-primary"><?php echo lang('back'); ?></a>-->
+                </div>
+            </div>
+        </form>
+    </div>
+</div>
+
+<script src="/static/plugins/layui/layui.js" charset="utf-8"></script>
+<script src="/static/plugins/jquery-3.4.1/jquery-3.4.1.min.js"></script>
+
+<script>
+    layui.use(['form', 'layer','upload','laydate'], function () {
+        var form = layui.form, laydate=layui.laydate,layer = layui.layer,$= layui.jquery,upload = layui.upload;
+        var info = '';
+        var config = <?php echo $user; ?>;
+
+        console.log("user",config)
+        //日期范围
+
+        form.val("form", config);
+        $('#site_logo').attr('src',config.ali_pay_image);
+        $('#site_logos').attr('src',config.wx_pay_image);
+        if(info){
+
+        }
+
+        form.render();
+        form.on('submit(submit)', function (data) {
+            console.log("data",data.field)
+            loading =layer.load(1, {shade: [0.1,'#fff']});
+            $.post("", data.field, function (res) {
+                layer.close(loading);
+                if (res.code== 200) {
+                    layer.msg(res.msg, {time: 1800, icon: 1}, function () {
+                        // location.href = res.url;
+                        // location.href = res.url;
+                    });
+                } else {
+                    layer.msg(res.msg, {time: 1800, icon: 2});
+                }
+            },"json");
+
+        });
+
+        //普通图片上传
+        var uploadInst = upload.render({
+            elem: '#logoBtn'
+            ,url: '<?php echo url("uploads/uploads"); ?>'
+            ,before: function(obj){
+                //预读本地文件示例,不支持ie8
+                obj.preview(function(index, file, result){
+                    $('#site_logo').attr('src', result); //图片链接(base64)
+                });
+            }
+            ,done: function(res){
+                //上传成功
+                if(res.code>0){
+                    $('#logo').val(res.url);
+                }else{
+                    //如果上传失败
+                    return layer.msg('上传失败');
+                }
+            }
+            ,error: function(){
+                //演示失败状态,并实现重传
+                var demoText = $('#demoText');
+                demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-mini demo-reload">重试</a>');
+                demoText.find('.demo-reload').on('click', function(){
+                    uploadInst.upload();
+                });
+            }
+        });
+
+        //普通图片上传
+        var uploadInsts = upload.render({
+            elem: '#logoBtns'
+            ,url: '<?php echo url("uploads/uploads"); ?>'
+            ,before: function(obj){
+                //预读本地文件示例,不支持ie8
+                obj.preview(function(index, file, result){
+                    $('#site_logos').attr('src', result); //图片链接(base64)
+                });
+            }
+            ,done: function(res){
+                //上传成功
+                if(res.code>0){
+                    $('#logos').val(res.url);
+                }else{
+                    //如果上传失败
+                    return layer.msg('上传失败');
+                }
+            }
+            ,error: function(){
+                //演示失败状态,并实现重传
+                var demoText = $('#demoTexts');
+                demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-mini demo-reload">重试</a>');
+                demoText.find('.demo-reload').on('click', function(){
+                    uploadInsts.upload();
+                });
+            }
+        });
+    });
+</script>

+ 0 - 139
php/runtime/admin/temp/a5b87fd77913dd9b0ad9dd783203b8ce.php

@@ -1,139 +0,0 @@
-<?php /*a:3:{s:59:"D:\phpstudy_pro\WWW\cxy\bts\php\view\admin\index\index.html";i:1581911356;s:61:"D:\phpstudy_pro\WWW\cxy\bts\php\view\admin\common\header.html";i:1591579556;s:61:"D:\phpstudy_pro\WWW\cxy\bts\php\view\admin\common\footer.html";i:1591579556;}*/ ?>
-<!DOCTYPE html>
-<html>
-<head>
-    <meta charset="utf-8">
-    <title><?php echo config('admin.sys_name'); ?>后台管理</title>
-    <meta name="renderer" content="webkit">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-    <meta name="apple-mobile-web-app-status-bar-style" content="black">
-    <meta name="apple-mobile-web-app-capable" content="yes">
-    <meta name="format-detection" content="telephone=no">
-    <link rel="stylesheet" href="/static/plugins/layui/css/layui.css" media="all" />
-    <link rel="stylesheet" href="/static/admin/css/main.css?v=<?php echo time(); ?>" media="all">
-    <link rel="stylesheet" href="/static/plugins/font-awesome-4.7.0/css/font-awesome.min.css" media="all">
-
-    <style id="LM-bg-color">
-    </style>
-
-</head>
-<link rel="stylesheet" href="/static/admin/css/common.css" media="all">
-
-<body class="layui-layout-body LM-all">
-<div class="layui-layout layui-layout-admin">
-
-    <div class="layui-header header">
-        <div class="layui-logo"><a href="">
-            <img src="<?php echo site_logo(); ?>" alt="lemocms">
-            <h1><?php echo site_name(); ?></h1>
-        </a>
-        </div>
-        <a>
-            <div class="LM-tool"><i title="展开" class="fa fa-outdent" data-side-fold="1"></i></div>
-        </a>
-
-        <!--pc 端-->
-        <ul class="layui-nav layui-layout-left layui-header-menu layui-header-pc-menu mobile layui-hide-xs">
-        </ul>
-            <!--手机端-->
-        <ul class="layui-nav layui-layout-left layui-header-menu mobile layui-hide-sm">
-            <li class="layui-nav-item">
-                <a href="javascript:;"><i class="fa fa-list-ul"></i> 选择模块</a>
-                <dl class="layui-nav-child layui-header-mini-menu">
-                </dl>
-            </li>
-        </ul>
-
-
-        <ul class="layui-nav layui-layout-right">
-            <li class="layui-nav-item">
-                <a href="javascript:;" data-refresh="刷新"><i class="fa fa-refresh"></i></a>
-            </li>
-            <li class="layui-nav-item">
-                <a href="javascript:;" data-clear="清理" data-href="<?php echo url('cleardata'); ?>" class="LM-clear"><i class="fa fa-trash-o"></i></a>
-            </li>
-            <li class="layui-nav-item LM-setting">
-                <a href="javascript:;"><?php echo session('admin.username'); ?></a>
-                <dl class="layui-nav-child">