|
@@ -12,7 +12,7 @@
|
|
|
|
|
|
defined('InShopNC') or exit('Access Invalid!');
|
|
|
|
|
|
-class member_cartControl extends mobileMemberControl
|
|
|
+class member_cartControl extends mbMemberControl
|
|
|
{
|
|
|
public function __construct()
|
|
|
{
|
|
@@ -24,6 +24,11 @@ class member_cartControl extends mobileMemberControl
|
|
|
*/
|
|
|
public function cart_listOp()
|
|
|
{
|
|
|
+ $token = trim($_GET['key']);
|
|
|
+ if($this->checkToken($token)){
|
|
|
+ return joutput_error($this->err_code);
|
|
|
+ }
|
|
|
+
|
|
|
$model_cart = Model('cart');
|
|
|
$model_goods = Model('goods');
|
|
|
|
|
@@ -68,6 +73,11 @@ class member_cartControl extends mobileMemberControl
|
|
|
*/
|
|
|
public function cart_addOp()
|
|
|
{
|
|
|
+ $token = trim($_GET['key']);
|
|
|
+ if($this->checkToken($token)){
|
|
|
+ return joutput_error($this->err_code);
|
|
|
+ }
|
|
|
+
|
|
|
$goods_id = intval($_POST['goods_id']);
|
|
|
$quantity = intval($_POST['quantity']);
|
|
|
if ($goods_id <= 0 || $quantity <= 0) {
|
|
@@ -117,6 +127,11 @@ class member_cartControl extends mobileMemberControl
|
|
|
|
|
|
public function cart_editOp()
|
|
|
{
|
|
|
+ $token = trim($_GET['key']);
|
|
|
+ if($this->checkToken($token)){
|
|
|
+ return joutput_error($this->err_code);
|
|
|
+ }
|
|
|
+
|
|
|
$cart_list = explode(',', urldecode($_POST['cart_list']));
|
|
|
$new_cart_list = array();
|
|
|
if (is_array($cart_list)) {
|
|
@@ -170,6 +185,11 @@ class member_cartControl extends mobileMemberControl
|
|
|
*/
|
|
|
public function cart_delOp()
|
|
|
{
|
|
|
+ $token = trim($_GET['key']);
|
|
|
+ if($this->checkToken($token)){
|
|
|
+ return joutput_error($this->err_code);
|
|
|
+ }
|
|
|
+
|
|
|
$cart_id = intval($_POST['cart_id']);
|
|
|
|
|
|
$model_cart = Model('cart');
|
|
@@ -190,6 +210,11 @@ class member_cartControl extends mobileMemberControl
|
|
|
*/
|
|
|
public function cart_edit_quantityOp()
|
|
|
{
|
|
|
+ $token = trim($_GET['key']);
|
|
|
+ if($this->checkToken($token)){
|
|
|
+ return joutput_error($this->err_code);
|
|
|
+ }
|
|
|
+
|
|
|
$cart_id = intval(abs($_POST['cart_id']));
|
|
|
$quantity = intval(abs($_POST['quantity']));
|
|
|
if (empty($cart_id) || empty($quantity)) {
|