Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
Jz-Php
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
PHP
Jz-Php
Commits
fbfc2f8f
提交
fbfc2f8f
authored
5月 26, 2020
作者:
chengye
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'test' of
ssh://39.155.253.71:33222/PHP/Jz-Php
into test
上级
3823dc9a
8837f005
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
46 行增加
和
11 行删除
+46
-11
SingleSign.php
application/admin/controller/SingleSign.php
+7
-8
FkAddValidate.php
application/admin/validate/FkAddValidate.php
+27
-0
Payment.php
application/em/controller/Payment.php
+12
-3
没有找到文件。
application/admin/controller/SingleSign.php
浏览文件 @
fbfc2f8f
...
@@ -40,15 +40,14 @@ class SingleSign {
...
@@ -40,15 +40,14 @@ class SingleSign {
$isAdmin
=
substr
(
$str
,
$pos
,
1
);
$isAdmin
=
substr
(
$str
,
$pos
,
1
);
$user
[
'is_admin'
]
=
$isAdmin
;
$user
[
'is_admin'
]
=
$isAdmin
;
if
(
$user
[
'is_admin'
]
==
true
)
{
preg_match
(
'/adminuser\|s\:(\d+)\:/'
,
$str
,
$match
);
if
(
$match
){
$pos
=
stripos
(
$str
,
'adminuser|s:'
)
+
strlen
(
'adminuser|s:'
);
$pos
+=
strlen
(
$match
[
1
])
+
2
;
$user
[
'username'
]
=
substr
(
$str
,
$pos
,
$match
[
1
]
+
0
);
}
if
(
$user
[
'is_admin'
]
==
true
&&
$user
[
'username'
]
==
'admin'
)
{
$user
[
'username'
]
=
'gonnadmin'
;
$user
[
'username'
]
=
'gonnadmin'
;
}
else
{
preg_match
(
'/adminuser\|s\:(\d+)\:/'
,
$str
,
$match
);
if
(
$match
){
$pos
=
stripos
(
$str
,
'adminuser|s:'
)
+
strlen
(
'adminuser|s:'
);
$pos
+=
strlen
(
$match
[
1
])
+
2
;
$user
[
'username'
]
=
substr
(
$str
,
$pos
,
$match
[
1
]
+
0
);
}
}
}
$pos
=
stripos
(
$str
,
'ukey|s:10:'
)
+
11
;
$pos
=
stripos
(
$str
,
'ukey|s:10:'
)
+
11
;
...
...
application/admin/validate/FkAddValidate.php
0 → 100644
浏览文件 @
fbfc2f8f
<?php
namespace
app\admin\validate
;
use
think\Validate
;
class
FkAddValidate
extends
Validate
{
protected
$rule
=
[
'title'
=>
'require'
,
'payee'
=>
'require'
,
'payOrg'
=>
'require'
,
'date'
=>
'require|date'
,
'fkinfo'
=>
'require'
];
protected
$message
=
[
'title.require'
=>
'标题必填'
,
'payee.require'
=>
'收款方必填'
,
'payOrg.require'
=>
'付款组织必填'
,
'date.require'
=>
'日期必填'
,
'date.date'
=>
'日期格式错误'
];
}
\ No newline at end of file
application/em/controller/Payment.php
浏览文件 @
fbfc2f8f
...
@@ -404,7 +404,16 @@ class Payment extends Base
...
@@ -404,7 +404,16 @@ class Payment extends Base
public
function
payoa
(){
public
function
payoa
(){
$payment_id
=
Request
::
param
(
'payment_id'
);
$payment_id
=
Request
::
param
(
'payment_id'
);
$user
=
Session
::
get
(
'user'
);
$user
=
Session
::
get
(
'user'
);
$staff
=
Staff
::
get
(
$user
[
'user_id'
]);
if
(
$user
[
'is_admin'
]
==
1
){
if
(
$user
[
'username'
]
==
'admin'
||
$user
[
'username'
]
==
'gonnadmin'
){
$staff
=
[];
}
else
{
$staff
=
Staff
::
get
([
'name'
=>
$user
[
'name'
]]);
}
}
else
{
$staff
=
Staff
::
get
(
$user
[
'user_id'
]);
}
$this
->
assign
(
'payment_id'
,
$payment_id
);
$this
->
assign
(
'payment_id'
,
$payment_id
);
$this
->
assign
(
'payee'
,
$this
->
getGys
(
$staff
->
email
));
$this
->
assign
(
'payee'
,
$this
->
getGys
(
$staff
->
email
));
$this
->
assign
(
'payOrg'
,
$this
->
getFkInfo
(
2
));
$this
->
assign
(
'payOrg'
,
$this
->
getFkInfo
(
2
));
...
@@ -503,8 +512,8 @@ class Payment extends Base
...
@@ -503,8 +512,8 @@ class Payment extends Base
public
function
getGys
(
$email
)
public
function
getGys
(
$email
)
{
{
$url
=
config
(
'oafk.base_url'
)
.
config
(
'oafk.gys'
)
.
$this
->
apiKey
();
$url
=
config
(
'oafk.base_url'
)
.
config
(
'oafk.gys'
)
.
$this
->
apiKey
();
$
data
=
[
'email'
=>
$email
]
;
$
url
.=
'&email='
.
$email
;
$res
=
httpPOST
(
$url
,
$data
);
$res
=
curlGet
(
$url
);
$res
=
json_decode
(
$res
,
true
);
$res
=
json_decode
(
$res
,
true
);
foreach
(
$res
[
'data'
]
as
$k
=>
$v
){
foreach
(
$res
[
'data'
]
as
$k
=>
$v
){
if
(
!
empty
(
$v
[
'bank_info'
])){
if
(
!
empty
(
$v
[
'bank_info'
])){
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论