作者 anyv

购物车

... ... @@ -156,6 +156,17 @@ class ShopcartController extends WeChatBaseController{
$res = json_encode($ret);
return $res;
}elseif ($data[0]['type'] == 2){
$indent['uid'] = $uid;
$indent['state'] = 4;
$indent['order_number'] = date('Ymd').substr(implode(NULL, array_map('ord', str_split(substr(uniqid(), 7, 13), 1))), 0, 8);
$indent['money'] = $_POST['myprice'];
$indent['indent_type'] = 2;
$indent['create_time'] = time();
$book_num = 0;
foreach ($data as $key => $val){
$book_num += $val['book_num'];
}
$indent['book_num'] = $book_num;
return 2;
}
... ...