1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <?php
- // +----------------------------------------------------------------------
- // | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
- // +----------------------------------------------------------------------
- // | Copyright (c) 2017~2021 https://www.yiovo.com All rights reserved.
- // +----------------------------------------------------------------------
- // | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
- // +----------------------------------------------------------------------
- // | Author: 萤火科技 <admin@yiovo.com>
- // +----------------------------------------------------------------------
- declare (strict_types = 1);
- namespace app\store\controller;
- use app\store\model\Setting as SettingModel;
- use app\store\model\ApplySeller as ApplyModel;
- /**
- * 申请分销员
- * Class Setting
- * @package app\store\controller
- */
- class ApplySeller extends Controller
- {
- /**
- * 申请列表
- * @return array
- * @throws \think\db\exception\DataNotFoundException
- * @throws \think\db\exception\DbException
- * @throws \think\db\exception\ModelNotFoundException
- */
- public function list()
- {
- $cs = request()->get();
- $m = new ApplyModel();
- $list = $m->getList($cs);
- return $this->renderSuccess(compact('list'));
- }
- /**
- * 更新分销员状态
- * @return array
- */
- public function update()
- {
- // 保存商城设置
- $model = new ApplyModel();
- if ($model->edit( $this->postForm())) {
- return $this->renderSuccess('操作成功');
- }
- return $this->renderError($model->getError() ?: '操作失败');
- }
- //
- public function upperuser(){
- $list = ApplyModel::where("user_id",'>',0)->paginate(15)->each(function($item){
- // if(strlen($item['mobile'])==11){
- // $item['mobile'] = substr($item['mobile'],0,3).'****'.substr($item['mobile'],7);
- // }
- $item['order_cnt'] =0;
- $item['order_amount'] =0;
- });
- return $this->renderSuccess(compact('list'));
- }
- }
|