lizuxiao 3 лет назад
Родитель
Сommit
ddf09f323b
46 измененных файлов с 269 добавлено и 12972 удалено
  1. 1 1
      .env
  2. 0 12
      app/admin/common.php
  3. 0 215
      app/admin/controller/auction/Auction.php
  4. 0 258
      app/admin/controller/auction/AuctionBooking.php
  5. 0 197
      app/admin/controller/auction/AuctionGu.php
  6. 0 259
      app/admin/controller/auction/AuctionOrder.php
  7. 0 206
      app/admin/controller/auction/AuctionProduct.php
  8. 0 47
      app/admin/controller/auction/AuctionSite.php
  9. 39 0
      app/admin/controller/order/StoreOrder.php
  10. 49 12
      app/admin/controller/user/User.php
  11. 0 70
      app/admin/model/auction/Auction.php
  12. 0 63
      app/admin/model/auction/AuctionBooking.php
  13. 0 56
      app/admin/model/auction/AuctionGu.php
  14. 0 164
      app/admin/model/auction/AuctionOrder.php
  15. 0 62
      app/admin/model/auction/AuctionProduct.php
  16. 0 31
      app/admin/model/auction/AuctionSite.php
  17. 60 7
      app/admin/model/user/User.php
  18. 0 939
      app/admin/view/auction/auction/create.php
  19. 0 892
      app/admin/view/auction/auction/edit.php
  20. 0 172
      app/admin/view/auction/auction/index.php
  21. 0 935
      app/admin/view/auction/auction_booking/create.php
  22. 0 870
      app/admin/view/auction/auction_booking/edit.php
  23. 0 314
      app/admin/view/auction/auction_booking/index.php
  24. 0 873
      app/admin/view/auction/auction_gu/create.php
  25. 0 814
      app/admin/view/auction/auction_gu/edit.php
  26. 0 164
      app/admin/view/auction/auction_gu/index.php
  27. 0 935
      app/admin/view/auction/auction_order/create.php
  28. 0 870
      app/admin/view/auction/auction_order/edit.php
  29. 0 329
      app/admin/view/auction/auction_order/index.php
  30. 0 965
      app/admin/view/auction/auction_product/create.php
  31. 0 900
      app/admin/view/auction/auction_product/edit.php
  32. 0 181
      app/admin/view/auction/auction_product/index.php
  33. 0 151
      app/admin/view/auction/auction_site/index.php
  34. 16 16
      app/api/controller/AuthController.php
  35. 0 238
      app/api/controller/auction/AuctionController.php
  36. 0 229
      app/api/controller/auction/AuctionProductController.php
  37. 36 2
      app/api/controller/user/UserController.php
  38. 0 32
      app/common.php
  39. 8 8
      app/http/middleware/AuthTokenMiddleware.php
  40. 0 65
      app/models/auction/Auction.php
  41. 0 50
      app/models/auction/AuctionBooking.php
  42. 0 32
      app/models/auction/AuctionGu.php
  43. 0 255
      app/models/auction/AuctionOrder.php
  44. 0 75
      app/models/auction/AuctionProduct.php
  45. 31 4
      app/models/store/StoreOrder.php
  46. 29 2
      app/models/user/User.php

+ 1 - 1
.env

@@ -1 +1 @@
-APP_DEBUG = true

[APP]
DEFAULT_TIMEZONE = Asia/Shanghai

[DATABASE]
TYPE = mysql
HOSTNAME = 127.0.0.1
HOSTPORT = 3306
USERNAME = root
PASSWORD = 'root'
DATABASE = crmebr
PREFIX = eb_
CHARSET = utf8
DEBUG = true

[LANG]
default_lang = zh-cn
+APP_DEBUG = true

[APP]
DEFAULT_TIMEZONE = Asia/Shanghai

[DATABASE]
TYPE = mysql
HOSTNAME = 192.168.2.17
HOSTPORT = 3306
USERNAME = root
PASSWORD = 'root'
DATABASE = crmebr
PREFIX = eb_
CHARSET = utf8
DEBUG = true

[LANG]
default_lang = zh-cn

+ 0 - 12
app/admin/common.php

@@ -144,15 +144,3 @@ 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);
-        }
-
-    }
-}

+ 0 - 215
app/admin/controller/auction/Auction.php

@@ -1,215 +0,0 @@
-<?php
-namespace app\admin\controller\auction;
-
-use app\admin\controller\AuthController;
-use app\admin\controller\Union;
-use app\admin\model\auction\AuctionGu;
-use app\admin\model\User;
-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 Auction extends AuthController
-{
-
-
-    public function index()
-    {
-
-
-        return $this->fetch();
-    }
-
-
-    public function list()
-    {
-        $where = Util::getMore([
-            ['status', ''],
-            ['page', 1],
-            ['limit', 20],
-            ['auction']
-        ]);
-        $data = \app\admin\model\auction\Auction::list($where);
-
-        return Json::successlayui($data);
-    }
-
-    /**
-     * 显示创建资源表单页.
-     *
-     * @return \think\Response
-     */
-    public function create($id = 0)
-    {
-        $data = [];
-        $model = new AuctionGu();
-        $auction = $model->select();
-        if ($id > 0) $data = \app\admin\model\auction\Auction::find($id)->toArray();
-
-        $this->assign(['id' => $id, 'dataList' => $data, 'auction' => $auction]);
-        return $this->fetch();
-    }
-
-
-    public function save($id)
-    {
-        $mode  = new \app\admin\model\auction\Auction();
-        $data = Util::postMore([
-            'nickname',
-            'image',
-            'status',
-            'sort',
-            'time',
-            'rtime',
-            'info',
-            'anticipate',
-            'auction_gu_id'
-        ]);
-
-
-        $time = explode('-', $data['time']);
-
-        $data['add_time'] = trim($time[0]);
-        $data['end_time'] = trim($time[1]);
-        $rtime = explode('-', $data['rtime']);
-        $data['radd_time'] = trim($rtime[0]);
-        $data['rend_time'] = trim($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 = [];
-        $model = new AuctionGu();
-        $auction = $model->select();
-        if ($id > 0) $data = \app\admin\model\auction\Auction::find($id)->toArray();
-
-        $this->assign(['id' => $id, 'dataList' => $data, 'auction' => $auction]);
-        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',
-            'info',
-            'anticipate',
-            'auction_gu_id'
-        ]);
-        $time = explode('-', $data['time']);
-        $data['add_time'] = trim($time[0]);
-        $data['end_time'] = trim($time[1]);
-        $rtime = explode('-', $data['rtime']);
-        $data['radd_time'] = trim($rtime[0]);
-        $data['rend_time'] = trim($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');
-//    }
-
-}

+ 0 - 258
app/admin/controller/auction/AuctionBooking.php

@@ -1,258 +0,0 @@
-<?php
-namespace app\admin\controller\auction;
-
-use app\admin\controller\AuthController;
-use app\admin\controller\Union;
-use app\admin\model\user\User;
-use app\admin\model\user\UserBill;
-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 app\admin\model\auction\AuctionBooking as model;
-use think\facade\Route as Url;
-
-/**
- * 竞拍管理
- * Class StoreOrder
- * @package app\admin\controller\store
- */
-class AuctionBooking extends AuthController
-{
-
-    public function index()
-    {
-
-        $list = \app\admin\model\auction\Auction::select();
-
-        $this->assign([
-            'year' => get_month(),
-            'auction'=> $list
-
-        ]);
-        return $this->fetch();
-    }
-
-
-    /**
-     * 获取列表
-     * @return void
-     */
-    public function list()
-    {
-        $where = Util::getMore([
-            ['is_show', ''],
-            ['page', 1],
-            ['limit', 20],
-            ['auction_id', ''],
-            ['store_name', ''],
-            ['data', '']
-        ]);
-        $data = model::list($where);
-        foreach ($data['data'] as $key => $val){
-            if ($data['data'][$key]['uid'] == 0) $data['data'][$key]['nickname'] = '管理';
-        }
-
-
-        return Json::successlayui($data);
-    }
-
-    public function auction_list()
-    {
-        $list = model::select()->toArray();
-
-        Json::successful($list);
-    }
-
-
-    /**
-     * 显示创建资源表单页.
-     *
-     * @return \think\Response
-     */
-    public function create($id = 0)
-    {
-        $data = \app\admin\model\auction\Auction::select()->toArray();
-
-        $this->assign(['id' => $id, 'list' => $data]);
-        return $this->fetch();
-    }
-
-
-    /**
-     * 添加
-     * @param $id
-     * @return void
-     */
-    public function save($id)
-    {
-        $data = Util::postMore([
-            'name',
-            'is_show',
-            'image',
-            'price',
-            'deduct',
-            'rise',
-            'info',
-            'sort',
-            'auction_id'
-        ]);
-        $model = new model();
-        $res = $model->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('删除失败');
-
-        $res = model::where('id', $id)->delete();
-        if ($res){
-            return Json::success('删除成功!');
-        }else{
-            return Json::fail(\app\admin\model\auction\Auction::getErrorInfo());
-        }
-
-    }
-
-
-    /**
-     * 修改状态
-     * @param $id
-     * @param $status
-     * @return void
-     */
-    public function set_status($id, $status)
-    {
-
-        if (empty($id)) Json::fail('修改失败');
-
-        $res = model::update(['is_show' => $status, 'id' => $id]);
-        if ($res){
-            return Json::success('修改成功!');
-        }else{
-            return Json::fail(\app\admin\model\auction\Auction::getErrorInfo());
-        }
-    }
-
-    /**
-     * 编辑页面
-     * @param $id
-     * @return string
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     */
-    public function edit($id)
-    {
-        if (!$id) Json::fail('数据不存在');
-        $data = \app\admin\model\auction\Auction::select()->toArray();
-
-        $this->assign(['id' => $id, 'list' => $data]);
-        return $this->fetch();
-    }
-
-
-    public function get_list($id)
-    {
-        if (!$id) Json::fail('数据不存在');
-        $model = new model();
-        $info = $model->find($id);
-
-        return JsonService::successful($info);
-    }
-
-    /**
-     * 修改
-     * @param $id
-     * @return void
-     */
-    public function update($id)
-    {
-        $data = Util::postMore([
-            'id',
-            'name',
-            'is_show',
-            'image',
-            'price',
-            'deduct',
-            'rise',
-            'info',
-            'sort',
-            'auction_id'
-        ]);
-        $res = model::update($data);
-        if ($res){
-            return Json::success('修改成功!');
-        }else{
-            return Json::fail(\app\admin\model\auction\Auction::getErrorInfo());
-        }
-
-
-    }
-
-
-    /**
-     * 退回预约卷
-     * @param $id
-     * @return void
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     */
-    public function th($id)
-    {
-        if (!$id) Json::fail('没有数据');
-        $data = model::find($id);
-        if ($data['status'] < 1) Json::fail('已退回,请勿重复提交');
-
-        $userModel = new User();
-        $user = $userModel->where('uid', $data['uid'])->find();
-        if (!$user) Json::fail('没有数据');
-
-        $user['anticipate'] = $user['anticipate']+ $data['anticipate'];
-        $bill = UserBill::create([
-            'uid' => $user['uid'],
-            'pm' => 1,
-            'title' => '预约卷退回',
-            'category' => '预约卷',
-            'type' => '预约卷',
-            'number' => $data['anticipate'],
-            'balance' => $user['anticipate'],
-            'add_time' => time(),
-        ]);
-
-        if ($bill){
-            $res = $user->save();
-            model::where('id', $id)->update(['status' => 0]);
-            if ($res){
-                Json::successful('退回成功');
-            }else{
-                Json::fail('退回失败');
-            }
-
-        }else{
-            Json::fail('错误');
-        }
-    }
-
-}

+ 0 - 197
app/admin/controller/auction/AuctionGu.php

@@ -1,197 +0,0 @@
-<?php
-namespace app\admin\controller\auction;
-
-use app\admin\controller\AuthController;
-use app\admin\controller\Union;
-use app\admin\model\User;
-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 AuctionGu extends AuthController
-{
-
-
-    public function index()
-    {
-
-
-        return $this->fetch();
-    }
-
-
-    public function list()
-    {
-        $where = Util::getMore([
-            ['status', ''],
-            ['page', 1],
-            ['limit', 20],
-            ['auction']
-        ]);
-        $data = \app\admin\model\auction\AuctionGu::list($where);
-
-        return Json::successlayui($data);
-    }
-
-    /**
-     * 显示创建资源表单页.
-     *
-     * @return \think\Response
-     */
-    public function create($id = 0)
-    {
-        $data = [];
-        $userModel = new \app\models\user\User();
-        $user = $userModel->select();
-        if ($id > 0) $data = \app\admin\model\auction\Auction::find($id)->toArray();
-
-        $this->assign(['id' => $id, 'dataList' => $data, 'user' => $user]);
-        return $this->fetch();
-    }
-
-
-    public function save($id)
-    {
-        $mode  = new \app\admin\model\auction\AuctionGu();
-        $data = Util::postMore([
-            'name',
-            'image',
-            'sort',
-            'info',
-            'uid'
-        ]);
-
-        if (!$data['uid']) return Json::fail('请绑定用户');
-        $user = \app\models\user\User::where('uid', $data['uid'])->find();
-        if ($user['spread_uid']){
-            $user['spread_uid'] = 0; // 更新用户上级
-            $user->save();
-        }
-
-        $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\AuctionGu();
-
-        $res = $model->where('id', $id)->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\AuctionGu::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('数据不存在');
-        $userModel = new \app\models\user\User();
-        $user = $userModel->select();
-
-        $this->assign(['id' => $id, 'user' => $user]);
-        return $this->fetch();
-    }
-
-
-    public function get_auction($id)
-    {
-        if (!$id) Json::fail('数据不存在');
-        $info = \app\admin\model\auction\AuctionGu::find($id)->toArray();
-
-        $data['productInfo'] = $info;
-        return JsonService::successful($data);
-    }
-
-    public function update()
-    {
-        $data = Util::postMore([
-            'name',
-            'image',
-            'sort',
-            'info',
-            'uid'
-        ]);
-
-        if (!$data['uid']) return Json::fail('请绑定用户');
-        $user = \app\models\user\User::where('uid', $data['uid'])->find();
-        if ($user['spread_uid']){
-            $user['spread_uid'] = 0; // 更新用户上级
-            $user->save();
-        }
-
-        $res = \app\admin\model\auction\AuctionGu::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');
-//    }
-
-}

+ 0 - 259
app/admin/controller/auction/AuctionOrder.php

@@ -1,259 +0,0 @@
-<?php
-namespace app\admin\controller\auction;
-
-use app\admin\controller\AuthController;
-use app\admin\controller\Union;
-use app\admin\model\user\User;
-use app\admin\model\user\UserBill;
-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 app\admin\model\auction\AuctionOrder as model;
-use think\facade\Route as Url;
-
-/**
- * 竞拍管理
- * Class StoreOrder
- * @package app\admin\controller\store
- */
-class AuctionOrder extends AuthController
-{
-
-    public function index()
-    {
-
-        $list = \app\admin\model\auction\Auction::select();
-
-        $this->assign([
-            'year' => get_month(),
-            'auction'=> $list
-
-        ]);
-        return $this->fetch();
-    }
-
-
-    /**
-     * 获取列表
-     * @return void
-     */
-    public function list()
-    {
-        $where = Util::getMore([
-            ['is_show', ''],
-            ['page', 1],
-            ['limit', 20],
-            ['auction_id', ''],
-            ['store_name', ''],
-            ['data', '']
-        ]);
-        $data = model::list($where);
-        foreach ($data['data'] as $key => $val){
-            if ($data['data'][$key]['uid'] == 0) $data['data'][$key]['nickname'] = '管理';
-        }
-
-
-        return Json::successlayui($data);
-    }
-
-    public function auction_list()
-    {
-        $list = model::select()->toArray();
-
-        Json::successful($list);
-    }
-
-
-    /**
-     * 显示创建资源表单页.
-     *
-     * @return \think\Response
-     */
-    public function create($id = 0)
-    {
-        $data = \app\admin\model\auction\Auction::select()->toArray();
-
-        $this->assign(['id' => $id, 'list' => $data]);
-        return $this->fetch();
-    }
-
-
-    /**
-     * 添加
-     * @param $id
-     * @return void
-     */
-    public function save($id)
-    {
-        $data = Util::postMore([
-            'name',
-            'is_show',
-            'image',
-            'price',
-            'deduct',
-            'rise',
-            'info',
-            'sort',
-            'auction_id'
-        ]);
-        $model = new model();
-        $res = $model->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('删除失败');
-
-        $res = model::where('id', $id)->delete();
-        if ($res){
-            return Json::success('删除成功!');
-        }else{
-            return Json::fail(\app\admin\model\auction\Auction::getErrorInfo());
-        }
-
-    }
-
-
-    /**
-     * 修改状态
-     * @param $id
-     * @param $status
-     * @return void
-     */
-    public function set_status($id, $status)
-    {
-
-        if (empty($id)) Json::fail('修改失败');
-
-        $res = model::update(['is_show' => $status, 'id' => $id]);
-        if ($res){
-            return Json::success('修改成功!');
-        }else{
-            return Json::fail(\app\admin\model\auction\Auction::getErrorInfo());
-        }
-    }
-
-    /**
-     * 编辑页面
-     * @param $id
-     * @return string
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     */
-    public function edit($id)
-    {
-        if (!$id) Json::fail('数据不存在');
-        $data = \app\admin\model\auction\Auction::select()->toArray();
-
-        $this->assign(['id' => $id, 'list' => $data]);
-        return $this->fetch();
-    }
-
-
-    public function get_list($id)
-    {
-        if (!$id) Json::fail('数据不存在');
-        $model = new model();
-        $info = $model->find($id);
-
-        return JsonService::successful($info);
-    }
-
-    /**
-     * 修改
-     * @param $id
-     * @return void
-     */
-    public function update($id)
-    {
-        $data = Util::postMore([
-            'id',
-            'name',
-            'is_show',
-            'image',
-            'price',
-            'deduct',
-            'rise',
-            'info',
-            'sort',
-            'auction_id'
-        ]);
-        $res = model::update($data);
-        if ($res){
-            return Json::success('修改成功!');
-        }else{
-            return Json::fail(\app\admin\model\auction\Auction::getErrorInfo());
-        }
-
-
-    }
-
-
-    /**
-     * 通过
-     * @param $id
-     * @return void
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     */
-    public function qd($id)
-    {
-        if (!$id) return Json::fail('没有数据');
-        $data = model::find($id);// 订单数据
-
-
-        if($data['status'] < 3){
-
-            \app\admin\model\auction\AuctionProduct::beginTrans();
-
-            $product = \app\admin\model\auction\AuctionProduct::find($data['product_id']);
-            if (!$product) Json::fail('数据不存在');
-            $uid = $product['uid']; // 所属人id
-
-            $product['uid'] = $data['uid'];// 商品拥有人更新
-            $res = $product->save();
-            if ($res){
-                if ($uid > 0){
-                    model::earn($uid,$data['price'] ,$product); // 卖家
-                }
-                model::return($id); // 买家
-                $data['status'] = 3;
-                $data->save();
-                \app\admin\model\auction\AuctionProduct::commitTrans();
-                return Json::successful('审核通过!');
-            }else{
-
-
-                \app\admin\model\auction\AuctionProduct::rollbackTrans();
-                return Json::successful('审核失败!');
-            }
-
-        }
-        return Json::fail('请勿重复通过');
-
-    }
-
-}

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

@@ -1,206 +0,0 @@
-<?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 app\admin\model\auction\AuctionProduct as model;
-use think\facade\Route as Url;
-
-/**
- * 竞拍管理
- * Class StoreOrder
- * @package app\admin\controller\store
- */
-class AuctionProduct extends AuthController
-{
-
-    public function index()
-    {
-
-        $list = \app\admin\model\auction\Auction::select();
-
-        $this->assign('auction', $list);
-        return $this->fetch();
-    }
-
-
-    public function list()
-    {
-        $where = Util::getMore([
-            ['is_show', ''],
-            ['page', 1],
-            ['limit', 20],
-            ['auction_id', ''],
-            ['store_name', '']
-        ]);
-        $data = model::list($where);
-        foreach ($data['data'] as $key => $val){
-            if ($data['data'][$key]['uid'] == 0) $data['data'][$key]['nickname'] = '管理';
-        }
-
-
-        return Json::successlayui($data);
-    }
-
-    public function auction_list()
-    {
-        $list = model::select()->toArray();
-
-        Json::successful($list);
-    }
-
-
-    /**
-     * 显示创建资源表单页.
-     *
-     * @return \think\Response
-     */
-    public function create($id = 0)
-    {
-        $data = \app\admin\model\auction\Auction::select()->toArray();
-
-        $this->assign(['id' => $id, 'list' => $data]);
-        return $this->fetch();
-    }
-
-
-    public function save($id)
-    {
-        $data = Util::postMore([
-            'name',
-            'is_show',
-            'image',
-            'price',
-            'deduct',
-            'rise',
-            'info',
-            'sort',
-            'auction_id',
-            'hanging_price',
-            'slider_image'
-        ]);
-        $data['slider_image'] = json_encode($data['slider_image']);
-        $model = new model();
-        $res = $model->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('删除失败');
-
-        $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 = model::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 = \app\admin\model\auction\Auction::select()->toArray();
-
-        $this->assign(['id' => $id, 'list' => $data]);
-        return $this->fetch();
-    }
-
-
-    public function get_list($id)
-    {
-        if (!$id) Json::fail('数据不存在');
-        $model = new model();
-        $info = $model->find($id);
-        $info['slider_image'] = is_string($info['slider_image']) ? json_decode($info['slider_image'], true) : [];
-
-        return JsonService::successful($info);
-    }
-
-    public function update($id)
-    {
-        $data = Util::postMore([
-            'id',
-            'name',
-            'is_show',
-            'image',
-            'price',
-            'deduct',
-            'rise',
-            'info',
-            'sort',
-            'auction_id',
-            'hanging_price',
-            'slider_image'
-        ]);
-        $data['slider_image'] = json_encode($data['slider_image']);
-        $res = model::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');
-//    }
-
-}

+ 0 - 47
app/admin/controller/auction/AuctionSite.php

@@ -1,47 +0,0 @@
-<?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 AuctionSite extends AuthController
-{
-
-
-    public function index()
-    {
-
-        $data = \app\admin\model\auction\AuctionSite::select();
-
-        $form = ['getTitle' => '竞拍配置'];
-
-        $this->assign([
-            'form' => $form,
-            'getTitle' => '竞拍配置',
-            'config_tab' => [
-                'id'  => 1,
-                'type' => 1
-            ]
-        ]);
-        return $this->fetch();
-    }
-
-}

+ 39 - 0
app/admin/controller/order/StoreOrder.php

@@ -486,6 +486,7 @@ class StoreOrder extends AuthController
         if ($order['status'] == 2) return Json::fail('不能重复收货!');
         if ($order['paid'] == 1 && $order['status'] == 1) $data['status'] = 2;
         else if ($order['pay_type'] == 'offline') $data['status'] = 2;
+
         else return Json::fail('请先发货或者送货!');
         StoreOrderModel::beginTrans();
         try {
@@ -498,6 +499,44 @@ class StoreOrder extends AuthController
                 StoreOrderModel::commitTrans();
                 //发送短信
                 event('ShortMssageSend', [$order['order_id'], 'Receiving']);
+				// 释放冻结积分
+				//获取当前订单的用户信息
+                $user=User::where('uid',$order['uid'])->find();
+//                计算当前用户的消费金额总和
+                $listsum=StoreOrderModel::where('id', $id)->where('status',2)->sum('total_price');
+//                判断当前用户金额加上当前订单金额是否大于三万
+                if($user['f_integral']==3000){
+                    $integral=floatval($user['integral']+3000);
+                    $res=User::where('uid',$order['uid'])->update(['f_integral' =>0,'integral'=>$integral]);
+                }
+
+
+
+
+				$order = self::getUserOrderDetail($uid, $uni);
+				//计算历史金额加上当前金额
+				$listsum=floatval($order['total_price']+$list);
+				if (!$order) return self::setErrorInfo('订单不存在!');
+				$order = self::tidyOrder($order);
+				// 如果总金额大于等于30000 释放冻结积分
+				if($listsum>=30000){
+					// 释放积分
+					$res=User::where('uid',$uid)->find();
+					if($res['f_integral']==3000){
+
+
+						$res3=UserBill::income('冻结积分释放',$uid, 'integral', 'release',3000, $order['id'],$listsum, '释放3000积分');
+						if(!$res2){
+							return self::setErrorInfo('操作失败');
+						}
+					}
+				}
+				
+				
+				
+				
+				
+				
                 return Json::successful('收货成功!');
             }
         } catch (\Exception $e) {

+ 49 - 12
app/admin/controller/user/User.php

@@ -19,7 +19,6 @@ use app\admin\model\store\{StoreVisit, StoreCouponUser};
 use app\admin\model\system\{SystemUserLevel, SystemUserTask};
 use crmeb\services\{FormBuilder as Form, UtilService as Util, JsonService as Json};
 use app\admin\model\user\{User as UserModel, UserBill as UserBillAdmin, UserLevel, UserGroup, UserTaskFinish};
-
 /**
  * 用户管理控制器
  * Class User
@@ -118,8 +117,8 @@ class User extends AuthController
         $f = array();
         $f[] = Form::radio('money_status', '修改余额', 1)->options([['value' => 1, 'label' => '增加'], ['value' => 2, 'label' => '减少']]);
         $f[] = Form::number('money', '余额')->min(0);
-        $f[] = Form::radio('integration_status', '修改积分', 1)->options([['value' => 1, 'label' => '增加'], ['value' => 2, 'label' => '减少']]);
-        $f[] = Form::number('integration', '积分')->min(0);
+        $f[] = Form::radio('integration_status', '修改趣豆', 1)->options([['value' => 1, 'label' => '增加'], ['value' => 2, 'label' => '减少']]);
+        $f[] = Form::number('integration', '趣豆')->min(0);
         $form = Form::make_post_form('修改其他', $f, Url::buildUrl('update_other', array('uid' => $uid)));
         $this->assign(compact('form'));
         return $this->fetch('public/form-builder');
@@ -163,10 +162,10 @@ class User extends AuthController
         } else {
             $res1 = true;
         }
-        if ($data['integration_status'] && $data['integration']) {//积分增加或者减少
+        if ($data['integration_status'] && $data['integration']) {//趣豆增加或者减少
             if ($data['integration_status'] == 1) {//增加
                 $edit['integral'] = bcadd($user['integral'], $data['integration'], 2);
-                $res2 = UserBillAdmin::income('系统增加积分', $user['uid'], 'integral', 'system_add', $data['integration'], $this->adminId, $edit['integral'], '系统增加了' . floatval($data['integration']) . '积分');
+                $res2 = UserBillAdmin::income('系统增加趣豆', $user['uid'], 'integral', 'system_add', $data['integration'], $this->adminId, $edit['integral'], '系统增加了' . floatval($data['integration']) . '趣豆');
                 try {
                     UserRepository::adminAddIntegral($user, $data['integration']);
                 } catch (\Exception $e) {
@@ -175,7 +174,7 @@ class User extends AuthController
                 }
             } else if ($data['integration_status'] == 2) {//减少
                 $edit['integral'] = bcsub($user['integral'], $data['integration'], 2);
-                $res2 = UserBillAdmin::expend('系统减少积分', $user['uid'], 'integral', 'system_sub', $data['integration'], $this->adminId, $edit['integral'], '系统扣除了' . floatval($data['integration']) . '积分');
+                $res2 = UserBillAdmin::expend('系统减少趣豆', $user['uid'], 'integral', 'system_sub', $data['integration'], $this->adminId, $edit['integral'], '系统扣除了' . floatval($data['integration']) . '趣豆');
                 try {
                     UserRepository::adminSubIntegral($user, $data['integration']);
                 } catch (\Exception $e) {
@@ -265,6 +264,13 @@ class User extends AuthController
         else
             return Json::fail('清除失败');
     }
+	
+	/**
+	 * 修改实名认证状态状态
+	 *
+	 * @return json
+	 */
+	
 
     /**
      * 修改user表状态
@@ -332,6 +338,11 @@ class User extends AuthController
         $f[] = Form::input('card_id', '身份证号', $user->getData('card_id'));
         $f[] = Form::textarea('mark', '用户备注', $user->getData('mark'));
         $f[] = Form::radio('is_promoter', '推广员', $user->getData('is_promoter'))->options([['value' => 1, 'label' => '开启'], ['value' => 0, 'label' => '关闭']]);
+        $f[] = Form::radio('is_agent', '代理', $user->getData('is_agent'))->options([['value' => 1, 'label' => '是'], ['value' => 0, 'label' => '否']]);
+        $st[] = ['is_promoter','=',1];
+        $st[] = ['uid','<>',$uid];
+        $f[] = Form::input('spread_time', '绑定推荐人时间', $user->getData('spread_time') ? date('Y-m-d-h:i:s', $user->getData('spread_time')) : 0)->disabled(1);
+        $f[] = Form::select('spread_uid', '绑定推荐人', $user->getData('spread_uid'))->options(UserModel::where([$st])->field('uid as value,nickname as label')->select()->toArray())->filterable(true);
         $f[] = Form::radio('status', '状态', $user->getData('status'))->options([['value' => 1, 'label' => '开启'], ['value' => 0, 'label' => '锁定']]);
         $form = Form::make_post_form('添加用户通知', $f, Url::buildUrl('update', array('uid' => $uid)), 5);
         $this->assign(compact('form'));
@@ -351,7 +362,10 @@ class User extends AuthController
             ['money', 0],
             ['integration_status', 0],
             ['integration', 0],
+            ['spread_uid', 0],
             ['status', 0],
+            ['is_agent', 0],
+            ['spread_time', ''],
         ]);
         if (!$uid) return $this->failed('数据不存在');
         $user = UserModel::get($uid);
@@ -383,10 +397,10 @@ class User extends AuthController
         } else {
             $res1 = true;
         }
-        if ($data['integration_status'] && $data['integration']) {//积分增加或者减少
+        if ($data['integration_status'] && $data['integration']) {//趣豆增加或者减少
             if ($data['integration_status'] == 1) {//增加
                 $edit['integral'] = bcadd($user['integral'], $data['integration'], 2);
-                $res2 = UserBillAdmin::income('系统增加积分', $user['uid'], 'integral', 'system_add', $data['integration'], $this->adminId, $edit['integral'], '系统增加了' . floatval($data['integration']) . '积分');
+                $res2 = UserBillAdmin::income('系统增加趣豆', $user['uid'], 'integral', 'system_add', $data['integration'], $this->adminId, $edit['integral'], '系统增加了' . floatval($data['integration']) . '趣豆');
                 try {
                     UserRepository::adminAddIntegral($user, $data['integration']);
                 } catch (\Exception $e) {
@@ -395,7 +409,7 @@ class User extends AuthController
                 }
             } else if ($data['integration_status'] == 2) {//减少
                 $edit['integral'] = bcsub($user['integral'], $data['integration'], 2);
-                $res2 = UserBillAdmin::expend('系统减少积分', $user['uid'], 'integral', 'system_sub', $data['integration'], $this->adminId, $edit['integral'], '系统扣除了' . floatval($data['integration']) . '积分');
+                $res2 = UserBillAdmin::expend('系统减少趣豆', $user['uid'], 'integral', 'system_sub', $data['integration'], $this->adminId, $edit['integral'], '系统扣除了' . floatval($data['integration']) . '趣豆');
                 try {
                     UserRepository::adminSubIntegral($user, $data['integration']);
                 } catch (\Exception $e) {
@@ -412,7 +426,30 @@ class User extends AuthController
         $edit['card_id'] = $data['card_id'];
         $edit['birthday'] = strtotime($data['birthday']);
         $edit['mark'] = $data['mark'];
-        $edit['is_promoter'] = $data['is_promoter'];
+        $edit['is_agent'] = $data['is_agent'];
+        if($data['is_promoter']==1){
+            if($user['level']<3){
+                return $this->failed('等级未达到店长!不可为推广员');
+                die;
+            }
+            $edit['is_promoter'] = $data['is_promoter'];
+        }else{
+            $edit['is_promoter'] = $data['is_promoter'];
+        }
+        $userlist=UserModel::where('uid','<>',$uid)->column('uid,spread_uid','uid');
+        $sp =$data['spread_uid'];
+        while ($sp) {
+            if ($sp == $uid) {
+                $data['spread_uid'] = 0;
+                return Json::fail('推荐人不合法');
+                break;
+            }
+            $sp = $userlist[$sp]['spread_uid'];
+            $edit['spread_uid'] = $data['spread_uid'];
+        }
+        if($user['spread_uid']!=$data['spread_uid']){
+            $edit['spread_time'] = time();
+        }
         if ($edit) $res3 = UserModel::edit($edit, $uid);
         else $res3 = true;
         if ($res1 && $res2 && $res3) $res = true;
@@ -763,7 +800,7 @@ class User extends AuthController
     }
 
     /**
-     * 获取某用户的积分列表
+     * 获取某用户的趣豆列表
      */
     public function getOneIntegralList($uid, $page = 1, $limit = 20)
     {
@@ -771,7 +808,7 @@ class User extends AuthController
     }
 
     /**
-     * 获取某用户的积分列表
+     * 获取某用户的趣豆列表
      */
     public function getOneSignList($uid, $page = 1, $limit = 20)
     {

+ 0 - 70
app/admin/model/auction/Auction.php

@@ -1,70 +0,0 @@
-<?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 Auction extends BaseModel
-{
-
-    use ModelTrait;
-
-    protected $pk = 'id';
-
-    protected $name = 'auction';
-
-
-
-    public static function list($where)
-    {
-        $model = self::alias('a')
-            ->field('a.*, gu.name')
-            ->order('a.sort DESC,a.id DESC')
-            ->leftJoin('auction_gu gu', 'a.auction_gu_id = gu.id');
-
-        $model->where(['a.delete_time' => 0]);
-        if ($where['auction'])$model->where('a.id|a.nickname' , 'like', '%'.$where['auction'],'%');
-        if ($where['page'] && $where['limit']){
-            $model->page($where['page'], $where['limit']);
-        }else{
-            $model->page(20, 1);
-        }
-
-        $data['count'] = $model->count();
-        $list = $model->select()->toArray();
-
-        $day = strtotime(date('Y-m-d'));
-        $tomorrow = strtotime(date('Y-m-d', strtotime('+1 day')));
-        foreach ($list as $k => $v){
-           $list[$k]['b_count'] = AuctionBooking::where([['create_time', '>=', $day], ['create_time', '<=', $tomorrow], ['auction_id', '=', $list[$k]['id']]])->count();
-
-
-//           $list[$k]['u_count'] = AuctionBooking::alias('a')
-//               ->leftJoin('user u', 'a.uid = u.uid')
-//               ->whereOr('u.is_new', 1)
-//               ->whereOr([['green_time', '>=', $day], ['green_time', '<=', $tomorrow]])
-//               ->where([['date', '>=', $day], ['date', '<=', $tomorrow], ['a.auction_id', '=', $list[$k]['id']]])->count();
-
-
-        }
-        $data['data'] = $list;
-        return $data;
-
-    }
-
-
-
-
-}

+ 0 - 63
app/admin/model/auction/AuctionBooking.php

@@ -1,63 +0,0 @@
-<?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 AuctionBooking extends BaseModel
-{
-
-    use ModelTrait;
-
-    protected $pk = 'id';
-
-    protected $name = 'auction_booking';
-    protected $autoWriteTimestamp = true;
-
-
-    public static function list($where)
-    {
-        $model = self::where('a.delete_time', 0)
-            ->alias('a')
-            ->order('a.id', 'desc')
-            ->field('a.*, au.nickname as name, u.account, u.nickname')
-            ->leftJoin('auction au', 'a.auction_id = au.id')
-            ->leftJoin('user u', 'a.uid = u.uid');
-
-
-
-        if (trim($where['store_name']) != '') $model->where('a.id|u.account|u.nickname', 'like', '%'.$where['store_name'].'%');
-        if (trim($where['auction_id']) != '') $model->where('a.auction_id', $where['auction_id']);
-        if (trim($where['data']) != '') $model = self::getModelTime($where, $model,  'create_time');
-
-        if ($where['page'] && $where['limit']){
-            $model->page($where['page'], $where['limit']);
-        }else{
-            $model->page(20, 1);
-        }
-
-        $data['count'] = $model->count();
-        $list = $model->select();
-
-        $data['data'] = $list;
-        return $data;
-
-    }
-
-
-
-
-
-}

+ 0 - 56
app/admin/model/auction/AuctionGu.php

@@ -1,56 +0,0 @@
-<?php
-
-namespace app\admin\model\auction;
-
-use app\models\store\StoreProduct;
-use crmeb\services\SystemConfigService;
-use think\facade\Db;
-use crmeb\traits\ModelTrait;
-use crmeb\basic\BaseModel;
-
-/**
- * TODO 场馆model
- * Class Article
- * @package app\models\article
- */
-class AuctionGu extends BaseModel
-{
-    /**
-     * 数据表主键
-     * @var string
-     */
-    protected $pk = 'id';
-
-    /**
-     * 模型名称
-     * @var string
-     */
-    protected $name = 'auction_gu';
-    protected $autoWriteTimestamp = true;
-
-    use ModelTrait;
-
-    public static function list($where)
-    {
-        $model = self::alias('a')
-            ->field('a.*, u.nickname')
-            ->order('a.sort DESC,a.id DESC')
-            ->leftJoin('user u', 'u.uid = a.uid');
-
-        if ($where['auction'])$model->where('a.id|a.name|u.nickname' , 'like', '%'.$where['auction'],'%');
-        if ($where['page'] && $where['limit']){
-            $model->page($where['page'], $where['limit']);
-        }else{
-            $model->page(20, 1);
-        }
-
-        $data['count'] = $model->count();
-        $list = $model->select();
-        $list = count($list) ? $list->toArray() : [];
-
-        $data['data'] = $list;
-        return $data;
-
-    }
-
-}

+ 0 - 164
app/admin/model/auction/AuctionOrder.php

@@ -1,164 +0,0 @@
-<?php
-
-/**
- *
- * @author: xaboy<365615158@qq.com>
- * @day: 2017/11/02
- */
-
-namespace app\admin\model\auction;
-
-use app\admin\model\user\User;
-use app\admin\model\user\UserBill;
-use crmeb\services\product\Product;
-use crmeb\traits\ModelTrait;
-use crmeb\basic\BaseModel;
-
-/**
- * 预约 Model
- * Class WechatNews
- * @package app\admin\model\wechat
- */
-class AuctionOrder extends BaseModel
-{
-
-    use ModelTrait;
-
-    protected $pk = 'id';
-
-    protected $name = 'auction_order';
-    protected $autoWriteTimestamp = true;
-
-
-    public static function list($where)
-    {
-        $model = self::where('a.delete_time', 0)
-            ->alias('a')
-            ->order('a.id', 'desc')
-            ->field('a.*, u.account, u.nickname,p.name, p.image')
-            ->leftJoin('user u', 'a.uid = u.uid')
-            ->leftJoin('auction_product p', 'a.product_id = p.id');
-
-
-
-        if (trim($where['store_name']) != '') $model->where('a.id|u.account|u.nickname|a.order_id', 'like', '%'.$where['store_name'].'%');
-        if (trim($where['auction_id']) != '') $model->where('a.auction_id', $where['auction_id']);
-        if (trim($where['data']) != '') $model = self::getModelTime($where, $model,  'a.create_time');
-
-        if ($where['page'] && $where['limit']){
-            $model->page($where['page'], $where['limit']);
-        }else{
-            $model->page(20, 1);
-        }
-
-        $data['count'] = $model->count();
-        $list = $model->select();
-
-        $data['data'] = $list;
-        return $data;
-
-    }
-
-    /**
-     * 卖家操作
-     * @param $id  //商品所属人
-     * @param $price //卖出价格
-     * @param $product //商品详情
-     * @return void
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     */
-    public static function earn($id, $price,$product)
-    {
-        $userModel = new User();
-        $billModel = new UserBill();
-        $productModel = new AuctionProduct();
-        $user = $userModel->find($id);
-
-        if ($user['spread_uid'] > 0){
-            $s_price = ($price - $product['price']) * 0.1; // 卖出价格减去购买价格的百分之十 为上级直推奖励
-            $spread = $userModel->find($user['spread_uid']);
-            $spread['integral'] = $spread['integral'] + $s_price; //积分增加
-            $spread->save();
-            $billModel->save([
-                'uid' => $spread['uid'],
-                'pm' => 1,
-                'title' => '积分增加',
-                'category' => 'integral',
-                'type' => 'gain',
-                'mark' => '直推积分',
-                'add_time' => time(),
-                'number' => $s_price,
-                'balance' => $spread['integral']
-
-            ]);
-            $anticipate = $user['anticipate'];
-            $user['anticipate'] = $user['anticipate']-$price*($product['deduct']/100); // 扣除当前卖出价格百分比的预约卷
-            $user->save();
-            UserBill::expend('预约卷扣除', $user['uid'], 'anticipate','reduce_anticipate', $price*($product['deduct']/100), 0, '卖出扣除预约卷');
-        }
-        $productModel->where('id', $product['id'])->save(['price' => $price, 'hanging_price' => ($price+$price*($product['rise']/100))]); //修改当前画价
-
-    }
-
-    /**
-     * 购买成功退预约卷
-     * @param $id
-     * @return void
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     */
-    public static function return($id)
-    {
-        $data = self::find($id);
-        $userModel = new User();
-        $productModel = new AuctionProduct();
-        $auctionModel = new Auction();
-        $bookingModel = new AuctionBooking();
-
-
-        $user = $userModel->find($data['uid']);
-        if ($user['is_new'] == 1){
-
-            if ($user['spread_uid']) {
-                $spread = $userModel->where('id', $user['spread_uid'])->find();
-                $spread['green_time'] = strtotime(date('Y-m-d', strtotime('+1 day'))); // 开启明天的绿色通道
-            }
-            $orderCount =AuctionOrder::where([['uid', '=',  $user['uid']], ['status', 3]])->count();
-            if ($orderCount >= 5){
-                $user['is_new'] = 0;
-            }
-
-
-        }
-        $product = $productModel->where('id', $data['product_id'])->find();
-        $auction = $auctionModel->where('id', $product['auction_id'])->find();
-        $booking = $bookingModel->where('auction_id', $auction['id'])->whereBetweenTime('create_time', date('Y-m-d H:i:s', strtotime(date('Y-m-d'))), date('Y-m-d H:i:s', strtotime('+1 day')))->find();
-        if ($booking['status'] > 0){
-            $booking['status'] = 0;
-            $booking->save();
-            $user['anticipate'] = $user['anticipate'] + $auction['anticipate'];// 退还预约卷
-            $user->save();
-
-
-                UserBill::create([
-                'uid' => $user['uid'],
-                'pm' => 1,
-                'title' => '预约卷退还',
-                'category' => 'anticipate',
-                'type' => 'add_anticipate',
-                'mark' => '退还预约卷',
-                'add_time' => time(),
-                'number' => $auction['anticipate'],
-                'balance' => $user['anticipate']
-            ]);
-        }
-    }
-
-
-
-
-
-}

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

@@ -1,62 +0,0 @@
-<?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';
-    protected $autoWriteTimestamp = true;
-
-
-    public static function list($where)
-    {
-
-        $model = self::alias('a')
-            ->field('a.*,u.nickname, au.nickname as au_name')
-            ->order('a.sort DESC,a.id DESC')
-            ->leftJoin('auction au', 'a.auction_id = au.id')
-            ->leftJoin('user u', 'a.uid = u.uid');
-
-
-        if (trim($where['auction_id']) != '') {
-            $model->where('a.auction_id', '=',$where['auction_id']);
-        }
-        if (trim(($where['store_name'])) != ''){
-
-            $model->where('a.id|a.name', 'like','%'.$where['store_name'].'%');
-        }
-        if ($where['page'] && $where['limit']){
-            $model->page($where['page'], $where['limit']);
-        }else{
-            $model->page(20, 1);
-        }
-
-        $data['count'] = $model->count();
-        $data['data'] = $model->select()->toArray();
-        return $data;
-
-    }
-
-
-
-
-}

+ 0 - 31
app/admin/model/auction/AuctionSite.php

@@ -1,31 +0,0 @@
-<?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 AuctionSite extends BaseModel
-{
-
-    use ModelTrait;
-
-    protected $pk = 'id';
-
-    protected $name = 'auction_site';
-
-
-
-
-}

+ 60 - 7
app/admin/model/user/User.php

@@ -134,7 +134,26 @@ class User extends BaseModel
         }
         return $model;
     }
-
+	
+	// 获取用户实名认证信息列表
+	public static function authlist($where) {
+		 $model = new self;
+		 $list = $model->where('is_auth','<>',0)->page((int)$where['page'], (int)$where['limit'])->select();
+		 $count = $model->where('is_auth','<>',0)->count();
+		for($i=0;$i<$count;$i++){
+			if($list[$i]['is_auth']==1){
+			 $list[$i]['is_auth']="待审核";
+			}
+			if($list[$i]['is_auth']==2){
+			 $list[$i]['is_auth']="已通过";
+			}
+			if($list[$i]['is_auth']==3){
+			 $list[$i]['is_auth']="已拒绝";
+			}
+		}
+		return ['count' => $count, 'data' =>$list];
+		
+	}
     /**
      * 异步获取当前用户 信息
      * @param $where
@@ -724,7 +743,9 @@ class User extends BaseModel
             ['name' => '微信昵称', 'value' => $UserInfo['nickname']],
             ['name' => '邮箱', 'value' => ''],
             ['name' => '生日', 'value' => ''],
-            ['name' => '积分', 'value' => $UserInfo['integral']],
+            ['name' => '代理', 'value' => $UserInfo['is_agent'] ?'是' :'否'],
+            ['name' => '可用趣豆', 'value' => $UserInfo['integral']],
+			['name' => '冻结趣豆', 'value' => $UserInfo['f_integral']],
             ['name' => '上级推广人', 'value' => $UserInfo['spread_uid'] ? self::where('uid', $UserInfo['spread_uid'])->value('nickname') : ''],
             ['name' => '账户余额', 'value' => $UserInfo['now_money']],
             ['name' => '佣金总收入', 'value' => UserBill::where('category', 'now_money')->where('type', 'brokerage')->where('uid', $uid)->sum('number')],
@@ -764,7 +785,7 @@ class User extends BaseModel
     }
 
     /*
-     * 获取 会员 订单个数,积分明细,优惠劵明细
+     * 获取 会员 订单个数,趣豆明细,优惠劵明细
      *
      * $uid 用户id;
      *
@@ -860,7 +881,7 @@ class User extends BaseModel
 
     /*
      * 获取用户
-     * 积分排行
+     * 趣豆排行
      * 会员余额排行榜
      * 分销商佣金总额排行榜
      * 购物笔数排行榜
@@ -872,7 +893,7 @@ class User extends BaseModel
      */
     public static function getUserTop10List($limit = 10, $is_promoter = 0)
     {
-        //积分排行
+        //趣豆排行
         $integral = self::where('status', 1)
             ->where('is_promoter', $is_promoter)
             ->order('integral desc')
@@ -936,7 +957,7 @@ class User extends BaseModel
 
     /*
      * 获取 会员业务
-     * 会员总余额 会员总积分
+     * 会员总余额 会员总趣豆
      * $where 查询条件
      *
      * return array
@@ -952,7 +973,7 @@ class User extends BaseModel
                 'col' => 6,
             ],
             [
-                'name' => '会员总积分',
+                'name' => '会员总趣豆',
                 'field' => '分',
                 'count' => self::getModelTime($where, self::where('status', 1))->sum('integral'),
                 'background_color' => 'layui-bg-cyan',
@@ -1247,6 +1268,38 @@ class User extends BaseModel
         $res1 = UserBill::income('获得推广佣金', $userInfoTwo['spread_uid'], 'now_money', 'brokerage', $brokeragePrice, $orderInfo['id'], $balance, $mark);
         $res2 = self::bcInc($userInfoTwo['spread_uid'], 'now_money', $brokeragePrice, 'uid');
         $res = $res1 && $res2;
+        if ($res) self::backOrderBrokerageThree($orderInfo);
+        return $res;
+    }
+
+    /**
+     * 三级推广
+     * @param $orderInfo
+     * @return bool
+     */
+    public static function backOrderBrokerageThree($orderInfo)
+    {
+        $userInfo = User::getUserInfo($orderInfo['uid']);
+        $userInfoThree = User::getUserInfo($userInfo['spread_uid']);
+        if (!$userInfoThree || !$userInfoThree['spread_uid']) return true;
+        $storeBrokerageStatu = sys_config('store_brokerage_statu') ?: 1;//获取后台分销类型
+        if ($storeBrokerageStatu == 1) {
+            if (!User::be(['uid' => $userInfoThree['spread_uid'], 'is_promoter' => 1])) return true;
+        }
+        $brokerageRatio = (sys_config('store_brokerage_three') ?: 0) / 100;
+        if ($brokerageRatio <= 0) return true;
+        $cost = isset($orderInfo['cost']) ? $orderInfo['cost'] : 0;//成本价
+        if ($cost > $orderInfo['pay_price']) return true;//成本价大于支付价格时直接返回
+        $brokeragePrice = bcmul(bcsub($orderInfo['pay_price'], $cost, 2), $brokerageRatio, 2);
+        //返佣之后余额
+        $spNow_money = User::where('uid', $userInfo['spread_uid'])->value('now_money');
+        $balance = bcadd($spNow_money, $brokeragePrice, 2);
+        if ($brokeragePrice <= 0) return true;
+        $mark = '三级推广人' . $userInfo['nickname'] . '成功消费' . floatval($orderInfo['pay_price']) . '元,奖励推广佣金' . floatval($brokeragePrice);
+        self::beginTrans();
+        $res1 = UserBill::income('获得推广佣金', $userInfoThree['spread_uid'], 'now_money', 'brokerage', $brokeragePrice, $orderInfo['id'], $balance, $mark);
+        $res2 = self::bcInc($userInfoThree['spread_uid'], 'now_money', $brokeragePrice, 'uid');
+        $res = $res1 && $res2;
         self::checkTrans($res);
         return $res;
     }

+ 0 - 939
app/admin/view/auction/auction/create.php

@@ -1,939 +0,0 @@
-<!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-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">绑定场馆</label>
-                                                <div class="layui-input-inline">
-                                                    <select id="auction_gu_id" name="auction_gu_id" lay-verify="title" v-model="formData.auction_gu_id">
-                                                        {foreach $auction as $key=>$vo }
-                                                        <option value="{$vo.id}">{$vo.name}<option>
-                                                            {/foreach}
-                                                    </select>
-                                                </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="anticipate" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.anticipate" maxlength="100" value="0">
-                                                </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 layui-form-text">
-                                                <label class="layui-form-label">场馆简介</label>
-                                                <div class="layui-input-block">
-                                                    <textarea name="info" v-model="formData.info"
-                                                              placeholder="请输入商品简介" class="layui-textarea"></textarea>
-                                                </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 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};
-    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: {
-                nickname: '',
-                status: 1,
-                image:'',
-                time:'',
-                rtime:'',
-                description: '',
-                info: '',
-                anticipate: 200,
-                sort: 10,
-                auction_gu_id:''
-            },
-            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();
-                    });
-                })
-            },
-            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();
-                var auction_gu_id = $('#auction_gu_id').val();
-                that.formData.uid = auction_gu_id;
-                that.formData.time = time;
-                that.formData.rtime = rtime;
-                that.formData.auction_gu_id = auction_gu_id;
-                if (!that.formData['auction_gu_id']){
-                    return that.showMsg('请绑定会馆');
-                }
-                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('请选择进场时间');
-                }
-                that.formData.description = that.getContent();
-                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>

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

@@ -1,892 +0,0 @@
-<!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-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">绑定会馆</label>
-                                                <div class="layui-input-inline">
-                                                    <select id="auction_gu_id" name="auction_gu_id" lay-verify="title" v-model="formData.auction_gu_id">
-                                                        {foreach $auction as $key=>$vo }
-                                                        <option value="{$vo.id}">{$vo.name}<option>
-                                                            {/foreach}
-                                                    </select>
-                                                </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-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="anticipate" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.anticipate" maxlength="100" value="0">
-                                                </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 layui-form-text">
-                                                <label class="layui-form-label">商品简介</label>
-                                                <div class="layui-input-block">
-                                                    <textarea name="info" v-model="formData.info"
-                                                              placeholder="请输入商品简介" class="layui-textarea"></textarea>
-                                                </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 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: {
-                nickname: '',
-                image:'',
-                time:'',
-                rtime:'',
-                description: '',
-                info: '',
-                anticipate: '',
-                sort: '',
-                auction_gu_id:''
-
-            },
-            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();
-                var auction_gu_id = $('#auction_gu_id').val();
-                that.formData.uid = auction_gu_id;
-                that.formData.status = status;
-                that.formData.time = time;
-                that.formData.rtime = rtime;
-                if (!that.formData['auction_gu_id']){
-                    return that.showMsg('绑定会馆');
-                }
-                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>

+ 0 - 172
app/admin/view/auction/auction/index.php

@@ -1,172 +0,0 @@
-{extend name="public/container"}
-{block name="head_top"}
-
-{/block}
-{block name="content"}
-<style>
-    .btn-outline{
-        border:none;
-    }
-    .btn-outline:hover{
-        background-color: #0e9aef;
-        color: #fff;
-    }
-    .layui-form-item .layui-btn {
-        margin-top: 5px;
-        margin-right: 10px;
-    }
-    .layui-btn-primary{
-        margin-right: 10px;
-        margin-left: 0!important;
-    }
-    label{
-        margin-bottom: 0!important;
-        margin-top: 4px;
-    }
-</style>
-<div class="layui-fluid">
-    <div class="layui-row layui-col-space15" id="app">
-        <!--搜索条件-->
-        <div class="layui-col-md12">
-            <div class="layui-card">
-                <div class="layui-card-header">搜索条件</div>
-                <div class="layui-card-body">
-                    <div class="layui-carousel layadmin-carousel layadmin-shortcut" lay-anim="" lay-indicator="inside" lay-arrow="none" style="background:none">
-                        <form class="layui-form layui-form-pane" action="">
-                            <div class="layui-form-item">
-
-                                <div class="layui-col-lg12">
-                                    <label class="layui-form-label" style="top: -5.5px;">搜索条件</label>
-                                    <div class="layui-input-inline">
-                                        <input type="text" id="auction" name="auction" class="layui-input" placeholder="请输入名称,编号">
-                                    </div>
-                                </div>
-                                <div class="layui-inline">
-                                    <div class="layui-input-inline">
-                                        <button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit="search" lay-filter="search">
-                                            <i class="layui-icon layui-icon-search"></i>搜索</button>
-                                    </div>
-                                </div>
-                            </div>
-                        </form>
-                    </div>
-                </div>
-            </div>
-        </div>
-
-        <!-- 中间详细信息-->
-        <div :class="item.col!=undefined ? 'layui-col-sm'+item.col+' '+'layui-col-md'+item.col:'layui-col-sm6 layui-col-md3'"
-             v-for="item in badge" v-cloak="" v-if="item.count > 0">
-        </div>
-        <!--enb-->
-    </div>
-    <!--列表-->
-    <div class="layui-row layui-col-space15">
-        <div class="layui-col-md12">
-            <div class="layui-card">
-                <div class="layui-card-header">场馆列表</div>
-                <div class="layui-card-body">
-                    <div class="layui-btn-container" id="container-action">
-                        <a class="layui-btn layui-btn-sm" 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="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>
-    </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', align: 'center'},
-            {field: 'name', title: '所属场馆', templet: '#name',  align: 'center'},
-            {field: 'anticipate', title: '预约价格', templet: '#anticipate',  align: 'center',style : 'color: #DC143C;'},
-            {field: 'image', title: '封面', templet: '#image', align: 'center', width: '10%',},
-            {field: 'status', title: '状态', templet: '#status', align: 'center'},
-            {field: 'add_time', title: '预约开始', templet: '#add_time',  align: 'center'},
-            {field: 'end_time', title: '预约结束', templet: '#end_time', align: 'center'},
-            {field: 'radd_time', title: '入场开始', templet: '#radd_time',  align: 'center'},
-            {field: 'rend_time', title: '入场结束', templet: '#rend_time',  align: 'center'},
-            {field: 'frequency', title: '场次', templet: '#frequency', align: 'center'},
-            {field: 'b_count', title: '今日预约人数', templet: '#frequency', align: 'center'},
-            {field: 'sort', title: '排序', templet: '#sort', align: 'center'},
-            {field: 'right', title: '操作', align: 'center', toolbar: '#act'},
-        ];
-    });
-
-    //查询
-    layList.search('search',function(where){
-        layList.reload(where,true);
-    });
-
-    //点击事件绑定
-    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('status',function (odj,value) {
-        if(odj.elem.checked==true){
-            layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:1,id:value}}),function (res) {
-                layList.msg(res.msg, function () {
-                    layList.reload();
-                });
-            });
-        }else{
-            layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:0,id:value}}),function (res) {
-                layList.msg(res.msg, function () {
-                    layList.reload();
-                });
-            });
-        }
-    });
-</script>
-{/block}

+ 0 - 935
app/admin/view/auction/auction_booking/create.php

@@ -1,935 +0,0 @@
-<!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.name" 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-form-item">
-                                        <label class="layui-form-label">场馆</label>
-                                        <div class="layui-input-inline">
-                                            <select id="auction_id" name="auction_id" lay-verify="title" v-model="formData.auction_id">
-                                                <option value="">请选择场馆</option>
-                                                {foreach $list as $key=>$vo }
-                                                <option value="{$vo.id}">{$vo.nickname}<option>
-                                                    {/foreach}
-                                            </select>
-                                        </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="is_show" lay-filter="status" value="1" title="上架"
-                                                               :checked="formData.is_show == 1 ? true : false">
-                                                        <input type="radio" name="is_show" lay-filter="status" value="0" title="下架"
-                                                               :checked="formData.is_show == 0 ? true : false">
-                                                    </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="price" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.price" maxlength="100" value="0">
-                                                </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="rise" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.rise" maxlength="100" value="0">
-                                                </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="deduct" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.deduct" maxlength="100" value="0">
-                                                </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 layui-form-text">
-                                                <label class="layui-form-label">商品介绍</label>
-                                                <div class="layui-input-block">
-                                                    <textarea name="info" v-model="formData.info"
-                                                              placeholder="请输入商品简介" class="layui-textarea"></textarea>
-                                                </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 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">排序</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};
-    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: '',
-                name: '',
-                is_show: 1,
-                image:'',
-                price:200,
-                deduct: 1.2,
-                rise: 2.7,
-                info: '',
-                sort: 0,
-                auction_id: ''
-
-            },
-            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_product',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_product",a:'auction_list',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();
-                    });
-
-                })
-            },
-            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 auction_id = $('#auction_id').val();
-                console.log(auction_id);
-                if (that.formData.name === ''){
-                    return that.showMsg('请输入商品名称');
-                }
-                if (auction_id <= 0){
-                    return that.showMsg('请选择场馆');
-                }
-                if (that.formData.image === ''){
-                    return that.showMsg('请输入上传图片');
-                }
-                if (that.formData.price <= 0){
-                    return that.showMsg('请输入价格');
-                }
-                if (that.formData.rise <= 0){
-                    return that.showMsg('涨幅不能为空');
-                }
-                if (that.formData.deduct <= 0){
-                    return that.showMsg('扣除不能为空');
-                }
-
-                that.formData.auction_id = auction_id;
-                that.requestPost(that.U({c:'auction.auctionProduct',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_product',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>

+ 0 - 870
app/admin/view/auction/auction_booking/edit.php

@@ -1,870 +0,0 @@
-<!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="name" lay-verify="title" autocomplete="off"
-                                                           placeholder="场馆名称" class="layui-input" v-model="formData.name" 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-form-item">
-                                        <label class="layui-form-label">场馆</label>
-                                        <div class="layui-input-inline">
-                                            <select id="auction_id" name="auction_id" lay-verify="title" v-model="formData.auction_id">
-                                                <option value="">请选择场馆</option>
-                                                {foreach $list as $key=>$vo }
-                                                <option value="{$vo.id}">{$vo.nickname}<option>
-                                                    {/foreach}
-                                            </select>
-                                        </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="is_show" lay-filter="status" value="1" title="上架"
-                                                               :checked="formData.is_show == 1 ? true : false">
-                                                        <input type="radio" name="is_show" lay-filter="status" value="0" title="下架"
-                                                               :checked="formData.is_show == 0 ? true : false">
-                                                    </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="price" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.price" maxlength="100" value="0">
-                                                </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="rise" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.rise" maxlength="100" value="0">
-                                                </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="deduct" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.deduct" maxlength="100" value="0">
-                                                </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 layui-form-text">
-                                                <label class="layui-form-label">商品介绍</label>
-                                                <div class="layui-input-block">
-                                                    <textarea name="info" v-model="formData.info"
-                                                              placeholder="请输入商品简介" class="layui-textarea"></textarea>
-                                                </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 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">排序</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};
-    layui.use('laydate', function(){
-        var laydate = layui.laydate;
-    })
-    //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: {
-                description: '',
-                name: '',
-                is_show: 1,
-                image:'',
-                price:'',
-                deduct: '',
-                rise: '',
-                info: '',
-                sort: '',
-                auction_id: ''
-
-            },
-            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_product',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_product",a:'get_list',q:{id:that.id}})).then(function (res) {
-
-                    var productInfo = res.data || {};
-                    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 auction_id = $('#auction_id').val();
-                if (that.formData.name === ''){
-                    return that.showMsg('请输入商品名称');
-                }
-                if (auction_id <= 0){
-                    return that.showMsg('请选择场馆');
-                }
-                if (that.formData.image === ''){
-                    return that.showMsg('请输入上传图片');
-                }
-                if (that.formData.price <= 0){
-                    return that.showMsg('请输入价格');
-                }
-                if (that.formData.rise <= 0){
-                    return that.showMsg('涨幅不能为空');
-                }
-                if (that.formData.deduct <= 0){
-                    return that.showMsg('扣除不能为空');
-                }
-
-                that.formData.auction_id = auction_id;
-                $('#submit').attr('disabled', 'disabled').text('保存中...');
-                that.requestPost(that.U({c:'auction.auction_product',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_product',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>

+ 0 - 314
app/admin/view/auction/auction_booking/index.php

@@ -1,314 +0,0 @@
-{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">
-
-                    <form class="layui-form layui-form-pane" action="">
-                        <div class="layui-form-item">
-                            <div class="layui-inline">
-                                <label class="layui-form-label" style="top: -4.5px">所有场馆</label>
-                                <div class="layui-input-block">
-                                    <select name="auction_id">
-                                        <option value=" ">全部</option>
-                                        {volist name='auction' id='vo'}
-                                        <option value="{$vo.id}">{$vo.nickname}</option>
-                                        {/volist}
-                                    </select>
-                                </div>
-                            </div>
-                            <div class="layui-inline">
-                                <label class="layui-form-label" style="top: -4.5px">搜索</label>
-                                <div class="layui-input-block">
-                                    <input type="text" name="store_name" class="layui-input" placeholder="账号,昵称.,编号">
-                                </div>
-                            </div>
-                            <div class="layui-col-lg12">
-                                <label class="layui-form-label">创建时间:</label>
-                                <div class="layui-input-block" data-type="data" v-cloak="">
-                                    <button class="layui-btn layui-btn-sm" type="button" v-for="item in dataList"
-                                            @click="setData(item)"
-                                            :class="{'layui-btn-primary':where.data!=item.value}">{{item.name}}
-                                    </button>
-                                    <button class="layui-btn layui-btn-sm" type="button" ref="time"
-                                            @click="setData({value:'zd',is_zd:true})"
-                                            :class="{'layui-btn-primary':where.data!='zd'}">自定义
-                                    </button>
-                                    <button type="button" class="layui-btn layui-btn-sm layui-btn-primary"
-                                            v-show="showtime==true" ref="date_time">{$year.0} - {$year.1}
-                                    </button>
-                                </div>
-                            </div>
-                            <div class="layui-inline" style="top: -5px">
-                                <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="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="status">
-                        {{#  if(d.status < 1){ }}
-                        <button type="button" name="status" class="layui-btn-disabled layui-btn-xs" id="">
-                            已退回
-                        </button>
-                        {{#  } else if (d.status === 1){ }}
-                        <button type="button" name="status" class="layui-btn layui-btn-xs layui-btn-danger" id="">
-                            正常
-                        </button>
-                        {{#  } else{ }}
-                        <button type="button" name="status" class="layui-btn layui-btn-xs layui-btn-danger" id="">
-                            扣除
-                        </button>
-                        {{#  } }}
-                    </script>
-                    <script type="text/html" id="act">
-                        <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-event='th' id="">
-                            退回
-                        </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>
-    //实例化form
-    layList.form.render();
-    layList.tableList('List', "{:Url('list')}", function () {
-        return [
-            {type: 'checkbox'},
-            {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%', templet: '#id'},
-            {field: 'name', title: '场馆', templet: '#name',  align: 'center'},
-            {field: 'account', title: '账号', templet: '#account',  align: 'center'},
-            {field: 'nickname', title: '呢称', templet: '#nickname',  align: 'center'},
-            {field: 'anticipate', title: '预约卷', templet: '#price',  align: 'center', style : 'color: #DC143C;'},
-            {field: 'frequency', title: '场次', templet: '#frequency',  align: 'center'},
-            {field: 'status', title: '状态', templet: '#status', align: 'center'},
-            {field: 'create_time', title: '预约时间', templet: '#date', 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_booking',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 'th':
-                var url=layList.U({c:'auction.auction_booking',a:'th',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;
-
-
-                break;
-            case 'edit':
-                location.href = layList.U({a:'edit',q:{id:data.id}});
-                break;
-        }
-    })
-
-    //查询
-    layList.search('search',function(where){
-        console.log(111);
-        layList.reload(where,true);
-    });
-
-    //改状态
-    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();
-                });
-            });
-        }
-    });
-    require(['vue'], function (Vue) {
-        new Vue({
-            el: "#app",
-            data: {
-                badge: [],
-                dataList: [
-                    {name: '全部', value: ''},
-                    {name: '今天', value: 'today'},
-                    {name: '昨天', value: 'yesterday'},
-                    {name: '最近7天', value: 'lately7'},
-                    {name: '最近30天', value: 'lately30'},
-                    {name: '本月', value: 'month'},
-                    {name: '本年', value: 'year'},
-                ],
-                where: {
-                    data: '',
-                    status: status,
-                    type: '',
-                    pay_type: '',
-                    excel: 0,
-                },
-                showtime: false,
-            },
-            watch: {
-                'where.status': function () {
-                    this.where.excel = 0;
-                    this.getBadge();
-                    layList.reload(this.where, true);
-                },
-                'where.data': function () {
-                    this.where.excel = 0;
-                    this.getBadge();
-                    layList.reload(this.where, true);
-                },
-                'where.type': function () {
-                    this.where.excel = 0;
-                    this.getBadge();
-                    layList.reload(this.where, true);
-                },
-                'where.pay_type': function () {
-                    this.where.excel = 0;
-                    this.getBadge();
-                    layList.reload(this.where, true);
-                }
-            },
-            methods: {
-                setData: function (item) {
-                    var that = this;
-                    if (item.is_zd == true) {
-                        that.showtime = true;
-                        this.where.data = this.$refs.date_time.innerText;
-                    } else {
-                        this.showtime = false;
-                        this.where.data = item.value;
-                    }
-                },
-                getBadge: function () {
-                    var that = this;
-                    layList.basePost(layList.Url({c: 'order.store_order', a: 'getBadge'}), this.where, function (rem) {
-                        that.badge = rem.data;
-                    });
-                },
-                search: function () {
-                    this.where.excel = 0;
-                    this.getBadge();
-                    layList.reload(this.where, true);
-                },
-                refresh: function () {
-                    layList.reload();
-                    this.getBadge();
-                },
-                excel: function () {
-                    this.where.excel = 1;
-                    location.href = layList.U({c: 'order.store_order', a: 'order_list', q: this.where});
-                    this.where.excel = 0;
-                }
-            },
-            mounted: function () {
-                var that = this;
-                that.getBadge();
-                window.formReload = this.search;
-                layList.laydate.render({
-                    elem: this.$refs.date_time,
-                    trigger: 'click',
-                    eventElem: this.$refs.time,
-                    range: true,
-                    change: function (value) {
-                        that.where.data = value;
-                    }
-                });
-            }
-        })
-    });
-</script>
-{/block}

+ 0 - 873
app/admin/view/auction/auction_gu/create.php

@@ -1,873 +0,0 @@
-<!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="name" lay-verify="title" autocomplete="off"
-                                                           placeholder="场馆名称" class="layui-input" v-model="formData.name" 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-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">绑定用户</label>
-                                                <div class="layui-input-inline">
-                                                    <select id="uid" name="uid" lay-verify="title" v-model="formData.uid">
-                                                        {foreach $user as $key=>$vo }
-                                                        <option value="{$vo.uid}">{$vo.nickname}<option>
-                                                            {/foreach}
-                                                    </select>
-                                                </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 layui-form-text">
-                                                <label class="layui-form-label">会馆简介</label>
-                                                <div class="layui-input-block">
-                                                    <textarea name="info" v-model="formData.info"
-                                                              placeholder="请输入商品简介" class="layui-textarea"></textarea>
-                                                </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 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};
-    //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: {
-                name: '',
-                image:'',
-                description: '',
-                info: '',
-                sort: 10,
-                uid:''
-            },
-            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_gu',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();
-                    });
-                })
-            },
-            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 uid = $('#uid').val();
-                console.log(uid);
-                that.formData.uid = uid;
-                if (!that.formData['uid']){
-                    return that.showMsg('请绑定用户');
-                }
-                if (!that.formData['name']){
-                    return that.showMsg('请填写名称');
-                }
-                if (!that.formData['image']){
-                    return that.showMsg('请上传图片');
-                }
-
-                that.formData.description = that.getContent();
-                that.requestPost(that.U({c:'auction.auction_gu',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_gu',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>

+ 0 - 814
app/admin/view/auction/auction_gu/edit.php

@@ -1,814 +0,0 @@
-<!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="name" lay-verify="title" autocomplete="off"
-                                                           placeholder="场馆名称" class="layui-input" v-model="formData.name" 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-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">绑定用户</label>
-                                                <div class="layui-input-inline">
-                                                    <select id="uid" name="uid" lay-verify="title" v-model="formData.uid">
-                                                        {foreach $user as $key=>$vo }
-                                                        <option value="{$vo.uid}">{$vo.nickname}<option>
-                                                            {/foreach}
-                                                    </select>
-                                                </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 layui-form-text">
-                                                <label class="layui-form-label">会馆简介</label>
-                                                <div class="layui-input-block">
-                                                    <textarea name="info" v-model="formData.info"
-                                                              placeholder="请输入商品简介" class="layui-textarea"></textarea>
-                                                </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 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};
-    //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: {
-                name: '',
-                image:'',
-                sort:'',
-                description: '',
-                info: '',
-                uid:''
-
-            },
-            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_gu',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_gu",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 that = this;
-
-                var uid = $('#uid').val();
-                console.log(uid);
-                that.formData.uid = uid;
-                if (!that.formData['uid']){
-                    return that.showMsg('请绑定用户');
-                }
-                if (!that.formData['name']){
-                    return that.showMsg('请填写名称');
-                }
-                if (!that.formData['image']){
-                    return that.showMsg('请上传图片');
-                }
-
-                that.formData.description = that.getContent();
-                $('#submit').attr('disabled', 'disabled').text('修改中...');
-                that.requestPost(that.U({c:'auction.auction_gu',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_gu',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>

+ 0 - 164
app/admin/view/auction/auction_gu/index.php

@@ -1,164 +0,0 @@
-{extend name="public/container"}
-{block name="head_top"}
-
-{/block}
-{block name="content"}
-<style>
-    .btn-outline{
-        border:none;
-    }
-    .btn-outline:hover{
-        background-color: #0e9aef;
-        color: #fff;
-    }
-    .layui-form-item .layui-btn {
-        margin-top: 5px;
-        margin-right: 10px;
-    }
-    .layui-btn-primary{
-        margin-right: 10px;
-        margin-left: 0!important;
-    }
-    label{
-        margin-bottom: 0!important;
-        margin-top: 4px;
-    }
-</style>
-<div class="layui-fluid">
-    <div class="layui-row layui-col-space15" id="app">
-        <!--搜索条件-->
-        <div class="layui-col-md12">
-            <div class="layui-card">
-                <div class="layui-card-header">搜索条件</div>
-                <div class="layui-card-body">
-                    <div class="layui-carousel layadmin-carousel layadmin-shortcut" lay-anim="" lay-indicator="inside" lay-arrow="none" style="background:none">
-                        <form class="layui-form layui-form-pane" action="">
-                            <div class="layui-form-item">
-
-                                <div class="layui-col-lg12">
-                                    <label class="layui-form-label" style="top: -5.5px;">搜索条件</label>
-                                    <div class="layui-input-inline">
-                                        <input type="text" id="auction" name="auction" class="layui-input" placeholder="请输入名称,编号">
-                                    </div>
-                                </div>
-                                <div class="layui-inline">
-                                    <div class="layui-input-inline">
-                                        <button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit="search" lay-filter="search">
-                                            <i class="layui-icon layui-icon-search"></i>搜索</button>
-                                    </div>
-                                </div>
-                            </div>
-                        </form>
-                    </div>
-                </div>
-            </div>
-        </div>
-
-        <!-- 中间详细信息-->
-        <div :class="item.col!=undefined ? 'layui-col-sm'+item.col+' '+'layui-col-md'+item.col:'layui-col-sm6 layui-col-md3'"
-             v-for="item in badge" v-cloak="" v-if="item.count > 0">
-        </div>
-        <!--enb-->
-    </div>
-    <!--列表-->
-    <div class="layui-row layui-col-space15">
-        <div class="layui-col-md12">
-            <div class="layui-card">
-                <div class="layui-card-header">场馆列表</div>
-                <div class="layui-card-body">
-                    <div class="layui-btn-container" id="container-action">
-                        <a class="layui-btn layui-btn-sm" 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="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>
-    </div>
-    <!--end-->
-</div>
-<script src="{__ADMIN_PATH}js/layuiList.js"></script>
-{/block}
-{block name="script"}
-<script>
-    layList.tableList('List', "{:Url('list')}", function () {
-        return [
-            {type: 'checkbox'},
-            {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%', templet: '#id'},
-            {field: 'name', title: '会馆名称', templet: '#nickname', align: 'center'},
-            {field: 'nickname', title: '会馆拥有人', templet: '#nickname', align: 'center'},
-            {field: 'image', title: '封面', templet: '#image', align: 'center', width: '10%',},
-            {field: 'status', title: '状态', templet: '#status', align: 'center'},
-            {field: 'right', title: '操作', align: 'center', toolbar: '#act'},
-        ];
-    });
-
-    //查询
-    layList.search('search',function(where){
-        layList.reload(where,true);
-    });
-
-    //点击事件绑定
-    layList.tool(function (event,data,obj) {
-        switch (event) {
-            case 'delete':
-                var url=layList.U({c:'auction.auction_gu',a:'delete',q:{id:data.id}});
-                var code = {title:"操作提示",text:"确定将该商品移入回收站吗?",type:'info',confirm:'是的,移入回收站'};
-                $eb.$swal('delete',function(){
-                    $eb.axios.get(url).then(function(res){
-                        if(res.status == 200 && res.data.code == 200) {
-                            $eb.$swal('success',res.data.msg);
-                            obj.del();
-                            location.reload();
-                        }else
-                            return Promise.reject(res.data.msg || '删除失败')
-                    }).catch(function(err){
-                        $eb.$swal('error',err);
-                    });
-                },code)
-                break;
-            case 'open_image':
-                $eb.openImage(data.image);
-                break;
-            case 'edit':
-                location.href = layList.U({a:'edit',q:{id:data.id}});
-                break;
-        }
-    })
-
-
-    //改状态
-    layList.switch('status',function (odj,value) {
-        if(odj.elem.checked==true){
-            layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:1,id:value}}),function (res) {
-                layList.msg(res.msg, function () {
-                    layList.reload();
-                });
-            });
-        }else{
-            layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:0,id:value}}),function (res) {
-                layList.msg(res.msg, function () {
-                    layList.reload();
-                });
-            });
-        }
-    });
-</script>
-{/block}

+ 0 - 935
app/admin/view/auction/auction_order/create.php

@@ -1,935 +0,0 @@
-<!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.name" 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-form-item">
-                                        <label class="layui-form-label">场馆</label>
-                                        <div class="layui-input-inline">
-                                            <select id="auction_id" name="auction_id" lay-verify="title" v-model="formData.auction_id">
-                                                <option value="">请选择场馆</option>
-                                                {foreach $list as $key=>$vo }
-                                                <option value="{$vo.id}">{$vo.nickname}<option>
-                                                    {/foreach}
-                                            </select>
-                                        </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="is_show" lay-filter="status" value="1" title="上架"
-                                                               :checked="formData.is_show == 1 ? true : false">
-                                                        <input type="radio" name="is_show" lay-filter="status" value="0" title="下架"
-                                                               :checked="formData.is_show == 0 ? true : false">
-                                                    </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="price" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.price" maxlength="100" value="0">
-                                                </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="rise" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.rise" maxlength="100" value="0">
-                                                </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="deduct" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.deduct" maxlength="100" value="0">
-                                                </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 layui-form-text">
-                                                <label class="layui-form-label">商品介绍</label>
-                                                <div class="layui-input-block">
-                                                    <textarea name="info" v-model="formData.info"
-                                                              placeholder="请输入商品简介" class="layui-textarea"></textarea>
-                                                </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 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">排序</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};
-    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: '',
-                name: '',
-                is_show: 1,
-                image:'',
-                price:200,
-                deduct: 1.2,
-                rise: 2.7,
-                info: '',
-                sort: 0,
-                auction_id: ''
-
-            },
-            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_product',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_product",a:'auction_list',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();
-                    });
-
-                })
-            },
-            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 auction_id = $('#auction_id').val();
-                console.log(auction_id);
-                if (that.formData.name === ''){
-                    return that.showMsg('请输入商品名称');
-                }
-                if (auction_id <= 0){
-                    return that.showMsg('请选择场馆');
-                }
-                if (that.formData.image === ''){
-                    return that.showMsg('请输入上传图片');
-                }
-                if (that.formData.price <= 0){
-                    return that.showMsg('请输入价格');
-                }
-                if (that.formData.rise <= 0){
-                    return that.showMsg('涨幅不能为空');
-                }
-                if (that.formData.deduct <= 0){
-                    return that.showMsg('扣除不能为空');
-                }
-
-                that.formData.auction_id = auction_id;
-                that.requestPost(that.U({c:'auction.auctionProduct',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_product',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>

+ 0 - 870
app/admin/view/auction/auction_order/edit.php

@@ -1,870 +0,0 @@
-<!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="name" lay-verify="title" autocomplete="off"
-                                                           placeholder="场馆名称" class="layui-input" v-model="formData.name" 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-form-item">
-                                        <label class="layui-form-label">场馆</label>
-                                        <div class="layui-input-inline">
-                                            <select id="auction_id" name="auction_id" lay-verify="title" v-model="formData.auction_id">
-                                                <option value="">请选择场馆</option>
-                                                {foreach $list as $key=>$vo }
-                                                <option value="{$vo.id}">{$vo.nickname}<option>
-                                                    {/foreach}
-                                            </select>
-                                        </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="is_show" lay-filter="status" value="1" title="上架"
-                                                               :checked="formData.is_show == 1 ? true : false">
-                                                        <input type="radio" name="is_show" lay-filter="status" value="0" title="下架"
-                                                               :checked="formData.is_show == 0 ? true : false">
-                                                    </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="price" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.price" maxlength="100" value="0">
-                                                </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="rise" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.rise" maxlength="100" value="0">
-                                                </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="deduct" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.deduct" maxlength="100" value="0">
-                                                </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 layui-form-text">
-                                                <label class="layui-form-label">商品介绍</label>
-                                                <div class="layui-input-block">
-                                                    <textarea name="info" v-model="formData.info"
-                                                              placeholder="请输入商品简介" class="layui-textarea"></textarea>
-                                                </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 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">排序</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};
-    layui.use('laydate', function(){
-        var laydate = layui.laydate;
-    })
-    //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: {
-                description: '',
-                name: '',
-                is_show: 1,
-                image:'',
-                price:'',
-                deduct: '',
-                rise: '',
-                info: '',
-                sort: '',
-                auction_id: ''
-
-            },
-            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_product',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_product",a:'get_list',q:{id:that.id}})).then(function (res) {
-
-                    var productInfo = res.data || {};
-                    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 auction_id = $('#auction_id').val();
-                if (that.formData.name === ''){
-                    return that.showMsg('请输入商品名称');
-                }
-                if (auction_id <= 0){
-                    return that.showMsg('请选择场馆');
-                }
-                if (that.formData.image === ''){
-                    return that.showMsg('请输入上传图片');
-                }
-                if (that.formData.price <= 0){
-                    return that.showMsg('请输入价格');
-                }
-                if (that.formData.rise <= 0){
-                    return that.showMsg('涨幅不能为空');
-                }
-                if (that.formData.deduct <= 0){
-                    return that.showMsg('扣除不能为空');
-                }
-
-                that.formData.auction_id = auction_id;
-                $('#submit').attr('disabled', 'disabled').text('保存中...');
-                that.requestPost(that.U({c:'auction.auction_product',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_product',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>

+ 0 - 329
app/admin/view/auction/auction_order/index.php

@@ -1,329 +0,0 @@
-{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">
-
-                    <form class="layui-form layui-form-pane" action="">
-                        <div class="layui-form-item">
-<!--                            <div class="layui-inline">-->
-<!--                                <label class="layui-form-label" style="top: -4.5px">所有场馆</label>-->
-<!--                                <div class="layui-input-block">-->
-<!--                                    <select name="auction_id">-->
-<!--                                        <option value=" ">全部</option>-->
-<!--                                        {volist name='auction' id='vo'}-->
-<!--                                        <option value="{$vo.id}">{$vo.nickname}</option>-->
-<!--                                        {/volist}-->
-<!--                                    </select>-->
-<!--                                </div>-->
-<!--                            </div>-->
-                            <div class="layui-inline">
-                                <label class="layui-form-label" style="top: -4.5px">搜索</label>
-                                <div class="layui-input-block">
-                                    <input type="text" name="store_name" class="layui-input" placeholder="订单号,账号,昵称,编号">
-                                </div>
-                            </div>
-                            <div class="layui-col-lg12">
-                                <label class="layui-form-label">创建时间:</label>
-                                <div class="layui-input-block" data-type="data" v-cloak="">
-                                    <button class="layui-btn layui-btn-sm" type="button" v-for="item in dataList"
-                                            @click="setData(item)"
-                                            :class="{'layui-btn-primary':where.data!=item.value}">{{item.name}}
-                                    </button>
-                                    <button class="layui-btn layui-btn-sm" type="button" ref="time"
-                                            @click="setData({value:'zd',is_zd:true})"
-                                            :class="{'layui-btn-primary':where.data!='zd'}">自定义
-                                    </button>
-                                    <button type="button" class="layui-btn layui-btn-sm layui-btn-primary"
-                                            v-show="showtime==true" ref="date_time">{$year.0} - {$year.1}
-                                    </button>
-                                </div>
-                            </div>
-                            <div class="layui-inline" style="top: -5px">
-                                <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="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="status">
-                        {{#  if(d.status < 1){ }}
-                        <button type="button" name="status" class="layui-btn-disabled layui-btn-xs" id="">
-                            过期
-                        </button>
-                        {{#  } else if(d.status == 1) { }}
-                        <button type="button" name="status" class="layui-btn-xs layui-btn-disabled" id="">
-                            待上传
-                        </button>
-                        {{#  } else if(d.status == 2) { }}
-                        <button type="button" name="status" class="layui-btn layui-btn-xs layui-btn-danger" id="">
-                            待审核
-                        </button>
-                        {{#  } else if(d.status == 3) { }}
-                        <button type="button" name="status" class="layui-btn layui-btn-xs layui-btn-danger" id="">
-                            完成
-                        </button>
-                        {{#  } }}
-                    </script>
-                    <script type="text/html" id="upload_image">
-                        {{#  if(d.upload_image  ===  ''){ }}
-                        <button type="button" name="status" class="layui-btn-disabled layui-btn-xs" id="">
-                            未上传打款凭证
-                        </button>
-                        {{#  } else { }}
-                            <img style="cursor: pointer" lay-event="open_image" src="{{d.upload_image}}">
-                        {{#  } }}
-                    </script>
-                    <script type="text/html" id="act">
-                        <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-event='qd' id="">
-                            通过
-                        </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>
-    //实例化form
-    layList.form.render();
-    layList.tableList('List', "{:Url('list')}", function () {
-        return [
-            {type: 'checkbox'},
-            {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%', templet: '#id'},
-            {field: 'order_id', title: '订单号', templet: '#order_id',  align: 'center'},
-            {field: 'account', title: '购买用户账号', templet: '#account',  align: 'center'},
-            {field: 'nickname', title: '购买用户呢称', templet: '#nickname',  align: 'center'},
-            {field: 'name', title: '商品', templet: '#name',  align: 'center'},
-            {field: 'price', title: '购买价格', templet: '#price',  align: 'center', style : 'color: #DC143C;'},
-            {field: 'image', title: '图片', templet: '#image',  align: 'center'},
-            {field: 'upload_image', title: '打款凭证', templet: '#upload_image',  align: 'center'},
-            {field: 'status', title: '状态', templet: '#status', align: 'center'},
-            {field: 'create_time', title: '预约时间', templet: '#date', 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_order',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 'qd':
-                var url=layList.U({c:'auction.auction_order',a:'qd',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.search('search',function(where){
-        console.log(111);
-        layList.reload(where,true);
-    });
-
-    //改状态
-    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();
-                });
-            });
-        }
-    });
-    require(['vue'], function (Vue) {
-        new Vue({
-            el: "#app",
-            data: {
-                badge: [],
-                dataList: [
-                    {name: '全部', value: ''},
-                    {name: '今天', value: 'today'},
-                    {name: '昨天', value: 'yesterday'},
-                    {name: '最近7天', value: 'lately7'},
-                    {name: '最近30天', value: 'lately30'},
-                    {name: '本月', value: 'month'},
-                    {name: '本年', value: 'year'},
-                ],
-                where: {
-                    data: '',
-                    status: status,
-                    type: '',
-                    pay_type: '',
-                    excel: 0,
-                },
-                showtime: false,
-            },
-            watch: {
-                'where.status': function () {
-                    this.where.excel = 0;
-                    this.getBadge();
-                    layList.reload(this.where, true);
-                },
-                'where.data': function () {
-                    this.where.excel = 0;
-                    this.getBadge();
-                    layList.reload(this.where, true);
-                },
-                'where.type': function () {
-                    this.where.excel = 0;
-                    this.getBadge();
-                    layList.reload(this.where, true);
-                },
-                'where.pay_type': function () {
-                    this.where.excel = 0;
-                    this.getBadge();
-                    layList.reload(this.where, true);
-                }
-            },
-            methods: {
-                setData: function (item) {
-                    var that = this;
-                    if (item.is_zd == true) {
-                        that.showtime = true;
-                        this.where.data = this.$refs.date_time.innerText;
-                    } else {
-                        this.showtime = false;
-                        this.where.data = item.value;
-                    }
-                },
-                getBadge: function () {
-                    var that = this;
-                    layList.basePost(layList.Url({c: 'order.store_order', a: 'getBadge'}), this.where, function (rem) {
-                        that.badge = rem.data;
-                    });
-                },
-                search: function () {
-                    this.where.excel = 0;
-                    this.getBadge();
-                    layList.reload(this.where, true);
-                },
-                refresh: function () {
-                    layList.reload();
-                    this.getBadge();
-                },
-                excel: function () {
-                    this.where.excel = 1;
-                    location.href = layList.U({c: 'order.store_order', a: 'order_list', q: this.where});
-                    this.where.excel = 0;
-                }
-            },
-            mounted: function () {
-                var that = this;
-                that.getBadge();
-                window.formReload = this.search;
-                layList.laydate.render({
-                    elem: this.$refs.date_time,
-                    trigger: 'click',
-                    eventElem: this.$refs.time,
-                    range: true,
-                    change: function (value) {
-                        that.where.data = value;
-                    }
-                });
-            }
-        })
-    });
-</script>
-{/block}

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

@@ -1,965 +0,0 @@
-<!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.name" 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-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 pictrue" v-for="(item,index) in formData.slider_image">
-                                                    <img :src="item">
-                                                    <i class="layui-icon closes" @click="deleteImage('slider_image',index)">&#x1007</i>
-                                                </div>
-                                                <div class="pictrueBox">
-                                                    <div class="upLoad" @click="uploadImage('slider_image')"
-                                                         v-if="formData.slider_image.length <= rule.slider_image.maxLength">
-                                                        <i class="layui-icon layui-icon-camera" class="iconfont"
-                                                           style="font-size: 26px;"></i>
-                                                    </div>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </div>
-
-                                    <div class="layui-form-item">
-                                        <label class="layui-form-label">场次</label>
-                                        <div class="layui-input-inline">
-                                            <select id="auction_id" name="auction_id" lay-verify="title" v-model="formData.auction_id">
-                                                <option value="">请选择场馆</option>
-                                                {foreach $list as $key=>$vo }
-                                                <option value="{$vo.id}">{$vo.nickname}<option>
-                                                    {/foreach}
-                                            </select>
-                                        </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="is_show" lay-filter="status" value="1" title="上架"
-                                                               :checked="formData.is_show == 1 ? true : false">
-                                                        <input type="radio" name="is_show" lay-filter="status" value="0" title="下架"
-                                                               :checked="formData.is_show == 0 ? true : false">
-                                                    </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="price" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.price" maxlength="100" value="0">
-                                                </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="hanging_price" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.hanging_price" maxlength="100" value="0">
-                                                </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="rise" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.rise" maxlength="100" value="0">
-                                                </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="deduct" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.deduct" maxlength="100" value="0">
-                                                </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 layui-form-text">
-                                                <label class="layui-form-label">商品介绍</label>
-                                                <div class="layui-input-block">
-                                                    <textarea name="info" v-model="formData.info"
-                                                              placeholder="请输入商品简介" class="layui-textarea"></textarea>
-                                                </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 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">排序</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};
-    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: '',
-                name: '',
-                is_show: 1,
-                image:'',
-                price:'',
-                deduct: 1.2,
-                rise: 2.7,
-                info: '',
-                sort: 0,
-                auction_id: '',
-                hanging_price:'',
-                slider_image: []
-
-            },
-            rule: { //多图选择规则
-                slider_image: {
-                    maxLength: 5
-                }
-            },
-            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_product',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_product",a:'auction_list',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();
-                    });
-
-                })
-            },
-            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 auction_id = $('#auction_id').val();
-                console.log(auction_id);
-                if (that.formData.name === ''){
-                    return that.showMsg('请输入商品名称');
-                }
-                if (auction_id <= 0){
-                    return that.showMsg('请选择场馆');
-                }
-                if (that.formData.image === ''){
-                    return that.showMsg('请输入上传图片');
-                }
-                if (that.formData.price <= 0){
-                    return that.showMsg('请输入价格');
-                }
-                if (that.formData.rise <= 0){
-                    return that.showMsg('涨幅不能为空');
-                }
-                if (that.formData.deduct <= 0){
-                    return that.showMsg('扣除不能为空');
-                }
-
-                that.formData.auction_id = auction_id;
-                that.requestPost(that.U({c:'auction.auctionProduct',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_product',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>

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

@@ -1,900 +0,0 @@
-<!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="name" lay-verify="title" autocomplete="off"
-                                                           placeholder="场馆名称" class="layui-input" v-model="formData.name" 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-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 pictrue" v-for="(item,index) in formData.slider_image">
-                                                    <img :src="item">
-                                                    <i class="layui-icon closes" @click="deleteImage('slider_image',index)">&#x1007</i>
-                                                </div>
-                                                <div class="pictrueBox">
-                                                    <div class="upLoad" @click="uploadImage('slider_image')"
-                                                         v-if="formData.slider_image.length <= rule.slider_image.maxLength">
-                                                        <i class="layui-icon layui-icon-camera" class="iconfont"
-                                                           style="font-size: 26px;"></i>
-                                                    </div>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </div>
-
-                                    <div class="layui-form-item">
-                                        <label class="layui-form-label">场馆</label>
-                                        <div class="layui-input-inline">
-                                            <select id="auction_id" name="auction_id" lay-verify="title" v-model="formData.auction_id">
-                                                <option value="">请选择场馆</option>
-                                                {foreach $list as $key=>$vo }
-                                                <option value="{$vo.id}">{$vo.nickname}<option>
-                                                    {/foreach}
-                                            </select>
-                                        </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="is_show" lay-filter="status" value="1" title="上架"
-                                                               :checked="formData.is_show == 1 ? true : false">
-                                                        <input type="radio" name="is_show" lay-filter="status" value="0" title="下架"
-                                                               :checked="formData.is_show == 0 ? true : false">
-                                                    </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="price" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.price" maxlength="100" value="0">
-                                                </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="hanging_price" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.hanging_price" maxlength="100" value="0">
-                                                </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="rise" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.rise" maxlength="100" value="0">
-                                                </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="deduct" lay-verify="title" autocomplete="off" class="layui-input" v-model="formData.deduct" maxlength="100" value="0">
-                                                </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 layui-form-text">
-                                                <label class="layui-form-label">商品介绍</label>
-                                                <div class="layui-input-block">
-                                                    <textarea name="info" v-model="formData.info"
-                                                              placeholder="请输入商品简介" class="layui-textarea"></textarea>
-                                                </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 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">排序</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};
-    layui.use('laydate', function(){
-        var laydate = layui.laydate;
-    })
-    //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: {
-                description: '',
-                name: '',
-                is_show: 1,
-                image:'',
-                price:'',
-                deduct: '',
-                rise: '',
-                info: '',
-                sort: '',
-                auction_id: '',
-                hanging_price: '',
-                slider_image: []
-
-            },
-            rule: { //多图选择规则
-                slider_image: {
-                    maxLength: 5
-                }
-            },
-            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_product',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_product",a:'get_list',q:{id:that.id}})).then(function (res) {
-
-                    var productInfo = res.data || {};
-                    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 auction_id = $('#auction_id').val();
-                if (that.formData.name === ''){
-                    return that.showMsg('请输入商品名称');
-                }
-                if (auction_id <= 0){
-                    return that.showMsg('请选择场馆');
-                }
-                if (that.formData.image === ''){
-                    return that.showMsg('请输入上传图片');
-                }
-                if (that.formData.price <= 0){
-                    return that.showMsg('请输入价格');
-                }
-                if (that.formData.rise <= 0){
-                    return that.showMsg('涨幅不能为空');
-                }
-                if (that.formData.deduct <= 0){
-                    return that.showMsg('扣除不能为空');
-                }
-
-                that.formData.auction_id = auction_id;
-                $('#submit').attr('disabled', 'disabled').text('保存中...');
-                that.requestPost(that.U({c:'auction.auction_product',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_product',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>

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

@@ -1,181 +0,0 @@
-{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">
-
-                    <form class="layui-form layui-form-pane" action="">
-                        <div class="layui-form-item">
-                            <div class="layui-inline">
-                                <label class="layui-form-label" style="top: -4.5px">所有场次</label>
-                                <div class="layui-input-block">
-                                    <select name="auction_id">
-                                        <option value=" ">全部</option>
-                                        {volist name='auction' id='vo'}
-                                        <option value="{$vo.id}">{$vo.nickname}</option>
-                                        {/volist}
-                                    </select>
-                                </div>
-                            </div>
-                            <div class="layui-inline">
-                                <label class="layui-form-label" style="top: -4.5px">搜索</label>
-                                <div class="layui-input-block">
-                                    <input type="text" name="store_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="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>
-    //实例化form
-    layList.form.render();
-    layList.tableList('List', "{:Url('list')}", function () {
-        return [
-            {type: 'checkbox'},
-            {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%', templet: '#id'},
-            {field: 'name', title: '商品名', templet: '#nickname',  align: 'center'},
-            {field: 'au_name', title: '场次', templet: '#auction_name',  align: 'center'},
-            {field: 'nickname', title: '拥有人', templet: '#nickname',  align: 'center'},
-            {field: 'price', title: '原价', templet: '#price', align: 'center',style : 'color: #DC143C;'},
-            {field: 'hanging_price', title: '挂售价格', templet: '#hanging_price', align: 'center',style : 'color: #DC143C;'},
-            {field: 'image', title: '封面', templet: '#image', align: 'center'},
-            {field: 'is_show', title: '状态', templet: '#is_show', align: 'center'},
-            {field: 'rise', title: '涨幅%', templet: '#rise', align: 'center'},
-            {field: 'deduct', title: '扣除%', templet: '#deduct', align: 'center'},
-            {field: 'sort', title: '排序', templet: '#sort', align: 'center'},
-            {field: 'create_time', title: '创建时间', templet: '#create_time', 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_product',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.search('search',function(where){
-        console.log(111);
-        layList.reload(where,true);
-    });
-
-    //改状态
-    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}

+ 0 - 151
app/admin/view/auction/auction_site/index.php

@@ -1,151 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="UTF-8">
-    <title>竞拍配置</title>
-
-    <link href="{__FRAME_PATH}/css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
-    <link href="{__ADMIN_PATH}/css/layui-admin.css" rel="stylesheet">
-    <link href="{__FRAME_PATH}/css/style.min.css?v=3.0.0" rel="stylesheet">
-    <link href="{__FRAME_PATH}css/font-awesome.min.css?v=4.3.0" rel="stylesheet">
-    <script src="{__PLUG_PATH}vue/dist/vue.min.js"></script>
-    <link href="{__PLUG_PATH}iview/dist/styles/iview.css" rel="stylesheet">
-    <script src="{__PLUG_PATH}iview/dist/iview.min.js"></script>
-    <script src="{__PLUG_PATH}jquery/jquery.min.js"></script>
-    <script src="{__PLUG_PATH}form-create/province_city.js"></script>
-    <script src="{__PLUG_PATH}form-create/form-create.min.js"></script>
-    <link href="{__PLUG_PATH}layui/css/layui.css" rel="stylesheet">
-    <script src="{__PLUG_PATH}layui/layui.all.js"></script>
-    <style>
-        /*弹框样式修改*/
-        .ivu-modal{top: 20px;}
-        .ivu-modal .ivu-modal-body{padding: 10px;}
-        .ivu-modal .ivu-modal-body .ivu-modal-confirm-head{padding:0 0 10px 0;}
-        .ivu-modal .ivu-modal-body .ivu-modal-confirm-footer{display: none;padding-bottom: 10px;}
-        .ivu-date-picker {display: inline-block;line-height: normal;width: 280px;}
-        .ivu-modal-footer{display: none;}
-        .ivu-poptip-popper{text-align: left;}
-        .ivu-icon{padding-left: 5px;}
-        .ivu-btn-long{width: 10%;min-width:100px;margin-left: 18%;}
-    </style>
-</head>
-<body class="gray-bg">
-<div class="wrapper wrapper-content">
-    <div class="row">
-        <div class="col-sm-12">
-            <div class="ibox float-e-margins">
-                <div class="ibox-title">
-                    <h5>系统配置</h5>
-                </div>
-                <div class="tabs-container ibox-title  gray-bg">
-                    <ul class="nav nav-tabs">
-
-
-                        <li ><a href=""><i class="fa fa-{$vo.icon}"></i></a></li>
-
-
-                    </ul>
-
-
-                    <div class="ibox-content">
-
-                        <div class="p-m m-t-sm" id="configboay">
-
-                        </div>
-                    </div>
-            </div>
-        </div>
-    </div>
-</div>
-</body>
-
-<script>
-    formCreate.formSuccess = function(form,$r){
-        <?=$form->getSuccessScript()?>
-        $r.btn.loading(false);
-    };
-
-    (function () {
-        var create = (function () {
-            var getRule = function () {
-                var rule = <?=json_encode($form->getRules())?>;
-                rule.forEach(function (c) {
-                    if ((c.type == 'cascader' || c.type == 'tree') && Object.prototype.toString.call(c.props.data) == '[object String]') {
-                        if (c.props.data.indexOf('js.') === 0) {
-                            c.props.data = window[c.props.data.replace('js.', '')];
-                        }
-                    }
-                });
-                return rule;
-            }, vm = new Vue,name = 'formBuilderExec<?= !$form->getId() ? '' : '_'.$form->getId() ?>';
-            var _b = false;
-            window[name] =  function create(el, callback) {
-                if(_b) return ;
-                _b = true;
-                if (!el) el = document.getElementById('configboay');
-                var $f = formCreate.create(getRule(), {
-                    el: el,
-                    form:<?=json_encode($form->getConfig('form'))?>,
-                    row:<?=json_encode($form->getConfig('row'))?>,
-                    submitBtn:<?=$form->isSubmitBtn() ? '{}' : 'false'?>,
-                    resetBtn:<?=$form->isResetBtn() ? 'true' : '{}'?>,
-                    iframeHelper:true,
-                    global:{
-                        upload: {
-                            props:{
-                                onExceededSize: function (file) {
-                                    vm.$Message.error(file.name + '超出指定大小限制');
-                                },
-                                onFormatError: function () {
-                                    vm.$Message.error(file.name + '格式验证失败');
-                                },
-                                onError: function (error) {
-                                    vm.$Message.error(file.name + '上传失败,(' + error + ')');
-                                },
-                                onSuccess: function (res, file) {
-                                    if (res.code == 200) {
-                                        file.url = res.data.filePath;
-                                    } else {
-                                        vm.$Message.error(res.msg);
-                                    }
-                                },
-                            },
-                        },
-                    },
-                    //表单提交事件
-                    onSubmit: function (formData) {
-                        $f.btn.loading(true);
-                        $.ajax({
-                            url: '<?=$form->getAction()?>',
-                            type: '<?=$form->getMethod()?>',
-                            dataType: 'json',
-                            data: formData,
-                            success: function (res) {
-                                if (res.code == 200) {
-                                    vm.$Message.success(res.msg);
-                                    $f.btn.loading(false);
-                                    formCreate.formSuccess && formCreate.formSuccess(res, $f, formData);
-                                    callback && callback(0, res, $f, formData);
-                                    //TODO 表单提交成功!
-                                } else {
-                                    vm.$Message.error(res.msg || '表单提交失败');
-                                    $f.btn.loading(false);
-                                    callback && callback(1, res, $f, formData);
-                                    //TODO 表单提交失败
-                                }
-                            },
-                            error: function () {
-                                vm.$Message.error('表单提交失败');
-                                $f.btn.loading(false);
-                            }
-                        });
-                    }
-                });
-                return $f;
-            };
-            return window[name];
-        }());
-        window.$f = create();
-    })();
-</script>
-</html>

+ 16 - 16
app/api/controller/AuthController.php

@@ -132,16 +132,16 @@ class AuthController
         $keyName = 'sms.key.' . $key;
         $nowKey = 'sms.' . date('YmdHi');
 
-        if (!Cache::has($keyName))
-            return app('json')->make(401, '发送验证码失败');
+        // if (!Cache::has($keyName))
+        //     return app('json')->make(401, '发送验证码失败');
 
-        if (($num = Cache::get($keyName)) > 2) {
-            if (!$code)
-                return app('json')->make(402, '请输入验证码');
+        // if (($num = Cache::get($keyName)) > 2) {
+        //     if (!$code)
+        //         return app('json')->make(402, '请输入验证码');
 
-            if (!$this->checkCaptcha($key, $code))
-                return app('json')->fail('验证码输入有误');
-        }
+        //     if (!$this->checkCaptcha($key, $code))
+        //         return app('json')->fail('验证码输入有误');
+        // }
 
         $total = 1;
         if ($has = Cache::has($nowKey)) {
@@ -196,14 +196,14 @@ class AuthController
         } catch (ValidateException $e) {
             return app('json')->fail($e->getError());
         }
-//        $verifyCode = CacheService::get('code_' . $account);
-//        if (!$verifyCode)
-//            return app('json')->fail('请先获取验证码');
-//        $verifyCode = substr($verifyCode, 0, 6);
-//        if ($verifyCode != $captcha)
-//            return app('json')->fail('验证码错误');
-//        if (strlen(trim($password)) < 6 || strlen(trim($password)) > 16)
-//            return app('json')->fail('密码必须是在6到16位之间');
+        $verifyCode = CacheService::get('code_' . $account);
+        // if (!$verifyCode)
+        //     return app('json')->fail('请先获取验证码');
+        // $verifyCode = substr($verifyCode, 0, 6);
+        // if ($verifyCode != $captcha)
+        //     return app('json')->fail('验证码错误');
+        if (strlen(trim($password)) < 6 || strlen(trim($password)) > 16)
+            return app('json')->fail('密码必须是在6到16位之间');
         if ($password == '123456') return app('json')->fail('密码太过简单,请输入较为复杂的密码');
         $registerStatus = User::register($account, $password, $spread);
         if ($registerStatus) return app('json')->success('注册成功');

+ 0 - 238
app/api/controller/auction/AuctionController.php

@@ -1,238 +0,0 @@
-<?php
-
-namespace app\api\controller\auction;
-
-
-use app\models\auction\Auction;
-use app\models\auction\AuctionBooking;
-use app\models\auction\AuctionGu;
-use app\models\user\User;
-use app\models\user\UserBill;
-use app\Request;
-use Monolog\Handler\Curl\Util;
-use think\facade\Cache;
-use crmeb\services\{
-    CacheService,
-    ExpressService,
-    SystemConfigService,
-};
-use crmeb\services\UtilService;
-use crmeb\repositories\OrderRepository;
-use think\facade\Db;
-
-
-class AuctionController
-{
-    /**
-     * 场馆列表
-     * @param Request $request
-     * @return mixed
-     */
-    public function list(Request $request)
-    {
-        $data = UtilService::getMore([
-            [['page', 'd'], 0],
-            [['limit', 'd'], 0],
-            ['advance'],
-            ['auction_gu_id']
-        ], $request);
-        if (!$data['auction_gu_id']) return app('json')->fail('数据传入错误');
-        $auctionModel = new \app\models\auction\Auction();
-
-        return app('json')->successful($auctionModel->list($data, $request->uid()));
-
-    }
-
-    /**
-     * 预约场馆
-     * @param Request $request
-     * @return void
-     */
-    public function subscribe(Request $request)
-    {
-        $data = UtilService::postMore([
-            ['id']
-        ]);
-        if (!$data['id']) return app('json')->fail('数据传入错误');
-        $auctionModel = new Auction();
-        $auction = $auctionModel->find($data['id']);
-        if (!$auction)return app('json')->fail('没有此数据');
-
-        if (time() < strtotime($auction['add_time'])){
-            return app('json')->fail('预约未开始');
-        }
-        if (time() > strtotime($auction['end_time'])){
-            return app('json')->fail('预约时间已过');
-        }
-        if (AuctionBooking::where([['uid', '=', $request->uid()], ['auction_id' , '=', $auction['id']], ['frequency', '=', $auction['frequency']]])->find()){
-            return app('json')->fail('当前场馆已预约');
-        }
-
-        $userModel = new User();
-        $user = $userModel->find($request->uid());
-
-        if ($user['anticipate'] < $auction['anticipate']) return app('json')->fail('预约卷不够');
-        $user['anticipate'] = $user['anticipate'] - $auction['anticipate'];// 扣除预约卷
-
-        User::rollbackTrans();
-        $res = $user->save();
-
-        if ($res){
-            AuctionBooking::booking($user['uid'], $auction);
-            UserBill::expend('预约场馆', $user['uid'], 'anticipate','reduce_anticipate', $auction['anticipate'], 0, $user['anticipate'], '预约扣除预约卷'); // 写入记录
-
-            User::commitTrans();
-            return app('json')->successful('预约成功');
-        }else{
-
-            User::rollbackTrans();
-            return app('json')->fail('预约失败');
-        }
-
-    }
-
-    /**
-     * 进入场馆
-     * @param Request $request
-     * @return void
-     */
-    public function advance(Request $request)
-    {
-        $data = UtilService::getMore([
-            ['id']
-        ]);
-        if (!$data['id']) return app('json')->fail('数据传入错误');
-        $auction = Auction::find($data['id']);
-        $booking = AuctionBooking::where([['auction_id', '=',$auction['id']], ['frequency', '=', $auction['frequency']]])->find();
-        $user = $request->user();
-        $time = strtotime(date('Y-m-d', time()));// 今天
-        $today = strtotime(date('Y-m-d', strtotime('+1day')));// 明天
-
-        if ($user['is_new'] == 1 or ($user['green_time'] >= $time and $user['green_time'] <= $today)){
-            // 新人或者绿色通道提前三分钟入场
-            if (strtotime($auction['radd_time']) -3000 > time()){
-                return app('json')->fail('未到进入时间');
-            }
-            if (strtotime($auction['rend_time']) < time()){
-                return app('json')->fail('进场时间已过');
-            }
-
-        }else{
-            if (strtotime($auction['radd_time']) > time()){
-                return app('json')->fail('未到进入时间');
-            }
-            if (strtotime($auction['rend_time']) < time()){
-                return app('json')->fail('进场时间已过');
-            }
-        }
-
-        if ($booking){
-            return app('json')->successful('可进入');
-        }else{
-            return app('json')->fail('未预约');
-        }
-    }
-
-
-    /**
-     * 用户下级
-     * @param Request $request
-     * @return mixed
-     */
-    public function lower(Request $request){
-        $data = UtilService::getMore([
-            [['page', 'd'], 0],
-            [['limit', 'd'], 0],
-        ], $request);
-
-        $user = User::where('spread_uid', $request->uid())->page($data['page'], $data['limit'])->order('uid DESC')->select()->toArray();
-        return app('json')->successful($user);
-    }
-
-
-    /**
-     * 转预约卷给下级
-     * @param Request $request
-     * @return mixed
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     */
-    public function transfer_accounts(Request $request){
-        $data = UtilService::getMore([
-            ['uid'],
-            ['anticipate']
-        ], $request);
-        if (!$data['uid'] or !$data['anticipate'])  return app('json')->fail('数据传入错误');
-        $user = User::find($request->uid());
-        if ($user['anticipate'] < $data['anticipate']) return app('json')->fail('预约卷不够');
-        $me = User::find($data['uid']);
-        $user['anticipate'] = $user['anticipate'] - $data['anticipate'];// 扣除预约卷
-        $me['anticipate'] = $me['anticipate'] + $data['anticipate'];// 增加预约卷
-
-        try {
-            Db::startTrans();
-            UserBill::expend('预约卷减少',$user['uid'], 'anticipate', 'reduce_anticipate', $data['anticipate'], 0, $user['anticipate'], '转账给用户'.$me['nickname'].$data['anticipate'].'预约卷');
-            UserBill::income('预约卷增加',$me['uid'], 'anticipate', 'add_anticipate', $data['anticipate'], 0, $me['anticipate'], $me['nickname'].'转账'.$data['anticipate'].'预约卷');
-            $user->save();
-            $me->save();
-
-            Db::commit();
-            return app('json')->successful('成功');
-        } catch (\Exception $e) {
-            Db::rollback();
-            return app('json')->fail('失败');
-        }
-
-
-    }
-
-    /**
-     * 会馆
-     * @param Request $request
-     * @return mixed
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     */
-    public function auction_gu(Request  $request)
-    {
-        $data = UtilService::getMore([
-            [['page', 'd'], 0],
-            [['limit', 'd'], 0],
-        ], $request);
-
-        $uid = getParent($request->uid());
-        $uid[] = $request->uid();
-        $list = AuctionGu::where('a.uid', 'in', $uid)
-                ->alias('a')
-                ->field('a.*,u.nickname,u.avatar')
-                ->leftJoin('user u', 'a.uid = u.uid')
-                ->page($data['page'], $data['limit'])
-                ->select();
-        $list = count($list) ? $list->toArray() : [];
-        return app('json')->successful($list);
-
-    }
-
-    public function user_gu(Request $request)
-    {
-        $data = UtilService::getMore([
-            [['page', 'd'], 0],
-            [['limit', 'd'], 0],
-        ], $request);
-
-        $list = AuctionGu::where('uid', $request->uid())->select();
-        $list = count($list) ? $list->toArray() : [];
-
-        return app('json')->successful($list);
-    }
-
-
-
-
-
-
-
-
-}

+ 0 - 229
app/api/controller/auction/AuctionProductController.php

@@ -1,229 +0,0 @@
-<?php
-
-namespace app\api\controller\auction;
-
-
-use app\admin\model\system\SystemConfig;
-use app\common\model\Config;
-use app\models\auction\Auction;
-use app\models\auction\AuctionBooking;
-use app\models\auction\AuctionOrder;
-use app\models\auction\AuctionProduct;
-use app\models\user\User;
-use app\models\user\UserBill;
-use app\Request;
-use Monolog\Handler\Curl\Util;
-use think\facade\Cache;
-use crmeb\services\{
-    CacheService,
-    ExpressService,
-    SystemConfigService,
-};
-use crmeb\services\UtilService;
-use crmeb\repositories\OrderRepository;
-
-
-class AuctionProductController
-{
-    /**
-     * 获取商品列表
-     * @param Request $request
-     * @return mixed
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     */
-    public function auction_product(Request $request)
-    {
-        $data = UtilService::getMore([
-            [['page', 'd'], 0],
-            [['limit', 'd'], 0],
-            ['id']
-        ]);
-        if (!$data['id']) return app('json')->fail('数据传入错误');
-        return app('json')->successful(AuctionProduct::list($data, $request->uid()));
-    }
-
-    /**
-     * 用户商品
-     * @param Request $request
-     * @return mixed
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     */
-    public function user_product(Request  $request)
-    {
-
-        $data = UtilService::getMore([
-            [['page', 'd'], 0],
-            [['limit', 'd'], 0],
-        ]);
-        return app('json')->successful(AuctionProduct::user_product( $data,$request->uid()));
-    }
-
-
-    /**
-     * 购买商品
-     * @param Request $request
-     * @return mixed
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     */
-    public function purchase(Request $request)
-    {
-        $data = UtilService::getMore([
-            ['product_id'],
-        ]);
-        if (!$data['product_id']) return app('json')->fail('数据传入错误');
-
-
-        $product = AuctionProduct::where('id', $data['product_id'])->find();
-        $product_ids = AuctionProduct::where('auction_id', $product['auction_id'])->column('id');
-
-        $count = AuctionOrder::whereBetweenTime('create_time', day(),today())->where('product_id', 'in', $product_ids)->count();
-
-        $config = SystemConfig::where('menu_name', 'auction_number')->find();
-        halt((int)$config['value']);
-        if ($count >= $config['value']) return app('json')->fail('单场购买数量已到达最大');
-
-        if ($product['uid'] == $request->uid()) return app('json')->fail('无法购买自己商品');
-        if ($product){
-            AuctionOrder::beginTrans();
-            // 查询商品是否以卖出
-            $order = AuctionOrder::where('product_id', $data['product_id'])->where('status', '>', 0)->whereBetweenTime('create_time', date('Y-m-d H:i:s', strtotime(date('Y-m-d'))), date('Y-m-d H:i:s', strtotime('+1 day')))->find();
-            if ($order){
-                return app('json')->fail('商品以卖出');
-            }
-            $res = AuctionOrder::create([
-                'uid' => $request->uid(),
-                'collection_id' => $product['uid'],// 商品拥有有人
-                'order_id' => getNewOrderId(),
-                'name' => $product['name'],
-                'product_id' => $product['id'],
-                'image'=> $product['image'],
-                'price' => $product['hanging_price'],
-            ]);
-            if ($res){
-                AuctionOrder::commitTrans();
-                return app('json')->successful('购买成功');
-            }else{
-                AuctionOrder::rollbackTrans();
-                return app('json')->fail('购买失败');
-            }
-        }else{
-            return app('json')->fail('购买商品不存在');
-        }
-
-
-    }
-
-    /**
-     * 获取用户竞拍订单
-     * @param Request $request
-     * @return mixed
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     */
-    public function user_auction_order(Request $request)
-    {
-
-        $data = UtilService::getMore([
-            [['type', 'd'], 0],
-            [['page', 'd'], 0],
-            [['limit', 'd'], 0],
-        ]);
-
-        return app('json')->successful(AuctionOrder::userOrder($data,$request->uid()));
-    }
-
-    /**
-     * 上传大框凭证
-     * @param Request $request
-     * @return mixed
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     */
-    public function up_image(Request  $request)
-    {
-        $data = UtilService::getMore([
-            ['image'],
-            ['id']
-        ]);
-        if (!$data['image'] || !$data['id'])  return app('json')->fail('数据传入错误');
-
-        $order = AuctionOrder::where('id', $data['id'])->find();
-        if (!$order) return app('json')->fail('订单不存在');
-        if ($order['status'] != 1)  return app('json')->fail('当前订单状态无法上传凭证');
-        $order['upload_image'] = $data['image'];
-        $order['status'] = 2;
-
-        if ($order->save()){
-            return app('json')->successful('上传成功');
-        }else{
-            return app('json')->fail('上传失败');
-        }
-    }
-
-    /**
-     * 卖家显示订单
-     * @param Request $request
-     * @return void
-     */
-    public function seller(Request $request)
-    {
-        $data = UtilService::getMore([
-            ['type', 0]
-        ]);
-
-        return app('json')->successful(AuctionOrder::seller_list($data,$request->uid()));
-    }
-
-    /**
-     * 确定订单
-     * @param Request $request
-     * @return void
-     */
-    public function adopt(Request $request){
-        $data = UtilService::postMore([
-            ['order_id']
-        ]);
-        if (!$data['order_id'])  return app('json')->fail('数据传入错误');
-
-        $order = AuctionOrder::where('order_id', $data['order_id'])->find();
-        if ($order['status'] < 1) return app('json')->fail('该订单已失效');
-        if ($order['status'] == 1) return app('json')->fail('未上传打款凭证');
-        if ($order['status'] == 3) return app('json')->fail('该订单已完成');
-
-        $order['status'] = 3;
-        AuctionOrder::beginTrans();
-        $res = $order->save();
-        if ($res){
-
-            $product = AuctionProduct::find($order['product_id']);
-            if (!$product) return app('json')->fail('数据不存在');
-            $uid = $product['uid']; // 所属人id
-
-            $product['uid'] = $order['uid'];// 商品拥有人更新
-            $res = $product->save();
-            if ($res){
-                if ($uid > 0){
-                    AuctionOrder::earn($uid,$order['price'] ,$product); // 卖家
-                }
-            }
-            AuctionOrder::return($order['id']); // 买家
-
-            AuctionOrder::commitTrans();
-            return app('json')->successful('完成');
-        }else{
-
-            AuctionOrder::rollbackTrans();
-            return app('json')->fail('失败');
-        }
-
-    }
-
-}

+ 36 - 2
app/api/controller/user/UserController.php

@@ -21,7 +21,7 @@ use app\models\user\UserExtract;
 use app\models\user\UserNotice;
 use crmeb\services\GroupDataService;
 use crmeb\services\UtilService;
-
+use app\validate\User as Userva;
 /**
  * 用户类
  * Class UserController
@@ -58,6 +58,41 @@ class UserController
             $info['commissionCount'] = 0;
         return app('json')->success($info);
     }
+    /**
+     * 实名信息提交认证
+     * @param Request $request
+     * @return mixed
+     */
+    public function rname(Request $request){
+        $validate = new Userva;
+        $info = UtilService::postMore([
+            ['rname', ''],
+            ['cid', ''],
+			['cidimg', ''],
+        ]);
+        //规则验证
+        if(!$validate->Check($info)){
+            return json($validate->getError());
+        }
+		
+		$res=User::cidUser($info['rname'],$info['cidimg'], $info['cid'],$request->uid());
+		return $res;
+    }
+	/**
+	 * 实名信息查询
+	 * @param Request $request
+	 * @return mixed
+	 */
+	 public function rate(Request $request){
+		 $model=new User;
+		 $res=$model->where('uid',$request->uid())->find();
+		  $data=[
+			'is_auth'=>$res['is_auth'],
+			 'off'=>$res['off']
+			  
+		  ];
+		 return app('json')->success($data);
+	 }
 
     /**
      * 用户资金统计
@@ -523,7 +558,6 @@ class UserController
         $data['is_seckill'] = StoreSeckill::getSeckillCount() ? true : false;
         return app('json')->successful($data);
     }
-
     /**
      * 用户修改信息
      * @param Request $request

+ 0 - 32
app/common.php

@@ -525,35 +525,3 @@ if (!function_exists('array_unique_fb')) {
         return $out;
     }
 }
-
-if (!function_exists('day')) {
-    /**
-     *时间
-     * @param $array
-     * @return array
-     */
-    function day()
-    {
-        $day = date('Y-m-d H:i:s', strtotime(date('Y-m-d', time())));
-
-
-        return $day;
-
-    }
-}
-
-if (!function_exists('today')) {
-    /**
-     *时间
-     * @param $array
-     * @return array
-     */
-    function today()
-    {
-        $today = date('Y-m-d H:i:s', strtotime(date('Y-m-d', strtotime('+1day'))));
-
-
-        return $today;
-
-    }
-}

+ 8 - 8
app/http/middleware/AuthTokenMiddleware.php

@@ -24,14 +24,14 @@ class AuthTokenMiddleware implements MiddlewareInterface
     public function handle(Request $request, \Closure $next, bool $force = true)
     {
         $authInfo = null;
-        $token = trim(ltrim($request->header('Authori-zation'), 'Bearer'));
-        if(!$token)  $token = trim(ltrim($request->header('Authorization'), 'Bearer'));//正式版,删除此行,某些服务器无法获取到token调整为 Authori-zation
-        try {
-            $authInfo = UserRepository::parseToken($token);
-        } catch (AuthException $e) {
-            if ($force)
-                return app('json')->make($e->getCode(), $e->getMessage());
-        }
+       $token = trim(ltrim($request->header('Authori-zation'), 'Bearer'));
+       if(!$token)  $token = trim(ltrim($request->header('Authorization'), 'Bearer'));//正式版,删除此行,某些服务器无法获取到token调整为 Authori-zation
+       try {
+           $authInfo = UserRepository::parseToken($token);
+       } catch (AuthException $e) {
+           if ($force)
+               return app('json')->make($e->getCode(), $e->getMessage());
+       }
 
         if (!is_null($authInfo)) {
             Request::macro('user', function () use (&$authInfo) {

+ 0 - 65
app/models/auction/Auction.php

@@ -1,65 +0,0 @@
-<?php
-
-namespace app\models\auction;
-
-use app\models\store\StoreProduct;
-use crmeb\services\SystemConfigService;
-use think\facade\Db;
-use crmeb\traits\ModelTrait;
-use crmeb\basic\BaseModel;
-
-/**
- * TODO 场馆model
- * Class Article
- * @package app\models\article
- */
-class Auction extends BaseModel
-{
-    /**
-     * 数据表主键
-     * @var string
-     */
-    protected $pk = 'id';
-
-    /**
-     * 模型名称
-     * @var string
-     */
-    protected $name = 'auction';
-
-    use ModelTrait;
-
-
-    public function list($data, $uid)
-    {
-        $model = self::where([['delete_time', '=', 0], ['status' ,'=', '1'], ['auction_gu_id', '=', $data['auction_gu_id']]]);
-        $model->page($data['page'], $data['limit']);
-        $model->order('id DESC, sort DESC');
-        $id = [];
-        $booking = AuctionBooking::where([['uid', '=', $uid], ['create_time', '>', strtotime(date('Y-m-d'), time())]])->field('auction_id')->select();
-        foreach ($booking as $v) {
-            $id[] = $v['auction_id'];
-        }
-        if ($data['advance']){
-            $model->where('id', 'in', $id);
-        }
-        $list = $model->select();
-        $list = count($list) ? $list->toArray() : [];
-        if ($list){
-            foreach ($list as  $k =>$v)
-            {
-                $list[$k]['time'] = strtotime($v['rend_time']);
-                $list[$k]['day'] = date('Y-m-d H:i:s', strtotime($v['rend_time']));
-                if (in_array($v['id'], $id)){
-                    $list[$k]['sta'] = 2; // 进入
-                    $list[$k]['str'] = '进入';
-                }else{
-                    $list[$k]['sta'] = 1; // 预约
-                    $list[$k]['str'] = '预约';
-                }
-            }
-        }
-        return $list;
-    }
-
-}

+ 0 - 50
app/models/auction/AuctionBooking.php

@@ -1,50 +0,0 @@
-<?php
-
-/**
- *
- * @author: xaboy<365615158@qq.com>
- * @day: 2017/11/02
- */
-
-namespace app\models\auction;
-
-use crmeb\traits\ModelTrait;
-use crmeb\basic\BaseModel;
-
-/**
- * 预约 Model
- * Class WechatNews
- * @package app\admin\model\wechat
- */
-class AuctionBooking extends BaseModel
-{
-
-    use ModelTrait;
-
-    protected $pk = 'id';
-
-    protected $name = 'auction_booking';
-    protected $autoWriteTimestamp = true;
-
-
-    /**
-     * 添加预约记录
-     * @param $uid
-     * @param $auction
-     * @return void
-     */
-    public static function booKing($uid, $auction)
-    {
-        self::create([
-            'uid' => $uid,
-            'anticipate' => $auction['anticipate'],
-            'auction_id' => $auction['id'],
-            'frequency' => $auction['frequency'],
-            'create_time' => time()
-        ]);
-
-    }
-
-
-
-}

+ 0 - 32
app/models/auction/AuctionGu.php

@@ -1,32 +0,0 @@
-<?php
-
-namespace app\models\auction;
-
-use app\models\store\StoreProduct;
-use crmeb\services\SystemConfigService;
-use think\facade\Db;
-use crmeb\traits\ModelTrait;
-use crmeb\basic\BaseModel;
-
-/**
- * TODO 场馆model
- * Class Article
- * @package app\models\article
- */
-class AuctionGu extends BaseModel
-{
-    /**
-     * 数据表主键
-     * @var string
-     */
-    protected $pk = 'id';
-
-    /**
-     * 模型名称
-     * @var string
-     */
-    protected $name = 'auction_gu';
-    protected $autoWriteTimestamp = true;
-
-    use ModelTrait;
-}

+ 0 - 255
app/models/auction/AuctionOrder.php

@@ -1,255 +0,0 @@
-<?php
-
-/**
- *
- * @author: xaboy<365615158@qq.com>
- * @day: 2017/11/02
- */
-
-namespace app\models\auction;
-
-use app\admin\model\user\User;
-use app\admin\model\user\UserBill;
-use crmeb\services\product\Product;
-use crmeb\traits\ModelTrait;
-use crmeb\basic\BaseModel;
-
-/**
- * 预约 Model
- * Class WechatNews
- * @package app\admin\model\wechat
- */
-class AuctionOrder extends BaseModel
-{
-
-    use ModelTrait;
-
-    protected $pk = 'id';
-
-    protected $name = 'auction_order';
-    protected $autoWriteTimestamp = true;
-
-
-    /**
-     * 用户订单
-     * @param $data
-     * @param $uid
-     * @return \think\Collection
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     */
-    public static function userOrder($data,$uid)
-    {
-        if ($data['type'] == 1){
-            $list = self::where([['uid', '=', $uid], ['status', '=', 1]])->page($data['page'], $data['limit'])->select()->toArray(); //待上传订单
-
-        }else if($data['type'] == 2){
-            $list = self::where([['uid', '=', $uid], ['status', '=', 2]])->page($data['page'], $data['limit'])->select()->toArray(); //待审核订单
-
-        }else if($data['type'] == 3) {
-            $list = self::where([['uid', '=', $uid], ['status', '=', 3]])->page($data['page'], $data['limit'])->select()->toArray(); //完成订单
-        }else{
-
-            $list = self::where([['uid', '=', $uid], ['status', '<', 1]])->page($data['page'], $data['limit'])->select()->toArray(); //过期订单
-        }
-
-        return $list;
-    }
-
-    /**
-     * 卖家订单
-     * @param $data
-     * @param $uid
-     * @return \think\Collection
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     */
-    public static function seller_list($data,$uid)
-    {
-        if ($data['type'] == 1){
-            $list = self::where([['collection_id', '=', $uid], ['status', '=', 1]])->page($data['page'], $data['limit'])->select()->toArray(); //待上传订单
-
-        }else if($data['type'] == 2){
-            $list = self::where([['collection_id', '=', $uid], ['status', '=', 2]])->page($data['page'], $data['limit'])->select()->toArray(); //待审核订单
-
-        }else if($data['type'] == 3) {
-            $list = self::where([['collection_id', '=', $uid], ['status', '=', 3]])->page($data['page'], $data['limit'])->select()->toArray(); //完成订单
-        }else{
-
-            $list = self::where([['collection_id', '=', $uid], ['status', '<', 1]])->page($data['page'], $data['limit'])->select()->toArray(); //过期订单
-        }
-
-        return $list;
-    }
-
-    /**
-     * 卖家操作
-     * @param $id  //商品所属人
-     * @param $price //卖出价格
-     * @param $product //商品详情
-     * @return void
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     */
-    public static function earn($id, $price,$product)
-    {
-        $userModel = new \app\models\user\User();
-        $productModel = new AuctionProduct();
-        $user = $userModel->find($id);
-        if ($user['spread_uid'] > 0){
-            $s_price = number_format(($price - $product['price']) * 0.1, 2); // 卖出价格减去购买价格的百分之十 为上级直推奖励
-            $spread = $userModel->find($user['spread_uid']);
-            $spread['integral'] = $spread['integral'] + $s_price; //积分增加
-            $spread->save();
-            \app\models\user\UserBill::create([
-                'uid' => $spread['uid'],
-                'link_id' => $id,
-                'pm' => 1,
-                'title' => '积分增加',
-                'category' => 'integral',
-                'type' => 'gain',
-                'mark' => '卖出商品直推'.$s_price.'积分',
-                'add_time' => time(),
-                'number' => $s_price,
-                'balance' => $spread['integral']
-
-            ]);
-            $user['anticipate'] = $user['anticipate']-number_format($price*($product['deduct']/100),2); // 扣除当前卖出价格百分比的预约卷
-            $user->save();
-            \app\models\user\UserBill::create([
-                'uid' => $user['uid'],
-                'pm' => 0,
-                'title' => '预约卷扣除',
-                'category' => 'anticipate',
-                'type' => 'reduce_anticipate',
-                'mark' => '卖出商品扣除'.number_format($price*($product['deduct']/100), 2).'预约卷',
-                'add_time' => time(),
-                'number' => number_format($price*($product['deduct']/100),2),
-                'balance' => $user['anticipate']
-            ]);
-        }
-        $productModel->where('id', $product['id'])->save(['price' => $price, 'hanging_price' => ($price+$price*($product['rise']/100))]); //修改当前画价
-
-    }
-
-    /**
-     * 购买成功退预约卷
-     * @param $id
-     * @return void
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     */
-    public static function return($id)
-    {
-        $data = self::find($id);
-        $userModel = new User();
-        $productModel = new AuctionProduct();
-        $auctionModel = new Auction();
-        $bookingModel = new AuctionBooking();
-
-
-        $user = $userModel->find($data['uid']);
-        if ($user['is_new'] == 1){
-
-            if ($user['spread_uid']) {
-                $spread = $userModel->where('id', $user['spread_uid'])->find();
-                $spread['green_time'] = strtotime(date('Y-m-d', strtotime('+1 day'))); // 开启明天的绿色通道
-            }
-            $orderCount = AuctionOrder::where([['uid', '=',  $user['uid']], ['status', 3]])->count();
-            if ($orderCount >= 5){
-                $user['is_new'] = 0;
-            }
-
-
-        }
-        $product = $productModel->where('id', $data['product_id'])->find();
-        $auction = $auctionModel->where('id', $product['auction_id'])->find();
-        $booking = $bookingModel->where('auction_id', $auction['id'])->whereBetweenTime('create_time', date('Y-m-d H:i:s', strtotime(date('Y-m-d'))), date('Y-m-d H:i:s', strtotime('+1 day')))->find();
-        if ($booking['status'] > 0){
-            $booking['status'] = 0;
-            $booking->save();
-            $user['anticipate'] = $user['anticipate'] + $auction['anticipate'];// 退还预约卷
-            $user->save();
-
-
-            \app\models\user\UserBill::create([
-                'uid' => $user['uid'],
-                'pm' => 1,
-                'title' => '预约卷退还',
-                'category' => 'anticipate',
-                'type' => 'add_anticipate',
-                'mark' => '退还预约场馆'.number_format($auction['anticipate'],2).'预约卷',
-                'add_time' => time(),
-                'number' => number_format($auction['anticipate'],2),
-                'balance' => $user['anticipate']
-            ]);
-        }
-    }
-
-    /**
-     * 订单过期
-     * @return void
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     */
-    public static function deduction()
-    {
-        $hour = strtotime(date('Y-m-d H:i:s', strtotime('-1 hour'))); // 一小时以前
-
-        $order = AuctionOrder::where('create_time', '<', $hour)->where('status', '=', 1)->select(); // 查询不在当前一个小时内的订单
-        if ($order){
-            foreach ($order as $K => $v){
-                $product = AuctionProduct::where('id', $v['product_id'])->find();
-
-                $auction = Auction::where('id', $product['auction_id'])->find();
-
-                $booking = AuctionBooking::whereBetweenTime('create_time',date('Y-m-d H:i:s',  strtotime(date('Y-m-d', time()))), date('Y-m-d H:i:s', strtotime(date('Y-m-d', strtotime('+1 day')))))
-                    ->where([['uid', '=', $v['uid']], ['status', '=', 1], ['auction_id', '=', $auction['id']]])->where('status', '=', 1)->find();
-                $user = \app\models\user\User::where('uid', $v['collection_id'])->find();
-
-                $user['anticipate'] = $user['anticipate'] + $auction['anticipate'];
-                UserBill::income('增加预约卷', $v['collection_id'], 'anticipate', 'add_anticipate',  $auction['anticipate'], $v['uid'], $user['anticipate'], '卖出订单未上传支付凭证,增加'.$auction['anticipate'].'预约卷');
-
-                $user->save();
-                AuctionBooking::where('id', $booking['id'])->update(['status' => 0]);
-                AuctionOrder::where('create_time', '<', $hour)->where('status', '=', 1)->update(['status' => 2]); // 修改为已过期订单
-
-            }
-
-        }
-    }
-
-    /**
-     * 退回预约卷
-     * @return void
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     */
-    public static function th()
-    {
-        $auction = Auction::where('rend_time', '<', time())->select();
-        if ($auction){
-            foreach ($auction as $k => $v){
-                $booking = AuctionBooking::where('auction_id', $v['id'])->whereBetweenTime('create_time',date('Y-m-d H:i:s',  strtotime(date('Y-m-d', time()))), date('Y-m-d H:i:s', strtotime(date('Y-m-d', strtotime('+1 day')))))->select();
-                if ($booking){
-                    $user = User::where('uid', $booking['uid'])->find();
-                    $user['anticipate'] = $user['anticipate'] + $booking['anticipate'];
-                    $user->save();
-                    UserBill::income('预约卷增加',$user['uid'], 'anticipate', 'add_anticipate', $booking['anticipate'], 0, $user['anticipate'], '预约卷退回');
-
-                }
-            }
-        }
-    }
-
-
-
-
-
-}

+ 0 - 75
app/models/auction/AuctionProduct.php

@@ -1,75 +0,0 @@
-<?php
-
-/**
- *
- * @author: xaboy<365615158@qq.com>
- * @day: 2017/11/02
- */
-
-namespace app\models\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';
-    protected $autoWriteTimestamp = true;
-
-    /**
-     * 竞拍商品列表
-     * @param $data
-     * @param $uid
-     * @return array
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     */
-    public static function list($data, $uid){
-        $model = self::where('is_show', 1)->where('auction_id', $data['id'])->order('sort DESC,id DESC');
-        $model->page($data['page'], $data['limit']);
-        $list = $model->select()->toArray();
-        if ($list){
-            foreach ($list as $k => $v) {
-                $order = AuctionOrder::where('product_id', $v['id'])->where('status', '>', 0)->whereBetweenTime('create_time', date('Y-m-d H:i:s', strtotime(date('Y-m-d'))), date('Y-m-d H:i:s', strtotime('+1 day')))->find();
-                if ($order){
-                    $list[$k]['status'] = 2;// 已被购买
-                    $list[$k]['str'] = '已卖完';
-                }else{
-                    $list[$k]['status'] = 1;// 能购买
-                    $list[$k]['str'] = '购买';
-                }
-            }
-        }
-        return $list;
-    }
-
-    /**
-     * 用户商品
-     * @param $data
-     * @param $uid
-     * @return array
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
-     */
-    public static function user_product($data, $uid){
-        $model = self::where('is_show', 1)->where('uid', $uid)->order('sort DESC,id DESC');
-        $model->page($data['page'], $data['limit']);
-
-        $list = $model->select()->toArray();
-        return $list;
-    }
-
-
-}

+ 31 - 4
app/models/store/StoreOrder.php

@@ -864,17 +864,44 @@ class StoreOrder extends BaseModel
             return self::setErrorInfo('订单删除失败!');
     }
 
+	/**
+		 * //TODO 查询该用户订单总额释放冻结积分
+		 * @param $uni
+		 * @param $uid
+		 */
+	
+   public static function ordersum($uid,$uni,$order){
+	$list=self::where('uid', $uid)->where('status',2)->sum('total_price');
+	//计算历史金额加上当前金额
+	$listsum=floatval($order['total_price']+$list);
+	$order = self::tidyOrder($order);
+	// 如果总金额大于等于30000 释放冻结积分
+	if($listsum>=30000){
+		// 释放积分
+		$res=User::where('uid',$uid)->find();
+		if($res['f_integral']==3000){
+			$integral=floatval($res['integral']+3000);
+			$res2=User::where('uid',$uid)->update(['f_integral' =>0,'integral'=>$integral]);
+			$res3=UserBill::income('冻结积分释放',$uid, 'integral', 'release',3000, $order['id'],$listsum, '释放3000积分');
+			if(!$res2){
+				return self::setErrorInfo('操作失败');
+			}
+		}
+	}
+	}
 
     /**
      * //TODO 用户确认收货
      * @param $uni
      * @param $uid
      */
+	
     public static function takeOrder($uni, $uid)
-    {
-        $order = self::getUserOrderDetail($uid, $uni);
-        if (!$order) return self::setErrorInfo('订单不存在!');
-        $order = self::tidyOrder($order);
+    { 
+		// 调取计算总额方法
+		$order = self::getUserOrderDetail($uid, $uni);
+		$sum=self::ordersum($uid,$uni,$order);
+		$order = self::tidyOrder($order);
         if ($order['_status']['_type'] != 2) return self::setErrorInfo('订单状态错误!');
         self::beginTrans();
         if (false !== self::edit(['status' => 2], $order['id'], 'id') &&

+ 29 - 2
app/models/user/User.php

@@ -382,9 +382,36 @@ class User extends BaseModel
      */
     public static function editUser($avatar, $nickname, $uid)
     {
-        return self::edit(['avatar' => $avatar, 'nickname' => $nickname], $uid, 'uid');
+        return self::edit(['avatar' => $avatar,'nickname' => $nickname], $uid, 'uid');
     }
-
+	/**
+	 * 修改个人身份信息
+	 * @param $CID 身份证号
+	 * @param $name 姓名
+	  * @param $cidimg 身份证图
+	 * @return bool
+	 */
+	public static function cidUser($rname,$cidimg,$cid,$uid)
+	{
+		// 查询该身份证在数据库中是否存在
+		$res=self::where('card_id',$cid)->find();
+		if($res['is_auth']==2){
+		return app('json')->fail('该身份信息已被注册');
+		}
+		$ress=self::where('uid',$uid)->find();
+		if($ress['is_auth']==1||$ress['is_auth']==2){
+			return app('json')->fail('您已提交认证,不可重复提交');
+		}
+		//找出出生年月日
+		$time= substr($cid,6,4).substr($cid,10,2).substr($cid,12,2);
+		$brithday=strtotime($time);
+		$rust=self::edit(['real_name'=>$rname,'cidimg'=>$cidimg, 'card_id'=>$cid,'is_auth'=>1,'off'=>'','birthday'=>$brithday], $uid, 'uid');
+		
+		if($rust){
+			return app('json')->successful("提交成功");
+		}
+		return app('json')->fail('提交失败');
+	}
     /**
      * TODO 获取推广人数 一级
      * @param int $uid