hrjy 2 anos atrás
pai
commit
c6a5eb59b4

+ 2 - 2
.constant

@@ -1,3 +1,3 @@
 <?php
-define('INSTALL_DATE',1578360044);
-define('SERIALNUMBER','N2L6Px');
+define('INSTALL_DATE',1662016940);
+define('SERIALNUMBER','nB4ya0');

+ 0 - 1
.example.env

@@ -1 +0,0 @@
-APP_DEBUG = true

[APP]
DEFAULT_TIMEZONE = Asia/Shanghai

[DATABASE]
TYPE = mysql
HOSTNAME = 127.0.0.1
DATABASE = test
USERNAME = username
PASSWORD = password
HOSTPORT = 3306
CHARSET = utf8
DEBUG = true

[LANG]
default_lang = zh-cn

+ 220 - 0
app/admin/controller/water/WaterMaterialScience.php

@@ -0,0 +1,220 @@
+<?php
+/**
+ *
+ * @author: xaboy<365615158@qq.com>
+ * @day: 2017/11/11
+ */
+
+namespace app\admin\controller\water;
+
+use app\admin\controller\AuthController;
+use crmeb\services\{ExpressService,
+    JsonService,
+    JsonService as Json,
+    MiniProgramService,
+    WechatService,
+    FormBuilder as Form,
+    CacheService,
+    UtilService as Util};
+use think\facade\Route as Url;
+use think\facade\Validate;
+Use app\admin\model\water\WaterMaterialScience as model;
+
+/**
+ * 订单管理控制器 同一个订单表放在一个控制器
+ * Class StoreOrder
+ * @package app\admin\controller\store
+ */
+class WaterMaterialScience extends AuthController
+{
+    /**
+     * @return mixed
+     */
+    public function index()
+    {
+
+        return $this->fetch();
+    }
+
+
+    public function list()
+    {
+        $where = Util::getMore([
+            ['page', 1],
+            ['limit', 20],
+            ['name', '']
+        ]);
+
+        return Json::successlayui(model::list($where));
+    }
+
+    /**
+     * 显示创建资源表单页.
+     *
+     * @return \think\Response
+     */
+    public function create($id = 0)
+    {
+        $f = [];
+        $f[] = Form::input('name', '名称')->col(12);
+        $f[] = Form::input('weight', '重量');
+        if ($id) $f[] = Form::hidden('id', $id);
+        $form = Form::make_post_form('添加', $f, Url::buildUrl('save'));
+        $this->assign(compact('form'));
+        return $this->fetch('public/form-builder');
+
+
+    }
+
+    public function save()
+    {
+        $model = new model;
+        $data = Util::postMore([
+            'name',
+            'thickness',
+        ]);
+        $validate = Validate::rule('name', 'require')->rule([
+            'name' => 'require',
+            'thickness' => 'require',
+        ]);
+        $validate->message([
+            'name.require' => '名称不能为空',
+            'thickness.require' => '厚度不能为空',
+        ]);
+        if (!$validate->check($data)) {
+            return Json::fail($validate->getError());
+        }
+        $res = $model->save($data);
+        if ($res) return Json::successful('添加成功');
+        return Json::fail('添加失败');
+    }
+
+
+    /**
+     * 显示创建资源表单页.
+     *
+     * @return \think\Response
+     */
+    public function edit($id = 0)
+    {
+        $data = model::find($id);
+        $f = [];
+        $f[] = Form::input('name', '名称',$data->getData('name'))->col(12);
+        $f[] = Form::input('thickness', '额度', $data->getData('thickness'));
+        $f[] = Form::hidden('id', $id);
+        $form = Form::make_post_form('修改', $f, Url::buildUrl('update'));
+        $this->assign(compact('form'));
+        return $this->fetch('public/form-builder');
+    }
+
+
+    /**
+     * 修改
+     * @return void
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
+     */
+    public function update()
+    {
+        $model = new model;
+        $data = Util::postMore([
+            'id',
+            'name',
+            'thickness',
+        ]);
+        $validate = Validate::rule('name', 'require')->rule([
+            'name' => 'require',
+            'thickness' => 'require',
+        ]);
+        $validate->message([
+            'name.require' => '名称不能为空',
+            'thickness.require' => '额度不能为空',
+        ]);
+        if (!$validate->check($data)) {
+            return Json::fail($validate->getError());
+        }
+        $details = $model->find($data['id']);
+        $details['name'] = $data['name'];
+        $details['thickness'] = $data['thickness'];
+        $res = $details->save();
+        if ($res) return Json::successful('修改成功');
+        return Json::fail('修改失败');
+    }
+
+    /**
+     * 显示创建资源表单页.
+     *
+     * @return \think\Response
+     */
+    public function next($id = 0)
+    {
+        $f = [];
+        $f[] = Form::dateTime('add_time', '开启时间');
+        $f[] = Form::dateTime('end_time', '结束时间');
+        $f[] = Form::hidden('id', $id);
+        $form = Form::make_post_form('添加', $f, Url::buildUrl('next_save'));
+        $this->assign(compact('form'));
+        return $this->fetch('public/form-builder');
+    }
+
+    public function next_save()
+    {
+        $model = new model;
+        $data = Util::postMore([
+            'id',
+            'add_time',
+            'end_time',
+        ]);
+        $validate = Validate::rule([
+            'add_time' => 'require',
+            'end_time' => 'require',
+        ]);
+        $validate->message([
+            'add_time.require' => '请选择开启时间',
+            'end_time.require' => '请选择结束时间',
+        ]);
+        if (!$validate->check($data)) {
+            return Json::fail($validate->getError());
+        }
+        $details = $model->find($data['id']);
+        if ($details['status'] == 1) return Json::fail('未结束不能进行下一场');
+        if ($details['suc'] == 2) return Json::fail('已众筹失败无法就行下一场');
+        if (strtotime($data['end_time']) < strtotime($data['add_time'])) return Json::fail('结束时间不能小于开启时间');
+        $details['stage'] += 1;
+        $details['status'] = 1;
+        $details['number'] = 0;//重置额度
+        $details['money'] = intval($details['money'] * 1.3);//提搞额度130%
+        $details['suc'] = 0;
+        $details['add_time'] = strtotime($data['add_time']);
+        $details['end_time'] = strtotime($data['end_time']);
+        $res = $details->save();
+        if ($res) return Json::successful('成功');
+        return Json::fail('失败');
+
+
+    }
+
+
+
+    /**
+     * 删除
+     * @param $id
+     * @return void
+     * @throws \Exception
+     */
+    public function delete($id)
+    {
+        if (!$id) Json::fail('删除失败');
+        $model = new model;
+
+        $res = model::destroy($id);
+        if ($res){
+            return Json::success('删除成功!');
+        }else{
+            return Json::fail($model->getErrorInfo());
+        }
+
+    }
+
+}

+ 220 - 0
app/admin/controller/water/WaterThickness.php

@@ -0,0 +1,220 @@
+<?php
+/**
+ *
+ * @author: xaboy<365615158@qq.com>
+ * @day: 2017/11/11
+ */
+
+namespace app\admin\controller\water;
+
+use app\admin\controller\AuthController;
+use crmeb\services\{ExpressService,
+    JsonService,
+    JsonService as Json,
+    MiniProgramService,
+    WechatService,
+    FormBuilder as Form,
+    CacheService,
+    UtilService as Util};
+use think\facade\Route as Url;
+use think\facade\Validate;
+Use app\admin\model\water\WaterThickness as model;
+
+/**
+ * 订单管理控制器 同一个订单表放在一个控制器
+ * Class StoreOrder
+ * @package app\admin\controller\store
+ */
+class WaterThickness extends AuthController
+{
+    /**
+     * @return mixed
+     */
+    public function index()
+    {
+
+        return $this->fetch();
+    }
+
+
+    public function list()
+    {
+        $where = Util::getMore([
+            ['page', 1],
+            ['limit', 20],
+            ['name', '']
+        ]);
+
+        return Json::successlayui(model::list($where));
+    }
+
+    /**
+     * 显示创建资源表单页.
+     *
+     * @return \think\Response
+     */
+    public function create($id = 0)
+    {
+        $f = [];
+        $f[] = Form::input('name', '名称')->col(12);
+        $f[] = Form::input('thickness', '厚度(毫米)');
+        if ($id) $f[] = Form::hidden('id', $id);
+        $form = Form::make_post_form('添加', $f, Url::buildUrl('save'));
+        $this->assign(compact('form'));
+        return $this->fetch('public/form-builder');
+
+
+    }
+
+    public function save()
+    {
+        $model = new model;
+        $data = Util::postMore([
+            'name',
+            'thickness',
+        ]);
+        $validate = Validate::rule('name', 'require')->rule([
+            'name' => 'require',
+            'thickness' => 'require',
+        ]);
+        $validate->message([
+            'name.require' => '名称不能为空',
+            'thickness.require' => '厚度不能为空',
+        ]);
+        if (!$validate->check($data)) {
+            return Json::fail($validate->getError());
+        }
+        $res = $model->save($data);
+        if ($res) return Json::successful('添加成功');
+        return Json::fail('添加失败');
+    }
+
+
+    /**
+     * 显示创建资源表单页.
+     *
+     * @return \think\Response
+     */
+    public function edit($id = 0)
+    {
+        $data = model::find($id);
+        $f = [];
+        $f[] = Form::input('name', '名称',$data->getData('name'))->col(12);
+        $f[] = Form::input('thickness', '额度', $data->getData('thickness'));
+        $f[] = Form::hidden('id', $id);
+        $form = Form::make_post_form('修改', $f, Url::buildUrl('update'));
+        $this->assign(compact('form'));
+        return $this->fetch('public/form-builder');
+    }
+
+
+    /**
+     * 修改
+     * @return void
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
+     */
+    public function update()
+    {
+        $model = new model;
+        $data = Util::postMore([
+            'id',
+            'name',
+            'thickness',
+        ]);
+        $validate = Validate::rule('name', 'require')->rule([
+            'name' => 'require',
+            'thickness' => 'require',
+        ]);
+        $validate->message([
+            'name.require' => '名称不能为空',
+            'thickness.require' => '额度不能为空',
+        ]);
+        if (!$validate->check($data)) {
+            return Json::fail($validate->getError());
+        }
+        $details = $model->find($data['id']);
+        $details['name'] = $data['name'];
+        $details['thickness'] = $data['thickness'];
+        $res = $details->save();
+        if ($res) return Json::successful('修改成功');
+        return Json::fail('修改失败');
+    }
+
+    /**
+     * 显示创建资源表单页.
+     *
+     * @return \think\Response
+     */
+    public function next($id = 0)
+    {
+        $f = [];
+        $f[] = Form::dateTime('add_time', '开启时间');
+        $f[] = Form::dateTime('end_time', '结束时间');
+        $f[] = Form::hidden('id', $id);
+        $form = Form::make_post_form('添加', $f, Url::buildUrl('next_save'));
+        $this->assign(compact('form'));
+        return $this->fetch('public/form-builder');
+    }
+
+    public function next_save()
+    {
+        $model = new model;
+        $data = Util::postMore([
+            'id',
+            'add_time',
+            'end_time',
+        ]);
+        $validate = Validate::rule([
+            'add_time' => 'require',
+            'end_time' => 'require',
+        ]);
+        $validate->message([
+            'add_time.require' => '请选择开启时间',
+            'end_time.require' => '请选择结束时间',
+        ]);
+        if (!$validate->check($data)) {
+            return Json::fail($validate->getError());
+        }
+        $details = $model->find($data['id']);
+        if ($details['status'] == 1) return Json::fail('未结束不能进行下一场');
+        if ($details['suc'] == 2) return Json::fail('已众筹失败无法就行下一场');
+        if (strtotime($data['end_time']) < strtotime($data['add_time'])) return Json::fail('结束时间不能小于开启时间');
+        $details['stage'] += 1;
+        $details['status'] = 1;
+        $details['number'] = 0;//重置额度
+        $details['money'] = intval($details['money'] * 1.3);//提搞额度130%
+        $details['suc'] = 0;
+        $details['add_time'] = strtotime($data['add_time']);
+        $details['end_time'] = strtotime($data['end_time']);
+        $res = $details->save();
+        if ($res) return Json::successful('成功');
+        return Json::fail('失败');
+
+
+    }
+
+
+
+    /**
+     * 删除
+     * @param $id
+     * @return void
+     * @throws \Exception
+     */
+    public function delete($id)
+    {
+        if (!$id) Json::fail('删除失败');
+        $model = new model;
+
+        $res = model::destroy($id);
+        if ($res){
+            return Json::success('删除成功!');
+        }else{
+            return Json::fail($model->getErrorInfo());
+        }
+
+    }
+
+}

+ 55 - 0
app/admin/model/water/WaterCardOrder.php

@@ -0,0 +1,55 @@
+<?php
+/**
+ * @author: xaboy<365615158@qq.com>
+ * @day: 2017/11/11
+ */
+
+namespace app\admin\model\water;
+
+use crmeb\traits\ModelTrait;
+use crmeb\basic\BaseModel;
+use think\model\concern\SoftDelete;
+
+/**
+ * Class StoreCategory
+ * @package app\admin\model\store
+ */
+class WaterCardOrder extends BaseModel
+{
+
+    /**
+     * 数据表主键
+     * @var string
+     */
+    protected $pk = 'id';
+
+    /**
+     * 模型名称
+     * @var string
+     */
+    protected $name = 'water_card_order';
+
+    use ModelTrait;
+    protected $autoWriteTimestamp = true;
+
+
+
+    public static function list($where)
+    {
+        $model = self::field('*')->order('id DESC');
+
+        if ($where['name'])$model->where('name' , 'like', '%'.$where['name'],'%');
+        $data['count'] = $model->count();
+        if ($where['page'] && $where['limit']){
+            $model->page($where['page'], $where['limit']);
+        }else{
+            $model->page(20, 1);
+        }
+        $list = $model->select()->toArray();
+        $data['data'] = $list;
+        return $data;
+
+    }
+
+
+}

+ 55 - 0
app/admin/model/water/WaterMaterialScience.php

@@ -0,0 +1,55 @@
+<?php
+/**
+ * @author: xaboy<365615158@qq.com>
+ * @day: 2017/11/11
+ */
+
+namespace app\admin\model\water;
+
+use crmeb\traits\ModelTrait;
+use crmeb\basic\BaseModel;
+use think\model\concern\SoftDelete;
+
+/**
+ * Class StoreCategory
+ * @package app\admin\model\store
+ */
+class WaterMaterialScience extends BaseModel
+{
+
+    /**
+     * 数据表主键
+     * @var string
+     */
+    protected $pk = 'id';
+
+    /**
+     * 模型名称
+     * @var string
+     */
+    protected $name = 'water_material_science';
+
+    use ModelTrait;
+    protected $autoWriteTimestamp = true;
+
+
+
+    public static function list($where)
+    {
+        $model = self::field('*')->order('id DESC');
+
+        if ($where['name'])$model->where('name' , 'like', '%'.$where['name'],'%');
+        $data['count'] = $model->count();
+        if ($where['page'] && $where['limit']){
+            $model->page($where['page'], $where['limit']);
+        }else{
+            $model->page(20, 1);
+        }
+        $list = $model->select()->toArray();
+        $data['data'] = $list;
+        return $data;
+
+    }
+
+
+}

+ 55 - 0
app/admin/model/water/WaterMembershioCard.php

@@ -0,0 +1,55 @@
+<?php
+/**
+ * @author: xaboy<365615158@qq.com>
+ * @day: 2017/11/11
+ */
+
+namespace app\admin\model\water;
+
+use crmeb\traits\ModelTrait;
+use crmeb\basic\BaseModel;
+use think\model\concern\SoftDelete;
+
+/**
+ * Class StoreCategory
+ * @package app\admin\model\store
+ */
+class WaterMembershioCard extends BaseModel
+{
+
+    /**
+     * 数据表主键
+     * @var string
+     */
+    protected $pk = 'id';
+
+    /**
+     * 模型名称
+     * @var string
+     */
+    protected $name = 'water_membershio_card';
+
+    use ModelTrait;
+    protected $autoWriteTimestamp = true;
+
+
+
+    public static function list($where)
+    {
+        $model = self::field('*')->order('id DESC');
+
+        if ($where['name'])$model->where('name' , 'like', '%'.$where['name'],'%');
+        $data['count'] = $model->count();
+        if ($where['page'] && $where['limit']){
+            $model->page($where['page'], $where['limit']);
+        }else{
+            $model->page(20, 1);
+        }
+        $list = $model->select()->toArray();
+        $data['data'] = $list;
+        return $data;
+
+    }
+
+
+}

+ 55 - 0
app/admin/model/water/WaterThickness.php

@@ -0,0 +1,55 @@
+<?php
+/**
+ * @author: xaboy<365615158@qq.com>
+ * @day: 2017/11/11
+ */
+
+namespace app\admin\model\water;
+
+use crmeb\traits\ModelTrait;
+use crmeb\basic\BaseModel;
+use think\model\concern\SoftDelete;
+
+/**
+ * Class StoreCategory
+ * @package app\admin\model\store
+ */
+class WaterThickness extends BaseModel
+{
+
+    /**
+     * 数据表主键
+     * @var string
+     */
+    protected $pk = 'id';
+
+    /**
+     * 模型名称
+     * @var string
+     */
+    protected $name = 'water_thickness';
+
+    use ModelTrait;
+    protected $autoWriteTimestamp = true;
+
+
+
+    public static function list($where)
+    {
+        $model = self::field('*')->order('id DESC');
+
+        if ($where['name'])$model->where('name' , 'like', '%'.$where['name'],'%');
+        $data['count'] = $model->count();
+        if ($where['page'] && $where['limit']){
+            $model->page($where['page'], $where['limit']);
+        }else{
+            $model->page(20, 1);
+        }
+        $list = $model->select()->toArray();
+        $data['data'] = $list;
+        return $data;
+
+    }
+
+
+}

+ 187 - 0
app/admin/view/water/water_material_science/index.php

@@ -0,0 +1,187 @@
+{extend name="public/container"}
+{block name="head_top"}
+
+{/block}
+{block name="content"}
+<style>
+    .btn-outline{
+        border:none;
+    }
+    .btn-outline:hover{
+        background-color: #0e9aef;
+        color: #fff;
+    }
+    .layui-form-item .layui-btn {
+        margin-top: 5px;
+        margin-right: 10px;
+    }
+    .layui-btn-primary{
+        margin-right: 10px;
+        margin-left: 0!important;
+    }
+    label{
+        margin-bottom: 0!important;
+        margin-top: 4px;
+    }
+</style>
+<div class="layui-fluid">
+    <div class="layui-row layui-col-space15" id="app">
+        <!--搜索条件-->
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">搜索条件</div>
+                <div class="layui-card-body">
+                    <div class="layui-carousel layadmin-carousel layadmin-shortcut" lay-anim="" lay-indicator="inside" lay-arrow="none" style="background:none">
+                        <form class="layui-form layui-form-pane" action="">
+                            <div class="layui-form-item">
+
+                                <div class="layui-col-lg12">
+                                    <label class="layui-form-label" style="top: -5.5px;">搜索条件</label>
+                                    <div class="layui-input-inline">
+                                        <input type="text" id="name" name="name" class="layui-input" placeholder="请输入名称">
+                                    </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">
+                                            <i class="layui-icon layui-icon-search"></i>搜索</button>
+                                    </div>
+                                </div>
+                            </div>
+                        </form>
+                    </div>
+                </div>
+            </div>
+        </div>
+
+        <!-- 中间详细信息-->
+        <div :class="item.col!=undefined ? 'layui-col-sm'+item.col+' '+'layui-col-md'+item.col:'layui-col-sm6 layui-col-md3'"
+             v-for="item in badge" v-cloak="" v-if="item.count > 0">
+        </div>
+        <!--enb-->
+    </div>
+    <!--列表-->
+    <div class="layui-row layui-col-space15">
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">场次列表</div>
+                <div class="layui-card-body">
+
+                    <div class="layui-btn-container" id="container-action">
+                        <a class="layui-btn layui-btn-sm" onclick="$eb.createModalFrame(this.innerText,'{:Url('create')}',{h:500,w:500})">添加材料</a>
+<!--                        <button class="layui-btn layui-btn-sm" data-type="del_auction">批量删除</button>-->
+                    </div>
+                    <table class="layui-hide" id="List" lay-filter="List"></table>
+
+
+                    <script type="text/html" id="image">
+                        <img style="cursor: pointer" lay-event="open_image" src="{{d.image}}">
+                    </script>
+                    <script type="text/html" id="status">
+                        {{#  if(d.status == 0){ }}
+                        <button type="button" name="suc" class="layui-btn-disabled layui-btn-xs" id="">
+                            关闭
+                        </button>
+                        {{#  } else if(d.status == 1) { }}
+                        <button type="button" name="suc" class="layui-btn-xs layui-btn" id="">
+                            开启
+                        </button>
+                        {{#  } }}
+                    </script>
+                    <script type="text/html" id="suc">
+                        {{#  if(d.suc == 0){ }}
+                        <button type="button" name="suc" class="layui-btn layui-btn-xs" id="">
+                            正常
+                        </button>
+                        {{#  } else if(d.suc == 1) { }}
+                        <button type="button" name="suc" class="layui-btn-xs layui-btn" id="">
+                            种植成功
+                        </button>
+                        {{#  } else if(d.suc == 2) { }}
+                        <button type="button" name="suc" class="layui-btn-disabled layui-btn-xs layui-btn-danger" id="">
+                            种植失败
+                        </button>
+                        {{#  } }}
+                    </script>
+                    <script type="text/html" id="act">
+                        <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" onclick="$eb.createModalFrame('编辑','{:Url('edit')}?id={{d.id}}',{h:500,w:500})">
+                            编辑
+                        </button>
+                        <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-event='delete' id="">
+                            删除
+                        </button>
+
+                    </script>
+                </div>
+            </div>
+        </div>
+    </div>
+    <!--end-->
+</div>
+<script src="{__ADMIN_PATH}js/layuiList.js"></script>
+{/block}
+{block name="script"}
+<script>
+    layList.tableList('List', "{:Url('list')}", function () {
+        return [
+            {type: 'checkbox'},
+            {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%', templet: '#id'},
+            {field: 'name', title: '名称', templet: '#name',  align: 'center'},
+            {field: 'thickness', title: '厚度(毫米)', align: 'center'},
+            {field: 'create_time', title: '时间', align: 'center', width: '8%'},
+            {field: 'right', title: '操作', align: 'center', toolbar: '#act',width: '15%'},
+        ];
+    });
+
+    //查询
+    layList.search('search',function(where){
+        layList.reload(where,true);
+    });
+
+    //点击事件绑定
+    layList.tool(function (event,data,obj) {
+        switch (event) {
+            case 'delete':
+                var url=layList.U({c:'many.many',a:'delete',q:{id:data.id}});
+                var code = {title:"操作提示",text:"确定将该商品移入回收站吗?",type:'info',confirm:'是的,移入回收站'};
+                $eb.$swal('delete',function(){
+                    $eb.axios.get(url).then(function(res){
+                        if(res.status == 200 && res.data.code == 200) {
+                            $eb.$swal('success',res.data.msg);
+                            obj.del();
+                            location.reload();
+                        }else
+                            return Promise.reject(res.data.msg || '删除失败')
+                    }).catch(function(err){
+                        $eb.$swal('error',err);
+                    });
+                },code)
+                break;
+            case 'open_image':
+                $eb.openImage(data.image);
+                break;
+            case 'edit':
+                location.href = layList.U({a:'edit',q:{id:data.id}});
+                break;
+        }
+    })
+
+
+    //改状态
+    layList.switch('status',function (odj,value) {
+        if(odj.elem.checked==true){
+            layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:1,id:value}}),function (res) {
+                layList.msg(res.msg, function () {
+                    layList.reload();
+                });
+            });
+        }else{
+            layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:0,id:value}}),function (res) {
+                layList.msg(res.msg, function () {
+                    layList.reload();
+                });
+            });
+        }
+    });
+</script>
+{/block}

+ 187 - 0
app/admin/view/water/water_thickness/index.php

@@ -0,0 +1,187 @@
+{extend name="public/container"}
+{block name="head_top"}
+
+{/block}
+{block name="content"}
+<style>
+    .btn-outline{
+        border:none;
+    }
+    .btn-outline:hover{
+        background-color: #0e9aef;
+        color: #fff;
+    }
+    .layui-form-item .layui-btn {
+        margin-top: 5px;
+        margin-right: 10px;
+    }
+    .layui-btn-primary{
+        margin-right: 10px;
+        margin-left: 0!important;
+    }
+    label{
+        margin-bottom: 0!important;
+        margin-top: 4px;
+    }
+</style>
+<div class="layui-fluid">
+    <div class="layui-row layui-col-space15" id="app">
+        <!--搜索条件-->
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">搜索条件</div>
+                <div class="layui-card-body">
+                    <div class="layui-carousel layadmin-carousel layadmin-shortcut" lay-anim="" lay-indicator="inside" lay-arrow="none" style="background:none">
+                        <form class="layui-form layui-form-pane" action="">
+                            <div class="layui-form-item">
+
+                                <div class="layui-col-lg12">
+                                    <label class="layui-form-label" style="top: -5.5px;">搜索条件</label>
+                                    <div class="layui-input-inline">
+                                        <input type="text" id="name" name="name" class="layui-input" placeholder="请输入名称">
+                                    </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">
+                                            <i class="layui-icon layui-icon-search"></i>搜索</button>
+                                    </div>
+                                </div>
+                            </div>
+                        </form>
+                    </div>
+                </div>
+            </div>
+        </div>
+
+        <!-- 中间详细信息-->
+        <div :class="item.col!=undefined ? 'layui-col-sm'+item.col+' '+'layui-col-md'+item.col:'layui-col-sm6 layui-col-md3'"
+             v-for="item in badge" v-cloak="" v-if="item.count > 0">
+        </div>
+        <!--enb-->
+    </div>
+    <!--列表-->
+    <div class="layui-row layui-col-space15">
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">场次列表</div>
+                <div class="layui-card-body">
+
+                    <div class="layui-btn-container" id="container-action">
+                        <a class="layui-btn layui-btn-sm" onclick="$eb.createModalFrame(this.innerText,'{:Url('create')}',{h:500,w:500})">添加厚度分类</a>
+<!--                        <button class="layui-btn layui-btn-sm" data-type="del_auction">批量删除</button>-->
+                    </div>
+                    <table class="layui-hide" id="List" lay-filter="List"></table>
+
+
+                    <script type="text/html" id="image">
+                        <img style="cursor: pointer" lay-event="open_image" src="{{d.image}}">
+                    </script>
+                    <script type="text/html" id="status">
+                        {{#  if(d.status == 0){ }}
+                        <button type="button" name="suc" class="layui-btn-disabled layui-btn-xs" id="">
+                            关闭
+                        </button>
+                        {{#  } else if(d.status == 1) { }}
+                        <button type="button" name="suc" class="layui-btn-xs layui-btn" id="">
+                            开启
+                        </button>
+                        {{#  } }}
+                    </script>
+                    <script type="text/html" id="suc">
+                        {{#  if(d.suc == 0){ }}
+                        <button type="button" name="suc" class="layui-btn layui-btn-xs" id="">
+                            正常
+                        </button>
+                        {{#  } else if(d.suc == 1) { }}
+                        <button type="button" name="suc" class="layui-btn-xs layui-btn" id="">
+                            种植成功
+                        </button>
+                        {{#  } else if(d.suc == 2) { }}
+                        <button type="button" name="suc" class="layui-btn-disabled layui-btn-xs layui-btn-danger" id="">
+                            种植失败
+                        </button>
+                        {{#  } }}
+                    </script>
+                    <script type="text/html" id="act">
+                        <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" onclick="$eb.createModalFrame('编辑','{:Url('edit')}?id={{d.id}}',{h:500,w:500})">
+                            编辑
+                        </button>
+                        <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-event='delete' id="">
+                            删除
+                        </button>
+
+                    </script>
+                </div>
+            </div>
+        </div>
+    </div>
+    <!--end-->
+</div>
+<script src="{__ADMIN_PATH}js/layuiList.js"></script>
+{/block}
+{block name="script"}
+<script>
+    layList.tableList('List', "{:Url('list')}", function () {
+        return [
+            {type: 'checkbox'},
+            {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%', templet: '#id'},
+            {field: 'name', title: '名称', templet: '#name',  align: 'center'},
+            {field: 'thickness', title: '厚度(毫米)', align: 'center'},
+            {field: 'create_time', title: '时间', align: 'center', width: '8%'},
+            {field: 'right', title: '操作', align: 'center', toolbar: '#act',width: '15%'},
+        ];
+    });
+
+    //查询
+    layList.search('search',function(where){
+        layList.reload(where,true);
+    });
+
+    //点击事件绑定
+    layList.tool(function (event,data,obj) {
+        switch (event) {
+            case 'delete':
+                var url=layList.U({c:'many.many',a:'delete',q:{id:data.id}});
+                var code = {title:"操作提示",text:"确定将该商品移入回收站吗?",type:'info',confirm:'是的,移入回收站'};
+                $eb.$swal('delete',function(){
+                    $eb.axios.get(url).then(function(res){
+                        if(res.status == 200 && res.data.code == 200) {
+                            $eb.$swal('success',res.data.msg);
+                            obj.del();
+                            location.reload();
+                        }else
+                            return Promise.reject(res.data.msg || '删除失败')
+                    }).catch(function(err){
+                        $eb.$swal('error',err);
+                    });
+                },code)
+                break;
+            case 'open_image':
+                $eb.openImage(data.image);
+                break;
+            case 'edit':
+                location.href = layList.U({a:'edit',q:{id:data.id}});
+                break;
+        }
+    })
+
+
+    //改状态
+    layList.switch('status',function (odj,value) {
+        if(odj.elem.checked==true){
+            layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:1,id:value}}),function (res) {
+                layList.msg(res.msg, function () {
+                    layList.reload();
+                });
+            });
+        }else{
+            layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:0,id:value}}),function (res) {
+                layList.msg(res.msg, function () {
+                    layList.reload();
+                });
+            });
+        }
+    });
+</script>
+{/block}

+ 0 - 8
public/.htaccess

@@ -1,8 +0,0 @@
-<IfModule mod_rewrite.c>
-  Options +FollowSymlinks -Multiviews
-  RewriteEngine On
-
-  RewriteCond %{REQUEST_FILENAME} !-d
-  RewriteCond %{REQUEST_FILENAME} !-f
-  RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
-</IfModule>

+ 5 - 6
public/nginx.htaccess

@@ -1,6 +1,5 @@
-location / { 
-   if (!-e $request_filename) {
-   rewrite  ^(.*)$  /index.php?s=/$1  last;
-   break;
-    }
- }
+location / {
+        if (!-e $request_filename){
+                rewrite  ^(.*)$  /index.php?s=$1  last;   break;
+        }
+}