rabin 1 day ago
parent
commit
eb7161def5
79 changed files with 0 additions and 5357 deletions
  1. 0 52
      src/place_old/api/Address.php
  2. 0 90
      src/place_old/api/Agent.php
  3. 0 63
      src/place_old/api/Cart.php
  4. 0 164
      src/place_old/api/Client.php
  5. 0 31
      src/place_old/api/Collect.php
  6. 0 112
      src/place_old/api/Data.php
  7. 0 55
      src/place_old/api/Down.php
  8. 0 34
      src/place_old/api/Manage.php
  9. 0 29
      src/place_old/api/Order.php
  10. 0 198
      src/place_old/api/Resource.php
  11. 0 33
      src/place_old/api/Review.php
  12. 0 17
      src/place_old/api/Seller.php
  13. 0 20
      src/place_old/api/Task.php
  14. 0 31
      src/place_old/api/Test.php
  15. 0 19
      src/place_old/api/Tool.php
  16. 0 19
      src/place_old/api/Url.php
  17. 0 81
      src/place_old/api/User.php
  18. 0 38
      src/place_old/api/Vip.php
  19. 0 98
      src/place_old/boot.php
  20. 0 6
      src/place_old/index.php
  21. 0 55
      src/place_old/lib/Account.php
  22. 0 139
      src/place_old/lib/Act.php
  23. 0 128
      src/place_old/lib/Address.php
  24. 0 7
      src/place_old/lib/Agent.php
  25. 0 18
      src/place_old/lib/Callback.php
  26. 0 79
      src/place_old/lib/Cate.php
  27. 0 114
      src/place_old/lib/Client.php
  28. 0 34
      src/place_old/lib/Info.php
  29. 0 44
      src/place_old/lib/Main.php
  30. 0 202
      src/place_old/lib/Manage.php
  31. 0 134
      src/place_old/lib/Price.php
  32. 0 405
      src/place_old/lib/Resource.php
  33. 0 5
      src/place_old/lib/Supplier.php
  34. 0 219
      src/place_old/lib/Vip.php
  35. 0 78
      src/place_old/manage/account.php
  36. 0 66
      src/place_old/manage/account_cert.php
  37. 0 26
      src/place_old/manage/account_setting.php
  38. 0 90
      src/place_old/manage/agent.php
  39. 0 40
      src/place_old/manage/agent_price.php
  40. 0 30
      src/place_old/manage/client.php
  41. 0 30
      src/place_old/manage/client_price.php
  42. 0 150
      src/place_old/manage/core.php
  43. 0 64
      src/place_old/manage/info.php
  44. 0 49
      src/place_old/manage/member.php
  45. 0 56
      src/place_old/manage/member_agent.php
  46. 0 43
      src/place_old/manage/member_agent_child.php
  47. 0 48
      src/place_old/manage/member_vip.php
  48. 0 154
      src/place_old/manage/place.php
  49. 0 35
      src/place_old/manage/resource.php
  50. 0 47
      src/place_old/manage/seller.php
  51. 0 97
      src/place_old/manage/vip.php
  52. 0 35
      src/place_old/manage/vip_price.php
  53. 0 31
      src/place_old/table/account.php
  54. 0 45
      src/place_old/table/account_cert.php
  55. 0 27
      src/place_old/table/account_setting.php
  56. 0 62
      src/place_old/table/address.php
  57. 0 70
      src/place_old/table/agent.php
  58. 0 51
      src/place_old/table/agent_order.php
  59. 0 52
      src/place_old/table/agent_price.php
  60. 0 45
      src/place_old/table/cash_log.php
  61. 0 39
      src/place_old/table/client.php
  62. 0 34
      src/place_old/table/client_price.php
  63. 0 56
      src/place_old/table/client_resource.php
  64. 0 37
      src/place_old/table/code.php
  65. 0 26
      src/place_old/table/collect.php
  66. 0 137
      src/place_old/table/info.php
  67. 0 101
      src/place_old/table/member.php
  68. 0 45
      src/place_old/table/order_stat.php
  69. 0 68
      src/place_old/table/resource.php
  70. 0 56
      src/place_old/table/resource_relation.php
  71. 0 40
      src/place_old/table/review.php
  72. 0 33
      src/place_old/table/role.php
  73. 0 76
      src/place_old/table/role_level.php
  74. 0 52
      src/place_old/table/role_level_profit.php
  75. 0 50
      src/place_old/table/seller.php
  76. 0 46
      src/place_old/table/supplier.php
  77. 0 70
      src/place_old/table/vip.php
  78. 0 51
      src/place_old/table/vip_order.php
  79. 0 46
      src/place_old/table/vip_price.php

+ 0 - 52
src/place_old/api/Address.php

@@ -1,52 +0,0 @@
-<?php namespace Place\Api;
-use Dever;
-use Place;
-use Place\Lib\Main;
-class Address extends Main
-{
-    protected $login = true;
-    protected $entry = true;
-
-    # 获取地址列表
-    public function list()
-    {
-        return Dever::load('address', 'place')->getList();
-    }
-
-
-    # 添加或者更新地址接口
-    public function up()
-    {
-        $id = Dever::input('id');
-        $type = Dever::input('type', 'is_numeric', '类型', 1);
-        $province = Dever::input('province', 'is_numeric', '省份');
-        $city = Dever::input('city', 'is_numeric', '城市');
-        $county = Dever::input('county', 'is_numeric', '区县');
-        $address = Dever::input('address', 'is_string', '地址');
-        $name = Dever::input('name', 'is_string', '联系人');
-        $phone = Dever::input('phone', 'is_string', '联系方式');
-
-        return Dever::load('address', 'place')->update($id, $type, $phone, $name, $province, $city, $county, $address);
-    }
-
-    # 获取默认地址
-    public function getDefault()
-    {
-        return Dever::load('address', 'place')->getDefault();
-    }
-
-    # 获取某个收货地址
-    public function getInfo()
-    {
-        $id = Dever::input('id', 'is_numeric', '收货地址');
-        $uid = Place::$uid;
-        return Dever::load('address', 'place')->getInfo($id, $uid);
-    }
-
-    # 删除地址
-    public function delete()
-    {
-        $id = Dever::input('id', 'is_numeric', '收货地址');
-        return Dever::load('address', 'place')->delete($id);
-    }
-}

+ 0 - 90
src/place_old/api/Agent.php

@@ -1,90 +0,0 @@
-<?php namespace Place\Api;
-use Dever;
-use Place;
-use Place\Lib\Main;
-class Agent extends Main
-{
-    #protected $login = true;
-    protected $entry = true;
-
-    # 会员列表
-    public function list()
-    {
-        $data = Dever::load('agent', 'place')->getData();
-        return Place::result($data);
-    }
-
-
-    # 信息
-    public function info()
-    {
-        if (!Place::$uid) {
-            $this->showLogin();
-        }
-        $data = Dever::load('agent', 'place')->getInfo();
-        # 代理邀请码
-        $data['code'] = Dever::load('code', 'invite')->get(Place::$uid);
-
-        $data['parent'] = 2;
-        # 获取我的上级
-        $relation = Dever::load('relation', 'invite')->getParent(Place::$uid);
-        if ($relation) {
-            $data['parent'] = 1;
-            $data['parent_info'] = Dever::db('member', 'place')->find($relation['uid'], array('col' => 'id,name,avatar'));
-        }
-        return Place::result($data);
-    }
-
-    # 我的下级列表
-    public function getChild()
-    {
-        if (!Place::$uid) {
-            $this->showLogin();
-        }
-        $relation = Dever::load('relation', 'invite')->getChild(Place::$uid);
-        $result = array();
-        if ($relation) {
-            foreach ($relation as $k => $v) {
-                $result[$k] = Dever::db('member', 'place')->find($v['to_uid'], array('col' => 'id,name,avatar'));
-                $result[$k]['cdate_str'] = date('Y-m-d H:i:s', $v['cdate']);
-            }
-        }
-        return $result;
-    }
-
-    # 填写邀请码,添加上级
-    public function addParent()
-    {
-        if (!Place::$uid) {
-            $this->showLogin();
-        }
-        $relation = Dever::load('relation', 'invite')->getParent(Place::$uid);
-        if ($relation) {
-            Dever::error('您已经有上级了');
-        }
-        $invite = Dever::input('invite', 'is_numeric', '请填写邀请码');
-        $parent_uid = Dever::load('code', 'invite')->getUid($invite);
-        if (!$parent_uid) {
-            Dever::error('邀请码不存在');
-        }
-        $parent = Dever::db('member', 'place')->find($parent_uid);
-        if (!$parent) {
-            Dever::error('邀请码不存在');
-        }
-        if ($parent && $parent['agent_id'] && $parent['agent_id'] > 0) {
-            Dever::load('relation', 'invite')->set($parent_uid, Place::$uid);
-        } else {
-            Dever::error('上级已不是'.Place::$info['agent_name'].',请联系您的上级');
-        }
-        return 'ok';
-    }
-
-    # 购买
-    public function buy()
-    {
-        if (!Place::$uid) {
-            $this->showLogin();
-        }
-        return Dever::load('agent', 'place')->pay();
-    }
-}

+ 0 - 63
src/place_old/api/Cart.php

@@ -1,63 +0,0 @@
-<?php namespace Place\Api;
-use Dever;
-use Place;
-use Place\Lib\Main;
-use Place\Lib\Resource;
-class Cart extends Main
-{
-    protected $login = true;
-    protected $entry = true;
-
-    # 获取购物车
-    public function list()
-    {
-        $data['list'] = Dever::load('cart', 'goods')->getList();
-        return Place::result($data);
-    }
-
-    # 购物车增减
-    public function up()
-    {
-        $id = Dever::input('type_id', 'is_numeric', '资源ID');
-        $sku_id = Dever::input('sku_id', 'is_numeric', '价格ID');
-        $num = Dever::input('num', 'is_numeric', '数量', 1);
-        return Dever::load('cart', 'goods')->up($id, $sku_id, $num);
-    }
-
-    # 购物车选中状态
-    public function edit()
-    {
-        $id = Dever::input('type_id', 'is_numeric', '资源ID');
-        $sku_id = Dever::input('sku_id', 'is_numeric', '价格ID');
-        $status = Dever::input('status', 'is_numeric', '选中状态', 1);
-        return Dever::load('cart', 'goods')->edit($id, $sku_id, $status);
-    }
-
-    # 删除购物车某个商品
-    public function delete()
-    {
-        $id = Dever::input('type_id', 'is_numeric', '资源ID');
-        $sku_id = Dever::input('sku_id', 'is_numeric', '价格ID');
-        return Dever::load('cart', 'goods')->delete($id, $sku_id);
-    }
-
-    # 清空购物车
-    public function drop()
-    {
-        return Dever::load('cart', 'goods')->drop();
-    }
-
-    # 购物车下单
-    public function confirm()
-    {
-        return Dever::load('cart', 'goods')->confirm();
-    }
-
-    # 拉起支付
-    public function pay()
-    {
-        $info = $this->confirm();
-        $resource = new Resource(3);
-        return $resource->pay($info);
-    }
-}

+ 0 - 164
src/place_old/api/Client.php

@@ -1,164 +0,0 @@
-<?php namespace Place\Api;
-use Dever;
-use Place;
-use Place\Lib\Main;
-class Client extends Main
-{
-    protected $login = true;
-    protected $entry = true;
-
-    public function __construct()
-    {
-        parent::__construct();
-        # 查询当前源主界面是否有进货功能
-        if (Place::$info['channel'] != 1) {
-            Dever::error('渠道信息获取失败');
-        }
-    }
-
-    # 检测是否绑定源主
-    private function check($type = 1)
-    {
-        if ($type == 2) {
-            if (Place::$user['client_id'] <= 0) {
-                Dever::error('您还未绑定源主');
-            }
-            $user = Dever::db('user', 'sector')->find(Place::$uid);
-            $mobile = $user['mobile'];
-        } else {
-            $mobile = Dever::input('mobile', 'is_numeric', '手机号');
-            if (Place::$user['client_id'] > 0) {
-                Dever::error('您已经绑定过了,请先解绑再来吧');
-            }
-        }
-        return $mobile;
-    }
-
-    # 发送绑定短信验证码
-    public function sms()
-    {
-        $type = Dever::input('type', 'is_numeric', '类型', 1);
-        $mobile = $this->check($type);
-        $data = Dever::load('template', 'msg')->send('user_code', array('mobile' => $mobile));
-        return $data;
-    }
-
-    # 绑定源主
-    public function bind()
-    {
-        $mobile = $this->check();
-        $code = Dever::input('code', 'is_string', '验证码');
-        Dever::load('template', 'msg')->check('user_code', $mobile, $code);
-        $user = Dever::db('user', 'sector')->find(array('mobile' => $mobile, 'status' => 1));
-        if (!$user) {
-            Dever::error('您绑定的手机号未开通源主');
-        }
-        $data = array('client_id' => $user['id']);
-        $member = Dever::db('member', 'place')->find($data);
-        if ($member) {
-            Dever::error('手机号已绑定源主,您无法绑定');
-        }
-        Dever::db('member', 'place')->update(Place::$uid, $data);
-        Place::$user['client_id'] = $data['client_id'];
-        return Place::$user;
-    }
-
-    # 解绑源主
-    public function unbind()
-    {
-        $mobile = $this->check(2);
-        $code = Dever::input('code', 'is_string', '验证码');
-        Dever::load('template', 'msg')->check('user_code', $mobile, $code);
-        Dever::db('member', 'place')->update(Place::$uid, array('client_id' => -1));
-    }
-
-    # 点击进货按钮
-    public function submit()
-    {
-        if (Place::$user['client_id'] <= 0) {
-            Dever::error('您不是源主');
-        }
-        $where = array('uid' => Place::$user['client_id']);
-        if (Place::$user['client_id'] == Place::$info['uid']) {
-            $where['id'] = array('!=', Place::$id);
-        }
-        # 获取源主的身份
-        $data['place'] = Dever::db('info', 'place')->select($where, array('col' => 'id, name'));
-        if (!$data['place']) {
-            Dever::error('请先创建身份');
-        }
-        $type = Dever::input('type', 'is_numeric', '资源类型');
-        $type_id = Dever::input('type_id', 'is_numeric', '资源ID');
-        $resource = new \Place\Lib\Resource($type);
-        $data['info'] = $resource->getInfo($type_id);
-        $data['info'] = Dever::load('info', $resource->app)->submit($data['info'], 'client');
-        return $data;
-    }
-
-    # 确定进货或者修改进货
-    public function act_commit(){}
-    public function act()
-    {
-        if (Place::$user['client_id'] <= 0) {
-            Dever::error('您不是源主');
-        }
-        
-        $data['uid'] = Place::$uid;
-        $data['client_id'] = Place::$user['client_id'];
-        $data['type'] = Dever::input('type', 'is_numeric', '资源类型');
-        $data['type_id'] = Dever::input('type_id', 'is_numeric', '资源ID');
-
-        $info = Dever::db('client_resource', 'place')->find($data);
-
-        $data['status'] = 1;
-        $data['place_id'] = Dever::input('place_id', 'is_string', '身份ID');
-        $temp = explode(',', $data['place_id']);
-        $where = array('id' => array('in', $data['place_id']), 'uid' => Place::$user['client_id']);
-        if (Place::$user['client_id'] == Place::$info['uid']) {
-            $where['id#'] = array('!=', Place::$id);
-        }
-        $place = Dever::db('info', 'place')->select($where);
-        if (count($place) != count($temp)) {
-            Dever::error('身份不存在');
-        }
-
-        $resource = new \Place\Lib\Resource($data['type']);
-        $resource_info = $resource->getInfo($data['type_id']);
-        $data['price'] = $resource_info['client']['value'];
-        $resource_info['price'] = $resource_info['price']['value'];
-        $resource_info['status'] = 2;
-        unset($resource_info['cdate']);
-        unset($resource_info['cdate_str']);
-        unset($resource_info['client']);
-        unset($resource_info['password']);
-
-        if ($info) {
-            Dever::db('client_resource', 'place')->update($info['id'], $data);
-        } else {
-            Dever::db('client_resource', 'place')->insert($data);
-        }
-        # 同时同步源主里的内容信息
-        Dever::load('client', 'place')->resource($place, $data, $resource, $resource_info);
-        return 'ok';
-    }
-
-    # 取消进货
-    public function cancel_commit(){}
-    public function cancel()
-    {
-        if (Place::$user['client_id'] <= 0) {
-            Dever::error('您不是源主');
-        }
-        $data['uid'] = Place::$uid;
-        $data['client_id'] = Place::$user['client_id'];
-        $data['type'] = Dever::input('type', 'is_numeric', '资源类型');
-        $data['type_id'] = Dever::input('type_id', 'is_numeric', '资源ID');
-        $info = Dever::db('client_resource', 'place')->find($data);
-        if ($info) {
-            # 同时删除源主里的内容信息
-            Dever::load('client', 'place')->resourceDel($info['place_id'], $data);
-            Dever::db('client_resource', 'place')->update($info['id'], array('status' => 2));
-        }
-        return 'ok';
-    }
-}

+ 0 - 31
src/place_old/api/Collect.php

@@ -1,31 +0,0 @@
-<?php namespace Place\Api;
-use Dever;
-use Place;
-use Place\Lib\Main;
-use Place\Lib\Act;
-class Collect extends Main
-{
-    protected $login = true;
-    protected $entry = true;
-
-    public function __construct()
-    {
-        parent::__construct();
-        $this->act = new Act('collect');
-    }
-
-    public function up()
-    {
-        return $this->act->up();
-    }
-
-    public function cancel()
-    {
-        return $this->act->del();
-    }
-
-    public function getUserList()
-    {
-        return $this->act->getUserList();
-    }
-}

+ 0 - 112
src/place_old/api/Data.php

@@ -1,112 +0,0 @@
-<?php namespace Place\Api;
-use Dever;
-use Place;
-use Place\Lib\Main;
-class Data extends Main
-{
-    # 首页
-    public function home()
-    {
-        if (Place::$info['type'] == 1) {
-            # 公开
-            $data['entry'] = Place::$resource[0];
-        } elseif (Place::$info['type'] == 2 && Place::$user) {
-            # 注册
-            $data['entry'] = Place::$resource[0];
-        } elseif (Place::$info['type'] > 2 && Place::$user && Place::$user['entry_type'] > 2) {
-            $data['entry'] = Place::$resource[0];
-        } else {
-            # 需要注册、购买、输入密码等等
-            if (Place::$info['type'] == 2) {
-                $data['button'] = array
-                (
-                    'name' => '注册',
-                    'type' => 2,
-                );
-            } elseif (Place::$info['type'] == 3) {
-                $data['button'] = array
-                (
-                    'name' => '邀请码',
-                    'type' => 3,
-                );
-            } elseif (Place::$info['type'] == 4) {
-                $data['button'] = array
-                (
-                    'name' => '密码',
-                    'type' => 4,
-                );
-            } elseif (Place::$info['type'] == 5) {
-                $data['button'] = array
-                (
-                    'name' => '购买',
-                    'type' => 5,
-                );
-            }
-        }
-
-        # 最新内容
-        //$data['content'] = Dever::load('info', 'content')->getList(false);
-        return Place::result($data);
-    }
-
-    # 验证码登录或者注册
-    public function login_commit(){}
-    public function login()
-    {
-        $account = Dever::input('account', 'is_string', '账户信息');
-        $env = Dever::input('env', 'is_numeric', '环境信息', 3);
-        $mobile = Dever::input('mobile', 'is_numeric', '手机号');
-        $pwd = Dever::input('pwd');
-        $invite = Dever::input('invite');
-        if (!$pwd) {
-            $code = Dever::input('code', 'is_numeric', '验证码');
-            #Dever::load('template', 'msg')->check('reg_code', $mobile, $code);
-        }
-        $where['mobile'] = $mobile;
-        $member = Dever::db('member', 'place')->find($where);
-        if ($member) {
-            if ($pwd && Dever::load('common', 'manage')->hash($pwd, $member['salt']) != $member['password']) {
-                Dever::error('登录失败,密码无效');
-            }
-            # 已注册,登录
-            $id = $member['id'];
-        } else {
-            if ($pwd) {
-                Dever::error('登录失败,账户无效');
-            }
-            if ($invite) {
-                $parent_uid = Dever::load('code', 'invite')->getUid($invite);
-                if (!$parent_uid) {
-                    Dever::error('邀请码不存在');
-                }
-            }
-            $data = $where;
-            $data['name'] = \Dever\Helper\Str::hide($mobile);
-            $data['vip_id'] = -1;
-            $data['agent_id'] = -1;
-            $id = Dever::db('member', 'place')->insert($data);
-            if ($invite) {
-                $parent = Dever::db('member', 'place')->find($parent_uid);
-                if ($parent && $parent['agent_id'] && $parent['agent_id'] > 0) {
-                    Dever::load('relation', 'invite')->set($parent_uid, $id);
-                    Dever::db('member', 'place')->update($id, array('parent_uid' => $parent_uid));
-                }
-            }
-        }
-        $result['t'] = \Dever\Helper\Secure::login($id);
-        # 获取openid
-        $result = Dever::load('util', 'api')->openid($account, $env, $id, $result);
-        if (isset($result['openid'])) {
-            unset($result['openid']);
-        }
-        return $result;
-    }
-
-    # 发送短信验证码
-    public function sms()
-    {
-        $mobile = Dever::input('mobile', 'is_numeric', '手机号');
-        $data = Dever::load('template', 'msg')->send('reg_code', array('mobile' => $mobile));
-        return $data;
-    }
-}

+ 0 - 55
src/place_old/api/Down.php

@@ -1,55 +0,0 @@
-<?php namespace Place\Api;
-use Dever;
-use Place;
-use Place\Lib\Main;
-class Down extends Main
-{
-    protected $login = true;
-    protected $entry = true;
-    
-    # 下载某个附件
-    public function act()
-    {
-        $g = \Dever\Helper\Secure::decode(Dever::input('g'));
-        if (!$g) {
-            Dever::error('无权限');
-        }
-        $info = Dever::load('value', 'content')->getInfo(Place::$user, $g);
-        if (isset($info['value']) && $info['value']) {
-            # 记录下载次数
-            $data['uid'] = Place::$uid;
-            $data['info_id'] = $info['id'];
-            $data['value_id'] = $info['value']['id'];
-            Dever::db('down', 'content')->insert($data);
-            header('location:' . $info['value']['file']);
-        }
-        Dever::error('无权限');
-    }
-
-    # 我的下载
-    public function getUserList()
-    {
-        $where['uid'] = Place::$uid;
-        # 每页10条
-        $set['num'] = 10;
-        $data = Dever::db('down', 'content')->select($where, $set);
-        $result = array();
-        if ($data) {
-            foreach ($data as $k => $v) {
-                $info = Dever::db('info', 'content')->find($v['info_id']);
-                if ($info['status'] == 1) {
-                    $value = Dever::db('value', 'content')->find($v['info_value_id']);
-                    if ($value) {
-                        $info['down_id'] = $v['id'];
-                        $info['cdate'] = $v['cdate'];
-                        $info['cdate_str'] = date('Y-m-d H:i:s', $info['cdate']);
-                        $info['value_name'] = $value['name'];
-                        # 这里是否要再次下载?先不用吧
-                        $result[] = $info;
-                    }
-                }
-            }
-        }
-        return $result;
-    }
-}

+ 0 - 34
src/place_old/api/Manage.php

@@ -1,34 +0,0 @@
-<?php namespace Place\Api;
-use Dever;
-use Manage\Lib\Auth;
-class Manage extends Auth
-{
-    public function getPlatformIcon($parent_id, $value, $table = false, $id = false)
-    {
-        if ($value) {
-            if ($parent_id > 0) {
-                $cate_table = 'level_3';
-            } else {
-                $cate_table = 'level_2';
-            }
-            $cate = Dever::db($cate_table, 'cate')->find($value);
-            if (!$cate['icon_name']) {
-                $cate['icon_name'] = $cate['name'];
-            }
-            if ($id) {
-                $info = Dever::db($table)->find($id);
-                if ($info['icon_id']) {
-                    $cate['icon_id'] = $info['icon_id'];
-                }
-                if ($info['icon_name']) {
-                    $cate['icon_name'] = $info['icon_name'];
-                }
-            }
-
-            $result['icon_id']['type'] = 'selector';
-            $result['icon_id']['option'] = Dever::url("cate/icon.getList", array("id" => $cate['icon_id'], "name" => $cate['icon_name']));
-
-            return $result;
-        }
-    }
-}

+ 0 - 29
src/place_old/api/Order.php

@@ -1,29 +0,0 @@
-<?php namespace Place\Api;
-use Dever;
-use Place;
-use Place\Lib\Main;
-use Place\Lib\Act;
-class Order extends Main
-{
-    protected $login = true;
-    protected $entry = true;
-
-    public function __construct()
-    {
-        parent::__construct();
-        $this->act = new Act('order');
-    }
-
-    public function getUserList()
-    {
-        $data['list'] = $this->act->getUserList(array('order_num', 'status', 'cash', 'num'));
-        return $data;
-    }
-
-    # 查看订单详情
-    public function getView()
-    {
-        $data['info'] = $this->act->getView(array('order_num', 'status', 'cash', 'num'));
-        return $data;
-    }
-}

+ 0 - 198
src/place_old/api/Resource.php

@@ -1,198 +0,0 @@
-<?php namespace Place\Api;
-use Dever;
-use Place;
-use Place\Lib\Main;
-use Place\Lib\Cate;
-use Place\Lib\Resource as Core;
-class Resource extends Main
-{
-    protected $entry = true;
-    protected $type;
-
-    public function __construct()
-    {
-        parent::__construct();
-        $type = Dever::input('type', 'is_numeric', '资源类型');
-        $this->service = new Core($type);
-    }
-
-    # 首页、列表页
-    public function home()
-    {
-        $cate = new Cate($this->service->app);
-        $data = $cate->getData();
-        $data['list'] = $this->service->getList($data['cate_id']);
-        return Place::result($data);
-    }
-
-    # 详情
-    public function view()
-    {
-        $id = Dever::input('type_id', 'is_numeric', '资源ID');
-        $data['info'] = $this->service->getInfo($id);
-        # 分类下其他内容
-        $data['cate'] = $this->service->getList($data['info']['cate'], $data['info']['id'], 6);
-        # 最新内容
-        $data['new'] = $this->service->getList(false, $data['info']['id'], 6);
-        return Place::result($data);
-    }
-
-    # 点击购买按钮
-    public function submit()
-    {
-        if (!Place::$uid) {
-            $this->showLogin();
-        }
-        $id = Dever::input('type_id', 'is_numeric', '资源ID');
-        $info = $this->service->getInfo($id);
-        $data['info'] = Dever::load('info', $this->service->app)->submit($info);
-        return $data;
-    }
-
-    # 拉起支付
-    public function pay()
-    {
-        if (!Place::$uid) {
-            $this->showLogin();
-        }
-        $id = Dever::input('type_id', 'is_numeric', '资源ID');
-        $info = $this->service->getInfo($id);
-        $info = Dever::load('info', $this->service->app)->submit($info, 'price', true);
-        if ($info['status'] == 2) {
-            return $this->service->pay($info);
-        } else {
-            Dever::error('无权限');
-        }
-    }
-
-    # 重新支付
-    public function repay()
-    {
-
-    }
-
-    # 资源评论列表
-    public function getReviewList()
-    {
-        $where['type'] = Dever::input('type', 'is_numeric', '类型');
-        $where['type_id'] = Dever::input('type_id', 'is_numeric', '类型ID');
-        # 每页10条
-        $set['num'] = Dever::input('num', 'is_numeric', '分页条数', 3);
-        $data = Dever::db('review', 'place')->select($where, $set);
-        if ($data) {
-            foreach ($data as &$v) {
-                $v['cdate_str'] = date('Y-m-d H:i:s', $v['cdate']);
-                $v['oper'] = 2;
-                if (Place::$uid == $v['uid']) {
-                    $v['oper'] = 1;
-                }
-                $v['user'] = Dever::db('member', 'place')->find($v['uid'], array('col' => 'mobile,name,avatar'));
-            }
-        }
-        $result['list'] = $data;
-        $result['total'] = Dever::page('total');
-        return $result;
-    }
-
-    # 获取订单列表
-    public function getOrderList()
-    {
-        $data['order'][] = array('name' => '待付款', 'status' => 1);
-        $data['order'][] = array('name' => '待发货', 'status' => 2);
-        $data['order'][] = array('name' => '待收货', 'status' => '3,4');
-        $data['order'][] = array('name' => '已完成', 'status' => '5,6,7,9');
-        $data['order'][] = array('name' => '退款', 'status' => '10');
-        $data['list'] = $this->service->getOrderList();
-        return Place::result($data);
-    }
-
-    # 获取订单详情
-    public function getOrderView()
-    {
-        $data['info'] = $this->service->getOrderView();
-        return Place::result($data);
-    }
-
-    # 修改订单地址
-    public function upOrderAddress()
-    {
-        $this->service->upOrderAddress();
-        return 'ok';
-    }
-
-    # 确认收货
-    public function upOrderFinish()
-    {
-        $this->service->upOrderFinish();
-        return 'ok';
-    }
-
-    # 取消订单
-    public function upOrderCancel()
-    {
-        $this->service->upOrderCancel();
-        return 'ok';
-    }
-
-    # 申请退款
-    public function applyRefund()
-    {
-        $info = $this->service->getOrderView();
-        if ($info && $info['type'] == 1 && $info['status'] > 1 && $info['status'] < 7 && !$info['refund']) {
-            $data['type'] = Dever::db('order_refund', $this->service->app)->value('type');
-            $data['desc_type'] = Dever::db('order_refund', $this->service->app)->value('desc_type');
-            $data['cash'] = $info['scash'];
-            $data['detail'] = $info['detail'];
-            return $data;
-        } else {
-            Dever::error('无法申请退款');
-        }
-    }
-
-    # 确认申请退款
-    public function applyRefundAct_commit(){}
-    public function applyRefundAct()
-    {
-        $info = $this->service->getOrderView();
-        if ($info && $info['type'] == 1 && $info['status'] > 1 && $info['status'] < 7 && !$info['refund']) {
-            $type = Dever::input('apply_type', 'is_numeric', '申请类型');
-            $desc_type = Dever::input('desc_type', 'is_numeric', '申请原因');
-            $cash = Dever::input('cash', 'is_numeric', '退款金额');
-            $desc = Dever::input('desc', 'is_string', '申请说明');
-            $detail = Dever::input('detail');
-            if ($detail && is_string($detail)) {
-                $detail = Dever::json_decode($detail);
-            }
-            $log['type'] = 1;
-            $log['uid'] = Place::$uid;
-            Dever::load('refund', $this->service->app)->up($detail, $info, $type, $desc_type, $cash, $desc, $log);
-            return 'ok';
-        } else {
-            Dever::error('无法申请退款');
-        }
-    }
-
-    # 退款单发货 获取信息
-    public function express()
-    {
-        $info = $this->service->getOrderView();
-        if ($info && $info['type'] == 1 && $info['refund'] && $info['refund']['type'] == 1 && $info['refund']['status'] == 2) {
-            $data['express'] = Dever::db('express', 'sector')->select([]);
-            return $data;
-        }
-        Dever::error('无发货权限');
-    }
-
-    # 退款单发货
-    public function expressAct()
-    {
-        $info = $this->service->getOrderView();
-        if ($info && $info['type'] == 1 && $info['refund'] && $info['refund']['type'] == 1 && $info['refund']['status'] == 2) {
-            $express_id = Dever::input('express_id', 'is_string', '快递公司');
-            $number = Dever::input('number', 'is_string', '快递单号');
-            Dever::load('refund', $this->service->app)->express($info, $info['refund'], $express_id, $number);
-            return 'ok';
-        }
-        Dever::error('无发货权限');
-    }
-}

+ 0 - 33
src/place_old/api/Review.php

@@ -1,33 +0,0 @@
-<?php namespace Place\Api;
-use Dever;
-use Place;
-use Place\Lib\Main;
-use Place\Lib\Act;
-class Review extends Main
-{
-    protected $login = true;
-    protected $entry = true;
-
-    public function __construct()
-    {
-        parent::__construct();
-        $this->act = new Act('review');
-    }
-
-    public function up()
-    {
-        $data['content'] = Dever::input('content', 'is_string', '内容');
-        return $this->act->up($data, '请不要发布相同内容');
-    }
-
-    public function cancel()
-    {
-        $data['id'] = Dever::input('review_id', 'is_numeric', '评论');
-        return $this->act->del($data);
-    }
-
-    public function getUserList()
-    {
-        return $this->act->getUserList();
-    }
-}

+ 0 - 17
src/place_old/api/Seller.php

@@ -1,17 +0,0 @@
-<?php namespace Api\Api;
-use Dever;
-class Seller
-{
-    # 获取授权
-    public function auth()
-    {
-        $id = Dever::input('id');
-        $info = Dever::db('seller', 'place')->find($id);
-
-        if ($info['type'] == 1) {
-            # 微信小店
-            $link = Dever::url('wechat/auth.link', array('type' => 2, 'call' => 'place/seller.up'), true);
-        }
-        header('location:' . $link);
-    }
-}

+ 0 - 20
src/place_old/api/Task.php

@@ -1,20 +0,0 @@
-<?php namespace Api\Api;
-use Dever;
-class Task
-{
-    # 定时更新
-    public function func()
-    {
-        $where['status'] = 1;
-        $where['cron_time'] = array('>', '0');
-        $data = Dever::db('app_func', 'api')->select($where);
-        if ($data) {
-            foreach ($data as $k => $v) {
-                $account = Dever::db('account', 'api')->find(array('app_id' => $v['app_id']));
-                if ($account) {
-                    Dever::load('account', 'api')->run($account, $v);
-                }
-            }
-        }
-    }
-}

+ 0 - 31
src/place_old/api/Test.php

@@ -1,31 +0,0 @@
-<?php namespace Place\Api;
-use Dever;
-use Place;
-use Place\Lib\Main;
-class Test extends Main
-{
-    protected $login = true;
-    protected $entry = true;
-    # 将订单设置为成功
-    public function order()
-    {
-        $app = Dever::input('app', 'is_string', '资源类型', 'goods');
-        $status = Dever::input('status', 'is_numeric', '订单状态', '1');
-        $order_num = Dever::input('order_num', 'is_string', '订单号');
-        Dever::load('order', $app)->success($order_num, $status);
-        return 'ok';
-    }
-
-    public function yue_commit(){}
-    public function yue()
-    {
-        $state = Dever::db('member', 'place')->update(Place::$uid, array('cash' => -10));
-        $info = Dever::db('member', 'place')->find(Place::$uid);
-        $info['yue'] = $info['cash'];
-        if ($info['yue'] < 0) {
-            Dever::error('余额不足');
-        }
-
-        print_r($state);die;
-    }
-}

+ 0 - 19
src/place_old/api/Tool.php

@@ -1,19 +0,0 @@
-<?php namespace Place\Api;
-use Dever;
-use Place;
-class Tool
-{
-    # 根据身份码获取入口
-    public function code()
-    {
-        $code = Dever::input('code');
-        if (!$code) {
-            Dever::error('请输入身份码');
-        }
-        $code = Dever::db('code', 'place')->find(array('code' => $code));
-        if (!$code) {
-            Dever::error('身份码错误');
-        }
-        return array('p' => Place::entry($code['sector_id'], $code['module_id'], $code['user_id'], $code['place_id']));
-    }
-}

+ 0 - 19
src/place_old/api/Url.php

@@ -1,19 +0,0 @@
-<?php namespace Place\Api;
-use Dever;
-use Place;
-use Dever\Helper\Secure;
-class Url
-{
-    public function place()
-    {
-        $id = Dever::input('id');
-        $info = Dever::db('info', 'place')->find($id);
-        if ($info) {
-            $extend = Dever::load('common', 'manage')->extend();
-            $param['p'] = Place::entry($extend['info_id'], $extend['module_id'], $extend['data_id'], $id);
-            $link = str_replace('https://center.yuandaibao.com/src/place/', 'https://place.work.yuandaibao.com/', Dever::url('place/data.home', $param));
-            header('HTTP/1.1 301 Moved Permanently');
-            header('Location: ' . $link);
-        }
-    }
-}

+ 0 - 81
src/place_old/api/User.php

@@ -1,81 +0,0 @@
-<?php namespace Place\Api;
-use Dever;
-use Place;
-use Place\Lib\Main;
-class User extends Main
-{
-    protected $login = true;
-    protected $entry = true;
-
-    # 我的信息
-    public function info()
-    {
-        $data['vip'] = 2;
-        $vip = Dever::db('vip', 'place')->find([]);
-        if ($vip) {
-            $data['vip'] = 1;
-        }
-        $data['agent'] = 2;
-        $agent = Dever::db('agent', 'place')->find([]);
-        if ($agent) {
-            $data['agent'] = 1;
-        }
-        /*
-        if (Place::$user['vip_id'] > 0) {
-            $data['vip'] = Dever::db('vip', 'place')->find(Place::$user['vip_id']);
-        }
-        if (Place::$user['agent_id'] > 0) {
-            $data['agent'] = Dever::db('agent', 'place')->find(Place::$user['agent_id']);
-        }*/
-        # 获取商品订单
-        $data['show_order'] = 2;
-        foreach (Place::$resource as $k => $v) {
-            if ($v['type'] == 3) {
-                $data['show_order'] = 1;
-            }
-        }
-        if ($data['show_order'] == 1) {
-            $data['order'][] = array('name' => '待付款', 'num' => Dever::db('order', 'goods')->count(array('status' => 1)), 'status' => 1);
-            $data['order'][] = array('name' => '待发货', 'num' => Dever::db('order', 'goods')->count(array('status' => 2)), 'status' => 2);
-            $data['order'][] = array('name' => '待收货', 'num' => Dever::db('order', 'goods')->count(array('status' => array('in', '3,4'))), 'status' => '3,4');
-            $data['order'][] = array('name' => '已完成', 'num' => Dever::db('order', 'goods')->count(array('status' => array('in', '5,6'))), 'status' => '5,6,7,9');
-        }
-        return Place::result($data);
-    }
-
-    # 更新我的信息
-    public function update()
-    {
-        $update = array();
-        $name = Dever::input('name');
-        if ($name) {
-            Place::$user['name'] = $update['name'] = $name;
-        }
-        $avatar = Dever::input('avatar');
-        if ($avatar) {
-            Place::$user['avatar'] = $update['avatar'] = $avatar;
-        }
-        if ($update) {
-            Dever::db('member', 'place')->update(Place::$uid, $update);
-        }
-        return Place::$user;
-    }
-
-    # 修改密码
-    public function pwd()
-    {
-        # 大于8位字符,至少包含:小写字母、大写字母、数字、特殊字符
-        $pwd = Dever::input('pwd', '/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\W_]).{8,}$/', '密码');
-        $code = Dever::input('code', 'is_string', '验证码');
-        Dever::load('template', 'msg')->check('user_code', Place::$user['mobile'], $code);
-        $update = Dever::load('manage/common')->createPwd($pwd);
-        Dever::db('member', 'place')->update(Place::$uid, $update);
-    }
-
-    # 发送短信验证码
-    public function sms()
-    {
-        $data = Dever::load('template', 'msg')->send('user_code', array('mobile' => Place::$user['mobile']));
-        return $data;
-    }
-}

+ 0 - 38
src/place_old/api/Vip.php

@@ -1,38 +0,0 @@
-<?php namespace Place\Api;
-use Dever;
-use Place;
-use Place\Lib\Main;
-class Vip extends Main
-{
-    #protected $login = true;
-    protected $entry = true;
-
-    # 会员列表
-    public function list()
-    {
-        $data = Dever::load('vip', 'place')->getData();
-        return Place::result($data);
-    }
-
-
-    # 会员信息
-    public function info()
-    {
-        if (!Place::$uid) {
-            $this->showLogin();
-        }
-        $data = Dever::load('vip', 'place')->getInfo();
-        return Place::result($data);
-    }
-
-    
-
-    # 购买会员
-    public function buy()
-    {
-        if (!Place::$uid) {
-            $this->showLogin();
-        }
-        return Dever::load('vip', 'place')->pay();
-    }
-}

+ 0 - 98
src/place_old/boot.php

@@ -1,98 +0,0 @@
-<?php
-# place 身份入口
-class Place
-{
-    public static $info;
-    public static $user;
-    public static $resource;
-    public static $uid;
-    public static $code;
-    public static $system;
-    public static $sector;
-    public static $module;
-    public static $id;
-
-    public static function entry($sector_id, $module_id, $user_id, $place_id)
-    {
-        $code = \Dever\Helper\Secure::encode($sector_id . '-' . $module_id . '-' . $user_id . '-' . $place_id);
-        return $code;
-    }
-
-    # 初始化
-    public static function init()
-    {
-        self::$code = Dever::input('p');
-        $code = Dever\Helper\Secure::decode(self::$code);
-        if (!$code) {
-            Dever::error('身份码错误');
-        }
-        list($sector_id, $module_id, $user_id, $place_id) = explode('-', $code);
-        self::$system = Dever::db('system', 'manage')->find(array('key' => 'sector'));
-        self::$sector = Dever::db(self::$system['info_table'])->find($sector_id);
-        if (!self::$sector) {
-            Dever::error('领域信息错误');
-        }
-        # 切换数据库
-        Dever::load('common', 'manage')->setAuth(self::$system['partition'], self::$system['id'], self::$sector['id'], $module_id, $user_id);
-
-        # 初始化身份
-        self::info($user_id, $place_id);
-
-        # 切换数据库
-        self::$module = Dever::db('system_module', 'manage')->find(array('key' => 'sector_place'));
-        Dever::load('common', 'manage')->setAuth(self::$system['partition'], self::$system['id'], self::$sector['id'], self::$module['id'], $place_id);
-
-        # 初始化资源
-        self::resource();
-
-    }
-
-    # 身份信息
-    public static function info($user_id, $place_id)
-    {
-        $user = Dever::db('user', 'sector')->find($user_id);
-        self::$info = Dever::db('info', 'place')->find($place_id, array('col' => 'name,logo,content,score as score_name,score_per,bg,type,vip_name,agent_name,money_id,uid,pay_account'));
-        if (!self::$info) {
-            Dever::error('信息有误');
-        }
-        if (self::$info['uid'] != $user['id']) {
-            Dever::error('信息有误');
-        }
-        if (!self::$info['vip_name']) {
-            self::$info['vip_name'] = '会员';
-        }
-        if (!self::$info['agent_name']) {
-            self::$info['agent_name'] = '代理';
-        }
-        self::$id = $place_id;
-        self::$info['channel'] = $user['channel'];
-        self::$info['content'] = htmlspecialchars_decode(self::$info['content']);
-        $money = Dever::db('money', 'sector')->find(self::$info['money_id']);
-        self::$info['money_name'] = $money['sign'];
-    }
-
-    # 资源信息
-    public static function resource()
-    {
-        self::$resource = Dever::db('resource', 'place')->select(['status' => 1], array('col' => 'name,icon,type'));
-    }
-
-    # 用户信息
-    public static function user($uid)
-    {
-        self::$user = Dever::db('member', 'place')->find($uid, array('col' => 'id,name,avatar,cash,score_cash,vip_id,agent_id,client_id'));
-        if (self::$user) {
-            self::$uid = $uid;
-            self::$user['score_cash_name'] = self::$user['score_cash'] . self::$info['score_name'];
-            self::$user['money_cash_name'] = self::$info['money_name'] . self::$user['cash'];
-        }
-    }
-
-    public static function result($data)
-    {
-        $data['place'] = self::$info;
-        $data['resource'] = self::$resource;
-        $data['user'] = self::$user;
-        return $data;
-    }
-}

+ 0 - 6
src/place_old/index.php

@@ -1,6 +0,0 @@
-<?php
-define('DEVER_APP_NAME', 'place');
-define('DEVER_APP_LANG', '身份');
-define('DEVER_APP_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
-include(DEVER_APP_PATH . 'boot.php');
-include(DEVER_APP_PATH . '../../boot.php');

+ 0 - 55
src/place_old/lib/Account.php

@@ -1,55 +0,0 @@
-<?php namespace Place\Lib;
-use Dever;
-use Place;
-class Account
-{
-    # 下单操作
-    public function pay($order)
-    {
-        $account = Dever::input('account', 'is_string', '账户', 'wechat');
-        $env = Dever::input('env', 'is_numeric', '运行环境', 3);
-        $result = Dever::load('util', 'api')->openid($account, $env, Place::$uid);
-        if (isset($result['openid'])) {
-            $order['openid'] = $result['openid'];
-        } elseif (isset($result['link'])) {
-            return $result;
-        }
-
-        $account = 'pay_' . $account;
-        $project = 'api';
-
-        if (Place::$info['pay_account'] > 0) {
-            $info = $this->getInfo(Place::$info['pay_account']);
-            if ($info) {
-                $account = $info;
-                $project = 'place';
-                $cert = Dever::db('account_cert', 'place')->find(array('account_id' => $info['id'], 'platform_cert_id' => 2));
-                if (!$cert || ($cert && $cert['edate'] <= time())) {
-                    Dever::load('account', 'api')->run($account, 'task', array(), 1, 'run', $project);
-                }
-            }
-        }
-
-        $order['cash'] = $order['cash']*100;
-        $order['time_expire'] = time() + 3600;
-
-        return Dever::load('account', 'api')->run($account, 'order', $order, $env, 'run', $project);
-    }
-
-    # 获取账户信息
-    public function getInfo($id)
-    {
-        $info = Dever::db('account', 'place')->find($id);
-        if ($info) {
-            if ($info['type'] == 1) {
-                $key = 'pay_wechat';
-            } else {
-                Dever::error('错误信息');
-            }
-            $account = Dever::db('account', 'api')->find(array('key' => $key));
-            $info['app_id'] = $account['app_id'];
-            $info['platform_id'] = $account['platform_id'];
-            return $info;
-        }
-    }
-}

+ 0 - 139
src/place_old/lib/Act.php

@@ -1,139 +0,0 @@
-<?php namespace Place\Lib;
-use Dever;
-use Place;
-class Act
-{
-    private $db;
-    private $type;
-    public function __construct($name, $type = false, $type_id = false)
-    {
-        $this->type = Dever::input('type', '', '', $type);
-        $this->type_id = Dever::input('type_id', '', '', $type_id);
-        $this->db = Dever::db($name, 'place');
-        $this->app = Dever::config('setting')['type'][$this->type];
-    }
-
-    protected function check()
-    {
-        if (!$this->type || !$this->type_id) {
-            Dever::error('传入参数错误');
-        }
-    }
-
-    # 更新互动信息
-    public function up($data = array(), $msg = '')
-    {
-        if ($this->getInfo($data)) {
-            $msg && Dever::error($msg);
-        } else {
-            $this->db->insert($this->data);
-        }
-        return 'ok';
-    }
-
-    # 删除
-    public function del($data = array())
-    {
-        if ($info = $this->getInfo($data)) {
-            $this->db->delete($info['id']);
-        }
-        return 'ok';
-    }
-
-    # 获取用户互动相关的信息
-    public function getInfo($data = array(), $field = array())
-    {
-        $this->check();
-        $this->data = $data;
-        $this->data['type'] = $this->type;
-        $this->data['type_id'] = $this->type_id;
-        $this->data['uid'] = Place::$uid;
-        return $this->handleInfo($this->db->find($this->data), $field);
-    }
-
-    # 获取详情页
-    public function getView($field = array())
-    {
-        $data['id'] = Dever::input('data_id', 'is_numeric', 'ID');
-        $info = $this->getInfo($data, $field);
-        return Dever::load('order', $this->app)->getView($info);
-    }
-
-    # 评论列表
-    public function getList()
-    {
-        $data['type'] = Dever::input('type', 'is_numeric', '类型');
-        $data['type_id'] = Dever::input('type_id', 'is_numeric', '类型ID');
-        # 每页10条
-        $set['num'] = 10;
-        $data = Dever::db('review', 'place')->select($where, $set);
-        if ($data) {
-            foreach ($data as &$v) {
-                $v['cdate_str'] = date('Y-m-d H:i:s', $v['cdate']);
-                $v['oper'] = 2;
-                if (Place::$uid == $v['uid']) {
-                    $v['oper'] = 1;
-                }
-                $v['user'] = Dever::db('member', 'place')->find($v['uid'], array('col' => 'mobile,name,avatar'));
-            }
-        }
-        return $data;
-    }
-
-    # 获取用户的互动列表
-    public function getUserList($field = array(), $page = 10)
-    {
-        $where['uid'] = Place::$uid;
-        if ($this->type) {
-            $where['type'] = $this->type;
-        }
-        # 每页10条
-        $set['num'] = $page;
-        $data = $this->db->select($where, $set);
-        $result = array();
-        if ($data) {
-            foreach ($data as $k => $v) {
-                $info = $this->handleInfo($v, $field);
-                if ($info) {
-                    $result[] = $info;
-                }
-            }
-        }
-        return $result;
-    }
-
-    private function getTypeInfo($type, $type_id)
-    {
-        $app = Dever::config('setting')['type'][$type];
-        if ($type > 0) {
-            $db = Dever::db('info', $app);
-            $info = $db->find($type_id, array('col' => 'id,name,pic,info'));
-            $info['pic'] = explode(',', $info['pic']);
-            $info['pic'] = $info['pic'][0] ?? '';
-            return $info;
-        }
-    }
-
-    private function handleInfo($v, $field = array())
-    {
-        if (!$v) {
-            return array();
-        }
-        $info = $this->getTypeInfo($v['type'], $v['type_id']);
-        if ($info) {
-            #$info['status'] = $v['status'];
-            #$info['status_name'] = $this->db->value('status', $v['status']);
-            $info['type'] = $v['type'];
-            $info['type_id'] = $v['type_id'];
-            $info['data_id'] = $v['id'];
-            //$info['cdate'] = $v['cdate'];
-            $info['cdate_str'] = date('Y-m-d H:i:s', $v['cdate']);
-            if ($field) {
-                foreach ($field as $v1) {
-                    $info[$v1] = $v[$v1];
-                }
-            }
-            return $info;
-        }
-    }
-}

+ 0 - 128
src/place_old/lib/Address.php

@@ -1,128 +0,0 @@
-<?php namespace Place\Lib;
-use Dever;
-use Place;
-class Address
-{
-    # 获取默认地址
-    public function getDefault($type = 1)
-    {
-        $where['uid'] = Place::$uid;
-        $where['type'] = $type;
-        $info = Dever::db('address', 'place')->find($where);
-        if (!$info) {
-            unset($where['type']);
-            $info = Dever::db('address', 'place')->find($where);
-        }
-        if ($info && Dever::project('area')) {
-            $info = $this->handleInfo($info);
-        }
-        return $info;
-    }
-
-    # 获取某个收货地址
-    public function getInfo($id, $uid)
-    {
-        $where['id'] = $id;
-        $where['uid'] = $uid;
-        $info = Dever::db('address', 'place')->find($where);
-        if ($info && Dever::project('area')) {
-            $info = $this->handleInfo($info);
-        }
-        return $info;
-    }
-
-    # 获取地址列表
-    public function getList()
-    {
-        $where['uid'] = Place::$uid;
-        $where['type'] = array('<', 3);
-        $data = Dever::db('address', 'place')->select($where);
-        if ($data && Dever::project('area')) {
-            foreach ($data as $k => $v) {
-                $data[$k] = $this->handleInfo($v);
-            }
-        }
-        return $data;
-    }
-
-    public function handleInfo($data)
-    {
-        if (is_array($data['area'])) {
-            $data['area'] = implode(',', $data['area']);
-        }
-        $data['area_string'] = Dever::load('data', 'area')->string($data['area']);
-        $data['province_name'] = $data['city_name'] = $data['county_name'] = '';
-
-        if ($data['county_id']) {
-            $info = Dever::db('county', 'area')->find($data['county_id']);
-            if ($info) {
-                $data['county_name'] = $info['name'];
-            }
-        }
-        if ($data['city_id']) {
-            $info = Dever::db('city', 'area')->find($data['city_id']);
-            if ($info) {
-                $data['city_name'] = $info['name'];
-            }
-        }
-        if ($data['province_id']) {
-            $info = Dever::db('province', 'area')->find($data['province_id']);
-            if ($info) {
-                $data['province_name'] = $info['name'];
-            }
-        }
-        $data['full'] = $data['name'] . ',' . $data['phone'] . ',' . $data['area_string'] . ',' . $data['address'];
-        return $data;
-    }
-
-    # 添加或者更新地址
-    public function update($id, $type = 1, $phone, $name, $province = '', $city = '', $county = '', $address = '')
-    {
-        $update['uid'] = Place::$uid;
-        if ($name) {
-            $update['name'] = $name;
-        }
-        if ($phone) {
-            $update['phone'] = $phone;
-        } else {
-            Dever::alert('请输入联系方式');
-        }
-        if ($province) {
-            $update['province_id'] = $province;
-        } else {
-            Dever::alert('请选择省份');
-        }
-        if ($city) {
-            $update['city_id'] = $city;
-        } else {
-            Dever::alert('请选择城市');
-        }
-        if ($county) {
-            $update['county_id'] = $county;
-        } else {
-            Dever::alert('请选择区县');
-        }
-        if ($province && $city && $county) {
-            $update['area'] = $province . ',' . $city . ',' . $county;
-        }
-        $update['type'] = $type;
-        if ($address) {
-            $update['address'] = $address;
-        }
-        if ($type == 1) {
-            Dever::db('address', 'place')->update(array('type' => 1), array('type' => 2));
-        }
-        if ($id) {
-            Dever::db('address', 'place')->update(array('id' => $id, 'uid' => Place::$uid), $update);
-        } else {
-            $id = Dever::db('address', 'place')->insert($update);
-        }
-        return $id;
-    }
-
-    # 删除
-    public function delete($id)
-    {
-        return Dever::db('address', 'place')->delete(array('id' => $id, 'uid' => Place::$uid));
-    }
-}

+ 0 - 7
src/place_old/lib/Agent.php

@@ -1,7 +0,0 @@
-<?php namespace Place\Lib;
-use Dever;
-class Agent extends Vip
-{
-    protected $type = 'agent';
-    protected $name = '代理';
-}

+ 0 - 18
src/place_old/lib/Callback.php

@@ -1,18 +0,0 @@
-<?php namespace Place\Lib;
-use Dever;
-use Place;
-class Callback
-{
-    # 资源支付成功
-    public function resource($place, $order_num, $app, $status, $body = array())
-    {
-        Dever::input('authorization', 'is_string', '入口码', $place);
-        $order = Dever::db('order', $app)->find(array('order_num' => $order_num));
-        if ($order && $order['status'] == 1) {
-            $state = Dever::load('order', $app)->success($order, $status);
-            if (!$state) {
-                return '订单更新失败';
-            }
-        }
-    }
-}

+ 0 - 79
src/place_old/lib/Cate.php

@@ -1,79 +0,0 @@
-<?php namespace Place\Lib;
-use Dever;
-class Cate
-{
-    public function __construct($app = 'content')
-    {
-        $this->db = Dever::db('cate', $app);
-    }
-
-    # 获取所有分类信息
-    public function getData()
-    {
-        $data['cate_parent'] = $this->getList();
-        $data['cate_child'] = array();
-        $data['cate_id'] = Dever::input('cate_id');
-        if ($data['cate_id']) {
-            $cate = $this->getInfo($data['cate_id']);
-            $data['cate'] = $cate;
-            if ($cate) {
-                $cate['name'] = '全部';
-                if ($cate['parent_id'] <= 0) {
-                    $parent_id = $cate['id'];
-                } else {
-                    $parent_id = $cate['parent_id'];
-                }
-                if ($data['cate_parent']) {
-                    foreach ($data['cate_parent'] as &$v) {
-                        $v['selected'] = 2;
-                        if ($v['id'] == $parent_id) {
-                            $v['selected'] = 1;
-                        }
-                    }
-                }
-                $data['cate_child'][] = array('id' => $parent_id, 'name' => '全部');
-                $data['cate_child'] = array_merge($data['cate_child'], $this->getList($parent_id, 10));
-                if ($data['cate_child']) {
-                    foreach ($data['cate_child'] as &$v) {
-                        $v['selected'] = 2;
-                        if ($v['id'] == $cate['id']) {
-                            $v['selected'] = 1;
-                        }
-                    }
-                }
-            }
-        } else {
-            $data['cate_child'] = $this->getList(array('>', 0), 10);
-            if ($data['cate_child']) {
-                foreach ($data['cate_child'] as &$v) {
-                    $v['selected'] = 2;
-                }
-            }
-        }
-        return $data;
-    }
-
-    # 获取分类列表
-    public function getList($parent_id = 0, $num = false)
-    {
-        $set = array();
-        if ($num) {
-            $set['limit'] = '0, ' . $num;
-        }
-        $data = $this->db->select(array('parent_id' => $parent_id, 'status' => 1), array('col' => 'id,name,icon_type,icon_id,icon,cdate,parent_id,`desc`'), $set);
-        if ($data) {
-            foreach ($data as &$v) {
-                if ($v['icon_type'] == 1) {
-                    $v['icon'] = Dever::load('icon', 'cate')->show($v['icon_id']);
-                }
-            }
-        }
-        return $data;
-    }
-
-    # 获取分类信息
-    public function getInfo($id)
-    {
-        return $this->db->find($id);
-    }
-}

+ 0 - 114
src/place_old/lib/Client.php

@@ -1,114 +0,0 @@
-<?php namespace Place\Lib;
-use Dever;
-use Place;
-class Client
-{
-    public function get($info, $app, $type, $button)
-    {
-        if (Place::$user['client_id'] <= 0) {
-            Dever::error('您不是源主');
-        }
-        $result = array();
-        $result['status'] = 2;
-        $result['text'] = '';
-        $result['original'] = $info['price'];
-        $result['value'] = $info['price'];
-        $result['button'] = $button;
-        $result['list'] = array();
-
-        $client_resource = Dever::db('client_resource', 'place')->find(array('uid' => Place::$uid, 'client_id' => Place::$user['client_id'], 'type' => $type, 'type_id' => $info['id']));
-        if ($client_resource && $client_resource['status'] == 1) {
-            $result['status'] = 1;
-        }
-
-        # 基础折扣
-        $base = Dever::db('client_price', 'place')->find(array('type' => $type, 'status' => 1));
-        if ($base && $base['per']) {
-            $per = $base['per'];
-            $result['value'] = Dever::load('price', 'place')->getValue($per, $result['value'], 3);
-        }
-        
-        $client = Dever::db('client', 'place')->select(array('status' => 1), array('order' => 'day asc,sell desc', 'col' => 'id,day,sell,per'));
-        $price = false;
-        if ($client) {
-            $set = array('col' =>  'sum(num) as num');
-            foreach ($client as $k => $v) {
-                $v['value'] = Dever::load('price', 'place')->getValue($v['per'], $result['value'], 3);
-                $v['name'] = $v['day'] . '天内总销量>=' . $v['sell'];
-                $v['text'] = Dever::load('price', 'place')->getText($v['value'], $type);
-                $result['list'][] = $v;
-                # 获取时效内销量
-                $day = time() - $v['day']*86400;
-                $where = array('uid' => Place::$uid, 'type' => $type, 'day' => array('>=', $day));
-                $sell = Dever::db('order_stat', 'place')->find($where, $set);
-                if ($sell && $sell['num'] >= 0) {
-                    # 获取自定义销量
-                    $resource = Dever::db('client_price', $app)->select(array('client_id' => $v['id']), array('order' => 'sell desc'));
-                    if ($resource) {
-                        foreach ($resource as $v1) {
-                            if ($v1['sell'] > 0) {
-                                $v['value'] = Dever::load('price', 'place')->getValue($v1['value'], $info['value'], 3);
-                                $v['name'] = $v['day'] . '天内本品销量>=' . $v1['sell'];
-                                $v['text'] = Dever::load('price', 'place')->getText($v['value'], $type);
-                                $result['list'][] = $v;
-                                if (!$price) {
-                                    $where['type_id'] = $v1['info_id'];
-                                    $sell = Dever::db('order_stat', 'place')->find($where, $set);
-                                    if ($sell && $sell['num'] >= $v1['sell']) {
-                                        $price = $v['value'];
-                                    }
-                                }
-                            }
-                        }
-                    }
-                    if (!$price && $sell['num'] >= $v['sell']) {
-                        $price = $v['value'];
-                    }
-                }
-            }
-        }
-        if ($price) {
-            $info['value'] = $price;
-        }
-        $result['text'] = Dever::load('price', 'place')->getText($result['value'], $type);
-        return $result;
-    }
-
-    # 同步资源
-    public function resource($place, $data, $resource, $info)
-    {
-        $relation['info'] = $info;
-        $relation['cate'] = Dever::db('cate', $resource->app)->select(array('id' => array('in', $info['cate'])), array('order' => 'parent_id asc'));
-
-        if ($data['type'] == 3 && $info['spec_type'] == 3) {
-            # 还要同步一下sku
-            $relation['spec'] = Dever::db('spec', $resource->app)->select(array('info_id' => $info['id']));
-            if ($relation['spec']) {
-                foreach ($relation['spec'] as &$v) {
-                    $v['value'] = Dever::db('spec_value', $resource->app)->select(array('spec_id' => $v['id']));
-                }
-            }
-            $relation['sku'] = Dever::db('sku', $resource->app)->select(array('info_id' => $info['id']));
-        }
-
-        $place_id = Place::$id;
-        foreach ($place as $v1) {
-            # 切换身份
-            Dever::load('common', 'manage')->setAuth(Place::$system['partition'], Place::$system['id'], Place::$sector['id'], Place::$module['id'], $v1['id']);
-            $resource->relation($place_id, $data, $relation);
-        }
-    }
-
-    # 删除已同步的资源
-    public function resourceDel($place, $data)
-    {
-        $resource = new \Place\Lib\Resource($data['type']);
-        $place = explode(',', $place);
-        $place_id = Place::$id;
-        foreach ($place as $k => $v) {
-            # 切换身份
-            Dever::load('common', 'manage')->setAuth(Place::$system['partition'], Place::$system['id'], Place::$sector['id'], Place::$module['id'], $v);
-            $resource->relationDel($place_id, $data);
-        }
-    }
-}

+ 0 - 34
src/place_old/lib/Info.php

@@ -1,34 +0,0 @@
-<?php namespace Place\Lib;
-use Dever;
-class Info
-{
-    # 获取列表
-    public function getList()
-    {
-        $data = array
-        (
-            0 => array
-            (
-                'id' => -1,
-                'name' => '通用',
-            ),
-        );
-        $extend = Dever::load('common', 'manage')->extend();
-        $where['uid'] = $extend['data_id'];
-        $data = array_merge($data, Dever::db('info', 'place')->select($where));
-        return $data;
-    }
-    
-
-    # 设置一些资源操作的分区,-1是身份-2是会员-3是代理-4-5-6保留,1是内容2是功能3是商品4是角色5是数据6是聊天789保留
-    public function funcType()
-    {
-        return array
-        (
-            'type' => 'list',
-            'field' => 'type', 
-            'value' => array_keys(Dever::config('setting')['type'])
-        );
-        return $type;
-    }
-}

+ 0 - 44
src/place_old/lib/Main.php

@@ -1,44 +0,0 @@
-<?php namespace Place\Lib;
-use Dever;
-use Place;
-use Dever\Helper\Secure;
-use Dever\Route;
-class Main
-{
-    protected $login = false;
-    protected $entry = false;
-    public function __construct()
-    {
-        Place::init();
-        $t = Dever::input('t');
-        if ($this->login && !$t) {
-            $this->showLogin();
-        }
-        if ($t) {
-            if ($t = Secure::checkLogin($t)) {
-                if ($t['uid'] && $t['uid'] > 0) {
-                    Place::user($t['uid']);
-                }
-                if ($this->login && !Place::$uid) {
-                    $this->showLogin();
-                }
-            } elseif ($this->login) {
-                $this->showLogin();
-            }
-        }
-        if ($this->entry) {
-            if (Place::$info['type'] >= 2 && !Place::$uid) {
-                Dever::error('您没有权限');
-            }
-            /*
-            if (Place::$member && Place::$user['entry_type'] <= 2) {
-                Dever::error('您没有权限');
-            }*/
-        }
-    }
-
-    protected function showLogin()
-    {
-        Dever::error('请先登录', 300);
-    }
-}

+ 0 - 202
src/place_old/lib/Manage.php

@@ -1,202 +0,0 @@
-<?php namespace Place\Lib;
-use Dever;
-use Manage\Lib\Auth;
-class Manage extends Auth
-{
-    # 获取身份的树形列表
-    public function getPlaceTree()
-    {
-        $extend = Dever::load('common', 'manage')->extend();
-        $data = Dever::db('info', 'place')->find(array('id' => $extend['data_id']));
-        $result = array();
-        $result[] = array
-        (
-            'id' => 'root',
-            'name' => '身份',
-            'children' => array($data),
-        );
-        return $result;
-    }
-
-    # 获取资源默认值
-    public function getResourceDefault($field)
-    {
-        $db = Dever::db('resource', 'place');
-        $option = array();
-        foreach ($db->value('type') as $k => $v) {
-            $info = array('type' => $v['id'], 'status' => 1);
-            foreach ($field as $k1 => $v1) {
-                if (isset($v[$v1])) {
-                    $v1 = $v[$v1];
-                }
-                $info[$k1] = $v1;
-            }
-            $option[] = $info;
-        }
-        return $option;
-    }
-
-    # 检测身份码
-    public function checkPlaceCode($db, $data)
-    {
-        if (isset($data['code']) && $data['code']) {
-            $code = Dever::db('code', 'place')->find(['code' => $data['code']]);
-            if ($code) {
-                if (isset($data['id']) && $data['id'] == $code['id']) {
-                    return $data;
-                }
-                Dever::error('身份码已存在');
-            }
-        }
-        return $data;
-    }
-
-    # 更新身份码
-    public function updatePlaceCode($db, $data)
-    {
-        if (isset($data['code']) && $data['code']) {
-            $code = Dever::db('code', 'place')->find(['code' => $data['code']]);
-            if (!$code) {
-                $extend = Dever::load('common', 'manage')->extend();
-                $module = Dever::db('system_module', 'manage')->find($extend['module_id']);
-                if ($module['key'] == 'sector_place') {
-                    $module = Dever::db('system_module', 'manage')->find(array('key' => 'sector_user'));
-                }
-                $update['code'] = $data['code'];
-                $update['sector_id'] = $extend['info_id'];
-                $update['module_id'] = $module['id'];
-                $update['user_id'] = $extend['data_id'];
-                $update['place_id'] = $data['id'];
-                Dever::db('code', 'place')->insert($update);
-            }
-        }
-    }
-
-    # 获取资源类型
-    public function getResourceType($type)
-    {
-        return Dever::db('resource', 'place')->value('type', $type);
-    }
-
-    # 更新分类信息
-    public function updateCate($db, $data)
-    {
-        if ($data['cate']) {
-            $data['cate'] = explode(',', $data['cate']);
-            $update['cate_parent_id'] = $data['cate'][0];
-            if (isset($data['cate'][1])) {
-                $update['cate_child_id'] = $data['cate'][1];
-            } else {
-                $update['cate_child_id'] = 0;
-            }
-            $db->update($data['id'], $update);
-        }
-    }
-
-    # 获取带有子分类的分类列表
-    public function getCateList($type = 'content')
-    {
-        $where = array('parent_id' => 0, 'status' => 1);
-        $parent = Dever::db('cate', $type)->select($where);
-        $result = array();
-        foreach ($parent as $k => $v) {
-            $where['parent_id'] = $v['id'];
-            $v['children'] = Dever::db('cate', $type)->select($where);
-            $result[] = $v;
-        }
-        return $result;
-    }
-
-    public function getCateInfo($type = 'content', $cate = '')
-    {
-        $result = '';
-        if ($cate) {
-            $cate = explode(',', $cate);
-            $info = Dever::db('cate', $type)->find($cate[0]);
-            $result = $info['name'];
-            if (isset($cate[1])) {
-                $info = Dever::db('cate', $type)->find($cate[1]);
-                $result .= '<br />' . $info['name'];
-            }
-        }
-        return $result;
-    }
-
-    # 获取分类图标
-    public function getCateIcon($type, $icon_id, $icon)
-    {
-        if ($type == 1) {
-            return Dever::load('icon', 'cate')->show($icon_id);
-        } else {
-            return '<img src="' . $icon . '" width="30"></img>';
-        }
-    }
-
-    # 获取平台分类
-    public function getPlatformCate($table, $parent_id)
-    {
-        if ($parent_id > 0) {
-            # 获取三级分类
-            $data = Dever::db($table)->find($parent_id);
-            if ($data && $data['cate_id']) {
-                return Dever::db('level_3', 'cate')->select(array('parent_id' => $data['cate_id']));
-            }
-        } else {
-            # 获取二级分类
-            $extend = Dever::load('common', 'manage')->extend();
-            $data = Dever::db('info', 'place')->find(array('id' => $extend['data_id']));
-            if ($data['cate_id']) {
-                return Dever::db('level_2', 'cate')->select(array('parent_id' => $data['cate_id']));
-            }
-        }
-        return array();
-    }
-
-    public function getClientList()
-    {
-        $where['status'] = 1;
-        $client = Dever::db('client', 'place')->select($where);
-        if ($client) {
-            foreach ($client as &$v) {
-                $v['name'] = $v['day'] . '天内>=' . $v['sell'] . '销量';
-            }
-        }
-        return $client;
-    }
-
-    public function getSource($id, $type, $app = 'content')
-    {
-        $result = array();
-        $info = Dever::db('info', $app)->find($id);
-        $result[] = Dever::db('info', $app)->value('source', $info['source']);
-        if ($info['source'] == 2) {
-            $relation = Dever::db('resource_relation', 'place')->find(array('type' => $type, 'type_id' => $id));
-            if ($relation) {
-                $place = Dever::db('info', 'place')->find($relation['channel_place_id']);
-                $result[] = $place['name'];
-            }
-        }
-        return implode('<br />', $result);
-    }
-
-    # 获取支付账户列表
-    public function getAccountList($uid = false)
-    {
-        $data = array
-        (
-            0 => array
-            (
-                'id' => -1,
-                'name' => '平台默认账户',
-            ),
-        );
-        if ($uid) {
-            $where['uid'] = $uid;
-        } else {
-            $extend = Dever::load('common', 'manage')->extend();
-            $where['uid'] = $extend['data_id'];
-        }
-        $data = array_merge($data, Dever::db('account', 'place')->select($where));
-        return $data;
-    }
-}

+ 0 - 134
src/place_old/lib/Price.php

@@ -1,134 +0,0 @@
-<?php namespace Place\Lib;
-use Dever;
-use Place;
-class Price
-{
-    public function get($info, $app, $type, $button)
-    {
-        $num = Dever::input('num', 'is_numeric', '数量', 1);
-        $result = array();
-        $result['status'] = 1;
-        $result['text'] = '';
-        $result['original'] = $info['price'];
-        $result['value'] = $info['price'];
-        $result['button'] = $button;
-        $result['num'] = $num;
-        $result['list'] = array();
-        $order = false;
-        if ($type != 3) {
-            $order = Dever::db('order', $app)->find(array('info_id' => $info['id'], 'uid' => Place::$uid, 'status' => 2));
-        }
-        if ($order) {
-            $result['value'] = $order['cash'];
-        } else {
-            $vip = Dever::load('vip', 'place')->getResourcePrice($info['price'], $info['id'], $app, $type);
-            $agent = Dever::load('agent', 'place')->getResourcePrice($info['price'], $info['id'], $app, $type);
-            if ($this->getAlone($vip, $agent, $result)) {
-                return $result;
-            }
-            if ($info['price'] > 0) {
-                $this->getList($vip, $agent, $result);
-                $info['price'] = $this->getDiscount($info['price'], $vip['list'], $agent['list']);
-                if ($info['price'] > 0) {
-                    if (isset($info['password'])) {
-                        $result['password'] = 2;
-                        if ($info['password']) {
-                            $result['password'] = 1;
-                        }
-                    }
-                    $result['status'] = 2;
-                    $result['value'] = $info['price'];
-                }
-            }
-        }
-        $result['original'] = $result['original'] * $result['num'];
-        $result['value'] = $result['value'] * $result['num'];
-        $result['original_text'] = $this->getText($result['original'], $type);
-        $result['text'] = $this->getText($result['value'], $type);
-        return $result;
-    }
-
-    # 获取价格列表
-    public function getList($vip, $agent, &$result)
-    {
-        if ($vip['list']) {
-            $result['list'][] = array('name' => $vip['name'], 'list' => array_values($vip['list']));
-        }
-        if ($agent['list']) {
-            $result['list'][] = array('name' => $agent['name'], 'list' => array_values($agent['list']));
-        }
-    }
-
-    # 获取专享
-    public function getAlone($vip, $agent, &$result)
-    {
-        $state = false;
-        if ($vip['alone']) {
-            if (isset($vip['alone'][Place::$user['vip_id']])) {
-                $state = false;
-            } else {
-                $state = true;
-                $result['list'][] = array('name' => $vip['name'], 'list' => array_values($vip['alone']));
-            }
-        }
-        if ($agent['alone']) {
-            if (isset($agent['alone'][Place::$user['agent_id']])) {
-                $state = false;
-            } else {
-                $state = true;
-                $result['list'][] = array('name' => $agent['name'], 'list' => array_values($agent['alone']));
-            }
-        }
-        if ($state) {
-            $result['status'] = 3;
-            $result['text'] = '专享';
-        }
-        return $state;
-    }
-
-    # 获取折扣价
-    public function getDiscount($price, $vip, $agent)
-    {
-        $result = array();
-        if (Place::$uid) {
-            # 获取会员价
-            if ($vip && isset($vip[Place::$user['vip_id']])) {
-                $price = $vip[Place::$user['vip_id']][1];
-            }
-            # 获取代理价
-            if ($agent && isset($agent[Place::$user['agent_id']])) {
-                $agent_price = $agent[Place::$user['agent_id']][1];
-                if ($agent_price < $price) {
-                    $price = $agent_price;
-                }
-            }
-        }
-        
-        # 获取折扣+代金券的价格,暂时没有
-        return $price;
-    }
-
-    public function getText($price, $type = 1)
-    {
-        if ($price > 0) {
-            if ($type == 3) {
-                $price = Place::$info['money_name'] . $price;
-            } else {
-                $price = $price . Place::$info['score_name'];
-            }
-        } else {
-            $price = '免费';
-        }
-        return $price;
-    }
-
-    public function getValue($value, $price, $type)
-    {
-        if ($type == 3) {
-            return $value ? number_format($price * ($value/100), 2) : 0.00;
-        } elseif ($value || $value === '0') {
-            return number_format($value, 2);
-        }
-        return $price;
-    }
-}

+ 0 - 405
src/place_old/lib/Resource.php

@@ -1,405 +0,0 @@
-<?php namespace Place\Lib;
-use Dever;
-use Place;
-class Resource
-{
-    public $app;
-    public $type;
-    protected $db;
-    protected $where;
-    protected $set;
-    public function __construct($type)
-    {
-        $this->type = $type;
-        if (!$this->type) {
-            Dever::error('资源参数错误');
-        }
-        if (isset(Dever::config('setting')['type'][$this->type])) {
-            $this->app = Dever::config('setting')['type'][$this->type];
-            $this->db = Dever::db('info', $this->app);
-        } else {
-            Dever::error('资源参数错误');
-        }
-        $this->where = array('status' => 1);
-        $this->set['col'] = Dever::load('info', $this->app)->getCol();
-    }
-
-    # 获取列表
-    public function getList($cate = false, $id = false, $num = 10)
-    {
-        if ($cate) {
-            $cate = explode(',', $cate);
-            $this->where['cate_parent_id'] = $cate[0];
-            if (isset($cate[1])) {
-                $this->where['cate_child_id'] = $cate[0];
-            }
-        }
-        $name = Dever::input('search');
-        if ($name) {
-            $this->where['name'] = array('like', $name);
-        }
-        if ($id) {
-            $this->set['limit'] = '0,6';
-            $this->where['id'] = array('!=', $id);
-        } else {
-            $this->set['num'] = $num;
-        }
-        $info = $this->db->select($this->where, $this->set);
-        $result = array();
-        foreach ($info as $k => $v) {
-            $v = $this->handleInfo($v);
-            if ($v) {
-                $result[] = $v;
-            }
-        }
-        return $result;
-    }
-
-    public function getInfo($id, $state = true)
-    {
-        if (!$id) {
-            Dever::error('资源不存在');
-        }
-        $this->where['id'] = $id;
-        $info = $this->db->find($this->where);
-        if (!$info) {
-            if ($state) {
-                Dever::error('资源不存在');
-            }
-            return false;
-        }
-        return $this->handleInfo($info);
-    }
-
-    # 下单
-    public function pay_commit(){}
-    public function pay($info)
-    {
-        if (isset($info['stock']) && $info['num'] > $info['stock']) {
-            Dever::error('库存不足');
-        }
-        $order = array();
-        $order['uid'] = Place::$uid;
-        $order['name'] = $info['name'];
-        $prefix = strtoupper(substr($this->app, 0, 2));
-        if ($this->type == 3) {
-            $order['cash'] = $info['value'];
-            $order['address_id'] = Dever::input('address_id', 'is_numeric', '收货地址');
-        } else {
-            $order['cash'] = ($info['value']/Place::$info['score_per']);
-        }
-        $order['order_num'] = Dever::load('util', 'api')->createNumber($prefix, $this->app . '/order');
-        $order['notify'] = 'place/callback.resource|' . Dever::input('p') . '|' . $order['order_num'] . '|' . $this->app;
-
-        $data['pay'] = Dever::load('account', 'place')->pay($order);
-        #if ($data['pay'] && empty($data['pay']['link'])) {
-        if ($data['pay']) {
-            $order['status'] = 2;
-            $order['info_id'] = $info['id'];
-            $order['num'] = $info['num'];
-            $data['order_id'] = Dever::db('order', $this->app)->insert($order);
-            $data['order_num'] = $order['order_num'];
-            if (isset($info['detail'])) {
-                Dever::load('log', $this->app)->up(1, $order['uid'], $data['order_id'], '下单成功');
-                $detail['order_id'] = $data['order_id'];
-                foreach ($info['detail'] as $k => $v) {
-                    $detail['info_id'] = $v['id'];
-                    if (isset($v['sku_id'])) {
-                        $detail['sku_id'] = $v['sku_id'];
-                    }
-                    if (isset($v['sku_name'])) {
-                        $detail['sku_name'] = $v['sku_name'];
-                    }
-                    $detail['pic'] = $v['pic'];
-                    $detail['cash'] = $v['cash'];
-                    $detail['num'] = $v['num'] ?? $order['num'];
-                    $detail['name'] = $v['name'];
-                    $detail['pic'] = $v['pic'];
-                    Dever::db('order_detail', $this->app)->insert($detail);
-                    if (isset($v['stock'])) {
-                        $state = Dever::load('stock', 'goods')->sell($detail['info_id'], $detail['sku_id'], $detail['num']);
-                        if (!$state) {
-                            Dever::error('库存不足');
-                        }
-                    }
-                    if (isset($v['cart_id']) && $v['cart_id']) {
-                        Dever::db('cart', $this->app)->delete(array('id' => $v['cart_id'], 'uid' => Place::$uid));
-                    }
-                }
-            }
-        }
-        return $data;
-    }
-
-    # 获取订单列表
-    public function getOrderList()
-    {
-        $where['uid'] = Place::$uid;
-        $set['num'] = 10;
-        $set['col'] = 'id,order_num,info_id,name,cash,num,cdate,status';
-        $status = Dever::input('status');
-        if ($status) {
-            if ($status == 10) {
-                $where['or'] = array
-                (
-                    'refund_status' => '1',
-                    'status' => '8',
-                );
-                $where = ' uid = ' . $where['uid'] . ' and (refund_status = 1 or status = 8)';
-            } else {
-                $where['status'] = array('in', $status);
-            }
-        }
-        $data = Dever::db('order', $this->app)->select($where, $set);
-        $result = array();
-        if ($data) {
-            foreach ($data as $k => $v) {
-                $order = $this->getOrderInfo($v);
-                if ($order) {
-                    $result[] = $order;
-                }
-            }
-        }
-        return $result;
-    }
-
-    # 获取订单详情
-    public function getOrderView()
-    {
-        $where['uid'] = Place::$uid;
-        $where['id'] = Dever::input('id', 'is_numeric', '订单');
-        $order = Dever::db('order', $this->app)->find($where);
-        if ($order) {
-            $order = $this->getOrderInfo($order, true);
-        } else {
-            Dever::error('订单不存在');
-        }
-        return $order;
-    }
-
-    # 更新地址
-    public function upOrderAddress()
-    {
-        $where['uid'] = Place::$uid;
-        $where['id'] = Dever::input('id', 'is_numeric', '订单');
-        $order = Dever::db('order', $this->app)->find($where);
-        if ($order && $order['status'] <= 2) {
-            $province = Dever::input('province', 'is_numeric', '省份');
-            $city = Dever::input('city', 'is_numeric', '城市');
-            $county = Dever::input('county', 'is_numeric', '区县');
-            $address = Dever::input('address', 'is_string', '地址');
-            $name = Dever::input('name', 'is_string', '联系人');
-            $phone = Dever::input('phone', 'is_string', '联系方式');
-            Dever::load('address', $this->app)->up($order['id'], $order['uid'], $order['address_id'], $name, $phone, $province . ',' . $city . ',' . $county, $address);
-        } else {
-            Dever::error('无法修改订单收货地址');
-        }
-        return $order;
-    }
-
-    # 取消订单
-    public function upOrderCancel()
-    {
-        $where['uid'] = Place::$uid;
-        $where['id'] = Dever::input('id', 'is_numeric', '订单');
-        $order = Dever::db('order', $this->app)->find($where);
-        if ($order && ($order['status'] == 1)) {
-            Dever::load('order', $this->app)->cancel($order);
-        } else {
-            Dever::error('无法取消订单');
-        }
-        return $order;
-    }
-
-    # 确认收货
-    public function upOrderFinish()
-    {
-        $where['uid'] = Place::$uid;
-        $where['id'] = Dever::input('id', 'is_numeric', '订单');
-        $order = Dever::db('order', $this->app)->find($where);
-        if ($order && ($order['status'] == 3 || $order['status'] == 4)) {
-            Dever::load('order', $this->app)->finish(1, $order);
-        } else {
-            Dever::error('无法确认收货');
-        }
-        return $order;
-    }
-
-    private function getOrderInfo($order, $view = false)
-    {
-        if ($order) {
-            $info = Dever::db('info', $this->app)->find($order['info_id'], array('col' => 'id,name,pic,info'));
-            $info['pic'] = explode(',', $info['pic']);
-            $order['pic'] = $info['pic'][0] ?? '';
-            $order['status_name'] = Dever::db('order', $this->app)->value('status', $order['status']);
-            $order['cdate_str'] = date('Y-m-d H:i:s', $order['cdate']);
-            if (isset($order['pdate']) && $order['pdate']) {
-                $order['pdate_str'] = date('Y-m-d H:i:s', $order['pdate']);
-            }
-            if (isset($order['ddate']) && $order['ddate']) {
-                $order['ddate_str'] = date('Y-m-d H:i:s', $order['ddate']);
-            }
-            if (isset($order['qdate']) && $order['qdate']) {
-                $order['qdate_str'] = date('Y-m-d H:i:s', $order['qdate']);
-            }
-            if (isset($order['fdate']) && $order['fdate']) {
-                $order['fdate_str'] = date('Y-m-d H:i:s', $order['fdate']);
-            }
-            $order = Dever::load('order', $this->app)->getInfo($order, $view);
-        }
-        return $order;
-    }
-
-    # 同步资源,关联资源
-    public function relation($place_id, $data, $relation)
-    {
-        $where['channel_place_id'] = $place_id;
-        $where['channel_type'] = $data['type'];
-        $where['channel_type_id'] = $data['type_id'];
-        $info = Dever::db('resource_relation', 'place')->find($where);
-        if ($info) {
-            if ($info['status'] == 2) {
-                Dever::db('resource_relation', 'place')->update($info['id'], array('status' => 1));
-                $update['source'] = 2;
-                Dever::db('info', $this->app, false)->update($info['type_id'], $update);
-                # 同步sku
-                $this->relationSku($info['type_id'], $relation);
-            }
-        } else {
-            $parent_id = $child_id = 0;
-            foreach ($relation['cate'] as $k => $v) {
-                unset($v['id']);
-                unset($v['cdate']);
-                if (!$parent_id) {
-                    $v['parent_id'] = 0;
-                    $parent_id = $this->createCate($v);
-                } else {
-                    $v['parent_id'] = $parent_id;
-                    $child_id = $this->createCate($v);
-                }
-            }
-            $cate[] = $relation['info']['cate_parent_id'] = $parent_id;
-            if ($child_id) {
-                $cate[] = $relation['info']['cate_child_id'] = $child_id;
-            }
-            $relation['info']['pic'] = implode(',', $relation['info']['pic']);
-            $relation['info']['cate'] = implode(',', $cate);
-            $relation['info']['source'] = 2;
-            unset($relation['info']['id']);
-            $info_id = Dever::db('info', $this->app, false)->insert($relation['info']);
-            if ($info_id) {
-                # 同步sku
-                $this->relationSku($info_id, $relation);
-
-                $where['type'] = $data['type'];
-                $where['type_id'] = $info_id;
-                $where['channel_price'] = $data['price'];
-                $where['status'] = 1;
-                Dever::db('resource_relation', 'place')->insert($where);
-            }
-        }
-    }
-
-    # 同步sku
-    public function relationSku($info_id, $relation)
-    {
-        if (isset($relation['sku']) && $relation['sku']) {
-            $spec_value = array();
-            $spec_db = Dever::db('spec', $this->app, false);
-            $spec_value_db = Dever::db('spec_value', $this->app, false);
-            $sku_db = Dever::db('sku', $this->app, false);
-            $spec_db->delete(array('info_id' => $info_id));
-            $spec_value_db->delete(array('info_id' => $info_id));
-            $sku_db->delete(array('info_id' => $info_id));
-            foreach ($relation['spec'] as $v) {
-                unset($v['id']);
-                unset($v['cdate']);
-                $v['info_id'] = $info_id;
-                $spec_id = $spec_db->insert($v);
-                foreach ($v['value'] as $v1) {
-                    $id = $v1['id'];
-                    unset($v1['id']);
-                    unset($v1['cdate']);
-                    $v1['info_id'] = $info_id;
-                    $v1['spec_id'] = $spec_id;
-                    $value_id = $spec_value_db->insert($v1);
-                    $spec_value[$id] = $value_id;
-                }
-            }
-            
-            foreach ($relation['sku'] as $v) {
-                unset($v['id']);
-                unset($v['cdate']);
-                $key = explode(',', $v['key']);
-                $v['key'] = array();
-                foreach ($key as $v1) {
-                    if (isset($spec_value[$v1])) {
-                        $v['key'][] = $spec_value[$v1];
-                    }
-                }
-                $v['key'] = implode(',', $v['key']);
-                $sku_db->insert($v);
-            }
-        }
-    }
-
-    # 删除关联关系
-    public function relationDel($place_id, $data)
-    {
-        $where['channel_place_id'] = $place_id;
-        $where['channel_type'] = $data['type'];
-        $where['channel_type_id'] = $data['type_id'];
-        $where['status'] = 1;
-        $info = Dever::db('resource_relation', 'place')->find($where);
-        if ($info) {
-            Dever::db('resource_relation', 'place')->update($info['id'], array('status' => 2));
-            Dever::db('info', $this->app, false)->update($info['type_id'], array('source' => 1));
-        }
-    }
-
-    # 创建分类
-    private function createCate($v)
-    {
-        $db = Dever::db('cate', $this->app, false);
-        $info = $db->find(array('name' => $v['name']));
-        if (!$info) {
-            $id = $db->insert($v);
-        } else {
-            $id = $info['id'];
-        }
-        return $id;
-    }
-
-    private function handleInfo($info)
-    {
-        $info = Dever::load('info', $this->app)->getInfo($info);
-        if (!$info) {
-            return $info;
-        }
-        $info['pic'] = explode(',', $info['pic']);
-        $info['cdate_str'] = date('Y-m-d H:i:s', $info['cdate']);
-        if (Place::$uid && Place::$user['client_id'] > 0) {
-            $info['client'] = Dever::load('client', 'place')->get($info, $this->app, $this->type, '进货');
-        }
-        $info['price'] = Dever::load('price', 'place')->get($info, $this->app, $this->type, '下载');
-
-        if (isset($info['content'])) {
-            if (isset($info['password'])) {
-                unset($info['password']);
-            }
-            # 查看详情信息
-            if (Place::$uid) {
-                $act = new Act('collect', $this->type, $info['id']);
-                $info['collect'] = 2;
-                $collect = $act->getInfo();
-                if ($collect) {
-                    $info['collect'] = 1;
-                }
-            }
-            $info['content'] = htmlspecialchars_decode($info['content']);
-        } else {
-            $info['pic'] = $info['pic'][0] ?? '';
-        }
-        return $info;
-    }
-}

+ 0 - 5
src/place_old/lib/Supplier.php

@@ -1,5 +0,0 @@
-<?php namespace Place\Lib;
-use Dever;
-class Supplier
-{
-}

+ 0 - 219
src/place_old/lib/Vip.php

@@ -1,219 +0,0 @@
-<?php namespace Place\Lib;
-use Dever;
-use Place;
-class Vip
-{
-    protected $type = 'vip';
-    protected $name = '会员';
-    protected $data;
-    protected $info;
-    public function __construct()
-    {
-        if (!$this->data) {
-            $where['status'] = 1;
-            $this->data = Dever::db($this->type, 'place')->select($where);
-            foreach ($this->data as $k => $v) {
-                $this->info[$v['id']] = $v['name'];
-            }
-        }
-    }
-
-    public function getInfo()
-    {
-        $data = array();
-        if (Place::$user[$this->type . '_id'] > 0) {
-            $data['info'] = Dever::db($this->type, 'place')->find(Place::$user[$this->type . '_id']);
-            $data['price'] = $this->getPrice($data['info']['id']);
-        }
-        return $data;
-    }
-
-    # 获取所有数据
-    public function getData()
-    {
-        $cur = Place::$user[$this->type . '_id'] ?? 0;
-        $user = array();
-        if ($cur > 0) {
-            $user = Dever::db($this->type, 'place')->find($cur);
-        }
-        $data['list'] = $this->data;
-        if ($data['list']) {
-            foreach ($data['list'] as &$v) {
-                # 判断哪个已经买过了,不用再买了
-                $v['sprice'] = $v['price'];
-                # 1是可以购买
-                $v['buy'] = 1;
-                if ($user && $user['level'] >= $v['level']) {
-                    $v['buy'] = 2;
-                } elseif ($user && $v['pay'] == 1) {
-                    $v['price'] -= $user['price'];
-                }
-                $v['price_list'] = $this->getPrice($v['id']);
-            }
-        }
-        return $data;
-    }
-
-    public function getPrice($id)
-    {
-        $price = Dever::db($this->type . '_price', 'place')->select(array($this->type . '_id' => $id), array('col' => 'per,total,type'));
-        if ($price) {
-            foreach ($price as &$v) {
-                if ($v['total'] > 0) {
-                    if ($v['type'] == 1) {
-                        $v['total'] = '每日可下载共'.$v['total'].'次';
-                    } elseif ($v['type'] == 2) {
-                        $v['total'] = '每日可使用共'.$v['total'].'次';
-                    } elseif ($v['type'] == 3) {
-                        $v['total'] = '每次最多购买'.$v['total'].'个';
-                    }
-                }
-                
-                $v['per'] = $v['per'] . '%';
-                $v['name'] = Dever::db('resource', 'place')->value('type', $v['type']);
-            }
-        }
-        return $price;
-    }
-
-    # 获取列表
-    public function getList($state = true)
-    {
-        $data = array();
-        if ($state) {
-            $data = array
-            (
-                0 => array
-                (
-                    'id' => -1,
-                    'name' => '无' . $this->name,
-                ),
-            );
-        }
-        return array_merge($data, $this->data);
-    }
-
-    # 获取购买资源的价格列表
-    public function getResourcePrice($price, $info_id, $app, $type)
-    {
-        $result = array();
-        $result['list'] = array();
-        $result['alone'] = array();
-        if ($info = $this->info) {
-            $type_id = $this->type . '_id';
-            $table = $this->type . '_price';
-            $result['name'] = Place::$info[$this->type . '_name'];
-            $list = array();
-            $alone = array();
-            $func = Dever::load('price', 'place');
-            $sets = Dever::db($table, $app)->select(array('info_id' => $info_id));
-            if ($sets) {
-                foreach ($sets as $set) {
-                    $set['value'] = $func->getValue($set['value'], $price, $type);
-                    $set['text'] = $func->getText($set['value'], $type);
-                    if ($set[$type_id]) {
-                        $set[$type_id] = explode(',', $set[$type_id]);
-                        foreach ($set[$type_id] as $id) {
-                            if (isset($info[$id])) {
-                                $list[$id] = array($info[$id], $set['value'], $set['text']);
-                                unset($info[$id]);
-                                if ($set['status'] == 1) {
-                                    $alone[$id] = $list[$id];
-                                }
-                            }
-                        }
-                    } elseif ($info) {
-                        foreach ($info as $id => $name) {
-                            if (empty($list[$id])) {
-                                $list[$id] = array($name, $set['value'], $set['text']);
-                                unset($info[$id]);
-                            }
-                            if ($set['status'] == 1) {
-                                $alone[$id] = $list[$id];
-                            }
-                        }
-                    }
-                }
-            }
-            if ($info) {
-                foreach ($info as $id => $name) {
-                    if (empty($list[$id])) {
-                        $info = Dever::db($table, 'place')->find(array($type_id => $id, 'type' => $type));
-                        if ($info) {
-                            $value = $func->getValue($info['per'], $price, 3);
-                            $text = $func->getText($value, $type);
-                            $list[$id] = array($name, $value, $text);
-                        }
-                    }
-                }
-            }
-            $result['list'] = $list;
-            $result['alone'] = $alone;
-        }
-        return $result;
-    }
-
-    # 购买会员
-    public function pay()
-    {
-        if (!Place::$uid) {
-            Dever::error('请先登录', 300);
-        }
-        $db = Dever::db($this->type, 'place');
-        $id = Dever::input('id', 'is_numeric', 'ID');
-        $info = $db->find($id);
-        if (!$info) {
-            Dever::error('信息不存在');
-        }
-        $cur = Place::$user[$this->type . '_id'];
-        if ($cur == $info['id']) {
-            Dever::error('您已购买过' . $info['name']);
-        }
-        if ($cur > 0) {
-            $user = $db->find($cur);
-            if ($user && $user['level'] >= $info['level']) {
-                Dever::error('您已购买过');
-            }
-            if ($info['pay'] == 1) {
-                $info['price'] -= $user['price'];
-            }
-        }
-
-        $prefix = strtoupper(substr($this->type, 0, 2));
-        $order = array();
-        $order['uid'] = Place::$uid;
-        $order['name'] = $info['name'];
-        $order['cash'] = $info['price'];
-        $order['order_num'] = Dever::load('util', 'api')->createNumber($prefix, 'place/'.$this->type.'_order');
-        $order['notify'] = 'place/'.$this->type.'.success|' . Dever::input('p') . '|' . $order['order_num'];
-        $data['pay'] = Dever::load('account', 'place')->pay($order);
-        if ($data['pay'] && empty($data['pay']['link'])) {
-            $order['status'] = 1;
-            $order[$this->type.'_id'] = $info['id'];
-            $data['order_id'] = Dever::db($this->type . '_order', 'place')->insert($order);
-            $data['order_num'] = $order['order_num'];
-        }
-        return $data;
-    }
-
-    # 支付成功
-    public function success($place, $order_num, $status, $body = array())
-    {
-        Dever::input('authorization', 'is_string', '入口码', $place);
-        $order = Dever::db($this->type.'_order', 'place')->find(array('order_num' => $order_num));
-        if ($order && $order['status'] == 1) {
-            if ($status == 1) {
-                $update['status'] = 2;
-            } else {
-                $update['status'] = 3;
-            }
-            
-            $update['pdate'] = time();
-            $state = Dever::db($this->type.'_order', 'place')->update($order['id'], $update);
-            if (!$state) {
-                return '订单更新失败';
-            }
-            Dever::db('user', 'place')->update($order['uid'], array($this->type.'_id' => $order[$this->type.'_id']));
-        }
-    }
-}

+ 0 - 78
src/place_old/manage/account.php

@@ -1,78 +0,0 @@
-<?php
-$id = Dever::input('id');
-$show = false;
-$account_setting = array();
-if ($id) {
-    $account = Dever::load('account', 'place')->getInfo($id);
-    $setting = Dever::db('platform_setting', 'api')->select(array('platform_id' => $account['platform_id']));
-    if ($setting) {
-        $show = true;
-        foreach ($setting as $k => $v) {
-            $account_setting[] = array('platform_setting_name' => $v['name'], 'platform_setting_id' => $v['id'], 'value' => '');
-        }
-    }
-}
-$extend = Dever::load('common', 'manage')->extend();
-$uid = $extend['data_id'];
-return array
-(
-    'list' => array
-    (
-        'where' => array('uid' => $uid),
-        'field'      => array
-        (
-            'id',
-            'name',
-            'type',
-            'cdate',
-        ),
-        'button' => array
-        (
-            '新增' => array('fastadd', array('field' => 'uid,name,type','uid' => $uid)),
-        ),
-        'data_button' => array
-        (
-            '设置' => array('edit', 'uid,name,place/account_setting'),
-            '证书' => array('route', array
-            (
-                'path' => 'sector_place/account_cert',
-                'param' => array
-                (
-                    'set' => array('account_id' => 'id', 'menu' => 'sector_place/account', 'parent' => 'sector_place/account'),
-                ),
-            )),
-        ),
-        'search' => array
-        (
-            'name',
-            'type',
-        ),
-    ),
-    'update' => array
-    (
-        'field'    => array
-        (
-            'uid' => array
-            (
-                'type' => 'hidden',
-            ),
-            'name' => array
-            (
-                'rules' => true,
-            ),
-            'type' => array
-            (
-                'type' => 'radio',
-                'rules' => true,
-                'desc' => '【保存后不能更改】',
-            ),
-            'place/account_setting' => array
-            (
-                'show' => $show,
-                'name' => '参数配置',
-                'where'  => array('account_id' => 'id'),
-                'default' => $account_setting,
-            ),
-        ),
-    ),
-);

+ 0 - 66
src/place_old/manage/account_cert.php

@@ -1,66 +0,0 @@
-<?php
-$account_id = Dever::input('set')['account_id'] ?? 0;
-if (!$account_id) {
-    $account_id = Dever::input('field')['account_id'] ?? 0;
-}
-$account = Dever::load('account', 'place')->getInfo($account_id);
-return array
-(
-    'list' => array
-    (
-        'where' => array('account_id' => $account_id),
-        'field'      => array
-        (
-            'id',
-            'platform_cert_id' => array
-            (
-                'show' => 'Dever::call("api/app.getCertName", "{platform_cert_id}")',
-            ),
-            'number',
-            'cdate',
-        ),
-        'data_button' => array
-        (
-            '编辑' => array('fastedit', array('account_id' => $account_id)),
-        ),
-        'button' => array
-        (
-            '新增' => array('fastadd', array('account_id' => $account_id)),
-        ),
-        'search' => array
-        (
-            'account_id' => 'hidden',
-            'number',
-        ),
-    ),
-    'update' => array
-    (
-        'desc' => '微信支付的平台证书会自动同步',
-        'field'    => array
-        (
-            'account_id' => 'hidden',
-            'platform_cert_id' => array
-            (
-                'rules' => true,
-                'type' => 'select',
-                'option'     => 'Dever::call("api/app.getCert", '.$account['platform_id'].')',
-                //'remote' => 'api/manage.getCertName',
-                //'remote_default' => false,
-            ),
-            'number' => array
-            (
-                'rules' => true,
-            ),
-            'public' => array
-            (
-                //'rules' => true,
-                'type' => 'textarea',
-            ),
-            'private' => array
-            (
-                //'rules' => true,
-                'type' => 'textarea',
-            ),
-        ),
-    ),
-);

+ 0 - 26
src/place_old/manage/account_setting.php

@@ -1,26 +0,0 @@
-<?php
-return array
-(
-    'update' => array
-    (
-        'field'    => array
-        (
-            'platform_setting_id' => 'hidden',
-            'platform_setting_name' => array
-            (
-                'name' => '参数名',
-                'type' => 'show',
-                'default' => 'Dever::call("api/platform_setting-find", "{platform_setting_id}")["name"]',
-                //'disable' => true,
-                //'option'     => 'Dever::call("api/app.getSetting", '.$account['platform_id'].')',
-                //'remote' => 'api/manage.getSettingName',
-                //'remote_default' => false,
-            ),
-            'value' => array
-            (
-                'type' => 'textarea',
-                'autosize' => array('minRows' => 2),
-            ),
-        ),
-    ),
-);

+ 0 - 90
src/place_old/manage/agent.php

@@ -1,90 +0,0 @@
-<?php
-return array
-(
-    'list' => array
-    (
-        'field'      => array
-        (
-            'name',
-            'level',
-            'price',
-            'pay',
-
-            'status' => array
-            (
-                'type' => 'switch',
-                'show'  => '{status}',
-                'active_value' => 1,
-                'inactive_value' => 2,
-            ),
-        ),
-        'button' => array
-        (
-            '新增' => array('add'),
-        ),
-        'data_button' => array
-        (
-            '编辑' => 'edit',
-        ),
-        'search'    => array
-        (
-            'name',
-        ),
-    ),
-    'update' => array
-    (
-        'tab' => array
-        (
-            '基本信息' => 'name,level,price,pay,content',
-            '权益设置' => 'vip_fee,agent_fee,place/agent_price',
-        ),
-        'field'    => array
-        (
-            'name' => array
-            (
-                'rules' => true,
-            ),
-            'level' => array
-            (
-                'rules' => true,
-                'desc' => '将按照等级数字正序排序',
-            ),
-            'price' => array
-            (
-                'rules' => true,
-            ),
-            'pay' => array
-            (
-                'type' => 'radio',
-                'rules' => true,
-                'tips' => '差额支付:如用户已是等级1的代理,购买等级2时会自动减去等级1已支付的金额<br />全额支付:根据代理价格全额支付',
-            ),
-            'content' => array
-            (
-                'type' => 'textarea',
-                //'rows' => 4,
-                'autosize' => array('minRows' => 4),
-            ),
-
-            'vip_fee' => array
-            (
-                'desc' => '会员价格*佣金比例%=代理佣金 如:代理佣金填写为10,则代理佣金=会员价格*10%',
-                'placeholder' => '会员价格*佣金比例%=代理佣金',
-            ),
-
-            'agent_fee' => array
-            (
-                'desc' => '代理价格*佣金比例%=代理佣金 如:代理佣金填写为10,则代理佣金=代理价格*10%',
-                'placeholder' => '代理价格*佣金比例%=代理佣金',
-            ),
-
-            'place/agent_price' => array
-            (
-                'name' => '资源默认折扣',
-                'where'  => array('agent_id' => 'id'),
-                'desc' => '设置购买资源的默认折扣和代理佣金比例,如果资源里单独设置了“代理折扣/价格”或者“代理佣金”,此处相应的设置将失效',
-                'default' => Dever::load('manage', 'place')->getResourceDefault(array('per' => '')),
-            ),
-        ),
-    ),
-);

+ 0 - 40
src/place_old/manage/agent_price.php

@@ -1,40 +0,0 @@
-<?php
-return array
-(
-    'update' => array
-    (
-        'field'    => array
-        (
-            'type' => 'hidden',
-            'type_name' => array
-            (
-                'name' => '资源类型',
-                'type' => 'show',
-                'default' => 'Dever::call("place/manage.getResourceType", "{type}")',
-            ),
-            'per' => array
-            (
-                'tips' => '资源价格*折扣%=代理价格<br />如:折扣填写为80,则代理价格=资源价格*80%',
-                'placeholder' => '资源价格*折扣%=代理价格',
-            ),
-            'fee' => array
-            (
-                'tips' => '资源价格*佣金比例%=代理佣金<br />如:代理佣金填写为10,则代理佣金=资源价格*10%',
-                'placeholder' => '资源价格*佣金比例%=代理佣金',
-            ),
-            'total' => array
-            (
-                'tips' => '不填写不限制<br />内容:每日下载总次数<br />功能:每日使用总次数<br />商品:每次购买总数量',
-                'placeholder' => '填写上限数值',
-            ),
-            'status' => array
-            (
-                'width' => '40',
-                'type' => 'switch',
-                'show'  => '{status}',
-                'active_value' => 1,
-                'inactive_value' => 2,
-            ),
-        ),
-    ),
-);

+ 0 - 30
src/place_old/manage/client.php

@@ -1,30 +0,0 @@
-<?php
-return array
-(
-    'update' => array
-    (
-        'field'    => array
-        (
-            'day' => array
-            (
-                'tips' => '填写销售的时效,单位是天',
-            ),
-            'sell' => array
-            (
-                'tips' => '售出资源的总数量,仅限已完成订单',
-            ),
-            'per' => array
-            (
-                'tips' => '当在时效内达到销量时,该源主享受的折扣<br />注意这个折扣是在源主折扣的基础上计算,相当于折上折',
-            ),
-            'status' => array
-            (
-                'width' => '40',
-                'type' => 'switch',
-                'show'  => '{status}',
-                'active_value' => 1,
-                'inactive_value' => 2,
-            ),
-        ),
-    ),
-);

+ 0 - 30
src/place_old/manage/client_price.php

@@ -1,30 +0,0 @@
-<?php
-return array
-(
-    'update' => array
-    (
-        'field'    => array
-        (
-            'type' => 'hidden',
-            'type_name' => array
-            (
-                'name' => '资源类型',
-                'type' => 'show',
-                'default' => 'Dever::call("place/manage.getResourceType", "{type}")',
-            ),
-            'per' => array
-            (
-                'tips' => '资源价格*折扣%=源主进货价格<br />如:折扣填写为80,则源主进货=资源价格*80%',
-                'placeholder' => '资源价格*折扣%=源主进货价格',
-            ),
-            'status' => array
-            (
-                'width' => '40',
-                'type' => 'switch',
-                'show'  => '{status}',
-                'active_value' => 1,
-                'inactive_value' => 2,
-            ),
-        ),
-    ),
-);

+ 0 - 150
src/place_old/manage/core.php

@@ -1,150 +0,0 @@
-<?php
-return array
-(
-    'menu' => array
-    (
-        # 账户
-        'sector_place' => array
-        (
-            'parent'    => 'sector_user',
-            'name'      => '身份管理',
-            'icon'      => 'group-2-line',
-            'sort'      => '100',
-        ),
-
-        'place' => array
-        (
-            'parent'    => 'sector_place',
-            'name'      => '身份列表',
-            'icon'      => 'apps-line',
-            'sort'      => '1',
-        ),
-
-        'account' => array
-        (
-            'parent'    => 'sector_place',
-            'name'      => '支付账户',
-            'icon'      => 'contacts-line',
-            'sort'      => '2',
-        ),
-
-        'account_cert' => array
-        (
-            'parent'    => 'sector_place',
-            'name'      => '账户证书',
-            'icon'      => 'contacts-line',
-            'sort'      => '3',
-            'show'      => 3,
-        ),
-
-        # 客户
-        'member_manage' => array
-        (
-            'parent'    => 'sector_place_member',
-            'name'      => '用户管理',
-            'icon'      => 'folder-user-line',
-            'sort'      => '100',
-        ),
-
-        'member' => array
-        (
-            'parent'    => 'member_manage',
-            'name'      => '用户列表',
-            'icon'      => 'user-3-line',
-            'sort'      => '1',
-        ),
-
-        'member_vip' => array
-        (
-            'parent'    => 'member_manage',
-            'name'      => '会员列表',
-            'icon'      => 'vip-line',
-            'sort'      => '2',
-        ),
-
-        'member_agent' => array
-        (
-            'parent'    => 'member_manage',
-            'name'      => '代理列表',
-            'icon'      => 'vip-crown-2-line',
-            'sort'      => '3',
-        ),
-
-        'member_agent_child' => array
-        (
-            'parent'    => 'member_manage',
-            'name'      => '代理下级列表',
-            'icon'      => 'vip-crown-2-line',
-            'sort'      => '4',
-            'show'      => 3,
-        ),
-
-        # 配置
-        'set_manage' => array
-        (
-            'parent'    => 'sector_place_set',
-            'name'      => '基础配置',
-            'icon'      => 'settings-5-line',
-            'sort'      => '100',
-        ),
-
-        'info' => array
-        (
-            'parent'    => 'set_manage',
-            'name'      => '身份设置',
-            'icon'      => 'file-user-line',
-            'sort'      => '1',
-            'path'      => 'update',
-        ),
-
-        'vip' => array
-        (
-            'parent'    => 'set_manage',
-            'name'      => '会员设置',
-            'icon'      => 'user-follow-line',
-            'sort'      => '2',
-        ),
-
-        'agent' => array
-        (
-            'parent'    => 'set_manage',
-            'name'      => '代理设置',
-            'icon'      => 'user-star-line',
-            'sort'      => '3',
-        ),
-
-        # 销售渠道
-        'seller_manage' => array
-        (
-            'parent'    => 'sector_place_channel',
-            'name'      => '销售渠道',
-            'icon'      => 'e-bike-2-line',
-            'sort'      => '1',
-        ),
-
-        'seller' => array
-        (
-            'parent'    => 'seller_manage',
-            'name'      => '网店列表',
-            'icon'      => 'file-shield-2-line',
-            'sort'      => '1',
-        ),
-
-        # 供应商渠道
-        'supplier_manage' => array
-        (
-            'parent'    => 'sector_place_channel',
-            'name'      => '供应商渠道',
-            'icon'      => 'earth-line',
-            'sort'      => '100',
-        ),
-
-        'supplier' => array
-        (
-            'parent'    => 'supplier_manage',
-            'name'      => '供应商列表',
-            'icon'      => 'earthquake-line',
-            'sort'      => '1',
-        ),
-    ),
-);

+ 0 - 64
src/place_old/manage/info.php

@@ -1,64 +0,0 @@
-<?php
-$config = include('place.php');
-$config['update']['desc'] = '';
-$config['update']['tab']['展示设置'] = 'vip_name,agent_name,place/resource';
-$config['update']['field']['place/resource'] = array
-(
-    'name' => '资源选项',
-    'where'  => array('id' => array('>', 0)),
-    'desc' => '设置要展示的资源选项',
-    'default' => Dever::load('manage', 'place')->getResourceDefault(array('name' => 'name')),
-);
-
-$data = Dever::load('manage', 'place')->getPlaceTree();
-$id = $data[0]['children'][0]['id'];
-$uid = $data[0]['children'][0]['uid'];
-$user = Dever::db('user', 'sector')->find($uid);
-if ($user['channel'] == 1) {
-    $config['update']['tab']['供货设置'] = 'channel,place/client_price,place/client';
-    $config['update']['field']['channel'] = array
-    (
-        'type' => 'radio',
-        'tips' => '开启后,将拥有源主供货能力',
-    );
-    $config['update']['field']['place/client_price'] = array
-    (
-        'name' => '默认基础折扣',
-        'where'  => array('id' => array('>', 0)),
-        'desc' => '设置源主进货资源的默认基础折扣',
-        'default' => Dever::load('manage', 'place')->getResourceDefault(array('per' => '')),
-    );
-    $config['update']['field']['place/client'] = array
-    (
-        'name' => '默认销量折扣',
-        'where'  => array('id' => array('>', 0)),
-        'desc' => '设置后,如果n天内的销量达到预设值,将在默认基础折扣上再计算折扣',
-    );
-}
-$config['update']['column'] = array
-(
-    'load' => 'place/info',
-    //'add' => '新增',
-    'key' => 'id',
-    'data' => $data,
-    'active' => $id,
-    'where' => 'id',
-    'hidden' => true,
-);
-$config['update']['field']['pay_account']['option'] = 'Dever::call("place/manage.getAccountList", '.$uid.')';
-return array
-(
-    'source' => 'place/info',
-    'list' => array
-    (
-        'field'      => array
-        (
-            'name',
-        ),
-        'data_button' => array
-        (
-            '编辑' => 'fastedit',
-        ),
-    ),
-    'update' => $config['update'],
-);

+ 0 - 49
src/place_old/manage/member.php

@@ -1,49 +0,0 @@
-<?php
-return array
-(
-    'list' => array
-    (
-        'field'      => array
-        (
-            'id',
-            'name',
-            'mobile',
-            'vip_id',
-            'agent_id',
-            'cash',
-            'status' => array
-            (
-                'type' => 'switch',
-                'show'  => '{status}',
-                'active_value' => 1,
-                'inactive_value' => 2,
-            ),
-            'cdate',
-        ),
-        'button' => array
-        (
-            //'新增' => array('add'),
-        ),
-        'data_button' => array
-        (
-            '编辑' => 'fastedit',
-        ),
-        'search'    => array
-        (
-            'name' => 'like',
-            'mobile',
-            'vip_id',
-            'agent_id',
-            'status',
-        ),
-    ),
-    'update' => array
-    (
-        'field'    => array
-        (
-            'name',
-            'vip_id',
-            'agent_id',
-        ),
-    ),
-);

+ 0 - 56
src/place_old/manage/member_agent.php

@@ -1,56 +0,0 @@
-<?php
-return array
-(
-    'source' => 'place/member',
-    'list' => array
-    (
-        'where' => array('agent_id' => array('>=', 1)),
-        'field'      => array
-        (
-            'id',
-            'name',
-            'mobile',
-            'agent_id',
-            'cash',
-            'status' => array
-            (
-                'type' => 'switch',
-                'show'  => '{status}',
-                'active_value' => 1,
-                'inactive_value' => 2,
-            ),
-            'cdate',
-        ),
-        'button' => array
-        (
-            //'新增' => array('add'),
-        ),
-        'data_button' => array
-        (
-            '编辑' => 'fastedit',
-            '下级' => array('route', array
-            (
-                'path' => 'member_manage/member_agent_child',
-                'param' => array
-                (
-                    'set' => array('parent_uid' => 'id', 'menu' => 'member_manage/member_agent', 'parent' => 'member_manage/member_agent'),
-                ),
-            )),
-        ),
-        'search'    => array
-        (
-            'name' => 'like',
-            'mobile',
-            'agent_id',
-            'status',
-        ),
-    ),
-    'update' => array
-    (
-        'field'    => array
-        (
-            'name',
-            'agent_id',
-        ),
-    ),
-);

+ 0 - 43
src/place_old/manage/member_agent_child.php

@@ -1,43 +0,0 @@
-<?php
-$parent_uid = Dever::input('set')['parent_uid'];
-return array
-(
-    'source' => 'place/member',
-    'list' => array
-    (
-        'where' => array('parent_uid' => $parent_uid),
-        'field'      => array
-        (
-            'id',
-            'name',
-            'mobile',
-            'vip_id',
-            'agent_id',
-            'cash',
-            'status' => array
-            (
-                'type' => 'switch',
-                'show'  => '{status}',
-                'active_value' => 1,
-                'inactive_value' => 2,
-            ),
-            'cdate',
-        ),
-        'button' => array
-        (
-            //'新增' => array('add'),
-        ),
-        'data_button' => array
-        (
-            //'编辑' => 'fastedit',
-        ),
-        'search'    => array
-        (
-            'name' => 'like',
-            'mobile',
-            'vip_id',
-            'agent_id',
-            'status',
-        ),
-    ),
-);

+ 0 - 48
src/place_old/manage/member_vip.php

@@ -1,48 +0,0 @@
-<?php
-return array
-(
-    'source' => 'place/member',
-    'list' => array
-    (
-        'where' => array('vip_id' => array('>=', 1)),
-        'field'      => array
-        (
-            'id',
-            'name',
-            'mobile',
-            'vip_id',
-            'cash',
-            'status' => array
-            (
-                'type' => 'switch',
-                'show'  => '{status}',
-                'active_value' => 1,
-                'inactive_value' => 2,
-            ),
-            'cdate',
-        ),
-        'button' => array
-        (
-            //'新增' => array('add'),
-        ),
-        'data_button' => array
-        (
-            '编辑' => 'fastedit',
-        ),
-        'search'    => array
-        (
-            'name' => 'like',
-            'mobile',
-            'vip_id',
-            'status',
-        ),
-    ),
-    'update' => array
-    (
-        'field'    => array
-        (
-            'name',
-            'vip_id',
-        ),
-    ),
-);

+ 0 - 154
src/place_old/manage/place.php

@@ -1,154 +0,0 @@
-<?php
-$extend = Dever::load('common', 'manage')->extend();
-$uid = $extend['data_id'];
-return array
-(
-    'source' => 'place/info',
-    'list' => array
-    (
-        'where' => array('uid' => $uid),
-        'field'      => array
-        (
-            'name',
-            'type',
-            'code',
-            'status' => array
-            (
-                'type' => 'switch',
-                'show'  => '{status}',
-                'active_value' => 1,
-                'inactive_value' => 2,
-            ),
-        ),
-        'button' => array
-        (
-            '新增' => array('fastadd', array('field' => 'uid,cate_id,name,code,pay_account,money_id,score,score_per', 'uid' => $uid)),
-        ),
-        'data_button' => array
-        (
-            //'编辑' => 'edit',
-            '预览' => array('link', Dever::url('place/url.place', array(), true)),
-        ),
-        'search'    => array
-        (
-            'name',
-        ),
-    ),
-    'update' => array
-    (
-        'desc' => '修改身份信息请切换到相应身份后到配置中修改',
-        'tab' => array
-        (
-            '基本信息' => 'uid,cate_id,name,code,password,price,logo,bg,content',
-            '支付设置' => 'pay_account,money_id,score,score_per',
-        ),
-        'field'    => array
-        (
-            'uid' => array
-            (
-                'type' => 'hidden',
-            ),
-            'name' => array
-            (
-                'rules' => true,
-            ),
-            'code' => array
-            (
-                //'rules' => true,
-                'desc' => '设置身份码之后,用户将可以通过身份码快速进入,身份码不能重复',
-            ),
-            'cate_id' => array
-            (
-                'rules' => true,
-            ),
-            'pay_account' => array
-            (
-                'rules' => true,
-                'type' => 'select',
-                'option'    => 'Dever::call("place/manage.getAccountList")',
-            ),
-            'money_id' => array
-            (
-                'rules' => true,
-                'tips' => '设置支付使用的货币',
-            ),
-            'score' => array
-            (
-                'rules' => true,
-                'desc' => '设置购买资源所使用的积分名称,除“商品”外,其余资源均使用积分支付',
-            ),
-            'score_per' => array
-            (
-                'rules' => true,
-                'desc' => '设置积分与1元货币的换算数字,如输入100就是100个积分换算成1元货币'
-            ),
-            'logo' => array
-            (
-                'type' => 'upload',
-                'upload' => 1,
-                'yun' => true,
-                'multiple' => false,
-                'tip' => '',
-                'style' => 'pic',
-            ),
-            'bg' => array
-            (
-                'type' => 'upload',
-                'upload' => 1,
-                'yun' => true,
-                'multiple' => false,
-                'tip' => '',
-                'style' => 'pic',
-            ),
-            'content' => array
-            (
-                'type' => 'editor',
-                'editorMenu' => array
-                (
-                    'uploadImage' => 1,
-                    'uploadVideo' => 3,
-                ),
-            ),
-
-            'type' => array
-            (
-                'type' => 'radio',
-                'control' => true,
-            ),
-
-            'password' => array
-            (
-                'desc' => '设置密码后,用户输入密码才能进入',
-            ),
-
-            'price' => array
-            (
-                'desc' => '设置价格后,用户购买后才能进入',
-            ),
-
-
-            'vip_name' => array
-            (
-                'desc' => '设置“会员”的称谓,未设置则显示“会员”',
-            ),
-
-            'agent_name' => array
-            (
-                'desc' => '设置“代理”的称谓,未设置则显示“代理”',
-            ),
-        ),
-        'control' => array
-        (
-            'password' => array
-            (
-                'type' => 4,
-            ),
-            'price' => array
-            (
-                'type' => 5,
-            ),
-        ),
-        'start' => 'place/manage.checkPlaceCode',
-        'end' => ['manage/system.update?system=sector', 'place/manage.updatePlaceCode'],
-    ),
-);

+ 0 - 35
src/place_old/manage/resource.php

@@ -1,35 +0,0 @@
-<?php
-return array
-(
-    'update' => array
-    (
-        'field'    => array
-        (
-            'type' => 'hidden',
-            'type_name' => array
-            (
-                'name' => '资源类型',
-                'type' => 'show',
-                'default' => 'Dever::call("place/manage.getResourceType", "{type}")',
-            ),
-            'name',
-            /*
-            'icon' => array
-            (
-                'type' => 'upload',
-                'upload' => 1,
-                'multiple' => false,
-                'style' => 'input',
-            ),*/
-            'status' => array
-            (
-                'width' => '40',
-                'type' => 'switch',
-                'show'  => '{status}',
-                'active_value' => 1,
-                'inactive_value' => 2,
-            ),
-        ),
-        'drag' => 'sort',
-    ),
-);

+ 0 - 47
src/place_old/manage/seller.php

@@ -1,47 +0,0 @@
-<?php
-return array
-(
-    'list' => array
-    (
-        'field'      => array
-        (
-            'name',
-            'type',
-            'sort',
-            'status',
-            'cdate',
-        ),
-        'button' => array
-        (
-            '新增' => array('fastadd'),
-        ),
-        'data_button' => array
-        (
-            '编辑' => 'fastedit',
-            # 微信授权,
-            '授权' => array('link', Dever::url('wechat/auth.link', array('type' => 1), true)),
-        ),
-        'search'    => array
-        (
-            'name',
-            'type',
-            'status',
-        ),
-    ),
-    'update' => array
-    (
-        'field'    => array
-        (
-            'name' => array
-            (
-                'rules' => true,
-            ),
-            'type' => array
-            (
-                'type' => 'radio',
-                'rules' => true,
-            ),
-            'sort',
-        ),
-    ),
-);

+ 0 - 97
src/place_old/manage/vip.php

@@ -1,97 +0,0 @@
-<?php
-return array
-(
-    'list' => array
-    (
-        'field'      => array
-        (
-            'name',
-            'level',
-            'day_desc',
-            
-            'price',
-            'pay',
-            'status' => array
-            (
-                'type' => 'switch',
-                'show'  => '{status}',
-                'active_value' => 1,
-                'inactive_value' => 2,
-            ),
-        ),
-        'button' => array
-        (
-            '新增' => array('add'),
-        ),
-        'data_button' => array
-        (
-            '编辑' => 'edit',
-        ),
-        'search'    => array
-        (
-            'name',
-        ),
-    ),
-    'update' => array
-    (
-        'tab' => array
-        (
-            '基本信息' => 'name,level,price,pay,day_desc,day,content',
-            '权益设置' => 'place/vip_price',
-        ),
-        'field'    => array
-        (
-            'name' => array
-            (
-                'rules' => true,
-            ),
-            'level' => array
-            (
-                'rules' => true,
-                'desc' => '将按照等级数字正序排序',
-            ),
-            'price' => array
-            (
-                'rules' => true,
-            ),
-            'pay' => array
-            (
-                'type' => 'radio',
-                'rules' => true,
-                'tips' => '差额支付:如用户已是等级1的会员,购买等级2时会自动减去等级1已支付的金额<br />全额支付:根据会员价格全额支付',
-            ),
-            'day_desc' => array
-            (
-                'rules' => true,
-                'desc' => '设置会员时长名称,如一年',
-            ),
-            'day' => array
-            (
-                'rules' => true,
-                'desc' => '设置会员时长天数,如365,如果填写-1就是该会员永久有效',
-            ),
-            'content' => array
-            (
-                /*
-                'type' => 'editor',
-                'editorMenu' => array
-                (
-                    'uploadImage' => 1,
-                    'uploadVideo' => 3,
-                ),
-                */
-                'type' => 'textarea',
-                //'rows' => 4,
-                'autosize' => array('minRows' => 4),
-            ),
-
-            'place/vip_price' => array
-            (
-                'name' => '默认折扣',
-                'where'  => array('vip_id' => 'id'),
-                'desc' => '设置购买资源的默认折扣,如果资源里单独设置了“会员价格/折扣”,此处设置将失效',
-                'default' => Dever::load('manage', 'place')->getResourceDefault(array('per' => '')),
-            ),
-        ),
-    ),
-);

+ 0 - 35
src/place_old/manage/vip_price.php

@@ -1,35 +0,0 @@
-<?php
-return array
-(
-    'update' => array
-    (
-        'field'    => array
-        (
-            'type' => 'hidden',
-            'type_name' => array
-            (
-                'name' => '资源类型',
-                'type' => 'show',
-                'default' => 'Dever::call("place/manage.getResourceType", "{type}")',
-            ),
-            'per' => array
-            (
-                'tips' => '资源价格*折扣%=会员价格<br />如:折扣填写为80,则会员价格=资源价格*80%',
-                'placeholder' => '资源价格*折扣%=会员价格',
-            ),
-            'total' => array
-            (
-                'tips' => '不填写不限制<br />内容:每日下载总次数<br />功能:每日使用总次数<br />商品:每次购买总数量',
-                'placeholder' => '填写上限数值',
-            ),
-            'status' => array
-            (
-                'width' => '40',
-                'type' => 'switch',
-                'show'  => '{status}',
-                'active_value' => 1,
-                'inactive_value' => 2,
-            ),
-        ),
-    ),
-);

+ 0 - 31
src/place_old/table/account.php

@@ -1,31 +0,0 @@
-<?php
-return array
-(
-    'name' => '支付账户管理',
-    'partition' => 'Dever::call("manage/common.system", array(false, false))',
-    'struct' => array
-    (
-        'name'      => array
-        (
-            'type'      => 'varchar(32)',
-            'name'      => '账户名称',
-        ),
-
-        'uid' => array
-        (
-            'name'      => '用户ID',
-            'type'      => 'int(11)',
-        ),
-
-        'type' => array
-        (
-            'name'      => '类型',
-            'type'      => 'tinyint(1)',
-            'default'   => 1,
-            'value'     => array
-            (
-                1 => '微信支付',
-            ),
-        ),
-    ),
-);

+ 0 - 45
src/place_old/table/account_cert.php

@@ -1,45 +0,0 @@
-<?php
-
-return array
-(
-    'name' => '账户证书设置',
-    'order' => 'edate desc, id asc',
-    'struct' => array
-    (
-        'account_id'        => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '账户',
-        ),
-
-        'platform_cert_id' => array
-        (
-            'name'      => '证书名',
-            'type'      => 'int(11)',
-        ),
-
-        'number' => array
-        (
-            'name'      => '证书序列号',
-            'type'      => 'varchar(100)',
-        ),
-
-        'public' => array
-        (
-            'name'      => '公钥内容',
-            'type'      => 'varchar(3000)',
-        ),
-
-        'private' => array
-        (
-            'name'      => '私钥内容',
-            'type'      => 'varchar(3000)',
-        ),
-
-        'edate' => array
-        (
-            'name'      => '过期时间',
-            'type'      => 'int(11)',
-        ),
-    ),
-);

+ 0 - 27
src/place_old/table/account_setting.php

@@ -1,27 +0,0 @@
-<?php
-
-return array
-(
-    'name' => '账户设置',
-    'order' => 'id asc',
-    'struct' => array
-    (
-        'account_id'        => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '账户',
-        ),
-
-        'platform_setting_id' => array
-        (
-            'name'      => '参数名',
-            'type'      => 'int(11)',
-        ),
-
-        'value' => array
-        (
-            'name'      => '参数值',
-            'type'      => 'varchar(3000)',
-        ),
-    ),
-);

+ 0 - 62
src/place_old/table/address.php

@@ -1,62 +0,0 @@
-<?php
-return array
-(
-    'name' => '用户地址表',
-    'partition' => 'Dever::call("manage/common.system")',
-    'order' => 'type asc',
-    'struct' => array
-    (
-        'uid'       => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '用户',
-        ),
-        'type' => array
-        (
-            'name'      => '类型',
-            'type'      => 'tinyint(1)',
-            'default'   => 1,
-            'value'     => array
-            (
-                1 => '默认地址',
-                2 => '普通地址',
-                3 => '临时地址',
-            ),
-        ),
-        'name' => array
-        (
-            'name'      => '联系人',
-            'type'      => 'varchar(100)',
-        ),
-        'phone' => array
-        (
-            'name'      => '联系电话',
-            'type'      => 'varchar(200)',
-        ),
-        'area' => array
-        (
-            'name'      => '城市地区',
-            'type'      => 'varchar(800)',
-        ),
-        'province_id' => array
-        (
-            'name'      => '省份',
-            'type'      => 'int(11)',
-        ),
-        'city_id' => array
-        (
-            'name'      => '城市',
-            'type'      => 'int(11)',
-        ),
-        'county_id' => array
-        (
-            'name'      => '区县',
-            'type'      => 'int(11)',
-        ),
-        'address' => array
-        (
-            'name'      => '详细地址',
-            'type'      => 'varchar(1000)',
-        ),
-    ),
-);

+ 0 - 70
src/place_old/table/agent.php

@@ -1,70 +0,0 @@
-<?php
-return array
-(
-    'name' => '角色代理表',
-    'partition' => 'Dever::call("manage/common.system")',
-    'order' => 'level asc',
-    'struct' => array
-    (
-        'name' => array
-        (
-            'name'      => '代理名称',
-            'type'      => 'varchar(30)',
-        ),
-
-        'price' => array
-        (
-            'name'      => '代理价格',
-            'type'      => 'decimal(11,2)',
-        ),
-
-        'level' => array
-        (
-            'name'      => '代理等级',
-            'type'      => 'int(11)',
-            'default'   => 1,
-        ),
-
-        'content' => array
-        (
-            'name'      => '代理介绍',
-            'type'      => 'varchar(2000)',
-        ),
-
-        'pay' => array
-        (
-            'name'      => '支付方式',
-            'type'      => 'tinyint(1)',
-            'default'   => 1,
-            'value'     => array
-            (
-                1 => '差额支付',
-                2 => '全额支付',
-            ),
-        ),
-
-        'vip_fee' => array
-        (
-            'name'      => '会员佣金比例',
-            'type'      => 'varchar(11)',
-        ),
-
-        'agent_fee' => array
-        (
-            'name'      => '代理佣金比例',
-            'type'      => 'varchar(11)',
-        ),
-        
-        'status' => array
-        (
-            'name'      => '代理状态',
-            'type'      => 'tinyint(1)',
-            'default'   => 1,
-            'value'     => array
-            (
-                1 => '开启',
-                2 => '禁用',
-            ),
-        ),
-    ),
-);

+ 0 - 51
src/place_old/table/agent_order.php

@@ -1,51 +0,0 @@
-<?php
-return array
-(
-    'name' => '代理支付订单表',
-    'partition' => 'Dever::call("manage/common.system")',
-    'struct' => array
-    (
-        'agent_id'        => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '代理ID',
-        ),
-
-        'uid'       => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '用户',
-        ),
-
-        'order_num'        => array
-        (
-            'type'      => 'varchar(60)',
-            'name'      => '订单号',
-        ),
-
-        'cash'      => array
-        (
-            'type'      => 'decimal(11,2)',
-            'name'      => '订单金额',
-        ),
-
-        'status'        => array
-        (
-            'type'      => 'tinyint(1)',
-            'name'      => '订单状态',
-            'default'   => '1',
-            'value'         => array
-            (
-                1 => '待支付',
-                2 => '已支付',
-                3 => '已取消',
-            ),
-        ),
-
-        'pdate'       => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '付款时间',
-        ),
-    ),
-);

+ 0 - 52
src/place_old/table/agent_price.php

@@ -1,52 +0,0 @@
-<?php
-return array
-(
-    'name' => '代理价格设置表',
-    'partition' => 'Dever::call("manage/common.system")',
-    'order' => 'id asc',
-    'struct' => array
-    (
-        'agent_id' => array
-        (
-            'name'      => '代理id',
-            'type'      => 'int(11)',
-        ),
-
-        'type' => array
-        (
-            'name'      => '资源类型',
-            'type'      => 'tinyint(1)',
-            'default'   => 1,
-        ),
-
-        'per' => array
-        (
-            'name'      => '折扣',
-            'type'      => 'varchar(11)',
-        ),
-
-        'fee' => array
-        (
-            'name'      => '佣金比例',
-            'type'      => 'varchar(11)',
-        ),
-
-        'total' => array
-        (
-            'name'      => '上限',
-            'type'      => 'varchar(11)',
-        ),
-        
-        'status' => array
-        (
-            'name'      => '状态',
-            'type'      => 'tinyint(1)',
-            'default'   => 1,
-            'value'     => array
-            (
-                1 => '开启',
-                2 => '禁用',
-            ),
-        ),
-    ),
-);

+ 0 - 45
src/place_old/table/cash_log.php

@@ -1,45 +0,0 @@
-<?php
-return array
-(
-    'name' => '资金日志表',
-    'partition' => 'Dever::call("manage/common.system")',
-    'store' => 'log',
-    'struct' => array
-    (
-        'uid'       => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '用户',
-        ),
-        
-        'desc'       => array
-        (
-            'type'      => 'varchar(50)',
-            'name'      => '描述',
-        ),
-
-        'type'        => array
-        (
-            'type'      => 'tinyint(1)',
-            'name'      => '订单状态',
-            'default'   => '1',
-            'value'         => array
-            (
-                1 => '入账',
-                2 => '出账',
-            ),
-        ),
-
-        'cash'      => array
-        (
-            'type'      => 'decimal(11,2)',
-            'name'      => '金额',
-        ),
-
-        'yue'      => array
-        (
-            'type'      => 'decimal(11,2)',
-            'name'      => '操作后余额',
-        ),
-    ),
-);

+ 0 - 39
src/place_old/table/client.php

@@ -1,39 +0,0 @@
-<?php
-return array
-(
-    'name' => '源主销量折扣设置',
-    'partition' => 'Dever::call("manage/common.system")',
-    'order' => 'sell desc',
-    'struct' => array
-    (
-        'day' => array
-        (
-            'name'      => '时效(天)',
-            'type'      => 'int(11)',
-        ),
-
-        'sell' => array
-        (
-            'name'      => '销量',
-            'type'      => 'int(11)',
-        ),
-
-        'per' => array
-        (
-            'name'      => '折扣',
-            'type'      => 'varchar(11)',
-        ),
-
-        'status' => array
-        (
-            'name'      => '状态',
-            'type'      => 'tinyint(1)',
-            'default'   => 1,
-            'value'     => array
-            (
-                1 => '开启',
-                2 => '禁用',
-            ),
-        ),
-    ),
-);

+ 0 - 34
src/place_old/table/client_price.php

@@ -1,34 +0,0 @@
-<?php
-return array
-(
-    'name' => '源主供货价格设置表',
-    'partition' => 'Dever::call("manage/common.system")',
-    'order' => 'id asc',
-    'struct' => array
-    (
-        'type' => array
-        (
-            'name'      => '资源类型',
-            'type'      => 'tinyint(1)',
-            'default'   => 1,
-        ),
-
-        'per' => array
-        (
-            'name'      => '折扣',
-            'type'      => 'varchar(11)',
-        ),
-        
-        'status' => array
-        (
-            'name'      => '状态',
-            'type'      => 'tinyint(1)',
-            'default'   => 1,
-            'value'     => array
-            (
-                1 => '开启',
-                2 => '禁用',
-            ),
-        ),
-    ),
-);

+ 0 - 56
src/place_old/table/client_resource.php

@@ -1,56 +0,0 @@
-<?php
-return array
-(
-    'name' => '源主进货资源',
-    'partition' => 'Dever::call("manage/common.system", array(false, true, "place/info.funcType"))',
-    'struct' => array
-    (
-        'type'        => array
-        (
-            'type'      => 'tinyint(1)',
-            'name'      => '类型',
-        ),
-
-        'type_id'        => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '类型ID',
-        ),
-
-        'uid'       => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '用户',
-        ),
-
-        'client_id'       => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '源主',
-        ),
-
-        'place_id'       => array
-        (
-            'type'      => 'varchar(100)',
-            'name'      => '身份',
-        ),
-
-        'price' => array
-        (
-            'name'      => '进货价格记录',
-            'type'      => 'decimal(11,2)',
-        ),
-
-        'status' => array
-        (
-            'name'      => '状态',
-            'type'      => 'tinyint(1)',
-            'default'   => 1,
-            'value'     => array
-            (
-                1 => '有效',
-                2 => '无效',
-            ),
-        ),
-    ),
-);

+ 0 - 37
src/place_old/table/code.php

@@ -1,37 +0,0 @@
-<?php
-return array
-(
-    'name' => '身份码记录表',
-    'struct' => array
-    (
-        'sector_id' => array
-        (
-            'name'      => '领域',
-            'type'      => 'int(11)',
-        ),
-
-        'module_id' => array
-        (
-            'name'      => '领域模块',
-            'type'      => 'int(11)',
-        ),
-
-        'user_id' => array
-        (
-            'name'      => '领域账户',
-            'type'      => 'int(11)',
-        ),
-
-        'place_id' => array
-        (
-            'name'      => '领域身份',
-            'type'      => 'int(11)',
-        ),
-
-        'code' => array
-        (
-            'name'      => '身份码',
-            'type'      => 'varchar(80)',
-        ),
-    ),
-);

+ 0 - 26
src/place_old/table/collect.php

@@ -1,26 +0,0 @@
-<?php
-return array
-(
-    'name' => '收藏表',
-    'partition' => 'Dever::call("manage/common.system", array(false, true, "place/info.funcType"))',
-    'struct' => array
-    (
-        'uid'       => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '用户',
-        ),
-
-        'type'        => array
-        (
-            'type'      => 'tinyint(1)',
-            'name'      => '类型',
-        ),
-
-        'type_id'        => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '类型ID',
-        ),
-    ),
-);

+ 0 - 137
src/place_old/table/info.php

@@ -1,137 +0,0 @@
-<?php
-return array
-(
-    'name' => '身份表',
-    'partition' => 'Dever::call("manage/common.system", array(false, false))',
-    'struct' => array
-    (
-        'uid' => array
-        (
-            'name'      => '用户ID',
-            'type'      => 'int(11)',
-        ),
-        'cate_id' => array
-        (
-            'name'      => '主分类',
-            'type'      => 'int(11)',
-            'value'     => 'cate/level_1',
-        ),
-        'type' => array
-        (
-            'name'      => '类型',
-            'type'      => 'tinyint(1)',
-            'default'   => 1,
-            'value'     => array
-            (
-                1 => '公开',
-                2 => '注册',
-                //3 => '邀请',
-                4 => '密码',
-                5 => '购买',
-            ),
-        ),
-        'name' => array
-        (
-            'name'      => '名称',
-            'type'      => 'varchar(32)',
-        ),
-        'logo' => array
-        (
-            'name'      => '头像',
-            'type'      => 'varchar(150)',
-        ),
-        'bg' => array
-        (
-            'name'      => '背景图',
-            'type'      => 'varchar(150)',
-        ),
-        'content' => array
-        (
-            'name'      => '介绍',
-            'type'      => 'varchar(2000)',
-        ),
-
-        'password' => array
-        (
-            'name'      => '密码',
-            'type'      => 'varchar(32)',
-        ),
-
-        'code' => array
-        (
-            'name'      => '身份码',
-            'type'      => 'varchar(80)',
-        ),
-
-        'vip_name' => array
-        (
-            'name'      => '会员称谓',
-            'type'      => 'varchar(32)',
-        ),
-
-        'agent_name' => array
-        (
-            'name'      => '代理称谓',
-            'type'      => 'varchar(32)',
-        ),
-
-        'price' => array
-        (
-            'name'      => '价格',
-            'type'      => 'decimal(11,2)',
-        ),
-
-        'money_id' => array
-        (
-            'name'      => '支付货币',
-            'type'      => 'int(11)',
-            'default'   => '1',
-            'value'     => 'sector/money',
-        ),
-
-        'score' => array
-        (
-            'name'      => '积分名称',
-            'type'      => 'varchar(32)',
-            'default'   => '金币',
-        ),
-
-        'score_per' => array
-        (
-            'name'      => '积分换算',
-            'type'      => 'varchar(10)',
-            'default'   => '1',
-        ),
-
-        'channel' => array
-        (
-            'name'      => '供货能力',
-            'type'      => 'tinyint(1)',
-            'default'   => 2,
-            'value'     => array
-            (
-                1 => '开启',
-                2 => '关闭',
-            ),
-        ),
-
-        'pay_account' => array
-        (
-            'name'      => '支付账户',
-            'type'      => 'tinyint(1)',
-            'default'   => -1,
-        ),
-
-        'status' => array
-        (
-            'name'      => '状态',
-            'type'      => 'tinyint(1)',
-            'default'   => 1,
-            'value'     => array
-            (
-                1 => '开启',
-                2 => '禁用',
-            ),
-        ),
-    ),
-);

+ 0 - 101
src/place_old/table/member.php

@@ -1,101 +0,0 @@
-<?php
-return array
-(
-    'name' => '身份用户表',
-    'partition' => 'Dever::call("manage/common.system")',
-    'struct' => array
-    (
-        'name' => array
-        (
-            'name'      => '用户名称',
-            'type'      => 'varchar(32)',
-        ),
-        'mobile' => array
-        (
-            'name'      => '手机号',
-            'type'      => 'bigint(11)',
-        ),
-        'password' => array
-        (
-            'name'      => '密码',
-            'type'      => 'varchar(64)',
-        ),
-        'salt' => array
-        (
-            'name'      => '密码salt',
-            'type'      => 'varchar(32)',
-        ),
-        'vip_id' => array
-        (
-            'name'      => '会员等级',
-            'type'      => 'int(11)',
-            'value'     => 'Dever::call("place/vip.getList")',
-            'default'   => -1,
-        ),
-        'agent_id' => array
-        (
-            'name'      => '代理等级',
-            'type'      => 'int(11)',
-            'value'     => 'Dever::call("place/agent.getList")',
-            'default'   => -1,
-        ),
-        'client_id' => array
-        (
-            'name'      => '源主',
-            'type'      => 'int(11)',
-            'value'     => 'sector/user',
-            'default'   => -1,
-        ),
-        'parent_uid' => array
-        (
-            'name'      => '上级',
-            'type'      => 'int(11)',
-            'default'   => -1,
-        ),
-        'score_cash' => array
-        (
-            'name'      => '积分余额',
-            'type'      => 'decimal(11,2)',
-        ),
-        'cash' => array
-        (
-            'name'      => '余额',
-            'type'      => 'decimal(11,2)',
-        ),
-        'avatar' => array
-        (
-            'name'      => '头像',
-            'type'      => 'varchar(150)',
-        ),
-        'entry_type' => array
-        (
-            'name'      => '访问类型',
-            'type'      => 'tinyint(1)',
-            'default'   => -1,
-            'value'     => array
-            (
-                -1 => '未进入',
-                1 => '公开',
-                2 => '注册',
-                3 => '邀请',
-                4 => '密码',
-                5 => '购买',
-            ),
-        ),
-        'status' => array
-        (
-            'name'      => '状态',
-            'type'      => 'tinyint(1)',
-            'default'   => 1,
-            'value'     => array
-            (
-                1 => '正常',
-                2 => '封禁',
-            ),
-        ),
-    ),
-    'index' => array
-    (
-        'mobile' => 'mobile.unique',
-    ),
-);

+ 0 - 45
src/place_old/table/order_stat.php

@@ -1,45 +0,0 @@
-<?php
-return array
-(
-    'name' => '订单日统计表',
-    'partition' => 'Dever::call("manage/common.system", array(false, true, "place/info.funcType"))',
-    'order' => 'id desc',
-    'struct' => array
-    (
-        'type'        => array
-        (
-            'type'      => 'tinyint(1)',
-            'name'      => '类型',
-        ),
-
-        'type_id'        => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '类型ID',
-        ),
-
-        'uid'       => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '用户',
-        ),
-
-        'cash'      => array
-        (
-            'type'      => 'decimal(11,2)',
-            'name'      => '金额',
-        ),
-
-        'num' => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '数量',
-        ),
-        
-        'day' => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '天',
-        ),
-    ),
-);

+ 0 - 68
src/place_old/table/resource.php

@@ -1,68 +0,0 @@
-<?php
-return array
-(
-    'name' => '身份资源设置表',
-    'partition' => 'Dever::call("manage/common.system")',
-    'order' => 'sort asc',
-    'struct' => array
-    (
-        'type' => array
-        (
-            'name'      => '资源类型',
-            'type'      => 'tinyint(1)',
-            'default'   => 1,
-            'value'     => array
-            (
-                1 => '资料',
-                2 => '功能',
-                3 => '商品',
-                //4 => '角色',
-                //5 => '数据',
-                //6 => '聊天',
-            ),
-        ),
-        'icon' => array
-        (
-            'name'      => '图标',
-            'type'      => 'varchar(150)',
-        ),
-        'name' => array
-        (
-            'name'      => '展示名称',
-            'type'      => 'varchar(32)',
-        ),
-
-        'sort' => array
-        (
-            'name'      => '排序序号',
-            'type'      => 'int(11)',
-            'default'   => '1',
-        ),
-        
-        'status' => array
-        (
-            'name'      => '状态',
-            'type'      => 'tinyint(1)',
-            'default'   => 1,
-            'value'     => array
-            (
-                1 => '可用',
-                2 => '不可用',
-            ),
-        ),
-    ),
-
-    'default' => array
-    (
-        'field' => 'name,type,sort,cdate',
-        'value' => array
-        (
-            '"资料",1,1,' . DEVER_TIME,
-            '"功能",2,2,' . DEVER_TIME,
-            '"商品",3,3,' . DEVER_TIME,
-            //'"角色",4,4,' . DEVER_TIME,
-            //'"数据",5,5,' . DEVER_TIME,
-        ),
-        'num' => 1,
-    ),
-);

+ 0 - 56
src/place_old/table/resource_relation.php

@@ -1,56 +0,0 @@
-<?php
-return array
-(
-    'name' => '资源关联表',
-    'partition' => 'Dever::call("manage/common.system", array(false, true, "place/info.funcType"))',
-    'struct' => array
-    (
-        'channel_type'        => array
-        (
-            'type'      => 'tinyint(1)',
-            'name'      => '类型',
-        ),
-
-        'channel_type_id'        => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '类型ID',
-        ),
-
-        'channel_place_id'       => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '渠道身份',
-        ),
-
-        'type'        => array
-        (
-            'type'      => 'tinyint(1)',
-            'name'      => '类型',
-        ),
-
-        'type_id'        => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '类型ID',
-        ),
-
-        'channel_price' => array
-        (
-            'name'      => '进货价格记录',
-            'type'      => 'decimal(11,2)',
-        ),
-
-        'status' => array
-        (
-            'name'      => '状态',
-            'type'      => 'tinyint(1)',
-            'default'   => 1,
-            'value'     => array
-            (
-                1 => '有效',
-                2 => '无效',
-            ),
-        ),
-    ),
-);

+ 0 - 40
src/place_old/table/review.php

@@ -1,40 +0,0 @@
-<?php
-return array
-(
-    'name' => '评价表',
-    'partition' => 'Dever::call("manage/common.system", array(false, true, "place/info.funcType"))',
-    'order' => 'sort asc',
-    'struct' => array
-    (
-        'type'        => array
-        (
-            'type'      => 'tinyint(1)',
-            'name'      => '类型',
-        ),
-
-        'type_id'        => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '类型ID',
-        ),
-
-        'uid'       => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '用户',
-        ),
-
-        'content'       => array
-        (
-            'name'      => '内容',
-            'type'      => 'varchar(2000)',
-        ),
-
-        'sort' => array
-        (
-            'name'      => '排序',
-            'type'      => 'int(11)',
-            'default'   => '1',
-        ),
-    ),
-);

+ 0 - 33
src/place_old/table/role.php

@@ -1,33 +0,0 @@
-<?php
-return array
-(
-    'name' => '角色表',
-    'partition' => 'Dever::call("manage/common.system")',
-    'order' => 'id asc',
-    'struct' => array
-    (
-        'name' => array
-        (
-            'name'      => '角色名称',
-            'type'      => 'varchar(32)',
-        ),
-
-        'key' => array
-        (
-            'name'      => '角色标识',
-            'type'      => 'varchar(32)',
-        ),
-        
-        'status' => array
-        (
-            'name'      => '角色状态',
-            'type'      => 'tinyint(1)',
-            'default'   => 1,
-            'value'     => array
-            (
-                1 => '开启',
-                2 => '禁用',
-            ),
-        ),
-    ),
-);

+ 0 - 76
src/place_old/table/role_level.php

@@ -1,76 +0,0 @@
-<?php
-return array
-(
-    'name' => '角色等级设置',
-    'partition' => 'Dever::call("manage/common.system")',
-    'order' => 'level asc',
-    'struct' => array
-    (
-        'role_id'        => array
-        (
-            'name'      => '角色ID',
-            'type'      => 'int(11)',
-        ),
-
-        'name' => array
-        (
-            'name'      => '等级名称',
-            'type'      => 'varchar(32)',
-        ),
-
-        'level' => array
-        (
-            'name'      => '等级数字',
-            'type'      => 'int(11)',
-            'default'   => 1,
-        ),
-
-        'price' => array
-        (
-            'name'      => '等级价格',
-            'type'      => 'decimal(11,2)',
-        ),
-
-        'day_desc' => array
-        (
-            'name'      => '等级时长描述',
-            'type'      => 'varchar(32)',
-        ),
-
-        'day' => array
-        (
-            'name'      => '等级时长天数',
-            'type'      => 'int(11)',
-        ),
-
-        'content' => array
-        (
-            'name'      => '等级介绍',
-            'type'      => 'varchar(2000)',
-        ),
-
-        'pay' => array
-        (
-            'name'      => '升级支付方式',
-            'type'      => 'tinyint(1)',
-            'default'   => 1,
-            'value'     => array
-            (
-                1 => '差额支付',
-                2 => '全额支付',
-            ),
-        ),
-        
-        'status' => array
-        (
-            'name'      => '等级状态',
-            'type'      => 'tinyint(1)',
-            'default'   => 1,
-            'value'     => array
-            (
-                1 => '开启',
-                2 => '禁用',
-            ),
-        ),
-    ),
-);

+ 0 - 52
src/place_old/table/role_level_profit.php

@@ -1,52 +0,0 @@
-<?php
-return array
-(
-    'name' => '角色等级权益设置表',
-    'partition' => 'Dever::call("manage/common.system")',
-    'order' => 'id asc',
-    'struct' => array
-    (
-        'level_id' => array
-        (
-            'name'      => '角色等级id',
-            'type'      => 'int(11)',
-        ),
-
-        'type' => array
-        (
-            'name'      => '权益类型',
-            'type'      => 'tinyint(1)',
-            'default'   => 1,
-        ),
-
-        'per' => array
-        (
-            'name'      => '折扣',
-            'type'      => 'varchar(11)',
-        ),
-
-        'fee' => array
-        (
-            'name'      => '佣金比例',
-            'type'      => 'varchar(11)',
-        ),
-
-        'total' => array
-        (
-            'name'      => '上限',
-            'type'      => 'varchar(11)',
-        ),
-        
-        'status' => array
-        (
-            'name'      => '状态',
-            'type'      => 'tinyint(1)',
-            'default'   => 1,
-            'value'     => array
-            (
-                1 => '开启',
-                2 => '禁用',
-            ),
-        ),
-    ),
-);

+ 0 - 50
src/place_old/table/seller.php

@@ -1,50 +0,0 @@
-<?php
-return array
-(
-    'name' => '销售网店渠道',
-    'partition' => 'Dever::call("manage/common.system")',
-    'order' => 'sort asc',
-    'struct' => array
-    (
-        'name' => array
-        (
-            'name'      => '网店名称',
-            'type'      => 'varchar(50)',
-        ),
-
-        'type' => array
-        (
-            'name'      => '类型',
-            'type'      => 'tinyint(1)',
-            'default'   => 1,
-            'value'     => array
-            (
-                1 => '微信小店',
-                2 => '小红书',
-                3 => '抖店',
-                4 => '拼多多',
-                5 => '淘宝',
-                6 => '美团',
-            ),
-        ),
-
-        'status' => array
-        (
-            'name'      => '授权状态',
-            'type'      => 'tinyint(1)',
-            'default'   => 2,
-            'value'     => array
-            (
-                1 => '已授权',
-                2 => '未授权',
-            ),
-        ),
-
-        'sort' => array
-        (
-            'name'      => '排序',
-            'type'      => 'int(11)',
-            'default'   => 1,
-        ),
-    ),
-);

+ 0 - 46
src/place_old/table/supplier.php

@@ -1,46 +0,0 @@
-<?php
-return array
-(
-    'name' => '供应商',
-    'partition' => 'Dever::call("manage/common.system")',
-    'order' => 'sort asc',
-    'struct' => array
-    (
-        'name' => array
-        (
-            'name'      => '供应商名称',
-            'type'      => 'varchar(50)',
-        ),
-
-        'mobile' => array
-        (
-            'name'      => '联系电话',
-            'type'      => 'varchar(50)',
-        ),
-
-        'type' => array
-        (
-            'name'      => '类型',
-            'type'      => 'tinyint(1)',
-            'default'   => 1,
-            'value'     => array
-            (
-                1 => '源小货',
-                2 => '1688',
-            ),
-        ),
-
-        'type_id'       => array
-        (
-            'type'      => 'varchar(50)',
-            'name'      => '供应商ID',
-        ),
-
-        'sort' => array
-        (
-            'name'      => '排序',
-            'type'      => 'int(11)',
-            'default'   => 1,
-        ),
-    ),
-);

+ 0 - 70
src/place_old/table/vip.php

@@ -1,70 +0,0 @@
-<?php
-return array
-(
-    'name' => '会员表',
-    'partition' => 'Dever::call("manage/common.system")',
-    'order' => 'level asc',
-    'struct' => array
-    (
-        'name' => array
-        (
-            'name'      => '会员名称',
-            'type'      => 'varchar(32)',
-        ),
-
-        'price' => array
-        (
-            'name'      => '会员价格',
-            'type'      => 'decimal(11,2)',
-        ),
-
-        'day_desc' => array
-        (
-            'name'      => '会员时长',
-            'type'      => 'varchar(32)',
-        ),
-
-        'day' => array
-        (
-            'name'      => '时长天数',
-            'type'      => 'int(11)',
-        ),
-
-        'level' => array
-        (
-            'name'      => '会员等级',
-            'type'      => 'int(11)',
-            'default'   => 1,
-        ),
-
-        'content' => array
-        (
-            'name'      => '会员介绍',
-            'type'      => 'varchar(2000)',
-        ),
-
-        'pay' => array
-        (
-            'name'      => '支付方式',
-            'type'      => 'tinyint(1)',
-            'default'   => 1,
-            'value'     => array
-            (
-                1 => '差额支付',
-                2 => '全额支付',
-            ),
-        ),
-        
-        'status' => array
-        (
-            'name'      => '会员状态',
-            'type'      => 'tinyint(1)',
-            'default'   => 1,
-            'value'     => array
-            (
-                1 => '开启',
-                2 => '禁用',
-            ),
-        ),
-    ),
-);

+ 0 - 51
src/place_old/table/vip_order.php

@@ -1,51 +0,0 @@
-<?php
-return array
-(
-    'name' => '会员支付订单表',
-    'partition' => 'Dever::call("manage/common.system")',
-    'struct' => array
-    (
-        'vip_id'        => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '会员ID',
-        ),
-
-        'uid'       => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '用户',
-        ),
-
-        'order_num'        => array
-        (
-            'type'      => 'varchar(60)',
-            'name'      => '订单号',
-        ),
-
-        'cash'      => array
-        (
-            'type'      => 'decimal(11,2)',
-            'name'      => '订单金额',
-        ),
-
-        'status'        => array
-        (
-            'type'      => 'tinyint(1)',
-            'name'      => '订单状态',
-            'default'   => '1',
-            'value'         => array
-            (
-                1 => '待支付',
-                2 => '已支付',
-                3 => '已取消',
-            ),
-        ),
-
-        'pdate'       => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '付款时间',
-        ),
-    ),
-);

+ 0 - 46
src/place_old/table/vip_price.php

@@ -1,46 +0,0 @@
-<?php
-return array
-(
-    'name' => '会员价格设置表',
-    'partition' => 'Dever::call("manage/common.system")',
-    'order' => 'id asc',
-    'struct' => array
-    (
-        'vip_id' => array
-        (
-            'name'      => '会员id',
-            'type'      => 'int(11)',
-        ),
-
-        'type' => array
-        (
-            'name'      => '资源类型',
-            'type'      => 'tinyint(1)',
-            'default'   => 1,
-        ),
-
-        'per' => array
-        (
-            'name'      => '折扣',
-            'type'      => 'varchar(11)',
-        ),
-
-        'total' => array
-        (
-            'name'      => '上限',
-            'type'      => 'varchar(11)',
-        ),
-        
-        'status' => array
-        (
-            'name'      => '状态',
-            'type'      => 'tinyint(1)',
-            'default'   => 1,
-            'value'     => array
-            (
-                1 => '开启',
-                2 => '禁用',
-            ),
-        ),
-    ),
-);