moonsflyer 2 месяцев назад
Родитель
Сommit
54b3d87941

+ 0 - 109
app/admin/controller/activity_area/Area.php

@@ -1,109 +0,0 @@
-<?php
-// +----------------------------------------------------------------------
-// | likeshop开源商城系统
-// +----------------------------------------------------------------------
-// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
-// | gitee下载:https://gitee.com/likeshop_gitee
-// | github下载:https://github.com/likeshop-github
-// | 访问官网:https://www.likeshop.cn
-// | 访问社区:https://home.likeshop.cn
-// | 访问手册:http://doc.likeshop.cn
-// | 微信公众号:likeshop技术社区
-// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
-// |  likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
-// | 禁止对系统程序代码以任何目的,任何形式的再发布
-// | likeshop团队版权所有并拥有最终解释权
-// +----------------------------------------------------------------------
-// | author: likeshop.cn.team
-// +----------------------------------------------------------------------
-namespace app\admin\controller\activity_area;
-
-use app\common\basics\AdminBase;
-use app\common\server\JsonServer;
-use think\facade\View;
-use app\admin\validate\activity_area\AreaValidate;
-use app\admin\logic\activity_area\AreaLogic;
-use app\admin\logic\activity_area\GoodsLogic;
-
-/**
- * Class Area
- * @package app\admin\controller\activity_area
- */
-class Area extends AdminBase
-{
-    /**
-     * @notes 活动专区列表
-     * @return \think\response\Json|\think\response\View
-     * @author suny
-     * @date 2021/7/13 6:57 下午
-     */
-    public function lists()
-    {
-
-        if ($this->request->isAjax()) {
-            $get = $this->request->get();
-            $lists = AreaLogic::lists($get);
-            return JsonServer::success('获取成功', $lists);
-        }
-        return View();
-    }
-
-    /**
-     * @notes 新增活动专区
-     * @return \think\response\Json|\think\response\View
-     * @author suny
-     * @date 2021/7/13 6:57 下午
-     */
-    public function add()
-    {
-
-        if ($this->request->isAjax()) {
-            $post = $this->request->post();
-            $post['del'] = 0;
-            (new AreaValidate())->goCheck('add', $post);
-            AreaLogic::add($post);
-            return JsonServer::success('添加成功');
-        }
-        return View();
-    }
-
-    /**
-     * @notes 编辑活动专区
-     * @return \think\response\Json|\think\response\View
-     * @author suny
-     * @date 2021/7/13 6:57 下午
-     */
-    public function edit()
-    {
-
-        if ($this->request->isAjax()) {
-            $post = $this->request->post();
-            $post['del'] = 0;
-            $post['status'] = isset($post['status']) ? 1 : 0;
-            (new AreaValidate())->goCheck('edit', $post);
-            AreaLogic::edit($post);
-            return JsonServer::success('修改成功');
-        }
-        $id = $this->request->get('id');
-        $detail = AreaLogic::getActivityArea($id);
-        View::assign('detail', $detail);
-        return View();
-    }
-
-
-    /**
-     * @notes 删除活动专区
-     * @return \think\response\Json
-     * @author suny
-     * @date 2021/7/13 6:57 下午
-     */
-    public function del()
-    {
-
-        $id = $this->request->post('id');
-        (new AreaValidate())->goCheck('del', ['id' => $id]);
-
-        return JsonServer::success('删除成功', [AreaLogic::del($id)]);
-    }
-
-}

+ 0 - 125
app/admin/controller/activity_area/Goods.php

@@ -1,125 +0,0 @@
-<?php
-// +----------------------------------------------------------------------
-// | likeshop开源商城系统
-// +----------------------------------------------------------------------
-// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
-// | gitee下载:https://gitee.com/likeshop_gitee
-// | github下载:https://github.com/likeshop-github
-// | 访问官网:https://www.likeshop.cn
-// | 访问社区:https://home.likeshop.cn
-// | 访问手册:http://doc.likeshop.cn
-// | 微信公众号:likeshop技术社区
-// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
-// |  likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
-// | 禁止对系统程序代码以任何目的,任何形式的再发布
-// | likeshop团队版权所有并拥有最终解释权
-// +----------------------------------------------------------------------
-// | author: likeshop.cn.team
-// +----------------------------------------------------------------------
-
-namespace app\admin\controller\activity_area;
-
-use app\common\basics\AdminBase;
-use app\common\server\JsonServer;
-use think\facade\View;
-use app\admin\logic\activity_area\AreaLogic;
-use app\admin\logic\activity_area\GoodsLogic;
-use app\admin\validate\activity_area\ActivityGoods;
-
-/**
- * Class Goods
- * @package app\admin\controller\activity_area
- */
-class Goods extends AdminBase
-{
-
-    /**
-     * @notes 活动专区商品列表
-     * @return \think\response\Json|\think\response\View
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     * @author suny
-     * @date 2021/7/13 6:58 下午
-     */
-    public function lists()
-    {
-
-        if ($this->request->isAjax()) {
-            $get = $this->request->get();
-            $list = GoodsLogic::lists($get);
-            return JsonServer::success('获取成功', $list);
-        }
-        $activity_area = AreaLogic::getActivityAreaAll();
-        $num = GoodsLogic::getNum();
-        View::assign('num', $num);
-        View::assign('activity_area', $activity_area);
-        return View();
-    }
-
-    /**
-     * @notes 活动专区商品审核
-     * @return \think\response\Json|\think\response\View
-     * @author suny
-     * @date 2021/7/13 6:58 下午
-     */
-    public function audit()
-    {
-
-        if ($this->request->isAjax()) {
-            $post = $this->request->post();
-            (new ActivityGoods())->goCheck('audit', $post);
-            $result = GoodsLogic::audit($post);
-            if ($result) {
-                return JsonServer::success('操作成功');
-            }
-            return JsonServer::error('操作失败');
-        }
-        $id = $this->request->get('id');
-        $detail = GoodsLogic::getActivityAreaGoods($id);
-        View::assign('detail', $detail);
-        View::assign('id', $id);
-        return View();
-    }
-
-    /**
-     * @notes 违规操作
-     * @return \think\response\Json|\think\response\View
-     * @author suny
-     * @date 2021/7/13 6:58 下午
-     */
-    public function violation()
-    {
-
-        if ($this->request->isAjax()) {
-            $post = $this->request->post();
-            $id = $post['id'];
-            (new ActivityGoods())->goCheck('violation', $post);
-            $result = GoodsLogic::violation($post);
-            if ($result) {
-                return JsonServer::success('操作成功');
-            }
-            return JsonServer::error('操作失败');
-        }
-        $id = $this->request->get('id');
-        $detail = GoodsLogic::getActivityAreaGoods($id);
-        View::assign('detail', $detail);
-        View::assign('id', $id);
-        return View();
-    }
-
-    /**
-     * @notes 活动商品详情
-     * @return \think\response\View
-     * @author suny
-     * @date 2021/7/13 6:58 下午
-     */
-    public function detail()
-    {
-
-        $get = $this->request->get();
-        $detail = GoodsLogic::detail($get);
-        View::assign('detail', $detail);
-        return View();
-    }
-}

+ 0 - 142
app/admin/logic/activity_area/AreaLogic.php

@@ -1,142 +0,0 @@
-<?php
-// +----------------------------------------------------------------------
-// | likeshop开源商城系统
-// +----------------------------------------------------------------------
-// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
-// | gitee下载:https://gitee.com/likeshop_gitee
-// | github下载:https://github.com/likeshop-github
-// | 访问官网:https://www.likeshop.cn
-// | 访问社区:https://home.likeshop.cn
-// | 访问手册:http://doc.likeshop.cn
-// | 微信公众号:likeshop技术社区
-// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
-// |  likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
-// | 禁止对系统程序代码以任何目的,任何形式的再发布
-// | likeshop团队版权所有并拥有最终解释权
-// +----------------------------------------------------------------------
-// | author: likeshop.cn.team
-// +----------------------------------------------------------------------
-namespace app\admin\logic\activity_area;
-
-use app\common\basics\Logic;
-use app\common\server\JsonServer;
-use think\facade\Db;
-use app\common\model\activity_area\ActivityArea;
-use app\common\model\activity_area\ActivityAreaGoods;
-use app\common\server\UrlServer;
-
-/**
- * Class AreaLogic
- * @package app\admin\logic\activity_area
- */
-class  AreaLogic extends Logic
-{
-
-    /**
-     * @notes 活动专区列表
-     * @param $get
-     * @return array
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     * @author suny
-     * @date 2021/7/14 9:53 上午
-     */
-    public static function lists($get)
-    {
-
-        $where[] = ['del', '=', 0];
-        $lists = ActivityArea::where($where)
-            ->page($get['page'], $get['limit'])
-            ->select();
-
-        $count = ActivityArea::where($where)
-            ->count();
-
-        return ['count' => $count, 'lists' => $lists];
-    }
-
-    /**
-     * @notes 添加活动专区
-     * @param $post
-     * @return int|string
-     * @author suny
-     * @date 2021/7/14 9:53 上午
-     */
-    public static function add($post)
-    {
-
-        $post['create_time'] = time();
-        if (isset($post['status']) && $post['status'] == 'on') {
-            $post['status'] = 1; //专区显示
-        } else {
-            $post['status'] = 0; //专区隐藏
-        }
-        $post['image'] = UrlServer::setFileUrl($post['image']);
-        return ActivityArea::insert($post);
-    }
-
-    /**
-     * @notes 获取活动专区
-     * @param $id
-     * @return mixed
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     * @author suny
-     * @date 2021/7/14 9:53 上午
-     */
-    public static function getActivityArea($id)
-    {
-
-        $data = ActivityArea::where(['id' => $id, 'del' => 0])->find();
-        $data = $data->getData();
-        $data['image'] = UrlServer::getFileUrl($data['image']);
-        return $data;
-    }
-
-    /**
-     * @notes 获取所有活动专区
-     * @return \think\Collection
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     * @author suny
-     * @date 2021/7/14 9:53 上午
-     */
-    public static function getActivityAreaAll()
-    {
-
-        return ActivityArea::where(['del' => 0])
-            ->select();
-    }
-
-    /**
-     * @notes 编辑活动专区
-     * @param $post
-     * @return ActivityArea
-     * @author suny
-     * @date 2021/7/14 9:53 上午
-     */
-    public static function edit($post)
-    {
-
-        $post['image'] = UrlServer::setFileUrl($post['image']);
-        return ActivityArea::update($post);
-    }
-
-    /**
-     * @notes 删除活动专区
-     * @param $id
-     * @return bool
-     * @author suny
-     * @date 2021/7/14 9:54 上午
-     */
-    public static function del($id)
-    {
-
-        $AreaResult = ActivityArea::update(['del' => 1, 'id' => $id]);
-        $AreaGoodsResult = ActivityAreaGoods::where('activity_area_id', $id)->update(['del' => 1]);
-        return $AreaResult;
-    }
-}

+ 0 - 193
app/admin/logic/activity_area/GoodsLogic.php

@@ -1,193 +0,0 @@
-<?php
-// +----------------------------------------------------------------------
-// | likeshop开源商城系统
-// +----------------------------------------------------------------------
-// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
-// | gitee下载:https://gitee.com/likeshop_gitee
-// | github下载:https://github.com/likeshop-github
-// | 访问官网:https://www.likeshop.cn
-// | 访问社区:https://home.likeshop.cn
-// | 访问手册:http://doc.likeshop.cn
-// | 微信公众号:likeshop技术社区
-// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
-// |  likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
-// | 禁止对系统程序代码以任何目的,任何形式的再发布
-// | likeshop团队版权所有并拥有最终解释权
-// +----------------------------------------------------------------------
-// | author: likeshop.cn.team
-// +----------------------------------------------------------------------
-namespace app\admin\logic\activity_area;
-
-use app\common\model\activity_area\ActivityAreaGoods;
-use app\common\basics\Logic;
-use app\common\server\UrlServer;
-use think\facade\Db;
-
-/**
- * Class GoodsLogic
- * @package app\admin\logic\activity_area
- */
-class GoodsLogic extends Logic
-{
-
-    /**
-     * @notes 活动专区商品列表
-     * @param $get
-     * @return array
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     * @author suny
-     * @date 2021/7/14 9:54 上午
-     */
-    public static function lists($get)
-    {
-
-        $where[] = ['AG.del', '=', 0];
-        if (!isset($get['type'])) {
-            $get['type'] = 1;
-        }
-        switch ($get['type']) {
-            case 1:
-                $audit_status = ActivityAreaGoods::AUDIT_STATUS_PASS;
-                break;
-            case 0:
-                $audit_status = ActivityAreaGoods::AUDIT_STATUS_WAIT;
-                break;
-            case 2:
-                $audit_status = ActivityAreaGoods::AUDIT_STATUS_REFUSE;
-                break;
-        }
-        $where[] = ['AG.audit_status', '=', $audit_status];
-
-        if (isset($get['shop_name']) && $get['shop_name']) {
-            $where[] = ['S.name', 'like', '%' . $get['shop_name'] . '%'];
-        }
-
-        if (isset($get['goods_name']) && $get['goods_name']) {
-            $where[] = ['G.name', 'like', '%' . $get['goods_name'] . '%'];
-        }
-
-        if (isset($get['activity_area']) && $get['activity_area']) {
-            $where[] = ['AA.id', '=', $get['activity_area']];
-        }
-
-        $count = ActivityAreaGoods::alias('AG')
-            ->join('activity_area AA', 'AG.activity_area_id = AA.id')
-            ->join('shop S', 'S.id = AG.shop_id')
-            ->join('goods G', 'AG.Goods_id = G.id')
-            ->where($where)
-            ->count();
-
-        $lists = ActivityAreaGoods::alias('AG')
-            ->join('activity_area AA', 'AG.activity_area_id = AA.id')
-            ->join('goods G', 'AG.Goods_id = G.id')
-            ->join('shop S', 'S.id = AG.shop_id')
-            ->where($where)
-            ->field('AG.id,AG.goods_id,AG.activity_area_id,AG.audit_status,AG.audit_remark,AA.name as activity_area_name,G.id as gid,G.name,G.image,G.min_price,G.max_price,S.id as sid,S.name as shop_name,S.type')
-            ->order('AG.id desc')
-            ->page($get['page'], $get['limit'])
-            ->select();
-
-        return ['count' => $count, 'lists' => $lists];
-    }
-
-    /**
-     * @notes 获取活动专区商品
-     * @param $id
-     * @return \think\Collection
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     * @author suny
-     * @date 2021/7/14 9:55 上午
-     */
-    public static function getActivityAreaGoods($id)
-    {
-
-        return ActivityAreaGoods::where(['del' => 0, 'id' => $id])
-            ->select();
-    }
-
-    /**
-     * @notes 审核
-     * @param $post
-     * @return ActivityAreaGoods
-     * @author suny
-     * @date 2021/7/14 9:55 上午
-     */
-    public static function audit($post)
-    {
-
-        $data = [
-            'audit_status' => $post['review_status'],
-            'audit_remark' => $post['description'],
-        ];
-        return ActivityAreaGoods::where(['id' => $post['id']])
-            ->update($data);
-    }
-
-    /**
-     * @notes 违规重审
-     * @param $post
-     * @return ActivityAreaGoods
-     * @author suny
-     * @date 2021/7/14 9:55 上午
-     */
-    public static function violation($post)
-    {
-
-        $data = [
-            'audit_status' => 2,
-            'audit_remark' => $post['description'],
-        ];
-        return ActivityAreaGoods::where(['id' => $post['id']])
-            ->update($data);
-    }
-
-    /**
-     * @notes 活动专区商品详情
-     * @param $get
-     * @return array
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     * @author suny
-     * @date 2021/7/14 9:55 上午
-     */
-    public static function detail($get)
-    {
-
-        $where = [];
-        $where['AG.id'] = $get['id'];
-        $info = ActivityAreaGoods::alias('AG')
-            ->join('activity_area AA', 'AG.activity_area_id = AA.id')
-            ->join('goods G', 'AG.Goods_id = G.id')
-            ->join('shop S', 'S.id = AG.shop_id')
-            ->where($where)
-            ->field('AG.id,AG.goods_id,AG.activity_area_id,AG.audit_status,AG.audit_remark,AA.name as activity_area_name,AA.image as aimage,G.id as gid,G.name,G.image,G.min_price,G.max_price,S.id as sid,S.name as shop_name,S.type')
-            ->find()->toArray();
-        $info['aimage'] = UrlServer::getFileUrl($info['aimage']);
-        return $info;
-    }
-
-    /**
-     * @notes 获取各列表数量
-     * @return array
-     * @author suny
-     * @date 2021/7/14 9:55 上午
-     */
-    public static function getNum()
-    {
-
-        $unaudit = ActivityAreaGoods::where(['audit_status' => 0, 'del' => 0])->count('id');
-        $audit_pass = ActivityAreaGoods::where(['audit_status' => 1, 'del' => 0])->count('id');
-        $audit_refund = ActivityAreaGoods::where(['audit_status' => 2, 'del' => 0])->count('id');
-        $num = [
-            'unaudit' => $unaudit,
-            'audit_pass' => $audit_pass,
-            'audit_refund' => $audit_refund
-        ];
-        return $num;
-    }
-}

+ 0 - 40
app/admin/validate/activity_area/ActivityGoods.php

@@ -1,40 +0,0 @@
-<?php
-// +----------------------------------------------------------------------
-// | likeshop开源商城系统
-// +----------------------------------------------------------------------
-// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
-// | gitee下载:https://gitee.com/likeshop_gitee
-// | github下载:https://github.com/likeshop-github
-// | 访问官网:https://www.likeshop.cn
-// | 访问社区:https://home.likeshop.cn
-// | 访问手册:http://doc.likeshop.cn
-// | 微信公众号:likeshop技术社区
-// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
-// |  likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
-// | 禁止对系统程序代码以任何目的,任何形式的再发布
-// | likeshop团队版权所有并拥有最终解释权
-// +----------------------------------------------------------------------
-// | author: likeshop.cn.team
-// +----------------------------------------------------------------------
-namespace app\admin\validate\activity_area;
-
-use think\facade\Db;
-use app\common\basics\Validate;
-
-
-class ActivityGoods extends Validate
-{
-    protected $rule = [
-        'review_status' => 'require',
-        'description' => 'require',
-    ];
-    protected $message = [
-        'review_status.require' => '请选择审核状态',
-        'description.require' => '请填写审核说明',
-
-    ];
-    protected $scene = [
-        'audit' => ['review_status', 'description'],
-        'violation' => ['description'],
-    ];
-}

+ 0 - 55
app/admin/validate/activity_area/AreaValidate.php

@@ -1,55 +0,0 @@
-<?php
-// +----------------------------------------------------------------------
-// | likeshop开源商城系统
-// +----------------------------------------------------------------------
-// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
-// | gitee下载:https://gitee.com/likeshop_gitee
-// | github下载:https://github.com/likeshop-github
-// | 访问官网:https://www.likeshop.cn
-// | 访问社区:https://home.likeshop.cn
-// | 访问手册:http://doc.likeshop.cn
-// | 微信公众号:likeshop技术社区
-// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
-// |  likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
-// | 禁止对系统程序代码以任何目的,任何形式的再发布
-// | likeshop团队版权所有并拥有最终解释权
-// +----------------------------------------------------------------------
-// | author: likeshop.cn.team
-// +----------------------------------------------------------------------
-namespace app\admin\validate\activity_area;
-use app\common\basics\Validate;
-use think\facade\Db;
-
-class AreaValidate extends Validate{
-    protected $rule = [
-        'id'        => 'require',
-        'name'      => 'require|unique:activity_area,name^del',
-        'synopsis'  => 'require',
-        'image'     => 'require',
-     ];
-
-    protected $message = [
-        'name.require'      => '请输入专区名称',
-        'name.unique'       => '专区名称重复',
-        'image.require'       => '封面图不能为空',
-        'synopsis.require'  => '请专区简介',
-    ];
-    protected $scene = [
-        'add' => ['name','synopsis','image'],
-        'edit' => [['id','checkArea'],'name','synopsis','image'],
-        'del' => ['id']
-    ];
-    //验证活动专区(多商户)
-//    public function checkArea($value,$rule,$data){
-//
-//        $goods = Db::name('activity_area_goods')
-//                ->where(['del'=>0,'activity_area_id'=>$value])
-//                ->find();
-//        halt($goods);
-//        if($goods){
-//            return '该活动专区已被使用,无法删除';
-//        }
-//        return true;
-//
-//    }
-}

+ 0 - 74
app/admin/view/activity_area/area/add.html

@@ -1,74 +0,0 @@
-{layout name="layout2" /}
-<style>
-    .reqRed::before {
-        content: '*';
-        color: red;
-        margin-right: 5px;
-    }
-    .layui-form-label {
-        width: 120px;
-    }
-</style>
-<div class="layui-form" lay-filter="layuiadmin-form" id="layuiadmin-form" style="padding: 20px 30px 0 0;">
-    <div class="layui-form-item">
-        <label class="layui-form-label reqRed">专区名称:</label>
-        <div class="layui-input-inline">
-            <input type="text" name="name" lay-vertype="tips" autocomplete="off" class="layui-input">
-        </div>
-    </div>
-    <!--活动专区封面图-->
-    <div class="layui-form-item">
-        <label class="layui-form-label reqRed">封面图:</label>
-        <div class="layui-input-inline">
-            <div class="like-upload-image">
-                <div class="upload-image-elem"><a class="add-upload-image"> + 添加图片</a></div>
-            </div>
-        </div>
-        <div class="layui-form-item">
-            <label class="layui-form-label"></label>
-            <label class=" layui-form-mid layui-word-aux">专区封面图。建议尺寸:宽100px*高100px,jpg,jpeg,png格式</label>
-        </div>
-    </div>
-
-    <div class="layui-form-item">
-        <label class="layui-form-label reqRed">专区描述:</label>
-        <div class="layui-input-inline">
-            <textarea name="synopsis" lay-verify="required"  class="layui-textarea"></textarea>
-        </div>
-    </div>
-    <div class="layui-form-item">
-        <label class="layui-form-label">专区状态:</label>
-        <div class="layui-input-inline">
-            <input type="checkbox" lay-filter="disable" name="status" lay-skin="switch" lay-text="显示|隐藏">
-<!--            <div class=" layui-form-mid layui-word-aux">显示或者隐藏商品栏目</div>-->
-        </div>
-    </div>
-
-
-    <div class="layui-form-item layui-hide">
-        <input type="button" lay-submit lay-filter="add-submit" id="add-submit" value="确认">
-    </div>
-</div>
-
-<script>
-    layui.use(['form'], function(){
-        var $ = layui.$
-            ,form = layui.form;
-
-        like.delUpload();
-        $(document).on("click", ".add-upload-image", function () {
-            like.imageUpload({
-                limit: 1,
-                field: "image",
-                that: $(this)
-            });
-        });
-
-        //删除图片/证书
-        $(document).on('click', '.pay-img-del-x', function () {
-            $(this).parent().siblings('input').val('');
-            $(this).parent().siblings().css('display','block');
-            $(this).parent().remove();
-        });
-    })
-</script>

+ 0 - 80
app/admin/view/activity_area/area/edit.html

@@ -1,80 +0,0 @@
-{layout name="layout2" /}
-<style>
-    .reqRed::before {
-        content: '*';
-        color: red;
-        margin-right: 5px;
-    }
-    .layui-form-label {
-        width: 120px;
-    }
-</style>
-<div class="layui-form" lay-filter="layuiadmin-form" id="layuiadmin-form" style="padding: 20px 30px 0 0;">
-    <input type="hidden" name="id" value="{$detail.id}" >
-    <div class="layui-form-item">
-        <label class="layui-form-label reqRed">专区名称:</label>
-        <div class="layui-input-inline">
-            <input type="text" name="name" value="{$detail.name}" lay-vertype="tips" autocomplete="off" class="layui-input">
-        </div>
-    </div>
-
-    <!--活动专区封面图-->
-    <div class="layui-form-item">
-        <label class="layui-form-label reqRed">封面图:</label>
-        <div class="layui-input-inline">
-            {if $detail.image}
-            <div class="upload-image-div">
-                <img src="{$detail.image}" alt="img">
-                <input type="hidden" name="image" value="{$detail.image}">
-                <div class="del-upload-btn">x</div>
-            </div>
-            <div class="upload-image-elem" style="display:none;"><a class="add-upload-image" id="image"> + 添加图片</a></div>
-            {else}
-            <div class="upload-image-elem"><a class="add-upload-image" id="image"> + 添加图片</a></div>
-            {/if}
-        </div>
-        <div class="layui-form-item">
-            <label class="layui-form-label"></label>
-            <label class=" layui-form-mid layui-word-aux">活动专区封面图。建议尺寸:宽100px*高100px,jpg,jpeg,png格式</label>
-        </div>
-    </div>
-
-    <div class="layui-form-item">
-        <label class="layui-form-label reqRed">专区描述:</label>
-        <div class="layui-input-inline">
-            <textarea name="synopsis" lay-verify="required"  class="layui-textarea">{$detail.synopsis}</textarea>
-        </div>
-    </div>
-    <div class="layui-form-item">
-        <label class="layui-form-label">专区状态:</label>
-        <div class="layui-input-inline">
-            <input type="checkbox" lay-filter="disable" name="status" lay-skin="switch" lay-text="显示|隐藏" {if ($detail.status == 1)}checked{/if} />
-            <!--            <div class=" layui-form-mid layui-word-aux">显示或者隐藏商品栏目</div>-->
-        </div>
-    </div>
-    <div class="layui-form-item layui-hide">
-        <input type="button" lay-submit lay-filter="edit-submit" id="edit-submit" value="确认">
-    </div>
-</div>
-<script>
-    layui.use(['form'], function(){
-        var $ = layui.$
-            ,form = layui.form;
-
-        like.delUpload();
-        $(document).on("click", ".add-upload-image", function () {
-            like.imageUpload({
-                limit: 1,
-                field: "image",
-                that: $(this)
-            });
-        });
-
-        //删除图片
-        $(document).on('click', '.pay-img-del-x', function () {
-            $(this).parent().siblings('input').val('');
-            $(this).parent().siblings().css('display','block');
-            $(this).parent().remove();
-        });
-    })
-</script>

+ 0 - 170
app/admin/view/activity_area/area/lists.html

@@ -1,170 +0,0 @@
-{layout name="layout1" /}
-<div class="wrapper">
-    <div class="layui-card">
-        <div class="layui-collapse like-layui-collapse" lay-accordion="" style="border:1px dashed #c4c4c4">
-            <div class="layui-colla-item">
-                <h2 class="layui-colla-title like-layui-colla-title" style="background-color: #fff">操作提示</h2>
-                <div class="layui-colla-content layui-show">
-                    <p>*活动专区能很方便的聚合需要促销的商品,形成各类专题页。</p>
-                    <p>*平台需要先设置好活动专区,商家可以选择需要参与的活动专区。</p>
-                    <p>*删除专区会移除所有参与该专区的商品,请谨慎操作。</p>
-                </div>
-            </div>
-        </div>
-        <div class="layui-card-body">
-            <!--添加按钮-->
-            <div style="padding-bottom: 10px;">
-                <button class="layui-btn layui-btn-sm layuiadmin-btn-handle {$view_theme_color}" data-type="add">新增专区</button>
-            </div>
-
-            <!--表格-->
-            <table id="lists" lay-filter="lists"></table>
-
-            <script type="text/html" id="lists-operation">
-                <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit"><i class="layui-icon"></i>编辑</a>
-                <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i class="layui-icon"></i>删除</a>
-            </script>
-        </div>
-    </div>
-</div>
-
-<script>
-    layui.use(['table'], function(){
-        var form = layui.form
-            ,table = layui.table;
-
-        //监听搜索
-        form.on('submit(lists-search)', function(data){
-            var field = data.field;
-            //执行重载
-            table.reload('lists', {
-                where: field
-            });
-        });
-
-
-        //事件
-        var active = {
-            add: function(){
-                layer.open({
-                    type: 2
-                    ,title: '新增活动专区'
-                    ,content: '{:url("activity_area.area/add")}'
-                    ,area: ['60%', '60%']
-                    ,btn: ['确定', '取消']
-                    ,yes: function(index, layero){
-                        var iframeWindow = window['layui-layer-iframe'+ index]
-                            ,submitID = 'add-submit'
-                            ,submit = layero.find('iframe').contents().find('#'+ submitID);
-                        //监听提交
-                        iframeWindow.layui.form.on('submit('+ submitID +')', function(data){
-                            var field = data.field;
-                            like.ajax({
-                                url:'{:url("activity_area.area/add")}',
-                                data:field,
-                                type:"post",
-                                success:function(res)
-                                {
-                                    if(res.code == 1) {
-                                        layui.layer.msg(res.msg, {
-                                            offset: '15px'
-                                            , icon: 1
-                                            , time: 1000
-                                        });
-                                        layer.close(index);
-                                        table.reload('lists');
-                                    }
-                                }
-                            });
-                        });
-                        submit.trigger('click');
-                    }
-                });
-            }
-        };
-        $('.layui-btn.layuiadmin-btn-handle').on('click', function(){
-            var type = $(this).data('type');
-            active[type] ? active[type].call(this) : '';
-        });
-
-
-        like.tableLists('#lists', '{:url("activity_area.area/lists")}', [
-            {type:'numbers', title: '序号', align: 'center'}
-            ,{field: 'name', title: '专区名称', align:"center"}
-            ,{field: 'synopsis', title: '专区简介', align:"center"}
-            , {field: 'image', title: '专区封面图', align: 'center',sort:false,
-                templet:function (d) {
-                    return '<div οnclick="photograph(this)"><img src='+d.image+'></div>'
-                }}
-            ,{field: 'status', title: '专区状态', align:"center"}
-            ,{title: '操作', align: 'center', fixed: 'right', toolbar: '#lists-operation'}
-        ]);
-
-
-        //监听工具条
-        table.on('tool(lists)', function(obj){
-            if(obj.event === 'del'){
-                var id = obj.data.id;
-                var name = "<span style='color: red;'>"+obj.data.name+"</span>";
-                layer.confirm('删除活动专区时,专区内的商品将被移除,确定要删除:'+ name +'吗?', function(index){
-                    like.ajax({
-                        url:'{:url("activity_area.area/del")}',
-                        data:{'id':id},
-                        type:"post",
-                        success:function(res)
-                        {
-                            if(res.code == 1) {
-                                obj.del();
-                                layui.layer.msg(res.msg, {
-                                    offset: '15px'
-                                    , icon: 1
-                                    , time: 1000
-                                });
-                                layer.close(index);
-                            }
-                        }
-                    });
-                });
-
-            }else if(obj.event === 'edit'){
-                var id = obj.data.id;
-                layer.open({
-                    type: 2
-                    ,title: '编辑活动专区'
-                    ,content: '{:url("activity_area.area/edit")}?id='+id
-                    ,area: ['60%', '60%']
-                    ,btn: ['确定', '取消']
-                    ,yes: function(index, layero){
-                        var iframeWindow = window['layui-layer-iframe'+ index]
-                            ,submitID = 'edit-submit'
-                            ,submit = layero.find('iframe').contents().find('#'+ submitID);
-
-                        //监听提交
-                        iframeWindow.layui.form.on('submit('+ submitID +')', function(data){
-                            var field = data.field;
-                            like.ajax({
-                                url:'{:url("activity_area.area/edit")}',
-                                data:field,
-                                type:"post",
-                                success:function(res)
-                                {
-                                    if(res.code == 1) {
-                                        layui.layer.msg(res.msg, {
-                                            offset: '15px'
-                                            , icon: 1
-                                            , time: 1000
-                                        });
-                                        layer.close(index);
-                                        table.reload('lists');
-                                    }
-                                }
-                            });
-                        });
-
-                        submit.trigger('click');
-                    }
-                })
-            }
-        });
-    });
-</script>

+ 0 - 66
app/admin/view/activity_area/goods/audit.html

@@ -1,66 +0,0 @@
-{layout name="layout1" /}
-<style>
-    .layui-table-cell { height: auto; }
-    .layui-input-block {
-        line-height: 38px;
-    }
-</style>
-<div class="layui-form" style="margin-left: 50px;margin-top: 15px;margin-bottom:30px;">
-  <input type="hidden" name="id" value="{$id}" />
-  <div class="layui-form-item" style="margin-bottom:0;">
-    <label class="layui-form-label">提现审核:</label>
-    <div class="layui-input-block">
-      <input type="radio" name="review_status" value="1" title="审核通过">
-      <input type="radio" name="review_status" value="2" title="审核拒绝" checked>
-    </div>
-  </div>
-  <div class="layui-form-item" style="margin-bottom:0;">
-    <label class="layui-form-label">审核备注:</label>
-    <div class="layui-input-block">
-      <textarea name="description" placeholder="请输入内容" class="layui-textarea" style="width:380px;height:120px;"></textarea>
-    </div>
-  </div>
-
-  <div class="layui-form-item layui-hide">
-    <input type="button" lay-submit lay-filter="addSubmit" id="addSubmit" value="确认">
-  </div>
-</div>
-
-<script>
-    layui.config({
-        version:"{$front_version}",
-        base: '/static/plug/layui-admin/dist/layuiadmin/' //静态资源所在路径
-    }).extend({
-        index: 'lib/index' //主入口模块
-    }).use(['index','table','like'], function(){
-        var $ = layui.$
-            ,form = layui.form
-            ,table = layui.table
-            ,like = layui.like;
-      // 确认
-      form.on('submit(confirm)', function(data){
-        console.log(data.field)
-          // 审核
-          like.ajax({
-              url:'{:url("activity_area.goods/audit")}',
-              data:{'id':data.field.id,'review_status':data.field.review_status,'description': data.field.description},
-              type:"post",
-              success:function(res)
-              {
-                if(res.code == 1)
-                {
-                  layui.layer.msg(res.msg, {offset: '15px', icon: 1, time: 1000}, function(){
-                    parent.location.reload();
-                  });
-                }
-              }
-          });
-      });
-      // 返回
-      form.on('submit(cancel)', function(data){
-        var index = parent.layer.getFrameIndex(window.name); 
-        parent.layer.close(index);
-        return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。
-      });
-    });
-</script>

+ 0 - 99
app/admin/view/activity_area/goods/detail.html

@@ -1,99 +0,0 @@
-{layout name="layout2" /}
-<style>
-    .div-flex {
-        display: flex;
-        align-items: center;
-        justify-content: left;
-    }
-    .width-160 {
-        width: 200px;
-    }
-    .layui-table th {
-        text-align: center;
-    }
-    .table-margin{
-        margin-left: 50px;
-        margin-right: 50px;
-        text-align: center;
-    }
-    .image{
-        height:80px;
-        width: 80px;
-    }
-
-    .mt50{
-        margin-left: 50px;
-    }
-
-</style>
-<div class="layui-card-body" >
-    <!--基本信息-->
-    <div class="layui-form" lay-filter="layuiadmin-form-after-sale" id="layuiadmin-form-after-sale" >
-
-        <div class="layui-form-item">
-            <fieldset class="layui-elem-field layui-field-title">
-                <legend>商家信息</legend>
-            </fieldset>
-        </div>
-
-        <div class="layui-form-item div-flex">
-            <label class="layui-form-label ">商家编号:</label>
-            <div class="width-160">{$detail.sid}</div>
-            <label class="layui-form-label ">商家名称:</label>
-            <div class="width-160">{$detail.shop_name}</div>
-            <label class="layui-form-label ">商家类型:</label>
-            <div class="width-160 refund_type_text">{$detail.type}</div>
-        </div>
-
-        <div class="layui-form-item">
-            <fieldset class="layui-elem-field layui-field-title">
-                <legend>商品信息</legend>
-            </fieldset>
-        </div>
-
-        <div class="layui-form-item div-flex">
-            <label class="layui-form-label ">商品编号:</label>
-            <div class="width-160">{$detail.goods_id}</div>
-            <label class="layui-form-label ">商品名称:</label>
-            <div class="width-160">{$detail.name}</div>
-            <label class="layui-form-label ">商品图片:</label>
-            <img src="{$detail.image}" class="image-show image" width="60px" height="60px">
-            <label class="layui-form-label ">商品价格:</label>
-            <div class="width-160">¥{$detail.min_price}~¥{$detail.max_price}</div>
-        </div>
-
-        <div class="layui-form-item">
-            <fieldset class="layui-elem-field layui-field-title">
-                <legend>参与专区</legend>
-            </fieldset>
-        </div>
-
-        <div class="layui-form-item div-flex">
-            <label class="layui-form-label ">专区名称:</label>
-            <div class="width-160">{$detail.activity_area_name}</div>
-            <label class="layui-form-label ">专区封面图:</label>
-            <img src="{$detail.aimage}" class="image-show image" width="60px" height="60px">
-        </div>
-
-        <div class="layui-form-item">
-            <fieldset class="layui-elem-field layui-field-title">
-                <legend>审核信息</legend>
-            </fieldset>
-        </div>
-
-        <div class="layui-form-item div-flex">
-            <label class="layui-form-label ">审核状态:</label>
-            <div class="width-160">{$detail.audit_status}</div>
-            <label class="layui-form-label ">审核备注:</label>
-            <div class="width-160">{$detail.audit_remark}</div>
-        </div>
-
-    </div>
-</div>
-
-
-<script type="text/javascript">
-
-
-
-</script>

+ 0 - 243
app/admin/view/activity_area/goods/lists.html

@@ -1,243 +0,0 @@
-{layout name="layout1" /}
-<div class="wrapper">
-    <div class="layui-card">
-        <!-- 操作提示 -->
-        <div class="layui-card-body">
-            <div class="layui-collapse" style="border:1px dashed #c4c4c4">
-                <div class="layui-colla-item">
-                    <h2 class="layui-colla-title like-layui-colla-title">操作提示</h2>
-                    <div class="layui-colla-content layui-show">
-                        <p>*商家提交需要参与活动专区的商品,平台审核通过之后即可参与活动。</p>
-                    </div>
-                </div>
-            </div>
-        </div>
-
-        <!-- 搜索区域 -->
-        <div class="layui-card-body layui-form">
-            <div class="layui-form-item">
-                <div class="layui-inline">
-                    <label class="layui-form-label">商家名称:</label>
-                    <div class="layui-input-block">
-                        <input type="text" name="shop_name" id="shop_name" placeholder="请输入商家名称"
-                               autocomplete="off" class="layui-input">
-                    </div>
-                </div>
-                <div class="layui-inline">
-                    <label class="layui-form-label">商品名称:</label>
-                    <div class="layui-input-block">
-                        <input type="text" name="goods_name" id="goods_name" placeholder="请输入商品名称"
-                               autocomplete="off" class="layui-input">
-                    </div>
-                </div>
-                <div class="layui-inline">
-                    <label class="layui-form-label">活动专区:</label>
-                    <div class="layui-input-block">
-                        <select name="activity_area" id="activity_area">
-                            <option value="">全部</option>
-                            {foreach $activity_area as $item => $val}
-                            <option value="{$val.id}">{$val.name}</option>
-                            {/foreach}
-                        </select>
-                    </div>
-                </div>
-                <div class="layui-inline" style="margin-left: 20px;">
-                    <button class="layui-btn layui-btn-sm layuiadmin-btn-ad {$view_theme_color}" lay-submit
-                            lay-filter="list-search">查询
-                    </button>
-                    <button class="layui-btn layui-btn-sm layuiadmin-btn-ad layui-btn-primary " lay-submit
-                            lay-filter="list-clear-search">清空查询
-                    </button>
-                </div>
-            </div>
-        </div>
-
-        <!-- 主体区域 -->
-        <div class="layui-card-body">
-            <div class="layui-tab layui-tab-card" lay-filter="lists-tab">
-                <ul class="layui-tab-title">
-                    <li class="layui-this" data-type="1">活动商品({$num.audit_pass})</li>
-                    <li data-type="0">待审核商品({$num.unaudit})</li>
-                    <li data-type="2">审核拒绝商品({$num.audit_refund})</li>
-                </ul>
-                <div class="layui-card-body">
-                    <!--表格-->
-                    <table id="lists" lay-filter="lists"></table>
-                    <script type="text/html" id="lists-operation">
-                        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="detail"><i
-                                class="layui-icon"></i>详情</a>
-                        {{# if('待审核' == d.audit_status){ }}
-                        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="audit"><i
-                                class="layui-icon"></i>审核</a>
-                        {{# } }}
-                        {{# if('审核通过' == d.audit_status){ }}
-                        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="violation"><i class="layui-icon"></i>违规重审</a>
-                        {{# } }}
-                    </script>
-                </div>
-            </div>
-        </div>
-
-    </div>
-
-
-</div>
-
-<script>
-    layui.use(['table'], function () {
-        var form = layui.form
-            , table = layui.table,
-            type = 1
-            , element = layui.element;
-
-        //监听搜索
-        form.on('submit(list-search)', function (data) {
-            var field = data.field;
-            //执行重载
-            table.reload('lists', {
-                where: field
-            });
-        });
-        //清空查询
-        form.on('submit(list-clear-search)', function () {
-            $('#shop_name').val('');
-            $('#goods_name').val('');
-            $('#activity_area').val('');
-
-            form.render('select');
-            //刷新列表
-            table.reload('lists', {
-                where: [],
-                page: {
-                    curr: 1
-                },
-            });
-        });
-
-        element.on('tab(lists-tab)', function (data) {
-            type = $(this).attr('data-type');
-            table.reload('lists', {
-                where: {type: type}
-            });
-        });
-
-        //事件
-        var active = {};
-        $('.layui-btn.layuiadmin-btn-handle').on('click', function () {
-            var type = $(this).data('type');
-            active[type] ? active[type].call(this) : '';
-        });
-
-
-        like.tableLists('#lists', '{:url("activity_area.goods/lists")}', [
-            {type: 'numbers', title: '序号', align: 'center'}
-            , {field: 'shop_name', title: '商家名称', align: "center"}
-            , {field: 'name', title: '商品名称', align: "center"}
-            , {field: 'min_price', title: '商品最低价格', align: "center"}
-            , {field: 'max_price', title: '商品最高价格', align: "center"}
-            , {field: 'activity_area_name', title: '参与专区', align: "center"}
-            , {field: 'audit_status', title: '审核状态', align: "center"}
-            , {field: 'audit_remark', title: '审核说明', align: "center"}
-            , {title: '操作', align: 'center', fixed: 'right', toolbar: '#lists-operation'}
-        ], {type: type});
-
-
-        //监听工具条
-        table.on('tool(lists)', function (obj) {
-            if (obj.event === 'violation') {
-                var id = obj.data.id;
-                console.log(obj.data)
-                layer.open({
-                    type: 2
-                    , title: '违规重审'
-                    , content: '{:url("activity_area.goods/violation")}?id=' + id
-                    , area: ['60%', '60%']
-                    , btn: ['确定', '取消']
-                    , yes: function (index, layero) {
-                        var iframeWindow = window['layui-layer-iframe' + index]
-                            , submitID = 'addSubmit'
-                            , submit = layero.find('iframe').contents().find('#' + submitID);
-
-                        //监听提交
-                        iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
-                            var field = data.field;
-                            like.ajax({
-                                url: '{:url("activity_area.goods/violation")}',
-                                data: field,
-                                type: "post",
-                                success: function (res) {
-                                    if (res.code == 1) {
-                                        layui.layer.msg(res.msg, {
-                                            offset: '15px'
-                                            , icon: 1
-                                            , time: 1000
-                                        });
-                                        layer.close(index);
-                                        table.reload('lists');
-                                        window.location.reload();
-                                    }
-                                }
-                            });
-                        });
-
-                        submit.trigger('click');
-                    }
-                })
-            } else if (obj.event === 'detail') {
-                var id = obj.data.id;
-                layer.open({
-                    type: 2
-                    , title: '活动专区商品详情'
-                    , content: '{:url("activity_area.goods/detail")}?id=' + id
-                    , area: ['90%', '90%']
-                    , btn: ['确定', '取消']
-                    , yes: function (index, layero) {
-                        var iframeWindow = window['layui-layer-iframe' + index]
-                            , submitID = 'edit-submit'
-                            , submit = layero.find('iframe').contents().find('#' + submitID);
-                        submit.trigger('click');
-                    }
-                })
-            } else if (obj.event === 'audit') {
-                var id = obj.data.id;
-                console.log(obj.data)
-                layer.open({
-                    type: 2
-                    , title: '审核'
-                    , content: '{:url("activity_area.goods/audit")}?id=' + id
-                    , area: ['60%', '60%']
-                    , btn: ['确定', '取消']
-                    , yes: function (index, layero) {
-                        var iframeWindow = window['layui-layer-iframe' + index]
-                            , submitID = 'addSubmit'
-                            , submit = layero.find('iframe').contents().find('#' + submitID);
-
-                        //监听提交
-                        iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
-                            var field = data.field;
-                            like.ajax({
-                                url: '{:url("activity_area.goods/audit")}',
-                                data: field,
-                                type: "post",
-                                success: function (res) {
-                                    if (res.code == 1) {
-                                        layui.layer.msg(res.msg, {
-                                            offset: '15px'
-                                            , icon: 1
-                                            , time: 1000
-                                        });
-                                        layer.close(index);
-                                        table.reload('lists');
-                                        window.location.reload();
-                                    }
-                                }
-                            });
-                        });
-
-                        submit.trigger('click');
-                    }
-                })
-            }
-        });
-    });
-</script>

+ 0 - 60
app/admin/view/activity_area/goods/violation.html

@@ -1,60 +0,0 @@
-{layout name="layout1" /}
-<style>
-    .layui-table-cell { height: auto; }
-    .layui-input-block {
-        line-height: 38px;
-    }
-</style>
-<div class="layui-form" style="margin-left: 50px;margin-top: 15px;margin-bottom:30px;">
-  <input type="hidden" name="id" value="{$id}" />
-
-  <div class="layui-form-item" style="margin-bottom:0;">
-    <label class="layui-form-label">违规原因:</label>
-    <div class="layui-input-block">
-      <textarea name="description" placeholder="请输入内容" class="layui-textarea" style="width:380px;height:120px;"></textarea>
-    </div>
-  </div>
-
-  <div class="layui-form-item layui-hide">
-    <input type="button" lay-submit lay-filter="addSubmit" id="addSubmit" value="确认">
-  </div>
-</div>
-
-<script>
-    layui.config({
-        version:"{$front_version}",
-        base: '/static/plug/layui-admin/dist/layuiadmin/' //静态资源所在路径
-    }).extend({
-        index: 'lib/index' //主入口模块
-    }).use(['index','table','like'], function(){
-        var $ = layui.$
-            ,form = layui.form
-            ,table = layui.table
-            ,like = layui.like;
-      // 确认
-      form.on('submit(confirm)', function(data){
-        console.log(data.field)
-          // 审核
-          like.ajax({
-              url:'{:url("activity_area.goods/violation")}',
-              data:{'id':data.field.id,'review_status':data.field.review_status,'description': data.field.description},
-              type:"post",
-              success:function(res)
-              {
-                if(res.code == 1)
-                {
-                  layui.layer.msg(res.msg, {offset: '15px', icon: 1, time: 1000}, function(){
-                    parent.location.reload();
-                  });
-                }
-              }
-          });
-      });
-      // 返回
-      form.on('submit(cancel)', function(data){
-        var index = parent.layer.getFrameIndex(window.name); 
-        parent.layer.close(index);
-        return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。
-      });
-    });
-</script>