hrjy 3 years ago
parent
commit
89c3370f84
25 changed files with 7626 additions and 359 deletions
  1. 13 0
      app/admin/common.php
  2. 148 4
      app/admin/controller/auction/Auction.php
  3. 205 0
      app/admin/controller/auction/AuctionProduct.php
  4. 5 17
      app/admin/model/auction/Auction.php
  5. 51 0
      app/admin/model/auction/AuctionProduct.php
  6. 901 109
      app/admin/view/auction/auction/create.php
  7. 839 0
      app/admin/view/auction/auction/edit.php
  8. 41 24
      app/admin/view/auction/auction/index.php
  9. 917 0
      app/admin/view/auction/auction_product/create.php
  10. 839 0
      app/admin/view/auction/auction_product/edit.php
  11. 162 0
      app/admin/view/auction/auction_product/index.php
  12. BIN
      public/uploads/attach/2022/03/20220322/28583c438c9ebaa76bed7f41a9ff5a6a.jpg
  13. 1 1
      runtime/admin/temp/3842d4cff02ed8a8fdaa7dea044f6e6b.php
  14. 42 25
      runtime/admin/temp/5a82649edd1b40af6f202faef65620f4.php
  15. 163 0
      runtime/admin/temp/7774ce40cfe0c284fa3e21f4afd9ff55.php
  16. 1 1
      runtime/admin/temp/84d61d0aef57f53004a41c9e30ac91fe.php
  17. 840 0
      runtime/admin/temp/8fc817836ac8aa087779a6a8af3d62b1.php
  18. 256 0
      runtime/admin/temp/a98c59e87384e13f1b02591010192096.php
  19. 891 177
      runtime/admin/temp/b3614fd0470c8fca440dc55e960e0bcc.php
  20. 359 0
      runtime/admin/temp/bfcfe4fc86e1ea7546f6eec7a56bc4e7.php
  21. 377 0
      runtime/admin/temp/c5ee2fca9ee5a418de10d4105e0048bd.php
  22. 241 0
      runtime/admin/temp/c70ace87bc52a5d3e58f590c6f66d0d1.php
  23. 282 0
      runtime/admin/temp/ce38b0d4dda5a13bfb2e9ea6ebff7c1b.php
  24. 52 0
      runtime/log/202203/22.log
  25. 0 1
      runtime/session/sess_c68d1a107c86a235d5191931f994f57b

+ 13 - 0
app/admin/common.php

@@ -144,3 +144,16 @@ if (!function_exists('verify_domain')) {
             return false;
     }
 }
+
+if (!function_exists('pr')) {
+    function pr($var, $int = '')
+    {
+        $template = PHP_SAPI !== 'cli' ? '<pre>%s</pre>' : "\n%s\n";
+        printf($template, print_r($var, true));
+        if (!empty($int)) {
+            exit($int);
+        }
+
+    }
+}
+

+ 148 - 4
app/admin/controller/auction/Auction.php

@@ -2,16 +2,20 @@
 namespace app\admin\controller\auction;
 
 use app\admin\controller\AuthController;
-use crmeb\services\{
-    ExpressService,
+use app\admin\controller\Union;
+use crmeb\services\{ExpressService,
     JsonService,
     MiniProgramService,
+    upload\Upload,
     WechatService,
     FormBuilder as Form,
     CacheService,
     UtilService as Util,
-    JsonService as Json
+    JsonService as Json};
+use app\admin\model\system\{
+    SystemAttachment as SystemAttachmentModel, SystemAttachmentCategory as Category
 };
+use think\facade\Route as Url;
 
 /**
  * 竞拍管理
@@ -49,8 +53,148 @@ class Auction extends AuthController
      */
     public function create($id = 0)
     {
-        $this->assign('id', (int)$id);
+        $data = [];
+        if ($id > 0) $data = \app\admin\model\auction\Auction::find($id)->toArray();
+
+        $this->assign(['id' => $id, 'dataList' => $data]);
         return $this->fetch();
     }
 
+
+    public function save($id)
+    {
+        $mode  = new \app\admin\model\auction\Auction();
+        $data = Util::postMore([
+            'nickname',
+            'image',
+            'status',
+            'sort',
+            'time',
+            'rtime'
+        ]);
+        $time = explode('-', $data['time']);
+
+        $data['add_time'] = $time[0];
+        $data['end_time'] = $time[1];
+        $rtime = explode('-', $data['rtime']);
+        $data['radd_time'] = $rtime[0];
+        $data['rend_time'] = $rtime[1];
+
+        if (strtotime($time[0]) > strtotime( $time[1])) Json::fail('预约时间选择错误');
+        if (strtotime($time[0]) > strtotime( $time[1])) Json::fail('进场时间选择错误');
+
+        $res = $mode->save($data);
+        if ($res){
+            return Json::success('修改成功!');
+        }else{
+            return Json::fail(\app\admin\model\auction\Auction::getErrorInfo());
+        }
+
+    }
+
+    /**
+     * 删除
+     * @param $id
+     * @return void
+     * @throws \Exception
+     */
+    public function delete($id)
+    {
+        if (!$id) Json::fail('删除失败');
+        $model = new \app\admin\model\auction\Auction();
+
+        $res = $model->where('id', $id)->useSoftDelete('delete_time',time())->delete();
+        if ($res){
+            return Json::success('删除成功!');
+        }else{
+            return Json::fail(\app\admin\model\auction\Auction::getErrorInfo());
+        }
+
+    }
+
+
+    public function set_status($id, $status)
+    {
+
+        if (empty($id)) Json::fail('修改失败');
+
+        $res = \app\admin\model\auction\Auction::update(['status' => $status, 'id' => $id]);
+        if ($res){
+            return Json::success('修改成功!');
+        }else{
+            return Json::fail(\app\admin\model\auction\Auction::getErrorInfo());
+        }
+    }
+
+    public function edit($id)
+    {
+        if (!$id) Json::fail('数据不存在');
+        $data = [];
+        if ($id > 0) $data = \app\admin\model\auction\Auction::find($id)->toArray();
+
+        $this->assign(['id' => $id, 'dataList' => $data]);
+        return $this->fetch();
+    }
+
+
+    public function get_auction($id)
+    {
+        if (!$id) Json::fail('数据不存在');
+        $info = \app\admin\model\auction\Auction::find($id)->toArray();
+
+        $data['productInfo'] = $info;
+        return JsonService::successful($data);
+    }
+
+    public function update()
+    {
+        $data = Util::postMore([
+            'id',
+            'nickname',
+            'image',
+            'time',
+            'rtime',
+            'sort'
+        ]);
+        $time = explode('-', $data['time']);
+        $data['add_time'] = $time[0];
+        $data['end_time'] = $time[1];
+        $rtime = explode('-', $data['rtime']);
+        $data['radd_time'] = $rtime[0];
+        $data['rend_time'] = $rtime[1];
+
+        if (strtotime($time[0]) > strtotime( $time[1])) Json::fail('预约时间选择错误');
+        if (strtotime($time[0]) > strtotime( $time[1])) Json::fail('进场时间选择错误');
+
+        $res = \app\admin\model\auction\Auction::update($data);
+        if ($res){
+            return Json::success('修改成功!');
+        }else{
+            return Json::fail(\app\admin\model\auction\Auction::getErrorInfo());
+        }
+
+
+    }
+
+
+//    public function edit($id)
+//    {
+//        if (!$id) Json::fail('数据不存在');
+//
+//
+//        $list = \app\admin\model\auction\Auction::get($id);
+//        if (!$list) Json::fail('数据不存在');
+//
+//        $f = array();
+//        $f[] = Form::input('id', 'ID', $list->getData('id'))->disabled(1);
+//        $f[] = Form::input('nickname', '名称', $list->getData('nickname'));
+//        $f[] = Form::uploadImageOne('image', '图片','/index.php/admin/widget.images/upload',$list->getData('image'));
+//        $f[] = Form::radio('is_promoter', '推广员',$list->getData('status'))->options([['value' => 1, 'label' => '启用'], ['value' => 0, 'label' => '禁用']]);
+//        $f[] = Form::dateTime('time', '推广员',$list->getData('add_time'));
+//
+//        $form = Form::make_post_form('添加用户通知', $f, Url::buildUrl('update', array('uid' => $id)), 5);
+//        $this->assign(compact('form'));
+//        return $this->fetch('public/form-builder');
+//    }
+
 }

+ 205 - 0
app/admin/controller/auction/AuctionProduct.php

@@ -0,0 +1,205 @@
+<?php
+namespace app\admin\controller\auction;
+
+use app\admin\controller\AuthController;
+use app\admin\controller\Union;
+use crmeb\services\{ExpressService,
+    JsonService,
+    MiniProgramService,
+    upload\Upload,
+    WechatService,
+    FormBuilder as Form,
+    CacheService,
+    UtilService as Util,
+    JsonService as Json};
+use app\admin\model\system\{
+    SystemAttachment as SystemAttachmentModel, SystemAttachmentCategory as Category
+};
+use think\facade\Route as Url;
+
+/**
+ * 竞拍管理
+ * Class StoreOrder
+ * @package app\admin\controller\store
+ */
+class AuctionProduct extends AuthController
+{
+
+
+    public function index()
+    {
+
+
+        return $this->fetch();
+    }
+
+
+    public function list()
+    {
+        $where = Util::getMore([
+            ['status', ''],
+            ['page', 1],
+            ['limit', 20]
+        ]);
+        $data = \app\admin\model\auction\AuctionProduct::list($where);
+
+        foreach ($data['data'] as $key => $val){
+            if ($data['data'][$key]['is_admin'] == 0) $data['data'][$key]['nickname'] = '管理';
+        }
+
+
+        return Json::successlayui($data);
+    }
+
+    /**
+     * 显示创建资源表单页.
+     *
+     * @return \think\Response
+     */
+    public function create($id = 0)
+    {
+        $data = [];
+        if ($id > 0) $data = \app\admin\model\auction\Auction::find($id)->toArray();
+
+        $this->assign(['id' => $id, 'dataList' => $data]);
+        return $this->fetch();
+    }
+
+
+    public function save($id)
+    {
+        $mode  = new \app\admin\model\auction\Auction();
+        $data = Util::postMore([
+            'nickname',
+            'image',
+            'status',
+            'sort',
+            'time',
+            'rtime'
+        ]);
+        $time = explode('-', $data['time']);
+
+        $data['add_time'] = $time[0];
+        $data['end_time'] = $time[1];
+        $rtime = explode('-', $data['rtime']);
+        $data['radd_time'] = $rtime[0];
+        $data['rend_time'] = $rtime[1];
+
+        if (strtotime($time[0]) > strtotime( $time[1])) Json::fail('预约时间选择错误');
+        if (strtotime($time[0]) > strtotime( $time[1])) Json::fail('进场时间选择错误');
+
+        $res = $mode->save($data);
+        if ($res){
+            return Json::success('修改成功!');
+        }else{
+            return Json::fail(\app\admin\model\auction\Auction::getErrorInfo());
+        }
+
+    }
+
+    /**
+     * 删除
+     * @param $id
+     * @return void
+     * @throws \Exception
+     */
+    public function delete($id)
+    {
+        if (!$id) Json::fail('删除失败');
+        $model = new \app\admin\model\auction\Auction();
+
+        $res = $model->where('id', $id)->useSoftDelete('delete_time',time())->delete();
+        if ($res){
+            return Json::success('删除成功!');
+        }else{
+            return Json::fail(\app\admin\model\auction\Auction::getErrorInfo());
+        }
+
+    }
+
+
+    public function set_status($id, $status)
+    {
+
+        if (empty($id)) Json::fail('修改失败');
+
+        $res = \app\admin\model\auction\AuctionProduct::update(['is_show' => $status, 'id' => $id]);
+        if ($res){
+            return Json::success('修改成功!');
+        }else{
+            return Json::fail(\app\admin\model\auction\Auction::getErrorInfo());
+        }
+    }
+
+    public function edit($id)
+    {
+        if (!$id) Json::fail('数据不存在');
+        $data = [];
+        if ($id > 0) $data = \app\admin\model\auction\Auction::find($id)->toArray();
+
+        $this->assign(['id' => $id, 'dataList' => $data]);
+        return $this->fetch();
+    }
+
+
+    public function get_auction($id)
+    {
+        if (!$id) Json::fail('数据不存在');
+        $info = \app\admin\model\auction\Auction::find($id)->toArray();
+
+        $data['productInfo'] = $info;
+        return JsonService::successful($data);
+    }
+
+    public function update()
+    {
+        $data = Util::postMore([
+            'id',
+            'nickname',
+            'image',
+            'time',
+            'rtime',
+            'sort'
+        ]);
+        $time = explode('-', $data['time']);
+        $data['add_time'] = $time[0];
+        $data['end_time'] = $time[1];
+        $rtime = explode('-', $data['rtime']);
+        $data['radd_time'] = $rtime[0];
+        $data['rend_time'] = $rtime[1];
+
+        if (strtotime($time[0]) > strtotime( $time[1])) Json::fail('预约时间选择错误');
+        if (strtotime($time[0]) > strtotime( $time[1])) Json::fail('进场时间选择错误');
+
+        $res = \app\admin\model\auction\Auction::update($data);
+        if ($res){
+            return Json::success('修改成功!');
+        }else{
+            return Json::fail(\app\admin\model\auction\Auction::getErrorInfo());
+        }
+
+
+    }
+
+
+//    public function edit($id)
+//    {
+//        if (!$id) Json::fail('数据不存在');
+//
+//
+//        $list = \app\admin\model\auction\Auction::get($id);
+//        if (!$list) Json::fail('数据不存在');
+//
+//        $f = array();
+//        $f[] = Form::input('id', 'ID', $list->getData('id'))->disabled(1);
+//        $f[] = Form::input('nickname', '名称', $list->getData('nickname'));
+//        $f[] = Form::uploadImageOne('image', '图片','/index.php/admin/widget.images/upload',$list->getData('image'));
+//        $f[] = Form::radio('is_promoter', '推广员',$list->getData('status'))->options([['value' => 1, 'label' => '启用'], ['value' => 0, 'label' => '禁用']]);
+//        $f[] = Form::dateTime('time', '推广员',$list->getData('add_time'));
+//
+//        $form = Form::make_post_form('添加用户通知', $f, Url::buildUrl('update', array('uid' => $id)), 5);
+//        $this->assign(compact('form'));
+//        return $this->fetch('public/form-builder');
+//    }
+
+}

+ 5 - 17
app/admin/model/auction/Auction.php

@@ -29,33 +29,21 @@ class Auction extends BaseModel
 
     public static function list($where)
     {
-        $model = self::getAuctionWhere($where);
+        $model = self::where('delete_time', '=', 0);
 
         if ($where['page'] && $where['limit']){
-            $model =  self::page($where['page'], $where['limit']);
+            self::page($where['page'], $where['limit']);
         }else{
-            $model = self::page(20, 1);
+            self::page(20, 1);
         }
 
-        $data['count'] = self::count();
-        $data['data'] = self::select()->toArray();
-
+        $data['count'] = $model->count();
+        $data['data'] = $model->select()->toArray();
         return $data;
 
     }
 
 
-    /**
-     * 处理where条件
-     * @param $where
-     * @return mixed
-     */
-    public static function getAuctionWhere($where, $aler = '', $join = '')
-    {
-        $model = self::where('status', $where['status']);
-
 
-        return $model;
-    }
 
 }

+ 51 - 0
app/admin/model/auction/AuctionProduct.php

@@ -0,0 +1,51 @@
+<?php
+
+/**
+ *
+ * @author: xaboy<365615158@qq.com>
+ * @day: 2017/11/02
+ */
+
+namespace app\admin\model\auction;
+
+use crmeb\traits\ModelTrait;
+use crmeb\basic\BaseModel;
+
+/**
+ * 图文管理 Model
+ * Class WechatNews
+ * @package app\admin\model\wechat
+ */
+class AuctionProduct extends BaseModel
+{
+
+    use ModelTrait;
+
+    protected $pk = 'id';
+
+    protected $name = 'auction_product';
+
+
+
+    public static function list($where)
+    {
+        self::alias('a')
+            ->field('a.*, u.id,u.nickname')
+            ->join('user u', 'a.uid = u.id');
+
+        if ($where['page'] && $where['limit']){
+            self::page($where['page'], $where['limit']);
+        }else{
+            self::page(20, 1);
+        }
+
+        $data['count'] = self::count();
+        $data['data'] = self::select()->toArray();
+        return $data;
+
+    }
+
+
+
+
+}

+ 901 - 109
app/admin/view/auction/auction/create.php

@@ -1,125 +1,917 @@
-{extend name="public/container"}
-{block name="head_top"}
-<link href="{__ADMIN_PATH}plug/umeditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
-<link href="{__ADMIN_PATH}module/wechat/news/css/style.css" type="text/css" rel="stylesheet">
-<link href="{__FRAME_PATH}css/plugins/chosen/chosen.css" rel="stylesheet">
-<script type="text/javascript" src="{__ADMIN_PATH}plug/umeditor/third-party/jquery.min.js"></script>
-<script type="text/javascript" src="{__ADMIN_PATH}plug/umeditor/third-party/template.min.js"></script>
-<script type="text/javascript" charset="utf-8" src="{__ADMIN_PATH}plug/umeditor/umeditor.config.js"></script>
-<script type="text/javascript" charset="utf-8" src="{__ADMIN_PATH}plug/umeditor/umeditor.js"></script>
-<script src="{__ADMIN_PATH}frame/js/ajaxfileupload.js"></script>
-<script src="{__ADMIN_PATH}plug/validate/jquery.validate.js"></script>
-<script src="{__FRAME_PATH}js/plugins/chosen/chosen.jquery.js"></script>
-<style>
-    .wrapper-content {
-        padding: 0 !important;
-    }
-</style>
-{/block}
-{block name="content"}
-<div class="row">
-    <div class="col-sm-12 panel panel-default" >
-        <div class="layui-card-header">
-            <span class="">竞拍场添加</span>
-            <button style="margin-left: 20px" type="button" class="layui-btn layui-btn-primary layui-btn-xs goBack">返回列表</button>
-        </div>
-        <div class="panel-body" style="padding: 30px">
-            <form class="form-horizontal" id="signupForm">
-                <div class="form-group">
-                    <div class="col-md-12">
-                        <div class="input-group">
-                            <span class="input-group-addon">名称</span>
-                            <input maxlength="50" style="width: 40%" placeholder="请在这里输入名称" name="title" class="layui-input" id="nickname" value="">
-                            <input type="hidden"  id="id" value="">
-                        </div>
-                    </div>
-                </div>
-                <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
-                    <div class="grid-demo grid-demo-bg1">
-                        <div class="layui-form-item">
-                            <label class="layui-form-label">商品规格<i class="red">*</i></label>
-                            <div class="layui-input-block">
-                                <input type="radio" name="status" value="0" title="使用"
-                                       lay-filter="spec_type"
-                                       :checked="formData.status == 0 ? true : false">
-                                <input type="radio" name="status" value="1" title="禁用"
-                                       lay-filter="spec_type"
-                                       :checked="formData.status == 1 ? true : false">
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+    <link href="{__FRAME_PATH}css/font-awesome.min.css" rel="stylesheet">
+    <link href="{__ADMIN_PATH}plug/umeditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
+    <script type="text/javascript" src="{__ADMIN_PATH}plug/umeditor/third-party/jquery.min.js"></script>
+    <script type="text/javascript" src="{__ADMIN_PATH}plug/umeditor/third-party/template.min.js"></script>
+    <script type="text/javascript" charset="utf-8" src="{__ADMIN_PATH}plug/umeditor/umeditor.config.js"></script>
+    <script type="text/javascript" charset="utf-8" src="{__ADMIN_PATH}plug/umeditor/umeditor.min.js"></script>
+    <script type="text/javascript" src="{__ADMIN_PATH}plug/umeditor/lang/zh-cn/zh-cn.js"></script>
+    <link rel="stylesheet" href="/static/plug/layui/css/layui.css">
+    <script src="/static/plug/layui/layui.js"></script>
+    <script src="{__PLUG_PATH}vue/dist/vue.min.js"></script>
+    <script src="/static/plug/axios.min.js"></script>
+    <script src="{__MODULE_PATH}widget/aliyun-oss-sdk-4.4.4.min.js"></script>
+    <script src="{__MODULE_PATH}widget/cos-js-sdk-v5.min.js"></script>
+    <script src="{__MODULE_PATH}widget/qiniu-js-sdk-2.5.5.js"></script>
+    <script src="{__MODULE_PATH}widget/plupload.full.min.js"></script>
+    <script src="{__MODULE_PATH}widget/videoUpload.js"></script>
+    <style>
+        .layui-form-item {
+            margin-bottom: 0px;
+        }
+
+        .pictrueBox {
+            display: inline-block !important;
+        }
+
+        .pictrue {
+            width: 60px;
+            height: 60px;
+            border: 1px dotted rgba(0, 0, 0, 0.1);
+            margin-right: 15px;
+            display: inline-block;
+            position: relative;
+            cursor: pointer;
+        }
+
+        .pictrue img {
+            width: 100%;
+            height: 100%;
+        }
+
+        .upLoad {
+            width: 58px;
+            height: 58px;
+            line-height: 58px;
+            border: 1px dotted rgba(0, 0, 0, 0.1);
+            border-radius: 4px;
+            background: rgba(0, 0, 0, 0.02);
+            cursor: pointer;
+            display: flex;
+            justify-content: center;
+            align-items: center;
+        }
+
+        .rulesBox {
+            display: flex;
+            flex-wrap: wrap;
+            margin-left: 10px;
+        }
+
+        .layui-tab-content {
+            margin-top: 15px;
+        }
+
+        .ml110 {
+            margin: 18px 0 4px 110px;
+        }
+
+        .rules {
+            display: flex;
+        }
+
+        .rules-btn-sm {
+            height: 30px;
+            line-height: 30px;
+            font-size: 12px;
+            width: 109px;
+        }
+
+        .rules-btn-sm input {
+            width: 79% !important;
+            height: 84% !important;
+            padding: 0 10px;
+        }
+
+        .ml10 {
+            margin-left: 10px !important;
+        }
+
+        .ml40 {
+            margin-left: 40px !important;
+        }
+
+        .closes {
+            position: absolute;
+            left: 86%;
+            top: -18%;
+        }
+        .red {
+            color: red;
+        }
+        .layui-input-block .layui-video-box{
+            width: 22%;
+            height: 180px;
+            border-radius: 10px;
+            background-color: #707070;
+            margin-top: 10px;
+            position: relative;
+            overflow: hidden;
+        }
+        .layui-input-block .layui-video-box i{
+            color: #fff;
+            line-height: 180px;
+            margin: 0 auto;
+            width: 50px;
+            height: 50px;
+            display: inherit;
+            font-size: 50px;
+        }
+        .layui-input-block .layui-video-box .mark{
+            position: absolute;
+            width: 100%;
+            height: 30px;
+            top: 0;
+            background-color: rgba(0,0,0,.5);
+            text-align: center;
+        }
+        .store_box{
+            display: flex;
+        }
+        .info{
+            color: #c9c9c9;
+            padding-left: 10px;
+            line-height: 30px;
+        }
+    </style>
+</head>
+<body>
+<div class="layui-fluid">
+    <div class="layui-row layui-col-space15"  id="app" v-cloak="">
+        <div class="layui-card">
+            <div class="layui-card-header">
+                <span class="">竞拍添加</span>
+                <button style="margin-left: 20px" type="button" class="layui-btn layui-btn-primary layui-btn-xs" @click="goBack">返回列表</button>
+            </div>
+            <div class="layui-card-body">
+                <form class="layui-form" action="" v-cloak="">
+                    <div class="layui-tab layui-tab-brief" lay-filter="docTabBrief">
+                        <div class="layui-tab-content">
+                            <div class="layui-tab-item layui-show">
+                                <div class="layui-row layui-col-space15">
+                                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
+                                        <div class="grid-demo grid-demo-bg1">
+                                            <div class="layui-form-item">
+                                                <label class="layui-form-label">商品名称<i class="red">*</i></label>
+                                                <div class="layui-input-block">
+                                                    <input type="text" name="nickname" lay-verify="title" autocomplete="off"
+                                                           placeholder="竞拍名称" class="layui-input" v-model="formData.nickname" maxlength="100">
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
+                                        <div class="grid-demo grid-demo-bg1">
+                                            <div class="layui-form-item">
+                                                <label class="layui-form-label">竞拍封面图<i class="red">*</i></label>
+                                                <div class="pictrueBox">
+                                                    <div class="pictrue" v-if="formData.image" @click="uploadImage('image')">
+                                                        <img :src="formData.image"></div>
+                                                    <div class="upLoad" @click="uploadImage('image')" v-else>
+                                                        <i class="layui-icon layui-icon-camera" class="iconfont"
+                                                           style="font-size: 26px;"></i>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                <div class="layui-row layui-col-space15">
+                                    <div class="layui-col-xs12 layui-col-sm4 layui-col-md4">
+                                        <div class="grid-demo grid-demo-bg1">
+                                            <div class="layui-form-item">
+                                                <label class="layui-form-label">商品状态</label>
+                                                <div class="layui-input-block">
+                                                    <input type="radio" name="status" lay-filter="status" value="1" title="使用"
+                                                           :checked="formData.status == 1 ? true : false">
+                                                    <input type="radio" name="status" lay-filter="status" value="0" title="禁用"
+                                                           :checked="formData.status == 0 ? true : false">
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                                    <div class="layui-row layui-col-space15">
+                                        <div class="layui-col-xs12 layui-col-sm4 layui-col-md4">
+                                            <div class="grid-demo grid-demo-bg1">
+                                                <div class="layui-form-item">
+                                                    <label class="layui-form-label">预约时间<i class="red   ">*</i></label>
+                                                        <div class="layui-input-inline">
+                                                            <input type="text" class="layui-input" name="time" id="time" value="" placeholder="-">
+                                                        </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row layui-col-space15">
+                                        <div class="layui-col-xs12 layui-col-sm4 layui-col-md4">
+                                            <div class="grid-demo grid-demo-bg1">
+                                                <div class="layui-form-item">
+                                                    <label class="layui-form-label">进场时间<i class="red">*</i></label>
+                                                    <div class="layui-input-inline">
+                                                        <input type="text" class="layui-input" name="rtime" id="rtime" value="" placeholder="-">
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
+                                        <div class="grid-demo grid-demo-bg1">
+                                            <div class="layui-form-item">
+                                                <label class="layui-form-label">排序<i class="red">*</i></label>
+                                                <div class="layui-input-inline">
+                                                    <input type="number" name="sort" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.sort" maxlength="100" value="0">
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+
+
+                            </div>
+                            <div class="layui-tab-item">
+                                <div class="layui-row layui-col-space15">
+                                    <textarea type="text/plain" name="description" id="myEditor" style="width:100%;">{{formData.description}}</textarea>
+                                </div>
                             </div>
+
+
                         </div>
-                    </div>
-                </div>
-                <div class="form-actions">
-                    <div class="row">
-                        <div class="col-md-offset-4 col-md-9">
-                            <button type="button" class="btn btn-w-m btn-info save">保存</button>
+                        <div class="layui-tab-content">
+                            <div class="layui-row layui-col-space15">
+                                <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
+                                    <button class="layui-btn layui-btn-normal layui-btn-sm" id="submit" type="button" @click="handleSubmit()">提交</button>
+                                </div>
+                            </div>
                         </div>
                     </div>
-                </div>
-            </form>
+                </form>
+            </div>
         </div>
     </div>
 </div>
-<script src="{__ADMIN_PATH}js/layuiList.js"></script>
-{/block}
-{block name="script"}
 <script>
-    UM.registerUI('selectimgs',function(name){
-        var me = this;
-        var $btn = $.eduibutton({
-            icon : 'image',
-            click : function(){
-                createFrame('选择图片','{:Url('widget.images/index')}?fodder=editor');
-            },
-            title: '选择图片'
-        });
 
-        this.addListener('selectionchange',function(){
-            //切换为不可编辑时,把自己变灰
-            var state = this.queryCommandState(name);
-            $btn.edui().disabled(state == -1).active(state == 1)
-        });
-        return $btn;
+    var id = {$id};
+    layui.use('laydate', function(){
+        var laydate = layui.laydate;
 
-    });
-    //选择图片
-    function changeIMG(index,pic){
-        $(".image_img").css('background-image',"url("+pic+")");
-        $(".active").css('background-image',"url("+pic+")");
-        $('#image_input').val(pic);
-    }
-    //选择图片插入到编辑器中
-    function insertEditor(list){
-        console.log(list);
-        um.execCommand('insertimage', list);
-    }
-    /**
-     * 上传图片
-     * */
-    $('.upload_span').on('click',function (e) {
-//                $('.upload').trigger('click');
-        createFrame('选择图片','{:Url('widget.images/index')}?fodder=image');
+        laydate.render({
+            elem: '#time'
+            ,type: 'time'
+            ,range: true
+        });
+        laydate.render({
+            elem: '#rtime'
+            ,type: 'time'
+            ,range: true
+        });
     })
 
-    /**
-     * 编辑器上传图片
-     * */
-    $('.edui-icon-image').on('click',function (e) {
-//                $('.upload').trigger('click');
-        createFrame('选择图片','{:Url('widget.images/index')}?fodder=image');
-    })
+    new Vue({
+        el: '#app',
+        data: {
+            id:id,
+            //分类列表
+            cateList: [],
+            //运费模板
+            tempList: [],
+            upload:{
+                videoIng:false
+            },
+            formData: {
+                description: '',
+                status: '',
+                image:'',
+                time:'',
+                rtime:''
+            },
+            rule: { //多图选择规则
+                slider_image: {
+                    maxLength: 1
+                }
+            },
+            attr: [],//临时属性
+            newRule: false,//是否添加新规则
+            radioRule: ['status'],//radio 当选规则
+            ruleList:[],
+            ruleIndex:-1,
+            progress: 0,
+            um: null,//编译器实例化
+            form: null,//layui.form
+            layTabId: 1,
+            ruleBool: id ? true : false,
+        },
+        watch:{
+            'formData.is_sub':function (n) {
+                if (n == 1) {
+                    this.formHeader.push({title:'一级返佣(元)'});
+                    this.formHeader.push({title:'二级级返佣(元)'});
+                } else {
+                    this.formHeader.pop();
+                    this.formHeader.pop();
+                }
+            },
+            'formData.spec_type':function (n) {
+                if (n) {
+                    this.render();
+                }
+            },
+            // 'formData.image':function (n) {
+            //     if(!this.batchAttr.pic){
+            //         this.batchAttr.pic = n;
+            //     }
+            //     if(!this.formData.attr.pic){
+            //         this.formData.attr.pic = n;
+            //     }
+            // }
+        },
+        methods: {
+            back:function(){
+                var that = this;
+                layui.use(['element'], function () {
+                    layui.element.tabChange('docTabBrief', that.layTabId == 1 ? 1 : parseInt(that.layTabId) - 1);
+                });
+            },
+            next:function(){
+                var that = this;
+                layui.use(['element'], function () {
+                    layui.element.tabChange('docTabBrief', that.layTabId == 3 ? 3 : parseInt(that.layTabId) + 1);
+                });
+            },
+            goBack:function(){
+                location.href = this.U({c:'auction.auction',a:'index'});
+            },
+            U: function (opt) {
+                var m = opt.m || 'admin', c = opt.c || window.controlle || '', a = opt.a || 'index', q = opt.q || '',
+                    p = opt.p || {};
+                var params = Object. keys(p).map(function (key) {
+                    return key + '/' + p[key];
+                }).join('/');
+                var gets = Object.keys(q).map(function (key) {
+                    return key+'='+ q[key];
+                }).join('&');
 
-    $('.goBack').on('click', function (e) {
-        location.href = '{:Url('auction.auction/index')}';
-    })
+                return '/' + m + '/' + c + '/' + a + (params == '' ? '' : '/' + params) + (gets == '' ? '' : '?' + gets);
+            },
+            /**
+             * 提示
+             * */
+            showMsg: function (msg, success) {
+                $('#submit').removeAttr('disabled').text('提交');
+                layui.use(['layer'], function () {
+                    layui.layer.msg(msg, success);
+                });
+            },
+            addBrokerage:function(){
+                if (this.brokerage.brokerage >= 0 && this.brokerage.brokerage_two >= 0){
+                    var that = this;
+                    this.$set(this.formData,'attrs',this.formData.attrs.map(function (item) {
+                        item.brokerage = that.brokerage.brokerage;
+                        item.brokerage_two = that.brokerage.brokerage_two;
+                        return item;
+                    }));
+                } else {
+                    return this.showMsg('请填写返佣金额在进行批量添加');
+                }
+            },
+            batchClear:function(){
+                this.$set(this,'batchAttr',{
+                    pic: '',
+                    price: 0,
+                    cost: 0,
+                    ot_price: 0,
+                    stock: 0,
+                    bar_code: '',
+                    weight: 0,
+                    volume: 0,
+                });
+            },
+            /**
+             * 批量添加
+             * */
+            batchAdd:function(){
+                var that = this;
+                this.$set(this.formData,'attrs',this.formData.attrs.map(function (item) {
+                    if (that.batchAttr.pic) {
+                        item.pic = that.batchAttr.pic;
+                    }
+                    if (that.batchAttr.price > 0){
+                        item.price = that.batchAttr.price;
+                    }
+                    if (that.batchAttr.cost > 0){
+                        item.cost = that.batchAttr.cost;
+                    }
+                    if (that.batchAttr.ot_price > 0){
+                        item.ot_price = that.batchAttr.ot_price;
+                    }
+                    if (that.batchAttr.stock > 0){
+                        item.stock = that.batchAttr.stock;
+                    }
+                    if (that.batchAttr.bar_code != ''){
+                        item.bar_code = that.batchAttr.bar_code;
+                    }
+                    if (that.batchAttr.weight > 0){
+                        item.weight = that.batchAttr.weight;
+                    }
+                    if (that.batchAttr.volume > 0){
+                        item.volume = that.batchAttr.volume;
+                    }
+                    return item;
+                }));
 
-    /**
-     * 提交图文
-     * */
-    $('.save').on('click',function(e){
-        var nickname = $('#nickname').val();
-        console.log(nickname);
-    })
+            },
+            /**
+             * 获取商品信息
+             * */
+            getProductInfo: function () {
+                var that = this;
+                that.requestGet(that.U({c:"store.StoreProduct",a:'get_product_info',q:{id:that.id}})).then(function (res) {
+                    that.$set(that,'cateList',res.data.cateList);
+                    that.$set(that,'tempList',res.data.tempList);
+                    var productInfo = res.data.productInfo || {};
+                    if(productInfo.id && that.id){
+                        that.$set(that,'formData',productInfo);
+                        that.generate();
+                    }
+                    that.getRuleList();
+                    that.init();
+                }).catch(function (res) {
+                    that.showMsg(res.msg);
+                })
+            },
+            /**
+             * 给某个属性添加属性值
+             * @param item
+             * */
+            addDetail: function (item) {
+                if (!item.detailValue) return false;
+                if (item.detail.find(function (val) {
+                    if(item.detailValue == val){
+                        return true;
+                    }
+                })) {
+                    return this.showMsg('添加的属性值重复');
+                }
+                item.detail.push(item.detailValue);
+                item.detailValue = '';
+            },
+            /**
+             * 删除某个属性值
+             * @param item 父级循环集合
+             * @param inx 子集index
+             * */
+            deleteValue: function (item, inx) {
+                if (item.detail.length > 1) {
+                    item.detail.splice(inx, 1);
+                } else {
+                    return this.showMsg('请设置至少一个属性');
+                }
+            },
+            /**
+             * 删除某条属性
+             * @param index
+             * */
+            deleteItem: function (index) {
+                this.formData.items.splice(index, 1);
+            },
+            /**
+             * 删除某条属性
+             * @param index
+             * */
+            deleteAttrs: function (index) {
+                var that = this;
+                if(that.id > 0){
+                    that.requestGet(that.U({c:"store.StoreProduct",a:'check_activity',q:{id:that.id}})).then(function (res) {
+                        that.showMsg(res.msg);
+                    }).catch(function (res) {
+                        if (that.formData.attrs.length > 1) {
+                            that.formData.attrs.splice(index, 1);
+                        } else {
+                            return that.showMsg('请设置至少一个规则');
+                        }
+                    })
+                }else{
+                    if (that.formData.attrs.length > 1) {
+                        that.formData.attrs.splice(index, 1);
+                    } else {
+                        return that.showMsg('请设置至少一个规则');
+                    }
+                }
+            },
+            /**
+             * 创建属性
+             * */
+            createAttrName: function () {
+                if (this.formDynamic.attrsName && this.formDynamic.attrsVal) {
+                    if (this.formData.items.find(function (val) {
+                        if (val.value == this.formDynamic.attrsName) {
+                            return true;
+                        }
+                    }.bind(this))) {
+                        return this.showMsg('添加的属性重复');
+                    }
+                    this.formData.items.push({
+                        value: this.formDynamic.attrsName,
+                        detailValue: '',
+                        attrHidden: false,
+                        detail: [this.formDynamic.attrsVal]
+                    });
+                    this.formDynamic.attrsName = '';
+                    this.formDynamic.attrsVal = '';
+                    this.newRule = false;
+                } else {
+                    return this.showMsg('请添加完整的规格!');
+                }
+            },
+            /**
+             * 删除图片
+             * */
+            deleteImage: function (key, index) {
+                var that = this;
+                if (index != undefined) {
+                    that.formData[key].splice(index, 1);
+                    that.$set(that.formData, key, that.formData[key]);
+                } else {
+                    that.$set(that.formData, key, '');
+                }
+            },
+            createFrame: function (title, src, opt) {
+                opt === undefined && (opt = {});
+                var h = 0;
+                if (window.innerHeight < 800 && window.innerHeight >= 700) {
+                    h = window.innerHeight - 50;
+                } else if (window.innerHeight < 900 && window.innerHeight >= 800) {
+                    h = window.innerHeight - 100;
+                } else if (window.innerHeight < 1000 && window.innerHeight >= 900) {
+                    h = window.innerHeight - 150;
+                } else if (window.innerHeight >= 1000) {
+                    h = window.innerHeight - 200;
+                } else {
+                    h = window.innerHeight;
+                }
+                var area = [(opt.w || window.innerWidth / 2) + 'px', (!opt.h || opt.h > h ? h : opt.h) + 'px'];
+                layui.use('layer',function () {
+                    return layer.open({
+                        type: 2,
+                        title: title,
+                        area: area,
+                        fixed: false, //不固定
+                        maxmin: true,
+                        moveOut: false,//true  可以拖出窗外  false 只能在窗内拖
+                        anim: 5,//出场动画 isOutAnim bool 关闭动画
+                        offset: 'auto',//['100px','100px'],//'auto',//初始位置  ['100px','100px'] t[ 上 左]
+                        shade: 0,//遮罩
+                        resize: true,//是否允许拉伸
+                        content: src,//内容
+                        move: '.layui-layer-title'
+                    });
+                });
+            },
+            changeIMG: function (name, value) {
+                if (this.getRule(name).maxLength !== undefined) {
+                    var that = this;
+                    value.map(function (v) {
+                        that.formData[name].push(v);
+                    });
+                    this.$set(this.formData, name, this.formData[name]);
+                } else {
+                    if(name == 'batchAttr.pic'){
+                        this.batchAttr.pic = value;
+                    } else {
+                        if (name.indexOf('.') !== -1) {
+                            var key = name.split('.');
+                            if (key.length == 2){
+                                this.formData[key[0]][key[1]] = value;
+                            } else if(key.length == 3){
+                                this.formData[key[0]][key[1]][key[2]] = value;
+                            } else if(key.length == 4){
+                                this.$set(this.formData[key[0]][key[1]][key[2]],key[3],value)
+                            }
+                        } else {
+                            this.formData[name] = value;
+                        }
+                    }
+                }
+            },
+            getRule: function (name) {
+                return this.rule[name] || {};
+            },
+            uploadImage: function (name) {
+                return this.createFrame('选择图片',this.U({c:"widget.images",a:'index',p:{fodder:name}}),{h:545,w:900});
+            },
+            uploadVideo: function () {
+                if (this.videoLink) {
+                    this.formData.video_link = this.videoLink;
+                } else {
+                    $(this.$refs.filElem).click();
+                }
+            },
+            delVideo: function () {
+                var that = this;
+                that.$set(that.formData, 'video_link', '');
+            },
+            insertEditor: function (list) {
+                this.um.execCommand('insertimage', list);
+            },
+            insertEditorVideo: function (src) {
+                this.um.setContent('<div><video style="width: 99%" src="'+src+'" class="video-ue" controls="controls" width="100"><source src="'+src+'"></source></video></div><br>',true);
+            },
+            getContent: function () {
+                return this.um.getContent();
+            },
+            /**
+             * 监听radio字段
+             */
+            eeventRadio: function () {
+                var that = this;
+                that.radioRule.map(function (val) {
+                    that.form.on('radio(' + val + ')', function (res) {
+                        that.formData[val] = res.value;
+                    });
+                })
+            },
+            init: function () {
+                var that = this;
+                window.UMEDITOR_CONFIG.toolbar = [
+                    // 加入一个 test
+                    'source | undo redo | bold italic underline strikethrough | superscript subscript | forecolor backcolor | removeformat |',
+                    'insertorderedlist insertunorderedlist | selectall cleardoc paragraph | fontfamily fontsize',
+                    '| justifyleft justifycenter justifyright justifyjustify |',
+                    'link unlink | emotion selectimgs video  | map',
+                    '| horizontal print preview fullscreen', 'drafts', 'formula'
+                ];
+                UM.registerUI('selectimgs', function (name) {
+                    var me = this;
+                    var $btn = $.eduibutton({
+                        icon: 'image',
+                        click: function () {
+                            that.createFrame('选择图片', "{:Url('widget.images/index',['fodder'=>'editor'])}");
+                        },
+                        title: '选择图片'
+                    });
+
+                    this.addListener('selectionchange', function () {
+                        //切换为不可编辑时,把自己变灰
+                        var state = this.queryCommandState(name);
+                        $btn.edui().disabled(state == -1).active(state == 1)
+                    });
+                    return $btn;
+
+                });
+                UM.registerUI('video', function (name) {
+                    var me = this;
+                    var $btn = $.eduibutton({
+                        icon: 'video',
+                        click: function () {
+                            that.createFrame('选择视频', "{:Url('widget.video/index',['fodder'=>'video'])}");
+                        },
+                        title: '选择视频'
+                    });
 
+                    this.addListener('selectionchange', function () {
+                        //切换为不可编辑时,把自己变灰
+                        var state = this.queryCommandState(name);
+                        $btn.edui().disabled(state == -1).active(state == 1)
+                    });
+                    return $btn;
+
+                });
+                //实例化编辑器
+                this.um = UM.getEditor('myEditor', {initialFrameWidth: '99%', initialFrameHeight: 400});
+                this.um.setContent(that.formData.description);
+                that.$nextTick(function () {
+                    layui.use(['form','element'], function () {
+                        that.form = layui.form;
+                        that.form.render();
+                        that.form.on('select(temp_id)', function (data) {
+                            that.$set(that.formData, 'temp_id', data.value);
+                        });
+                        that.form.on('select(rule_index)', function (data) {
+                            that.ruleIndex = data.value;
+                        });
+                        layui.element.on('tab(docTabBrief)', function(){
+                            that.layTabId = this.getAttribute('lay-id');
+                        });
+                        that.eeventRadio();
+                    });
+
+                    layui.config({
+                        base : '/static/plug/layui/'
+                    }).extend({
+                        selectN: './selectN',
+                    }).use('selectM',function () {
+                        var selectM = layui.selectM;
+                        selectM({
+                            //元素容器【必填】
+                            elem: '#id'
+                            //候选数据【必填】
+                            ,data: that.cateList
+                            //默认值
+                            ,selected: that.formData.id || []
+                            //最多选中个数,默认5
+                            ,max : 10
+                            ,name: 'id'
+                            ,model: 'formData.id'
+                            //值的分隔符
+                            ,delimiter: ','
+                            //候选项数据的键名
+                            ,field: {idName:'value',titleName:'label',statusName:'disabled'}
+                        });
+                    });
+                })
+            },
+            requestPost: function (url, data) {
+                return new Promise(function (resolve, reject) {
+                    axios.post(url, data).then(function (res) {
+                        if (res.status == 200 && res.data.code == 200) {
+                            resolve(res.data)
+                        } else {
+                            reject(res.data);
+                        }
+                    }).catch(function (err) {
+                        reject({msg:err})
+                    });
+                })
+            },
+            requestGet: function (url) {
+                return new Promise(function (resolve, reject) {
+                    axios.get(url).then(function (res) {
+                        if (res.status == 200 && res.data.code == 200) {
+                            resolve(res.data)
+                        } else {
+                            reject(res.data);
+                        }
+                    }).catch(function (err) {
+                        reject({msg:err})
+                    });
+                })
+            },
+            generates: function () {
+                var that = this;
+                that.generate(1);
+            },
+            generate: function (type = 0) {
+                var that = this;
+                this.requestPost(that.U({c:"store.StoreProduct",a:'is_format_attr',p:{id:that.id,type:type}}), {attrs:this.formData.items}).then(function (res) {
+                    that.$set(that.formData, 'attrs', res.data.value);
+                    that.$set(that, 'formHeader', res.data.header);
+                    if (that.id && that.formData.is_sub == 1 && that.formData.spec_type == 1) {
+                        that.formHeader.push({title:'一级返佣(元)'});
+                        that.formHeader.push({title:'二级级返佣(元)'});
+                    }
+                }).catch(function (res) {
+                    return that.showMsg(res.msg);
+                });
+            },
+            handleSubmit:function () {
+                var that = this;
+                var time = $('#time').val();
+                var rtime = $('#rtime').val();
+                that.formData.time = time;
+                that.formData.rtime = rtime;
+                if (!that.formData['nickname']){
+                    return that.showMsg('请填写名称');
+                }
+                if (!that.formData['image']){
+                    return that.showMsg('请上传图片');
+                }
+
+                if (!that.formData['time']){
+                    return that.showMsg('请选择预约时间');
+                }
+                if (!that.formData['rtime']){
+                    return that.showMsg('请选择进场时间');
+                }
+                $('#submit').attr('disabled', 'disabled').text('保存中...');
+                that.requestPost(that.U({c:'auction.auction',a:'save',p:{id:that.id}}),that.formData).then(function (res) {
+                    that.confirm();
+                }).catch(function (res) {
+                    that.showMsg(res.msg);
+                });
+
+            },
+            confirm: function(){
+                var that = this;
+                layui.use(['layer'], function () {
+                    var layer = layui.layer;
+                    layer.confirm(that.id ? '修改成功是否返回产品列表' : '添加成功是否返回产品列表', {
+                        btn: ['返回列表',that.id ? '继续修改' : '继续添加'] //按钮
+                    }, function(){
+                        location.href = that.U({c:'auction.auction',a:'index'});
+                    }, function(){
+                        location.reload();
+                    });
+                });
+            },
+            render:function(){
+                this.$nextTick(function(){
+                    layui.use(['form'], function () {
+                        layui.form.render('select');
+                    });
+                })
+            },
+            // 移动
+            handleDragStart (e, item) {
+                this.dragging = item;
+            },
+            handleDragEnd (e, item) {
+                this.dragging = null
+            },
+            handleDragOver (e) {
+                e.dataTransfer.dropEffect = 'move'
+            },
+            handleDragEnter (e, item) {
+                e.dataTransfer.effectAllowed = 'move'
+                if (item === this.dragging) {
+                    return
+                }
+                var newItems = [...this.formData.activity];
+                var src = newItems.indexOf(this.dragging);
+                var dst = newItems.indexOf(item);
+                newItems.splice(dst, 0, ...newItems.splice(src, 1))
+                this.formData.activity = newItems;
+            },
+            getRuleList:function (type) {
+                var that = this;
+                that.requestGet(that.U({c:'store.StoreProduct',a:'get_rule'})).then(function (res) {
+                    that.$set(that,'ruleList',res.data);
+                    if(type !== undefined){
+                        that.render();
+                    }
+                });
+            },
+            addRule:function(){
+                return this.createFrame('添加商品规则',this.U({c:'store.StoreProductRule',a:'create'}));
+            },
+            allRule:function () {
+                if (this.ruleIndex != -1) {
+                    var rule = this.ruleList[this.ruleIndex];
+                    if (rule) {
+                        this.ruleBool = true;
+                        var rule_value = rule.rule_value.map(function (item) {
+                            return item;
+                        });
+                        this.$set(this.formData,'items',rule_value);
+                        this.$set(this.formData,'attrs',[]);
+                        this.$set(this,'formHeader',[]);
+                        return true;
+                    }
+                }
+                this.showMsg('选择的属性无效');
+            }
+        },
+        mounted: function () {
+            var that = this;
+            axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
+            that.getProductInfo();
+            window.$vm = that;
+            window.changeIMG = that.changeIMG;
+            window.insertEditor = that.insertEditor;
+            window.insertEditorVideo = that.insertEditorVideo;
+            window.successFun = function(){
+                that.getRuleList(1);
+            }
+            $(that.$refs.filElem).change(function () {
+                var inputFile = this.files[0];
+                that.requestPost(that.U({c:"widget.video",a:'get_signature'})).then(function (res) {
+                    AdminUpload.upload(res.data.uploadType,{
+                        token: res.data.uploadToken || '',
+                        file: inputFile,
+                        accessKeyId: res.data.accessKey || '',
+                        accessKeySecret: res.data.secretKey || '',
+                        bucketName: res.data.storageName || '',
+                        region: res.data.storageRegion || '',
+                        domain: res.data.domain || '',
+                        uploadIng:function (progress) {
+                            that.upload.videoIng = true;
+                            that.progress = progress;
+                        }
+                    }).then(function (res) {
+                        //成功
+                        that.$set(that.formData, 'video_link', res.url);
+                        that.progress = 0;
+                        that.upload.videoIng = false;
+                        return that.showMsg('上传成功');
+                    }).catch(function (err) {
+                        //失败
+                        console.info(err);
+                        return that.showMsg('上传错误请检查您的配置');
+                    });
+                }).catch(function (res) {
+                    return that.showMsg(res.msg || '获取密钥失败,请检查您的配置');
+                });
+            })
+        }
+    });
 </script>
-{/block}
+</body>
+</html>
+<script>
+    import Layout from "../../../../../public/static/plug/iview/dist/iview";
+    export default {
+        components: {Layout}
+    }
+</script>

+ 839 - 0
app/admin/view/auction/auction/edit.php

@@ -0,0 +1,839 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+    <link href="{__FRAME_PATH}css/font-awesome.min.css" rel="stylesheet">
+    <link href="{__ADMIN_PATH}plug/umeditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
+    <script type="text/javascript" src="{__ADMIN_PATH}plug/umeditor/third-party/jquery.min.js"></script>
+    <script type="text/javascript" src="{__ADMIN_PATH}plug/umeditor/third-party/template.min.js"></script>
+    <script type="text/javascript" charset="utf-8" src="{__ADMIN_PATH}plug/umeditor/umeditor.config.js"></script>
+    <script type="text/javascript" charset="utf-8" src="{__ADMIN_PATH}plug/umeditor/umeditor.min.js"></script>
+    <script type="text/javascript" src="{__ADMIN_PATH}plug/umeditor/lang/zh-cn/zh-cn.js"></script>
+    <link rel="stylesheet" href="/static/plug/layui/css/layui.css">
+    <script src="/static/plug/layui/layui.js"></script>
+    <script src="{__PLUG_PATH}vue/dist/vue.min.js"></script>
+    <script src="/static/plug/axios.min.js"></script>
+    <script src="{__MODULE_PATH}widget/aliyun-oss-sdk-4.4.4.min.js"></script>
+    <script src="{__MODULE_PATH}widget/cos-js-sdk-v5.min.js"></script>
+    <script src="{__MODULE_PATH}widget/qiniu-js-sdk-2.5.5.js"></script>
+    <script src="{__MODULE_PATH}widget/plupload.full.min.js"></script>
+    <script src="{__MODULE_PATH}widget/videoUpload.js"></script>
+    <style>
+        .layui-form-item {
+            margin-bottom: 0px;
+        }
+
+        .pictrueBox {
+            display: inline-block !important;
+        }
+
+        .pictrue {
+            width: 60px;
+            height: 60px;
+            border: 1px dotted rgba(0, 0, 0, 0.1);
+            margin-right: 15px;
+            display: inline-block;
+            position: relative;
+            cursor: pointer;
+        }
+
+        .pictrue img {
+            width: 100%;
+            height: 100%;
+        }
+
+        .upLoad {
+            width: 58px;
+            height: 58px;
+            line-height: 58px;
+            border: 1px dotted rgba(0, 0, 0, 0.1);
+            border-radius: 4px;
+            background: rgba(0, 0, 0, 0.02);
+            cursor: pointer;
+            display: flex;
+            justify-content: center;
+            align-items: center;
+        }
+
+        .rulesBox {
+            display: flex;
+            flex-wrap: wrap;
+            margin-left: 10px;
+        }
+
+        .layui-tab-content {
+            margin-top: 15px;
+        }
+
+        .ml110 {
+            margin: 18px 0 4px 110px;
+        }
+
+        .rules {
+            display: flex;
+        }
+
+        .rules-btn-sm {
+            height: 30px;
+            line-height: 30px;
+            font-size: 12px;
+            width: 109px;
+        }
+
+        .rules-btn-sm input {
+            width: 79% !important;
+            height: 84% !important;
+            padding: 0 10px;
+        }
+
+        .ml10 {
+            margin-left: 10px !important;
+        }
+
+        .ml40 {
+            margin-left: 40px !important;
+        }
+
+        .closes {
+            position: absolute;
+            left: 86%;
+            top: -18%;
+        }
+        .red {
+            color: red;
+        }
+        .layui-input-block .layui-video-box{
+            width: 22%;
+            height: 180px;
+            border-radius: 10px;
+            background-color: #707070;
+            margin-top: 10px;
+            position: relative;
+            overflow: hidden;
+        }
+        .layui-input-block .layui-video-box i{
+            color: #fff;
+            line-height: 180px;
+            margin: 0 auto;
+            width: 50px;
+            height: 50px;
+            display: inherit;
+            font-size: 50px;
+        }
+        .layui-input-block .layui-video-box .mark{
+            position: absolute;
+            width: 100%;
+            height: 30px;
+            top: 0;
+            background-color: rgba(0,0,0,.5);
+            text-align: center;
+        }
+        .store_box{
+            display: flex;
+        }
+        .info{
+            color: #c9c9c9;
+            padding-left: 10px;
+            line-height: 30px;
+        }
+    </style>
+</head>
+<body>
+<div class="layui-fluid">
+    <div class="layui-row layui-col-space15"  id="app" v-cloak="">
+        <div class="layui-card">
+            <div class="layui-card-header">
+                <span class="">竞拍添加</span>
+                <button style="margin-left: 20px" type="button" class="layui-btn layui-btn-primary layui-btn-xs" @click="goBack">返回列表</button>
+            </div>
+            <div class="layui-card-body">
+                <form class="layui-form" action="" v-cloak="">
+                    <div class="layui-tab layui-tab-brief" lay-filter="docTabBrief">
+                        <div class="layui-tab-content">
+                            <div class="layui-tab-item layui-show">
+                                <div class="layui-row layui-col-space15">
+                                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
+                                        <div class="grid-demo grid-demo-bg1">
+                                            <div class="layui-form-item">
+                                                <label class="layui-form-label">商品名称<i class="red">*</i></label>
+                                                <div class="layui-input-block">
+                                                    <input type="text" name="nickname" lay-verify="title" autocomplete="off"
+                                                           placeholder="竞拍名称" class="layui-input" v-model="formData.nickname" maxlength="100">
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
+                                        <div class="grid-demo grid-demo-bg1">
+                                            <div class="layui-form-item">
+                                                <label class="layui-form-label">竞拍封面图<i class="red">*</i></label>
+                                                <div class="pictrueBox">
+                                                    <div class="pictrue" v-if="formData.image" @click="uploadImage('image')">
+                                                        <img :src="formData.image"></div>
+                                                    <div class="upLoad" @click="uploadImage('image')" v-else>
+                                                        <i class="layui-icon layui-icon-camera" class="iconfont"
+                                                           style="font-size: 26px;"></i>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+<!--                                <div class="layui-row layui-col-space15">-->
+<!--                                    <div class="layui-col-xs12 layui-col-sm4 layui-col-md4">-->
+<!--                                        <div class="grid-demo grid-demo-bg1">-->
+<!--                                            <div class="layui-form-item">-->
+<!--                                                <label class="layui-form-label">商品状态</label>-->
+<!--                                                <div class="layui-input-block">-->
+<!--                                                    <input id="status" type="radio" name="status" lay-filter="status" value="1" title="正常" :checked="formData.status == 1 ? true : false">-->
+<!--                                                    <input id="status" type="radio" name="status" lay-filter="status" value="0" title="禁用" :checked="formData.status == 0 ? true : false">-->
+<!--                                                </div>-->
+<!--                                            </div>-->
+<!--                                        </div>-->
+<!--                                    </div>-->
+<!--                                </div>-->
+                                    <div class="layui-row layui-col-space15">
+                                        <div class="layui-col-xs12 layui-col-sm4 layui-col-md4">
+                                            <div class="grid-demo grid-demo-bg1">
+                                                <div class="layui-form-item">
+                                                    <label class="layui-form-label">预约时间<i class="red   ">*</i></label>
+                                                        <div class="layui-input-inline">
+                                                            <input type="text" class="layui-input" name="time" id="time" value="" placeholder="-">
+                                                        </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row layui-col-space15">
+                                        <div class="layui-col-xs12 layui-col-sm4 layui-col-md4">
+                                            <div class="grid-demo grid-demo-bg1">
+                                                <div class="layui-form-item">
+                                                    <label class="layui-form-label">进场时间<i class="red">*</i></label>
+                                                    <div class="layui-input-inline">
+                                                        <input type="text" class="layui-input" name="rtime" id="rtime" value="" placeholder="-">
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
+                                        <div class="grid-demo grid-demo-bg1">
+                                            <div class="layui-form-item">
+                                                <label class="layui-form-label">排序<i class="red">*</i></label>
+                                                <div class="layui-input-inline">
+                                                    <input type="number" name="sort" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.sort" maxlength="100" value="0">
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+
+
+                            </div>
+
+                        </div>
+                        <div class="layui-tab-content">
+                            <div class="layui-row layui-col-space15">
+                                <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
+                                    <button class="layui-btn layui-btn-normal layui-btn-sm" id="submit" type="button" @click="handleSubmit()">提交</button>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </form>
+            </div>
+        </div>
+    </div>
+</div>
+<script>
+
+    var id = {$id};
+    var add_time = '{$dataList.add_time}';
+    var end_time = '{$dataList.end_time}';
+    var radd_time = '{$dataList.radd_time}';
+    var rend_time = '{$dataList.rend_time}';
+    layui.use('laydate', function(){
+        var laydate = layui.laydate;
+
+        laydate.render({
+            elem: '#time'
+            ,type: 'time'
+            ,range: true
+            ,value: add_time+'-'+end_time
+        });
+        laydate.render({
+            elem: '#rtime'
+            ,type: 'time'
+            ,range: true
+            ,value: radd_time+'-'+rend_time
+        });
+    })
+    //Demo
+    layui.use('form', function(){
+        var form = layui.form;
+
+        //监听提交
+        form.on('submit(formDemo)', function(data){
+            layer.msg(JSON.stringify(data.field));
+            return false;
+        });
+    });
+
+    new Vue({
+        el: '#app',
+        data: {
+            id:id,
+            //分类列表
+            cateList: [],
+            //运费模板
+            tempList: [],
+            upload:{
+                videoIng:false
+            },
+            formData: {
+
+            },
+            rule: { //多图选择规则
+                slider_image: {
+                    maxLength: 1
+                }
+            },
+            attr: [],//临时属性
+            newRule: false,//是否添加新规则
+            radioRule: ['status'],//radio 当选规则
+            ruleList:[],
+            ruleIndex:-1,
+            progress: 0,
+            um: null,//编译器实例化
+            form: null,//layui.form
+            layTabId: 1,
+            ruleBool: id ? true : false,
+        },
+        watch:{
+            'formData.is_sub':function (n) {
+                if (n == 1) {
+                    this.formHeader.push({title:'一级返佣(元)'});
+                    this.formHeader.push({title:'二级级返佣(元)'});
+                } else {
+                    this.formHeader.pop();
+                    this.formHeader.pop();
+                }
+            },
+            'formData.spec_type':function (n) {
+                if (n) {
+                    this.render();
+                }
+            },
+            // 'formData.image':function (n) {
+            //     if(!this.batchAttr.pic){
+            //         this.batchAttr.pic = n;
+            //     }
+            //     if(!this.formData.attr.pic){
+            //         this.formData.attr.pic = n;
+            //     }
+            // }
+        },
+        methods: {
+            back:function(){
+                var that = this;
+                layui.use(['element'], function () {
+                    layui.element.tabChange('docTabBrief', that.layTabId == 1 ? 1 : parseInt(that.layTabId) - 1);
+                });
+            },
+            next:function(){
+                var that = this;
+                layui.use(['element'], function () {
+                    layui.element.tabChange('docTabBrief', that.layTabId == 3 ? 3 : parseInt(that.layTabId) + 1);
+                });
+            },
+            goBack:function(){
+                location.href = this.U({c:'auction.auction',a:'index'});
+            },
+            U: function (opt) {
+                var m = opt.m || 'admin', c = opt.c || window.controlle || '', a = opt.a || 'index', q = opt.q || '',
+                    p = opt.p || {};
+                var params = Object. keys(p).map(function (key) {
+                    return key + '/' + p[key];
+                }).join('/');
+                var gets = Object.keys(q).map(function (key) {
+                    return key+'='+ q[key];
+                }).join('&');
+
+                return '/' + m + '/' + c + '/' + a + (params == '' ? '' : '/' + params) + (gets == '' ? '' : '?' + gets);
+            },
+            /**
+             * 提示
+             * */
+            showMsg: function (msg, success) {
+                $('#submit').removeAttr('disabled').text('提交');
+                layui.use(['layer'], function () {
+                    layui.layer.msg(msg, success);
+                });
+            },
+            addBrokerage:function(){
+                if (this.brokerage.brokerage >= 0 && this.brokerage.brokerage_two >= 0){
+                    var that = this;
+                    this.$set(this.formData,'attrs',this.formData.attrs.map(function (item) {
+                        item.brokerage = that.brokerage.brokerage;
+                        item.brokerage_two = that.brokerage.brokerage_two;
+                        return item;
+                    }));
+                } else {
+                    return this.showMsg('请填写返佣金额在进行批量添加');
+                }
+            },
+            batchClear:function(){
+                this.$set(this,'batchAttr',{
+                    pic: '',
+                    price: 0,
+                    cost: 0,
+                    ot_price: 0,
+                    stock: 0,
+                    bar_code: '',
+                    weight: 0,
+                    volume: 0,
+                });
+            },
+            /**
+             * 批量添加
+             * */
+            batchAdd:function(){
+                var that = this;
+                this.$set(this.formData,'attrs',this.formData.attrs.map(function (item) {
+                    if (that.batchAttr.pic) {
+                        item.pic = that.batchAttr.pic;
+                    }
+                    if (that.batchAttr.price > 0){
+                        item.price = that.batchAttr.price;
+                    }
+                    if (that.batchAttr.cost > 0){
+                        item.cost = that.batchAttr.cost;
+                    }
+                    if (that.batchAttr.ot_price > 0){
+                        item.ot_price = that.batchAttr.ot_price;
+                    }
+                    if (that.batchAttr.stock > 0){
+                        item.stock = that.batchAttr.stock;
+                    }
+                    if (that.batchAttr.bar_code != ''){
+                        item.bar_code = that.batchAttr.bar_code;
+                    }
+                    if (that.batchAttr.weight > 0){
+                        item.weight = that.batchAttr.weight;
+                    }
+                    if (that.batchAttr.volume > 0){
+                        item.volume = that.batchAttr.volume;
+                    }
+                    return item;
+                }));
+
+            },
+            /**
+             * 获取商品信息
+             * */
+            getProductInfo: function () {
+                var that = this;
+                that.requestGet(that.U({c:"auction.auction",a:'get_auction',q:{id:that.id}})).then(function (res) {
+
+                    var productInfo = res.data.productInfo || {};
+                    if(productInfo.id && that.id){
+                        that.$set(that,'formData',productInfo);
+                        that.generate();
+                    }
+                    that.getRuleList();
+                    that.init();
+                }).catch(function (res) {
+                    that.showMsg(res.msg);
+                })
+            },
+            /**
+             * 给某个属性添加属性值
+             * @param item
+             * */
+            addDetail: function (item) {
+                if (!item.detailValue) return false;
+                if (item.detail.find(function (val) {
+                    if(item.detailValue == val){
+                        return true;
+                    }
+                })) {
+                    return this.showMsg('添加的属性值重复');
+                }
+                item.detail.push(item.detailValue);
+                item.detailValue = '';
+            },
+            /**
+             * 删除某个属性值
+             * @param item 父级循环集合
+             * @param inx 子集index
+             * */
+            deleteValue: function (item, inx) {
+                if (item.detail.length > 1) {
+                    item.detail.splice(inx, 1);
+                } else {
+                    return this.showMsg('请设置至少一个属性');
+                }
+            },
+            /**
+             * 删除某条属性
+             * @param index
+             * */
+            deleteItem: function (index) {
+                this.formData.items.splice(index, 1);
+            },
+            /**
+             * 删除某条属性
+             * @param index
+             * */
+            deleteAttrs: function (index) {
+                var that = this;
+                if(that.id > 0){
+                    that.requestGet(that.U({c:"store.StoreProduct",a:'check_activity',q:{id:that.id}})).then(function (res) {
+                        that.showMsg(res.msg);
+                    }).catch(function (res) {
+                        if (that.formData.attrs.length > 1) {
+                            that.formData.attrs.splice(index, 1);
+                        } else {
+                            return that.showMsg('请设置至少一个规则');
+                        }
+                    })
+                }else{
+                    if (that.formData.attrs.length > 1) {
+                        that.formData.attrs.splice(index, 1);
+                    } else {
+                        return that.showMsg('请设置至少一个规则');
+                    }
+                }
+            },
+            /**
+             * 创建属性
+             * */
+            createAttrName: function () {
+                if (this.formDynamic.attrsName && this.formDynamic.attrsVal) {
+                    if (this.formData.items.find(function (val) {
+                        if (val.value == this.formDynamic.attrsName) {
+                            return true;
+                        }
+                    }.bind(this))) {
+                        return this.showMsg('添加的属性重复');
+                    }
+                    this.formData.items.push({
+                        value: this.formDynamic.attrsName,
+                        detailValue: '',
+                        attrHidden: false,
+                        detail: [this.formDynamic.attrsVal]
+                    });
+                    this.formDynamic.attrsName = '';
+                    this.formDynamic.attrsVal = '';
+                    this.newRule = false;
+                } else {
+                    return this.showMsg('请添加完整的规格!');
+                }
+            },
+            /**
+             * 删除图片
+             * */
+            deleteImage: function (key, index) {
+                var that = this;
+                if (index != undefined) {
+                    that.formData[key].splice(index, 1);
+                    that.$set(that.formData, key, that.formData[key]);
+                } else {
+                    that.$set(that.formData, key, '');
+                }
+            },
+            createFrame: function (title, src, opt) {
+                opt === undefined && (opt = {});
+                var h = 0;
+                if (window.innerHeight < 800 && window.innerHeight >= 700) {
+                    h = window.innerHeight - 50;
+                } else if (window.innerHeight < 900 && window.innerHeight >= 800) {
+                    h = window.innerHeight - 100;
+                } else if (window.innerHeight < 1000 && window.innerHeight >= 900) {
+                    h = window.innerHeight - 150;
+                } else if (window.innerHeight >= 1000) {
+                    h = window.innerHeight - 200;
+                } else {
+                    h = window.innerHeight;
+                }
+                var area = [(opt.w || window.innerWidth / 2) + 'px', (!opt.h || opt.h > h ? h : opt.h) + 'px'];
+                layui.use('layer',function () {
+                    return layer.open({
+                        type: 2,
+                        title: title,
+                        area: area,
+                        fixed: false, //不固定
+                        maxmin: true,
+                        moveOut: false,//true  可以拖出窗外  false 只能在窗内拖
+                        anim: 5,//出场动画 isOutAnim bool 关闭动画
+                        offset: 'auto',//['100px','100px'],//'auto',//初始位置  ['100px','100px'] t[ 上 左]
+                        shade: 0,//遮罩
+                        resize: true,//是否允许拉伸
+                        content: src,//内容
+                        move: '.layui-layer-title'
+                    });
+                });
+            },
+            changeIMG: function (name, value) {
+                if (this.getRule(name).maxLength !== undefined) {
+                    var that = this;
+                    value.map(function (v) {
+                        that.formData[name].push(v);
+                    });
+                    this.$set(this.formData, name, this.formData[name]);
+                } else {
+                    if(name == 'batchAttr.pic'){
+                        this.batchAttr.pic = value;
+                    } else {
+                        if (name.indexOf('.') !== -1) {
+                            var key = name.split('.');
+                            if (key.length == 2){
+                                this.formData[key[0]][key[1]] = value;
+                            } else if(key.length == 3){
+                                this.formData[key[0]][key[1]][key[2]] = value;
+                            } else if(key.length == 4){
+                                this.$set(this.formData[key[0]][key[1]][key[2]],key[3],value)
+                            }
+                        } else {
+                            this.formData[name] = value;
+                        }
+                    }
+                }
+            },
+            getRule: function (name) {
+                return this.rule[name] || {};
+            },
+            uploadImage: function (name) {
+                return this.createFrame('选择图片',this.U({c:"widget.images",a:'index',p:{fodder:name}}),{h:545,w:900});
+            },
+            uploadVideo: function () {
+                if (this.videoLink) {
+                    this.formData.video_link = this.videoLink;
+                } else {
+                    $(this.$refs.filElem).click();
+                }
+            },
+            delVideo: function () {
+                var that = this;
+                that.$set(that.formData, 'video_link', '');
+            },
+            insertEditor: function (list) {
+                this.um.execCommand('insertimage', list);
+            },
+            insertEditorVideo: function (src) {
+                this.um.setContent('<div><video style="width: 99%" src="'+src+'" class="video-ue" controls="controls" width="100"><source src="'+src+'"></source></video></div><br>',true);
+            },
+            getContent: function () {
+                return this.um.getContent();
+            },
+            /**
+             * 监听radio字段
+             */
+            eeventRadio: function () {
+                var that = this;
+                that.radioRule.map(function (val) {
+                    that.form.on('radio(' + val + ')', function (res) {
+                        that.formData[val] = res.value;
+                    });
+                })
+            },
+            init: function () {
+                var that = this;
+                window.UMEDITOR_CONFIG.toolbar = [
+                    // 加入一个 test
+                    'source | undo redo | bold italic underline strikethrough | superscript subscript | forecolor backcolor | removeformat |',
+                    'insertorderedlist insertunorderedlist | selectall cleardoc paragraph | fontfamily fontsize',
+                    '| justifyleft justifycenter justifyright justifyjustify |',
+                    'link unlink | emotion selectimgs video  | map',
+                    '| horizontal print preview fullscreen', 'drafts', 'formula'
+                ];
+                UM.registerUI('selectimgs', function (name) {
+                    var me = this;
+                    var $btn = $.eduibutton({
+                        icon: 'image',
+                        click: function () {
+                            that.createFrame('选择图片', "{:Url('widget.images/index',['fodder'=>'editor'])}");
+                        },
+                        title: '选择图片'
+                    });
+
+                    this.addListener('selectionchange', function () {
+                        //切换为不可编辑时,把自己变灰
+                        var state = this.queryCommandState(name);
+                        $btn.edui().disabled(state == -1).active(state == 1)
+                    });
+                    return $btn;
+
+                });
+                UM.registerUI('video', function (name) {
+                    var me = this;
+                    var $btn = $.eduibutton({
+                        icon: 'video',
+                        click: function () {
+                            that.createFrame('选择视频', "{:Url('widget.video/index',['fodder'=>'video'])}");
+                        },
+                        title: '选择视频'
+                    });
+
+                    this.addListener('selectionchange', function () {
+                        //切换为不可编辑时,把自己变灰
+                        var state = this.queryCommandState(name);
+                        $btn.edui().disabled(state == -1).active(state == 1)
+                    });
+                    return $btn;
+
+                });
+                //实例化编辑器
+                this.um = UM.getEditor('myEditor', {initialFrameWidth: '99%', initialFrameHeight: 400});
+                this.um.setContent(that.formData.description);
+                that.$nextTick(function () {
+                    layui.use(['form','element'], function () {
+                        that.form = layui.form;
+                        that.form.render();
+                        that.form.on('select(temp_id)', function (data) {
+                            that.$set(that.formData, 'temp_id', data.value);
+                        });
+                        that.form.on('select(rule_index)', function (data) {
+                            that.ruleIndex = data.value;
+                        });
+                        layui.element.on('tab(docTabBrief)', function(){
+                            that.layTabId = this.getAttribute('lay-id');
+                        });
+                        that.eeventRadio();
+                    });
+                })
+            },
+            requestPost: function (url, data) {
+                return new Promise(function (resolve, reject) {
+                    axios.post(url, data).then(function (res) {
+                        if (res.status == 200 && res.data.code == 200) {
+                            resolve(res.data)
+                        } else {
+                            reject(res.data);
+                        }
+                    }).catch(function (err) {
+                        reject({msg:err})
+                    });
+                })
+            },
+            requestGet: function (url) {
+                return new Promise(function (resolve, reject) {
+                    axios.get(url).then(function (res) {
+                        if (res.status == 200 && res.data.code == 200) {
+                            resolve(res.data)
+                        } else {
+                            reject(res.data);
+                        }
+                    }).catch(function (err) {
+                        reject({msg:err})
+                    });
+                })
+            },
+            generates: function () {
+                var that = this;
+                that.generate(1);
+            },
+            handleSubmit:function () {
+                var that = this;
+                var time = $('#time').val();
+                var rtime = $('#rtime').val();
+                var status = $('#status').val();
+
+                that.formData.status = status;
+                that.formData.time = time;
+                that.formData.rtime = rtime;
+                console.log(status);
+                if (!that.formData['nickname']){
+                    return that.showMsg('请填写名称');
+                }
+                if (!that.formData['image']){
+                    return that.showMsg('请上传图片');
+                }
+
+                if (!that.formData['time']){
+                    return that.showMsg('请选择预约时间');
+                }
+                if (!that.formData['rtime']){
+                    return that.showMsg('请选择进场时间');
+                }
+                $('#submit').attr('disabled', 'disabled').text('保存中...');
+                that.requestPost(that.U({c:'auction.auction',a:'update',p:{id:that.id}}),that.formData).then(function (res) {
+                    that.confirm();
+                }).catch(function (res) {
+                    that.showMsg(res.msg);
+                });
+
+            },
+            confirm: function(){
+                var that = this;
+                layui.use(['layer'], function () {
+                    var layer = layui.layer;
+                    layer.confirm(that.id ? '修改成功是否返回产品列表' : '添加成功是否返回产品列表', {
+                        btn: ['返回列表',that.id ? '继续修改' : '继续添加'] //按钮
+                    }, function(){
+                        location.href = that.U({c:'auction.auction',a:'index'});
+                    }, function(){
+                        location.reload();
+                    });
+                });
+            },
+            render:function(){
+                this.$nextTick(function(){
+                    layui.use(['form'], function () {
+                        layui.form.render('select');
+                    });
+                })
+            },
+            // 移动
+            handleDragStart (e, item) {
+                this.dragging = item;
+            },
+            handleDragEnd (e, item) {
+                this.dragging = null
+            },
+            handleDragOver (e) {
+                e.dataTransfer.dropEffect = 'move'
+            },
+            handleDragEnter (e, item) {
+                e.dataTransfer.effectAllowed = 'move'
+                if (item === this.dragging) {
+                    return
+                }
+                var newItems = [...this.formData.activity];
+                var src = newItems.indexOf(this.dragging);
+                var dst = newItems.indexOf(item);
+                newItems.splice(dst, 0, ...newItems.splice(src, 1))
+                this.formData.activity = newItems;
+            },
+            addRule:function(){
+                return this.createFrame('添加商品规则',this.U({c:'store.StoreProductRule',a:'create'}));
+            },
+            allRule:function () {
+                if (this.ruleIndex != -1) {
+                    var rule = this.ruleList[this.ruleIndex];
+                    if (rule) {
+                        this.ruleBool = true;
+                        var rule_value = rule.rule_value.map(function (item) {
+                            return item;
+                        });
+                        this.$set(this.formData,'items',rule_value);
+                        this.$set(this.formData,'attrs',[]);
+                        this.$set(this,'formHeader',[]);
+                        return true;
+                    }
+                }
+                this.showMsg('选择的属性无效');
+            }
+        },
+        mounted: function () {
+            var that = this;
+            that.getProductInfo();
+            window.changeIMG = that.changeIMG;
+            window.$vm = that;
+        }
+    });
+</script>
+</body>
+</html>
+<script>
+
+</script>

+ 41 - 24
app/admin/view/auction/auction/index.php

@@ -56,20 +56,7 @@
                 </div>
             </div>
         </div>
-        <script type="text/html" id="act">
-            <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" lay-event='edit'>
-                编辑
-            </button>
-            <button type="button" class="layui-btn layui-btn-xs" onclick="dropdown(this)">操作 <span class="caret"></span></button>
-            <ul class="layui-nav-child layui-anim layui-anim-upbit">
-                <li>
-                    <a href="{:Url('store.storeProductReply/index')}?product_id={{d.id}}">
-                        <i class="fa fa-warning"></i> 评论查看
-                    </a>
-                </li>
-            </ul>
-        </script>
-        <!--end-->
+
         <!-- 中间详细信息-->
         <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">
@@ -84,9 +71,26 @@
                 <div class="layui-card-body">
                     <div class="layui-btn-container" id="container-action">
                         <a class="layui-btn layui-btn-sm" href="{:Url('create')}">添加商品</a>
-                        <button class="layui-btn layui-btn-sm" data-type="del_auction">批量删除</button>
+<!--                        <button class="layui-btn layui-btn-sm" data-type="del_auction">批量删除</button>-->
                     </div>
                     <table class="layui-hide" id="List" lay-filter="List"></table>
+
+
+                    <script type="text/html" id="image">
+                        <img style="cursor: pointer" lay-event="open_image" src="{{d.image}}">
+                    </script>
+                    <script type="text/html" id="status">
+                        <input type='checkbox' name='id' lay-skin='switch' value="{{d.id}}" lay-filter='status' lay-text='使用|禁用'  {{ d.status  == 1 ? 'checked' : '' }}>
+                    </script>
+                    <script type="text/html" id="act">
+                        <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" lay-event='edit'>
+                            编辑
+                        </button>
+                        <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-event='delete' id="">
+                            删除
+                        </button>
+
+                    </script>
                 </div>
             </div>
         </div>
@@ -102,7 +106,8 @@
             {type: 'checkbox'},
             {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%', templet: '#id'},
             {field: 'nickname', title: '竞拍场', templet: '#nickname', width: '10%', align: 'center'},
-            {field: 'img', title: '封面', templet: '#img', align: 'center'},
+            {field: 'image', title: '封面', templet: '#image', align: 'center'},
+            {field: 'status', title: '状态', templet: '#status', align: 'center'},
             {field: 'add_time', title: '预约开始', templet: '#add_time', width: '10%', align: 'center'},
             {field: 'end_time', title: '预约结束', templet: '#end_time', width: '10%', align: 'center'},
             {field: 'radd_time', title: '入场开始', templet: '#radd_time', width: '10%', align: 'center'},
@@ -113,10 +118,9 @@
     //点击事件绑定
     layList.tool(function (event,data,obj) {
         switch (event) {
-            case 'delstor':
-                var url=layList.U({c:'store.store_product',a:'delete',q:{id:data.id}});
-                if(data.is_del) var code = {title:"操作提示",text:"确定恢复商品操作吗?",type:'info',confirm:'是的,恢复该商品'};
-                else var code = {title:"操作提示",text:"确定将该商品移入回收站吗?",type:'info',confirm:'是的,移入回收站'};
+            case 'delete':
+                var url=layList.U({c:'auction.auction',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) {
@@ -134,12 +138,25 @@
                 $eb.openImage(data.image);
                 break;
             case 'edit':
-                location.href = layList.U({a:'create',q:{id:data.id}});
-                break;
-            case 'attr':
-                $eb.createModalFrame(data.store_name+'-属性',layList.U({a:'attr',q:{id:data.id}}),{h:600,w:800})
+                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}

+ 917 - 0
app/admin/view/auction/auction_product/create.php

@@ -0,0 +1,917 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+    <link href="{__FRAME_PATH}css/font-awesome.min.css" rel="stylesheet">
+    <link href="{__ADMIN_PATH}plug/umeditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
+    <script type="text/javascript" src="{__ADMIN_PATH}plug/umeditor/third-party/jquery.min.js"></script>
+    <script type="text/javascript" src="{__ADMIN_PATH}plug/umeditor/third-party/template.min.js"></script>
+    <script type="text/javascript" charset="utf-8" src="{__ADMIN_PATH}plug/umeditor/umeditor.config.js"></script>
+    <script type="text/javascript" charset="utf-8" src="{__ADMIN_PATH}plug/umeditor/umeditor.min.js"></script>
+    <script type="text/javascript" src="{__ADMIN_PATH}plug/umeditor/lang/zh-cn/zh-cn.js"></script>
+    <link rel="stylesheet" href="/static/plug/layui/css/layui.css">
+    <script src="/static/plug/layui/layui.js"></script>
+    <script src="{__PLUG_PATH}vue/dist/vue.min.js"></script>
+    <script src="/static/plug/axios.min.js"></script>
+    <script src="{__MODULE_PATH}widget/aliyun-oss-sdk-4.4.4.min.js"></script>
+    <script src="{__MODULE_PATH}widget/cos-js-sdk-v5.min.js"></script>
+    <script src="{__MODULE_PATH}widget/qiniu-js-sdk-2.5.5.js"></script>
+    <script src="{__MODULE_PATH}widget/plupload.full.min.js"></script>
+    <script src="{__MODULE_PATH}widget/videoUpload.js"></script>
+    <style>
+        .layui-form-item {
+            margin-bottom: 0px;
+        }
+
+        .pictrueBox {
+            display: inline-block !important;
+        }
+
+        .pictrue {
+            width: 60px;
+            height: 60px;
+            border: 1px dotted rgba(0, 0, 0, 0.1);
+            margin-right: 15px;
+            display: inline-block;
+            position: relative;
+            cursor: pointer;
+        }
+
+        .pictrue img {
+            width: 100%;
+            height: 100%;
+        }
+
+        .upLoad {
+            width: 58px;
+            height: 58px;
+            line-height: 58px;
+            border: 1px dotted rgba(0, 0, 0, 0.1);
+            border-radius: 4px;
+            background: rgba(0, 0, 0, 0.02);
+            cursor: pointer;
+            display: flex;
+            justify-content: center;
+            align-items: center;
+        }
+
+        .rulesBox {
+            display: flex;
+            flex-wrap: wrap;
+            margin-left: 10px;
+        }
+
+        .layui-tab-content {
+            margin-top: 15px;
+        }
+
+        .ml110 {
+            margin: 18px 0 4px 110px;
+        }
+
+        .rules {
+            display: flex;
+        }
+
+        .rules-btn-sm {
+            height: 30px;
+            line-height: 30px;
+            font-size: 12px;
+            width: 109px;
+        }
+
+        .rules-btn-sm input {
+            width: 79% !important;
+            height: 84% !important;
+            padding: 0 10px;
+        }
+
+        .ml10 {
+            margin-left: 10px !important;
+        }
+
+        .ml40 {
+            margin-left: 40px !important;
+        }
+
+        .closes {
+            position: absolute;
+            left: 86%;
+            top: -18%;
+        }
+        .red {
+            color: red;
+        }
+        .layui-input-block .layui-video-box{
+            width: 22%;
+            height: 180px;
+            border-radius: 10px;
+            background-color: #707070;
+            margin-top: 10px;
+            position: relative;
+            overflow: hidden;
+        }
+        .layui-input-block .layui-video-box i{
+            color: #fff;
+            line-height: 180px;
+            margin: 0 auto;
+            width: 50px;
+            height: 50px;
+            display: inherit;
+            font-size: 50px;
+        }
+        .layui-input-block .layui-video-box .mark{
+            position: absolute;
+            width: 100%;
+            height: 30px;
+            top: 0;
+            background-color: rgba(0,0,0,.5);
+            text-align: center;
+        }
+        .store_box{
+            display: flex;
+        }
+        .info{
+            color: #c9c9c9;
+            padding-left: 10px;
+            line-height: 30px;
+        }
+    </style>
+</head>
+<body>
+<div class="layui-fluid">
+    <div class="layui-row layui-col-space15"  id="app" v-cloak="">
+        <div class="layui-card">
+            <div class="layui-card-header">
+                <span class="">竞拍添加</span>
+                <button style="margin-left: 20px" type="button" class="layui-btn layui-btn-primary layui-btn-xs" @click="goBack">返回列表</button>
+            </div>
+            <div class="layui-card-body">
+                <form class="layui-form" action="" v-cloak="">
+                    <div class="layui-tab layui-tab-brief" lay-filter="docTabBrief">
+                        <div class="layui-tab-content">
+                            <div class="layui-tab-item layui-show">
+                                <div class="layui-row layui-col-space15">
+                                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
+                                        <div class="grid-demo grid-demo-bg1">
+                                            <div class="layui-form-item">
+                                                <label class="layui-form-label">商品名称<i class="red">*</i></label>
+                                                <div class="layui-input-block">
+                                                    <input type="text" name="nickname" lay-verify="title" autocomplete="off"
+                                                           placeholder="竞拍名称" class="layui-input" v-model="formData.nickname" maxlength="100">
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
+                                        <div class="grid-demo grid-demo-bg1">
+                                            <div class="layui-form-item">
+                                                <label class="layui-form-label">竞拍封面图<i class="red">*</i></label>
+                                                <div class="pictrueBox">
+                                                    <div class="pictrue" v-if="formData.image" @click="uploadImage('image')">
+                                                        <img :src="formData.image"></div>
+                                                    <div class="upLoad" @click="uploadImage('image')" v-else>
+                                                        <i class="layui-icon layui-icon-camera" class="iconfont"
+                                                           style="font-size: 26px;"></i>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                <div class="layui-row layui-col-space15">
+                                    <div class="layui-col-xs12 layui-col-sm4 layui-col-md4">
+                                        <div class="grid-demo grid-demo-bg1">
+                                            <div class="layui-form-item">
+                                                <label class="layui-form-label">商品状态</label>
+                                                <div class="layui-input-block">
+                                                    <input type="radio" name="status" lay-filter="status" value="1" title="上架"
+                                                           :checked="formData.status == 1 ? true : false">
+                                                    <input type="radio" name="status" lay-filter="status" value="0" title="下架"
+                                                           :checked="formData.status == 0 ? true : false">
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                                    <div class="layui-row layui-col-space15">
+                                        <div class="layui-col-xs12 layui-col-sm4 layui-col-md4">
+                                            <div class="grid-demo grid-demo-bg1">
+                                                <div class="layui-form-item">
+                                                    <label class="layui-form-label">预约时间<i class="red   ">*</i></label>
+                                                        <div class="layui-input-inline">
+                                                            <input type="text" class="layui-input" name="time" id="time" value="" placeholder="-">
+                                                        </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row layui-col-space15">
+                                        <div class="layui-col-xs12 layui-col-sm4 layui-col-md4">
+                                            <div class="grid-demo grid-demo-bg1">
+                                                <div class="layui-form-item">
+                                                    <label class="layui-form-label">进场时间<i class="red">*</i></label>
+                                                    <div class="layui-input-inline">
+                                                        <input type="text" class="layui-input" name="rtime" id="rtime" value="" placeholder="-">
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
+                                        <div class="grid-demo grid-demo-bg1">
+                                            <div class="layui-form-item">
+                                                <label class="layui-form-label">排序<i class="red">*</i></label>
+                                                <div class="layui-input-inline">
+                                                    <input type="number" name="sort" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.sort" maxlength="100" value="0">
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+
+
+                            </div>
+                            <div class="layui-tab-item">
+                                <div class="layui-row layui-col-space15">
+                                    <textarea type="text/plain" name="description" id="myEditor" style="width:100%;">{{formData.description}}</textarea>
+                                </div>
+                            </div>
+
+
+                        </div>
+                        <div class="layui-tab-content">
+                            <div class="layui-row layui-col-space15">
+                                <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
+                                    <button class="layui-btn layui-btn-normal layui-btn-sm" id="submit" type="button" @click="handleSubmit()">提交</button>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </form>
+            </div>
+        </div>
+    </div>
+</div>
+<script>
+
+    var id = {$id};
+    layui.use('laydate', function(){
+        var laydate = layui.laydate;
+
+        laydate.render({
+            elem: '#time'
+            ,type: 'time'
+            ,range: true
+        });
+        laydate.render({
+            elem: '#rtime'
+            ,type: 'time'
+            ,range: true
+        });
+    })
+
+    new Vue({
+        el: '#app',
+        data: {
+            id:id,
+            //分类列表
+            cateList: [],
+            //运费模板
+            tempList: [],
+            upload:{
+                videoIng:false
+            },
+            formData: {
+                description: '',
+                status: '',
+                image:'',
+                time:'',
+                rtime:''
+            },
+            rule: { //多图选择规则
+                slider_image: {
+                    maxLength: 1
+                }
+            },
+            attr: [],//临时属性
+            newRule: false,//是否添加新规则
+            radioRule: ['status'],//radio 当选规则
+            ruleList:[],
+            ruleIndex:-1,
+            progress: 0,
+            um: null,//编译器实例化
+            form: null,//layui.form
+            layTabId: 1,
+            ruleBool: id ? true : false,
+        },
+        watch:{
+            'formData.is_sub':function (n) {
+                if (n == 1) {
+                    this.formHeader.push({title:'一级返佣(元)'});
+                    this.formHeader.push({title:'二级级返佣(元)'});
+                } else {
+                    this.formHeader.pop();
+                    this.formHeader.pop();
+                }
+            },
+            'formData.spec_type':function (n) {
+                if (n) {
+                    this.render();
+                }
+            },
+            // 'formData.image':function (n) {
+            //     if(!this.batchAttr.pic){
+            //         this.batchAttr.pic = n;
+            //     }
+            //     if(!this.formData.attr.pic){
+            //         this.formData.attr.pic = n;
+            //     }
+            // }
+        },
+        methods: {
+            back:function(){
+                var that = this;
+                layui.use(['element'], function () {
+                    layui.element.tabChange('docTabBrief', that.layTabId == 1 ? 1 : parseInt(that.layTabId) - 1);
+                });
+            },
+            next:function(){
+                var that = this;
+                layui.use(['element'], function () {
+                    layui.element.tabChange('docTabBrief', that.layTabId == 3 ? 3 : parseInt(that.layTabId) + 1);
+                });
+            },
+            goBack:function(){
+                location.href = this.U({c:'auction.auction',a:'index'});
+            },
+            U: function (opt) {
+                var m = opt.m || 'admin', c = opt.c || window.controlle || '', a = opt.a || 'index', q = opt.q || '',
+                    p = opt.p || {};
+                var params = Object. keys(p).map(function (key) {
+                    return key + '/' + p[key];
+                }).join('/');
+                var gets = Object.keys(q).map(function (key) {
+                    return key+'='+ q[key];
+                }).join('&');
+
+                return '/' + m + '/' + c + '/' + a + (params == '' ? '' : '/' + params) + (gets == '' ? '' : '?' + gets);
+            },
+            /**
+             * 提示
+             * */
+            showMsg: function (msg, success) {
+                $('#submit').removeAttr('disabled').text('提交');
+                layui.use(['layer'], function () {
+                    layui.layer.msg(msg, success);
+                });
+            },
+            addBrokerage:function(){
+                if (this.brokerage.brokerage >= 0 && this.brokerage.brokerage_two >= 0){
+                    var that = this;
+                    this.$set(this.formData,'attrs',this.formData.attrs.map(function (item) {
+                        item.brokerage = that.brokerage.brokerage;
+                        item.brokerage_two = that.brokerage.brokerage_two;
+                        return item;
+                    }));
+                } else {
+                    return this.showMsg('请填写返佣金额在进行批量添加');
+                }
+            },
+            batchClear:function(){
+                this.$set(this,'batchAttr',{
+                    pic: '',
+                    price: 0,
+                    cost: 0,
+                    ot_price: 0,
+                    stock: 0,
+                    bar_code: '',
+                    weight: 0,
+                    volume: 0,
+                });
+            },
+            /**
+             * 批量添加
+             * */
+            batchAdd:function(){
+                var that = this;
+                this.$set(this.formData,'attrs',this.formData.attrs.map(function (item) {
+                    if (that.batchAttr.pic) {
+                        item.pic = that.batchAttr.pic;
+                    }
+                    if (that.batchAttr.price > 0){
+                        item.price = that.batchAttr.price;
+                    }
+                    if (that.batchAttr.cost > 0){
+                        item.cost = that.batchAttr.cost;
+                    }
+                    if (that.batchAttr.ot_price > 0){
+                        item.ot_price = that.batchAttr.ot_price;
+                    }
+                    if (that.batchAttr.stock > 0){
+                        item.stock = that.batchAttr.stock;
+                    }
+                    if (that.batchAttr.bar_code != ''){
+                        item.bar_code = that.batchAttr.bar_code;
+                    }
+                    if (that.batchAttr.weight > 0){
+                        item.weight = that.batchAttr.weight;
+                    }
+                    if (that.batchAttr.volume > 0){
+                        item.volume = that.batchAttr.volume;
+                    }
+                    return item;
+                }));
+
+            },
+            /**
+             * 获取商品信息
+             * */
+            getProductInfo: function () {
+                var that = this;
+                that.requestGet(that.U({c:"store.StoreProduct",a:'get_product_info',q:{id:that.id}})).then(function (res) {
+                    that.$set(that,'cateList',res.data.cateList);
+                    that.$set(that,'tempList',res.data.tempList);
+                    var productInfo = res.data.productInfo || {};
+                    if(productInfo.id && that.id){
+                        that.$set(that,'formData',productInfo);
+                        that.generate();
+                    }
+                    that.getRuleList();
+                    that.init();
+                }).catch(function (res) {
+                    that.showMsg(res.msg);
+                })
+            },
+            /**
+             * 给某个属性添加属性值
+             * @param item
+             * */
+            addDetail: function (item) {
+                if (!item.detailValue) return false;
+                if (item.detail.find(function (val) {
+                    if(item.detailValue == val){
+                        return true;
+                    }
+                })) {
+                    return this.showMsg('添加的属性值重复');
+                }
+                item.detail.push(item.detailValue);
+                item.detailValue = '';
+            },
+            /**
+             * 删除某个属性值
+             * @param item 父级循环集合
+             * @param inx 子集index
+             * */
+            deleteValue: function (item, inx) {
+                if (item.detail.length > 1) {
+                    item.detail.splice(inx, 1);
+                } else {
+                    return this.showMsg('请设置至少一个属性');
+                }
+            },
+            /**
+             * 删除某条属性
+             * @param index
+             * */
+            deleteItem: function (index) {
+                this.formData.items.splice(index, 1);
+            },
+            /**
+             * 删除某条属性
+             * @param index
+             * */
+            deleteAttrs: function (index) {
+                var that = this;
+                if(that.id > 0){
+                    that.requestGet(that.U({c:"store.StoreProduct",a:'check_activity',q:{id:that.id}})).then(function (res) {
+                        that.showMsg(res.msg);
+                    }).catch(function (res) {
+                        if (that.formData.attrs.length > 1) {
+                            that.formData.attrs.splice(index, 1);
+                        } else {
+                            return that.showMsg('请设置至少一个规则');
+                        }
+                    })
+                }else{
+                    if (that.formData.attrs.length > 1) {
+                        that.formData.attrs.splice(index, 1);
+                    } else {
+                        return that.showMsg('请设置至少一个规则');
+                    }
+                }
+            },
+            /**
+             * 创建属性
+             * */
+            createAttrName: function () {
+                if (this.formDynamic.attrsName && this.formDynamic.attrsVal) {
+                    if (this.formData.items.find(function (val) {
+                        if (val.value == this.formDynamic.attrsName) {
+                            return true;
+                        }
+                    }.bind(this))) {
+                        return this.showMsg('添加的属性重复');
+                    }
+                    this.formData.items.push({
+                        value: this.formDynamic.attrsName,
+                        detailValue: '',
+                        attrHidden: false,
+                        detail: [this.formDynamic.attrsVal]
+                    });
+                    this.formDynamic.attrsName = '';
+                    this.formDynamic.attrsVal = '';
+                    this.newRule = false;
+                } else {
+                    return this.showMsg('请添加完整的规格!');
+                }
+            },
+            /**
+             * 删除图片
+             * */
+            deleteImage: function (key, index) {
+                var that = this;
+                if (index != undefined) {
+                    that.formData[key].splice(index, 1);
+                    that.$set(that.formData, key, that.formData[key]);
+                } else {
+                    that.$set(that.formData, key, '');
+                }
+            },
+            createFrame: function (title, src, opt) {
+                opt === undefined && (opt = {});
+                var h = 0;
+                if (window.innerHeight < 800 && window.innerHeight >= 700) {
+                    h = window.innerHeight - 50;
+                } else if (window.innerHeight < 900 && window.innerHeight >= 800) {
+                    h = window.innerHeight - 100;
+                } else if (window.innerHeight < 1000 && window.innerHeight >= 900) {
+                    h = window.innerHeight - 150;
+                } else if (window.innerHeight >= 1000) {
+                    h = window.innerHeight - 200;
+                } else {
+                    h = window.innerHeight;
+                }
+                var area = [(opt.w || window.innerWidth / 2) + 'px', (!opt.h || opt.h > h ? h : opt.h) + 'px'];
+                layui.use('layer',function () {
+                    return layer.open({
+                        type: 2,
+                        title: title,
+                        area: area,
+                        fixed: false, //不固定
+                        maxmin: true,
+                        moveOut: false,//true  可以拖出窗外  false 只能在窗内拖
+                        anim: 5,//出场动画 isOutAnim bool 关闭动画
+                        offset: 'auto',//['100px','100px'],//'auto',//初始位置  ['100px','100px'] t[ 上 左]
+                        shade: 0,//遮罩
+                        resize: true,//是否允许拉伸
+                        content: src,//内容
+                        move: '.layui-layer-title'
+                    });
+                });
+            },
+            changeIMG: function (name, value) {
+                if (this.getRule(name).maxLength !== undefined) {
+                    var that = this;
+                    value.map(function (v) {
+                        that.formData[name].push(v);
+                    });
+                    this.$set(this.formData, name, this.formData[name]);
+                } else {
+                    if(name == 'batchAttr.pic'){
+                        this.batchAttr.pic = value;
+                    } else {
+                        if (name.indexOf('.') !== -1) {
+                            var key = name.split('.');
+                            if (key.length == 2){
+                                this.formData[key[0]][key[1]] = value;
+                            } else if(key.length == 3){
+                                this.formData[key[0]][key[1]][key[2]] = value;
+                            } else if(key.length == 4){
+                                this.$set(this.formData[key[0]][key[1]][key[2]],key[3],value)
+                            }
+                        } else {
+                            this.formData[name] = value;
+                        }
+                    }
+                }
+            },
+            getRule: function (name) {
+                return this.rule[name] || {};
+            },
+            uploadImage: function (name) {
+                return this.createFrame('选择图片',this.U({c:"widget.images",a:'index',p:{fodder:name}}),{h:545,w:900});
+            },
+            uploadVideo: function () {
+                if (this.videoLink) {
+                    this.formData.video_link = this.videoLink;
+                } else {
+                    $(this.$refs.filElem).click();
+                }
+            },
+            delVideo: function () {
+                var that = this;
+                that.$set(that.formData, 'video_link', '');
+            },
+            insertEditor: function (list) {
+                this.um.execCommand('insertimage', list);
+            },
+            insertEditorVideo: function (src) {
+                this.um.setContent('<div><video style="width: 99%" src="'+src+'" class="video-ue" controls="controls" width="100"><source src="'+src+'"></source></video></div><br>',true);
+            },
+            getContent: function () {
+                return this.um.getContent();
+            },
+            /**
+             * 监听radio字段
+             */
+            eeventRadio: function () {
+                var that = this;
+                that.radioRule.map(function (val) {
+                    that.form.on('radio(' + val + ')', function (res) {
+                        that.formData[val] = res.value;
+                    });
+                })
+            },
+            init: function () {
+                var that = this;
+                window.UMEDITOR_CONFIG.toolbar = [
+                    // 加入一个 test
+                    'source | undo redo | bold italic underline strikethrough | superscript subscript | forecolor backcolor | removeformat |',
+                    'insertorderedlist insertunorderedlist | selectall cleardoc paragraph | fontfamily fontsize',
+                    '| justifyleft justifycenter justifyright justifyjustify |',
+                    'link unlink | emotion selectimgs video  | map',
+                    '| horizontal print preview fullscreen', 'drafts', 'formula'
+                ];
+                UM.registerUI('selectimgs', function (name) {
+                    var me = this;
+                    var $btn = $.eduibutton({
+                        icon: 'image',
+                        click: function () {
+                            that.createFrame('选择图片', "{:Url('widget.images/index',['fodder'=>'editor'])}");
+                        },
+                        title: '选择图片'
+                    });
+
+                    this.addListener('selectionchange', function () {
+                        //切换为不可编辑时,把自己变灰
+                        var state = this.queryCommandState(name);
+                        $btn.edui().disabled(state == -1).active(state == 1)
+                    });
+                    return $btn;
+
+                });
+                UM.registerUI('video', function (name) {
+                    var me = this;
+                    var $btn = $.eduibutton({
+                        icon: 'video',
+                        click: function () {
+                            that.createFrame('选择视频', "{:Url('widget.video/index',['fodder'=>'video'])}");
+                        },
+                        title: '选择视频'
+                    });
+
+                    this.addListener('selectionchange', function () {
+                        //切换为不可编辑时,把自己变灰
+                        var state = this.queryCommandState(name);
+                        $btn.edui().disabled(state == -1).active(state == 1)
+                    });
+                    return $btn;
+
+                });
+                //实例化编辑器
+                this.um = UM.getEditor('myEditor', {initialFrameWidth: '99%', initialFrameHeight: 400});
+                this.um.setContent(that.formData.description);
+                that.$nextTick(function () {
+                    layui.use(['form','element'], function () {
+                        that.form = layui.form;
+                        that.form.render();
+                        that.form.on('select(temp_id)', function (data) {
+                            that.$set(that.formData, 'temp_id', data.value);
+                        });
+                        that.form.on('select(rule_index)', function (data) {
+                            that.ruleIndex = data.value;
+                        });
+                        layui.element.on('tab(docTabBrief)', function(){
+                            that.layTabId = this.getAttribute('lay-id');
+                        });
+                        that.eeventRadio();
+                    });
+
+                    layui.config({
+                        base : '/static/plug/layui/'
+                    }).extend({
+                        selectN: './selectN',
+                    }).use('selectM',function () {
+                        var selectM = layui.selectM;
+                        selectM({
+                            //元素容器【必填】
+                            elem: '#id'
+                            //候选数据【必填】
+                            ,data: that.cateList
+                            //默认值
+                            ,selected: that.formData.id || []
+                            //最多选中个数,默认5
+                            ,max : 10
+                            ,name: 'id'
+                            ,model: 'formData.id'
+                            //值的分隔符
+                            ,delimiter: ','
+                            //候选项数据的键名
+                            ,field: {idName:'value',titleName:'label',statusName:'disabled'}
+                        });
+                    });
+                })
+            },
+            requestPost: function (url, data) {
+                return new Promise(function (resolve, reject) {
+                    axios.post(url, data).then(function (res) {
+                        if (res.status == 200 && res.data.code == 200) {
+                            resolve(res.data)
+                        } else {
+                            reject(res.data);
+                        }
+                    }).catch(function (err) {
+                        reject({msg:err})
+                    });
+                })
+            },
+            requestGet: function (url) {
+                return new Promise(function (resolve, reject) {
+                    axios.get(url).then(function (res) {
+                        if (res.status == 200 && res.data.code == 200) {
+                            resolve(res.data)
+                        } else {
+                            reject(res.data);
+                        }
+                    }).catch(function (err) {
+                        reject({msg:err})
+                    });
+                })
+            },
+            generates: function () {
+                var that = this;
+                that.generate(1);
+            },
+            generate: function (type = 0) {
+                var that = this;
+                this.requestPost(that.U({c:"store.StoreProduct",a:'is_format_attr',p:{id:that.id,type:type}}), {attrs:this.formData.items}).then(function (res) {
+                    that.$set(that.formData, 'attrs', res.data.value);
+                    that.$set(that, 'formHeader', res.data.header);
+                    if (that.id && that.formData.is_sub == 1 && that.formData.spec_type == 1) {
+                        that.formHeader.push({title:'一级返佣(元)'});
+                        that.formHeader.push({title:'二级级返佣(元)'});
+                    }
+                }).catch(function (res) {
+                    return that.showMsg(res.msg);
+                });
+            },
+            handleSubmit:function () {
+                var that = this;
+                var time = $('#time').val();
+                var rtime = $('#rtime').val();
+                that.formData.time = time;
+                that.formData.rtime = rtime;
+                if (!that.formData['nickname']){
+                    return that.showMsg('请填写名称');
+                }
+                if (!that.formData['image']){
+                    return that.showMsg('请上传图片');
+                }
+
+                if (!that.formData['time']){
+                    return that.showMsg('请选择预约时间');
+                }
+                if (!that.formData['rtime']){
+                    return that.showMsg('请选择进场时间');
+                }
+                $('#submit').attr('disabled', 'disabled').text('保存中...');
+                that.requestPost(that.U({c:'auction.auction',a:'save',p:{id:that.id}}),that.formData).then(function (res) {
+                    that.confirm();
+                }).catch(function (res) {
+                    that.showMsg(res.msg);
+                });
+
+            },
+            confirm: function(){
+                var that = this;
+                layui.use(['layer'], function () {
+                    var layer = layui.layer;
+                    layer.confirm(that.id ? '修改成功是否返回产品列表' : '添加成功是否返回产品列表', {
+                        btn: ['返回列表',that.id ? '继续修改' : '继续添加'] //按钮
+                    }, function(){
+                        location.href = that.U({c:'auction.auction',a:'index'});
+                    }, function(){
+                        location.reload();
+                    });
+                });
+            },
+            render:function(){
+                this.$nextTick(function(){
+                    layui.use(['form'], function () {
+                        layui.form.render('select');
+                    });
+                })
+            },
+            // 移动
+            handleDragStart (e, item) {
+                this.dragging = item;
+            },
+            handleDragEnd (e, item) {
+                this.dragging = null
+            },
+            handleDragOver (e) {
+                e.dataTransfer.dropEffect = 'move'
+            },
+            handleDragEnter (e, item) {
+                e.dataTransfer.effectAllowed = 'move'
+                if (item === this.dragging) {
+                    return
+                }
+                var newItems = [...this.formData.activity];
+                var src = newItems.indexOf(this.dragging);
+                var dst = newItems.indexOf(item);
+                newItems.splice(dst, 0, ...newItems.splice(src, 1))
+                this.formData.activity = newItems;
+            },
+            getRuleList:function (type) {
+                var that = this;
+                that.requestGet(that.U({c:'store.StoreProduct',a:'get_rule'})).then(function (res) {
+                    that.$set(that,'ruleList',res.data);
+                    if(type !== undefined){
+                        that.render();
+                    }
+                });
+            },
+            addRule:function(){
+                return this.createFrame('添加商品规则',this.U({c:'store.StoreProductRule',a:'create'}));
+            },
+            allRule:function () {
+                if (this.ruleIndex != -1) {
+                    var rule = this.ruleList[this.ruleIndex];
+                    if (rule) {
+                        this.ruleBool = true;
+                        var rule_value = rule.rule_value.map(function (item) {
+                            return item;
+                        });
+                        this.$set(this.formData,'items',rule_value);
+                        this.$set(this.formData,'attrs',[]);
+                        this.$set(this,'formHeader',[]);
+                        return true;
+                    }
+                }
+                this.showMsg('选择的属性无效');
+            }
+        },
+        mounted: function () {
+            var that = this;
+            axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
+            that.getProductInfo();
+            window.$vm = that;
+            window.changeIMG = that.changeIMG;
+            window.insertEditor = that.insertEditor;
+            window.insertEditorVideo = that.insertEditorVideo;
+            window.successFun = function(){
+                that.getRuleList(1);
+            }
+            $(that.$refs.filElem).change(function () {
+                var inputFile = this.files[0];
+                that.requestPost(that.U({c:"widget.video",a:'get_signature'})).then(function (res) {
+                    AdminUpload.upload(res.data.uploadType,{
+                        token: res.data.uploadToken || '',
+                        file: inputFile,
+                        accessKeyId: res.data.accessKey || '',
+                        accessKeySecret: res.data.secretKey || '',
+                        bucketName: res.data.storageName || '',
+                        region: res.data.storageRegion || '',
+                        domain: res.data.domain || '',
+                        uploadIng:function (progress) {
+                            that.upload.videoIng = true;
+                            that.progress = progress;
+                        }
+                    }).then(function (res) {
+                        //成功
+                        that.$set(that.formData, 'video_link', res.url);
+                        that.progress = 0;
+                        that.upload.videoIng = false;
+                        return that.showMsg('上传成功');
+                    }).catch(function (err) {
+                        //失败
+                        console.info(err);
+                        return that.showMsg('上传错误请检查您的配置');
+                    });
+                }).catch(function (res) {
+                    return that.showMsg(res.msg || '获取密钥失败,请检查您的配置');
+                });
+            })
+        }
+    });
+</script>
+</body>
+</html>
+<script>
+    import Layout from "../../../../../public/static/plug/iview/dist/iview";
+    export default {
+        components: {Layout}
+    }
+</script>

+ 839 - 0
app/admin/view/auction/auction_product/edit.php

@@ -0,0 +1,839 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+    <link href="{__FRAME_PATH}css/font-awesome.min.css" rel="stylesheet">
+    <link href="{__ADMIN_PATH}plug/umeditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
+    <script type="text/javascript" src="{__ADMIN_PATH}plug/umeditor/third-party/jquery.min.js"></script>
+    <script type="text/javascript" src="{__ADMIN_PATH}plug/umeditor/third-party/template.min.js"></script>
+    <script type="text/javascript" charset="utf-8" src="{__ADMIN_PATH}plug/umeditor/umeditor.config.js"></script>
+    <script type="text/javascript" charset="utf-8" src="{__ADMIN_PATH}plug/umeditor/umeditor.min.js"></script>
+    <script type="text/javascript" src="{__ADMIN_PATH}plug/umeditor/lang/zh-cn/zh-cn.js"></script>
+    <link rel="stylesheet" href="/static/plug/layui/css/layui.css">
+    <script src="/static/plug/layui/layui.js"></script>
+    <script src="{__PLUG_PATH}vue/dist/vue.min.js"></script>
+    <script src="/static/plug/axios.min.js"></script>
+    <script src="{__MODULE_PATH}widget/aliyun-oss-sdk-4.4.4.min.js"></script>
+    <script src="{__MODULE_PATH}widget/cos-js-sdk-v5.min.js"></script>
+    <script src="{__MODULE_PATH}widget/qiniu-js-sdk-2.5.5.js"></script>
+    <script src="{__MODULE_PATH}widget/plupload.full.min.js"></script>
+    <script src="{__MODULE_PATH}widget/videoUpload.js"></script>
+    <style>
+        .layui-form-item {
+            margin-bottom: 0px;
+        }
+
+        .pictrueBox {
+            display: inline-block !important;
+        }
+
+        .pictrue {
+            width: 60px;
+            height: 60px;
+            border: 1px dotted rgba(0, 0, 0, 0.1);
+            margin-right: 15px;
+            display: inline-block;
+            position: relative;
+            cursor: pointer;
+        }
+
+        .pictrue img {
+            width: 100%;
+            height: 100%;
+        }
+
+        .upLoad {
+            width: 58px;
+            height: 58px;
+            line-height: 58px;
+            border: 1px dotted rgba(0, 0, 0, 0.1);
+            border-radius: 4px;
+            background: rgba(0, 0, 0, 0.02);
+            cursor: pointer;
+            display: flex;
+            justify-content: center;
+            align-items: center;
+        }
+
+        .rulesBox {
+            display: flex;
+            flex-wrap: wrap;
+            margin-left: 10px;
+        }
+
+        .layui-tab-content {
+            margin-top: 15px;
+        }
+
+        .ml110 {
+            margin: 18px 0 4px 110px;
+        }
+
+        .rules {
+            display: flex;
+        }
+
+        .rules-btn-sm {
+            height: 30px;
+            line-height: 30px;
+            font-size: 12px;
+            width: 109px;
+        }
+
+        .rules-btn-sm input {
+            width: 79% !important;
+            height: 84% !important;
+            padding: 0 10px;
+        }
+
+        .ml10 {
+            margin-left: 10px !important;
+        }
+
+        .ml40 {
+            margin-left: 40px !important;
+        }
+
+        .closes {
+            position: absolute;
+            left: 86%;
+            top: -18%;
+        }
+        .red {
+            color: red;
+        }
+        .layui-input-block .layui-video-box{
+            width: 22%;
+            height: 180px;
+            border-radius: 10px;
+            background-color: #707070;
+            margin-top: 10px;
+            position: relative;
+            overflow: hidden;
+        }
+        .layui-input-block .layui-video-box i{
+            color: #fff;
+            line-height: 180px;
+            margin: 0 auto;
+            width: 50px;
+            height: 50px;
+            display: inherit;
+            font-size: 50px;
+        }
+        .layui-input-block .layui-video-box .mark{
+            position: absolute;
+            width: 100%;
+            height: 30px;
+            top: 0;
+            background-color: rgba(0,0,0,.5);
+            text-align: center;
+        }
+        .store_box{
+            display: flex;
+        }
+        .info{
+            color: #c9c9c9;
+            padding-left: 10px;
+            line-height: 30px;
+        }
+    </style>
+</head>
+<body>
+<div class="layui-fluid">
+    <div class="layui-row layui-col-space15"  id="app" v-cloak="">
+        <div class="layui-card">
+            <div class="layui-card-header">
+                <span class="">竞拍添加</span>
+                <button style="margin-left: 20px" type="button" class="layui-btn layui-btn-primary layui-btn-xs" @click="goBack">返回列表</button>
+            </div>
+            <div class="layui-card-body">
+                <form class="layui-form" action="" v-cloak="">
+                    <div class="layui-tab layui-tab-brief" lay-filter="docTabBrief">
+                        <div class="layui-tab-content">
+                            <div class="layui-tab-item layui-show">
+                                <div class="layui-row layui-col-space15">
+                                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
+                                        <div class="grid-demo grid-demo-bg1">
+                                            <div class="layui-form-item">
+                                                <label class="layui-form-label">商品名称<i class="red">*</i></label>
+                                                <div class="layui-input-block">
+                                                    <input type="text" name="nickname" lay-verify="title" autocomplete="off"
+                                                           placeholder="竞拍名称" class="layui-input" v-model="formData.nickname" maxlength="100">
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
+                                        <div class="grid-demo grid-demo-bg1">
+                                            <div class="layui-form-item">
+                                                <label class="layui-form-label">竞拍封面图<i class="red">*</i></label>
+                                                <div class="pictrueBox">
+                                                    <div class="pictrue" v-if="formData.image" @click="uploadImage('image')">
+                                                        <img :src="formData.image"></div>
+                                                    <div class="upLoad" @click="uploadImage('image')" v-else>
+                                                        <i class="layui-icon layui-icon-camera" class="iconfont"
+                                                           style="font-size: 26px;"></i>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+<!--                                <div class="layui-row layui-col-space15">-->
+<!--                                    <div class="layui-col-xs12 layui-col-sm4 layui-col-md4">-->
+<!--                                        <div class="grid-demo grid-demo-bg1">-->
+<!--                                            <div class="layui-form-item">-->
+<!--                                                <label class="layui-form-label">商品状态</label>-->
+<!--                                                <div class="layui-input-block">-->
+<!--                                                    <input id="status" type="radio" name="status" lay-filter="status" value="1" title="正常" :checked="formData.status == 1 ? true : false">-->
+<!--                                                    <input id="status" type="radio" name="status" lay-filter="status" value="0" title="禁用" :checked="formData.status == 0 ? true : false">-->
+<!--                                                </div>-->
+<!--                                            </div>-->
+<!--                                        </div>-->
+<!--                                    </div>-->
+<!--                                </div>-->
+                                    <div class="layui-row layui-col-space15">
+                                        <div class="layui-col-xs12 layui-col-sm4 layui-col-md4">
+                                            <div class="grid-demo grid-demo-bg1">
+                                                <div class="layui-form-item">
+                                                    <label class="layui-form-label">预约时间<i class="red   ">*</i></label>
+                                                        <div class="layui-input-inline">
+                                                            <input type="text" class="layui-input" name="time" id="time" value="" placeholder="-">
+                                                        </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row layui-col-space15">
+                                        <div class="layui-col-xs12 layui-col-sm4 layui-col-md4">
+                                            <div class="grid-demo grid-demo-bg1">
+                                                <div class="layui-form-item">
+                                                    <label class="layui-form-label">进场时间<i class="red">*</i></label>
+                                                    <div class="layui-input-inline">
+                                                        <input type="text" class="layui-input" name="rtime" id="rtime" value="" placeholder="-">
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
+                                        <div class="grid-demo grid-demo-bg1">
+                                            <div class="layui-form-item">
+                                                <label class="layui-form-label">排序<i class="red">*</i></label>
+                                                <div class="layui-input-inline">
+                                                    <input type="number" name="sort" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.sort" maxlength="100" value="0">
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+
+
+                            </div>
+
+                        </div>
+                        <div class="layui-tab-content">
+                            <div class="layui-row layui-col-space15">
+                                <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
+                                    <button class="layui-btn layui-btn-normal layui-btn-sm" id="submit" type="button" @click="handleSubmit()">提交</button>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </form>
+            </div>
+        </div>
+    </div>
+</div>
+<script>
+
+    var id = {$id};
+    var add_time = '{$dataList.add_time}';
+    var end_time = '{$dataList.end_time}';
+    var radd_time = '{$dataList.radd_time}';
+    var rend_time = '{$dataList.rend_time}';
+    layui.use('laydate', function(){
+        var laydate = layui.laydate;
+
+        laydate.render({
+            elem: '#time'
+            ,type: 'time'
+            ,range: true
+            ,value: add_time+'-'+end_time
+        });
+        laydate.render({
+            elem: '#rtime'
+            ,type: 'time'
+            ,range: true
+            ,value: radd_time+'-'+rend_time
+        });
+    })
+    //Demo
+    layui.use('form', function(){
+        var form = layui.form;
+
+        //监听提交
+        form.on('submit(formDemo)', function(data){
+            layer.msg(JSON.stringify(data.field));
+            return false;
+        });
+    });
+
+    new Vue({
+        el: '#app',
+        data: {
+            id:id,
+            //分类列表
+            cateList: [],
+            //运费模板
+            tempList: [],
+            upload:{
+                videoIng:false
+            },
+            formData: {
+
+            },
+            rule: { //多图选择规则
+                slider_image: {
+                    maxLength: 1
+                }
+            },
+            attr: [],//临时属性
+            newRule: false,//是否添加新规则
+            radioRule: ['status'],//radio 当选规则
+            ruleList:[],
+            ruleIndex:-1,
+            progress: 0,
+            um: null,//编译器实例化
+            form: null,//layui.form
+            layTabId: 1,
+            ruleBool: id ? true : false,
+        },
+        watch:{
+            'formData.is_sub':function (n) {
+                if (n == 1) {
+                    this.formHeader.push({title:'一级返佣(元)'});
+                    this.formHeader.push({title:'二级级返佣(元)'});
+                } else {
+                    this.formHeader.pop();
+                    this.formHeader.pop();
+                }
+            },
+            'formData.spec_type':function (n) {
+                if (n) {
+                    this.render();
+                }
+            },
+            // 'formData.image':function (n) {
+            //     if(!this.batchAttr.pic){
+            //         this.batchAttr.pic = n;
+            //     }
+            //     if(!this.formData.attr.pic){
+            //         this.formData.attr.pic = n;
+            //     }
+            // }
+        },
+        methods: {
+            back:function(){
+                var that = this;
+                layui.use(['element'], function () {
+                    layui.element.tabChange('docTabBrief', that.layTabId == 1 ? 1 : parseInt(that.layTabId) - 1);
+                });
+            },
+            next:function(){
+                var that = this;
+                layui.use(['element'], function () {
+                    layui.element.tabChange('docTabBrief', that.layTabId == 3 ? 3 : parseInt(that.layTabId) + 1);
+                });
+            },
+            goBack:function(){
+                location.href = this.U({c:'auction.auction',a:'index'});
+            },
+            U: function (opt) {
+                var m = opt.m || 'admin', c = opt.c || window.controlle || '', a = opt.a || 'index', q = opt.q || '',
+                    p = opt.p || {};
+                var params = Object. keys(p).map(function (key) {
+                    return key + '/' + p[key];
+                }).join('/');
+                var gets = Object.keys(q).map(function (key) {
+                    return key+'='+ q[key];
+                }).join('&');
+
+                return '/' + m + '/' + c + '/' + a + (params == '' ? '' : '/' + params) + (gets == '' ? '' : '?' + gets);
+            },
+            /**
+             * 提示
+             * */
+            showMsg: function (msg, success) {
+                $('#submit').removeAttr('disabled').text('提交');
+                layui.use(['layer'], function () {
+                    layui.layer.msg(msg, success);
+                });
+            },
+            addBrokerage:function(){
+                if (this.brokerage.brokerage >= 0 && this.brokerage.brokerage_two >= 0){
+                    var that = this;
+                    this.$set(this.formData,'attrs',this.formData.attrs.map(function (item) {
+                        item.brokerage = that.brokerage.brokerage;
+                        item.brokerage_two = that.brokerage.brokerage_two;
+                        return item;
+                    }));
+                } else {
+                    return this.showMsg('请填写返佣金额在进行批量添加');
+                }
+            },
+            batchClear:function(){
+                this.$set(this,'batchAttr',{
+                    pic: '',
+                    price: 0,
+                    cost: 0,
+                    ot_price: 0,
+                    stock: 0,
+                    bar_code: '',
+                    weight: 0,
+                    volume: 0,
+                });
+            },
+            /**
+             * 批量添加
+             * */
+            batchAdd:function(){
+                var that = this;
+                this.$set(this.formData,'attrs',this.formData.attrs.map(function (item) {
+                    if (that.batchAttr.pic) {
+                        item.pic = that.batchAttr.pic;
+                    }
+                    if (that.batchAttr.price > 0){
+                        item.price = that.batchAttr.price;
+                    }
+                    if (that.batchAttr.cost > 0){
+                        item.cost = that.batchAttr.cost;
+                    }
+                    if (that.batchAttr.ot_price > 0){
+                        item.ot_price = that.batchAttr.ot_price;
+                    }
+                    if (that.batchAttr.stock > 0){
+                        item.stock = that.batchAttr.stock;
+                    }
+                    if (that.batchAttr.bar_code != ''){
+                        item.bar_code = that.batchAttr.bar_code;
+                    }
+                    if (that.batchAttr.weight > 0){
+                        item.weight = that.batchAttr.weight;
+                    }
+                    if (that.batchAttr.volume > 0){
+                        item.volume = that.batchAttr.volume;
+                    }
+                    return item;
+                }));
+
+            },
+            /**
+             * 获取商品信息
+             * */
+            getProductInfo: function () {
+                var that = this;
+                that.requestGet(that.U({c:"auction.auction",a:'get_auction',q:{id:that.id}})).then(function (res) {
+
+                    var productInfo = res.data.productInfo || {};
+                    if(productInfo.id && that.id){
+                        that.$set(that,'formData',productInfo);
+                        that.generate();
+                    }
+                    that.getRuleList();
+                    that.init();
+                }).catch(function (res) {
+                    that.showMsg(res.msg);
+                })
+            },
+            /**
+             * 给某个属性添加属性值
+             * @param item
+             * */
+            addDetail: function (item) {
+                if (!item.detailValue) return false;
+                if (item.detail.find(function (val) {
+                    if(item.detailValue == val){
+                        return true;
+                    }
+                })) {
+                    return this.showMsg('添加的属性值重复');
+                }
+                item.detail.push(item.detailValue);
+                item.detailValue = '';
+            },
+            /**
+             * 删除某个属性值
+             * @param item 父级循环集合
+             * @param inx 子集index
+             * */
+            deleteValue: function (item, inx) {
+                if (item.detail.length > 1) {
+                    item.detail.splice(inx, 1);
+                } else {
+                    return this.showMsg('请设置至少一个属性');
+                }
+            },
+            /**
+             * 删除某条属性
+             * @param index
+             * */
+            deleteItem: function (index) {
+                this.formData.items.splice(index, 1);
+            },
+            /**
+             * 删除某条属性
+             * @param index
+             * */
+            deleteAttrs: function (index) {
+                var that = this;
+                if(that.id > 0){
+                    that.requestGet(that.U({c:"store.StoreProduct",a:'check_activity',q:{id:that.id}})).then(function (res) {
+                        that.showMsg(res.msg);
+                    }).catch(function (res) {
+                        if (that.formData.attrs.length > 1) {
+                            that.formData.attrs.splice(index, 1);
+                        } else {
+                            return that.showMsg('请设置至少一个规则');
+                        }
+                    })
+                }else{
+                    if (that.formData.attrs.length > 1) {
+                        that.formData.attrs.splice(index, 1);
+                    } else {
+                        return that.showMsg('请设置至少一个规则');
+                    }
+                }
+            },
+            /**
+             * 创建属性
+             * */
+            createAttrName: function () {
+                if (this.formDynamic.attrsName && this.formDynamic.attrsVal) {
+                    if (this.formData.items.find(function (val) {
+                        if (val.value == this.formDynamic.attrsName) {
+                            return true;
+                        }
+                    }.bind(this))) {
+                        return this.showMsg('添加的属性重复');
+                    }
+                    this.formData.items.push({
+                        value: this.formDynamic.attrsName,
+                        detailValue: '',
+                        attrHidden: false,
+                        detail: [this.formDynamic.attrsVal]
+                    });
+                    this.formDynamic.attrsName = '';
+                    this.formDynamic.attrsVal = '';
+                    this.newRule = false;
+                } else {
+                    return this.showMsg('请添加完整的规格!');
+                }
+            },
+            /**
+             * 删除图片
+             * */
+            deleteImage: function (key, index) {
+                var that = this;
+                if (index != undefined) {
+                    that.formData[key].splice(index, 1);
+                    that.$set(that.formData, key, that.formData[key]);
+                } else {
+                    that.$set(that.formData, key, '');
+                }
+            },
+            createFrame: function (title, src, opt) {
+                opt === undefined && (opt = {});
+                var h = 0;
+                if (window.innerHeight < 800 && window.innerHeight >= 700) {
+                    h = window.innerHeight - 50;
+                } else if (window.innerHeight < 900 && window.innerHeight >= 800) {
+                    h = window.innerHeight - 100;
+                } else if (window.innerHeight < 1000 && window.innerHeight >= 900) {
+                    h = window.innerHeight - 150;
+                } else if (window.innerHeight >= 1000) {
+                    h = window.innerHeight - 200;
+                } else {
+                    h = window.innerHeight;
+                }
+                var area = [(opt.w || window.innerWidth / 2) + 'px', (!opt.h || opt.h > h ? h : opt.h) + 'px'];
+                layui.use('layer',function () {
+                    return layer.open({
+                        type: 2,
+                        title: title,
+                        area: area,
+                        fixed: false, //不固定
+                        maxmin: true,
+                        moveOut: false,//true  可以拖出窗外  false 只能在窗内拖
+                        anim: 5,//出场动画 isOutAnim bool 关闭动画
+                        offset: 'auto',//['100px','100px'],//'auto',//初始位置  ['100px','100px'] t[ 上 左]
+                        shade: 0,//遮罩
+                        resize: true,//是否允许拉伸
+                        content: src,//内容
+                        move: '.layui-layer-title'
+                    });
+                });
+            },
+            changeIMG: function (name, value) {
+                if (this.getRule(name).maxLength !== undefined) {
+                    var that = this;
+                    value.map(function (v) {
+                        that.formData[name].push(v);
+                    });
+                    this.$set(this.formData, name, this.formData[name]);
+                } else {
+                    if(name == 'batchAttr.pic'){
+                        this.batchAttr.pic = value;
+                    } else {
+                        if (name.indexOf('.') !== -1) {
+                            var key = name.split('.');
+                            if (key.length == 2){
+                                this.formData[key[0]][key[1]] = value;
+                            } else if(key.length == 3){
+                                this.formData[key[0]][key[1]][key[2]] = value;
+                            } else if(key.length == 4){
+                                this.$set(this.formData[key[0]][key[1]][key[2]],key[3],value)
+                            }
+                        } else {
+                            this.formData[name] = value;
+                        }
+                    }
+                }
+            },
+            getRule: function (name) {
+                return this.rule[name] || {};
+            },
+            uploadImage: function (name) {
+                return this.createFrame('选择图片',this.U({c:"widget.images",a:'index',p:{fodder:name}}),{h:545,w:900});
+            },
+            uploadVideo: function () {
+                if (this.videoLink) {
+                    this.formData.video_link = this.videoLink;
+                } else {
+                    $(this.$refs.filElem).click();
+                }
+            },
+            delVideo: function () {
+                var that = this;
+                that.$set(that.formData, 'video_link', '');
+            },
+            insertEditor: function (list) {
+                this.um.execCommand('insertimage', list);
+            },
+            insertEditorVideo: function (src) {
+                this.um.setContent('<div><video style="width: 99%" src="'+src+'" class="video-ue" controls="controls" width="100"><source src="'+src+'"></source></video></div><br>',true);
+            },
+            getContent: function () {
+                return this.um.getContent();
+            },
+            /**
+             * 监听radio字段
+             */
+            eeventRadio: function () {
+                var that = this;
+                that.radioRule.map(function (val) {
+                    that.form.on('radio(' + val + ')', function (res) {
+                        that.formData[val] = res.value;
+                    });
+                })
+            },
+            init: function () {
+                var that = this;
+                window.UMEDITOR_CONFIG.toolbar = [
+                    // 加入一个 test
+                    'source | undo redo | bold italic underline strikethrough | superscript subscript | forecolor backcolor | removeformat |',
+                    'insertorderedlist insertunorderedlist | selectall cleardoc paragraph | fontfamily fontsize',
+                    '| justifyleft justifycenter justifyright justifyjustify |',
+                    'link unlink | emotion selectimgs video  | map',
+                    '| horizontal print preview fullscreen', 'drafts', 'formula'
+                ];
+                UM.registerUI('selectimgs', function (name) {
+                    var me = this;
+                    var $btn = $.eduibutton({
+                        icon: 'image',
+                        click: function () {
+                            that.createFrame('选择图片', "{:Url('widget.images/index',['fodder'=>'editor'])}");
+                        },
+                        title: '选择图片'
+                    });
+
+                    this.addListener('selectionchange', function () {
+                        //切换为不可编辑时,把自己变灰
+                        var state = this.queryCommandState(name);
+                        $btn.edui().disabled(state == -1).active(state == 1)
+                    });
+                    return $btn;
+
+                });
+                UM.registerUI('video', function (name) {
+                    var me = this;
+                    var $btn = $.eduibutton({
+                        icon: 'video',
+                        click: function () {
+                            that.createFrame('选择视频', "{:Url('widget.video/index',['fodder'=>'video'])}");
+                        },
+                        title: '选择视频'
+                    });
+
+                    this.addListener('selectionchange', function () {
+                        //切换为不可编辑时,把自己变灰
+                        var state = this.queryCommandState(name);
+                        $btn.edui().disabled(state == -1).active(state == 1)
+                    });
+                    return $btn;
+
+                });
+                //实例化编辑器
+                this.um = UM.getEditor('myEditor', {initialFrameWidth: '99%', initialFrameHeight: 400});
+                this.um.setContent(that.formData.description);
+                that.$nextTick(function () {
+                    layui.use(['form','element'], function () {
+                        that.form = layui.form;
+                        that.form.render();
+                        that.form.on('select(temp_id)', function (data) {
+                            that.$set(that.formData, 'temp_id', data.value);
+                        });
+                        that.form.on('select(rule_index)', function (data) {
+                            that.ruleIndex = data.value;
+                        });
+                        layui.element.on('tab(docTabBrief)', function(){
+                            that.layTabId = this.getAttribute('lay-id');
+                        });
+                        that.eeventRadio();
+                    });
+                })
+            },
+            requestPost: function (url, data) {
+                return new Promise(function (resolve, reject) {
+                    axios.post(url, data).then(function (res) {
+                        if (res.status == 200 && res.data.code == 200) {
+                            resolve(res.data)
+                        } else {
+                            reject(res.data);
+                        }
+                    }).catch(function (err) {
+                        reject({msg:err})
+                    });
+                })
+            },
+            requestGet: function (url) {
+                return new Promise(function (resolve, reject) {
+                    axios.get(url).then(function (res) {
+                        if (res.status == 200 && res.data.code == 200) {
+                            resolve(res.data)
+                        } else {
+                            reject(res.data);
+                        }
+                    }).catch(function (err) {
+                        reject({msg:err})
+                    });
+                })
+            },
+            generates: function () {
+                var that = this;
+                that.generate(1);
+            },
+            handleSubmit:function () {
+                var that = this;
+                var time = $('#time').val();
+                var rtime = $('#rtime').val();
+                var status = $('#status').val();
+
+                that.formData.status = status;
+                that.formData.time = time;
+                that.formData.rtime = rtime;
+                console.log(status);
+                if (!that.formData['nickname']){
+                    return that.showMsg('请填写名称');
+                }
+                if (!that.formData['image']){
+                    return that.showMsg('请上传图片');
+                }
+
+                if (!that.formData['time']){
+                    return that.showMsg('请选择预约时间');
+                }
+                if (!that.formData['rtime']){
+                    return that.showMsg('请选择进场时间');
+                }
+                $('#submit').attr('disabled', 'disabled').text('保存中...');
+                that.requestPost(that.U({c:'auction.auction',a:'update',p:{id:that.id}}),that.formData).then(function (res) {
+                    that.confirm();
+                }).catch(function (res) {
+                    that.showMsg(res.msg);
+                });
+
+            },
+            confirm: function(){
+                var that = this;
+                layui.use(['layer'], function () {
+                    var layer = layui.layer;
+                    layer.confirm(that.id ? '修改成功是否返回产品列表' : '添加成功是否返回产品列表', {
+                        btn: ['返回列表',that.id ? '继续修改' : '继续添加'] //按钮
+                    }, function(){
+                        location.href = that.U({c:'auction.auction',a:'index'});
+                    }, function(){
+                        location.reload();
+                    });
+                });
+            },
+            render:function(){
+                this.$nextTick(function(){
+                    layui.use(['form'], function () {
+                        layui.form.render('select');
+                    });
+                })
+            },
+            // 移动
+            handleDragStart (e, item) {
+                this.dragging = item;
+            },
+            handleDragEnd (e, item) {
+                this.dragging = null
+            },
+            handleDragOver (e) {
+                e.dataTransfer.dropEffect = 'move'
+            },
+            handleDragEnter (e, item) {
+                e.dataTransfer.effectAllowed = 'move'
+                if (item === this.dragging) {
+                    return
+                }
+                var newItems = [...this.formData.activity];
+                var src = newItems.indexOf(this.dragging);
+                var dst = newItems.indexOf(item);
+                newItems.splice(dst, 0, ...newItems.splice(src, 1))
+                this.formData.activity = newItems;
+            },
+            addRule:function(){
+                return this.createFrame('添加商品规则',this.U({c:'store.StoreProductRule',a:'create'}));
+            },
+            allRule:function () {
+                if (this.ruleIndex != -1) {
+                    var rule = this.ruleList[this.ruleIndex];
+                    if (rule) {
+                        this.ruleBool = true;
+                        var rule_value = rule.rule_value.map(function (item) {
+                            return item;
+                        });
+                        this.$set(this.formData,'items',rule_value);
+                        this.$set(this.formData,'attrs',[]);
+                        this.$set(this,'formHeader',[]);
+                        return true;
+                    }
+                }
+                this.showMsg('选择的属性无效');
+            }
+        },
+        mounted: function () {
+            var that = this;
+            that.getProductInfo();
+            window.changeIMG = that.changeIMG;
+            window.$vm = that;
+        }
+    });
+</script>
+</body>
+</html>
+<script>
+
+</script>

+ 162 - 0
app/admin/view/auction/auction_product/index.php

@@ -0,0 +1,162 @@
+{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">
+                        <div class="layui-card-body">
+                            <div class="layui-row layui-col-space10 layui-form-item">
+                                <div class="layui-col-lg12">
+                                    <label class="layui-form-label">搜索:</label>
+                                    <div class="layui-input-block">
+                                        <input type="text" name="real_name" style="width: 50%" v-model="where.real_name"
+                                               placeholder="请输入名称、id" class="layui-input">
+                                    </div>
+                                </div>
+                                <div class="layui-col-lg12">
+                                    <div class="layui-input-block">
+                                        <button @click="search" type="button"
+                                                class="layui-btn layui-btn-sm layui-btn-normal">
+                                            <i class="layui-icon layui-icon-search"></i>搜索
+                                        </button>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                    </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" href="{:Url('create')}">添加商品</a>
+<!--                        <button class="layui-btn layui-btn-sm" data-type="del_auction">批量删除</button>-->
+                    </div>
+                    <table class="layui-hide" id="List" lay-filter="List"></table>
+
+
+                    <script type="text/html" id="image">
+                        <img style="cursor: pointer" lay-event="open_image" src="{{d.image}}">
+                    </script>
+                    <script type="text/html" id="is_show">
+                        <input type='checkbox' name='id' lay-skin='switch' value="{{d.id}}" lay-filter='is_show' lay-text='上架|下架'  {{ d.is_show  == 1 ? 'checked' : '' }}>
+                    </script>
+                    <script type="text/html" id="act">
+                        <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" lay-event='edit'>
+                            编辑
+                        </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: 'nickname', title: '拥有人', templet: '#nickname', width: '10%', align: 'center'},
+            {field: 'image', title: '封面', templet: '#image', align: 'center'},
+            {field: 'is_show', title: '状态', templet: '#is_show', align: 'center'},
+            {field: 'add_time', title: '预约开始', templet: '#add_time', width: '10%', align: 'center'},
+            {field: 'end_time', title: '预约结束', templet: '#end_time', width: '10%', align: 'center'},
+            {field: 'radd_time', title: '入场开始', templet: '#radd_time', width: '10%', align: 'center'},
+            {field: 'rend_time', title: '入场结束', templet: '#rend_time', width: '10%', align: 'center'},
+            {field: 'right', title: '操作', align: 'center', toolbar: '#act'},
+        ];
+    });
+    //点击事件绑定
+    layList.tool(function (event,data,obj) {
+        switch (event) {
+            case 'delete':
+                var url=layList.U({c:'auction.auction',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('is_show',function (odj,value) {
+        if(odj.elem.checked==true){
+            layList.baseGet(layList.Url({c:'auction.auctionProduct',a:'set_status',p:{status:1,id:value}}),function (res) {
+                layList.msg(res.msg, function () {
+                    layList.reload();
+                });
+            });
+        }else{
+            layList.baseGet(layList.Url({c:'auction.auctionProduct',a:'set_status',p:{status:0,id:value}}),function (res) {
+                layList.msg(res.msg, function () {
+                    layList.reload();
+                });
+            });
+        }
+    });
+</script>
+{/block}

BIN
public/uploads/attach/2022/03/20220322/28583c438c9ebaa76bed7f41a9ff5a6a.jpg


+ 1 - 1
runtime/admin/temp/3842d4cff02ed8a8fdaa7dea044f6e6b.php

@@ -1,4 +1,4 @@
-<?php /*a:1:{s:71:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\store\store_product\create.php";i:1595820902;}*/ ?>
+<?php /*a:1:{s:71:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\store\store_product\create.php";i:1647854872;}*/ ?>
 <!DOCTYPE html>
 <html>
 <head>

+ 42 - 25
runtime/admin/temp/5a82649edd1b40af6f202faef65620f4.php

@@ -1,4 +1,4 @@
-<?php /*a:5:{s:66:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\auction\auction\index.php";i:1647853845;s:61:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\container.php";i:1595820902;s:62:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_head.php";i:1595820902;s:57:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\style.php";i:1595820902;s:64:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_footer.php";i:1595820902;}*/ ?>
+<?php /*a:5:{s:66:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\auction\auction\index.php";i:1647936754;s:61:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\container.php";i:1595820902;s:62:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_head.php";i:1595820902;s:57:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\style.php";i:1595820902;s:64:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_footer.php";i:1595820902;}*/ ?>
 <!DOCTYPE html>
 <html lang="zh-CN">
 <head>
@@ -130,20 +130,7 @@
                 </div>
             </div>
         </div>
-        <script type="text/html" id="act">
-            <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" lay-event='edit'>
-                编辑
-            </button>
-            <button type="button" class="layui-btn layui-btn-xs" onclick="dropdown(this)">操作 <span class="caret"></span></button>
-            <ul class="layui-nav-child layui-anim layui-anim-upbit">
-                <li>
-                    <a href="<?php echo Url('store.storeProductReply/index'); ?>?product_id={{d.id}}">
-                        <i class="fa fa-warning"></i> 评论查看
-                    </a>
-                </li>
-            </ul>
-        </script>
-        <!--end-->
+
         <!-- 中间详细信息-->
         <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">
@@ -158,9 +145,26 @@
                 <div class="layui-card-body">
                     <div class="layui-btn-container" id="container-action">
                         <a class="layui-btn layui-btn-sm" href="<?php echo Url('create'); ?>">添加商品</a>
-                        <button class="layui-btn layui-btn-sm" data-type="del_auction">批量删除</button>
+<!--                        <button class="layui-btn layui-btn-sm" data-type="del_auction">批量删除</button>-->
                     </div>
                     <table class="layui-hide" id="List" lay-filter="List"></table>
+
+
+                    <script type="text/html" id="image">
+                        <img style="cursor: pointer" lay-event="open_image" src="{{d.image}}">
+                    </script>
+                    <script type="text/html" id="status">
+                        <input type='checkbox' name='id' lay-skin='switch' value="{{d.id}}" lay-filter='status' lay-text='使用|禁用'  {{ d.status  == 1 ? 'checked' : '' }}>
+                    </script>
+                    <script type="text/html" id="act">
+                        <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" lay-event='edit'>
+                            编辑
+                        </button>
+                        <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-event='delete' id="">
+                            删除
+                        </button>
+
+                    </script>
                 </div>
             </div>
         </div>
@@ -177,7 +181,8 @@
             {type: 'checkbox'},
             {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%', templet: '#id'},
             {field: 'nickname', title: '竞拍场', templet: '#nickname', width: '10%', align: 'center'},
-            {field: 'img', title: '封面', templet: '#img', align: 'center'},
+            {field: 'image', title: '封面', templet: '#image', align: 'center'},
+            {field: 'status', title: '状态', templet: '#status', align: 'center'},
             {field: 'add_time', title: '预约开始', templet: '#add_time', width: '10%', align: 'center'},
             {field: 'end_time', title: '预约结束', templet: '#end_time', width: '10%', align: 'center'},
             {field: 'radd_time', title: '入场开始', templet: '#radd_time', width: '10%', align: 'center'},
@@ -188,10 +193,9 @@
     //点击事件绑定
     layList.tool(function (event,data,obj) {
         switch (event) {
-            case 'delstor':
-                var url=layList.U({c:'store.store_product',a:'delete',q:{id:data.id}});
-                if(data.is_del) var code = {title:"操作提示",text:"确定恢复商品操作吗?",type:'info',confirm:'是的,恢复该商品'};
-                else var code = {title:"操作提示",text:"确定将该商品移入回收站吗?",type:'info',confirm:'是的,移入回收站'};
+            case 'delete':
+                var url=layList.U({c:'auction.auction',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) {
@@ -209,13 +213,26 @@
                 $eb.openImage(data.image);
                 break;
             case 'edit':
-                location.href = layList.U({a:'create',q:{id:data.id}});
-                break;
-            case 'attr':
-                $eb.createModalFrame(data.store_name+'-属性',layList.U({a:'attr',q:{id:data.id}}),{h:600,w:800})
+                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>
 
 

+ 163 - 0
runtime/admin/temp/7774ce40cfe0c284fa3e21f4afd9ff55.php

@@ -0,0 +1,163 @@
+<?php /*a:6:{s:71:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\wechat\store_service\index.php";i:1595820902;s:61:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\container.php";i:1595820902;s:62:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_head.php";i:1595820902;s:57:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\style.php";i:1595820902;s:62:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\inner_page.php";i:1595820902;s:64:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_footer.php";i:1595820902;}*/ ?>
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+    
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <?php if(empty($is_layui) || (($is_layui instanceof \think\Collection || $is_layui instanceof \think\Paginator ) && $is_layui->isEmpty())): ?>
+    <link href="/system/frame/css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
+    <?php endif; ?>
+    <link href="/static/plug/layui/css/layui.css" rel="stylesheet">
+    <link href="/system/css/layui-admin.css" rel="stylesheet">
+    <link href="/system/frame/css/font-awesome.min.css?v=4.3.0" rel="stylesheet">
+    <link href="/system/frame/css/animate.min.css" rel="stylesheet">
+    <link href="/system/frame/css/style.min.css?v=3.0.0" rel="stylesheet">
+    <script src="/system/frame/js/jquery.min.js"></script>
+    <script src="/system/frame/js/bootstrap.min.js"></script>
+    <script src="/static/plug/layui/layui.all.js"></script>
+    <script>
+        $eb = parent._mpApi;
+        window.controlle="<?php echo strtolower(trim(preg_replace("/[A-Z]/", "_\\0", app('request')->controller()), "_"));?>";
+        window.module="<?php echo app('http')->getName();?>";
+    </script>
+
+
+
+    <title></title>
+    
+    <!--<script type="text/javascript" src="/static/plug/basket.js"></script>-->
+<script type="text/javascript" src="/static/plug/requirejs/require.js"></script>
+<?php /*  <script type="text/javascript" src="/static/plug/requirejs/require-basket-load.js"></script>  */ ?>
+<script>
+    var hostname = location.hostname;
+    if(location.port) hostname += ':' + location.port;
+    requirejs.config({
+        map: {
+            '*': {
+                'css': '/static/plug/requirejs/require-css.js'
+            }
+        },
+        shim:{
+            'iview':{
+                deps:['css!iviewcss']
+            },
+            'layer':{
+                deps:['css!layercss']
+            }
+        },
+        baseUrl:'//'+hostname+'/',
+        paths: {
+            'static':'static',
+            'system':'system',
+            'vue':'static/plug/vue/dist/vue.min',
+            'axios':'static/plug/axios.min',
+            'iview':'static/plug/iview/dist/iview.min',
+            'iviewcss':'static/plug/iview/dist/styles/iview',
+            'lodash':'static/plug/lodash',
+            'layer':'static/plug/layer/layer',
+            'layercss':'static/plug/layer/theme/default/layer',
+            'jquery':'static/plug/jquery/jquery.min',
+            'moment':'static/plug/moment',
+            'sweetalert':'static/plug/sweetalert2/sweetalert2.all.min',
+            'formCreate':'/static/plug/form-create/form-create.min',
+
+        },
+        basket: {
+            excludes:['system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
+//            excludes:['system/util/mpFormBuilder','system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
+        }
+    });
+</script>
+<script type="text/javascript" src="/system/util/mpFrame.js"></script>
+    
+</head>
+<body class="gray-bg">
+<div class="wrapper wrapper-content">
+
+<div class="row">
+    <div class="col-sm-12">
+        <div class="ibox">
+            <div class="ibox-title">
+                <button type="button" class="btn btn-w-m btn-primary" onclick="$eb.createModalFrame(this.innerText,'<?php echo Url('create'); ?>')">添加客服</button>
+            </div>
+            <div class="ibox-content">
+                <div class="table-responsive">
+                    <table class="table table-striped  table-bordered">
+                        <thead>
+                        <tr>
+                            <th class="text-center">编号</th>
+                            <th class="text-center">微信用户名称</th>
+                            <th class="text-center">客服头像</th>
+                            <th class="text-center">客服名称</th>
+                            <th class="text-center">是否显示</th>
+                            <th class="text-center">添加时间</th>
+                            <th class="text-center">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody class="">
+                        <?php if(is_array($list) || $list instanceof \think\Collection || $list instanceof \think\Paginator): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
+                        <tr>
+                            <td class="text-center"><?php echo htmlentities($vo['id']); ?></td>
+                            <td class="text-center"><?php echo htmlentities($vo['wx_name']); ?></td>
+                            <td class="text-center"><img src="<?php echo htmlentities($vo['avatar']); ?>" class="head_image" data-image="<?php echo htmlentities($vo['avatar']); ?>" width="35" height="35"></td>
+                            <td class="text-center"><?php echo htmlentities($vo['nickname']); ?></td>
+                            <td class="text-center">
+                                <i class="fa <?php if($vo['status'] == '1'): ?>fa-check text-navy<?php else: ?>fa-close text-danger<?php endif; ?>"></i>
+                            </td>
+                            <td class="text-center"><?php echo htmlentities(date('Y-m-d H:i:s',!is_numeric($vo['add_time'])? strtotime($vo['add_time']) : $vo['add_time'])); ?></td>
+                            <td class="text-center">
+                                <button class="btn btn-info btn-xs" type="button"  onclick="$eb.createModalFrame('聊天记录','<?php echo Url('chat_user',array('id'=>$vo['id'])); ?>')"><i class="fa fa-commenting-o"></i> 聊天记录</button>
+                                <button class="btn btn-info btn-xs" type="button"  onclick="$eb.createModalFrame('编辑','<?php echo Url('edit',array('id'=>$vo['id'])); ?>')"><i class="fa fa-edit"></i> 编辑</button>
+                                <button class="btn btn-danger btn-xs " data-url="<?php echo Url('delete',array('id'=>$vo['id'])); ?>" type="button"><i class="fa fa-times"></i> 删除</button>
+                            </td>
+                        </tr>
+                        <?php endforeach; endif; else: echo "" ;endif; ?>
+                        </tbody>
+                    </table>
+                </div>
+                <link href="/system/frame/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
+<div class="row">
+    <div class="col-sm-6">
+        <div class="dataTables_info" id="DataTables_Table_0_info" role="alert" aria-live="polite" aria-relevant="all">共 <?php echo htmlentities($total); ?> 项</div>
+    </div>
+    <div class="col-sm-6">
+        <div class="dataTables_paginate paging_simple_numbers" id="editable_paginate">
+            <?php echo $page;?>
+        </div>
+    </div>
+</div>
+            </div>
+        </div>
+    </div>
+    
+
+
+    <script>
+        $('.btn-danger').on('click',function(){
+            window.t = $(this);
+            var _this = $(this),url =_this.data('url');
+            $eb.$swal('delete',function(){
+                $eb.axios.get(url).then(function(res){
+                    console.log(res);
+                    if(res.status == 200 && res.data.code == 200) {
+                        $eb.$swal('success',res.data.msg);
+                        _this.parents('tr').remove();
+                    }else
+                        return Promise.reject(res.data.msg || '删除失败')
+                }).catch(function(err){
+                    $eb.$swal('error',err);
+                });
+            })
+        });
+        $('.head_image').on('click',function (e) {
+            var image = $(this).data('image');
+            $eb.openImage(image);
+        })
+    </script>
+</div>
+
+
+</div>
+</body>
+</html>

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

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

+ 840 - 0
runtime/admin/temp/8fc817836ac8aa087779a6a8af3d62b1.php

@@ -0,0 +1,840 @@
+<?php /*a:1:{s:65:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\auction\auction\edit.php";i:1647936702;}*/ ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+    <link href="/system/frame/css/font-awesome.min.css" rel="stylesheet">
+    <link href="/system/plug/umeditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
+    <script type="text/javascript" src="/system/plug/umeditor/third-party/jquery.min.js"></script>
+    <script type="text/javascript" src="/system/plug/umeditor/third-party/template.min.js"></script>
+    <script type="text/javascript" charset="utf-8" src="/system/plug/umeditor/umeditor.config.js"></script>
+    <script type="text/javascript" charset="utf-8" src="/system/plug/umeditor/umeditor.min.js"></script>
+    <script type="text/javascript" src="/system/plug/umeditor/lang/zh-cn/zh-cn.js"></script>
+    <link rel="stylesheet" href="/static/plug/layui/css/layui.css">
+    <script src="/static/plug/layui/layui.js"></script>
+    <script src="/static/plug/vue/dist/vue.min.js"></script>
+    <script src="/static/plug/axios.min.js"></script>
+    <script src="/system/module/widget/aliyun-oss-sdk-4.4.4.min.js"></script>
+    <script src="/system/module/widget/cos-js-sdk-v5.min.js"></script>
+    <script src="/system/module/widget/qiniu-js-sdk-2.5.5.js"></script>
+    <script src="/system/module/widget/plupload.full.min.js"></script>
+    <script src="/system/module/widget/videoUpload.js"></script>
+    <style>
+        .layui-form-item {
+            margin-bottom: 0px;
+        }
+
+        .pictrueBox {
+            display: inline-block !important;
+        }
+
+        .pictrue {
+            width: 60px;
+            height: 60px;
+            border: 1px dotted rgba(0, 0, 0, 0.1);
+            margin-right: 15px;
+            display: inline-block;
+            position: relative;
+            cursor: pointer;
+        }
+
+        .pictrue img {
+            width: 100%;
+            height: 100%;
+        }
+
+        .upLoad {
+            width: 58px;
+            height: 58px;
+            line-height: 58px;
+            border: 1px dotted rgba(0, 0, 0, 0.1);
+            border-radius: 4px;
+            background: rgba(0, 0, 0, 0.02);
+            cursor: pointer;
+            display: flex;
+            justify-content: center;
+            align-items: center;
+        }
+
+        .rulesBox {
+            display: flex;
+            flex-wrap: wrap;
+            margin-left: 10px;
+        }
+
+        .layui-tab-content {
+            margin-top: 15px;
+        }
+
+        .ml110 {
+            margin: 18px 0 4px 110px;
+        }
+
+        .rules {
+            display: flex;
+        }
+
+        .rules-btn-sm {
+            height: 30px;
+            line-height: 30px;
+            font-size: 12px;
+            width: 109px;
+        }
+
+        .rules-btn-sm input {
+            width: 79% !important;
+            height: 84% !important;
+            padding: 0 10px;
+        }
+
+        .ml10 {
+            margin-left: 10px !important;
+        }
+
+        .ml40 {
+            margin-left: 40px !important;
+        }
+
+        .closes {
+            position: absolute;
+            left: 86%;
+            top: -18%;
+        }
+        .red {
+            color: red;
+        }
+        .layui-input-block .layui-video-box{
+            width: 22%;
+            height: 180px;
+            border-radius: 10px;
+            background-color: #707070;
+            margin-top: 10px;
+            position: relative;
+            overflow: hidden;
+        }
+        .layui-input-block .layui-video-box i{
+            color: #fff;
+            line-height: 180px;
+            margin: 0 auto;
+            width: 50px;
+            height: 50px;
+            display: inherit;
+            font-size: 50px;
+        }
+        .layui-input-block .layui-video-box .mark{
+            position: absolute;
+            width: 100%;
+            height: 30px;
+            top: 0;
+            background-color: rgba(0,0,0,.5);
+            text-align: center;
+        }
+        .store_box{
+            display: flex;
+        }
+        .info{
+            color: #c9c9c9;
+            padding-left: 10px;
+            line-height: 30px;
+        }
+    </style>
+</head>
+<body>
+<div class="layui-fluid">
+    <div class="layui-row layui-col-space15"  id="app" v-cloak="">
+        <div class="layui-card">
+            <div class="layui-card-header">
+                <span class="">竞拍添加</span>
+                <button style="margin-left: 20px" type="button" class="layui-btn layui-btn-primary layui-btn-xs" @click="goBack">返回列表</button>
+            </div>
+            <div class="layui-card-body">
+                <form class="layui-form" action="" v-cloak="">
+                    <div class="layui-tab layui-tab-brief" lay-filter="docTabBrief">
+                        <div class="layui-tab-content">
+                            <div class="layui-tab-item layui-show">
+                                <div class="layui-row layui-col-space15">
+                                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
+                                        <div class="grid-demo grid-demo-bg1">
+                                            <div class="layui-form-item">
+                                                <label class="layui-form-label">商品名称<i class="red">*</i></label>
+                                                <div class="layui-input-block">
+                                                    <input type="text" name="nickname" lay-verify="title" autocomplete="off"
+                                                           placeholder="竞拍名称" class="layui-input" v-model="formData.nickname" maxlength="100">
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
+                                        <div class="grid-demo grid-demo-bg1">
+                                            <div class="layui-form-item">
+                                                <label class="layui-form-label">竞拍封面图<i class="red">*</i></label>
+                                                <div class="pictrueBox">
+                                                    <div class="pictrue" v-if="formData.image" @click="uploadImage('image')">
+                                                        <img :src="formData.image"></div>
+                                                    <div class="upLoad" @click="uploadImage('image')" v-else>
+                                                        <i class="layui-icon layui-icon-camera" class="iconfont"
+                                                           style="font-size: 26px;"></i>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+<!--                                <div class="layui-row layui-col-space15">-->
+<!--                                    <div class="layui-col-xs12 layui-col-sm4 layui-col-md4">-->
+<!--                                        <div class="grid-demo grid-demo-bg1">-->
+<!--                                            <div class="layui-form-item">-->
+<!--                                                <label class="layui-form-label">商品状态</label>-->
+<!--                                                <div class="layui-input-block">-->
+<!--                                                    <input id="status" type="radio" name="status" lay-filter="status" value="1" title="正常" :checked="formData.status == 1 ? true : false">-->
+<!--                                                    <input id="status" type="radio" name="status" lay-filter="status" value="0" title="禁用" :checked="formData.status == 0 ? true : false">-->
+<!--                                                </div>-->
+<!--                                            </div>-->
+<!--                                        </div>-->
+<!--                                    </div>-->
+<!--                                </div>-->
+                                    <div class="layui-row layui-col-space15">
+                                        <div class="layui-col-xs12 layui-col-sm4 layui-col-md4">
+                                            <div class="grid-demo grid-demo-bg1">
+                                                <div class="layui-form-item">
+                                                    <label class="layui-form-label">预约时间<i class="red   ">*</i></label>
+                                                        <div class="layui-input-inline">
+                                                            <input type="text" class="layui-input" name="time" id="time" value="" placeholder="-">
+                                                        </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row layui-col-space15">
+                                        <div class="layui-col-xs12 layui-col-sm4 layui-col-md4">
+                                            <div class="grid-demo grid-demo-bg1">
+                                                <div class="layui-form-item">
+                                                    <label class="layui-form-label">进场时间<i class="red">*</i></label>
+                                                    <div class="layui-input-inline">
+                                                        <input type="text" class="layui-input" name="rtime" id="rtime" value="" placeholder="-">
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
+                                        <div class="grid-demo grid-demo-bg1">
+                                            <div class="layui-form-item">
+                                                <label class="layui-form-label">排序<i class="red">*</i></label>
+                                                <div class="layui-input-inline">
+                                                    <input type="number" name="sort" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.sort" maxlength="100" value="0">
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+
+
+                            </div>
+
+                        </div>
+                        <div class="layui-tab-content">
+                            <div class="layui-row layui-col-space15">
+                                <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
+                                    <button class="layui-btn layui-btn-normal layui-btn-sm" id="submit" type="button" @click="handleSubmit()">提交</button>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </form>
+            </div>
+        </div>
+    </div>
+</div>
+<script>
+
+    var id = <?php echo htmlentities($id); ?>;
+    var add_time = '<?php echo htmlentities($dataList['add_time']); ?>';
+    var end_time = '<?php echo htmlentities($dataList['end_time']); ?>';
+    var radd_time = '<?php echo htmlentities($dataList['radd_time']); ?>';
+    var rend_time = '<?php echo htmlentities($dataList['rend_time']); ?>';
+    layui.use('laydate', function(){
+        var laydate = layui.laydate;
+
+        laydate.render({
+            elem: '#time'
+            ,type: 'time'
+            ,range: true
+            ,value: add_time+'-'+end_time
+        });
+        laydate.render({
+            elem: '#rtime'
+            ,type: 'time'
+            ,range: true
+            ,value: radd_time+'-'+rend_time
+        });
+    })
+    //Demo
+    layui.use('form', function(){
+        var form = layui.form;
+
+        //监听提交
+        form.on('submit(formDemo)', function(data){
+            layer.msg(JSON.stringify(data.field));
+            return false;
+        });
+    });
+
+    new Vue({
+        el: '#app',
+        data: {
+            id:id,
+            //分类列表
+            cateList: [],
+            //运费模板
+            tempList: [],
+            upload:{
+                videoIng:false
+            },
+            formData: {
+
+            },
+            rule: { //多图选择规则
+                slider_image: {
+                    maxLength: 1
+                }
+            },
+            attr: [],//临时属性
+            newRule: false,//是否添加新规则
+            radioRule: ['status'],//radio 当选规则
+            ruleList:[],
+            ruleIndex:-1,
+            progress: 0,
+            um: null,//编译器实例化
+            form: null,//layui.form
+            layTabId: 1,
+            ruleBool: id ? true : false,
+        },
+        watch:{
+            'formData.is_sub':function (n) {
+                if (n == 1) {
+                    this.formHeader.push({title:'一级返佣(元)'});
+                    this.formHeader.push({title:'二级级返佣(元)'});
+                } else {
+                    this.formHeader.pop();
+                    this.formHeader.pop();
+                }
+            },
+            'formData.spec_type':function (n) {
+                if (n) {
+                    this.render();
+                }
+            },
+            // 'formData.image':function (n) {
+            //     if(!this.batchAttr.pic){
+            //         this.batchAttr.pic = n;
+            //     }
+            //     if(!this.formData.attr.pic){
+            //         this.formData.attr.pic = n;
+            //     }
+            // }
+        },
+        methods: {
+            back:function(){
+                var that = this;
+                layui.use(['element'], function () {
+                    layui.element.tabChange('docTabBrief', that.layTabId == 1 ? 1 : parseInt(that.layTabId) - 1);
+                });
+            },
+            next:function(){
+                var that = this;
+                layui.use(['element'], function () {
+                    layui.element.tabChange('docTabBrief', that.layTabId == 3 ? 3 : parseInt(that.layTabId) + 1);
+                });
+            },
+            goBack:function(){
+                location.href = this.U({c:'auction.auction',a:'index'});
+            },
+            U: function (opt) {
+                var m = opt.m || 'admin', c = opt.c || window.controlle || '', a = opt.a || 'index', q = opt.q || '',
+                    p = opt.p || {};
+                var params = Object. keys(p).map(function (key) {
+                    return key + '/' + p[key];
+                }).join('/');
+                var gets = Object.keys(q).map(function (key) {
+                    return key+'='+ q[key];
+                }).join('&');
+
+                return '/' + m + '/' + c + '/' + a + (params == '' ? '' : '/' + params) + (gets == '' ? '' : '?' + gets);
+            },
+            /**
+             * 提示
+             * */
+            showMsg: function (msg, success) {
+                $('#submit').removeAttr('disabled').text('提交');
+                layui.use(['layer'], function () {
+                    layui.layer.msg(msg, success);
+                });
+            },
+            addBrokerage:function(){
+                if (this.brokerage.brokerage >= 0 && this.brokerage.brokerage_two >= 0){
+                    var that = this;
+                    this.$set(this.formData,'attrs',this.formData.attrs.map(function (item) {
+                        item.brokerage = that.brokerage.brokerage;
+                        item.brokerage_two = that.brokerage.brokerage_two;
+                        return item;
+                    }));
+                } else {
+                    return this.showMsg('请填写返佣金额在进行批量添加');
+                }
+            },
+            batchClear:function(){
+                this.$set(this,'batchAttr',{
+                    pic: '',
+                    price: 0,
+                    cost: 0,
+                    ot_price: 0,
+                    stock: 0,
+                    bar_code: '',
+                    weight: 0,
+                    volume: 0,
+                });
+            },
+            /**
+             * 批量添加
+             * */
+            batchAdd:function(){
+                var that = this;
+                this.$set(this.formData,'attrs',this.formData.attrs.map(function (item) {
+                    if (that.batchAttr.pic) {
+                        item.pic = that.batchAttr.pic;
+                    }
+                    if (that.batchAttr.price > 0){
+                        item.price = that.batchAttr.price;
+                    }
+                    if (that.batchAttr.cost > 0){
+                        item.cost = that.batchAttr.cost;
+                    }
+                    if (that.batchAttr.ot_price > 0){
+                        item.ot_price = that.batchAttr.ot_price;
+                    }
+                    if (that.batchAttr.stock > 0){
+                        item.stock = that.batchAttr.stock;
+                    }
+                    if (that.batchAttr.bar_code != ''){
+                        item.bar_code = that.batchAttr.bar_code;
+                    }
+                    if (that.batchAttr.weight > 0){
+                        item.weight = that.batchAttr.weight;
+                    }
+                    if (that.batchAttr.volume > 0){
+                        item.volume = that.batchAttr.volume;
+                    }
+                    return item;
+                }));
+
+            },
+            /**
+             * 获取商品信息
+             * */
+            getProductInfo: function () {
+                var that = this;
+                that.requestGet(that.U({c:"auction.auction",a:'get_auction',q:{id:that.id}})).then(function (res) {
+
+                    var productInfo = res.data.productInfo || {};
+                    if(productInfo.id && that.id){
+                        that.$set(that,'formData',productInfo);
+                        that.generate();
+                    }
+                    that.getRuleList();
+                    that.init();
+                }).catch(function (res) {
+                    that.showMsg(res.msg);
+                })
+            },
+            /**
+             * 给某个属性添加属性值
+             * @param item
+             * */
+            addDetail: function (item) {
+                if (!item.detailValue) return false;
+                if (item.detail.find(function (val) {
+                    if(item.detailValue == val){
+                        return true;
+                    }
+                })) {
+                    return this.showMsg('添加的属性值重复');
+                }
+                item.detail.push(item.detailValue);
+                item.detailValue = '';
+            },
+            /**
+             * 删除某个属性值
+             * @param item 父级循环集合
+             * @param inx 子集index
+             * */
+            deleteValue: function (item, inx) {
+                if (item.detail.length > 1) {
+                    item.detail.splice(inx, 1);
+                } else {
+                    return this.showMsg('请设置至少一个属性');
+                }
+            },
+            /**
+             * 删除某条属性
+             * @param index
+             * */
+            deleteItem: function (index) {
+                this.formData.items.splice(index, 1);
+            },
+            /**
+             * 删除某条属性
+             * @param index
+             * */
+            deleteAttrs: function (index) {
+                var that = this;
+                if(that.id > 0){
+                    that.requestGet(that.U({c:"store.StoreProduct",a:'check_activity',q:{id:that.id}})).then(function (res) {
+                        that.showMsg(res.msg);
+                    }).catch(function (res) {
+                        if (that.formData.attrs.length > 1) {
+                            that.formData.attrs.splice(index, 1);
+                        } else {
+                            return that.showMsg('请设置至少一个规则');
+                        }
+                    })
+                }else{
+                    if (that.formData.attrs.length > 1) {
+                        that.formData.attrs.splice(index, 1);
+                    } else {
+                        return that.showMsg('请设置至少一个规则');
+                    }
+                }
+            },
+            /**
+             * 创建属性
+             * */
+            createAttrName: function () {
+                if (this.formDynamic.attrsName && this.formDynamic.attrsVal) {
+                    if (this.formData.items.find(function (val) {
+                        if (val.value == this.formDynamic.attrsName) {
+                            return true;
+                        }
+                    }.bind(this))) {
+                        return this.showMsg('添加的属性重复');
+                    }
+                    this.formData.items.push({
+                        value: this.formDynamic.attrsName,
+                        detailValue: '',
+                        attrHidden: false,
+                        detail: [this.formDynamic.attrsVal]
+                    });
+                    this.formDynamic.attrsName = '';
+                    this.formDynamic.attrsVal = '';
+                    this.newRule = false;
+                } else {
+                    return this.showMsg('请添加完整的规格!');
+                }
+            },
+            /**
+             * 删除图片
+             * */
+            deleteImage: function (key, index) {
+                var that = this;
+                if (index != undefined) {
+                    that.formData[key].splice(index, 1);
+                    that.$set(that.formData, key, that.formData[key]);
+                } else {
+                    that.$set(that.formData, key, '');
+                }
+            },
+            createFrame: function (title, src, opt) {
+                opt === undefined && (opt = {});
+                var h = 0;
+                if (window.innerHeight < 800 && window.innerHeight >= 700) {
+                    h = window.innerHeight - 50;
+                } else if (window.innerHeight < 900 && window.innerHeight >= 800) {
+                    h = window.innerHeight - 100;
+                } else if (window.innerHeight < 1000 && window.innerHeight >= 900) {
+                    h = window.innerHeight - 150;
+                } else if (window.innerHeight >= 1000) {
+                    h = window.innerHeight - 200;
+                } else {
+                    h = window.innerHeight;
+                }
+                var area = [(opt.w || window.innerWidth / 2) + 'px', (!opt.h || opt.h > h ? h : opt.h) + 'px'];
+                layui.use('layer',function () {
+                    return layer.open({
+                        type: 2,
+                        title: title,
+                        area: area,
+                        fixed: false, //不固定
+                        maxmin: true,
+                        moveOut: false,//true  可以拖出窗外  false 只能在窗内拖
+                        anim: 5,//出场动画 isOutAnim bool 关闭动画
+                        offset: 'auto',//['100px','100px'],//'auto',//初始位置  ['100px','100px'] t[ 上 左]
+                        shade: 0,//遮罩
+                        resize: true,//是否允许拉伸
+                        content: src,//内容
+                        move: '.layui-layer-title'
+                    });
+                });
+            },
+            changeIMG: function (name, value) {
+                if (this.getRule(name).maxLength !== undefined) {
+                    var that = this;
+                    value.map(function (v) {
+                        that.formData[name].push(v);
+                    });
+                    this.$set(this.formData, name, this.formData[name]);
+                } else {
+                    if(name == 'batchAttr.pic'){
+                        this.batchAttr.pic = value;
+                    } else {
+                        if (name.indexOf('.') !== -1) {
+                            var key = name.split('.');
+                            if (key.length == 2){
+                                this.formData[key[0]][key[1]] = value;
+                            } else if(key.length == 3){
+                                this.formData[key[0]][key[1]][key[2]] = value;
+                            } else if(key.length == 4){
+                                this.$set(this.formData[key[0]][key[1]][key[2]],key[3],value)
+                            }
+                        } else {
+                            this.formData[name] = value;
+                        }
+                    }
+                }
+            },
+            getRule: function (name) {
+                return this.rule[name] || {};
+            },
+            uploadImage: function (name) {
+                return this.createFrame('选择图片',this.U({c:"widget.images",a:'index',p:{fodder:name}}),{h:545,w:900});
+            },
+            uploadVideo: function () {
+                if (this.videoLink) {
+                    this.formData.video_link = this.videoLink;
+                } else {
+                    $(this.$refs.filElem).click();
+                }
+            },
+            delVideo: function () {
+                var that = this;
+                that.$set(that.formData, 'video_link', '');
+            },
+            insertEditor: function (list) {
+                this.um.execCommand('insertimage', list);
+            },
+            insertEditorVideo: function (src) {
+                this.um.setContent('<div><video style="width: 99%" src="'+src+'" class="video-ue" controls="controls" width="100"><source src="'+src+'"></source></video></div><br>',true);
+            },
+            getContent: function () {
+                return this.um.getContent();
+            },
+            /**
+             * 监听radio字段
+             */
+            eeventRadio: function () {
+                var that = this;
+                that.radioRule.map(function (val) {
+                    that.form.on('radio(' + val + ')', function (res) {
+                        that.formData[val] = res.value;
+                    });
+                })
+            },
+            init: function () {
+                var that = this;
+                window.UMEDITOR_CONFIG.toolbar = [
+                    // 加入一个 test
+                    'source | undo redo | bold italic underline strikethrough | superscript subscript | forecolor backcolor | removeformat |',
+                    'insertorderedlist insertunorderedlist | selectall cleardoc paragraph | fontfamily fontsize',
+                    '| justifyleft justifycenter justifyright justifyjustify |',
+                    'link unlink | emotion selectimgs video  | map',
+                    '| horizontal print preview fullscreen', 'drafts', 'formula'
+                ];
+                UM.registerUI('selectimgs', function (name) {
+                    var me = this;
+                    var $btn = $.eduibutton({
+                        icon: 'image',
+                        click: function () {
+                            that.createFrame('选择图片', "<?php echo Url('widget.images/index',['fodder'=>'editor']); ?>");
+                        },
+                        title: '选择图片'
+                    });
+
+                    this.addListener('selectionchange', function () {
+                        //切换为不可编辑时,把自己变灰
+                        var state = this.queryCommandState(name);
+                        $btn.edui().disabled(state == -1).active(state == 1)
+                    });
+                    return $btn;
+
+                });
+                UM.registerUI('video', function (name) {
+                    var me = this;
+                    var $btn = $.eduibutton({
+                        icon: 'video',
+                        click: function () {
+                            that.createFrame('选择视频', "<?php echo Url('widget.video/index',['fodder'=>'video']); ?>");
+                        },
+                        title: '选择视频'
+                    });
+
+                    this.addListener('selectionchange', function () {
+                        //切换为不可编辑时,把自己变灰
+                        var state = this.queryCommandState(name);
+                        $btn.edui().disabled(state == -1).active(state == 1)
+                    });
+                    return $btn;
+
+                });
+                //实例化编辑器
+                this.um = UM.getEditor('myEditor', {initialFrameWidth: '99%', initialFrameHeight: 400});
+                this.um.setContent(that.formData.description);
+                that.$nextTick(function () {
+                    layui.use(['form','element'], function () {
+                        that.form = layui.form;
+                        that.form.render();
+                        that.form.on('select(temp_id)', function (data) {
+                            that.$set(that.formData, 'temp_id', data.value);
+                        });
+                        that.form.on('select(rule_index)', function (data) {
+                            that.ruleIndex = data.value;
+                        });
+                        layui.element.on('tab(docTabBrief)', function(){
+                            that.layTabId = this.getAttribute('lay-id');
+                        });
+                        that.eeventRadio();
+                    });
+                })
+            },
+            requestPost: function (url, data) {
+                return new Promise(function (resolve, reject) {
+                    axios.post(url, data).then(function (res) {
+                        if (res.status == 200 && res.data.code == 200) {
+                            resolve(res.data)
+                        } else {
+                            reject(res.data);
+                        }
+                    }).catch(function (err) {
+                        reject({msg:err})
+                    });
+                })
+            },
+            requestGet: function (url) {
+                return new Promise(function (resolve, reject) {
+                    axios.get(url).then(function (res) {
+                        if (res.status == 200 && res.data.code == 200) {
+                            resolve(res.data)
+                        } else {
+                            reject(res.data);
+                        }
+                    }).catch(function (err) {
+                        reject({msg:err})
+                    });
+                })
+            },
+            generates: function () {
+                var that = this;
+                that.generate(1);
+            },
+            handleSubmit:function () {
+                var that = this;
+                var time = $('#time').val();
+                var rtime = $('#rtime').val();
+                var status = $('#status').val();
+
+                that.formData.status = status;
+                that.formData.time = time;
+                that.formData.rtime = rtime;
+                console.log(status);
+                if (!that.formData['nickname']){
+                    return that.showMsg('请填写名称');
+                }
+                if (!that.formData['image']){
+                    return that.showMsg('请上传图片');
+                }
+
+                if (!that.formData['time']){
+                    return that.showMsg('请选择预约时间');
+                }
+                if (!that.formData['rtime']){
+                    return that.showMsg('请选择进场时间');
+                }
+                $('#submit').attr('disabled', 'disabled').text('保存中...');
+                that.requestPost(that.U({c:'auction.auction',a:'update',p:{id:that.id}}),that.formData).then(function (res) {
+                    that.confirm();
+                }).catch(function (res) {
+                    that.showMsg(res.msg);
+                });
+
+            },
+            confirm: function(){
+                var that = this;
+                layui.use(['layer'], function () {
+                    var layer = layui.layer;
+                    layer.confirm(that.id ? '修改成功是否返回产品列表' : '添加成功是否返回产品列表', {
+                        btn: ['返回列表',that.id ? '继续修改' : '继续添加'] //按钮
+                    }, function(){
+                        location.href = that.U({c:'auction.auction',a:'index'});
+                    }, function(){
+                        location.reload();
+                    });
+                });
+            },
+            render:function(){
+                this.$nextTick(function(){
+                    layui.use(['form'], function () {
+                        layui.form.render('select');
+                    });
+                })
+            },
+            // 移动
+            handleDragStart (e, item) {
+                this.dragging = item;
+            },
+            handleDragEnd (e, item) {
+                this.dragging = null
+            },
+            handleDragOver (e) {
+                e.dataTransfer.dropEffect = 'move'
+            },
+            handleDragEnter (e, item) {
+                e.dataTransfer.effectAllowed = 'move'
+                if (item === this.dragging) {
+                    return
+                }
+                var newItems = [...this.formData.activity];
+                var src = newItems.indexOf(this.dragging);
+                var dst = newItems.indexOf(item);
+                newItems.splice(dst, 0, ...newItems.splice(src, 1))
+                this.formData.activity = newItems;
+            },
+            addRule:function(){
+                return this.createFrame('添加商品规则',this.U({c:'store.StoreProductRule',a:'create'}));
+            },
+            allRule:function () {
+                if (this.ruleIndex != -1) {
+                    var rule = this.ruleList[this.ruleIndex];
+                    if (rule) {
+                        this.ruleBool = true;
+                        var rule_value = rule.rule_value.map(function (item) {
+                            return item;
+                        });
+                        this.$set(this.formData,'items',rule_value);
+                        this.$set(this.formData,'attrs',[]);
+                        this.$set(this,'formHeader',[]);
+                        return true;
+                    }
+                }
+                this.showMsg('选择的属性无效');
+            }
+        },
+        mounted: function () {
+            var that = this;
+            that.getProductInfo();
+            window.changeIMG = that.changeIMG;
+            window.$vm = that;
+        }
+    });
+</script>
+</body>
+</html>
+<script>
+
+</script>

+ 256 - 0
runtime/admin/temp/a98c59e87384e13f1b02591010192096.php

@@ -0,0 +1,256 @@
+<?php /*a:5:{s:71:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\store\store_category\index.php";i:1595820902;s:61:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\container.php";i:1595820902;s:62:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_head.php";i:1595820902;s:57:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\style.php";i:1595820902;s:64:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_footer.php";i:1595820902;}*/ ?>
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+    
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <?php if(empty($is_layui) || (($is_layui instanceof \think\Collection || $is_layui instanceof \think\Paginator ) && $is_layui->isEmpty())): ?>
+    <link href="/system/frame/css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
+    <?php endif; ?>
+    <link href="/static/plug/layui/css/layui.css" rel="stylesheet">
+    <link href="/system/css/layui-admin.css" rel="stylesheet">
+    <link href="/system/frame/css/font-awesome.min.css?v=4.3.0" rel="stylesheet">
+    <link href="/system/frame/css/animate.min.css" rel="stylesheet">
+    <link href="/system/frame/css/style.min.css?v=3.0.0" rel="stylesheet">
+    <script src="/system/frame/js/jquery.min.js"></script>
+    <script src="/system/frame/js/bootstrap.min.js"></script>
+    <script src="/static/plug/layui/layui.all.js"></script>
+    <script>
+        $eb = parent._mpApi;
+        window.controlle="<?php echo strtolower(trim(preg_replace("/[A-Z]/", "_\\0", app('request')->controller()), "_"));?>";
+        window.module="<?php echo app('http')->getName();?>";
+    </script>
+
+
+
+    <title></title>
+    
+    <!--<script type="text/javascript" src="/static/plug/basket.js"></script>-->
+<script type="text/javascript" src="/static/plug/requirejs/require.js"></script>
+<?php /*  <script type="text/javascript" src="/static/plug/requirejs/require-basket-load.js"></script>  */ ?>
+<script>
+    var hostname = location.hostname;
+    if(location.port) hostname += ':' + location.port;
+    requirejs.config({
+        map: {
+            '*': {
+                'css': '/static/plug/requirejs/require-css.js'
+            }
+        },
+        shim:{
+            'iview':{
+                deps:['css!iviewcss']
+            },
+            'layer':{
+                deps:['css!layercss']
+            }
+        },
+        baseUrl:'//'+hostname+'/',
+        paths: {
+            'static':'static',
+            'system':'system',
+            'vue':'static/plug/vue/dist/vue.min',
+            'axios':'static/plug/axios.min',
+            'iview':'static/plug/iview/dist/iview.min',
+            'iviewcss':'static/plug/iview/dist/styles/iview',
+            'lodash':'static/plug/lodash',
+            'layer':'static/plug/layer/layer',
+            'layercss':'static/plug/layer/theme/default/layer',
+            'jquery':'static/plug/jquery/jquery.min',
+            'moment':'static/plug/moment',
+            'sweetalert':'static/plug/sweetalert2/sweetalert2.all.min',
+            'formCreate':'/static/plug/form-create/form-create.min',
+
+        },
+        basket: {
+            excludes:['system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
+//            excludes:['system/util/mpFormBuilder','system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
+        }
+    });
+</script>
+<script type="text/javascript" src="/system/util/mpFrame.js"></script>
+    
+</head>
+<body class="gray-bg">
+<div class="wrapper wrapper-content">
+
+
+<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">
+                    <form class="layui-form layui-form-pane" action="">
+                        <div class="layui-form-item">
+                            <div class="layui-inline">
+                                <label class="layui-form-label">所有分类</label>
+                                <div class="layui-input-block">
+                                    <select name="is_show">
+                                        <option value="">是否显示</option>
+                                        <option value="1">显示</option>
+                                        <option value="0">不显示</option>
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="layui-inline">
+                                <label class="layui-form-label">所有分类</label>
+                                <div class="layui-input-block">
+                                    <select name="pid">
+                                        <option value="">所有菜单</option>
+                                        <?php if(is_array($cate) || $cate instanceof \think\Collection || $cate instanceof \think\Paginator): $i = 0; $__LIST__ = $cate;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
+                                        <option value="<?php echo htmlentities($vo['id']); ?>"><?php echo htmlentities($vo['html']); ?><?php echo htmlentities($vo['cate_name']); ?></option>
+                                        <?php endforeach; endif; else: echo "" ;endif; ?>
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="layui-inline">
+                                <label class="layui-form-label">产品名称</label>
+                                <div class="layui-input-block">
+                                    <input type="text" name="cate_name" class="layui-input" placeholder="请输入分类名称">
+                                </div>
+                            </div>
+                            <div class="layui-inline">
+                                <div class="layui-input-inline">
+                                    <button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit="search" lay-filter="search">
+                                        <i class="layui-icon layui-icon-search"></i>搜索</button>
+                                </div>
+                            </div>
+                        </div>
+                    </form>
+                </div>
+            </div>
+        </div>
+        <!--产品列表-->
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">分类列表</div>
+                <div class="layui-card-body">
+                    <div class="alert alert-info" role="alert">
+                        注:点击父级名称可查看子集分类,点击分页首页可返回顶级分类;分类名称和排序可进行快速编辑;
+                        <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+                    </div>
+                    <div class="layui-btn-container">
+                        <a class="layui-btn layui-btn-sm" href="<?php echo Url('index'); ?>">分类首页</a>
+                        <button type="button" class="layui-btn layui-btn-sm" onclick="$eb.createModalFrame(this.innerText,'<?php echo Url('create'); ?>')">添加分类</button>
+                    </div>
+                    <table class="layui-hide" id="List" lay-filter="List"></table>
+                    <script type="text/html" id="pic">
+                        {{# if(d.pic){ }}
+                        <img style="cursor: pointer" lay-event='open_image' src="{{d.pic}}">
+                        {{# }else{ }}
+                        暂无图片
+                        {{# } }}
+                    </script>
+                    <script type="text/html" id="is_show">
+                        <input type='checkbox' name='id' lay-skin='switch' value="{{d.id}}" lay-filter='is_show' lay-text='显|隐'  {{ d.is_show == 1 ? 'checked' : '' }}>
+                    </script>
+                    <script type="text/html" id="pid">
+                        <a href="<?php echo Url('index'); ?>?pid={{d.id}}">查看</a>
+                    </script>
+                    <script type="text/html" id="act">
+                        <button class="layui-btn layui-btn-xs" onclick="$eb.createModalFrame('编辑','<?php echo Url('edit'); ?>?id={{d.id}}')">
+                            <i class="fa fa-edit"></i> 编辑
+                        </button>
+                        <button class="layui-btn btn-danger layui-btn-xs" lay-event='delstor'>
+                            <i class="fa fa-times"></i> 删除
+                        </button>
+                    </script>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+<script src="/system/js/layuiList.js"></script>
+
+
+
+<script>
+    setTimeout(function () {
+        $('.alert-info').hide();
+    },3000);
+    //实例化form
+    layList.form.render();
+    //加载列表
+    layList.tableList('List',"<?php echo Url('category_list',['pid'=>$pid]); ?>",function (){
+        return [
+            {field: 'id', title: 'ID', sort: true,event:'id',width:'4%',align:'center'},
+            {field: 'pid_name', title: '父级',align:'center'},
+            {field: 'cate_name', title: '分类名称',edit:'cate_name',align:'center'},
+            {field: 'pid', title: '查看子分类',templet:'#pid',align:'center',width:'8%'},
+            {field: 'pic', title: '分类图标',templet:'#pic',align:'center'},
+            {field: 'sort', title: '排序',sort: true,event:'sort',edit:'sort',width:'8%',align:'center'},
+            {field: 'is_show', title: '状态',templet:'#is_show',width:'10%',align:'center'},
+            {field: 'right', title: '操作',align:'center',toolbar:'#act',width:'10%',align:'center'},
+        ];
+    });
+    //自定义方法
+    var action= {
+        set_category: function (field, id, value) {
+            layList.baseGet(layList.Url({
+                c: 'store.store_category',
+                a: 'set_category',
+                q: {field: field, id: id, value: value}
+            }), function (res) {
+                layList.msg(res.msg);
+            });
+        },
+    }
+    //查询
+    layList.search('search',function(where){
+        layList.reload(where,true);
+    });
+    layList.switch('is_show',function (odj,value) {
+        if(odj.elem.checked==true){
+            layList.baseGet(layList.Url({c:'store.store_category',a:'set_show',p:{is_show:1,id:value}}),function (res) {
+                layList.msg(res.msg);
+            });
+        }else{
+            layList.baseGet(layList.Url({c:'store.store_category',a:'set_show',p:{is_show:0,id:value}}),function (res) {
+                layList.msg(res.msg);
+            });
+        }
+    });
+    //快速编辑
+    layList.edit(function (obj) {
+        var id=obj.data.id,value=obj.value;
+        switch (obj.field) {
+            case 'cate_name':
+                action.set_category('cate_name',id,value);
+                break;
+            case 'sort':
+                action.set_category('sort',id,value);
+                break;
+        }
+    });
+    //监听并执行排序
+    layList.sort(['id','sort'],true);
+    //点击事件绑定
+    layList.tool(function (event,data,obj) {
+        switch (event) {
+            case 'delstor':
+                var url=layList.U({c:'store.store_category',a:'delete',q:{id:data.id}});
+                $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();
+                        }else
+                            return Promise.reject(res.data.msg || '删除失败')
+                    }).catch(function(err){
+                        $eb.$swal('error',err);
+                    });
+                })
+                break;
+            case 'open_image':
+                $eb.openImage(data.pic);
+                break;
+        }
+    })
+</script>
+
+
+</div>
+</body>
+</html>

+ 891 - 177
runtime/admin/temp/b3614fd0470c8fca440dc55e960e0bcc.php

@@ -1,204 +1,918 @@
-<?php /*a:5:{s:67:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\auction\auction\create.php";i:1647855047;s:61:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\container.php";i:1595820902;s:62:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_head.php";i:1595820902;s:57:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\style.php";i:1595820902;s:64:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_footer.php";i:1595820902;}*/ ?>
+<?php /*a:1:{s:67:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\auction\auction\create.php";i:1647935955;}*/ ?>
 <!DOCTYPE html>
-<html lang="zh-CN">
+<html>
 <head>
-    
     <meta charset="utf-8">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <?php if(empty($is_layui) || (($is_layui instanceof \think\Collection || $is_layui instanceof \think\Paginator ) && $is_layui->isEmpty())): ?>
-    <link href="/system/frame/css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
-    <?php endif; ?>
-    <link href="/static/plug/layui/css/layui.css" rel="stylesheet">
-    <link href="/system/css/layui-admin.css" rel="stylesheet">
-    <link href="/system/frame/css/font-awesome.min.css?v=4.3.0" rel="stylesheet">
-    <link href="/system/frame/css/animate.min.css" rel="stylesheet">
-    <link href="/system/frame/css/style.min.css?v=3.0.0" rel="stylesheet">
-    <script src="/system/frame/js/jquery.min.js"></script>
-    <script src="/system/frame/js/bootstrap.min.js"></script>
-    <script src="/static/plug/layui/layui.all.js"></script>
-    <script>
-        $eb = parent._mpApi;
-        window.controlle="<?php echo strtolower(trim(preg_replace("/[A-Z]/", "_\\0", app('request')->controller()), "_"));?>";
-        window.module="<?php echo app('http')->getName();?>";
-    </script>
-
-
-
-    <title></title>
-    
-<link href="/system/plug/umeditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
-<link href="/system/module/wechat/news/css/style.css" type="text/css" rel="stylesheet">
-<link href="/system/frame/css/plugins/chosen/chosen.css" rel="stylesheet">
-<script type="text/javascript" src="/system/plug/umeditor/third-party/jquery.min.js"></script>
-<script type="text/javascript" src="/system/plug/umeditor/third-party/template.min.js"></script>
-<script type="text/javascript" charset="utf-8" src="/system/plug/umeditor/umeditor.config.js"></script>
-<script type="text/javascript" charset="utf-8" src="/system/plug/umeditor/umeditor.js"></script>
-<script src="/system/frame/js/ajaxfileupload.js"></script>
-<script src="/system/plug/validate/jquery.validate.js"></script>
-<script src="/system/frame/js/plugins/chosen/chosen.jquery.js"></script>
-<style>
-    .wrapper-content {
-        padding: 0 !important;
-    }
-</style>
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+    <link href="/system/frame/css/font-awesome.min.css" rel="stylesheet">
+    <link href="/system/plug/umeditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
+    <script type="text/javascript" src="/system/plug/umeditor/third-party/jquery.min.js"></script>
+    <script type="text/javascript" src="/system/plug/umeditor/third-party/template.min.js"></script>
+    <script type="text/javascript" charset="utf-8" src="/system/plug/umeditor/umeditor.config.js"></script>
+    <script type="text/javascript" charset="utf-8" src="/system/plug/umeditor/umeditor.min.js"></script>
+    <script type="text/javascript" src="/system/plug/umeditor/lang/zh-cn/zh-cn.js"></script>
+    <link rel="stylesheet" href="/static/plug/layui/css/layui.css">
+    <script src="/static/plug/layui/layui.js"></script>
+    <script src="/static/plug/vue/dist/vue.min.js"></script>
+    <script src="/static/plug/axios.min.js"></script>
+    <script src="/system/module/widget/aliyun-oss-sdk-4.4.4.min.js"></script>
+    <script src="/system/module/widget/cos-js-sdk-v5.min.js"></script>
+    <script src="/system/module/widget/qiniu-js-sdk-2.5.5.js"></script>
+    <script src="/system/module/widget/plupload.full.min.js"></script>
+    <script src="/system/module/widget/videoUpload.js"></script>
+    <style>
+        .layui-form-item {
+            margin-bottom: 0px;
+        }
 
-    <!--<script type="text/javascript" src="/static/plug/basket.js"></script>-->
-<script type="text/javascript" src="/static/plug/requirejs/require.js"></script>
-<?php /*  <script type="text/javascript" src="/static/plug/requirejs/require-basket-load.js"></script>  */ ?>
-<script>
-    var hostname = location.hostname;
-    if(location.port) hostname += ':' + location.port;
-    requirejs.config({
-        map: {
-            '*': {
-                'css': '/static/plug/requirejs/require-css.js'
-            }
-        },
-        shim:{
-            'iview':{
-                deps:['css!iviewcss']
-            },
-            'layer':{
-                deps:['css!layercss']
-            }
-        },
-        baseUrl:'//'+hostname+'/',
-        paths: {
-            'static':'static',
-            'system':'system',
-            'vue':'static/plug/vue/dist/vue.min',
-            'axios':'static/plug/axios.min',
-            'iview':'static/plug/iview/dist/iview.min',
-            'iviewcss':'static/plug/iview/dist/styles/iview',
-            'lodash':'static/plug/lodash',
-            'layer':'static/plug/layer/layer',
-            'layercss':'static/plug/layer/theme/default/layer',
-            'jquery':'static/plug/jquery/jquery.min',
-            'moment':'static/plug/moment',
-            'sweetalert':'static/plug/sweetalert2/sweetalert2.all.min',
-            'formCreate':'/static/plug/form-create/form-create.min',
+        .pictrueBox {
+            display: inline-block !important;
+        }
 
-        },
-        basket: {
-            excludes:['system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
-//            excludes:['system/util/mpFormBuilder','system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
+        .pictrue {
+            width: 60px;
+            height: 60px;
+            border: 1px dotted rgba(0, 0, 0, 0.1);
+            margin-right: 15px;
+            display: inline-block;
+            position: relative;
+            cursor: pointer;
         }
-    });
-</script>
-<script type="text/javascript" src="/system/util/mpFrame.js"></script>
-    
+
+        .pictrue img {
+            width: 100%;
+            height: 100%;
+        }
+
+        .upLoad {
+            width: 58px;
+            height: 58px;
+            line-height: 58px;
+            border: 1px dotted rgba(0, 0, 0, 0.1);
+            border-radius: 4px;
+            background: rgba(0, 0, 0, 0.02);
+            cursor: pointer;
+            display: flex;
+            justify-content: center;
+            align-items: center;
+        }
+
+        .rulesBox {
+            display: flex;
+            flex-wrap: wrap;
+            margin-left: 10px;
+        }
+
+        .layui-tab-content {
+            margin-top: 15px;
+        }
+
+        .ml110 {
+            margin: 18px 0 4px 110px;
+        }
+
+        .rules {
+            display: flex;
+        }
+
+        .rules-btn-sm {
+            height: 30px;
+            line-height: 30px;
+            font-size: 12px;
+            width: 109px;
+        }
+
+        .rules-btn-sm input {
+            width: 79% !important;
+            height: 84% !important;
+            padding: 0 10px;
+        }
+
+        .ml10 {
+            margin-left: 10px !important;
+        }
+
+        .ml40 {
+            margin-left: 40px !important;
+        }
+
+        .closes {
+            position: absolute;
+            left: 86%;
+            top: -18%;
+        }
+        .red {
+            color: red;
+        }
+        .layui-input-block .layui-video-box{
+            width: 22%;
+            height: 180px;
+            border-radius: 10px;
+            background-color: #707070;
+            margin-top: 10px;
+            position: relative;
+            overflow: hidden;
+        }
+        .layui-input-block .layui-video-box i{
+            color: #fff;
+            line-height: 180px;
+            margin: 0 auto;
+            width: 50px;
+            height: 50px;
+            display: inherit;
+            font-size: 50px;
+        }
+        .layui-input-block .layui-video-box .mark{
+            position: absolute;
+            width: 100%;
+            height: 30px;
+            top: 0;
+            background-color: rgba(0,0,0,.5);
+            text-align: center;
+        }
+        .store_box{
+            display: flex;
+        }
+        .info{
+            color: #c9c9c9;
+            padding-left: 10px;
+            line-height: 30px;
+        }
+    </style>
 </head>
-<body class="gray-bg">
-<div class="wrapper wrapper-content">
-
-<div class="row">
-    <div class="col-sm-12 panel panel-default" >
-        <div class="layui-card-header">
-            <span class="">竞拍场添加</span>
-            <button style="margin-left: 20px" type="button" class="layui-btn layui-btn-primary layui-btn-xs goBack">返回列表</button>
-        </div>
-        <div class="panel-body" style="padding: 30px">
-            <form class="form-horizontal" id="signupForm">
-                <div class="form-group">
-                    <div class="col-md-12">
-                        <div class="input-group">
-                            <span class="input-group-addon">名称</span>
-                            <input maxlength="50" style="width: 40%" placeholder="请在这里输入名称" name="title" class="layui-input" id="nickname" value="">
-                            <input type="hidden"  id="id" value="">
-                        </div>
-                    </div>
-                </div>
-                <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
-                    <div class="grid-demo grid-demo-bg1">
-                        <div class="layui-form-item">
-                            <label class="layui-form-label">商品规格<i class="red">*</i></label>
-                            <div class="layui-input-block">
-                                <input type="radio" name="status" value="0" title="使用"
-                                       lay-filter="spec_type"
-                                       :checked="formData.status == 0 ? true : false">
-                                <input type="radio" name="status" value="1" title="禁用"
-                                       lay-filter="spec_type"
-                                       :checked="formData.status == 1 ? true : false">
+<body>
+<div class="layui-fluid">
+    <div class="layui-row layui-col-space15"  id="app" v-cloak="">
+        <div class="layui-card">
+            <div class="layui-card-header">
+                <span class="">竞拍添加</span>
+                <button style="margin-left: 20px" type="button" class="layui-btn layui-btn-primary layui-btn-xs" @click="goBack">返回列表</button>
+            </div>
+            <div class="layui-card-body">
+                <form class="layui-form" action="" v-cloak="">
+                    <div class="layui-tab layui-tab-brief" lay-filter="docTabBrief">
+                        <div class="layui-tab-content">
+                            <div class="layui-tab-item layui-show">
+                                <div class="layui-row layui-col-space15">
+                                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
+                                        <div class="grid-demo grid-demo-bg1">
+                                            <div class="layui-form-item">
+                                                <label class="layui-form-label">商品名称<i class="red">*</i></label>
+                                                <div class="layui-input-block">
+                                                    <input type="text" name="nickname" lay-verify="title" autocomplete="off"
+                                                           placeholder="竞拍名称" class="layui-input" v-model="formData.nickname" maxlength="100">
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
+                                        <div class="grid-demo grid-demo-bg1">
+                                            <div class="layui-form-item">
+                                                <label class="layui-form-label">竞拍封面图<i class="red">*</i></label>
+                                                <div class="pictrueBox">
+                                                    <div class="pictrue" v-if="formData.image" @click="uploadImage('image')">
+                                                        <img :src="formData.image"></div>
+                                                    <div class="upLoad" @click="uploadImage('image')" v-else>
+                                                        <i class="layui-icon layui-icon-camera" class="iconfont"
+                                                           style="font-size: 26px;"></i>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                <div class="layui-row layui-col-space15">
+                                    <div class="layui-col-xs12 layui-col-sm4 layui-col-md4">
+                                        <div class="grid-demo grid-demo-bg1">
+                                            <div class="layui-form-item">
+                                                <label class="layui-form-label">商品状态</label>
+                                                <div class="layui-input-block">
+                                                    <input type="radio" name="status" lay-filter="status" value="1" title="上架"
+                                                           :checked="formData.status == 1 ? true : false">
+                                                    <input type="radio" name="status" lay-filter="status" value="0" title="下架"
+                                                           :checked="formData.status == 0 ? true : false">
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                                    <div class="layui-row layui-col-space15">
+                                        <div class="layui-col-xs12 layui-col-sm4 layui-col-md4">
+                                            <div class="grid-demo grid-demo-bg1">
+                                                <div class="layui-form-item">
+                                                    <label class="layui-form-label">预约时间<i class="red   ">*</i></label>
+                                                        <div class="layui-input-inline">
+                                                            <input type="text" class="layui-input" name="time" id="time" value="" placeholder="-">
+                                                        </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row layui-col-space15">
+                                        <div class="layui-col-xs12 layui-col-sm4 layui-col-md4">
+                                            <div class="grid-demo grid-demo-bg1">
+                                                <div class="layui-form-item">
+                                                    <label class="layui-form-label">进场时间<i class="red">*</i></label>
+                                                    <div class="layui-input-inline">
+                                                        <input type="text" class="layui-input" name="rtime" id="rtime" value="" placeholder="-">
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
+                                        <div class="grid-demo grid-demo-bg1">
+                                            <div class="layui-form-item">
+                                                <label class="layui-form-label">排序<i class="red">*</i></label>
+                                                <div class="layui-input-inline">
+                                                    <input type="number" name="sort" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.sort" maxlength="100" value="0">
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+
+
+                            </div>
+                            <div class="layui-tab-item">
+                                <div class="layui-row layui-col-space15">
+                                    <textarea type="text/plain" name="description" id="myEditor" style="width:100%;">{{formData.description}}</textarea>
+                                </div>
                             </div>
+
+
                         </div>
-                    </div>
-                </div>
-                <div class="form-actions">
-                    <div class="row">
-                        <div class="col-md-offset-4 col-md-9">
-                            <button type="button" class="btn btn-w-m btn-info save">保存</button>
+                        <div class="layui-tab-content">
+                            <div class="layui-row layui-col-space15">
+                                <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
+                                    <button class="layui-btn layui-btn-normal layui-btn-sm" id="submit" type="button" @click="handleSubmit()">提交</button>
+                                </div>
+                            </div>
                         </div>
                     </div>
-                </div>
-            </form>
+                </form>
+            </div>
         </div>
     </div>
 </div>
-<script src="/system/js/layuiList.js"></script>
-
+<script>
 
+    var id = <?php echo htmlentities($id); ?>;
+    layui.use('laydate', function(){
+        var laydate = layui.laydate;
 
-<script>
-    UM.registerUI('selectimgs',function(name){
-        var me = this;
-        var $btn = $.eduibutton({
-            icon : 'image',
-            click : function(){
-                createFrame('选择图片','<?php echo Url('widget.images/index'); ?>?fodder=editor');
-            },
-            title: '选择图片'
+        laydate.render({
+            elem: '#time'
+            ,type: 'time'
+            ,range: true
         });
-
-        this.addListener('selectionchange',function(){
-            //切换为不可编辑时,把自己变灰
-            var state = this.queryCommandState(name);
-            $btn.edui().disabled(state == -1).active(state == 1)
+        laydate.render({
+            elem: '#rtime'
+            ,type: 'time'
+            ,range: true
         });
-        return $btn;
-
-    });
-    //选择图片
-    function changeIMG(index,pic){
-        $(".image_img").css('background-image',"url("+pic+")");
-        $(".active").css('background-image',"url("+pic+")");
-        $('#image_input').val(pic);
-    }
-    //选择图片插入到编辑器中
-    function insertEditor(list){
-        console.log(list);
-        um.execCommand('insertimage', list);
-    }
-    /**
-     * 上传图片
-     * */
-    $('.upload_span').on('click',function (e) {
-//                $('.upload').trigger('click');
-        createFrame('选择图片','<?php echo Url('widget.images/index'); ?>?fodder=image');
     })
 
-    /**
-     * 编辑器上传图片
-     * */
-    $('.edui-icon-image').on('click',function (e) {
-//                $('.upload').trigger('click');
-        createFrame('选择图片','<?php echo Url('widget.images/index'); ?>?fodder=image');
-    })
+    new Vue({
+        el: '#app',
+        data: {
+            id:id,
+            //分类列表
+            cateList: [],
+            //运费模板
+            tempList: [],
+            upload:{
+                videoIng:false
+            },
+            formData: {
+                description: '',
+                status: '',
+                image:'',
+                time:'',
+                rtime:''
+            },
+            rule: { //多图选择规则
+                slider_image: {
+                    maxLength: 1
+                }
+            },
+            attr: [],//临时属性
+            newRule: false,//是否添加新规则
+            radioRule: ['status'],//radio 当选规则
+            ruleList:[],
+            ruleIndex:-1,
+            progress: 0,
+            um: null,//编译器实例化
+            form: null,//layui.form
+            layTabId: 1,
+            ruleBool: id ? true : false,
+        },
+        watch:{
+            'formData.is_sub':function (n) {
+                if (n == 1) {
+                    this.formHeader.push({title:'一级返佣(元)'});
+                    this.formHeader.push({title:'二级级返佣(元)'});
+                } else {
+                    this.formHeader.pop();
+                    this.formHeader.pop();
+                }
+            },
+            'formData.spec_type':function (n) {
+                if (n) {
+                    this.render();
+                }
+            },
+            // 'formData.image':function (n) {
+            //     if(!this.batchAttr.pic){
+            //         this.batchAttr.pic = n;
+            //     }
+            //     if(!this.formData.attr.pic){
+            //         this.formData.attr.pic = n;
+            //     }
+            // }
+        },
+        methods: {
+            back:function(){
+                var that = this;
+                layui.use(['element'], function () {
+                    layui.element.tabChange('docTabBrief', that.layTabId == 1 ? 1 : parseInt(that.layTabId) - 1);
+                });
+            },
+            next:function(){
+                var that = this;
+                layui.use(['element'], function () {
+                    layui.element.tabChange('docTabBrief', that.layTabId == 3 ? 3 : parseInt(that.layTabId) + 1);
+                });
+            },
+            goBack:function(){
+                location.href = this.U({c:'auction.auction',a:'index'});
+            },
+            U: function (opt) {
+                var m = opt.m || 'admin', c = opt.c || window.controlle || '', a = opt.a || 'index', q = opt.q || '',
+                    p = opt.p || {};
+                var params = Object. keys(p).map(function (key) {
+                    return key + '/' + p[key];
+                }).join('/');
+                var gets = Object.keys(q).map(function (key) {
+                    return key+'='+ q[key];
+                }).join('&');
 
-    $('.goBack').on('click', function (e) {
-        location.href = '<?php echo Url('auction.auction/index'); ?>';
-    })
+                return '/' + m + '/' + c + '/' + a + (params == '' ? '' : '/' + params) + (gets == '' ? '' : '?' + gets);
+            },
+            /**
+             * 提示
+             * */
+            showMsg: function (msg, success) {
+                $('#submit').removeAttr('disabled').text('提交');
+                layui.use(['layer'], function () {
+                    layui.layer.msg(msg, success);
+                });
+            },
+            addBrokerage:function(){
+                if (this.brokerage.brokerage >= 0 && this.brokerage.brokerage_two >= 0){
+                    var that = this;
+                    this.$set(this.formData,'attrs',this.formData.attrs.map(function (item) {
+                        item.brokerage = that.brokerage.brokerage;
+                        item.brokerage_two = that.brokerage.brokerage_two;
+                        return item;
+                    }));
+                } else {
+                    return this.showMsg('请填写返佣金额在进行批量添加');
+                }
+            },
+            batchClear:function(){
+                this.$set(this,'batchAttr',{
+                    pic: '',
+                    price: 0,
+                    cost: 0,
+                    ot_price: 0,
+                    stock: 0,
+                    bar_code: '',
+                    weight: 0,
+                    volume: 0,
+                });
+            },
+            /**
+             * 批量添加
+             * */
+            batchAdd:function(){
+                var that = this;
+                this.$set(this.formData,'attrs',this.formData.attrs.map(function (item) {
+                    if (that.batchAttr.pic) {
+                        item.pic = that.batchAttr.pic;
+                    }
+                    if (that.batchAttr.price > 0){
+                        item.price = that.batchAttr.price;
+                    }
+                    if (that.batchAttr.cost > 0){
+                        item.cost = that.batchAttr.cost;
+                    }
+                    if (that.batchAttr.ot_price > 0){
+                        item.ot_price = that.batchAttr.ot_price;
+                    }
+                    if (that.batchAttr.stock > 0){
+                        item.stock = that.batchAttr.stock;
+                    }
+                    if (that.batchAttr.bar_code != ''){
+                        item.bar_code = that.batchAttr.bar_code;
+                    }
+                    if (that.batchAttr.weight > 0){
+                        item.weight = that.batchAttr.weight;
+                    }
+                    if (that.batchAttr.volume > 0){
+                        item.volume = that.batchAttr.volume;
+                    }
+                    return item;
+                }));
 
-    /**
-     * 提交图文
-     * */
-    $('.save').on('click',function(e){
-        var nickname = $('#nickname').val();
-        console.log(nickname);
-    })
+            },
+            /**
+             * 获取商品信息
+             * */
+            getProductInfo: function () {
+                var that = this;
+                that.requestGet(that.U({c:"store.StoreProduct",a:'get_product_info',q:{id:that.id}})).then(function (res) {
+                    that.$set(that,'cateList',res.data.cateList);
+                    that.$set(that,'tempList',res.data.tempList);
+                    var productInfo = res.data.productInfo || {};
+                    if(productInfo.id && that.id){
+                        that.$set(that,'formData',productInfo);
+                        that.generate();
+                    }
+                    that.getRuleList();
+                    that.init();
+                }).catch(function (res) {
+                    that.showMsg(res.msg);
+                })
+            },
+            /**
+             * 给某个属性添加属性值
+             * @param item
+             * */
+            addDetail: function (item) {
+                if (!item.detailValue) return false;
+                if (item.detail.find(function (val) {
+                    if(item.detailValue == val){
+                        return true;
+                    }
+                })) {
+                    return this.showMsg('添加的属性值重复');
+                }
+                item.detail.push(item.detailValue);
+                item.detailValue = '';
+            },
+            /**
+             * 删除某个属性值
+             * @param item 父级循环集合
+             * @param inx 子集index
+             * */
+            deleteValue: function (item, inx) {
+                if (item.detail.length > 1) {
+                    item.detail.splice(inx, 1);
+                } else {
+                    return this.showMsg('请设置至少一个属性');
+                }
+            },
+            /**
+             * 删除某条属性
+             * @param index
+             * */
+            deleteItem: function (index) {
+                this.formData.items.splice(index, 1);
+            },
+            /**
+             * 删除某条属性
+             * @param index
+             * */
+            deleteAttrs: function (index) {
+                var that = this;
+                if(that.id > 0){
+                    that.requestGet(that.U({c:"store.StoreProduct",a:'check_activity',q:{id:that.id}})).then(function (res) {
+                        that.showMsg(res.msg);
+                    }).catch(function (res) {
+                        if (that.formData.attrs.length > 1) {
+                            that.formData.attrs.splice(index, 1);
+                        } else {
+                            return that.showMsg('请设置至少一个规则');
+                        }
+                    })
+                }else{
+                    if (that.formData.attrs.length > 1) {
+                        that.formData.attrs.splice(index, 1);
+                    } else {
+                        return that.showMsg('请设置至少一个规则');
+                    }
+                }
+            },
+            /**
+             * 创建属性
+             * */
+            createAttrName: function () {
+                if (this.formDynamic.attrsName && this.formDynamic.attrsVal) {
+                    if (this.formData.items.find(function (val) {
+                        if (val.value == this.formDynamic.attrsName) {
+                            return true;
+                        }
+                    }.bind(this))) {
+                        return this.showMsg('添加的属性重复');
+                    }
+                    this.formData.items.push({
+                        value: this.formDynamic.attrsName,
+                        detailValue: '',
+                        attrHidden: false,
+                        detail: [this.formDynamic.attrsVal]
+                    });
+                    this.formDynamic.attrsName = '';
+                    this.formDynamic.attrsVal = '';
+                    this.newRule = false;
+                } else {
+                    return this.showMsg('请添加完整的规格!');
+                }
+            },
+            /**
+             * 删除图片
+             * */
+            deleteImage: function (key, index) {
+                var that = this;
+                if (index != undefined) {
+                    that.formData[key].splice(index, 1);
+                    that.$set(that.formData, key, that.formData[key]);
+                } else {
+                    that.$set(that.formData, key, '');
+                }
+            },
+            createFrame: function (title, src, opt) {
+                opt === undefined && (opt = {});
+                var h = 0;
+                if (window.innerHeight < 800 && window.innerHeight >= 700) {
+                    h = window.innerHeight - 50;
+                } else if (window.innerHeight < 900 && window.innerHeight >= 800) {
+                    h = window.innerHeight - 100;
+                } else if (window.innerHeight < 1000 && window.innerHeight >= 900) {
+                    h = window.innerHeight - 150;
+                } else if (window.innerHeight >= 1000) {
+                    h = window.innerHeight - 200;
+                } else {
+                    h = window.innerHeight;
+                }
+                var area = [(opt.w || window.innerWidth / 2) + 'px', (!opt.h || opt.h > h ? h : opt.h) + 'px'];
+                layui.use('layer',function () {
+                    return layer.open({
+                        type: 2,
+                        title: title,
+                        area: area,
+                        fixed: false, //不固定
+                        maxmin: true,
+                        moveOut: false,//true  可以拖出窗外  false 只能在窗内拖
+                        anim: 5,//出场动画 isOutAnim bool 关闭动画
+                        offset: 'auto',//['100px','100px'],//'auto',//初始位置  ['100px','100px'] t[ 上 左]
+                        shade: 0,//遮罩
+                        resize: true,//是否允许拉伸
+                        content: src,//内容
+                        move: '.layui-layer-title'
+                    });
+                });
+            },
+            changeIMG: function (name, value) {
+                if (this.getRule(name).maxLength !== undefined) {
+                    var that = this;
+                    value.map(function (v) {
+                        that.formData[name].push(v);
+                    });
+                    this.$set(this.formData, name, this.formData[name]);
+                } else {
+                    if(name == 'batchAttr.pic'){
+                        this.batchAttr.pic = value;
+                    } else {
+                        if (name.indexOf('.') !== -1) {
+                            var key = name.split('.');
+                            if (key.length == 2){
+                                this.formData[key[0]][key[1]] = value;
+                            } else if(key.length == 3){
+                                this.formData[key[0]][key[1]][key[2]] = value;
+                            } else if(key.length == 4){
+                                this.$set(this.formData[key[0]][key[1]][key[2]],key[3],value)
+                            }
+                        } else {
+                            this.formData[name] = value;
+                        }
+                    }
+                }
+            },
+            getRule: function (name) {
+                return this.rule[name] || {};
+            },
+            uploadImage: function (name) {
+                return this.createFrame('选择图片',this.U({c:"widget.images",a:'index',p:{fodder:name}}),{h:545,w:900});
+            },
+            uploadVideo: function () {
+                if (this.videoLink) {
+                    this.formData.video_link = this.videoLink;
+                } else {
+                    $(this.$refs.filElem).click();
+                }
+            },
+            delVideo: function () {
+                var that = this;
+                that.$set(that.formData, 'video_link', '');
+            },
+            insertEditor: function (list) {
+                this.um.execCommand('insertimage', list);
+            },
+            insertEditorVideo: function (src) {
+                this.um.setContent('<div><video style="width: 99%" src="'+src+'" class="video-ue" controls="controls" width="100"><source src="'+src+'"></source></video></div><br>',true);
+            },
+            getContent: function () {
+                return this.um.getContent();
+            },
+            /**
+             * 监听radio字段
+             */
+            eeventRadio: function () {
+                var that = this;
+                that.radioRule.map(function (val) {
+                    that.form.on('radio(' + val + ')', function (res) {
+                        that.formData[val] = res.value;
+                    });
+                })
+            },
+            init: function () {
+                var that = this;
+                window.UMEDITOR_CONFIG.toolbar = [
+                    // 加入一个 test
+                    'source | undo redo | bold italic underline strikethrough | superscript subscript | forecolor backcolor | removeformat |',
+                    'insertorderedlist insertunorderedlist | selectall cleardoc paragraph | fontfamily fontsize',
+                    '| justifyleft justifycenter justifyright justifyjustify |',
+                    'link unlink | emotion selectimgs video  | map',
+                    '| horizontal print preview fullscreen', 'drafts', 'formula'
+                ];
+                UM.registerUI('selectimgs', function (name) {
+                    var me = this;
+                    var $btn = $.eduibutton({
+                        icon: 'image',
+                        click: function () {
+                            that.createFrame('选择图片', "<?php echo Url('widget.images/index',['fodder'=>'editor']); ?>");
+                        },
+                        title: '选择图片'
+                    });
 
-</script>
+                    this.addListener('selectionchange', function () {
+                        //切换为不可编辑时,把自己变灰
+                        var state = this.queryCommandState(name);
+                        $btn.edui().disabled(state == -1).active(state == 1)
+                    });
+                    return $btn;
 
+                });
+                UM.registerUI('video', function (name) {
+                    var me = this;
+                    var $btn = $.eduibutton({
+                        icon: 'video',
+                        click: function () {
+                            that.createFrame('选择视频', "<?php echo Url('widget.video/index',['fodder'=>'video']); ?>");
+                        },
+                        title: '选择视频'
+                    });
 
-</div>
+                    this.addListener('selectionchange', function () {
+                        //切换为不可编辑时,把自己变灰
+                        var state = this.queryCommandState(name);
+                        $btn.edui().disabled(state == -1).active(state == 1)
+                    });
+                    return $btn;
+
+                });
+                //实例化编辑器
+                this.um = UM.getEditor('myEditor', {initialFrameWidth: '99%', initialFrameHeight: 400});
+                this.um.setContent(that.formData.description);
+                that.$nextTick(function () {
+                    layui.use(['form','element'], function () {
+                        that.form = layui.form;
+                        that.form.render();
+                        that.form.on('select(temp_id)', function (data) {
+                            that.$set(that.formData, 'temp_id', data.value);
+                        });
+                        that.form.on('select(rule_index)', function (data) {
+                            that.ruleIndex = data.value;
+                        });
+                        layui.element.on('tab(docTabBrief)', function(){
+                            that.layTabId = this.getAttribute('lay-id');
+                        });
+                        that.eeventRadio();
+                    });
+
+                    layui.config({
+                        base : '/static/plug/layui/'
+                    }).extend({
+                        selectN: './selectN',
+                    }).use('selectM',function () {
+                        var selectM = layui.selectM;
+                        selectM({
+                            //元素容器【必填】
+                            elem: '#id'
+                            //候选数据【必填】
+                            ,data: that.cateList
+                            //默认值
+                            ,selected: that.formData.id || []
+                            //最多选中个数,默认5
+                            ,max : 10
+                            ,name: 'id'
+                            ,model: 'formData.id'
+                            //值的分隔符
+                            ,delimiter: ','
+                            //候选项数据的键名
+                            ,field: {idName:'value',titleName:'label',statusName:'disabled'}
+                        });
+                    });
+                })
+            },
+            requestPost: function (url, data) {
+                return new Promise(function (resolve, reject) {
+                    axios.post(url, data).then(function (res) {
+                        if (res.status == 200 && res.data.code == 200) {
+                            resolve(res.data)
+                        } else {
+                            reject(res.data);
+                        }
+                    }).catch(function (err) {
+                        reject({msg:err})
+                    });
+                })
+            },
+            requestGet: function (url) {
+                return new Promise(function (resolve, reject) {
+                    axios.get(url).then(function (res) {
+                        if (res.status == 200 && res.data.code == 200) {
+                            resolve(res.data)
+                        } else {
+                            reject(res.data);
+                        }
+                    }).catch(function (err) {
+                        reject({msg:err})
+                    });
+                })
+            },
+            generates: function () {
+                var that = this;
+                that.generate(1);
+            },
+            generate: function (type = 0) {
+                var that = this;
+                this.requestPost(that.U({c:"store.StoreProduct",a:'is_format_attr',p:{id:that.id,type:type}}), {attrs:this.formData.items}).then(function (res) {
+                    that.$set(that.formData, 'attrs', res.data.value);
+                    that.$set(that, 'formHeader', res.data.header);
+                    if (that.id && that.formData.is_sub == 1 && that.formData.spec_type == 1) {
+                        that.formHeader.push({title:'一级返佣(元)'});
+                        that.formHeader.push({title:'二级级返佣(元)'});
+                    }
+                }).catch(function (res) {
+                    return that.showMsg(res.msg);
+                });
+            },
+            handleSubmit:function () {
+                var that = this;
+                var time = $('#time').val();
+                var rtime = $('#rtime').val();
+                that.formData.time = time;
+                that.formData.rtime = rtime;
+                if (!that.formData['nickname']){
+                    return that.showMsg('请填写名称');
+                }
+                if (!that.formData['image']){
+                    return that.showMsg('请上传图片');
+                }
+
+                if (!that.formData['time']){
+                    return that.showMsg('请选择预约时间');
+                }
+                if (!that.formData['rtime']){
+                    return that.showMsg('请选择进场时间');
+                }
+                $('#submit').attr('disabled', 'disabled').text('保存中...');
+                that.requestPost(that.U({c:'auction.auction',a:'save',p:{id:that.id}}),that.formData).then(function (res) {
+                    that.confirm();
+                }).catch(function (res) {
+                    that.showMsg(res.msg);
+                });
+
+            },
+            confirm: function(){
+                var that = this;
+                layui.use(['layer'], function () {
+                    var layer = layui.layer;
+                    layer.confirm(that.id ? '修改成功是否返回产品列表' : '添加成功是否返回产品列表', {
+                        btn: ['返回列表',that.id ? '继续修改' : '继续添加'] //按钮
+                    }, function(){
+                        location.href = that.U({c:'auction.auction',a:'index'});
+                    }, function(){
+                        location.reload();
+                    });
+                });
+            },
+            render:function(){
+                this.$nextTick(function(){
+                    layui.use(['form'], function () {
+                        layui.form.render('select');
+                    });
+                })
+            },
+            // 移动
+            handleDragStart (e, item) {
+                this.dragging = item;
+            },
+            handleDragEnd (e, item) {
+                this.dragging = null
+            },
+            handleDragOver (e) {
+                e.dataTransfer.dropEffect = 'move'
+            },
+            handleDragEnter (e, item) {
+                e.dataTransfer.effectAllowed = 'move'
+                if (item === this.dragging) {
+                    return
+                }
+                var newItems = [...this.formData.activity];
+                var src = newItems.indexOf(this.dragging);
+                var dst = newItems.indexOf(item);
+                newItems.splice(dst, 0, ...newItems.splice(src, 1))
+                this.formData.activity = newItems;
+            },
+            getRuleList:function (type) {
+                var that = this;
+                that.requestGet(that.U({c:'store.StoreProduct',a:'get_rule'})).then(function (res) {
+                    that.$set(that,'ruleList',res.data);
+                    if(type !== undefined){
+                        that.render();
+                    }
+                });
+            },
+            addRule:function(){
+                return this.createFrame('添加商品规则',this.U({c:'store.StoreProductRule',a:'create'}));
+            },
+            allRule:function () {
+                if (this.ruleIndex != -1) {
+                    var rule = this.ruleList[this.ruleIndex];
+                    if (rule) {
+                        this.ruleBool = true;
+                        var rule_value = rule.rule_value.map(function (item) {
+                            return item;
+                        });
+                        this.$set(this.formData,'items',rule_value);
+                        this.$set(this.formData,'attrs',[]);
+                        this.$set(this,'formHeader',[]);
+                        return true;
+                    }
+                }
+                this.showMsg('选择的属性无效');
+            }
+        },
+        mounted: function () {
+            var that = this;
+            axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
+            that.getProductInfo();
+            window.$vm = that;
+            window.changeIMG = that.changeIMG;
+            window.insertEditor = that.insertEditor;
+            window.insertEditorVideo = that.insertEditorVideo;
+            window.successFun = function(){
+                that.getRuleList(1);
+            }
+            $(that.$refs.filElem).change(function () {
+                var inputFile = this.files[0];
+                that.requestPost(that.U({c:"widget.video",a:'get_signature'})).then(function (res) {
+                    AdminUpload.upload(res.data.uploadType,{
+                        token: res.data.uploadToken || '',
+                        file: inputFile,
+                        accessKeyId: res.data.accessKey || '',
+                        accessKeySecret: res.data.secretKey || '',
+                        bucketName: res.data.storageName || '',
+                        region: res.data.storageRegion || '',
+                        domain: res.data.domain || '',
+                        uploadIng:function (progress) {
+                            that.upload.videoIng = true;
+                            that.progress = progress;
+                        }
+                    }).then(function (res) {
+                        //成功
+                        that.$set(that.formData, 'video_link', res.url);
+                        that.progress = 0;
+                        that.upload.videoIng = false;
+                        return that.showMsg('上传成功');
+                    }).catch(function (err) {
+                        //失败
+                        console.info(err);
+                        return that.showMsg('上传错误请检查您的配置');
+                    });
+                }).catch(function (res) {
+                    return that.showMsg(res.msg || '获取密钥失败,请检查您的配置');
+                });
+            })
+        }
+    });
+</script>
 </body>
 </html>
+<script>
+    import Layout from "../../../../../public/static/plug/iview/dist/iview";
+    export default {
+        components: {Layout}
+    }
+</script>

+ 359 - 0
runtime/admin/temp/bfcfe4fc86e1ea7546f6eec7a56bc4e7.php

@@ -0,0 +1,359 @@
+<?php /*a:5:{s:63:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\wechat\menus\index.php";i:1595820902;s:61:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\container.php";i:1595820902;s:62:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_head.php";i:1595820902;s:57:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\style.php";i:1595820902;s:64:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_footer.php";i:1595820902;}*/ ?>
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+    
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <?php if(empty($is_layui) || (($is_layui instanceof \think\Collection || $is_layui instanceof \think\Paginator ) && $is_layui->isEmpty())): ?>
+    <link href="/system/frame/css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
+    <?php endif; ?>
+    <link href="/static/plug/layui/css/layui.css" rel="stylesheet">
+    <link href="/system/css/layui-admin.css" rel="stylesheet">
+    <link href="/system/frame/css/font-awesome.min.css?v=4.3.0" rel="stylesheet">
+    <link href="/system/frame/css/animate.min.css" rel="stylesheet">
+    <link href="/system/frame/css/style.min.css?v=3.0.0" rel="stylesheet">
+    <script src="/system/frame/js/jquery.min.js"></script>
+    <script src="/system/frame/js/bootstrap.min.js"></script>
+    <script src="/static/plug/layui/layui.all.js"></script>
+    <script>
+        $eb = parent._mpApi;
+        window.controlle="<?php echo strtolower(trim(preg_replace("/[A-Z]/", "_\\0", app('request')->controller()), "_"));?>";
+        window.module="<?php echo app('http')->getName();?>";
+    </script>
+
+
+
+    <title></title>
+    
+<link rel="stylesheet" type="text/css" href="/system/css/main.css" />
+<link href="/system/frame/css/plugins/iCheck/custom.css" rel="stylesheet">
+
+    <!--<script type="text/javascript" src="/static/plug/basket.js"></script>-->
+<script type="text/javascript" src="/static/plug/requirejs/require.js"></script>
+<?php /*  <script type="text/javascript" src="/static/plug/requirejs/require-basket-load.js"></script>  */ ?>
+<script>
+    var hostname = location.hostname;
+    if(location.port) hostname += ':' + location.port;
+    requirejs.config({
+        map: {
+            '*': {
+                'css': '/static/plug/requirejs/require-css.js'
+            }
+        },
+        shim:{
+            'iview':{
+                deps:['css!iviewcss']
+            },
+            'layer':{
+                deps:['css!layercss']
+            }
+        },
+        baseUrl:'//'+hostname+'/',
+        paths: {
+            'static':'static',
+            'system':'system',
+            'vue':'static/plug/vue/dist/vue.min',
+            'axios':'static/plug/axios.min',
+            'iview':'static/plug/iview/dist/iview.min',
+            'iviewcss':'static/plug/iview/dist/styles/iview',
+            'lodash':'static/plug/lodash',
+            'layer':'static/plug/layer/layer',
+            'layercss':'static/plug/layer/theme/default/layer',
+            'jquery':'static/plug/jquery/jquery.min',
+            'moment':'static/plug/moment',
+            'sweetalert':'static/plug/sweetalert2/sweetalert2.all.min',
+            'formCreate':'/static/plug/form-create/form-create.min',
+
+        },
+        basket: {
+            excludes:['system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
+//            excludes:['system/util/mpFormBuilder','system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
+        }
+    });
+</script>
+<script type="text/javascript" src="/system/util/mpFrame.js"></script>
+    
+</head>
+<body class="gray-bg">
+<div class="wrapper wrapper-content">
+
+<div id="app" class="row">
+    <div class="col-sm-12">
+        <div class="wechat-reply-wrapper wechat-menu">
+            <div class="ibox-content clearfix">
+                <div class="view-wrapper col-sm-4">
+                    <div class="mobile-header">公众号</div>
+                    <section class="view-body">
+                        <div class="time-wrapper"><span class="time">9:36</span></div>
+                    </section>
+                    <div class="menu-footer">
+                        <ul class="flex">
+                            <li v-for="(menu, index) in menus" :class="{active:menu === checkedMenu}">
+                                  <span @click="activeMenu(menu,index,null)"><i class="icon-sub"></i>{{ menu.name || '一级菜单' }}</span>
+                                  <div class="sub-menu">
+                                      <ul>
+                                          <li v-for="(child, cindex) in menu.sub_button" :class="{active:child === checkedMenu}">
+                                              <span @click="activeMenu(child,cindex,index)">{{ child.name || '二级菜单' }}</span>
+                                          </li>
+                                          <li v-if="menu.sub_button.length < 5" @click="addChild(menu,index)"><i class="icon-add"></i></li>
+                                      </ul>
+                                  </div>
+                              </li>
+                            <li v-if="menus.length < 3" @click="addMenu()"><i class="icon-add"></i></li>
+                        </ul>
+                    </div>
+                </div>
+                <div class="control-wrapper menu-control col-sm-8" v-show="checkedMenuId !== null">
+                    <section>
+                        <div class="control-main">
+                            <h3 class="popover-title">菜单名称 <a class="fr" href="javascript:void(0);" @click="delMenu">删除</a></h3>
+                            <p class="tips-txt">已添加子菜单,仅可设置菜单名称。</p>
+                            <div class="menu-content control-body">
+                                <form action="">
+                                    <div class="form-group clearfix">
+                                        <label for="" class="col-sm-2">菜单名称</label>
+                                        <div class="col-sm-9 group-item">
+                                            <input type="text" placeholder="菜单名称" class="form-control" v-model="checkedMenu.name">
+                                            <span>字数不超过13个汉字或40个字母</span>
+                                        </div>
+                                    </div>
+                                    <div class="form-group clearfix">
+                                        <label class="col-sm-2 control-label tips" for="">规则状态</label>
+                                        <div class="group-item col-sm-9">
+                                            <select class="form-control m-b" name="" id="" v-model="checkedMenu.type">
+                                                <?php /*  <option value="text">文字消息</option>  */ ?>
+                                                <option value="click">关键字</option>
+                                                <option value="view">跳转网页</option>
+                                               <?php /*   <option value="feat">事件功能</option>  */ ?>
+                                                <option value="miniprogram">小程序</option>
+                                            </select>
+                                        </div>
+                                    </div>
+                                    <div class="menu-control-box">
+                                        <!-- 文字消息 -->
+                                       <?php /*   <div class="text-box item" :class="{show:checkedMenu.type=='text'}">
+                                              <p>回复内容</p>
+                                              <textarea v-model="checkedMenu.content" cols="60" rows="10" placeholder="请输入回复内容"></textarea>
+                                          </div>  */ ?>
+                                        <!-- 关键字 -->
+                                        <div class="keywords item" :class="{show:checkedMenu.type=='click'}">
+                                            <p>关键字</p>
+                                            <input type="text" placeholder="请输入关键字" class="form-control" v-model="checkedMenu.key">
+
+                                        </div>
+                                        <!-- 跳转地址 -->
+                                        <div class="url item" :class="{show:checkedMenu.type=='view'}">
+                                            <p>跳转地址</p>
+                                            <input type="text" v-model="checkedMenu.url" placeholder="请输入跳转地址" class="form-control">
+                                            <p class="text-left"></p>
+                                            <div class="well well-lg">
+                                                    <span class="help-block m-b-none">首页:<?php echo htmlentities(app('request')->domain()); ?></span>
+                                                    <span class="help-block m-b-none">个人中心:<?php echo htmlentities(app('request')->domain()); ?>/user</span>
+                                            </div>
+
+                                        </div>
+                                        <!-- 事件功能 -->
+                                        <?php /*  <div class="feat-select item" :class="{show:type=='feat'}">
+                                              <div class="radio i-checks" style="display:block">
+                                                  <label class="" style="padding-left: 0;">
+                                                      <div class="iradio_square-green" style="position: relative;">
+                                                          <div class="iradio_square-green" style="position: relative;">
+                                                          <input checked="checked" type="radio" value="2" name="feat" style="position: absolute; opacity: 0;"></div>
+                                                      </div>
+                                                      <i></i>扫码推事件
+                                                  </label>
+                                              </div>
+                                              <div class="radio i-checks" style="display:block">
+                                                  <label class="" style="padding-left: 0;">
+                                                      <div class="iradio_square-green" style="position: relative;">
+                                                          <div class="iradio_square-green" style="position: relative;"><input type="radio" value="2" name="feat" style="position: absolute; opacity: 0;"></div>
+                                                      </div>
+                                                      <i></i>扫码推事件且弹出“消息接收中”提示框
+                                                  </label>
+                                              </div>
+                                              <div class="radio i-checks" style="display:block">
+                                                  <label class="" style="padding-left: 0;">
+                                                      <div class="iradio_square-green" style="position: relative;">
+                                                          <div class="iradio_square-green" style="position: relative;"><input type="radio" value="2" name="feat" style="position: absolute; opacity: 0;"></div>
+                                                      </div>
+                                                      <i></i>弹出系统拍照发图
+                                                  </label>
+                                              </div>
+                                              <div class="radio i-checks" style="display:block">
+                                                  <label class="" style="padding-left: 0;">
+                                                      <div class="iradio_square-green" style="position: relative;">
+                                                          <div class="iradio_square-green" style="position: relative;"><input type="radio" value="2" name="feat" style="position: absolute; opacity: 0;"></div>
+                                                      </div>
+                                                      <i></i>弹出拍照或者相册发图
+                                                  </label>
+                                              </div>
+                                              <div class="radio i-checks" style="display:block">
+                                                  <label class="" style="padding-left: 0;">
+                                                      <div class="iradio_square-green" style="position: relative;">
+                                                          <div class="iradio_square-green" style="position: relative;"><input type="radio" value="2" name="feat" style="position: absolute; opacity: 0;"></div>
+                                                      </div>
+                                                      <i></i>弹出微信相册发图器
+                                                  </label>
+                                              </div>
+                                              <div class="radio i-checks" style="display:block">
+                                                  <label class="" style="padding-left: 0;">
+                                                      <div class="iradio_square-green" style="position: relative;">
+                                                          <div class="iradio_square-green" style="position: relative;"><input type="radio" value="2" name="feat" style="position: absolute; opacity: 0;"></div>
+                                                      </div>
+                                                      <i></i>弹出地理位置选择器
+                                                  </label>
+                                              </div>
+                                          </div>  */ ?>
+                                        <!-- 小程序 -->
+                                        <div class="wrchat-app item" :class="{show:checkedMenu.type=='miniprogram'}">
+                                            <div class="list">
+                                                <p>appid</p>
+                                                <input class="form-control" v-model="checkedMenu.appid" type="text" />
+                                            </div>
+                                            <div class="list">
+                                                <p>备用网页url</p>
+                                                <input class="form-control" v-model="checkedMenu.url" type="text" />
+                                            </div>
+                                            <div class="list">
+                                                <p>小程序路径</p>
+                                                <input class="form-control" v-model="checkedMenu.pagepath" type="text" />
+                                            </div>
+                                        </div>
+                                        <!-- 多客服 -->
+                                        <div class="service item">
+                                            <p>回复内容</p>
+                                            <textarea  cols="60" rows="10"></textarea>
+                                        </div>
+                                    </div>
+                                </form>
+                            </div>
+                        </div>
+                    </section>
+                </div>
+            </div>
+            <div class="ibox-content submit">
+                <button class="btn btn-w-m btn-primary" @click="submit">保存发布</button>
+            </div>
+        </div>
+    </div>
+</div>
+
+
+
+<script src="/system/frame/js/plugins/iCheck/icheck.min.js"></script>
+<script src="/system/frame/js/bootstrap.min.js"></script>
+<script src="/system/frame/js/content.min.js"></script>
+<script src="/static/plug/reg-verify.js"></script>
+<script type="text/javascript">
+    $eb = parent._mpApi;
+    $eb.mpFrame.start(function(Vue){
+        var $http = $eb.axios;
+        const vm = new Vue({
+            data:{
+                menus:<?=$menus?>,
+                checkedMenu:{
+                    type:'click',
+                    name:''
+                },
+                checkedMenuId:null,
+                parentMenuId:null
+            },
+            methods:{
+                defaultMenusData:function(){
+                    return {
+                        type:'click',
+                        name:'',
+                        sub_button:[]
+                    };
+                },
+                defaultChildData:function(){
+                    return {
+                        type:'click',
+                        name:''
+                    };
+                },
+                addMenu:function(){
+                    if(!this.check()) return false;
+                    var data = this.defaultMenusData(),id = this.menus.length;
+                    this.menus.push(data);
+                    this.checkedMenu = data;
+                    this.checkedMenuId = id;
+                    this.parentMenuId = null;
+                },
+                addChild:function(menu,index){
+                    if(!this.check()) return false;
+                    var data = this.defaultChildData(),id = menu.sub_button.length;
+                    menu.sub_button.push(data);
+                    this.checkedMenu = data;
+                    this.checkedMenuId = id;
+                    this.parentMenuId = index;
+                },
+                delMenu:function(){
+                    console.log(this.parentMenuId);
+                    this.parentMenuId === null ?
+                        this.menus.splice(this.checkedMenuId,1) : this.menus[this.parentMenuId].sub_button.splice(this.checkedMenuId,1);
+                    this.parentMenuId = null;
+                    this.checkedMenu = {};
+                    this.checkedMenuId = null;
+                },
+                activeMenu:function(menu,index,pid){
+                    if(!this.check()) return false;
+                    pid === null ?
+                        (this.checkedMenu = menu) : (this.checkedMenu = this.menus[pid].sub_button[index],this.parentMenuId = pid);
+                    this.checkedMenuId=index
+                },
+                check:function(){
+                    if(this.checkedMenuId === null) return true;
+                    if(!this.checkedMenu.name){
+                        $eb.message('请输入按钮名称!');
+                        return false;
+                    }
+                    if(this.checkedMenu.type == 'click' && !this.checkedMenu.key){
+                        $eb.message('请输入关键字!');
+                        return false;
+                    }
+                    if(this.checkedMenu.type == 'view' && !$reg.isHref(this.checkedMenu.url)){
+                        $eb.message('请输入正确的跳转地址!');
+                        return false;
+                    }
+                    if(this.checkedMenu.type == 'miniprogram'
+                        && (!this.checkedMenu.appid
+                        || !this.checkedMenu.pagepath
+                        || !this.checkedMenu.url)){
+                        $eb.message('请填写完整小程序配置!');
+                        return false;
+                    }
+                    return true;
+                },
+                submit:function(){
+                    if(!this.menus.length){
+                        $eb.message('error','请添加菜单!');
+                        return false;
+                    }
+                    $http.post("<?php echo url('wechat.menus/save',array('dis'=>1)); ?>",{button:this.menus}).then(function (res) {
+                        if(res.status == 200 && res.data.code == 200)
+                            $eb.message('success','发布菜单成功!');
+                        else
+                            return Promise.reject(res.data.msg || '发布菜单失败!');
+                    }).catch(function(err){
+                        $eb.message('error',err);
+                    })
+                }
+            },
+            mounted:function(){
+                window.vm = this;
+            }
+        });
+        vm.$mount(document.getElementById('app'));
+    });
+    $('.i-checks').iCheck({
+        checkboxClass: 'icheckbox_square-green',
+        radioClass: 'iradio_square-green',
+    });
+</script>
+
+
+</div>
+</body>
+</html>

+ 377 - 0
runtime/admin/temp/c5ee2fca9ee5a418de10d4105e0048bd.php

@@ -0,0 +1,377 @@
+<?php /*a:6:{s:71:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\finance\user_extract\index.php";i:1595820902;s:61:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\container.php";i:1595820902;s:62:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_head.php";i:1595820902;s:57:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\style.php";i:1595820902;s:62:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\inner_page.php";i:1595820902;s:64:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_footer.php";i:1595820902;}*/ ?>
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+    
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <?php if(empty($is_layui) || (($is_layui instanceof \think\Collection || $is_layui instanceof \think\Paginator ) && $is_layui->isEmpty())): ?>
+    <link href="/system/frame/css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
+    <?php endif; ?>
+    <link href="/static/plug/layui/css/layui.css" rel="stylesheet">
+    <link href="/system/css/layui-admin.css" rel="stylesheet">
+    <link href="/system/frame/css/font-awesome.min.css?v=4.3.0" rel="stylesheet">
+    <link href="/system/frame/css/animate.min.css" rel="stylesheet">
+    <link href="/system/frame/css/style.min.css?v=3.0.0" rel="stylesheet">
+    <script src="/system/frame/js/jquery.min.js"></script>
+    <script src="/system/frame/js/bootstrap.min.js"></script>
+    <script src="/static/plug/layui/layui.all.js"></script>
+    <script>
+        $eb = parent._mpApi;
+        window.controlle="<?php echo strtolower(trim(preg_replace("/[A-Z]/", "_\\0", app('request')->controller()), "_"));?>";
+        window.module="<?php echo app('http')->getName();?>";
+    </script>
+
+
+
+    <title></title>
+    
+<link rel="stylesheet" href="/static/plug/daterangepicker/daterangepicker.css">
+<script src="/static/plug/moment.js"></script>
+<script src="/static/plug/daterangepicker/daterangepicker.js"></script>
+
+    <!--<script type="text/javascript" src="/static/plug/basket.js"></script>-->
+<script type="text/javascript" src="/static/plug/requirejs/require.js"></script>
+<?php /*  <script type="text/javascript" src="/static/plug/requirejs/require-basket-load.js"></script>  */ ?>
+<script>
+    var hostname = location.hostname;
+    if(location.port) hostname += ':' + location.port;
+    requirejs.config({
+        map: {
+            '*': {
+                'css': '/static/plug/requirejs/require-css.js'
+            }
+        },
+        shim:{
+            'iview':{
+                deps:['css!iviewcss']
+            },
+            'layer':{
+                deps:['css!layercss']
+            }
+        },
+        baseUrl:'//'+hostname+'/',
+        paths: {
+            'static':'static',
+            'system':'system',
+            'vue':'static/plug/vue/dist/vue.min',
+            'axios':'static/plug/axios.min',
+            'iview':'static/plug/iview/dist/iview.min',
+            'iviewcss':'static/plug/iview/dist/styles/iview',
+            'lodash':'static/plug/lodash',
+            'layer':'static/plug/layer/layer',
+            'layercss':'static/plug/layer/theme/default/layer',
+            'jquery':'static/plug/jquery/jquery.min',
+            'moment':'static/plug/moment',
+            'sweetalert':'static/plug/sweetalert2/sweetalert2.all.min',
+            'formCreate':'/static/plug/form-create/form-create.min',
+
+        },
+        basket: {
+            excludes:['system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
+//            excludes:['system/util/mpFormBuilder','system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
+        }
+    });
+</script>
+<script type="text/javascript" src="/system/util/mpFrame.js"></script>
+    
+</head>
+<body class="gray-bg">
+<div class="wrapper wrapper-content">
+
+<div class="row">
+    <div class="col-sm-12">
+        <div class="ibox">
+            <div class="ibox-content">
+                <div class="row">
+                    <div class="m-b m-l">
+                        <form action="" class="form-inline">
+                            <div class="search-item" data-name="date">
+                                <span>选择时间:</span>
+                                <button type="button" class="btn btn-outline btn-link" data-value="">全部</button>
+                                <button type="button" class="btn btn-outline btn-link" data-value="<?php echo htmlentities($limitTimeList['today']); ?>">今天</button>
+                                <button type="button" class="btn btn-outline btn-link" data-value="<?php echo htmlentities($limitTimeList['week']); ?>">本周</button>
+                                <button type="button" class="btn btn-outline btn-link" data-value="<?php echo htmlentities($limitTimeList['month']); ?>">本月</button>
+                                <button type="button" class="btn btn-outline btn-link" data-value="<?php echo htmlentities($limitTimeList['quarter']); ?>">本季度</button>
+                                <button type="button" class="btn btn-outline btn-link" data-value="<?php echo htmlentities($limitTimeList['year']); ?>">本年</button>
+                                <div class="datepicker" style="display: inline-block;">
+                                    <button type="button" class="btn btn-outline btn-link" data-value="<?php echo !empty($where['date']) ? htmlentities($where['date']) : 'no'; ?>">自定义时间</button>
+                                </div>
+                                <input class="search-item-value" type="hidden" name="date" value="<?php echo htmlentities($where['date']); ?>" />
+                            </div>
+                            <select name="status" aria-controls="editable" class="form-control input-sm">
+                                <option value="">提现状态</option>
+                                <option value="-1" <?php if($where['status'] == '-1'): ?>selected="selected"<?php endif; ?>>未通过</option>
+                                <option value="0" <?php if($where['status'] == '0'): ?>selected="selected"<?php endif; ?>>未提现</option>
+                                <option value="1" <?php if($where['status'] == '1'): ?>selected="selected"<?php endif; ?>>已通过</option>
+                            </select>
+                            <select name="extract_type"  class="form-control input-sm">
+                                <option value="">提现方式</option>
+                                <option value="alipay" <?php if($where['extract_type'] == 'alipay'): ?>selected="selected"<?php endif; ?>>支付宝</option>
+                                <option value="bank" <?php if($where['extract_type'] == 'bank'): ?>selected="selected"<?php endif; ?>>银行卡</option>
+                                <option value="weixin" <?php if($where['extract_type'] == 'weixin'): ?>selected="selected"<?php endif; ?>>微信</option>
+                            </select>
+                            <div class="input-group">
+                                  <span class="input-group-btn">
+                                      <input type="text" name="nireid" value="<?php echo htmlentities($where['nireid']); ?>" placeholder="微信昵称/姓名/支付宝账号/银行卡号" class="input-sm form-control" size="38"/>
+                                      <button type="submit" class="btn btn-sm btn-primary"> 搜索</button>
+                                  </span>
+                            </div>
+                        </form>
+                    </div>
+                    <div class="col-sm-3 ui-sortable">
+                        <div class="ibox float-e-margins">
+                            <div class="ibox-title">
+                                <span class="label label-success pull-right">¥</span>
+                                <h5>已提现金额</h5>
+                            </div>
+                            <div class="ibox-content">
+                                <h1 class="no-margins"><?php echo htmlentities($data['priced']); ?></h1>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="col-sm-3 ui-sortable">
+                        <div class="ibox float-e-margins">
+                            <div class="ibox-title">
+                                <span class="label label-danger pull-right">急</span>
+                                <h5>待提现金额</h5>
+                            </div>
+                            <div class="ibox-content">
+                                <h1 class="no-margins"><?php echo htmlentities($data['price']); ?></h1>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="col-sm-3 ui-sortable">
+                        <div class="ibox float-e-margins">
+                            <div class="ibox-title">
+                                <span class="label label-success pull-right">待</span>
+                                <h5>佣金总金额</h5>
+                            </div>
+                            <div class="ibox-content">
+                                <h1 class="no-margins"><?php echo htmlentities($data['brokerage_count']); ?></h1>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="col-sm-3 ui-sortable">
+                        <div class="ibox float-e-margins">
+                            <div class="ibox-title">
+                                <span class="label label-success pull-right">待</span>
+                                <h5>未提现金额</h5>
+                            </div>
+                            <div class="ibox-content">
+                                <h1 class="no-margins"><?php echo htmlentities($data['brokerage_not']); ?></h1>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div class="table-responsive">
+                    <table class="table table-striped  table-bordered">
+                        <thead>
+                            <tr>
+                                <th class="text-center">编号</th>
+                                <th class="text-center">用户信息</th>
+                                <th class="text-center">提现金额</th>
+                                <th class="text-center">提现方式</th>
+                                <th class="text-center">添加时间</th>
+                                <th class="text-center">备注</th>
+                                <th class="text-center">审核状态</th>
+                                <th class="text-center">操作</th>
+                            </tr>
+                        </thead>
+                        <tbody class="">
+                        <?php if(is_array($list) || $list instanceof \think\Collection || $list instanceof \think\Paginator): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
+                        <tr>
+                            <td class="text-center">
+                                <?php echo htmlentities($vo['id']); ?>
+                            </td>
+                            <td class="text-center">
+                               用户昵称: <?php echo htmlentities($vo['nickname']); ?>/用户id:<?php echo htmlentities($vo['uid']); ?>
+                            </td>
+                            <td class="text-center" style="color: #00aa00;">
+                                <?php echo htmlentities($vo['extract_price']); ?>
+                            </td>
+                            <td class="text-left">
+                                <?php if($vo['extract_type'] == 'bank'): ?>
+                                姓名:<?php echo htmlentities($vo['real_name']); ?><br>
+                                 银行卡号:<?php echo htmlentities($vo['bank_code']); ?>
+                                <br/>
+                                 银行名称:<?php echo htmlentities($vo['bank_address']); elseif($vo['extract_type'] == 'weixin'): ?>
+                                昵称:<?php echo htmlentities($vo['nickname']); ?><br>
+                                微信号:<?php echo htmlentities($vo['wechat']); else: ?>
+                                姓名:<?php echo htmlentities($vo['real_name']); ?><br>
+                                  支付宝号:<?php echo htmlentities($vo['alipay_code']); ?>
+                                <?php endif; ?>
+                            </td>
+                            <td class="text-center">
+                                <?php echo htmlentities(date('Y-m-d H:i:s',!is_numeric($vo['add_time'])? strtotime($vo['add_time']) : $vo['add_time'])); ?>
+                            </td>
+                            <td class="text-center">
+                                <?php echo htmlentities($vo['mark']); ?>
+                            </td>
+                            <td class="text-center">
+                                <?php if($vo['status'] == 1): ?>
+                                提现通过<br/>
+                                <?php elseif($vo['status'] == -1): ?>
+                                提现未通过<br/>
+                                未通过原因:<?php echo htmlentities($vo['fail_msg']); ?>
+                                <br>
+                                未通过时间:<?php echo htmlentities(date('Y-m-d H:i:s',!is_numeric($vo['fail_time'])? strtotime($vo['fail_time']) : $vo['fail_time'])); else: ?>
+                                未提现<br/>
+                                <button data-url="<?php echo url('fail',['id'=>$vo['id']]); ?>" class="j-fail btn btn-danger btn-xs" type="button"><i class="fa fa-close"></i> 无效</button>
+                                <button data-url="<?php echo url('succ',['id'=>$vo['id']]); ?>" class="j-success btn btn-primary btn-xs" type="button"><i class="fa fa-check"></i> 通过</button>
+                                <?php endif; ?>
+                            </td>
+                            <td class="text-center">
+                                <button class="btn btn-info btn-xs" type="button"  onclick="$eb.createModalFrame('编辑','<?php echo Url('edit',array('id'=>$vo['id'])); ?>')"><i class="fa fa-edit"></i> 编辑</button>
+                            </td>
+                        </tr>
+                        <?php endforeach; endif; else: echo "" ;endif; ?>
+                        </tbody>
+                    </table>
+                </div>
+                <link href="/system/frame/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
+<div class="row">
+    <div class="col-sm-6">
+        <div class="dataTables_info" id="DataTables_Table_0_info" role="alert" aria-live="polite" aria-relevant="all">共 <?php echo htmlentities($total); ?> 项</div>
+    </div>
+    <div class="col-sm-6">
+        <div class="dataTables_paginate paging_simple_numbers" id="editable_paginate">
+            <?php echo $page;?>
+        </div>
+    </div>
+</div>
+            </div>
+        </div>
+    </div>
+</div>
+
+
+
+<script>
+    $(function init() {
+        $('.search-item>.btn').on('click', function () {
+            var that = $(this), value = that.data('value'), p = that.parent(), name = p.data('name'), form = p.parents();
+            form.find('input[name="' + name + '"]').val(value);
+            $('input[name=export]').val(0);
+            form.submit();
+        });
+        $('.tag-item>.btn').on('click', function () {
+            var that = $(this), value = that.data('value'), p = that.parent(), name = p.data('name'), form = p.parents(),list = $('input[name="' + name + '"]').val().split(',');
+            var bool = 0;
+            $.each(list,function (index,item) {
+                if(item == value){
+                    bool = 1
+                    list.splice(index,1);
+                }
+            })
+            if(!bool) list.push(''+value+'');
+            form.find('input[name="' + name + '"]').val(list.join(','));
+            $('input[name=export]').val(0);
+            form.submit();
+        });
+        $('.search-item>li').on('click', function () {
+            var that = $(this), value = that.data('value'), p = that.parent(), name = p.data('name'), form = $('#form');
+            form.find('input[name="' + name + '"]').val(value);
+            $('input[name=export]').val(0);
+            form.submit();
+        });
+        $('.search-item>li').each(function () {
+            var that = $(this), value = that.data('value'), p = that.parent(), name = p.data('name');
+            if($where[name]) $('.'+name).css('color','#1ab394');
+        });
+        $('.search-item-value').each(function () {
+            var that = $(this), name = that.attr('name'), value = that.val(), dom = $('.search-item[data-name="' + name + '"] .btn[data-value="' + value + '"]');
+            dom.eq(0).removeClass('btn-outline btn-link').addClass('btn-primary btn-sm')
+                .siblings().addClass('btn-outline btn-link').removeClass('btn-primary btn-sm')
+        });
+    })
+    $('.j-fail').on('click',function(){
+        var url = $(this).data('url');
+        $eb.$alert('textarea',{
+            title:'请输入未通过原因',
+            value:'输入信息不完整或有误!',
+        },function(value){
+            $eb.axios.post(url,{message:value}).then(function(res){
+                if(res.data.code == 200) {
+                    $eb.$swal('success', res.data.msg);
+                    setTimeout(function () {
+                        window.location.reload();
+                    },1000);
+                }else
+                    $eb.$swal('error',res.data.msg||'操作失败!');
+            });
+        });
+    });
+    $('.j-success').on('click',function(){
+        var url = $(this).data('url');
+        $eb.$swal('delete',function(){
+            $eb.axios.post(url).then(function(res){
+                if(res.data.code == 200) {
+                    setTimeout(function () {
+                        window.location.reload();
+                    },1000);
+                    $eb.$swal('success', res.data.msg);
+                }else
+                    $eb.$swal('error',res.data.msg||'操作失败!');
+            });
+        },{
+            title:'确定审核通过?',
+            text:'通过后无法撤销,请谨慎操作!',
+            confirm:'审核通过'
+        });
+    });
+    $('.btn-warning').on('click',function(){
+        window.t = $(this);
+        var _this = $(this),url =_this.data('url');
+        $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);
+                    _this.parents('tr').remove();
+                }else
+                    return Promise.reject(res.data.msg || '删除失败')
+            }).catch(function(err){
+                $eb.$swal('error',err);
+            });
+        })
+    });
+    $(".open_image").on('click',function (e) {
+        var image = $(this).data('image');
+        $eb.openImage(image);
+    })
+    var dateInput = $('.datepicker');
+    dateInput.daterangepicker({
+        autoUpdateInput: false,
+        "opens": "center",
+        "drops": "down",
+        "ranges": {
+            '今天': [moment(), moment().add(1, 'days')],
+            '昨天': [moment().subtract(1, 'days'), moment()],
+            '上周': [moment().subtract(6, 'days'), moment()],
+            '前30天': [moment().subtract(29, 'days'), moment()],
+            '本月': [moment().startOf('month'), moment().endOf('month')],
+            '上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
+        },
+        "locale" : {
+            applyLabel : '确定',
+            cancelLabel : '取消',
+            fromLabel : '起始时间',
+            toLabel : '结束时间',
+            format : 'YYYY/MM/DD',
+            customRangeLabel : '自定义',
+            daysOfWeek : [ '日''一''二''三''四''五''六' ],
+            monthNames : [ '一月''二月''三月''四月''五月''六月',
+                '七月''八月''九月''十月''十一月''十二月' ],
+            firstDay : 1
+        }
+    });
+    dateInput.on('apply.daterangepicker', function(ev, picker) {
+        $("input[name=date]").val(picker.startDate.format('YYYY/MM/DD') + ' - ' + picker.endDate.format('YYYY/MM/DD'));
+        $('form').submit();
+    });
+</script>
+
+
+</div>
+</body>
+</html>

+ 241 - 0
runtime/admin/temp/c70ace87bc52a5d3e58f590c6f66d0d1.php

@@ -0,0 +1,241 @@
+<?php /*a:5:{s:74:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\auction\auction_product\index.php";i:1647940022;s:61:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\container.php";i:1595820902;s:62:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_head.php";i:1595820902;s:57:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\style.php";i:1595820902;s:64:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_footer.php";i:1595820902;}*/ ?>
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+    
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <?php if(empty($is_layui) || (($is_layui instanceof \think\Collection || $is_layui instanceof \think\Paginator ) && $is_layui->isEmpty())): ?>
+    <link href="/system/frame/css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
+    <?php endif; ?>
+    <link href="/static/plug/layui/css/layui.css" rel="stylesheet">
+    <link href="/system/css/layui-admin.css" rel="stylesheet">
+    <link href="/system/frame/css/font-awesome.min.css?v=4.3.0" rel="stylesheet">
+    <link href="/system/frame/css/animate.min.css" rel="stylesheet">
+    <link href="/system/frame/css/style.min.css?v=3.0.0" rel="stylesheet">
+    <script src="/system/frame/js/jquery.min.js"></script>
+    <script src="/system/frame/js/bootstrap.min.js"></script>
+    <script src="/static/plug/layui/layui.all.js"></script>
+    <script>
+        $eb = parent._mpApi;
+        window.controlle="<?php echo strtolower(trim(preg_replace("/[A-Z]/", "_\\0", app('request')->controller()), "_"));?>";
+        window.module="<?php echo app('http')->getName();?>";
+    </script>
+
+
+
+    <title></title>
+    
+
+
+    <!--<script type="text/javascript" src="/static/plug/basket.js"></script>-->
+<script type="text/javascript" src="/static/plug/requirejs/require.js"></script>
+<?php /*  <script type="text/javascript" src="/static/plug/requirejs/require-basket-load.js"></script>  */ ?>
+<script>
+    var hostname = location.hostname;
+    if(location.port) hostname += ':' + location.port;
+    requirejs.config({
+        map: {
+            '*': {
+                'css': '/static/plug/requirejs/require-css.js'
+            }
+        },
+        shim:{
+            'iview':{
+                deps:['css!iviewcss']
+            },
+            'layer':{
+                deps:['css!layercss']
+            }
+        },
+        baseUrl:'//'+hostname+'/',
+        paths: {
+            'static':'static',
+            'system':'system',
+            'vue':'static/plug/vue/dist/vue.min',
+            'axios':'static/plug/axios.min',
+            'iview':'static/plug/iview/dist/iview.min',
+            'iviewcss':'static/plug/iview/dist/styles/iview',
+            'lodash':'static/plug/lodash',
+            'layer':'static/plug/layer/layer',
+            'layercss':'static/plug/layer/theme/default/layer',
+            'jquery':'static/plug/jquery/jquery.min',
+            'moment':'static/plug/moment',
+            'sweetalert':'static/plug/sweetalert2/sweetalert2.all.min',
+            'formCreate':'/static/plug/form-create/form-create.min',
+
+        },
+        basket: {
+            excludes:['system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
+//            excludes:['system/util/mpFormBuilder','system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
+        }
+    });
+</script>
+<script type="text/javascript" src="/system/util/mpFrame.js"></script>
+    
+</head>
+<body class="gray-bg">
+<div class="wrapper wrapper-content">
+
+<style>
+    .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">
+                        <div class="layui-card-body">
+                            <div class="layui-row layui-col-space10 layui-form-item">
+                                <div class="layui-col-lg12">
+                                    <label class="layui-form-label">搜索:</label>
+                                    <div class="layui-input-block">
+                                        <input type="text" name="real_name" style="width: 50%" v-model="where.real_name"
+                                               placeholder="请输入名称、id" class="layui-input">
+                                    </div>
+                                </div>
+                                <div class="layui-col-lg12">
+                                    <div class="layui-input-block">
+                                        <button @click="search" type="button"
+                                                class="layui-btn layui-btn-sm layui-btn-normal">
+                                            <i class="layui-icon layui-icon-search"></i>搜索
+                                        </button>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                    </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" href="<?php echo Url('create'); ?>">添加商品</a>
+<!--                        <button class="layui-btn layui-btn-sm" data-type="del_auction">批量删除</button>-->
+                    </div>
+                    <table class="layui-hide" id="List" lay-filter="List"></table>
+
+
+                    <script type="text/html" id="image">
+                        <img style="cursor: pointer" lay-event="open_image" src="{{d.image}}">
+                    </script>
+                    <script type="text/html" id="is_show">
+                        <input type='checkbox' name='id' lay-skin='switch' value="{{d.id}}" lay-filter='is_show' lay-text='上架|下架'  {{ d.is_show  == 1 ? 'checked' : '' }}>
+                    </script>
+                    <script type="text/html" id="act">
+                        <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" lay-event='edit'>
+                            编辑
+                        </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="/system/js/layuiList.js"></script>
+
+
+
+<script>
+    layList.tableList('List', "<?php echo Url('list'); ?>", function () {
+        return [
+            {type: 'checkbox'},
+            {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%', templet: '#id'},
+            {field: 'nickname', title: '拥有人', templet: '#nickname', width: '10%', align: 'center'},
+            {field: 'image', title: '封面', templet: '#image', align: 'center'},
+            {field: 'is_show', title: '状态', templet: '#is_show', align: 'center'},
+            {field: 'add_time', title: '预约开始', templet: '#add_time', width: '10%', align: 'center'},
+            {field: 'end_time', title: '预约结束', templet: '#end_time', width: '10%', align: 'center'},
+            {field: 'radd_time', title: '入场开始', templet: '#radd_time', width: '10%', align: 'center'},
+            {field: 'rend_time', title: '入场结束', templet: '#rend_time', width: '10%', align: 'center'},
+            {field: 'right', title: '操作', align: 'center', toolbar: '#act'},
+        ];
+    });
+    //点击事件绑定
+    layList.tool(function (event,data,obj) {
+        switch (event) {
+            case 'delete':
+                var url=layList.U({c:'auction.auction',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('is_show',function (odj,value) {
+        if(odj.elem.checked==true){
+            layList.baseGet(layList.Url({c:'auction.auctionProduct',a:'set_status',p:{status:1,id:value}}),function (res) {
+                layList.msg(res.msg, function () {
+                    layList.reload();
+                });
+            });
+        }else{
+            layList.baseGet(layList.Url({c:'auction.auctionProduct',a:'set_status',p:{status:0,id:value}}),function (res) {
+                layList.msg(res.msg, function () {
+                    layList.reload();
+                });
+            });
+        }
+    });
+</script>
+
+
+</div>
+</body>
+</html>

+ 282 - 0
runtime/admin/temp/ce38b0d4dda5a13bfb2e9ea6ebff7c1b.php

@@ -0,0 +1,282 @@
+<?php /*a:5:{s:66:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\user\user_level\index.php";i:1595820902;s:61:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\container.php";i:1595820902;s:62:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_head.php";i:1595820902;s:57:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\style.php";i:1595820902;s:64:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_footer.php";i:1595820902;}*/ ?>
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+    
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <?php if(empty($is_layui) || (($is_layui instanceof \think\Collection || $is_layui instanceof \think\Paginator ) && $is_layui->isEmpty())): ?>
+    <link href="/system/frame/css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
+    <?php endif; ?>
+    <link href="/static/plug/layui/css/layui.css" rel="stylesheet">
+    <link href="/system/css/layui-admin.css" rel="stylesheet">
+    <link href="/system/frame/css/font-awesome.min.css?v=4.3.0" rel="stylesheet">
+    <link href="/system/frame/css/animate.min.css" rel="stylesheet">
+    <link href="/system/frame/css/style.min.css?v=3.0.0" rel="stylesheet">
+    <script src="/system/frame/js/jquery.min.js"></script>
+    <script src="/system/frame/js/bootstrap.min.js"></script>
+    <script src="/static/plug/layui/layui.all.js"></script>
+    <script>
+        $eb = parent._mpApi;
+        window.controlle="<?php echo strtolower(trim(preg_replace("/[A-Z]/", "_\\0", app('request')->controller()), "_"));?>";
+        window.module="<?php echo app('http')->getName();?>";
+    </script>
+
+
+
+    <title></title>
+    
+    <!--<script type="text/javascript" src="/static/plug/basket.js"></script>-->
+<script type="text/javascript" src="/static/plug/requirejs/require.js"></script>
+<?php /*  <script type="text/javascript" src="/static/plug/requirejs/require-basket-load.js"></script>  */ ?>
+<script>
+    var hostname = location.hostname;
+    if(location.port) hostname += ':' + location.port;
+    requirejs.config({
+        map: {
+            '*': {
+                'css': '/static/plug/requirejs/require-css.js'
+            }
+        },
+        shim:{
+            'iview':{
+                deps:['css!iviewcss']
+            },
+            'layer':{
+                deps:['css!layercss']
+            }
+        },
+        baseUrl:'//'+hostname+'/',
+        paths: {
+            'static':'static',
+            'system':'system',
+            'vue':'static/plug/vue/dist/vue.min',
+            'axios':'static/plug/axios.min',
+            'iview':'static/plug/iview/dist/iview.min',
+            'iviewcss':'static/plug/iview/dist/styles/iview',
+            'lodash':'static/plug/lodash',
+            'layer':'static/plug/layer/layer',
+            'layercss':'static/plug/layer/theme/default/layer',
+            'jquery':'static/plug/jquery/jquery.min',
+            'moment':'static/plug/moment',
+            'sweetalert':'static/plug/sweetalert2/sweetalert2.all.min',
+            'formCreate':'/static/plug/form-create/form-create.min',
+
+        },
+        basket: {
+            excludes:['system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
+//            excludes:['system/util/mpFormBuilder','system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
+        }
+    });
+</script>
+<script type="text/javascript" src="/system/util/mpFrame.js"></script>
+    
+</head>
+<body class="gray-bg">
+<div class="wrapper wrapper-content">
+
+<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">
+                    <form class="layui-form layui-form-pane" action="">
+                        <div class="layui-form-item">
+                            <div class="layui-inline">
+                                <label class="layui-form-label">是否显示</label>
+                                <div class="layui-input-block">
+                                    <select name="is_show">
+                                        <option value="">是否显示</option>
+                                        <option value="1">显示</option>
+                                        <option value="0">不显示</option>
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="layui-inline">
+                                <label class="layui-form-label">等级名称</label>
+                                <div class="layui-input-block">
+                                    <input type="text" name="title" 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 class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">等级列表</div>
+                <div class="layui-card-body">
+                    <div class="layui-btn-container">
+                        <button class="layui-btn layui-btn-sm" onclick="$eb.createModalFrame(this.innerText,'<?php echo Url('create'); ?>')">添加会员等级</button>
+                    </div>
+                    <table class="layui-hide" id="List" lay-filter="List"></table>
+                    <script type="text/html" id="icon">
+                        <img style="cursor: pointer;max-width: 50px;" lay-event='open_image' src="{{d.icon}}">
+                    </script>
+                    <script type="text/html" id="is_forever">
+                        <input type='checkbox' name='id' disabled lay-skin='switch' value="{{d.id}}" lay-filter='is_forever' lay-text='永久|非永久'  {{ d.is_forever == 1 ? 'checked' : '' }}>
+                    </script>
+                    <script type="text/html" id="is_show">
+                        <input type='checkbox' name='id' lay-skin='switch' value="{{d.id}}" lay-filter='is_show' lay-text='开启|关闭'  {{ d.is_show == 1 ? 'checked' : '' }}>
+                    </script>
+                    <script type="text/html" id="is_pay">
+                        <input type='checkbox' name='id' disabled lay-skin='switch' value="{{d.id}}" lay-filter='is_pay' lay-text='付费|免费'  {{ d.is_pay == 1 ? 'checked' : '' }}>
+                    </script>
+                    <script type="text/html" id="act">
+                        <button type="button" class="layui-btn layui-btn-xs" onclick="dropdown(this)">操作 <span class="caret"></span></button>
+                        <ul class="layui-nav-child layui-anim layui-anim-upbit">
+                            <li>
+                                <a href="javascript:void(0)" onclick="$eb.createModalFrame(this.innerText,'<?php echo Url('tash'); ?>?level_id={{d.id}}',{w:1000})">
+                                    <i class="fa fa-wrench"></i> 等级任务
+                                </a>
+                            </li>
+                            <li>
+                                <a href="javascript:void(0)" onclick="$eb.createModalFrame(this.innerText,'<?php echo Url('create'); ?>?id={{d.id}}')">
+                                    <i class="fa fa-edit"></i> 编辑等级
+                                </a>
+                            </li>
+                            <li>
+                                <a lay-event='delete' href="javascript:void(0)" >
+                                    <i class="fa fa-times"></i> 删除等级
+                                </a>
+                            </li>
+                        </ul>
+                    </script>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+<script src="/system/js/layuiList.js"></script>
+
+
+
+<script>
+    //实例化form
+    layList.form.render();
+    //加载列表
+    layList.tableList('List',"<?php echo Url('get_system_vip_list'); ?>",function (){
+        return [
+            {field: 'id', title: '编号', sort: true,event:'id',width:'6%',align:"center"},
+            {field: 'icon', title: '等级图标',templet:'#icon',align:"center",width:'10%'},
+            {field: 'name', title: '等级名称',edit:'name',width:'6%',align:"center"},
+            {field: 'grade', title: '等级',edit:'grade',width:'6%',align:"center"},
+            {field: 'discount', title: '享受折扣',edit:'discount',width:'8%',align:"center"},
+            {field: 'valid_date', title: '有效时间',width:'12%',align:"center"},
+            {field: 'is_forever', title: '是否永久',templet:'#is_forever',width:'8%',align:"center"},
+            {field: 'is_show', title: '是否使用',templet:'#is_show',width:'8%',align:"center"},
+            {field: 'explain', title: '等级说明',align:"center"},
+            {field: 'right', title: '操作',align:'center',toolbar:'#act',width:'8%'},
+        ];
+    });
+    //自定义方法
+    var action= {
+        set_value: function (field, id, value) {
+            layList.baseGet(layList.Url({
+                a: 'set_value',
+                q: {field: field, id: id, value: value}
+            }), function (res) {
+                layList.msg(res.msg);
+            });
+        },
+    }
+    //查询
+    layList.search('search',function(where){
+        layList.reload(where,true);
+    });
+    layList.switch('is_show',function (odj,value) {
+        if(odj.elem.checked==true){
+            layList.baseGet(layList.Url({a:'set_show',p:{is_show:1,id:value}}),function (res) {
+                layList.msg(res.msg);
+            });
+        }else{
+            layList.baseGet(layList.Url({a:'set_show',p:{is_show:0,id:value}}),function (res) {
+                layList.msg(res.msg);
+            });
+        }
+    });
+    //快速编辑
+    layList.edit(function (obj) {
+        var id=obj.data.id,value=obj.value;
+        switch (obj.field) {
+            case 'name':
+                action.set_value('name',id,value);
+                break;
+            case 'grade':
+                action.set_value('grade',id,value);
+                break;
+            case 'discount':
+                action.set_value('discount',id,value);
+                break;
+        }
+    });
+    //监听并执行排序
+    layList.sort(['id','sort'],true);
+    //点击事件绑定
+    layList.tool(function (event,data,obj) {
+        switch (event) {
+            case 'delete':
+                var url=layList.U({a:'delete',q:{id:data.id}});
+                $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();
+                        }else
+                            return Promise.reject(res.data.msg || '删除失败')
+                    }).catch(function(err){
+                        $eb.$swal('error',err);
+                    });
+                })
+                break;
+            case 'open_image':
+                $eb.openImage(data.icon);
+                break;
+        }
+    })
+    //下拉框
+    $(document).click(function (e) {
+        $('.layui-nav-child').hide();
+    })
+    function dropdown(that){
+        var oEvent = arguments.callee.caller.arguments[0] || event;
+        oEvent.stopPropagation();
+        var offset = $(that).offset();
+        var top=offset.top-$(window).scrollTop();
+        var index = $(that).parents('tr').data('index');
+        $('.layui-nav-child').each(function (key) {
+            if (key != index) {
+                $(this).hide();
+            }
+        })
+        if($(document).height() < top+$(that).next('ul').height()){
+            $(that).next('ul').css({
+                'padding': 10,
+                'top': - ($(that).parent('td').height() / 2 + $(that).height() + $(that).next('ul').height()/2),
+                'min-width': 'inherit',
+                'position': 'absolute'
+            }).toggle();
+        }else{
+            $(that).next('ul').css({
+                'padding': 10,
+                'top':$(that).parent('td').height() / 2 + $(that).height(),
+                'min-width': 'inherit',
+                'position': 'absolute'
+            }).toggle();
+        }
+    }
+</script>
+
+
+</div>
+</body>
+</html>

+ 52 - 0
runtime/log/202203/22.log

@@ -0,0 +1,52 @@
+[2022-03-22T10:38:52+08:00][error] [2]time() expects exactly 0 parameters, 1 given[D:\phpstudy_pro\WWW\CRMEB\app\admin\controller\auction\Auction.php:69]
+[2022-03-22T10:57:24+08:00][error] [10501]SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'sort' cannot be null[D:\phpstudy_pro\WWW\CRMEB\vendor\topthink\think-orm\src\db\PDOConnection.php:713]
+[2022-03-22T13:22:48+08:00][error] [10500]缺少更新条件[D:\phpstudy_pro\WWW\CRMEB\vendor\topthink\think-orm\src\db\BaseQuery.php:1017]
+[2022-03-22T13:32:07+08:00][error] [2]htmlentities() expects parameter 1 to be string, array given[D:\phpstudy_pro\WWW\CRMEB\runtime\admin\temp\b3614fd0470c8fca440dc55e960e0bcc.php:257]
+[2022-03-22T13:51:24+08:00][error] [2]htmlentities() expects parameter 1 to be string, array given[D:\phpstudy_pro\WWW\CRMEB\runtime\admin\temp\b3614fd0470c8fca440dc55e960e0bcc.php:257]
+[2022-03-22T13:52:28+08:00][error] [8]未定义变量: data[D:\phpstudy_pro\WWW\CRMEB\runtime\admin\temp\b3614fd0470c8fca440dc55e960e0bcc.php:257]
+[2022-03-22T13:54:38+08:00][error] [2]htmlentities() expects parameter 1 to be string, array given[D:\phpstudy_pro\WWW\CRMEB\runtime\admin\temp\b3614fd0470c8fca440dc55e960e0bcc.php:257]
+[2022-03-22T13:55:08+08:00][error] [2]htmlentities() expects parameter 1 to be string, array given[D:\phpstudy_pro\WWW\CRMEB\runtime\admin\temp\b3614fd0470c8fca440dc55e960e0bcc.php:257]
+[2022-03-22T13:55:26+08:00][error] [2]htmlentities() expects parameter 1 to be string, array given[D:\phpstudy_pro\WWW\CRMEB\runtime\admin\temp\b3614fd0470c8fca440dc55e960e0bcc.php:257]
+[2022-03-22T13:56:51+08:00][error] [2]htmlentities() expects parameter 1 to be string, array given[D:\phpstudy_pro\WWW\CRMEB\runtime\admin\temp\b3614fd0470c8fca440dc55e960e0bcc.php:257]
+[2022-03-22T13:57:14+08:00][error] [2]htmlentities() expects parameter 1 to be string, array given[D:\phpstudy_pro\WWW\CRMEB\runtime\admin\temp\b3614fd0470c8fca440dc55e960e0bcc.php:257]
+[2022-03-22T13:57:34+08:00][error] [8]Trying to get property 'nickname' of non-object[D:\phpstudy_pro\WWW\CRMEB\runtime\admin\temp\b3614fd0470c8fca440dc55e960e0bcc.php:257]
+[2022-03-22T13:57:57+08:00][error] [2]Use of undefined constant nickname - assumed 'nickname' (this will throw an Error in a future version of PHP)[D:\phpstudy_pro\WWW\CRMEB\runtime\admin\temp\b3614fd0470c8fca440dc55e960e0bcc.php:257]
+[2022-03-22T13:58:36+08:00][error] [2]htmlentities() expects parameter 1 to be string, array given[D:\phpstudy_pro\WWW\CRMEB\runtime\admin\temp\b3614fd0470c8fca440dc55e960e0bcc.php:257]
+[2022-03-22T14:24:16+08:00][error] [0]方法参数错误:id[D:\phpstudy_pro\WWW\CRMEB\vendor\topthink\framework\src\think\Container.php:455]
+[2022-03-22T14:24:38+08:00][error] [0]方法参数错误:id[D:\phpstudy_pro\WWW\CRMEB\vendor\topthink\framework\src\think\Container.php:455]
+[2022-03-22T14:24:52+08:00][error] [0]方法参数错误:id[D:\phpstudy_pro\WWW\CRMEB\vendor\topthink\framework\src\think\Container.php:455]
+[2022-03-22T14:25:15+08:00][error] [0]方法参数错误:id[D:\phpstudy_pro\WWW\CRMEB\vendor\topthink\framework\src\think\Container.php:455]
+[2022-03-22T14:25:36+08:00][error] [0]方法参数错误:id[D:\phpstudy_pro\WWW\CRMEB\vendor\topthink\framework\src\think\Container.php:455]
+[2022-03-22T14:25:59+08:00][error] [0]方法参数错误:id[D:\phpstudy_pro\WWW\CRMEB\vendor\topthink\framework\src\think\Container.php:455]
+[2022-03-22T14:26:05+08:00][error] [0]方法参数错误:id[D:\phpstudy_pro\WWW\CRMEB\vendor\topthink\framework\src\think\Container.php:455]
+[2022-03-22T14:26:18+08:00][error] [0]Call to a member function getData() on int[D:\phpstudy_pro\WWW\CRMEB\app\admin\controller\auction\Auction.php:137]
+[2022-03-22T14:27:33+08:00][error] [0]语法错误: unexpected ';', expecting ')'[D:\phpstudy_pro\WWW\CRMEB\app\admin\controller\auction\Auction.php:137]
+[2022-03-22T14:27:33+08:00][error] [0]语法错误: unexpected ';', expecting ')'[D:\phpstudy_pro\WWW\CRMEB\app\admin\controller\auction\Auction.php:137]
+[2022-03-22T14:28:01+08:00][error] [0]Call to a member function options() on int[D:\phpstudy_pro\WWW\CRMEB\app\admin\controller\auction\Auction.php:137]
+[2022-03-22T14:30:06+08:00][error] [0]语法错误: unexpected ')'[D:\phpstudy_pro\WWW\CRMEB\app\admin\controller\auction\Auction.php:137]
+[2022-03-22T14:30:16+08:00][error] [0]Call to a member function options() on int[D:\phpstudy_pro\WWW\CRMEB\app\admin\controller\auction\Auction.php:137]
+[2022-03-22T14:33:03+08:00][error] [0]Call to a member function option() on int[D:\phpstudy_pro\WWW\CRMEB\app\admin\controller\auction\Auction.php:137]
+[2022-03-22T15:04:19+08:00][error] [0]Class 'app\admin\controller\auction\Upload' not found[D:\phpstudy_pro\WWW\CRMEB\app\admin\controller\auction\Auction.php:136]
+[2022-03-22T15:19:18+08:00][error] [0]模板文件不存在:D:\phpstudy_pro\WWW\CRMEB\app\admin\view\auction\auction\edit.php[D:\phpstudy_pro\WWW\CRMEB\vendor\topthink\think-view\src\Think.php:146]
+[2022-03-22T16:16:59+08:00][error] [0]模板文件不存在:D:\phpstudy_pro\WWW\CRMEB\app\admin\view\auction\auction_product\index.php[D:\phpstudy_pro\WWW\CRMEB\vendor\topthink\think-view\src\Think.php:146]
+[2022-03-22T16:19:04+08:00][error] [10501]SQLSTATE[42S22]: Column not found: 1054 Unknown column 'delete_time' in 'where clause'[D:\phpstudy_pro\WWW\CRMEB\vendor\topthink\think-orm\src\db\PDOConnection.php:713]
+[2022-03-22T16:19:27+08:00][error] [10501]SQLSTATE[42S22]: Column not found: 1054 Unknown column 'status' in 'where clause'[D:\phpstudy_pro\WWW\CRMEB\vendor\topthink\think-orm\src\db\PDOConnection.php:713]
+[2022-03-22T16:19:53+08:00][error] [8]未定义数组索引: is_show[D:\phpstudy_pro\WWW\CRMEB\app\admin\model\auction\AuctionProduct.php:32]
+[2022-03-22T16:20:28+08:00][error] [8]未定义变量: model[D:\phpstudy_pro\WWW\CRMEB\app\admin\model\auction\AuctionProduct.php:40]
+[2022-03-22T16:21:33+08:00][error] [8]未定义变量: model[D:\phpstudy_pro\WWW\CRMEB\app\admin\model\auction\AuctionProduct.php:40]
+[2022-03-22T16:22:31+08:00][error] [8]未定义数组索引: is_show[D:\phpstudy_pro\WWW\CRMEB\app\admin\model\auction\AuctionProduct.php:32]
+[2022-03-22T16:22:50+08:00][error] [8]未定义数组索引: is_show[D:\phpstudy_pro\WWW\CRMEB\app\admin\model\auction\AuctionProduct.php:32]
+[2022-03-22T16:23:49+08:00][error] [8]未定义数组索引: is_show[D:\phpstudy_pro\WWW\CRMEB\app\admin\model\auction\AuctionProduct.php:32]
+[2022-03-22T16:23:50+08:00][error] [8]未定义数组索引: is_show[D:\phpstudy_pro\WWW\CRMEB\app\admin\model\auction\AuctionProduct.php:32]
+[2022-03-22T16:28:38+08:00][error] [8]未定义数组索引: is_show[D:\phpstudy_pro\WWW\CRMEB\app\admin\model\auction\AuctionProduct.php:32]
+[2022-03-22T16:29:19+08:00][error] [0]Call to a member function toArray() on null[D:\phpstudy_pro\WWW\CRMEB\app\admin\controller\auction\AuctionProduct.php:133]
+[2022-03-22T16:37:50+08:00][error] [2]Cannot use a scalar value as an array[D:\phpstudy_pro\WWW\CRMEB\app\admin\controller\auction\AuctionProduct.php:46]
+[2022-03-22T16:38:58+08:00][error] [8]未定义数组索引: is_admin[D:\phpstudy_pro\WWW\CRMEB\app\admin\controller\auction\AuctionProduct.php:46]
+[2022-03-22T16:39:09+08:00][error] [2]Illegal string offset 'is_admin'[D:\phpstudy_pro\WWW\CRMEB\app\admin\controller\auction\AuctionProduct.php:46]
+[2022-03-22T16:39:51+08:00][error] [8]未定义数组索引: is_admin[D:\phpstudy_pro\WWW\CRMEB\app\admin\controller\auction\AuctionProduct.php:46]
+[2022-03-22T16:42:04+08:00][error] [8]未定义数组索引: is_admin[D:\phpstudy_pro\WWW\CRMEB\app\admin\controller\auction\AuctionProduct.php:47]
+[2022-03-22T16:42:16+08:00][error] [8]未定义数组索引: is_admin[D:\phpstudy_pro\WWW\CRMEB\app\admin\controller\auction\AuctionProduct.php:47]
+[2022-03-22T16:42:27+08:00][error] [8]Trying to get property 'is_admin' of non-object[D:\phpstudy_pro\WWW\CRMEB\app\admin\controller\auction\AuctionProduct.php:47]
+[2022-03-22T16:42:47+08:00][error] [8]未定义数组索引: is_admin[D:\phpstudy_pro\WWW\CRMEB\app\admin\controller\auction\AuctionProduct.php:45]
+[2022-03-22T16:45:56+08:00][error] [8]未定义数组索引: is_name[D:\phpstudy_pro\WWW\CRMEB\app\admin\controller\auction\AuctionProduct.php:47]
+[2022-03-22T16:46:08+08:00][error] [8]未定义数组索引: is_admin[D:\phpstudy_pro\WWW\CRMEB\app\admin\controller\auction\AuctionProduct.php:47]

+ 0 - 1
runtime/session/sess_c68d1a107c86a235d5191931f994f57b

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