Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
weixiuhui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
蒋林
weixiuhui
Commits
618fdadf
Commit
618fdadf
authored
Sep 20, 2016
by
蒋林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 安装单搜索接口
2. 安装查询接口修改
parent
6ded41e7
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
110 additions
and
99 deletions
+110
-99
Galanz.php
application/controllers/api/Galanz.php
+54
-46
Rgalanz.php
application/controllers/test/Rgalanz.php
+29
-5
Sgalanz.php
application/controllers/test/Sgalanz.php
+11
-11
ReceiveGalanz.php
application/libraries/Receive/ReceiveGalanz.php
+14
-2
SourceGalanz.php
application/libraries/Source/SourceGalanz.php
+2
-35
galanz_c01000005.gif
public/captcha/galanz_c01000005.gif
+0
-0
No files found.
application/controllers/api/Galanz.php
View file @
618fdadf
This diff is collapsed.
Click to expand it.
application/controllers/test/Rgalanz.php
View file @
618fdadf
...
...
@@ -30,8 +30,11 @@ class Rgalanz extends BaseController
// self::$testu = 'K75516022';
// self::$testp = '123456';
self
::
$testu
=
'W75509345'
;
self
::
$testp
=
'dgqh!769'
;
// self::$testu = 'W75509345';
// self::$testp = 'dgqh!769';
self
::
$testu
=
'c01000005'
;
self
::
$testp
=
'weixiuhui010'
;
$this
->
load
->
library
(
'Receive/ReceiveGalanz'
,
null
,
'ReceiveGalanz'
);
return
$this
->
ReceiveGalanz
;
...
...
@@ -59,6 +62,28 @@ class Rgalanz extends BaseController
$this
->
show
(
$result
[
'data'
]);
}
public
function
searchUserProfieOrder
()
{
$obj
=
$this
->
galanzObj
();
$data
[
'appid'
]
=
'10001'
;
$data
[
'account'
]
=
self
::
$testu
;
$data
[
'pwd'
]
=
self
::
$testp
;
$data
[
'mobile'
]
=
'13717705860'
;
$data
[
'nonce_str'
]
=
$obj
->
GetNonceStr
();
$obj
->
SetValues
(
$data
);
$obj
->
SetSign
();
$values
=
$obj
->
GetValues
();
$url
=
self
::
$apiUrl
.
"api/galanz/searchUserProfieOrder"
;
$result
=
$this
->
curlPost
(
$url
,
$values
);
$result
[
'data'
]
=
json_decode
(
$result
[
'data'
],
true
);
$this
->
show
(
$result
);
}
public
function
queryOrder
()
{
...
...
@@ -67,7 +92,7 @@ class Rgalanz extends BaseController
$data
[
'appid'
]
=
'10001'
;
$data
[
'account'
]
=
self
::
$testu
;
$data
[
'pwd'
]
=
self
::
$testp
;
$data
[
'out_trade_no'
]
=
'CALL201
6091202257
'
;
$data
[
'out_trade_no'
]
=
'CALL201
5111004668
'
;
$data
[
'nonce_str'
]
=
$obj
->
GetNonceStr
();
$obj
->
SetValues
(
$data
);
...
...
@@ -112,8 +137,7 @@ class Rgalanz extends BaseController
$data
[
'appid'
]
=
'10001'
;
$data
[
'account'
]
=
self
::
$testu
;
$data
[
'pwd'
]
=
self
::
$testp
;
$data
[
'up_order_no'
]
=
'N2016082303159'
;
$data
[
'mobile'
]
=
'18631653945'
;
$data
[
'id'
]
=
'b1c8bece-378a-4b53-946b-61abd1b7c097'
;
$data
[
'nonce_str'
]
=
$obj
->
GetNonceStr
();
$obj
->
SetValues
(
$data
);
...
...
application/controllers/test/Sgalanz.php
View file @
618fdadf
...
...
@@ -44,21 +44,21 @@ class Sgalanz extends BaseController
public
function
searchOrder
()
{
$obj
=
$this
->
galanzObj
();
$list
=
$obj
->
SearchOrder
(
'CALL201
6082203611
'
);
$list
=
$obj
->
SearchOrder
(
'CALL201
5111004668
'
);
$this
->
show
(
$list
);
}
public
function
searchWorkOrder
()
{
$obj
=
$this
->
galanzObj
();
$list
=
$obj
->
SearchWorkOrder
(
'WO201609
0802059
'
);
$list
=
$obj
->
SearchWorkOrder
(
'WO201609
1000701
'
);
$this
->
show
(
$list
);
}
public
function
searchUserProfieOrder
()
{
$obj
=
$this
->
galanzObj
();
$list
=
$obj
->
SearchUserProfieOrder
(
'1
8631653945'
,
'N2016082303159
'
);
$list
=
$obj
->
SearchUserProfieOrder
(
'1
3693637226
'
);
$this
->
show
(
$list
);
}
...
...
@@ -123,20 +123,20 @@ class Sgalanz extends BaseController
private
function
galanzObj
()
{
//
$account = [
//
'username' => 'c01000005',
//
'pwd' => 'weixiuhui010'
//
];
$account
=
[
'username'
=>
'c01000005'
,
'pwd'
=>
'weixiuhui010'
];
// $account = [
// 'username' => 'K75516022',
// 'pwd' => '123456'
// ];
$account
=
[
'username'
=>
'W75509345'
,
'pwd'
=>
'dgqh!769'
];
//
$account = [
//
'username' => 'W75509345',
//
'pwd' => 'dgqh!769'
//
];
$this
->
load
->
library
(
'Source/SourceGalanz'
,
$account
,
'SourceGalanz'
);
return
$this
->
SourceGalanz
;
...
...
application/libraries/Receive/ReceiveGalanz.php
View file @
618fdadf
...
...
@@ -25,12 +25,24 @@ class ReceiveGalanz extends Receive
$this
->
CheckValues
(
$fileds
);
}
public
function
CheckQueryUserProfileOrderValues
()
{
$fileds
=
[
'id'
];
$this
->
CheckValues
(
$fileds
);
}
public
function
CheckSearchWorkOrderValues
()
{
$fileds
=
[
'mobile'
];
$this
->
CheckValues
(
$fileds
);
}
public
function
CheckSearchUserProfieOrderValues
()
{
$fileds
=
[
'mobile'
];
$this
->
CheckValues
(
$fileds
);
}
/**
* 保存订单
*/
...
...
@@ -246,13 +258,13 @@ class ReceiveGalanz extends Receive
public
function
CheckSaveUserProfileOrderValues
()
{
$fileds
=
[
'
up_order_no
'
];
$fileds
=
[
'
id
'
];
$this
->
CheckValues
(
$fileds
);
}
public
function
CheckSendUserProfileOrderValues
()
{
$fileds
=
[
'
up_order_no
'
];
$fileds
=
[
'
id
'
];
$this
->
CheckValues
(
$fileds
);
}
...
...
application/libraries/Source/SourceGalanz.php
View file @
618fdadf
...
...
@@ -197,24 +197,7 @@ class SourceGalanz extends Source
];
$url
=
self
::
$host
.
'/Complaint/new_srv_callinMP.aspx'
;
$content
=
$this
->
GetUrlContents
(
$url
);
preg_match
(
'/<input[^>]+name="__VIEWSTATE"[^>]+value="([^"]*)"/'
,
$content
,
$arr
);
$post
[
'__VIEWSTATE'
]
=
$arr
[
1
];
$headers
=
$this
->
Header
(
$url
);
$result
=
$this
->
CurlPost
(
$url
,
$post
,
$headers
);
$result
=
gzdecode
(
$result
[
'data'
]);
preg_match_all
(
'/<tr>\s+<td class="checkbox">[\s\S]+?<\/tr>/'
,
$result
,
$tr
);
$orders
=
[];
if
(
$tr
[
0
])
{
foreach
(
$tr
[
0
]
as
$k
=>
$v
)
{
$orders
[
$k
]
=
$this
->
TableTdPreg
(
$v
);
}
}
$orders
=
$this
->
HandelSearchOrder
(
$url
,
$post
);
return
$orders
;
}
...
...
@@ -254,23 +237,7 @@ class SourceGalanz extends Source
];
$url
=
self
::
$host
.
'/repair/new_srv_workorderMP.aspx'
;
$content
=
$this
->
GetUrlContents
(
$url
);
preg_match
(
'/<input[^>]+name="__VIEWSTATE"[^>]+value="([^"]*)"/'
,
$content
,
$arr
);
$post
[
'__VIEWSTATE'
]
=
$arr
[
1
];
$headers
=
$this
->
Header
(
$url
);
$result
=
$this
->
CurlPost
(
$url
,
$post
,
$headers
);
$result
=
gzdecode
(
$result
[
'data'
]);
preg_match_all
(
'/<tr>\s+<td class="checkbox">[\s\S]+?<\/tr>/'
,
$result
,
$tr
);
$orders
=
[];
if
(
$tr
[
0
])
{
foreach
(
$tr
[
0
]
as
$k
=>
$v
)
{
$orders
[
$k
]
=
$this
->
TableTdPreg
(
$v
);
}
}
$orders
=
$this
->
HandelSearchOrder
(
$url
,
$post
);
return
$orders
;
}
...
...
public/captcha/galanz_c01000005.gif
View replaced file @
6ded41e7
View file @
618fdadf
1.33 KB
|
W:
|
H:
1.28 KB
|
W:
|
H:
2-up
Swipe
Onion skin
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment