|
@@ -151,7 +151,7 @@ class Index extends Controller
|
|
|
|
|
|
$goodsModel = new GoodsModel();
|
|
$goodsModel = new GoodsModel();
|
|
$goods = $goodsModel->getDetails($goodsId);
|
|
$goods = $goodsModel->getDetails($goodsId);
|
|
- if (empty($goods) || (isset($goods['status']) && $goods['status'] == 500)){
|
|
|
|
|
|
+ if (empty($goods) || (isset($goods['status']) && $goods['status'] == 500)) {
|
|
return \view('/error');
|
|
return \view('/error');
|
|
}
|
|
}
|
|
$goods = $goods->toArray();
|
|
$goods = $goods->toArray();
|
|
@@ -161,9 +161,9 @@ class Index extends Controller
|
|
$model = new CommentModel;
|
|
$model = new CommentModel;
|
|
$total = $model->rowsTotal($goodsId);
|
|
$total = $model->rowsTotal($goodsId);
|
|
|
|
|
|
- $goodsCategory = GoodsCategoryRel::where(['goods_id'=>$goods['goods_id']])->find()->toArray();
|
|
|
|
- $is_lost_mary= 0;
|
|
|
|
- if ($goodsCategory['category_id'] == GoodsCategoryRel::LOST_MARY_5000){
|
|
|
|
|
|
+ $goodsCategory = GoodsCategoryRel::where(['goods_id' => $goods['goods_id']])->find()->toArray();
|
|
|
|
+ $is_lost_mary = 0;
|
|
|
|
+ if ($goodsCategory['category_id'] == GoodsCategoryRel::LOST_MARY_5000) {
|
|
$is_lost_mary = 1;
|
|
$is_lost_mary = 1;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -213,19 +213,20 @@ class Index extends Controller
|
|
public function goldTest()
|
|
public function goldTest()
|
|
{
|
|
{
|
|
$keyFilePath = '/etc/nginx/nginx/html/dihua-01-5690813badec.json';
|
|
$keyFilePath = '/etc/nginx/nginx/html/dihua-01-5690813badec.json';
|
|
- $storage = new StorageClient(['projectId'=>'dihua-01','keyFilePath' => $keyFilePath]);
|
|
|
|
|
|
+ $storage = new StorageClient(['projectId' => 'dihua-01', 'keyFilePath' => $keyFilePath]);
|
|
$bucket = $storage->bucket('freeshippingvps');
|
|
$bucket = $storage->bucket('freeshippingvps');
|
|
|
|
|
|
$filePath = '/etc/nginx/nginx/html/vape_shop/public/uploads/10001/20240618/24c7b239666052544c6a0a70489f58b6.jpg';
|
|
$filePath = '/etc/nginx/nginx/html/vape_shop/public/uploads/10001/20240618/24c7b239666052544c6a0a70489f58b6.jpg';
|
|
$storageObj = $bucket->upload(
|
|
$storageObj = $bucket->upload(
|
|
fopen($filePath, 'r'),
|
|
fopen($filePath, 'r'),
|
|
[
|
|
[
|
|
|
|
+ 'name' => '/10001/20240618/24c7b239666052544c6a0a70489f58b6.jpg'
|
|
//'predefinedAcl' => 'publicRead'
|
|
//'predefinedAcl' => 'publicRead'
|
|
]
|
|
]
|
|
);
|
|
);
|
|
$name = $storageObj->name();
|
|
$name = $storageObj->name();
|
|
|
|
|
|
- return $this->renderSuccess(['name'=>$name],'OK');
|
|
|
|
|
|
+ return $this->renderSuccess(['name' => $name], 'OK');
|
|
|
|
|
|
$ip = $this->request->ip();
|
|
$ip = $this->request->ip();
|
|
//$b = bcmod(1, 0);
|
|
//$b = bcmod(1, 0);
|
|
@@ -234,7 +235,7 @@ class Index extends Controller
|
|
Log::error('xxx');
|
|
Log::error('xxx');
|
|
|
|
|
|
Log::notice($ip);
|
|
Log::notice($ip);
|
|
- return $this->renderSuccess([],'OK');
|
|
|
|
|
|
+ return $this->renderSuccess([], 'OK');
|
|
|
|
|
|
|
|
|
|
dd($ip);
|
|
dd($ip);
|