12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php namespace Place_interface\Api;
- use Dever;
- use Place;
- use Place_interface\Lib\Core;
- use Place\Lib\Role;
- class Saler extends Core
- {
- protected $login = true;
- protected $entry = true;
- public function __construct()
- {
- parent::__construct();
- $this->role = new Role('saler', 2);
- }
- # 分销中心
- public function home()
- {
- $data = Dever::db('saler', 'place_user')->find(array('uid' => Place::$uid));
- return $data;
- }
- # 基本信息
- public function getList()
- {
- return $this->role->getList();
- }
- # 确认支付
- public function pay_confirm()
- {
- $id = Dever::input('id');
- if (!$id) {
- Dever::error('分销员不存在');
- }
- $info = $this->role->getList($id);
- if (!$info['list']) {
- Dever::error('分销员不存在');
- }
- $data = Dever::load('role/pay', 'place_order')->get($info['list']);
- $data['money'] = Place::money();
- return $data;
- }
- # 拉起支付
- public function pay()
- {
- $this->pay_confirm();
- return Dever::load('role/pay', 'place_order')->act();
- }
- }
|