更新
This commit is contained in:
parent
f02ffce416
commit
9d1d309a2f
@ -96,15 +96,17 @@ class OpurchaseclassController extends BaseAdminController
|
|||||||
$where['is_push'] = $is_push;
|
$where['is_push'] = $is_push;
|
||||||
$res = Opurchaseinfo::where($where)->page($page_no, $page_size)->select()
|
$res = Opurchaseinfo::where($where)->page($page_no, $page_size)->select()
|
||||||
->each(function ($item) {
|
->each(function ($item) {
|
||||||
$item['sys_labels_arr']='';
|
|
||||||
$find = Goods::where('id', $item['goods'])->with('unitName')->find();
|
$find = Goods::where('id', $item['goods'])->with('unitName')->find();
|
||||||
if($find){
|
if($find){
|
||||||
$item['goods_name'] = $find['name'];
|
$item['goods_name'] = $find['name'];
|
||||||
$item['unit_name'] = $find['unit_name'];
|
$item['unit_name'] = $find['unit_name'];
|
||||||
$goodslabel = GoodsLabel::where('id','in',$find['sys_labels'])->column('id,name');
|
|
||||||
$item['sys_labels_arr'] = $goodslabel;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
$where = [
|
||||||
|
'goods_id' => $item['goods'],
|
||||||
|
'order_id' => $item['pid'],
|
||||||
|
'is_adopt' => 1
|
||||||
|
];
|
||||||
|
$item['nums_count'] = OpurchaseGoodsOffer::where($where)->sum('nums');
|
||||||
|
|
||||||
});
|
});
|
||||||
$data['count'] = Opurchaseinfo::where($where)->count();
|
$data['count'] = Opurchaseinfo::where($where)->count();
|
||||||
|
@ -22,7 +22,7 @@ class IndexController extends BaseApiController{
|
|||||||
if (strpos($token, 'Bearer') === 0){
|
if (strpos($token, 'Bearer') === 0){
|
||||||
$token = trim(substr($token, 6));
|
$token = trim(substr($token, 6));
|
||||||
}
|
}
|
||||||
$res=ShopLogic::auth($token);
|
$res=ShopLogic::auth($token,$jg_register_id);
|
||||||
if(ShopLogic::hasError()||$res==false){
|
if(ShopLogic::hasError()||$res==false){
|
||||||
return $this->fail('没有授权信息');
|
return $this->fail('没有授权信息');
|
||||||
}else{
|
}else{
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
{
|
{
|
||||||
//获取用户余额和绑定银行账户信息
|
//获取用户余额和绑定银行账户信息
|
||||||
public function amount_account(){
|
public function amount_account(){
|
||||||
d($this->request->userInfo);
|
|
||||||
$uid = $this->request->userInfo['user_id'];
|
$uid = $this->request->userInfo['user_id'];
|
||||||
$merchant = Merchant::where('uid',$uid)->findOrEmpty();
|
$merchant = Merchant::where('uid',$uid)->findOrEmpty();
|
||||||
$supplier = Supplier::where('uid',$uid)->findOrEmpty();
|
$supplier = Supplier::where('uid',$uid)->findOrEmpty();
|
||||||
|
@ -9,7 +9,7 @@ use think\facade\Db;
|
|||||||
|
|
||||||
class ShopLogic extends BaseLogic
|
class ShopLogic extends BaseLogic
|
||||||
{
|
{
|
||||||
public static function auth($token)
|
public static function auth($token,$jg_register_id='')
|
||||||
{
|
{
|
||||||
list(, $base64UrlPayload,) = explode('.', $token);
|
list(, $base64UrlPayload,) = explode('.', $token);
|
||||||
$payload = base64UrlDecode($base64UrlPayload);
|
$payload = base64UrlDecode($base64UrlPayload);
|
||||||
@ -26,6 +26,9 @@ class ShopLogic extends BaseLogic
|
|||||||
return $userSession['token'];
|
return $userSession['token'];
|
||||||
}
|
}
|
||||||
$userInfo = UserTokenService::setToken($user['user_id'], 6);
|
$userInfo = UserTokenService::setToken($user['user_id'], 6);
|
||||||
|
if($jg_register_id){
|
||||||
|
Db::name('user_auth_shop')->where('id',$user['id'])->update(['jg_register_id'=>$jg_register_id]);
|
||||||
|
}
|
||||||
return $userInfo['token'];
|
return $userInfo['token'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user