更新价格比较app

Signed-off-by: kevin <kevin@lmve.net>
This commit is contained in:
2023-07-05 02:27:25 +08:00
parent 925f27d2db
commit b359cdfeec
5 changed files with 224 additions and 8 deletions
+76
View File
@@ -0,0 +1,76 @@
<?php
defined('IN_TS') or die('Access Denied.');
$suk=tsTitle($_GET['suk']);
$name=tsTitle($_GET['name']);
$item = $new ['pricetrend']->find ( 'pricetrend_item', array (
'SUK'=>$suk,
) );
$item_id=$item['id'];
function getitem($item_id){
}
$names = $new ['pricetrend']->findall ( 'pricetrend_item_name', array (
'item_id'=>$item_id,
) );
$price = $new ['pricetrend']->findall ( 'pricetrend_item_price', array (
'item_id'=>$item_id,
) );
$const = $new ['pricetrend']->findall ( 'pricetrend_item_const', array (
'item_id'=>$item_id
) );
echo "{";
echo "\"id\":";
echo "\"";
echo $item_id;
echo "\",";
echo "\"suk\":";
echo "\"";
echo $item['SUK'];
echo "\",";
echo "\"platform\":";
echo "\"";
echo $item['platform'];
echo "\",";
echo "\"salestart\":";
echo "\"";
echo $item['salestart'];
echo "\",";
echo "\"mainphoto\":";
echo "\"";
echo SITE_URL.'uploadfile/pricetrend/'.$item['mainphoto'];
echo "\",";
echo "\"names\":";
echo json_encode($names,JSON_UNESCAPED_UNICODE);
echo ",";
echo "\"price\":";
echo json_encode($price,JSON_UNESCAPED_UNICODE);
echo ",";
echo "\"const\":";
echo json_encode($const,JSON_UNESCAPED_UNICODE);
echo ",";
echo "}";