区县账号直接登录商户
This commit is contained in:
parent
b10c7ad25b
commit
2b61ed16f0
@ -13,7 +13,7 @@ use app\common\repositories\user\UserVisitRepository;
|
|||||||
use crmeb\basic\BaseController;
|
use crmeb\basic\BaseController;
|
||||||
use app\common\repositories\system\merchant\MerchantRepository as repository;
|
use app\common\repositories\system\merchant\MerchantRepository as repository;
|
||||||
use think\App;
|
use think\App;
|
||||||
use think\Db;
|
use think\facade\Db;
|
||||||
use think\exception\ValidateException;
|
use think\exception\ValidateException;
|
||||||
use think\facade\Cache;
|
use think\facade\Cache;
|
||||||
|
|
||||||
@ -152,4 +152,15 @@ class Merchant extends BaseController
|
|||||||
return app('json')->success($res);
|
return app('json')->success($res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function merchant()
|
||||||
|
{
|
||||||
|
$merId = $this->request->param('mer_id');
|
||||||
|
$merchant = Db::name('merchant')->where('mer_id', $merId)->find();
|
||||||
|
$expire = time()+ 3600 * 24;
|
||||||
|
$token = md5($expire);
|
||||||
|
// 缓存token
|
||||||
|
Cache::set($token.'_merchant_'.$merchant['uid'], $expire);
|
||||||
|
return app('json')->success(compact('merchant', 'token', 'expire'));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -761,6 +761,7 @@ Route::group('api/', function () {
|
|||||||
Route::get('merchant_product_ranking', 'Merchant/merchantProductRanking');
|
Route::get('merchant_product_ranking', 'Merchant/merchantProductRanking');
|
||||||
Route::get('merchant_product_visit', 'Merchant/merchantProductVisit');
|
Route::get('merchant_product_visit', 'Merchant/merchantProductVisit');
|
||||||
Route::get('merchant_product_cart', 'Merchant/merchantProductCart');
|
Route::get('merchant_product_cart', 'Merchant/merchantProductCart');
|
||||||
|
Route::get('merchant', 'Merchant/merchant');
|
||||||
|
|
||||||
// api.dataview.Finance
|
// api.dataview.Finance
|
||||||
Route::get('withdraw_list', 'Finance/withdrawList');
|
Route::get('withdraw_list', 'Finance/withdrawList');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user