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
2e765cad
Commit
2e765cad
authored
Nov 04, 2016
by
蒋林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试文件
parent
4cfce545
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1108 additions
and
1 deletion
+1108
-1
.gitignore
.gitignore
+0
-1
Chigo.php
application/controllers/test/Chigo.php
+99
-0
Galanz.php
application/controllers/test/Galanz.php
+804
-0
Suning.php
application/controllers/test/Suning.php
+205
-0
No files found.
.gitignore
View file @
2e765cad
.idea
.idea
/public/*
/public/*
/application/controllers/test/*
/index.php
/index.php
application/controllers/test/Chigo.php
0 → 100644
View file @
2e765cad
<?php
/**
* Created by PhpStorm.
* User: LinJiangL
* Date: 16/10/31
* Time: 上午10:25
*/
/**
* Class Chigo
*
* @property SourceChigo SourceChigo
* @property ReceiveChigo ReceiveChigo
*/
class
Chigo
extends
BaseController
{
public
static
$testu
=
''
;
public
static
$testp
=
''
;
protected
static
$apiUrl
=
'http://wxh.pp.cn/'
;
public
function
__construct
()
{
//ini_set('display_errors', 1);
parent
::
__construct
();
self
::
$apiUrl
=
"http://
{
$_SERVER
[
'HTTP_HOST'
]
}
/"
;
$account
=
[
0
=>
[
'u'
=>
'0200145'
,
'p'
=>
'123456'
],
];
$key
=
0
;
self
::
$testu
=
$account
[
$key
][
'u'
];
self
::
$testp
=
$account
[
$key
][
'p'
];
}
public
function
test
()
{
//$sobj = $this->sourceObj();
//$res = $sobj->CallAcceptAction();
//$this->show($res);
}
public
function
callAcceptAction
()
{
$obj
=
$this
->
receiveObj
();
$data
=
[
'appid'
=>
'10001'
,
'account'
=>
self
::
$testu
,
'pwd'
=>
self
::
$testp
,
'adat_begin'
=>
'20161012'
,
'adat_end'
=>
'20161102'
,
'mobile'
=>
''
,
'phone'
=>
''
,
'read_state'
=>
''
,
'ano'
=>
'0020201610125742'
,
];
$data
[
'nonce_str'
]
=
$obj
->
GetNonceStr
();
$obj
->
SetValues
(
$data
);
$obj
->
SetSign
();
$values
=
$obj
->
GetValues
();
$url
=
self
::
$apiUrl
.
"api/chigo/callAcceptAction"
;
$result
=
curl_post
(
$url
,
$values
);
$result
=
json_decode
(
$result
[
'data'
],
true
);
$this
->
show
(
$result
);
}
public
function
show
(
$data
)
{
echo
"<pre>"
;
print_r
(
$data
);
}
private
function
sourceObj
()
{
$account
=
[
'username'
=>
self
::
$testu
,
'pwd'
=>
self
::
$testp
];
$this
->
load
->
library
(
'Source/SourceChigo'
,
$account
,
'SourceChigo'
);
return
$this
->
SourceChigo
;
}
private
function
receiveObj
()
{
$this
->
load
->
library
(
'Receive/ReceiveChigo'
,
null
,
'ReceiveChigo'
);
return
$this
->
ReceiveChigo
;
}
}
\ No newline at end of file
application/controllers/test/Galanz.php
0 → 100644
View file @
2e765cad
This diff is collapsed.
Click to expand it.
application/controllers/test/Suning.php
0 → 100644
View file @
2e765cad
<?php
/**
* Created by PhpStorm.
* User: LinJiangL
* Date: 16/10/17
* Time: 下午2:00
*/
/**
* Class Galanz
*
* @property SourceSuning SourceSuning
* @property ReceiveSuning ReceiveSuning
*/
class
Suning
extends
BaseController
{
public
static
$testu
=
''
;
public
static
$testp
=
''
;
protected
static
$apiUrl
=
'http://wxh.pp.cn/'
;
public
function
__construct
()
{
//ini_set('display_errors', 1);
parent
::
__construct
();
self
::
$apiUrl
=
"http://
{
$_SERVER
[
'HTTP_HOST'
]
}
/"
;
$account
=
[
0
=>
[
'u'
=>
'深圳唯修汇科技有限公司'
,
'p'
=>
'weixiuhui2015'
],
];
$key
=
0
;
self
::
$testu
=
$account
[
$key
][
'u'
];
self
::
$testp
=
$account
[
$key
][
'p'
];
}
public
function
test
()
{
$sobj
=
$this
->
sourceObj
();
$result
=
$sobj
->
ServiceOrderCondition
(
1
);
var_dump
(
$result
);
}
public
function
selectServiceOrderCondition
()
{
$obj
=
$this
->
receiveObj
();
$data
=
[
'appid'
=>
'10001'
,
'account'
=>
self
::
$testu
,
'pwd'
=>
self
::
$testp
,
];
$data
[
'nonce_str'
]
=
$obj
->
GetNonceStr
();
$obj
->
SetValues
(
$data
);
$obj
->
SetSign
();
$values
=
$obj
->
GetValues
();
$url
=
self
::
$apiUrl
.
"api/suning/selectServiceOrderCondition"
;
$result
=
curl_post
(
$url
,
$values
);
$result
[
'data'
]
=
json_decode
(
$result
[
'data'
],
true
);
$this
->
show
(
$result
);
}
public
function
selectServiceOrder
()
{
$obj
=
$this
->
receiveObj
();
$data
=
[
'appid'
=>
'10001'
,
'account'
=>
self
::
$testu
,
'pwd'
=>
self
::
$testp
,
'mark'
=>
'1'
,
'siteBp'
=>
'904102'
,
'startTime'
=>
'20161025'
,
'endTime'
=>
'20161110'
,
'objectIds'
=>
''
,
'phone'
=>
'13423871233'
,
];
$data
[
'nonce_str'
]
=
$obj
->
GetNonceStr
();
$obj
->
SetValues
(
$data
);
$obj
->
SetSign
();
$values
=
$obj
->
GetValues
();
$url
=
self
::
$apiUrl
.
"api/suning/selectServiceOrder"
;
$result
=
curl_post
(
$url
,
$values
);
$result
[
'data'
]
=
json_decode
(
$result
[
'data'
],
true
);
$this
->
show
(
$result
);
}
public
function
serviceOrderCondition
()
{
$obj
=
$this
->
receiveObj
();
$data
=
[
'appid'
=>
'10001'
,
'account'
=>
self
::
$testu
,
'pwd'
=>
self
::
$testp
,
'type'
=>
'1'
];
$data
[
'nonce_str'
]
=
$obj
->
GetNonceStr
();
$obj
->
SetValues
(
$data
);
$obj
->
SetSign
();
$values
=
$obj
->
GetValues
();
$url
=
self
::
$apiUrl
.
"api/suning/serviceOrderCondition"
;
$result
=
curl_post
(
$url
,
$values
);
$result
[
'data'
]
=
json_decode
(
$result
[
'data'
],
true
);
$this
->
show
(
$result
);
}
public
function
serviceOrder
()
{
$obj
=
$this
->
receiveObj
();
$data
=
[
'appid'
=>
'10001'
,
'account'
=>
self
::
$testu
,
'pwd'
=>
self
::
$testp
,
'type'
=>
'1'
,
'siteBp'
=>
'904102'
,
'startTime'
=>
'20161026'
,
'endTime'
=>
'20161110'
,
'objectIds'
=>
''
];
$data
[
'nonce_str'
]
=
$obj
->
GetNonceStr
();
$obj
->
SetValues
(
$data
);
$obj
->
SetSign
();
$values
=
$obj
->
GetValues
();
$url
=
self
::
$apiUrl
.
"api/suning/serviceOrder"
;
$result
=
curl_post
(
$url
,
$values
);
$result
[
'data'
]
=
json_decode
(
$result
[
'data'
],
true
);
$this
->
show
(
$result
);
}
public
function
receiveServiceOrder
()
{
$obj
=
$this
->
receiveObj
();
$data
=
[
'appid'
=>
'10001'
,
'account'
=>
self
::
$testu
,
'pwd'
=>
self
::
$testp
,
'object'
=>
''
,
];
$object
=
[
[
'srvOrder'
=>
'7215781123'
,
'processType'
=>
'ZS06'
]
];
$data
[
'object'
]
=
urlencode
(
json_encode
(
$object
));
$data
[
'nonce_str'
]
=
$obj
->
GetNonceStr
();
$obj
->
SetValues
(
$data
);
$obj
->
SetSign
();
$values
=
$obj
->
GetValues
();
$url
=
self
::
$apiUrl
.
"api/suning/receiveServiceOrder"
;
$result
=
curl_post
(
$url
,
$values
);
$result
[
'data'
]
=
json_decode
(
$result
[
'data'
],
true
);
$this
->
show
(
$result
);
}
private
function
show
(
$data
)
{
echo
"<pre>"
;
print_r
(
$data
);
}
private
function
sourceObj
()
{
$account
=
[
'username'
=>
self
::
$testu
,
'pwd'
=>
self
::
$testp
];
$this
->
load
->
library
(
'Source/SourceSuning'
,
$account
,
'SourceSuning'
);
return
$this
->
SourceSuning
;
}
private
function
receiveObj
()
{
$this
->
load
->
library
(
'Receive/ReceiveSuning'
,
null
,
'ReceiveSuning'
);
return
$this
->
ReceiveSuning
;
}
}
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