Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenDocCN
yii2_fecshop
提交
0435044d
Y
yii2_fecshop
项目概览
OpenDocCN
/
yii2_fecshop
通知
17
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
yii2_fecshop
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
0435044d
编写于
10月 31, 2017
作者:
T
Terry
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
appserver api
上级
281b9435
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
9 deletion
+13
-9
README.md
README.md
+2
-1
app/appserver/modules/Catalog/controllers/CategoryController.php
...server/modules/Catalog/controllers/CategoryController.php
+7
-7
app/appserver/modules/Checkout/controllers/CartController.php
...appserver/modules/Checkout/controllers/CartController.php
+2
-0
app/appserver/modules/Payment/block/paypal/standard/Start.php
...appserver/modules/Payment/block/paypal/standard/Start.php
+2
-1
未找到文件。
README.md
浏览文件 @
0435044d
...
...
@@ -15,7 +15,8 @@
项目状态:
> 正式版本已经出来,后台(appadmin)和pc端(appfront),wap端(apphtml5)已经完成,完成了一些基本的api。
> 正式版本已经出来,后台(appadmin)和pc端(appfront),wap端(apphtml5)
,vue端(appserver)已经完成,完成了一些基本的api。
...
...
app/appserver/modules/Catalog/controllers/CategoryController.php
浏览文件 @
0435044d
...
...
@@ -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
)
{
...
...
app/appserver/modules/Checkout/controllers/CartController.php
浏览文件 @
0435044d
...
...
@@ -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'
];
...
...
app/appserver/modules/Payment/block/paypal/standard/Start.php
浏览文件 @
0435044d
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录