切换导航条
此项目
正在载入...
登录
anyv
/
xkeasy
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
anyv
6 years ago
提交
4c2fcb57ccdce1d8ac97f60dfd7b9c381c450945
1 个父辈
b49cfa03
1 个管道 的构建
通过
耗费 4 秒
4
变更
4
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
36 行增加
和
23 行删除
app/portal/controller/OrderpageController.php
app/portal/controller/ShopcartController.php
public/themes/simpleboot3/portal/shopcart/shop_cart.html
simplewind/cmf/controller/WeChatBaseController.php
app/portal/controller/OrderpageController.php
查看文件 @
4c2fcb5
...
...
@@ -149,11 +149,7 @@ class OrderpageController extends WeChatBaseController{
$_POST
[
'is_courier'
]
=
2
;
$data_update
=
Db
::
name
(
'indent'
)
->
update
(
$_POST
);
if
(
$data_update
){
return
true
;
}
else
{
return
false
;
}
return
true
;
}
...
...
@@ -178,11 +174,7 @@ class OrderpageController extends WeChatBaseController{
public
function
goods_leave_word_update
(){
$data
=
Db
::
name
(
'indent'
)
->
update
(
$_POST
);
if
(
$data
){
return
true
;
}
else
{
return
false
;
}
return
true
;
}
...
...
app/portal/controller/ShopcartController.php
查看文件 @
4c2fcb5
...
...
@@ -190,6 +190,20 @@ class ShopcartController extends WeChatBaseController{
}
/**
* 业务员不能买书
*/
public
function
is_to_pay
(){
$uid
=
cmf_get_current_user_id
();
$my_user
=
Db
::
name
(
'my_user'
)
->
where
(
'uid'
,
$uid
)
->
find
();
if
(
$my_user
[
'status'
]
==
2
){
return
false
;
}
else
{
return
true
;
}
}
...
...
public/themes/simpleboot3/portal/shopcart/shop_cart.html
查看文件 @
4c2fcb5
...
...
@@ -140,20 +140,27 @@
if
(
goods_id
.
length
==
0
){
alert
(
'不能为空'
);
}
else
{
goods_id
=
goods_id
.
join
(
','
);
myprice
=
$
(
'#myprice'
).
text
();
$
.
post
(
"{:url('Shopcart/shop_cart_pay')}"
,{
id
:
goods_id
,
myprice
:
myprice
},
function
(
data
){
obj
=
JSON
.
parse
(
data
);
if
(
obj
.
type
==
3
){
alert
(
'业务员商品和平台商品不能同时购买!'
);
}
else
if
(
obj
.
type
==
1
){
window
.
location
.
href
=
"{:url('Orderpage/order_page')}?indet_id="
+
obj
.
indet_id
;
}
else
if
(
obj
.
type
==
2
){
window
.
location
.
href
=
"{:url('Orderpage/order_salesman_ty')}?indet_id="
+
obj
.
indet_id
;
}
$
.
post
(
"{:url('Shopcart/is_to_pay')}"
,{},
function
(
data
){
if
(
data
){
goods_id
=
goods_id
.
join
(
','
);
myprice
=
$
(
'#myprice'
).
text
();
$
.
post
(
"{:url('Shopcart/shop_cart_pay')}"
,{
id
:
goods_id
,
myprice
:
myprice
},
function
(
data
){
obj
=
JSON
.
parse
(
data
);
if
(
obj
.
type
==
3
){
alert
(
'业务员商品和平台商品不能同时购买!'
);
}
else
if
(
obj
.
type
==
1
){
window
.
location
.
href
=
"{:url('Orderpage/order_page')}?indet_id="
+
obj
.
indet_id
;
}
else
if
(
obj
.
type
==
2
){
window
.
location
.
href
=
"{:url('Orderpage/order_salesman_ty')}?indet_id="
+
obj
.
indet_id
;
}
});
}
else
{
alert
(
'业务员不能购买书籍'
);
}
});
}
}
...
...
simplewind/cmf/controller/WeChatBaseController.php
查看文件 @
4c2fcb5
...
...
@@ -204,8 +204,8 @@ class WeChatBaseController extends BaseController
*/
public
function
checkWeChatUserLogin
()
{
$user
=
Db
::
name
(
'user'
)
->
where
(
'id'
,
2
)
->
find
();
cmf_update_current_user
(
$user
);
/*$user = Db::name('user')->where('id',2)->find();
cmf_update_current_user($user);*/
$userId
=
cmf_get_current_user_id
();
if
(
empty
(
$userId
))
{
$config
=
[
...
...
请
注册
或
登录
后发表评论