hrjy 3 tahun lalu
induk
melakukan
4ee679bd1e

+ 11 - 5
app/admin/model/auction/AuctionOrder.php

@@ -84,7 +84,9 @@ class AuctionOrder extends BaseModel
             $billModel->save([
                 'uid' => $spread['uid'],
                 'pm' => 1,
-                'title' => '积分',
+                'title' => '积分增加',
+                'category' => '积分增加',
+                'type' => '积分',
                 'mark' => '直推积分',
                 'add_time' => time(),
                 'number' => $s_price,
@@ -100,7 +102,9 @@ class AuctionOrder extends BaseModel
             UserBill::create([
                 'uid' => $user['uid'],
                 'pm' => 1,
-                'title' => '预约卷',
+                'title' => '预约卷扣除',
+                'category' => '预约卷扣除',
+                'type' => '预约卷',
                 'mark' => '卖出扣除相应预约卷',
                 'add_time' => time(),
                 'number' => $anticipate,
@@ -130,15 +134,17 @@ class AuctionOrder extends BaseModel
         $product = $productModel->where('id', $data['product_id'])->find();
         $auction = $auctionModel->where('id', $product['auction_id'])->find();
 
-        $anticipate = $user['anticipate'];
         $user['anticipate'] = $user['anticipate'] + $auction['anticipate'];// 退还预约卷
+        $user->save();
         UserBill::create([
             'uid' => $user['uid'],
             'pm' => 1,
-            'title' => '预约卷',
+            'title' => '预约卷退还',
+            'category' => '预约卷退还',
+            'type' => '预约卷',
             'mark' => '退还预约卷',
             'add_time' => time(),
-            'number' => $anticipate,
+            'number' => $auction['anticipate'],
             'balance' => $user['anticipate']
         ]);
     }

+ 97 - 2
app/api/controller/auction/AuctionController.php

@@ -3,6 +3,10 @@
 namespace app\api\controller\auction;
 
 
+use app\models\auction\Auction;
+use app\models\auction\AuctionBooking;
+use app\models\user\User;
+use app\models\user\UserBill;
 use app\Request;
 use Monolog\Handler\Curl\Util;
 use think\facade\Cache;
@@ -10,8 +14,8 @@ use crmeb\services\{
     CacheService,
     ExpressService,
     SystemConfigService,
-    UtilService
 };
+use crmeb\services\UtilService;
 use crmeb\repositories\OrderRepository;
 
 
@@ -27,14 +31,105 @@ class AuctionController
         $data = UtilService::getMore([
             [['page', 'd'], 0],
             [['limit', 'd'], 0],
+            ['advance']
         ], $request);
 
         $auctionModel = new \app\models\auction\Auction();
 
-        return app('json')->successful($auctionModel->list($data));
+        return app('json')->successful($auctionModel->list($data, $request->uid()));
 
     }
 
+    /**
+     * 预约场馆
+     * @param Request $request
+     * @return void
+     */
+    public function subscribe(Request $request)
+    {
+        $data = UtilService::postMore([
+            ['id']
+        ]);
+        if (!$data['id']) return app('json')->fail('数据传入错误');
+        $auctionModel = new Auction();
+        $auction = $auctionModel->find($data['id']);
+        if (!$auction)return app('json')->fail('没有此数据');
+
+        if (time() < strtotime($auction['add_time'])){
+            return app('json')->fail('预约未开始');
+        }
+        if (time() > strtotime($auction['end_time'])){
+            return app('json')->fail('预约时间已过');
+        }
+        if (AuctionBooking::where([['uid', '=', $request->uid()], ['auction_id' , '=', $auction['id']], ['frequency', '=', $auction['frequency']]])->find()){
+            return app('json')->fail('当前场馆已预约');
+        }
+
+        $userModel = new User();
+        $user = $userModel->find($request->uid());
+
+        if ($user['anticipate'] < $auction['anticipate']) return app('json')->fail('预约卷不够');
+        $user['anticipate'] = $user['anticipate'] - $auction['anticipate'];// 扣除预约卷
+
+        User::rollbackTrans();
+        $res = $user->save();
+
+        if ($res){
+            AuctionBooking::booking($user['uid'], $auction);
+            UserBill::income('预约场馆', $user['uid'], $user['spread_uid'],'预约', '预约卷'); // 写入记录
+
+            User::commitTrans();
+            return app('json')->successful('预约成功');
+        }else{
+
+            User::rollbackTrans();
+            return app('json')->fail('预约失败');
+        }
+
+    }
+
+    /**
+     * 进入场馆
+     * @param Request $request
+     * @return void
+     */
+    public function advance(Request $request)
+    {
+        $data = UtilService::getMore([
+            ['id']
+        ]);
+        if (!$data['id']) return app('json')->fail('数据传入错误');
+        $auction = Auction::find($data['id']);
+        $booking = AuctionBooking::where([['auction_id', '=',$auction['id']], ['frequency', '=', $auction['frequency']]])->find();
+        $user = $request->user();
+        $time = strtotime(date('Y-m-d', time()));// 今天
+        $today = strtotime(date('Y-m-d', strtotime('+1day')));// 明天
+
+        if ($user['is_new'] == 1 or ($user['green_time'] > $time and $user['green_time'] < $today)){
+            // 新人或者绿色通道提前三分钟入场
+            if (strtotime($auction['radd_time']) -3000 > time()){
+                return app('json')->fail('未到进入时间');
+            }
+            if (strtotime($auction['rend_time']) < time()){
+                return app('json')->fail('进场时间已过');
+            }
+
+        }else{
+            if (strtotime($auction['radd_time']) > time()){
+                return app('json')->fail('未到进入时间');
+            }
+            if (strtotime($auction['rend_time']) < time()){
+                return app('json')->fail('进场时间已过');
+            }
+        }
+
+        if ($booking){
+            return app('json')->successful('可进入');
+        }else{
+            return app('json')->fail('未预约');
+        }
+    }
+
 
 
 

+ 21 - 2
app/models/auction/Auction.php

@@ -30,13 +30,32 @@ class Auction extends BaseModel
     use ModelTrait;
 
 
-    public function list($data)
+    public function list($data, $uid)
     {
         $model = self::where([['delete_time', '=', 0], ['status' ,'=', '1']]);
         $model->page($data['page'], $data['limit']);
         $model->order('id DESC, sort DESC');
+        $id = [];
+        $booking = AuctionBooking::where([['uid', '=', $uid], ['create_time', '>', strtotime(date('Y-m-d'), time())]])->field('auction_id')->select();
+        foreach ($booking as $v) {
+            $id[] = $v['auction_id'];
+        }
+        if ($data['advance']){
+            $model->where('id', 'in', $id);
+        }
         $list = $model->select()->toArray();
-
+        if ($list){
+            foreach ($list as  $k =>$v)
+            {
+                if (in_array($v['id'], $id)){
+                    $list[$k]['sta'] = 2; // 进入
+                    $list[$k]['str'] = '进入';
+                }else{
+                    $list[$k]['sta'] = 1; // 预约
+                    $list[$k]['str'] = '预约';
+                }
+            }
+        }
         return $list;
     }
 

+ 50 - 0
app/models/auction/AuctionBooking.php

@@ -0,0 +1,50 @@
+<?php
+
+/**
+ *
+ * @author: xaboy<365615158@qq.com>
+ * @day: 2017/11/02
+ */
+
+namespace app\models\auction;
+
+use crmeb\traits\ModelTrait;
+use crmeb\basic\BaseModel;
+
+/**
+ * 预约 Model
+ * Class WechatNews
+ * @package app\admin\model\wechat
+ */
+class AuctionBooking extends BaseModel
+{
+
+    use ModelTrait;
+
+    protected $pk = 'id';
+
+    protected $name = 'auction_booking';
+    protected $autoWriteTimestamp = true;
+
+
+    /**
+     * 添加预约记录
+     * @param $uid
+     * @param $auction
+     * @return void
+     */
+    public static function booKing($uid, $auction)
+    {
+        self::create([
+            'uid' => $uid,
+            'anticipate' => $auction['anticipate'],
+            'auction_id' => $auction['id'],
+            'frequency' => $auction['frequency'],
+            'create_time' => time()
+        ]);
+
+    }
+
+
+
+}

+ 36 - 0
app/models/auction/AuctionOrder.php

@@ -0,0 +1,36 @@
+<?php
+
+/**
+ *
+ * @author: xaboy<365615158@qq.com>
+ * @day: 2017/11/02
+ */
+
+namespace app\models\auction;
+
+use app\admin\model\user\User;
+use app\admin\model\user\UserBill;
+use crmeb\services\product\Product;
+use crmeb\traits\ModelTrait;
+use crmeb\basic\BaseModel;
+
+/**
+ * 预约 Model
+ * Class WechatNews
+ * @package app\admin\model\wechat
+ */
+class AuctionOrder extends BaseModel
+{
+
+    use ModelTrait;
+
+    protected $pk = 'id';
+
+    protected $name = 'auction_order';
+    protected $autoWriteTimestamp = true;
+
+
+
+
+
+}

+ 32 - 0
app/models/auction/AuctionProduct.php

@@ -0,0 +1,32 @@
+<?php
+
+/**
+ *
+ * @author: xaboy<365615158@qq.com>
+ * @day: 2017/11/02
+ */
+
+namespace app\models\auction;
+
+use crmeb\traits\ModelTrait;
+use crmeb\basic\BaseModel;
+
+/**
+ * 竞拍上坪 Model
+ * Class WechatNews
+ * @package app\admin\model\wechat
+ */
+class AuctionProduct extends BaseModel
+{
+
+    use ModelTrait;
+
+    protected $pk = 'id';
+
+    protected $name = 'auction_product';
+    protected $autoWriteTimestamp = true;
+
+
+
+
+}

+ 3 - 0
route/api/route.php

@@ -159,6 +159,9 @@ Route::group(function () {
     Route::get('user/level/task/:id', 'user.UserLevelController/task')->name('userLevelTask');//获取等级任务
     //首页获取未支付订单
     Route::get('order/nopay', 'order.StoreOrderController/get_noPay')->name('getNoPay');//获取未支付订单
+
+    Route::post('auction/subscribe', 'auction.auctionController/subscribe')->name('subscribe');// 预约场馆
+    Route::get('auction/advance', 'auction.auctionController/advance')->name('advance');// 进入场馆
 })->middleware(\app\http\middleware\AllowOriginMiddleware::class)->middleware(\app\http\middleware\AuthTokenMiddleware::class, true);
 //未授权接口
 Route::group(function () {

+ 1 - 1
runtime/admin/temp/84d61d0aef57f53004a41c9e30ac91fe.php

@@ -1,4 +1,4 @@
-<?php /*a:5:{s:60:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\user\user\index.php";i:1647915082;s:61:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\container.php";i:1595820902;s:62:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_head.php";i:1595820902;s:57:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\style.php";i:1595820902;s:64:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_footer.php";i:1595820902;}*/ ?>
+<?php /*a:5:{s:60:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\user\user\index.php";i:1647930344;s:61:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\container.php";i:1595820902;s:62:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_head.php";i:1595820902;s:57:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\style.php";i:1595820902;s:64:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_footer.php";i:1595820902;}*/ ?>
 <!DOCTYPE html>
 <html lang="zh-CN">
 <head>

+ 499 - 0
runtime/admin/temp/ac8cdde27fc053dc46496071d3e9e892.php

@@ -0,0 +1,499 @@
+<?php /*a:5:{s:58:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\user\user\see.php";i:1595820902;s:61:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\container.php";i:1595820902;s:62:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_head.php";i:1595820902;s:57:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\style.php";i:1595820902;s:64:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_footer.php";i:1595820902;}*/ ?>
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+    
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <?php if(empty($is_layui) || (($is_layui instanceof \think\Collection || $is_layui instanceof \think\Paginator ) && $is_layui->isEmpty())): ?>
+    <link href="/system/frame/css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
+    <?php endif; ?>
+    <link href="/static/plug/layui/css/layui.css" rel="stylesheet">
+    <link href="/system/css/layui-admin.css" rel="stylesheet">
+    <link href="/system/frame/css/font-awesome.min.css?v=4.3.0" rel="stylesheet">
+    <link href="/system/frame/css/animate.min.css" rel="stylesheet">
+    <link href="/system/frame/css/style.min.css?v=3.0.0" rel="stylesheet">
+    <script src="/system/frame/js/jquery.min.js"></script>
+    <script src="/system/frame/js/bootstrap.min.js"></script>
+    <script src="/static/plug/layui/layui.all.js"></script>
+    <script>
+        $eb = parent._mpApi;
+        window.controlle="<?php echo strtolower(trim(preg_replace("/[A-Z]/", "_\\0", app('request')->controller()), "_"));?>";
+        window.module="<?php echo app('http')->getName();?>";
+    </script>
+
+
+
+    <title></title>
+    
+    <!--<script type="text/javascript" src="/static/plug/basket.js"></script>-->
+<script type="text/javascript" src="/static/plug/requirejs/require.js"></script>
+<?php /*  <script type="text/javascript" src="/static/plug/requirejs/require-basket-load.js"></script>  */ ?>
+<script>
+    var hostname = location.hostname;
+    if(location.port) hostname += ':' + location.port;
+    requirejs.config({
+        map: {
+            '*': {
+                'css': '/static/plug/requirejs/require-css.js'
+            }
+        },
+        shim:{
+            'iview':{
+                deps:['css!iviewcss']
+            },
+            'layer':{
+                deps:['css!layercss']
+            }
+        },
+        baseUrl:'//'+hostname+'/',
+        paths: {
+            'static':'static',
+            'system':'system',
+            'vue':'static/plug/vue/dist/vue.min',
+            'axios':'static/plug/axios.min',
+            'iview':'static/plug/iview/dist/iview.min',
+            'iviewcss':'static/plug/iview/dist/styles/iview',
+            'lodash':'static/plug/lodash',
+            'layer':'static/plug/layer/layer',
+            'layercss':'static/plug/layer/theme/default/layer',
+            'jquery':'static/plug/jquery/jquery.min',
+            'moment':'static/plug/moment',
+            'sweetalert':'static/plug/sweetalert2/sweetalert2.all.min',
+            'formCreate':'/static/plug/form-create/form-create.min',
+
+        },
+        basket: {
+            excludes:['system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
+//            excludes:['system/util/mpFormBuilder','system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
+        }
+    });
+</script>
+<script type="text/javascript" src="/system/util/mpFrame.js"></script>
+    
+</head>
+<body class="gray-bg">
+<div class="wrapper wrapper-content">
+
+<style>
+    .backlog-body{
+        padding: 10px 15px;
+        background-color: #f8f8f8;
+        color: #999;
+        border-radius: 2px;
+        transition: all .3s;
+        -webkit-transition: all .3s;
+        overflow: hidden;
+        max-height: 84px;
+    }
+    .backlog-body h3{
+        margin-bottom: 10px;
+    }
+    .right-icon{
+        position: absolute;
+        right: 10px;
+    }
+    .backlog-body p cite {
+        font-style: normal;
+        font-size: 17px;
+        font-weight: 300;
+        color: #009688;
+    }
+    .layuiadmin-badge, .layuiadmin-btn-group, .layuiadmin-span-color {
+        position: absolute;
+        right: 15px;
+    }
+    .layuiadmin-badge {
+        top: 50%;
+        margin-top: -9px;
+        color: #01AAED;
+    }
+</style>
+<div class="layui-fluid">
+    <div class="layui-row layui-col-space15">
+        <div class="layui-col-md12 layui-col-sm12 layui-col-lg12">
+            <div class="layui-card">
+                <div class="layui-card-header">会员详情</div>
+                <div class="layui-card-body">
+                    <ul class="layui-row layui-col-space10 layui-this">
+                        <?php if(is_array($userinfo) || $userinfo instanceof \think\Collection || $userinfo instanceof \think\Paginator): $i = 0; $__LIST__ = $userinfo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;if(trim($vo['value'])): ?>
+                            <li class="layui-col-xs<?=isset($vo['col']) ? $vo['col'] :4?>">
+                                <div class="backlog-body">
+                                    <h3><?php echo htmlentities($vo['name']); ?></h3>
+                                    <p><cite <?php if(isset($vo['color'])): ?> style="color: <?php echo htmlentities($vo['color']); ?>" <?php endif; ?>><?php echo htmlentities($vo['value']); ?></cite></p>
+                                </div>
+                            </li>
+                            <?php endif; ?>
+                        <?php endforeach; endif; else: echo "" ;endif; ?>
+                    </ul>
+                </div>
+            </div>
+        </div>
+        <div class="layui-col-md12 layui-col-sm12 layui-col-lg12">
+            <div class="layui-card">
+                <div class="layui-card-header">其他详情</div>
+                <div class="layui-card-body">
+                    <div class="layui-row layui-col-space15">
+                    <?php if(is_array($headerList) || $headerList instanceof \think\Collection || $headerList instanceof \think\Paginator): $i = 0; $__LIST__ = $headerList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
+                    <div class="layui-col-xs3" style="margin-bottom: 10px ">
+                        <div class="layui-card">
+                            <div class="layui-card-header">
+                                <?php echo htmlentities($vo['title']); ?>
+                                <span class="layui-badge layuiadmin-badge <?php if(isset($vo['class']) && $vo['class']): ?><?php echo htmlentities($vo['class']); else: ?>layui-bg-blue<?php endif; ?>"><?php echo htmlentities($vo['key']); ?></span>
+                            </div>
+                            <div class="layui-card-body">
+                                <p class="layuiadmin-big-font"><?php echo htmlentities($vo['value']); ?></p>
+                            </div>
+                        </div>
+                    </div>
+                    <?php endforeach; endif; else: echo "" ;endif; ?>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div class="layui-col-md12 layui-col-sm12 layui-col-lg12">
+            <div class="layui-card">
+                <div class="layui-card-header">其他记录</div>
+                <div class="layui-card-body">
+                    <div class="layui-tab layui-tab-card">
+                        <ul class="layui-tab-title">
+                            <li class="layui-this">消费能力</li>
+                            <li>积分明细</li>
+                            <li>签到记录</li>
+                            <li>持有优惠劵</li>
+                            <li>余额变动记录</li>
+                            <li>推广下线明细</li>
+                        </ul>
+                        <div class="layui-tab-content" id="content">
+                            <div class="layui-tab-item layui-show">
+                                <table class="layui-table" lay-skin="line" v-cloak="">
+                                    <thead>
+                                        <tr>
+                                            <th>订单编号</th>
+                                            <th>收货人</th>
+                                            <th>商品数量</th>
+                                            <th>商品总价</th>
+                                            <th>实付金额</th>
+                                            <th>交易完成时间</th>
+                                        </tr>
+                                    </thead>
+                                    <tbody>
+                                        <tr v-for="item in orderList">
+                                            <td class="text-center">{{item.order_id}}
+                                                <p>
+                                                    <span class="layui-badge" :class="{'layui-bg-green':item.paid==1}" v-text="item.paid==1 ? '已支付': '未支付' ">正在加载</span>
+                                                    <span class="layui-badge" :class="{'layui-bg-cyan':item.pay_type=='yue','layui-bg-blue':item.pay_type=='weixin'}" v-text="item.pay_type=='weixin' ? '微信支付': '余额支付' ">正在加载</span>
+                                                    <span class="layui-badge layui-bg-black" v-show="item.pink_id!=0">拼团</span>
+                                                    <span class="layui-badge layui-bg-blue" v-show="item.seckill_id!=0">秒杀</span>
+                                                    <span class="layui-badge layui-bg-gray" v-show="item.bargain_id!=0">砍价</span>
+                                                </p>
+                                            </td>
+                                            <td>{{item.real_name}}</td>
+                                            <td>{{item.total_num}}</td>
+                                            <td>{{item.total_price}}</td>
+                                            <td>{{item.pay_price}}</td>
+                                            <td>{{item.pay_time}}</td>
+                                        </tr>
+                                        <tr v-show="orderList.length<=0" style="text-align: center">
+                                            <td colspan="6">暂无数据</td>
+                                        </tr>
+                                    </tbody>
+                                </table>
+                                <div ref="page_order" v-show="count.order_count > limit" style="text-align: right;"></div>
+                            </div>
+                            <div class="layui-tab-item">
+                                <table class="layui-table" lay-skin="line" v-cloak="">
+                                    <thead>
+                                    <tr>
+                                        <th>来源/用途</th>
+                                        <th>积分变化</th>
+                                        <th>变化后积分</th>
+                                        <th>日期</th>
+                                        <th>备注</th>
+                                    </tr>
+                                    </thead>
+                                    <tbody>
+                                        <tr v-for="item in integralList">
+                                            <td>{{item.title}}</td>
+                                            <td>{{item.number}}</td>
+                                            <td>{{item.balance}}</td>
+                                            <td>{{item.add_time}}</td>
+                                            <td>{{item.mark}}</td>
+                                        </tr>
+                                        <tr v-show="integralList.length<=0" style="text-align: center">
+                                            <td colspan="5">暂无数据</td>
+                                        </tr>
+                                    </tbody>
+                                </table>
+                                <div ref="integral_page" v-show="count.integral_count > limit" style="text-align: right;"></div>
+                            </div>
+                            <div class="layui-tab-item">
+                                <table class="layui-table" lay-skin="line" v-cloak="">
+                                    <thead>
+                                    <tr>
+                                        <th>动作</th>
+                                        <th>获得积分</th>
+                                        <th>签到时间</th>
+                                        <th>备注</th>
+                                    </tr>
+                                    </thead>
+                                    <tbody>
+                                        <tr v-for="item in SignList">
+                                            <td>{{item.title}}</td>
+                                            <td>{{item.number}}</td>
+                                            <td>{{item.add_time}}</td>
+                                            <td>{{item.mark}}</td>
+                                        </tr>
+                                        <tr v-show="SignList.length<=0" style="text-align: center">
+                                            <td colspan="4">暂无数据</td>
+                                        </tr>
+                                    </tbody>
+                                </table>
+                                <div ref="Sign_page" v-show="count.sign_count > limit" style="text-align: right;"></div>
+                            </div>
+                            <div class="layui-tab-item">
+                                <table class="layui-table" v-cloak="">
+                                    <thead>
+                                    <tr>
+                                        <th>优惠券名称</th>
+                                        <th>面值</th>
+                                        <th>有效期</th>
+                                        <th>所需积分</th>
+                                        <th>兑换时间</th>
+                                    </tr>
+                                    </thead>
+                                    <tbody>
+                                        <tr v-for="item in CouponsList">
+                                            <td>{{item.coupon_title}}
+                                                <p>
+                                                    <span class="layui-badge" :class="{'layui-bg-green':item._type>=1}" v-text="item._type>=1 ? '可使用': '已过期' ">正在加载</span>
+                                                </p>
+                                            </td>
+                                            <td>{{item.coupon_price}}</td>
+                                            <td>{{item._add_time}}-{{item._end_time}}</td>
+                                            <td>{{item.integral}}</td>
+                                            <td>{{item._add_time}}</td>
+                                        </tr>
+                                        <tr v-show="CouponsList.length<=0" style="text-align: center">
+                                            <td colspan="5">暂无数据</td>
+                                        </tr>
+                                    </tbody>
+                                </table>
+                                <div ref="copons_page" v-show="count.coupon_count > limit" style="text-align: right;"></div>
+                            </div>
+                            <div class="layui-tab-item">
+                                <table class="layui-table" v-cloak="">
+                                    <thead>
+                                    <tr>
+                                        <th>变动金额</th>
+                                        <th>变动后</th>
+                                        <th>类型</th>
+                                        <th>创建时间</th>
+                                        <th>备注</th>
+                                    </tr>
+                                    </thead>
+                                    <tbody>
+                                        <tr v-for="item in balanceChangList">
+                                            <td>{{item.number}}
+                                                <p v-show="item.pm==1">
+                                                    <span class="layui-badge layui-bg-green" v-show="item.status==1">有效</span>
+                                                    <span class="layui-badge layui-bg-orange" v-show="item.status==0">带确定</span>
+                                                    <span class="layui-badge layui-bg-gray" v-show="item.status==-1">无效</span>
+                                                </p>
+                                            </td>
+                                            <td>{{item.balance}}</td>
+                                            <td>{{item._type}}</td>
+                                            <td>{{item.add_time}}</td>
+                                            <td>{{item.mark}}</td>
+                                        </tr>
+                                        <tr v-show="balanceChangList.length<=0" style="text-align: center">
+                                            <td colspan="5">暂无数据</td>
+                                        </tr>
+                                    </tbody>
+                                </table>
+                                <div ref="balancechang_page" v-show="count.balanceChang_count > limit" style="text-align: right;"></div>
+                            </div>
+                            <!--推广人-->
+                            <div class="layui-tab-item">
+                                <table class="layui-table" v-cloak="">
+                                    <thead>
+                                    <tr>
+                                        <th>昵称</th>
+                                        <th>余额</th>
+                                        <th>积分</th>
+                                        <th>加入时间</th>
+                                    </tr>
+                                    </thead>
+                                    <tbody>
+                                    <tr v-for="item in SpreadList">
+                                        <td>
+                                            {{item.nickname}}
+                                            <p v-show="item.is_vip">
+                                                <span class="layui-badge layui-bg-orange" v-text="item.vip_name"></span>
+                                            </p>
+                                        </td>
+                                        <td>{{item.now_money}}</td>
+                                        <td>{{item.integral}}</td>
+                                        <td>{{item.add_time}}</td>
+                                    </tr>
+                                    <tr v-show="balanceChangList.length<=0" style="text-align: center">
+                                        <td colspan="4">暂无数据</td>
+                                    </tr>
+                                    </tbody>
+                                </table>
+                                <div ref="spread_page" v-show="count.spread_count > limit" style="text-align: right;"></div>
+                            </div>
+                            <!--end-->
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+<script src="/system/js/layuiList.js"></script>
+<script>
+    var count=<?=json_encode($count)?>,
+        $uid=<?=$uid?>;
+    require(['vue'],function(Vue) {
+        new Vue({
+            el: "#content",
+            data: {
+                limit:10,
+                uid:$uid,
+                orderList:[],
+                integralList:[],
+                SignList:[],
+                CouponsList:[],
+                balanceChangList:[],
+                SpreadList:[],
+                count:count,
+                page:{
+                    order_page:1,
+                    integral_page:1,
+                    sign_page:1,
+                    copons_page:1,
+                    balancechang_page:1,
+                    spread_page:1,
+                },
+            },
+            watch:{
+                'page.order_page':function () {
+                    this.getOneorderList();
+                },
+                'page.integral_page':function () {
+                    this.getOneIntegralList();
+                },
+                'page.sign_page':function () {
+                    this.getOneSignList();
+                },
+                'page.copons_page':function () {
+                    this.getOneCouponsList();
+                },
+                'page.balancechang_page':function () {
+                    this.getOneBalanceChangList();
+                },
+                'page.spread_page':function () {
+                    this.getSpreadList();
+                }
+            },
+            methods:{
+                getSpreadList:function(){
+                    this.request('getSpreadList',this.page.spread_page,'SpreadList');
+                },
+                getOneorderList:function () {
+                    this.request('getOneorderList',this.page.order_page,'orderList');
+                },
+                getOneIntegralList:function () {
+                    this.request('getOneIntegralList',this.page.integral_page,'integralList');
+                },
+                getOneSignList:function () {
+                    this.request('getOneSignList',this.page.sign_page,'SignList');
+                },
+                getOneCouponsList:function () {
+                    this.request('getOneCouponsList',this.page.copons_page,'CouponsList');
+                },
+                getOneBalanceChangList:function () {
+                    this.request('getOneBalanceChangList',this.page.balancechang_page,'balanceChangList');
+                },
+                request:function (action,page,name) {
+                    var that=this;
+                    layList.baseGet(layList.U({a:action,p:{page:page,limit:this.limit,uid:this.uid}}),function (res) {
+                        that.$set(that,name,res.data)
+                    });
+                }
+            },
+            mounted:function () {
+                this.getOneorderList();
+                this.getOneIntegralList();
+                this.getOneSignList();
+                this.getOneCouponsList();
+                this.getOneBalanceChangList();
+                this.getSpreadList();
+                var that=this;
+                layList.laypage.render({
+                    elem: that.$refs.page_order
+                    ,count:that.count.order_count
+                    ,limit:that.limit
+                    ,theme: '#1E9FFF',
+                    jump:function(obj){
+                        that.page.order_page=obj.curr;
+                    }
+                });
+                layList.laypage.render({
+                    elem: that.$refs.integral_page
+                    ,count:that.count.integral_count
+                    ,limit:that.limit
+                    ,theme: '#1E9FFF',
+                    jump:function(obj){
+                        that.page.integral_page=obj.curr;
+                    }
+                });
+                layList.laypage.render({
+                    elem: that.$refs.Sign_page
+                    ,count:that.count.sign_count
+                    ,limit:that.limit
+                    ,theme: '#1E9FFF',
+                    jump:function(obj){
+                        that.page.sign_page=obj.curr;
+                    }
+                });
+                layList.laypage.render({
+                    elem: that.$refs.copons_page
+                    ,count:that.count.coupon_count
+                    ,limit:that.limit
+                    ,theme: '#1E9FFF',
+                    jump:function(obj){
+                        that.page.copons_page=obj.curr;
+                    }
+                });
+                layList.laypage.render({
+                    elem: that.$refs.balancechang_page
+                    ,count:that.count.balanceChang_count
+                    ,limit:that.limit
+                    ,theme: '#1E9FFF',
+                    jump:function(obj){
+                        that.page.balancechang_page=obj.curr;
+                    }
+                });
+
+                layList.laypage.render({
+                    elem: that.$refs.spread_page
+                    ,count:that.count.spread_count
+                    ,limit:that.limit
+                    ,theme: '#1E9FFF',
+                    jump:function(obj){
+                        that.page.spread_page=obj.curr;
+                    }
+                });
+            }
+        });
+    });
+</script>
+
+
+
+
+</div>
+</body>
+</html>

+ 1 - 1
runtime/cache/a9/939d920c0fa6b4fe0b897fb019672a.php

@@ -1,4 +1,4 @@
 <?php
 //000000000000
  exit();?>
-a:9:{i:0;s:77:"D:\phpstudy_pro\WWW\CRMEB\runtime\cache\48\e345b986ae9584f9686dac64ea2c6a.php";i:1;s:77:"D:\phpstudy_pro\WWW\CRMEB\runtime\cache\59\62ccd748530d5866ded674e0247788.php";i:2;s:77:"D:\phpstudy_pro\WWW\CRMEB\runtime\cache\4d\ebc178cbdb9b7d1fc736ef8ee65e51.php";i:3;s:77:"D:\phpstudy_pro\WWW\CRMEB\runtime\cache\b6\2c1e2a759fad26f36b6705aeb096e7.php";i:4;s:77:"D:\phpstudy_pro\WWW\CRMEB\runtime\cache\3a\18e85fda2f43f200f015f30d0af45e.php";i:5;s:77:"D:\phpstudy_pro\WWW\CRMEB\runtime\cache\a7\53d3226685fd31b029614775beb88c.php";i:6;s:77:"D:\phpstudy_pro\WWW\CRMEB\runtime\cache\57\e5830fa228be4a7d40bf40abfb7a18.php";i:7;s:77:"D:\phpstudy_pro\WWW\CRMEB\runtime\cache\e0\f15cee86afad4eabb0d5176f63c302.php";i:8;s:77:"D:\phpstudy_pro\WWW\CRMEB\runtime\cache\a6\d6181cf79cbad4a232ed9006617c00.php";}
+a:10:{i:0;s:77:"D:\phpstudy_pro\WWW\CRMEB\runtime\cache\48\e345b986ae9584f9686dac64ea2c6a.php";i:1;s:77:"D:\phpstudy_pro\WWW\CRMEB\runtime\cache\59\62ccd748530d5866ded674e0247788.php";i:2;s:77:"D:\phpstudy_pro\WWW\CRMEB\runtime\cache\4d\ebc178cbdb9b7d1fc736ef8ee65e51.php";i:3;s:77:"D:\phpstudy_pro\WWW\CRMEB\runtime\cache\b6\2c1e2a759fad26f36b6705aeb096e7.php";i:4;s:77:"D:\phpstudy_pro\WWW\CRMEB\runtime\cache\3a\18e85fda2f43f200f015f30d0af45e.php";i:5;s:77:"D:\phpstudy_pro\WWW\CRMEB\runtime\cache\a7\53d3226685fd31b029614775beb88c.php";i:6;s:77:"D:\phpstudy_pro\WWW\CRMEB\runtime\cache\57\e5830fa228be4a7d40bf40abfb7a18.php";i:7;s:77:"D:\phpstudy_pro\WWW\CRMEB\runtime\cache\e0\f15cee86afad4eabb0d5176f63c302.php";i:8;s:77:"D:\phpstudy_pro\WWW\CRMEB\runtime\cache\a6\d6181cf79cbad4a232ed9006617c00.php";i:9;s:77:"D:\phpstudy_pro\WWW\CRMEB\runtime\cache\bd\e6183b875045950006115f19cf4ce5.php";}

File diff ditekan karena terlalu besar
+ 3 - 0
runtime/cache/bd/e6183b875045950006115f19cf4ce5.php


+ 4 - 0
runtime/cache/f2/0c0a86a65ddd7ba18bd357efa9baf5.php

@@ -0,0 +1,4 @@
+<?php
+//000000000300
+ exit();?>
+0

+ 20 - 0
runtime/log/202203/25.log

@@ -0,0 +1,20 @@
+[2022-03-25T08:42:24+08:00][error] [0]Call to undefined function app\api\controller\auction\pr()[D:\phpstudy_pro\WWW\CRMEB\app\api\controller\auction\AuctionController.php:31]
+[2022-03-25T08:42:38+08:00][error] [0]Call to undefined function app\api\controller\auction\pr()[D:\phpstudy_pro\WWW\CRMEB\app\api\controller\auction\AuctionController.php:31]
+[2022-03-25T08:48:44+08:00][error] [0]Call to undefined function app\api\controller\auction\pr()[D:\phpstudy_pro\WWW\CRMEB\app\api\controller\auction\AuctionController.php:27]
+[2022-03-25T08:49:25+08:00][error] [0]Call to undefined function app\api\controller\auction\pr()[D:\phpstudy_pro\WWW\CRMEB\app\api\controller\auction\AuctionController.php:27]
+[2022-03-25T08:49:26+08:00][error] [0]Call to undefined function app\api\controller\auction\pr()[D:\phpstudy_pro\WWW\CRMEB\app\api\controller\auction\AuctionController.php:27]
+[2022-03-25T08:49:27+08:00][error] [0]Call to undefined function app\api\controller\auction\pr()[D:\phpstudy_pro\WWW\CRMEB\app\api\controller\auction\AuctionController.php:27]
+[2022-03-25T09:03:46+08:00][error] [8]未定义变量: auctionModel[D:\phpstudy_pro\WWW\CRMEB\app\api\controller\auction\AuctionController.php:32]
+[2022-03-25T09:41:02+08:00][error] [0]Call to undefined function app\http\middleware\pr()[D:\phpstudy_pro\WWW\CRMEB\app\http\middleware\AuthTokenMiddleware.php:28]
+[2022-03-25T09:41:17+08:00][error] [0]中间件方法必须返回Response对象实例[D:\phpstudy_pro\WWW\CRMEB\vendor\topthink\framework\src\think\Middleware.php:145]
+[2022-03-25T09:41:39+08:00][error] [0]Argument 1 passed to crmeb\utils\Json::make() must be of the type int, string given, called in D:\phpstudy_pro\WWW\CRMEB\app\http\middleware\AuthTokenMiddleware.php on line 28[D:\phpstudy_pro\WWW\CRMEB\crmeb\utils\Json.php:19]
+[2022-03-25T09:44:40+08:00][error] [0]Return value of crmeb\repositories\UserRepository::parseToken() must be of the type array, string returned[D:\phpstudy_pro\WWW\CRMEB\crmeb\repositories\UserRepository.php:79]
+[2022-03-25T09:44:53+08:00][error] [8]compact(): Undefined variable: 0[D:\phpstudy_pro\WWW\CRMEB\crmeb\repositories\UserRepository.php:79]
+[2022-03-25T09:45:00+08:00][error] [8]compact(): Undefined variable: yJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjcm1lYi5jb20iLCJhdWQiOiJjcm1lYi5jb20iLCJpYXQiOjE2NDgxNzI2NDMsIm5iZiI6MTY0ODE3MjY0MywiZXhwIjoxNjQ4MTgzNDQzLCJqdGkiOnsiaWQiOjMsInR5cGUiOiJ1c2VyIn19.dlyKE2hK1TTgDeRb0sPUM0sOnw4VEYEX70MfOrdDU8M[D:\phpstudy_pro\WWW\CRMEB\crmeb\repositories\UserRepository.php:79]
+[2022-03-25T09:45:09+08:00][error] [0]Return value of crmeb\repositories\UserRepository::parseToken() must be of the type array, string returned[D:\phpstudy_pro\WWW\CRMEB\crmeb\repositories\UserRepository.php:79]
+[2022-03-25T09:45:10+08:00][error] [0]Return value of crmeb\repositories\UserRepository::parseToken() must be of the type array, string returned[D:\phpstudy_pro\WWW\CRMEB\crmeb\repositories\UserRepository.php:79]
+[2022-03-25T09:51:32+08:00][error] [0]语法错误: unexpected 'throw' (T_THROW)[D:\phpstudy_pro\WWW\CRMEB\crmeb\repositories\UserRepository.php:80]
+[2022-03-25T11:08:55+08:00][error] [10500]查询表达式错误:array (
+  'auction_id' => 2,
+)[D:\phpstudy_pro\WWW\CRMEB\vendor\topthink\think-orm\src\db\Builder.php:359]
+[2022-03-25T13:53:33+08:00][error] [8]未定义变量: id[D:\phpstudy_pro\WWW\CRMEB\app\models\auction\Auction.php:51]

+ 0 - 1
runtime/session/sess_0ab77e6d662bc817b5d75ee295193cff

@@ -1 +0,0 @@
-a:4:{s:7:"adminId";i:1;s:9:"adminInfo";a:12:{s:2:"id";i:1;s:7:"account";s:5:"admin";s:3:"pwd";s:32:"e10adc3949ba59abbe56e057f20f883e";s:9:"real_name";s:5:"admin";s:5:"roles";s:1:"1";s:7:"last_ip";s:9:"127.0.0.1";s:9:"last_time";i:1648098772;s:8:"add_time";i:1647842101;s:11:"login_count";i:0;s:5:"level";i:0;s:6:"status";i:1;s:6:"is_del";i:0;}s:11:"login_error";N;s:3:"pid";i:0;}

+ 1 - 0
runtime/session/sess_5720ba5049022a0e91cd73cc598658f9

@@ -0,0 +1 @@
+a:3:{s:7:"adminId";i:1;s:9:"adminInfo";a:12:{s:2:"id";i:1;s:7:"account";s:5:"admin";s:3:"pwd";s:32:"e10adc3949ba59abbe56e057f20f883e";s:9:"real_name";s:5:"admin";s:5:"roles";s:1:"1";s:7:"last_ip";s:3:"::1";s:9:"last_time";i:1648169202;s:8:"add_time";i:1647842101;s:11:"login_count";i:0;s:5:"level";i:0;s:6:"status";i:1;s:6:"is_del";i:0;}s:11:"login_error";N;}

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini