1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- namespace app\api\controller;
- /**
-
- *
-
- *
- * ----------------------------------------------------------------------------
- *
-
- * 卖家登出控制器
- */
- class Sellerlogout extends MobileSeller
- {
- public function initialize()
- {
- parent::initialize();
- }
- /**
- * @api {POST} api/Sellerlogout/group_edit 注销
- * @apiVersion 1.0.0
- * @apiGroup Sellerlogout
- *
- * @apiHeader {String} X-DS-KEY 卖家授权token
- *
- * @apiParam {String} seller_name 卖家账号
- * @apiParam {String} client 客户端类型 android wap wechat ios windows jswechat
- *
- * @apiSuccess {String} code 返回码,10000为成功
- * @apiSuccess {String} message 返回消息
- * @apiSuccess {Object} result 返回数据
- */
- public function index()
- {
- if (empty(input('post.seller_name')) || !in_array(input('post.client'), $this->client_type_array)) {
- ds_json_encode(10001, lang('param_error'));
- }
- $mbsellertoken_model = model('mbsellertoken');
- if ($this->seller_info['seller_name'] == input('post.seller_name')) {
- $condition = array();
- $condition[] = array('seller_id', '=', $this->seller_info['seller_id']);
- $mbsellertoken_model->delMbsellertoken($condition);
- ds_json_encode(10000, '', 1);
- } else {
- ds_json_encode(10001, lang('param_error'));
- }
- }
- }
|