linwu пре 6 дана
родитељ
комит
b112de7234

+ 132 - 0
app/admin/controller/Seat.php

@@ -0,0 +1,132 @@
+<?php
+
+namespace app\admin\controller;
+
+use app\admin\AdminBaseController;
+use app\common\model\SeatApplyModel;
+use app\common\model\SeatModel;
+use app\common\service\QrcodeService;
+use app\common\validate\SeatValidate;
+use think\exception\ValidateException;
+
+class Seat extends AdminBaseController
+{
+
+    /**
+     * 列表
+     */
+    public function index()
+    {
+        return view('',[
+            'status_list' => SeatModel::STATUS,
+        ]);
+    }
+
+    public function listSeat()
+    {
+        $map = $this->dealEqualInput(['status']);
+
+        $list  = SeatModel::where($map)->limit(input('limit'))->page(input('page'))->append(['status_text'])->select();
+        $count = SeatModel::where($map)->count();
+        if ($count == 0) {
+            ajax_return(1, '未查询到数据');
+        }
+        list_return($list, $count);
+    }
+
+    /**
+     * 编辑
+     */
+    public function seatForm()
+    {
+        $id   = input('id/d, 0');
+        $info = SeatModel::find($id);
+
+        return view('', [
+            'info' => $info,
+            'status_list' => SeatModel::STATUS,
+            'seat_list' => empty($info['seat_list']) ? '[]' : json_encode($info['seat_list']),
+        ]);
+    }
+
+    public function editSeat()
+    {
+        $data = input('post.');
+        try {
+            validate(SeatValidate::class)->check($data);
+        } catch (ValidateException $e) {
+            ajax_return(1, $e->getError());
+        }
+
+        $data['total'] = array_sum($data['seat_list']);
+        if (empty($data['id'])) {
+            SeatModel::create($data);
+        } else {
+            SeatModel::update($data, ['id' => $data['id']]);
+        }
+
+        ajax_return();
+    }
+
+    public function delSeat()
+    {
+        $id    = input('id/d');
+        $check = SeatApplyModel::where('seat_id', $id)->find();
+        if (!empty($check)) {
+            ajax_return(1, '已有投票的活动无法删除!');
+        }
+        SeatModel::destroy($id);
+        ajax_return();
+    }
+
+    /**
+     * 二维码
+     */
+    public function qrcodeSeat()
+    {
+        $id = input('id/d', 0);
+
+        $file_name = "/seat_{$id}.png";
+        $link      = url('/mobile/seat/apply') . '?id=' . $id;
+        $file_url  = QrcodeService::getQrcode($file_name, $link, 600);
+
+        ajax_return(0, '', $file_url);
+    }
+
+    /**
+     * 座位明细
+     */
+    public function apply()
+    {
+        return view('', [
+            'id' => input('id/d', 0),
+        ]);
+    }
+
+    public function listApply()
+    {
+        $map = $this->dealEqualInput(['seat_id']);
+
+        $list  = SeatApplyModel::where($map)->limit(input('limit'))->page(input('page'))->select();
+        $count = SeatApplyModel::where($map)->count();
+        if ($count == 0) {
+            ajax_return(1, '未查询到数据');
+        }
+        list_return($list, $count);
+    }
+
+    public function exportApply()
+    {
+        $map = $this->dealEqualInput(['seat_id']);
+        $list = SeatApplyModel::where($map)->select();
+
+        $xlsCell = [
+            ['name', '姓名'],
+            ['mobile', '手机号'],
+            ['no', '号数'],
+            ['seat', '座位'],
+            ['create_time', '选座时间'],
+        ];
+        export_exl("座位明细表", $xlsCell, $list, ['mobile', 'no']);
+    }
+}

+ 49 - 0
app/admin/view/seat/apply.html

@@ -0,0 +1,49 @@
+<div class="layui-fluid">
+    <div class="layui-card">
+        <div class="layui-card-body">
+            <div style="padding-bottom: 10px;">
+                <button class="layui-btn layuiadmin-btn" data-type="export">导出</button>
+            </div>
+            <table id="{$lay_table}" lay-filter="{$lay_table}"></table>
+        </div>
+    </div>
+</div>
+
+<script>
+    layui.use(['index', 'admin', 'form', 'table'], function () {
+        const $ = layui.$;
+        const form = layui.form;
+        const table = layui.table;
+        form.render();
+
+        table.render({
+            elem: '#{$lay_table}',
+            url: "{:url('seat/listApply')}?seat_id={$id}",
+            cols: [
+                [
+                    {field: 'name', title: '姓名', width: 120},
+                    {field: 'mobile', title: '手机号', width: 160},
+                    {field: 'no', title: '号数', width: 80},
+                    {field: 'seat', title: '座位'},
+                    {field: 'create_time', title: '选座时间', width: 160, align: 'center'},
+                ]
+            ],
+            page: true,
+            limit: 50,
+            cellMinWidth: 150,
+            text: '对不起,加载出现异常!'
+        });
+
+        //事件
+        const active = {
+            export: function () {
+                window.open("{:url('seat/exportApply')}?seat_id={$id}");
+            }
+        };
+
+        $('.layui-btn.layuiadmin-btn').on('click', function () {
+            const type = $(this).data('type');
+            active[type] ? active[type].call(this) : '';
+        });
+    });
+</script>

+ 162 - 0
app/admin/view/seat/index.html

@@ -0,0 +1,162 @@
+<div class="layui-fluid">
+    <div class="layui-card">
+        <div class="layui-form layui-form-pane layui-card-header layuiadmin-card-header-auto">
+            <div class="layui-form-item">
+                <div class="layui-inline">
+                    <label class="layui-form-label">状态</label>
+                    <div class="layui-input-block">
+                        <select name="status">
+                            <option value="">全部状态</option>
+                            {volist name="status_list" id="v"}
+                                <option value="{$key}">{$v}</option>
+                            {/volist}
+                        </select>
+                    </div>
+                </div>
+                <div class="layui-inline">
+                    <button class="layui-btn" lay-submit lay-filter="{$lay_btn}">
+                        <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+                    </button>
+                </div>
+            </div>
+        </div>
+
+        <div class="layui-card-body">
+            <div style="padding-bottom: 10px;">
+                <button class="layui-btn layuiadmin-btn" data-type="add">添加</button>
+            </div>
+            <table id="{$lay_table}" lay-filter="{$lay_table}"></table>
+            <script type="text/html" id="setTpl">
+                <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit">
+                    <i class="layui-icon layui-icon-edit"></i>编辑
+                </a>
+                <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">
+                    <i class="layui-icon layui-icon-delete"></i>删除
+                </a>
+                <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="qrcode">
+                    <i class="layui-icon layui-icon-picture-fine"></i>查看二维码
+                </a>
+                <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="apply">
+                    <i class="layui-icon layui-icon-table"></i>查看明细
+                </a>
+            </script>
+        </div>
+    </div>
+</div>
+
+<script>
+    layui.use(['index', 'admin', 'form', 'table'], function () {
+        const $ = layui.$;
+        const admin = layui.admin;
+        const form = layui.form;
+        const table = layui.table;
+        form.render();
+
+        table.render({
+            elem: '#{$lay_table}',
+            url: "{:url('seat/listSeat')}",
+            cols: [
+                [
+                    {field: 'title', title: '标题'},
+                    {field: 'status_text', title: '状态', width: 80, align: 'center'},
+                    {field: 'apply', title: '已选', width: 80, align: 'center'},
+                    {field: 'total', title: '总数', width: 80, align: 'center'},
+                    {field: 'start_time', title: '时间', width: 160, align: 'center'},
+                    {field: 'create_time', title: '创建时间', width: 160, align: 'center'},
+                    {title: '操作', width: 430, align: 'center', fixed: 'right', toolbar: '#setTpl'}
+                ]
+            ],
+            page: true,
+            limit: 50,
+            cellMinWidth: 150,
+            text: '对不起,加载出现异常!'
+        });
+
+        form.on('submit({$lay_btn})', function (data) {
+            table.reload('{$lay_table}', {
+                where: data.field,
+                page: {
+                    curr: 1
+                }
+            });
+        });
+
+        //事件
+        const active = {
+            add: function () {
+                const index = layer.open({
+                    type: 2,
+                    title: '添加活动',
+                    content: "{:url('seat/seatForm')}",
+                    maxmin: true,
+                    area: ['550px', '550px']
+                });
+                layer.full(index);
+            }
+        };
+
+        //监听工具条
+        table.on('tool({$lay_table})', function (obj) {
+            const data = obj.data;
+            if (obj.event === 'del') {
+                layer.confirm('确定删除吗?', function (index) {
+                    admin.req({
+                        url: "{:url('seat/delSeat')}",
+                        data: {
+                            id: data.id
+                        },
+                        done: function (res) {
+                            layui.table.reload('{$lay_table}');
+                        }
+                    });
+                    layer.close(index);
+                });
+            } else if (obj.event === 'edit') {
+                const index = layer.open({
+                    type: 2,
+                    title: '编辑活动',
+                    content: "{:url('seat/seatForm')}?id=" + data.id,
+                    maxmin: true,
+                    area: ['550px', '550px']
+                });
+                layer.full(index);
+            } else if (obj.event === 'qrcode') {
+                admin.req({
+                    url: "{:url('seat/qrcodeSeat')}?id=" + data.id,
+                    data: {
+                        id: data.id
+                    },
+                    done: function (res) {
+                        layer.photos({
+                            photos: {
+                                "title": "二维码", //相册标题
+                                "id": 1, //相册id
+                                "start": 0, //初始显示的图片序号,默认0
+                                "data": [   //相册包含的图片,数组格式
+                                    {
+                                        "alt": "二维码",
+                                        "pid": 0, //图片id
+                                        "src": res.data, //原图地址
+                                    }
+                                ]
+                            }
+                        });
+                    }
+                });
+            } else if (obj.event === 'apply') {
+                layer.open({
+                    type: 2,
+                    title: '投票明细',
+                    content: "{:url('seat/apply')}?id=" + data.id,
+                    maxmin: true,
+                    area: ['1200px', '550px']
+                });
+            }
+        });
+
+        $('.layui-btn.layuiadmin-btn').on('click', function () {
+            const type = $(this).data('type');
+            active[type] ? active[type].call(this) : '';
+        });
+    });
+</script>

+ 159 - 0
app/admin/view/seat/seat_form.html

@@ -0,0 +1,159 @@
+<div class="layui-fluid">
+    <div class="layui-row layui-col-space15">
+        <div class="layui-col-md12">
+            <div class="layui-form layui-form-pane" lay-filter="{$lay_table}">
+                <div class="layui-card">
+                    <div class="layui-card-header">活动信息</div>
+                    <div class="layui-card-body" pad15>
+                        <input type="hidden" name="id" value="{:array_get($info,'id')}">
+                        <div class="layui-form-item">
+                            <label class="layui-form-label"><span style="color:#f90c05;">*</span>标题</label>
+                            <div class="layui-input-block">
+                                <input type="text" name="title" value="{:array_get($info,'title')}"
+                                       lay-verify="required"
+                                       placeholder="请输入标题" autocomplete="off"
+                                       class="layui-input">
+                            </div>
+                        </div>
+                        <div class="layui-form-item">
+                            <label class="layui-form-label"><span style="color:#f90c05;">*</span>状态</label>
+                            <div class="layui-input-block">
+                                {volist name="status_list" id="v"}
+                                    <input type="radio" name="status" value="{$key}" title="{$v}"
+                                           {eq name=":array_get($info,'status',1)" value="$key" }checked{/eq}>
+                                {/volist}
+                            </div>
+                        </div>
+                        <div class="layui-form-item">
+                            <label class="layui-form-label"><span style="color:#f90c05;">*</span>时间</label>
+                            <div class="layui-input-block">
+                                <input type="text" name="start_time" id="start_time"
+                                       value="{:array_get($info,'start_time')}" lay-verify="required"
+                                       placeholder="请选择..." autocomplete="off" class="layui-input">
+                            </div>
+                        </div>
+                    </div>
+                    <div class="layui-card-header">座位设置</div>
+                    <div class="layui-card-body" pad15>
+                        <div>
+                            <button class="layui-btn layuiadmin-btn" id="add-table" type="button">添加</button>
+                        </div>
+                        <form id="form">
+                            <table class="layui-table">
+                                <colgroup>
+                                    <col width="400">
+                                    <col width="100">
+                                    <col width="100">
+                                </colgroup>
+                                <thead>
+                                <tr>
+                                    <th>排数</th>
+                                    <th>人数</th>
+                                    <th>操作</th>
+                                </tr>
+                                </thead>
+                                <tbody id="tb">
+
+                                </tbody>
+                            </table>
+                        </form>
+                    </div>
+                </div>
+
+                <div class="layui-form-item">
+                    <div class="layui-input-block">
+                        <input type="button" lay-submit lay-filter="{$lay_btn}" value="确认提交" class="layui-btn">
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+<script>
+    layui.use(['index', 'form', 'layedit', 'upload', 'laydate'], function () {
+        const $ = layui.$;
+        const admin = layui.admin;
+        const laydate = layui.laydate;
+        const form = layui.form;
+        form.render();
+
+        laydate.render({
+            elem: '#start_time',
+            type: 'datetime'
+        });
+
+        form.on('submit({$lay_btn})', function (obj) {
+            const index = parent.layer.getFrameIndex(window.name);
+            admin.req({
+                url: "{:url('seat/editSeat')}",
+                type: 'post',
+                data: obj.field,
+                done: function (res) {
+                    layer.msg("提交成功", {
+                        icon: 1
+                    });
+                    parent.layui.table.reload('lay-vote-index-table'); //重载表格
+                    parent.layer.close(index);
+                }
+            });
+        });
+
+        let data = {$seat_list};
+
+        function createTable() {
+            let html = "";
+            data.forEach((v, k) => {
+                html += `<tr>
+                        <td>第${k + 1}排</td>
+                        <td>
+                            <input placeholder="人数"
+                                   name="seat_list[]"
+                                   lay-verify="required"
+                                   value="${v}"
+                                   type="number"
+                                   class="layui-input"/>
+                        </td>
+                        <td>
+                            <button class="layui-btn layui-btn-danger layuiadmin-btn delete-table" type="button" data-index="${k}">删除</button>
+                        </td>
+                </tr>`;
+            });
+
+            $('#tb').html(html);
+        }
+
+        createTable();
+
+        $('#add-table').click(function () {
+            data = getFormData();
+            data.push("");
+            createTable();
+        });
+
+        $("#tb").on('click', '.delete-table', function () {
+            let index = $(this).data('index');
+            if (data.length <= 1) {
+                return false;
+            }
+
+            data = getFormData();
+            data.splice(index, 1);
+            createTable();
+        });
+
+        function getFormData() {
+            let arr = $('#form').serializeArray();
+            if (arr.length === 0) {
+                return arr;
+            }
+
+            let res = [];
+            arr.map((v, k) => {
+                res.push(v.value);
+            })
+
+            return res;
+        }
+    });
+</script>

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

@@ -0,0 +1,17 @@
+<?php
+
+namespace app\common\model;
+
+class SeatApplyModel extends BaseModel
+{
+    // 设置表名
+    protected $name = 'seat_apply';
+
+    //自动完成
+    protected $autoWriteTimestamp = true;
+
+    public function Seat()
+    {
+        return $this->hasOne(SeatModel::class, "id", "seat_id");
+    }
+}

+ 29 - 0
app/common/model/SeatModel.php

@@ -0,0 +1,29 @@
+<?php
+
+namespace app\common\model;
+
+class SeatModel extends BaseModel
+{
+    // 设置表名
+    protected $name = 'seat';
+
+    //自动完成
+    protected $autoWriteTimestamp = true;
+
+    // 设置字段自动转换类型
+    protected $type = [
+        'start_time' => 'timestamp:Y-m-d H:i:s',
+        'seat_list'     => 'array',
+    ];
+
+    // 常量
+    const STATUS = [1 => '进行中', 2 => '已关闭'];
+
+    const STATUS_SHOW = 1;
+    const STATUS_HIDE = 2;
+
+    public function getStatusTextAttr($value, $data)
+    {
+        return self::STATUS[$data['status']];
+    }
+}

+ 23 - 0
app/common/validate/SeatValidate.php

@@ -0,0 +1,23 @@
+<?php
+
+namespace app\common\validate;
+
+use think\Validate;
+
+class SeatValidate extends Validate
+{
+    protected $rule = [
+        'title'      => 'require',
+        'seat_list'  => 'require',
+        'start_time' => 'require',
+        'status'     => 'require',
+    ];
+
+    protected $message = [
+        'title'     => '标题不能为空',
+        'seat_list' => '座位设置列表不能为空',
+        'content'   => '时间不能为空',
+        'status'    => '请选择状态',
+    ];
+
+}

+ 29 - 2
app/mobile/common.php

@@ -18,18 +18,23 @@ function jump($msg = '', $url = null, $wait = 3)
     throw new \think\exception\HttpResponseException($html);
 }
 
-function ajax_success($data)
+function ajax_success($data = '')
 {
     $res      = ['code' => 0, 'msg' => '成功', 'data' => $data];
     $response = \think\Response::create($res, 'json');
     throw new \think\exception\HttpResponseException($response);
 }
 
+function ajax_error($msg = '', $data = [])
+{
+    ajax_return(1, $msg, $data);
+}
+
 function get_user_id()
 {
     $sessionUserId = session('mobile.user.id');
     if (empty($sessionUserId)) {
-        session('back_url',request()->url());
+        session('back_url', request()->url());
         $response = redirect('/mobile/login/login');
         throw new \think\exception\HttpResponseException($response);
     }
@@ -48,3 +53,25 @@ function get_soldier()
     $soldier = \app\common\model\SoldierModel::find($id);
     return $soldier;
 }
+
+function get_open_id()
+{
+    $open_id = session('mobile.open_id');
+    if (empty($open_id)) {
+        $response = redirect('/mobile/seat/login');
+        throw new \think\exception\HttpResponseException($response);
+    }
+
+    return $open_id;
+}
+
+function tip($title = '', $msg = '')
+{
+    $result = [
+        'title' => $title,
+        'msg'   => $msg,
+    ];
+
+    $html = view('/public/tip', $result);
+    throw new \think\exception\HttpResponseException($html);
+}

+ 146 - 0
app/mobile/controller/Seat.php

@@ -0,0 +1,146 @@
+<?php
+
+namespace app\mobile\controller;
+
+use app\common\model\SeatApplyModel;
+use app\common\model\SeatModel;
+use app\mobile\MobileBaseController;
+use think\facade\Db;
+
+class Seat extends MobileBaseController
+{
+    public function apply()
+    {
+        $id = input('id', 0);
+        if (empty($id)) {
+            $id = session('mobile.seat.id');
+            if (empty($id)) {
+                jump('该活动不存在或已结束');
+            }
+        } else {
+            session('mobile.seat.id', $id);
+        }
+
+        $seat = SeatModel::where('id', $id)->find();
+        if (empty($seat)) {
+            jump('该活动不存在或已结束');
+        }
+
+        session('mobile.seat.id', $id);
+        $open_id = get_open_id();
+
+        $apply = SeatApplyModel::where('open_id', $open_id)->where('seat_id', $id)->find();
+        if (empty($apply)) {
+            if ($seat['apply'] >= $seat['total']) {
+                jump('提示', '座位已被选完');
+            } else {
+                return redirect(url('seat/fillInfo'));
+            }
+        } else {
+            tip('选座成功', $apply['seat']);
+        }
+    }
+
+    public function fillInfo()
+    {
+        $id = session('mobile.seat.id');
+        if (empty($id)) {
+            jump('该活动不存在或已结束');
+        }
+
+        get_open_id();
+
+        return view();
+    }
+
+    public function fillInfoPost()
+    {
+        $data = input('param.');
+        if (empty($data['name'])) {
+            ajax_error('姓名不能为空');
+        }
+
+        if (empty($data['mobile'])) {
+            ajax_error('手机号不能为空');
+        }
+
+        $id      = session('mobile.seat.id');
+        $open_id = get_open_id();
+        Db::startTrans();
+        try {
+            //是否还有座位
+            $seat = SeatModel::where('id', $id)->lock(true)->find();
+            if ($seat['apply'] >= $seat['total']) {
+                throw new \Exception('座位已被选完');
+            }
+
+            //报名人数+1
+            $seat->apply++;
+            $seat->save();
+
+            //报名明细
+            $apply_info = [
+                'seat_id' => $id,
+                'no'      => $seat->apply,
+                'open_id' => $open_id,
+                'name'    => $data['name'],
+                'mobile'  => $data['mobile'],
+            ];
+
+            $no        = $seat->apply;
+            $seat_info = '';
+            foreach ($seat['seat_list'] as $k => $v) {
+                if ($no <= $v) {
+                    $seat_info = ($k + 1) . "排" . $no . '座';
+                    break;
+                } else {
+                    $no -= $v;
+                }
+            }
+            $apply_info['seat'] = $seat_info;
+            SeatApplyModel::create($apply_info);
+
+            // 提交事务
+            Db::commit();
+        } catch (\Exception $e) {
+            // 回滚事务
+            Db::rollback();
+            ajax_error('座位已被选完');
+        }
+
+        ajax_success();
+    }
+
+    public function showSeat()
+    {
+        $id      = session('mobile.seat.id');
+        $open_id = get_open_id();
+
+        $seat = SeatApplyModel::where('seat_id', $id)->where('open_id',$open_id)->find();
+
+        tip('座位信息',$seat['seat']);
+    }
+
+    public function login()
+    {
+        return redirect('https://www.jucai.gov.cn/api/auth/wechat_auth?url=' . urlencode(url('/mobile/seat/wechatBack')));
+    }
+
+    /**
+     * 微信回调
+     */
+    public function wechatBack()
+    {
+        $param   = input('param.');
+        session('mobile.open_id',$param['openid']);
+
+        return redirect(url('seat/apply'));
+    }
+
+    public function login1()
+    {
+        session('mobile.open_id','linwu');
+
+        return '登录成功';
+    }
+}

+ 41 - 0
app/mobile/view/public/tip.html

@@ -0,0 +1,41 @@
+{extend name="public/base"/}
+{block name="css"}
+<style>
+    .icon{
+        text-align:center;
+        margin-top:50px;
+    }
+
+    .msg{
+        text-align:center;
+        margin:0;
+        padding:0;
+        font-size:24px;
+    }
+</style>
+{/block}
+{block name="body"}
+<van-nav-bar
+        class="nav-theme"
+        :fixed="true"
+        :placeholder="true"
+>
+    <template #title>
+        <span class="text-white">{$title}</span>
+    </template>
+</van-nav-bar>
+<div style="width:100%;height:46px;"></div>
+<div class="icon">
+    <van-icon name="warning-o" size="160" color="#0081ff"></van-icon>
+</div>
+<h3 class="msg">{$msg}</h3>
+{/block}
+{block name="script"}
+<script>
+    function v_setup() {
+        let base = {};
+
+        return base;
+    }
+</script>
+{/block}

+ 75 - 0
app/mobile/view/seat/fill_info.html

@@ -0,0 +1,75 @@
+{extend name="public/base"/}
+{block name="css"}
+{/block}
+{block name="body"}
+<van-nav-bar
+        class="nav-theme"
+        :fixed="true"
+        :placeholder="true"
+>
+    <template #title>
+        <span class="text-white">信息填写</span>
+    </template>
+</van-nav-bar>
+<van-form @submit="onSubmit">
+    <van-cell-group>
+        <van-field
+                v-model="form.name"
+                required
+                type="text"
+                label="姓名"
+                placeholder="请输入参会人姓名"
+                :rules="[{ required: true, message: '请输入姓名' }]"
+        ></van-field>
+        <van-field
+                v-model="form.mobile"
+                required
+                type="mobile"
+                label="手机号"
+                placeholder="请输入参会人手机号"
+                :rules="[{ required: true, message: '请输入手机号' }]"
+        ></van-field>
+    </van-cell-group>
+    <div style="margin: 16px;">
+        <van-button round block type="primary" native-type="submit">
+            提交
+        </van-button>
+    </div>
+</van-form>
+{/block}
+{block name="script"}
+<script>
+    function v_setup() {
+        let base = {};
+
+        base.form = Vue.reactive({
+            name: '',
+            mobile: '',
+        });
+
+        base.flag = false;
+        //表单提交
+        base.onSubmit = () => {
+            if (base.flag) {
+                return;
+            }
+
+            base.flag = true;
+
+            postJson('/seat/fillInfoPost',base.form,function(data) {
+                vant.showToast(data.msg);
+                base.flag = false;
+            }).then(() => {
+                vant.showDialog({
+                    title: '提示',
+                    message: '报名成功',
+                }).then(() => {
+                    location.href = "{:url('seat/showSeat')}";
+                });
+            });
+        };
+
+        return base;
+    }
+</script>
+{/block}