hrjy 2 years ago
parent
commit
293973bc33

+ 4 - 0
app/admin/model/auction/AuctionProduct.php

@@ -42,6 +42,10 @@ class AuctionProduct extends BaseModel
 
             $model->where('a.id|a.name|u.nickname', 'like','%'.$where['store_name'].'%');
         }
+        if ( trim($where['is_show']) != ''){
+            $where['is_show'] = $where['is_show'] == 2? 0: 1;
+            $model->where('a.is_show', '=',$where['is_show']);
+        }
         if ($where['page'] && $where['limit']){
             $model->page($where['page'], $where['limit']);
         }else{

+ 10 - 0
app/admin/view/auction/auction_product/index.php

@@ -40,6 +40,16 @@
                                     <input type="text" name="store_name" class="layui-input" placeholder="商品名称,编号">
                                 </div>
                             </div>
+                            <div class="layui-inline">
+                                <label class="layui-form-label" style="top: -4.5px">是否挂售</label>
+                                <div class="layui-input-block">
+                                    <select name="is_show">
+                                        <option value="">全部</option>
+                                        <option value="2">未挂售</option>
+                                        <option value="1">已挂售</option>
+                                    </select>
+                                </div>
+                            </div>
                             <div class="layui-inline">
                                 <div class="layui-input-inline">
                                     <button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit="search" lay-filter="search">

+ 4 - 3
app/admin/view/login/index.php

@@ -4,7 +4,7 @@
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta name="robots" content="noindex,nofollow" />
-    <title>登录管理系统 -  Powered by CRMEB!</title>
+    <title>登录管理系统随心购</title>
     <meta name="generator" content="CRMEB! v2.5" />
     <meta name="author" content="CRMEB! Team and CRMEB UI Team" />
     <link href="{__FRAME_PATH}css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
@@ -17,11 +17,12 @@
     </script>
 </head>
 <body class="gray-bg login-bg">
-<canvas id="canvas" width="900" height="300" style="position: fixed;top: -50px;width: 60%;left: 20%"></canvas>
+<!--<canvas id="canvas" width="900" height="300" style="position: fixed;top: -50px;width: 60%;left: 20%"></canvas>-->
 <div class="middle-box text-center loginscreen  animated fadeInDown">
     <div class="login-group">
         <h3 class="login-logo">
-            <img src="{__ADMIN_PATH}images/logo.png">
+<!--            <img src="{__ADMIN_PATH}images/logo.png">-->
+            <img src="">
         </h3>
         <form role="form" action="{:url('verify')}" method="post" id="form" onsubmit="return false">
             <div class="form-group">

+ 3 - 3
app/api/controller/AuthController.php

@@ -190,9 +190,9 @@ class AuthController
      */
     public function register(Request $request)
     {
-        list($account, $captcha, $password, $spread) = UtilService::postMore([['account', ''], ['captcha', ''], ['password', ''], ['spread', 0]], $request, true);
+        list($account, $captcha, $password, $spread, $payment_pas) = UtilService::postMore([['account', ''], ['captcha', ''], ['password', ''], ['spread', 0], ['payment_pas']], $request, true);
         try {
-            validate(RegisterValidates::class)->scene('register')->check(['account' => $account, 'captcha' => $captcha, 'password' => $password]);
+            validate(RegisterValidates::class)->scene('register')->check(['account' => $account, 'captcha' => $captcha, 'password' => $password, 'payment_pas' => $payment_pas]);
         } catch (ValidateException $e) {
             return app('json')->fail($e->getError());
         }
@@ -205,7 +205,7 @@ class AuthController
         if (strlen(trim($password)) < 6 || strlen(trim($password)) > 16)
             return app('json')->fail('密码必须是在6到16位之间');
         if ($password == '123456') return app('json')->fail('密码太过简单,请输入较为复杂的密码');
-        $registerStatus = User::register($account, $password, $spread);
+        $registerStatus = User::register($account, $password, $spread, $payment_pas);
         if ($registerStatus) return app('json')->success('注册成功');
         return app('json')->fail(User::getErrorInfo('注册失败'));
     }

+ 18 - 0
app/api/controller/PublicController.php

@@ -15,6 +15,7 @@ use app\models\user\UserBill;
 use app\models\user\WechatUser;
 use app\Request;
 use crmeb\services\CacheService;
+use crmeb\services\SystemConfigService;
 use crmeb\services\UtilService;
 use crmeb\services\workerman\ChannelService;
 use think\db\exception\DataNotFoundException;
@@ -330,4 +331,21 @@ class PublicController
         return app('json')->successful($list);
     }
 
+
+    /**
+     * 版本更新
+     * @param Request $request
+     * @return void
+     */
+    public function version(Request $request)
+    {
+        $config = SystemConfigService::more(['version', 'apk']);
+        $data = [
+            'version' => $config['version'],
+            'url' =>   $request->domain().'/'.$config['apk']
+        ];
+        return app('json')->success($data);
+
+    }
+
 }

+ 57 - 0
app/api/controller/auction/AuctionOrderController.php

@@ -0,0 +1,57 @@
+<?php
+
+namespace app\api\controller\auction;
+
+
+use app\models\auction\Auction;
+use app\models\auction\AuctionBooking;
+use app\models\auction\AuctionOrder;
+use app\models\auction\AuctionPay;
+use app\models\auction\AuctionSection;
+use app\models\user\User;
+use app\models\user\UserBill;
+use app\Request;
+use Monolog\Handler\Curl\Util;
+use think\facade\Cache;
+use crmeb\services\{
+    CacheService,
+    ExpressService,
+    SystemConfigService
+};
+use crmeb\services\UtilService;
+use crmeb\repositories\OrderRepository;
+use think\facade\Db;
+use think\facade\Validate;
+
+
+class AuctionOrderController
+{
+    /**
+     * 查看是否已竞拍
+     * @param Request $request
+     * @return mixed
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
+     */
+    public function see_order(Request $request)
+    {
+        $data = UtilService::getMore([
+            ['id']
+        ]);
+        $auction = Auction::where('id', $data['id'])->find();
+        if (!$auction) return app('json')->fail('场次不存在');
+        $order = AuctionOrder::where([['auction_id', '=', $auction['id']], ['frequency', '=', $auction['frequency']], ['uid', '=', $request->uid()]])->find();
+        if ($order){
+            $res = [
+                'status' => 1,
+                'order' => $order
+            ];
+        }else{
+            $res = ['status' => 0];
+        }
+        return app('json')->successful($res);
+    }
+
+
+}

+ 24 - 3
app/api/controller/auction/AuctionProductController.php

@@ -35,7 +35,6 @@ class AuctionProductController
         $section = AuctionSection::where('id', $data['s_id'])->find();
         $price = (float)SystemConfigService::get('product_hanging_price');
         $pro = AuctionProduct::where('hanging_price', '>=', $section['low'])->where('hanging_price','<=','high')->select()->toArray();
-
         if (empty($pro) and ($price < $section['low'] or $price > $section['high'])) {
             return app('json')->fail('该区间没有商品');
         }
@@ -49,7 +48,6 @@ class AuctionProductController
         if ($orderCount >= $pds) return app('json')->fail('商品已买完');
 
 
-
         $show = AuctionProduct::random($data['id'], $request->uid(),$section);
         if ($show == 'false')  return app('json')->fail('购买失败');
         return app('json')->successful($show);
@@ -127,8 +125,11 @@ class AuctionProductController
     public function zfpay(Request $request)
     {
         $data = UtilService::postMore([
-            ['order_id']
+            ['order_id'],
+            ['pas']
         ]);
+        if (empty($data['pas'])) return app('json')->fail('请填写支付密码');
+        if ($request->user()['payment_pas'] != $data['pas']) return app('json')->fail('支付密码不正确');
         $model = new User();
         $order = AuctionOrder::where('order_id', $data['order_id'])->find();
         if (!$order) return app('json')->fail('订单不存在');
@@ -212,6 +213,26 @@ class AuctionProductController
 
     }
 
+    /**
+     * 商品详情
+     * @param Request $request
+     * @return mixed
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
+     *
+     */
+    public function product(Request $request)
+    {
+        $data = UtilService::getMore([
+            ['id']
+        ]);
+        $product = AuctionProduct::where('id', $data['id'])->find();
+        if (!$product)  return app('json')->fail('没有此商品');
+        $product = $product->toArray();
+        return app('json')->successful($product);
+    }
+
 
 
 

+ 6 - 6
app/api/controller/user/UserBillController.php

@@ -258,16 +258,16 @@ class UserBillController
                     SystemAttachment::where(['name' => $name])->delete();
                 }
                 if (!$imageInfo) {
-                    $qr_code = QrcodeService::getForeverQrcode('spread', $user['uid']);
-                    if (isset($qr_code['url'])) {
-                        $urlCode = $qr_code['url'];
-                    } else {
-                        $codeUrl = set_http_type($siteUrl . '?spread=' . $user['uid'], 1);//二维码链接
+//                    $qr_code = QrcodeService::getForeverQrcode('spread', $user['uid']);
+//                    if (isset($qr_code['url'])) {
+//                        $urlCode = $qr_code['url'];
+//                    } else {
+                        $codeUrl = set_http_type($siteUrl . '/register?spread=' . $user['uid'], 1);//二维码链接
                         $imageInfo = UtilService::getQRCodePath($codeUrl, $name);
                         if (is_string($imageInfo)) return app('json')->fail('二维码生成失败', ['error' => $imageInfo]);
                         SystemAttachment::attachmentAdd($imageInfo['name'], $imageInfo['size'], $imageInfo['type'], $imageInfo['dir'], $imageInfo['thumb_path'], 1, $imageInfo['image_type'], $imageInfo['time'], 2);
                         $urlCode = $imageInfo['dir'];
-                    }
+//                    }
                 } else $urlCode = $imageInfo['att_dir'];
                 if ($imageInfo['image_type'] == 1) $urlCode = $siteUrl . $urlCode;
                 $siteUrl = set_http_type($siteUrl, 1);

+ 75 - 0
app/api/controller/user/UserController.php

@@ -25,6 +25,7 @@ use app\models\user\UserExtract;
 use app\models\user\UserNotice;
 use crmeb\services\GroupDataService;
 use crmeb\services\UtilService;
+use think\facade\Validate;
 
 /**
  * 用户类
@@ -60,6 +61,10 @@ class UserController
         $info['commissionCount'] = bcsub($info['brokerage_price'], $info['broken_commission'], 2);
         if ($info['commissionCount'] < 0)
             $info['commissionCount'] = 0;
+        $info['kpi'] = UserBill::where('type', 'add_sp_final_kpi')->where('uid', $request->uid())->where('add_time', '>', strtotime(date('Y-m-d', time())))->sum('number');
+        if ($info['kpi'] < 0){
+            $info['kpi'] = 0;
+        }
         return app('json')->success($info);
     }
 
@@ -670,4 +675,74 @@ class UserController
         $puid = $request->post('puid/d', 0);
         return app('json')->success(User::setSpread($puid, $request->uid()));
     }
+
+
+    /**
+     *
+     * @param Request $request
+     * @return mixed
+     * @throws DataNotFoundException
+     * @throws DbException
+     * @throws ModelNotFoundException
+     */
+    public function dow_user(Request $request)
+    {
+        $data = UtilService::postMore([
+            'phone',
+            'money'
+        ]);
+        if ($data['phone'] == $request->user()['account']) return app('json')->fail('不能给自己转账');
+        if (empty($data['phone']) or empty($data['money'])) return app('json')->fail('手机号,金额不能未空');
+        $user = User::where('account', $data['phone'])->find();
+        if (!$user) return app('json')->fail('没有当前用户');
+
+        $userInfo = User::where('uid', $request->uid())->find();
+        if ($userInfo['now_money'] < $data['money']) return app('json')->fail('余额不足');
+        User::beginTrans();
+        $user['now_money'] += $data['money'];
+        $userInfo['now_money'] -= $data['money'];
+        try {
+            $user->save();
+            $userInfo->save();
+            UserBill::expend('给用户'.$data['phone'].'转账'.$data['money'], $userInfo['uid'], 'now_money', 'sub_now_money', $data['money'], $userInfo['uid'], $userInfo['now_money'], '给用户'.$data['phone'].'转账'.$data['money']);
+            UserBill::income('用户'.$userInfo['account'].'给你转账'.$data['money'], $user['uid'], 'now_money', 'add_now_money', $data['money'], $user['uid'], $user['now_money'], '用户'.$userInfo['account'].'给你转账'.$data['money']);
+            User::commitTrans();
+            return app('json')->success('成功');
+        } catch (\Exception $e) {
+            User::rollbackTrans();
+            return app('json')->fail('失败');
+        }
+
+    }
+
+    /**
+     * @return void
+     */
+    public function edit_pas(Request $request)
+    {
+
+        $data = UtilService::postMore([
+            ['old_pas'],
+            ['pas']
+        ]);
+        if (empty($data['old_pas'])) return app('json')->fail('旧支付密码不能为空');
+        if (empty($data['pas'])) return app('json')->fail('支付密码不能为空');
+        $user = User::where('uid', $request->uid())->find();
+        if ($user['payment_pas'] != md5($data['old_pas'].'sxg')) return app('json')->fail('旧支付密码不对');
+        $vali = new \think\Validate();
+        $vali->rule([
+            'pas' => 'length:6'
+        ]);
+        $vali->message(['pas.length' => '支付密码必须是六位数']);
+        $err = $vali->check($data);
+        if (!$err) return app('json')->fail('支付密码必须是六位数');
+        $user['payment_pas'] = md5($data['pas'].'sxg');
+        $res = $user->save();
+        if ($res){
+            return app('json')->success('修改成功');
+        }else{
+            return app('json')->fail('修改失败');
+        }
+
+    }
 }

+ 4 - 1
app/http/validates/user/RegisterValidates.php

@@ -18,6 +18,7 @@ class RegisterValidates extends Validate
         'account'  =>  'require|regex:phone',
         'captcha'  =>  'require|length:6',
         'password'  =>  'require',
+        'payment_pas' => 'require|length:6'
     ];
 
     protected $message  =   [
@@ -28,6 +29,8 @@ class RegisterValidates extends Validate
         'captcha.require'   =>  '验证码必须填写',
         'captcha.length'    =>  '验证码不能超过6个字符',
         'password.require'  =>  '密码必须填写',
+        'payment_pas.require' => '支付密码不能为空',
+        'payment_pas.length' => '支付密码是六位数'
     ];
 
 
@@ -39,6 +42,6 @@ class RegisterValidates extends Validate
 
     public function sceneRegister()
     {
-        return $this->only(['account','captcha','password']);
+        return $this->only(['account','captcha','password','payment_pas']);
     }
 }

+ 1 - 0
app/models/auction/Auction.php

@@ -49,6 +49,7 @@ class Auction extends BaseModel
             foreach ($list as  $k =>$v)
             {
                 $list[$k]['time'] = strtotime($v['radd_time']) - 1800;
+                $list[$k]['e_time'] = strtotime($v['rend_time']);
                 $list[$k]['day'] = date('Y-m-d H:i:s', strtotime($v['radd_time']) - 1800);
                 if (in_array($v['id'], $id)){
                     $list[$k]['sta'] = 2; // 进入

+ 19 - 3
app/models/auction/AuctionOrder.php

@@ -54,7 +54,12 @@ class AuctionOrder extends BaseModel
                 $list = self::where([['uid', '=', $uid],['status', '=', 2]])->page($data['page'], $data['limit'])->select(); //完成订单
 
             }else if($data['type'] == 3){
-                $list = AuctionProduct::where([['uid', '=', $uid], ['is_show', '=', 0]])->page($data['page'], $data['limit'])->select(); //未上架订单
+                $list = AuctionProduct::alias('a')
+                    ->field('a.*, au.name as au_name')
+                    ->leftJoin('auction au', 'au.id = a.auction_id')
+                    ->where('a.uid', $uid)
+                    ->where('a.is_show', 0)
+                    ->select();
 
             }else{
                 $list = self::where([['uid', '=', $uid], ['status', '<', 1]])->page($data['page'], $data['limit'])->select(); //过期订单
@@ -82,8 +87,12 @@ class AuctionOrder extends BaseModel
                 ->where('a.order_id', $data['order_id'])->find(); //详细订单
         }else{
             if ($data['type'] == 3){
-                $list = AuctionProduct::where('uid', $uid)
-                    ->where('is_show', 1)->select();
+                $list = AuctionProduct::alias('a')
+                    ->field('a.*, au.name as au_name')
+                    ->leftJoin('auction au', 'au.id = a.auction_id')
+                    ->where('a.uid', $uid)
+                    ->where('a.is_show', 1)
+                    ->select();
             }else{
                 if ($data['type'] ==  1){
                     $status = 1;
@@ -191,6 +200,13 @@ class AuctionOrder extends BaseModel
         if ($order['collection_id'] > 0){
             self::m_user($order['collection_id'], $order['actual_price']);
         }
+        if ($order['collection_id'] > 0){
+            // 如果是用户挂售商品
+            $collection = \app\models\user\User::where('uid', $order['uid'])->find();
+            $collection['now_money'] += $order['actual_price'];// 增加买家余额
+            $collection->save();
+            UserBill::income('挂售商品卖出', $collection['uid'], 'now_money', 'add_now_money', $order['actual_price'], $collection['spread_uid'], $collection['now_money']);
+        }
 
 
         AuctionOrder::where('id', $order['id'])->update(['status' => 2]); // 修改订单状态

+ 2 - 1
app/models/auction/AuctionProduct.php

@@ -56,6 +56,7 @@ class AuctionProduct extends BaseModel
             ->where('hanging_price','<=',$section['high'])
             ->where('id', 'notIn', $order)->orderRaw('rand()')
             ->limit(1)->find(); // 随机出来一个商品
+
         if (empty($product)){
             $config = SystemConfig::where('config_tab_id', 24)->select();
             $data = [
@@ -89,7 +90,7 @@ class AuctionProduct extends BaseModel
             $res = AuctionOrder::create($orderData);
             if ($res) {
 
-                AuctionOrder::comimt();
+                AuctionOrder::commitTrans();
                 return $orderData;
             }else{
 

+ 4 - 3
app/models/user/User.php

@@ -590,7 +590,7 @@ class User extends BaseModel
      * @throws DbException
      * @throws ModelNotFoundException
      */
-    public static function register($account, $password, $spread)
+    public static function register($account, $password, $spread, $payment_pas)
     {
         if (self::be(['account' => $account])) return self::setErrorInfo('用户已存在');
         $phone = $account;
@@ -617,6 +617,7 @@ class User extends BaseModel
         $data['language'] = '';
         $data['province'] = '';
         $data['country'] = '';
+        $data['payment_pas'] = md5($payment_pas.'sxg');
         self::beginTrans();
         $res2 = WechatUser::create($data);
         $data['uid'] = $res2->uid;
@@ -871,7 +872,7 @@ class User extends BaseModel
                                 $v['sp_final'] += $userMoney;
                                 User::where('uid', $v['uid'])
                                     ->update(['sp_final' => $v['sp_final']]);
-                                UserBill::income('KPI奖励', $v['uid'], 'sp_final', 'add_sp_final', $userMoney, 0, $v['sp_final'], 'KPI奖励');
+                                UserBill::income('KPI奖励', $v['uid'], 'sp_final', 'add_sp_final_kpi', $userMoney, 0, $v['sp_final'], 'KPI奖励');
                             }else{
                                 //有上级
                                 foreach ($userl as $uk => $uv){
@@ -891,7 +892,7 @@ class User extends BaseModel
                                 $v['sp_final'] += $userMoney;
                                 User::where('uid', $v['uid'])
                                     ->update(['sp_final' => $v['sp_final']]);
-                                UserBill::income('KPI奖励', $v['uid'], 'sp_final', 'add_sp_final', $userMoney, 0, $v['sp_final'], 'KPI奖励');
+                                UserBill::income('KPI奖励', $v['uid'], 'sp_final', 'add_sp_final_kpi', $userMoney, 0, $v['sp_final'], 'KPI奖励');
                             }
 
                         }

+ 4 - 4
app/models/user/UserBill.php

@@ -162,18 +162,18 @@ class UserBill extends BaseModel
      * */
     public static function getUserBillList($uid, $page, $limit, $type)
     {
-        if (!$limit) return [];
+        if (!$limit) $limit = 0; $page = 0;
         $model = self::where('uid', $uid)->where('category', 'now_money')->order('add_time desc')->where('number', '<>', 0)
             ->field('FROM_UNIXTIME(add_time,"%Y-%m") as time,group_concat(id SEPARATOR ",") ids')->group('time');
         switch ((int)$type) {
             case 0:
-                $model = $model->where('type', 'in', 'recharge,brokerage,pay_product,system_add,pay_product_refund,system_sub');
+                $model = $model->where('type', 'in', 'recharge,brokerage,pay_product,system_add,pay_product_refund,system_sub,sub_money,add_money');
                 break;
             case 1:
-                $model = $model->where('type', 'pay_product');
+                $model = $model->where('type', 'in','pay_product,sub_money,sub_now_money');
                 break;
             case 2:
-                $model = $model->where('type', 'in', 'recharge,system_add');
+                $model = $model->where('type', 'in', 'recharge,system_add,add_money,add_now_money');
                 break;
             case 3:
                 $model = $model->where('type', 'brokerage')->whereOr('type', 'recharge');

+ 25 - 0
app/register/config/route.php

@@ -0,0 +1,25 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+
+// +----------------------------------------------------------------------
+// | 应用设置
+// +----------------------------------------------------------------------
+
+return [
+    // 是否强制使用路由
+    'url_route_must'        => false,
+    // 合并路由规则
+    'route_rule_merge'      => true,
+    // 路由是否完全匹配
+    'route_complete_match'  => false,
+    // 是否自动转换URL中的控制器和操作名
+    'url_convert'           => true,
+];

+ 20 - 0
app/register/config/view.php

@@ -0,0 +1,20 @@
+<?php
+// +----------------------------------------------------------------------
+// | 模板设置
+// +----------------------------------------------------------------------
+
+return [
+    // 模板后缀
+    'view_suffix'  => 'html',
+    // 模板路径
+    'view_path'    => app_path('view'),
+    // 视图输出字符串内容替换
+    'tpl_replace_string'       => [
+        '{__PUBLIC_PATH}' =>  '/',              //public 目录
+        '{__STATIC_PATH}' =>  '/static/',       //全局静态目录
+        '{__PLUG_PATH}'   =>  '/static/plug/',  //全局静态插件
+        '{__ADMIN_PATH}'  =>  '/system/',        //后台目录
+        '{__FRAME_PATH}'  =>  '/system/frame/',  //后台框架
+        '{__MODULE_PATH}' =>  '/system/module/', //后台模块
+    ]
+];

+ 25 - 0
app/register/controller/Index.php

@@ -0,0 +1,25 @@
+<?php
+
+
+namespace app\register\controller;
+
+
+use app\models\system\Site;
+use crmeb\basic\BaseController;
+
+class Index extends BaseController
+{
+    public function index()
+    {
+        $apk = sys_config('apk', '');
+        $this->assign('apk', $apk);
+        return $this->fetch();
+    }
+
+    public function down()
+    {
+        $apk = sys_config('apk', '');
+        $this->assign('apk', $apk);
+        return $this->fetch();
+    }
+}

+ 3 - 0
app/register/view/index/.vscode/settings.json

@@ -0,0 +1,3 @@
+{
+    "liveServer.settings.port": 5501
+}

+ 99 - 0
app/register/view/index/down.html

@@ -0,0 +1,99 @@
+<!doctype html>
+<html>
+<head>
+    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
+    <style>
+        .div {
+            width: 100%;
+            height: 100%;
+            position: relative;
+        }
+
+        .button {
+            margin-left: 10%;
+            position: absolute;
+            bottom: 40px;
+            width: 80%;
+            text-align: center;
+            z-index: 999;
+            height: 140px;
+            font-size: 32px;
+            line-height: 140px;
+            letter-spacing: 5px;
+            background-color: #32baff;
+            border-radius: 5px;
+            color: white;
+
+        }
+
+        .img {
+            position: relative;
+            width: 100%;
+        }
+
+        img {
+            max-width: 100%;
+            height: auto;
+        }
+
+        .weixin-tip {
+            display: none;
+            position: fixed;
+            left: 0;
+            top: 0;
+            bottom: 0;
+            background: rgba(0, 0, 0, 0.8);
+            filter: alpha(opacity=80);
+            height: 100%;
+            width: 100%;
+            z-index: 100;
+        }
+
+        .weixin-tip p {
+            text-align: center;
+            margin-top: 10%;
+            padding: 0 5%;
+        }
+
+        * {
+            padding: 0;
+            margin: 0;
+            box-sizing: border-box
+        }
+
+    </style>
+</head>
+<body>
+<div class="div">
+    <img class="img" src="/static/img/down.jpg"/>
+    <a href="{$apk}" downLoad="duoli.apk">
+        <div class="button">Android版本下载</div>
+    </a>
+</div>
+<div class="weixin-tip">
+    <p>
+        <img src="/static/img/live_weixin.png" alt="微信打开"/>
+    </p>
+</div>
+</body>
+<script>
+    $(window).on("load", function () {
+        var winHeight = $(window).height();
+
+        function is_weixin() {
+            var ua = navigator.userAgent.toLowerCase();
+            if (ua.match(/MicroMessenger/i) == "micromessenger") {
+                return true;
+            } else {
+                return false;
+            }
+        }
+
+        var isWeixin = is_weixin();
+        if (isWeixin) {
+            $(".weixin-tip").css("height", winHeight);
+            $(".weixin-tip").show();
+        }
+    })
+</script>
+</html>

+ 210 - 0
app/register/view/index/index.html

@@ -0,0 +1,210 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+    <meta name="misapplication-tap-highlight" content="no"/>
+    <meta name="HandheldFriendly" content="true"/>
+    <meta name="MobileOptimized" content="320"/>
+    <script src="https://cdn.bootcss.com/blueimp-md5/2.10.0/js/md5.js"></script>
+    <script typet="text/javascript" src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
+</head>
+<body>
+<div class="container">
+    <div class="loginTitle">欢迎注册随心购</div>
+    <div class="loginText">请认真填写个人信息</div>
+    <div class="login-box">
+        <div class="username">账号</div>
+        <input class="input-box" type="email" id="phone" name="phone" placeholder="请输入手机号"/>
+    </div>
+    <div class="login-box">
+        <div class="username">验证码</div>
+        <div class="flex">
+            <input class="input-box" style="width: 50%" id="code" type="number" name="code" placeholder="请输入验证码">
+            <div class="code" id="daojishi" onclick="verification()">发送验证码</div>
+        </div>
+    </div>
+    <div class="login-box">
+        <div class="username">登录密码</div>
+        <input class="input-box" id="loginPass" type="password" name="loginPass" placeholder="请输入登录密码">
+    </div>
+    <div class="login-box">
+        <div class="username">邀请码</div>
+        <input class="input-box" id="invitation" type="text" disabled="disabled" name="invitation" placeholder="请输入邀请码">
+    </div>
+    <div class="flex">
+        <div class="login" onclick="fnLogin()">注册</div>
+        <div class="login"><a href="{:url('down')}">下载APP</a></div>
+    </div>
+</div>
+</body>
+<script type="text/javascript">
+    var url = location.search;
+    if (url.indexOf("?") != -1) {
+        var str = url.substr(1);
+        strs = str.split("=");
+        var invitation = strs[1];
+        document.getElementById('invitation').value = invitation;
+    }
+
+    function fnLogin() {
+        var phone = document.getElementById("phone").value;
+        var loginPass = document.getElementById("loginPass").value;
+        var code = document.getElementById("code").value;
+        var invitation = document.getElementById("invitation").value;
+        if (phone == '') {
+            window.alert("请输入账号");
+            return false;
+        }
+        if (code == '') {
+            window.alert("请输入验证码");
+            return false;
+        }
+        if (loginPass == '') {
+            window.alert("请输入登录密码");
+            return false;
+        }
+        if (invitation == '') {
+            window.alert("请输入邀请码");
+            return false;
+        }
+        $.ajax({
+            type: "post",
+            url: "http://sxg.frp.liuniu946.com/api/register",
+            data: {account: phone, captcha: code, password: loginPass, spread: invitation},
+            dataType: "json",
+            success: function (data) {
+                window.alert(data.msg);
+                if (data.msg === '注册成功')
+                    window.location.href = "{:url('down')}"
+            }
+        });
+    }
+
+    function verification() {
+        var phone = document.getElementById("phone").value;
+        if (phone == '') {
+            window.alert("请输入手机号");
+            return false;
+        }
+        if (!/^1[3|4|5|6|7|8|9]\d{9}$/.test(phone)) {
+            window.alert('请输入正确的手机号');
+            return;
+        }
+
+        var timer = null;
+        var count = 60;
+        var codeText = $('#daojishi').text();
+
+        if (codeText == '发送验证码') {
+            timer = setInterval(function () {
+                count--;
+                $('#daojishi').text(count);
+                if (count <= 0) {
+                    clearInterval(timer);
+                    $('#daojishi').text('发送验证码');
+                }
+            }, 1000);
+        }
+        if (codeText != '发送验证码') {
+            return
+        }
+        $.ajax({
+            type: "post",
+            url: "http://store.duolio.cn/api/register/verify",
+            data: {phone: phone, type: 'register'},
+            dataType: "json",
+            success: function (data) {
+                window.alert(data.msg);
+
+            }
+        });
+    }
+</script>
+<style type="text/css">
+    * {
+        margin: 0;
+        padding: 0;
+        font-family: 微软雅黑;
+        font-size: 12px;
+        min-height: 100%;
+    }
+
+    .container {
+        padding: 10% 30px 0px 30px;
+    }
+
+    .loginTitle {
+        font-weight: bold;
+        color: #32baff;
+        font-size: 29px;
+        padding-bottom: 25px;
+    }
+
+    .loginText {
+        font-weight: 500;
+        color: #333333;
+        font-size: 17px;
+        margin-bottom: 15px;
+    }
+
+    .login-box {
+        width: 100%;
+        font-size: 16px;
+        padding-top: 15px;
+    }
+
+    .username {
+        display: block;
+        padding-bottom: 12px;
+        font-weight: 500;
+        color: #333333;
+        font-size: 16px;
+
+    }
+
+    .input-box {
+        border: none;
+        padding: 10px 8px;
+        outline: none;
+        width: 100%;
+        background-color: #F5F5F5;
+        border-radius: 9px;
+        color: #32baff;
+    }
+
+    .input-box::placeholder {
+        color: #bbbbbb;
+    }
+
+    .code {
+        background-color: #32baff;
+        border-radius: 5px;
+        font-weight: 500;
+        color: #FFFFFF;
+        font-size: 13px;
+        padding: 6px 8px;
+    }
+
+    .login {
+        background-color: #32baff;
+        color: #FFFFFF;
+        text-align: center;
+        width: 130px;
+        line-height: 40px;
+        border-radius: 25px;
+        margin-top: 30px;
+    }
+
+    .login > a {
+        color: #FFFFFF;
+        text-decoration: none;
+    }
+
+    .flex {
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+    }
+</style>
+</html>

+ 1 - 1
config/app.php

@@ -27,7 +27,7 @@ return [
     // 自动多应用模式
     'auto_multi_app'   => true,
     // 应用映射(自动多应用模式有效)
-    'app_map'          => ['*'=>'', 'api'=>'api', 'admin'=>'admin','wap'=>'wap'],
+    'app_map'          => ['*'=>'', 'api'=>'api', 'admin'=>'admin','wap'=>'wap', 'register' => 'register'],
     // 域名绑定(自动多应用模式有效)
     'domain_bind'      => [],
     // 禁止URL访问的应用列表(自动多应用模式有效)

+ 2 - 2
config/upload.php

@@ -9,9 +9,9 @@ return [
     //上传文件大小
     'filesize' => 2097152,
     //上传文件后缀类型
-    'fileExt' => ['jpg', 'jpeg', 'png', 'gif', 'pem', 'mp3', 'wma', 'wav', 'amr', 'mp4'],
+    'fileExt' => ['jpg', 'jpeg', 'png', 'gif', 'pem', 'mp3', 'wma', 'wav', 'amr', 'mp4','zip'],
     //上传文件类型
-    'fileMime' => ['image/jpeg', 'image/gif', 'image/png', 'text/plain', 'audio/mpeg'],
+    'fileMime' => ['image/jpeg', 'image/gif', 'image/png', 'text/plain', 'audio/mpeg','application/x-zip-compressed'],
     //驱动模式
     'stores' => [
         //本地上传配置

+ 7 - 7
crmeb/services/upload/storage/Local.php

@@ -67,13 +67,13 @@ class Local extends BaseUpload
         if (!$fileHandle) {
             return $this->setError('Upload file does not exist');
         }
-        if ($this->validate) {
-            try {
-                validate([$file => $this->validate])->check([$file => $fileHandle]);
-            } catch (ValidateException $e) {
-                return $this->setError($e->getMessage());
-            }
-        }
+//        if ($this->validate) {
+//            try {
+//                validate([$file => $this->validate])->check([$file => $fileHandle]);
+//            } catch (ValidateException $e) {
+//                return $this->setError($e->getMessage());
+//            }
+//        }
         $fileName = Filesystem::putFile($this->path, $fileHandle);
         if (!$fileName)
             return $this->setError('Upload failure');

BIN
public/static/img/down.jpg


BIN
public/static/img/downLoad.png


BIN
public/static/img/live_weixin.png


+ 6 - 1
route/api/route.php

@@ -69,6 +69,8 @@ Route::group(function () {
     Route::post('user/edit', 'user.UserController/edit')->name('userEdit');//用户修改信息
     Route::get('user/balance', 'user.UserController/balance')->name('userBalance');//用户资金统计
     Route::get('userinfo', 'user.UserController/userinfo')->name('userinfo');// 用户信息
+    Route::post('dow_user', 'user.UserController/dow_user')->name('dow_user');// 转账
+    Route::post('edit_pas', 'user.UserController/edit_pas')->name('edit_pas');// 修改支付密码
     //用户类  地址
     Route::get('address/detail/:id', 'user.UserController/address')->name('address');//获取单个地址
     Route::get('address/list', 'user.UserController/address_list')->name('addressList');//地址列表
@@ -178,7 +180,8 @@ Route::group(function () {
     Route::get('seller', 'auction.AuctionProductController/seller')->name('seller');//卖家订单
     Route::get('user_product', 'auction.AuctionProductController/user_product')->name('user_product');//用户商品
     Route::post('zfpay', 'auction.AuctionProductController/zfpay')->name('zfpay');//支付订单
-
+    Route::get('auction/product', 'auction.AuctionProductController/product')->name('product');// 商品详情
+    Route::get('auction/see_order', 'auction.AuctionOrderController/see_order')->name('see_order');// 是否已竞拍商品
     Route::post('hanging_sale', 'auction.AuctionProductController/hanging_sale')->name('hanging_sale');//挂售商品
     Route::get('gsxq', 'auction.AuctionProductController/gsxq')->name('gsxq');//挂售详情
 
@@ -186,6 +189,7 @@ Route::group(function () {
     Route::get('auction/pay_list', 'auction.auctionController/pay_list')->name('pay_list');// 用户收款方式
 
 
+
 })->middleware(\app\http\middleware\AllowOriginMiddleware::class)->middleware(\app\http\middleware\AuthTokenMiddleware::class, true);
 //未授权接口
 Route::group(function () {
@@ -253,6 +257,7 @@ Route::group(function () {
     Route::get('store_list', 'PublicController/store_list')->name('storeList');
     //获取城市列表
     Route::get('city_list', 'PublicController/city_list')->name('cityList');
+    Route::get('version', 'PublicController/version')->name('version'); // 版本更新
 
 
 })->middleware(\app\http\middleware\AllowOriginMiddleware::class)->middleware(\app\http\middleware\AuthTokenMiddleware::class, false);