提交 0435044d 编写于 作者: T Terry

appserver api

上级 281b9435
......@@ -15,7 +15,8 @@
项目状态:
> 正式版本已经出来,后台(appadmin)和pc端(appfront),wap端(apphtml5)已经完成,完成了一些基本的api。
> 正式版本已经出来,后台(appadmin)和pc端(appfront),wap端(apphtml5)
,vue端(appserver)已经完成,完成了一些基本的api。
......
......@@ -54,8 +54,8 @@ class CategoryController extends AppserverController
public function behaviors()
{
$behaviors = parent::behaviors();
$primaryKey = Yii::$service->category->getPrimaryKey();
$category_id = Yii::$app->request->get($primaryKey);
//$primaryKey = Yii::$service->category->getPrimaryKey();
$category_id = Yii::$app->request->get('categoryId');
$cacheName = 'category';
if (Yii::$service->cache->isEnable($cacheName)) {
$timeout = Yii::$service->cache->timeout($cacheName);
......@@ -293,7 +293,7 @@ class CategoryController extends AppserverController
];
}
}
$currenctPriceFilter = Yii::$app->request->get($this->_filterPrice);
$currenctPriceFilter = Yii::$app->request->get('filterPrice');
if($currenctPriceFilter){
$refineInfo[] = [
'attr' => $this->_filterPrice,
......@@ -353,7 +353,7 @@ class CategoryController extends AppserverController
{
$symbol = Yii::$service->page->currency->getCurrentSymbol();
$currenctPriceFilter = Yii::$app->request->get($this->_filterPrice);
$currenctPriceFilter = Yii::$app->request->get('filterPrice');
$filter = [];
$priceInfo = Yii::$app->controller->module->params['category_query'];
if (isset($priceInfo['price_range']) && !empty($priceInfo['price_range']) && is_array($priceInfo['price_range'])) {
......@@ -578,7 +578,7 @@ class CategoryController extends AppserverController
}
}
}
$filter_price = Yii::$app->request->get($this->_filterPrice);
$filter_price = Yii::$app->request->get('filterPrice');
//echo $filter_price;
list($f_price, $l_price) = explode('-', $filter_price);
if ($f_price == '0' || $f_price) {
......@@ -597,8 +597,8 @@ class CategoryController extends AppserverController
*/
protected function initCategory()
{
$primaryKey = 'category_id';
$primaryVal = Yii::$app->request->get($primaryKey);
//$primaryKey = 'category_id';
$primaryVal = Yii::$app->request->get('categoryId');
$this->_primaryVal = $primaryVal;
$category = Yii::$service->category->getByPrimaryKey($primaryVal);
if ($category) {
......
......@@ -65,11 +65,13 @@ class CartController extends AppserverController
foreach ($cart_info['products'] as $k=>$product_one) {
// 设置名字,得到当前store的语言名字。
$cart_info['products'][$k]['name'] = Yii::$service->store->getStoreAttrVal($product_one['product_name'], 'name');
unset($cart_info['products'][$k]['product_name']);
// 设置图片
if (isset($product_one['product_image']['main']['image'])) {
$productImg = $product_one['product_image']['main']['image'];
$cart_info['products'][$k]['img_url'] = Yii::$service->product->image->getResize($productImg,[150,150],false);
}
unset($cart_info['products'][$k]['product_image']);
// 产品的url
$cart_info['products'][$k]['url'] = '/catalog/product/'.$product_one['product_id'];
......
......@@ -30,9 +30,10 @@ class Start
if (strtolower($SetExpressCheckoutReturn['ACK']) == 'success') {
$token = $SetExpressCheckoutReturn['TOKEN'];
$increment_id = Yii::$service->order->getSessionIncrementId();
//echo $increment_id ;exit;
# 将token写入到订单中
Yii::$service->order->updateTokenByIncrementId($increment_id,$token);
$redirectUrl = Yii::$service->payment->paypal->getSetStandardCheckoutUrl($token);
$code = Yii::$service->helper->appserver->status_success;
$data = [
'redirectUrl' => $redirectUrl,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册