切换导航条
此项目
正在载入...
登录
anyv
/
xkeasy
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
anyv
6 years ago
提交
bc745153bbc9a0abcbe66c8a7641e19f155be5a2
1 个父辈
0b272372
1 个管道 的构建
通过
耗费 0 秒
4
变更
2
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
21 行增加
和
2 行删除
app/portal/controller/ShopcartController.php
public/themes/simpleboot3/portal/shopcart/shop_cart.html
app/portal/controller/ShopcartController.php
查看文件 @
bc74515
...
...
@@ -113,12 +113,15 @@ class ShopcartController extends WeChatBaseController{
*/
public
function
shop_cart_pay
(){
dump
(
$_POST
[
'myprice'
]);
die
;
$uid
=
cmf_get_current_user_id
();
$cart_id
=
explode
(
','
,
$_POST
[
'id'
]);
foreach
(
$cart_id
as
$key
=>
$val
){
$goods_id
[]
=
Db
::
name
(
'shopping_cart'
)
->
where
(
'id'
,
$val
)
->
find
();
}
foreach
(
$goods_id
as
$key
=>
$val
){
$data
[]
=
Db
::
name
(
'goods'
)
->
where
(
'id'
,
$val
[
'goods_id'
])
->
find
();
$data
[
$key
][
'book_num'
]
=
$goods_id
[
$key
][
'book_num'
];
}
foreach
(
$data
as
$key
=>
$val
){
if
(
$data
[
0
][
'type'
]
==
$data
[
$key
][
'type'
]){
...
...
@@ -126,6 +129,17 @@ class ShopcartController extends WeChatBaseController{
return
false
;
}
}
if
(
$data
[
0
][
'type'
]
==
1
){
$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
);
$ret
[
'type'
]
=
1
;
return
1
;
}
elseif
(
$data
[
0
][
'type'
]
==
2
){
return
2
;
}
}
...
...
public/themes/simpleboot3/portal/shopcart/shop_cart.html
查看文件 @
bc74515
...
...
@@ -58,7 +58,7 @@
<!-- 合计 -->
<div
class=
"shop_carts2"
>
<span
class=
"shop_cartsIco"
>
合计:
</span>
<p
class=
"de_topTxt1_1 zoji"
>
¥
<span>
0.00
</span></p>
<p
class=
"de_topTxt1_1 zoji"
>
¥
<span
id=
"myprice"
>
0.00
</span></p>
</div>
<!-- 去支付 -->
...
...
@@ -141,8 +141,13 @@
alert
(
'不能为空'
);
}
else
{
goods_id
=
goods_id
.
join
(
','
);
$
.
post
(
"{:url('Shopcart/shop_cart_pay')}"
,{
id
:
goods_id
},
function
(
data
){
myprice
=
$
(
'#myprice'
).
text
();
$
.
post
(
"{:url('Shopcart/shop_cart_pay')}"
,{
id
:
goods_id
,
myprice
:
myprice
},
function
(
data
){
if
(
data
){
}
else
{
alert
(
'业务员商品和平台商品不能同时购买!'
);
}
});
window
.
location
.
href
=
"{:url('Orderpage/order_page')}"
;
}
...
...
请
注册
或
登录
后发表评论