fix: bug修复

This commit is contained in:
2024-10-29 17:38:47 +08:00
parent 48bf3e6f33
commit 6df8d23686
31 changed files with 1032 additions and 664 deletions

View File

@@ -164,9 +164,8 @@ class Product extends BaseController {
if (empty($detail)) {
return exception('数据有误,请检查后再操作');
}
$category = Loader::model('ProductCategory')->getRow($detail['cid']);
$category = Loader::model('ProductCategory')->getRow($detail['cid']);
$cid = Loader::model('ProductCategory')->getRow($category['pid']);
$pid = Loader::model('ProductCategory')->getRow($cid['pid']);
if (empty($category)) {
@@ -251,7 +250,7 @@ class Product extends BaseController {
$this->assign('count',$count);
$this->assign($value);
$this->viewcount($id);
$purchase_links = Db::name('product_purchase_links')->alias('links')
->field(['links.id', 'platforms.platform', 'links.link'])
->join('product_purchase_link_platforms platforms', 'platforms.id=links.platform_id')
@@ -259,7 +258,7 @@ class Product extends BaseController {
->where('links.country_code', '=', $this->country_code)
->select();
$this->assign('purchase_links', $purchase_links);
return $this->fetch($template);
} else {
return exception('数据有误,请检查后再操作');