module/flk/source/index/flk_shoplist.ctrl.php
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
class flk_shoplistControl extends skymvc{
public function __construct(){
parent::__construct();
}
public function onDefault(){
$where=" status=1 ";
$catid=get("catid","i");
if($catid){
$where.=" AND catid=".$catid;
$cat=MM("flk","flk_shop_category")->selectRow("catid=".$catid);
}
$order=" shopid DESC ";
$fields=" * ";
$gps=gps_get();
$lat=$gps['lat'];
$lng=$gps['lng'];
$type=get("type","h");
switch($type){
case "near":
if($lat && $lng){
$fields.=",".' ROUND(
6378.138 * 2 * ASIN(
SQRT(
POW(
SIN(
(
'.$lat.' * PI() / 180 - lat * PI() / 180
) / 2
),
2
) + COS('.$lat.' * PI() / 180) * COS(lat * PI() / 180) * POW(
SIN(
(
'.$lng.' * PI() / 180 - lng * PI() / 180
) / 2
),
2
)
)
)
) AS distance_num ';
$order=" distance_num ASC";
}
break;
}
$orderList=MM("flk","flk_shop")->orderList();
$filterList=array(
"send_free"=>"免费配送",
"send_all"=>"零元起送",
"cspf"=>"超时赔付",
"newshop"=>"新店"
);
$sc_id=get("sc_id","i");
if($sc_id){
$scids=M("site_city")->id_family($sc_id);
$where.=" AND sc_id in("._implode($scids).")";
$url.="&sc_id=".$sc_id;
}
后面还有 150 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。