You've already forked qlg.tsgz.moe
Init Repo
This commit is contained in:
15
hyhproject/mobile2/common/function.php
Executable file
15
hyhproject/mobile2/common/function.php
Executable file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
use think\Db;
|
||||
/**
|
||||
* ============================================================================
|
||||
*/
|
||||
/**
|
||||
* 获取购物车数量
|
||||
*/
|
||||
function WSTCartNum(){
|
||||
$userId = session('WST_USER.userId');
|
||||
$cartNum = Db::name('carts')->where(['userId'=>$userId])->field('cartId')->select();
|
||||
$count = count($cartNum);
|
||||
return $count;
|
||||
}
|
||||
|
Reference in New Issue
Block a user