hrjy 2 years ago
parent
commit
59ad610a22

+ 296 - 0
app/admin/controller/water/WaterDefault.php

@@ -0,0 +1,296 @@
+<?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\WaterDefault as model;
+
+/**
+ * 订单管理控制器 同一个订单表放在一个控制器
+ * Class StoreOrder
+ * @package app\admin\controller\store
+ */
+class WaterDefault extends AuthController
+{
+    /**
+     * @return mixed
+     */
+    public function index()
+    {
+        return $this->fetch();
+    }
+
+
+    public function list()
+    {
+        $where = Util::getMore([
+            ['page', 1],
+            ['limit', 20],
+            ['name', ''],
+            ['card', ''],
+            ['order_id', ''],
+        ]);
+
+        return Json::successlayui(model::list($where));
+    }
+
+    /**
+     * 显示创建资源表单页.
+     *
+     * @return \think\Response
+     */
+    public function create($id = 0)
+    {
+        $f = [];
+        $f[] = Form::input('high', '高度')->col(12);
+        $f[] = Form::select('roof', '顶板', 0)->options(
+            array_merge([['value' => 0, 'label' => '选择顶板厚度']], \app\admin\model\water\WaterCate::order('id DESC')->where('type', 1)->field('id as value,name as label')->select()->toArray())
+        )->filterable(true);
+        $f[] = Form::select('floor', '底板', 0)->options(
+            array_merge([['value' => 0, 'label' => '选择底板厚度']], \app\admin\model\water\WaterCate::order('id DESC')->where('type', 4)->field('id as value,name as label')->select()->toArray())
+        )->filterable(true);
+        $f[] = Form::select('column', '立柱', 0)->options(
+            array_merge([['value' => 0, 'label' => '选择立柱厚度']], \app\admin\model\water\WaterCate::order('id DESC')->where('type', 5)->field('id as value,name as label')->select()->toArray())
+        )->filterable(true);
+
+        $f[] = Form::select('side_plate1', '侧板1', 0)->options(
+            array_merge([['value' => 0, 'label' => '选择立柱厚度']], \app\admin\model\water\WaterCate::order('id DESC')->where('type', 2)->field('id as value,name as label')->select()->toArray())
+        )->filterable(true);
+        $f[] = Form::select('side_plate2', '侧板2', 0)->options(
+            array_merge([['value' => 0, 'label' => '选择立柱厚度']], \app\admin\model\water\WaterCate::order('id DESC')->where('type', 2)->field('id as value,name as label')->select()->toArray())
+        )->filterable(true);
+        $f[] = Form::select('side_plate3', '侧板3', 0)->options(
+            array_merge([['value' => 0, 'label' => '选择立柱厚度']], \app\admin\model\water\WaterCate::order('id DESC')->where('type', 2)->field('id as value,name as label')->select()->toArray())
+        )->filterable(true);
+        $f[] = Form::select('side_plate4', '侧板4', 0)->options(
+            array_merge([['value' => 0, 'label' => '选择立柱厚度']], \app\admin\model\water\WaterCate::order('id DESC')->where('type', 2)->field('id as value,name as label')->select()->toArray())
+        )->filterable(true);
+        $f[] = Form::select('side_plate5', '侧板5', 0)->options(
+            array_merge([['value' => 0, 'label' => '选择立柱厚度']], \app\admin\model\water\WaterCate::order('id DESC')->where('type', 2)->field('id as value,name as label')->select()->toArray())
+        )->filterable(true);
+
+        $f[] = Form::select('lacing1', '拉筋1', 0)->options(
+            array_merge([['value' => 0, 'label' => '选择立柱厚度']], \app\admin\model\water\WaterCate::order('id DESC')->where('type', 3)->field('id as value,name as label')->select()->toArray())
+        )->filterable(true);
+        $f[] = Form::select('lacing2', '拉筋2', 0)->options(
+            array_merge([['value' => 0, 'label' => '选择立柱厚度']], \app\admin\model\water\WaterCate::order('id DESC')->where('type', 3)->field('id as value,name as label')->select()->toArray())
+        )->filterable(true);
+        $f[] = Form::select('lacing3', '拉筋3', 0)->options(
+            array_merge([['value' => 0, 'label' => '选择立柱厚度']], \app\admin\model\water\WaterCate::order('id DESC')->where('type', 3)->field('id as value,name as label')->select()->toArray())
+        )->filterable(true);
+        $f[] = Form::select('lacing4', '拉筋4', 0)->options(
+            array_merge([['value' => 0, 'label' => '选择立柱厚度']], \app\admin\model\water\WaterCate::order('id DESC')->where('type', 3)->field('id as value,name as label')->select()->toArray())
+        )->filterable(true);
+        $f[] = Form::select('lacing5', '拉筋5', 0)->options(
+            array_merge([['value' => 0, 'label' => '选择立柱厚度']], \app\admin\model\water\WaterCate::order('id DESC')->where('type', 3)->field('id as value,name as label')->select()->toArray())
+        )->filterable(true);
+
+        $f[] = Form::select('fula1', '辅拉1', 0)->options(
+            array_merge([['value' => 0, 'label' => '选择立柱厚度']], \app\admin\model\water\WaterCate::order('id DESC')->where('type', 6)->field('id as value,name as label')->select()->toArray())
+        )->filterable(true);
+        $f[] = Form::select('fula2', '辅拉2', 0)->options(
+            array_merge([['value' => 0, 'label' => '选择立柱厚度']], \app\admin\model\water\WaterCate::order('id DESC')->where('type', 6)->field('id as value,name as label')->select()->toArray())
+        )->filterable(true);
+        $f[] = Form::select('fula3', '辅拉3', 0)->options(
+            array_merge([['value' => 0, 'label' => '选择立柱厚度']], \app\admin\model\water\WaterCate::order('id DESC')->where('type', 6)->field('id as value,name as label')->select()->toArray())
+        )->filterable(true);
+        $f[] = Form::select('fula4', '辅拉4', 0)->options(
+            array_merge([['value' => 0, 'label' => '选择立柱厚度']], \app\admin\model\water\WaterCate::order('id DESC')->where('type', 6)->field('id as value,name as label')->select()->toArray())
+        )->filterable(true);
+        $f[] = Form::select('fula5', '辅拉5', 0)->options(
+            array_merge([['value' => 0, 'label' => '选择立柱厚度']], \app\admin\model\water\WaterCate::order('id DESC')->where('type', 6)->field('id as value,name as label')->select()->toArray())
+        )->filterable(true);
+
+        $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([
+            'high',
+            'roof',
+            'floor',
+            'column',
+            'side_plate1',
+            'side_plate2',
+            'side_plate3',
+            'side_plate4',
+            'side_plate5',
+            'lacing1',
+            'lacing2',
+            'lacing3',
+            'lacing4',
+            'lacing5',
+            'fula1',
+            'fula2',
+            'fula3',
+            'fula4',
+            'fula5',
+        ]);
+        $validate = Validate::rule([
+            'high' => 'require',
+            'roof' => 'require',
+            'floor' => 'require',
+            'column' => 'require',
+            'side_plate1' => 'require',
+            'lacing1' => 'require',
+            'fula1' => 'require',
+        ]);
+        $validate->message([
+            'high.require' => '高度不能为空',
+            'roof.require' => '请选择顶板',
+            'floor.require' => '请选择底板',
+            'column.require' => '请填写立柱',
+            'side_plate1.require' => '最少填写侧板1',
+            'lacing1.require' => '最少填写拉筋1',
+            'fula1.require' => '最少填写辅拉1',
+        ]);
+        if ($data['side_plate1'] > 0) $data['side_plate'] = $data['side_plate1'];
+        if ($data['side_plate2'] > 0) $data['side_plate'] .= ','.$data['side_plate2'];
+        if ($data['side_plate3'] > 0) $data['side_plate'] .= ','.$data['side_plate3'];
+        if ($data['side_plate4'] > 0) $data['side_plate'] .= ','.$data['side_plate4'];
+        if ($data['side_plate5'] > 0) $data['side_plate'] .= ','.$data['side_plate5'];
+
+        if ($data['lacing1'] > 0) $data['lacing'] = $data['lacing1'];
+        if ($data['lacing2'] > 0) $data['lacing'] .= ','.$data['lacing2'];
+        if ($data['lacing3'] > 0) $data['lacing'] .= ','.$data['lacing3'];
+        if ($data['lacing4'] > 0) $data['lacing'] .= ','.$data['lacing4'];
+        if ($data['lacing5'] > 0) $data['lacing'] .= ','.$data['lacing5'];
+
+        if ($data['fula1'] > 0) $data['fula'] = $data['fula1'];
+        if ($data['fula2'] > 0) $data['fula'] = $data['fula2'];
+        if ($data['fula3'] > 0) $data['fula'] = $data['fula3'];
+        if ($data['fula4'] > 0) $data['fula'] = $data['fula4'];
+        if ($data['fula5'] > 0) $data['fula'] = $data['fula5'];
+        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['name'])->col(12);
+        $f[] = Form::select('type', '选择分类', (string)$data['type'])->options([
+            ['value' => 0, 'label' => '请选择分类'],
+            ['value' => 1, 'label' => '顶板'],
+            ['value' => 2, 'label' => '侧板'],
+            ['value' => 3, 'label' => '拉筋'],
+            ['value' => 4, 'label' => '底板'],
+        ])->filterable(true);
+        $f[] = Form::select('th_id', '选择厚度', (string)$data['th_id'])->options(
+            array_merge([['value' => 0, 'label' => '请选择分类']], \app\admin\model\water\WaterThickness::order('id DESC')->field('id as value,name as label')->select()->toArray())
+        )->filterable(true);
+        $f[] = Form::input('weight', '重量(kg)', $data['weight']);
+        $f[] = Form::input('unit_price', '单价', $data['unit_price']);
+        $f[] = Form::input('company', '单位', $data['company']);
+        $f[] = Form::input('long', '长', $data['long']);
+        $f[] = Form::input('wide', '宽', $data['wide']);
+        $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([
+            'name',
+            'type',
+            'th_id',
+            'weight',
+            'unit_price',
+            'company',
+            'long',
+            'wide',
+            'id',
+        ]);
+        $validate = Validate::rule('name', 'require')->rule([
+            'name' => 'require',
+            'type' => 'require',
+            'th_id' => 'require',
+            'weight' => 'require',
+            'unit_price' => 'require',
+            'company' => 'require',
+            'long' => 'require',
+            'wide' => 'require',
+        ]);
+        $validate->message([
+            'name.require' => '名称不能为空',
+            'type.require' => '请选择分类',
+            'th_id.require' => '请选择厚度',
+            'weight.require' => '请填写重量',
+            'unit_price.require' => '请填写单价',
+            'company.require' => '请填写单位',
+            'long.require' => '请填写长度',
+            'wide.require' => '请填写宽度',
+        ]);
+        $details = $model->find($data['id']);
+        $details['name'] = $data['name'];
+        $details['thickness'] = $data['thickness'];
+        $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());
+        }
+
+    }
+
+}

+ 86 - 0
app/admin/model/water/WaterDefault.php

@@ -0,0 +1,86 @@
+<?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 WaterDefault extends BaseModel
+{
+
+    /**
+     * 数据表主键
+     * @var string
+     */
+    protected $pk = 'id';
+
+    /**
+     * 模型名称
+     * @var string
+     */
+    protected $name = 'water_default';
+
+    use ModelTrait;
+    protected $autoWriteTimestamp = true;
+
+
+
+    public static function list($where)
+    {
+        $model = self::order('id DESC');
+
+        if ($where['name'])$model->where('u.uid|u.nickname' , '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();
+
+        foreach ($list as &$item)
+        {
+            $item['side_plate_name'] = '';
+            $item['lacing_name'] = '';
+            $item['fula_name'] = '';
+            $item['roof'] = WaterCate::where('id', $item['roof'])->value('name');
+            $item['floor'] = WaterCate::where('id', $item['floor'])->value('name');
+            $item['column'] = WaterCate::where('id', $item['column'])->value('name');
+
+            $side_plate = explode(',', $item['side_plate']);
+            $number = 1;
+            foreach ($side_plate as $value){
+                $item['side_plate_name'] .= '<div>第'.$number.'层'.WaterCate::where('id', $value)->value('name').'</div>';
+                $number += 1;
+            }
+
+            $lacing = explode(',', $item['lacing']);
+            $number = 1;
+            foreach ($lacing as $value){
+                $item['lacing_name'] .= '<div>第'.$number.'层'.WaterCate::where('id', $value)->value('name').'</div>';
+                $number += 1;
+            }
+
+            $fula = explode(',', $item['fula']);
+            $number = 1;
+            foreach ($fula as $value){
+                $item['fula_name'] .= '<div>第'.$number.'层'.WaterCate::where('id', $value)->value('name').'</div>';
+                $number += 1;
+            }
+        }
+        $data['data'] = $list;
+        return $data;
+
+    }
+
+
+}

+ 199 - 0
app/admin/view/water/water_default/index.php

@@ -0,0 +1,199 @@
+{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="输入用户UID,昵称">-->
+<!--                                    </div>-->
+<!--                                    <label class="layui-form-label" style="top: -5.5px;">搜索会员卡</label>-->
+<!--                                    <div class="layui-input-inline">-->
+<!--                                        <input type="text" id="title" name="title" class="layui-input" placeholder="输入会员卡名称">-->
+<!--                                    </div>-->
+<!--                                    <label class="layui-form-label" style="top: -5.5px;">搜索订单号</label>-->
+<!--                                    <div class="layui-input-inline">-->
+<!--                                        <input type="text" id="order_id" name="order_id" 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:950,w:800})">添加厚度默认</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="is_warm">
+                        {{#  if(d.is_warm == 0){ }}
+                        不需要
+                        {{#  } else if(d.is_warm > 0) { }}
+                        需要
+                        {{#  } }}
+                    </script>
+                    <script type="text/html" id="is_channel">
+                        {{#  if(d.is_channel == 0){ }}
+                        不需要
+                        {{#  } else if(d.is_channel > 0) { }}
+                        需要
+                        {{#  } }}
+                    </script>
+                    <script type="text/html" id="is_ladder">
+                        {{#  if(d.is_ladder == 0){ }}
+                        不需要
+                        {{#  } else if(d.is_ladder == 1) { }}
+                        需要
+                        {{#  } }}
+                    </script>
+                    <script type="text/html" id="is_gc">
+                        {{#  if(d.is_gc == 0){ }}
+                        正常
+                        {{#  } else if(d.is_gc == 1) { }}
+                        大公差
+                        {{#  } }}
+                    </script>
+
+                    <script type="text/html" id="act">
+<!--                        <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" onclick="$eb.createModalFrame('编辑','{:Url('water.WaterQuery/details')}?id={{d.query_id}}',{h:1100,w:1100})">-->
+<!--                            详情-->
+<!--                        </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: 'uid', title: 'UID',  align: 'center'},
+            {field: 'high', title: '高度',  align: 'center'},
+            {field: 'roof', title: '顶板',  align: 'center'},
+            {field: 'floor', title: '底板',  align: 'center'},
+            {field: 'side_plate_name', title: '侧板',  align: 'center'},
+            {field: 'column', title: '立柱',  align: 'center'},
+            {field: 'lacing_name', title: '拉筋', align: 'center'},
+            {field: 'fula_name', title: '辅拉', align: 'center'},
+            {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:'water.water_default',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}

+ 28 - 0
app/api/controller/water/WaterQueryController.php

@@ -5,6 +5,7 @@ namespace app\api\controller\water;
 use app\admin\model\sms\SmsRecord;
 use app\admin\model\user\UserGroup;
 use app\admin\model\water\WaterCate;
+use app\admin\model\water\WaterDefault;
 use app\admin\model\water\WaterMaterial;
 use app\admin\model\water\WaterMaterialScience;
 use app\admin\model\water\WaterQuery;
@@ -541,4 +542,31 @@ class WaterQueryController
     }
 
 
+    /**
+     * 默认选项
+     * @param Request $request
+     * @return mixed
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
+     */
+    public function default(Request $request)
+    {
+        $data = UtilService::getMore(['high']);
+        $list = WaterDefault::where('high', $data['high'])->find();
+
+        if ($list){
+            $list['side_plate'] = explode(',', $list['side_plate']);
+            $list['lacing'] = explode(',', $list['lacing']);
+            $list['fula'] = explode(',', $list['fula']);
+            $list = $list->toArray();
+        }else{
+            $list = [];
+        }
+
+
+        return app('json')->success($list);
+    }
+
+
 }

+ 2 - 0
route/api/route.php

@@ -171,6 +171,8 @@ Route::group(function () {
     Route::post('card/wechat', 'user.UserCardController/wechat')->name('CardWechat');//公众号购买会员卡
     // 获取材料
     Route::get('water/list', 'water.WaterQueryController/list')->name('waterList');
+    //默认选项
+    Route::get('water/default', 'water.WaterQueryController/default')->name('default');
 })->middleware(\app\http\middleware\AllowOriginMiddleware::class)->middleware(\app\http\middleware\AuthTokenMiddleware::class, true);
 //未授权接口
 Route::group(function () {