Files
addons
app_download_files
extend
hyhproject
admin
app
common
home
home2
mobile2
common
function.php
conf
controller
model
validate
view
wechat2
.htaccess
command.php
mobile
oss
static
thinkphp
upload
vendor
wxtmp
.gitignore
.htaccess
.user.ini
404.html
H5436787D.wgt
admin.php
app-release.apk
app_download.html
cash.lock
demo.php
get_version.php
get_version_new.php
index.html
index.php
reg.lock
robots.txt
qlg.tsgz.moe/hyhproject/mobile2/common/function.php
2019-09-06 23:53:10 +08:00

16 lines
335 B
PHP
Executable File

<?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;
}