切换导航条
此项目
正在载入...
登录
anyv
/
xkeasy
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
王小刚
6 years ago
提交
93c5b19918190030dd1c608c3a98a1d628a80618
1 个父辈
09b08da0
数据库
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
35 行增加
和
2 行删除
app/portal/controller/OrderSalesmanController.php
simplewind/cmf/controller/WeChatBaseController.php
app/portal/controller/OrderSalesmanController.php
查看文件 @
93c5b19
...
...
@@ -93,7 +93,7 @@ class OrderSalesmanController extends WeChatBaseController
public
function
getOrderSalesman
(){
$param
=
$this
->
request
->
param
();
if
(
!
empty
(
$param
[
'school'
])){
$where
[
'school'
]
=
[
'
eq'
,
$param
[
'school'
]
];
$where
[
'school'
]
=
[
'
like'
,
"%
$param[school]%"
]
;
}
if(!empty(
$param['grade']
)){
$param['grade']
= explode(' - ',
$param['grade']
);
...
...
@@ -290,4 +290,37 @@ class OrderSalesmanController extends WeChatBaseController
return false;
}
}
public function updatePost(){
$param
=
$this->request
->param();
$indent_id
=
$this->request
->param('indent_id',0,'intval');
if(empty(
$indent_id
)){
$this->error
('缺少必要参数123');
}
$indentModel
= new IndentModel();
$data
=
$indentModel->findData
(['id'=>
$indent_id
]);
if(
$data['is_courier']
== 1){
if(empty(
$param['name']
) || empty(
$param['region']
) || empty(
$param['school']
) || empty(
$param['grade_class']
) || empty(
$param['phone']
)){
$this->error
('缺少必要参数');
}
$grade_class
= explode('-',
$param['grade_class']
);
$arr['name']
=
$param['name']
;
$arr['phone']
=
$param['phone']
;
$arr['region']
=
$param['region']
;
$arr['school']
= preg_replace('# #','',
$param['school']
);
$arr['grade']
=
$grade_class[0]
;
$arr['class']
=
$grade_class[1]
;
$result
=
$indentModel
->updateData(['id'=>
$indent_id
],
$arr
);
}else if(
$data['is_courier']
== 2){
if(empty(
$param['name']
) || empty(
$param['phone']
) || empty(
$param['region']
) || empty(
$param['region_detail']
)){
$this->error
('缺少必要参数123');
}
$arr['name']
=
$param['name']
;
$arr['phone']
=
$param['phone']
;
$arr['region']
=
$param['region']
;
$arr['region_detail']
=
$param['region_detail']
;
$result
=
$indentModel
->updateData(['id'=>
$indent_id
],
$arr
);
}
$this->success
('SUCCESS');
}
}
\ No newline at end of file
...
...
simplewind/cmf/controller/WeChatBaseController.php
查看文件 @
93c5b19
...
...
@@ -204,7 +204,7 @@ class WeChatBaseController extends BaseController
*/
public
function
checkWeChatUserLogin
()
{
// $user = Db::name('user')->where('id',
3
)->find();
// $user = Db::name('user')->where('id',
6
)->find();
// cmf_update_current_user($user);
// session('user',null);
$userId
=
cmf_get_current_user_id
();
...
...
请
注册
或
登录
后发表评论