Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
数据应用
ThinkLibrary
提交
bd826f48
T
ThinkLibrary
项目概览
数据应用
/
ThinkLibrary
通知
2
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
代码片段
项目成员
Pages
T
ThinkLibrary
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
bd826f48
编写于
11月 19, 2020
作者:
李光春
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
- 小范围测试淘宝官方SDK
上级
25ce72a9
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
93 addition
and
3 deletion
+93
-3
CHANGELOG.md
CHANGELOG.md
+3
-0
src/common.php
src/common.php
+1
-1
src/service/taobao/TaoBaoService.php
src/service/taobao/TaoBaoService.php
+89
-2
未找到文件。
CHANGELOG.md
浏览文件 @
bd826f48
## v6.0.124 / 2020-11-19
-
小范围测试淘宝官方SDK
## v6.0.123 / 2020-11-19
-
测试淘宝官方SDK
...
...
src/common.php
浏览文件 @
bd826f48
...
...
@@ -25,7 +25,7 @@ use DtApp\ThinkLibrary\service\SystemService;
/**
* 定义当前版本
*/
const
VERSION
=
'6.0.12
3
'
;
const
VERSION
=
'6.0.12
4
'
;
if
(
!
function_exists
(
'get_ip_info'
))
{
/**
...
...
src/service/taobao/TaoBaoService.php
浏览文件 @
bd826f48
...
...
@@ -2,8 +2,12 @@
namespace
DtApp\ThinkLibrary\service\taobao
;
require_once
__DIR__
.
'/bin/TopSdk.php'
;
use
DtApp\ThinkLibrary\Service
;
use
TbkScInvitecodeGetRequest
;
use
TbkScPublisherInfoGetRequest
;
use
TbkScPublisherInfoSaveRequest
;
use
TopClient
;
/**
...
...
@@ -64,7 +68,90 @@ class TaoBaoService extends Service
return
$this
;
}
public
function
scInvitecodeGet
(
$sessionKey
):
self
/**
* ( 淘宝客-公用-私域用户备案 )
* 通过入参渠道管理或会员运营管理的邀请码,生成渠道id或会员运营id,完成渠道或会员的备案。
* https://open.taobao.com/api.htm?docId=37988&docType=2&scopeId=14474
* @param $sessionKey
* @return $this
*/
public
function
tbkScPublisherInfoSave
(
$sessionKey
):
self
{
$c
=
new
TopClient
();
$c
->
appkey
=
$this
->
app_key
;
$c
->
secretKey
=
$this
->
app_secret
;
$req
=
new
TbkScPublisherInfoSaveRequest
();
if
(
isset
(
$this
->
param
[
'relation_from'
]))
{
$req
->
setRelationFrom
(
$this
->
param
[
'relation_from'
]);
}
if
(
isset
(
$this
->
param
[
'offline_scene'
]))
{
$req
->
setOfflineScene
(
$this
->
param
[
'offline_scene'
]);
}
if
(
isset
(
$this
->
param
[
'online_scene'
]))
{
$req
->
setOnlineScene
(
$this
->
param
[
'online_scene'
]);
}
if
(
isset
(
$this
->
param
[
'inviter_code'
]))
{
$req
->
setInviterCode
(
$this
->
param
[
'inviter_code'
]);
}
if
(
isset
(
$this
->
param
[
'info_type'
]))
{
$req
->
setInfoType
(
$this
->
param
[
'info_type'
]);
}
if
(
isset
(
$this
->
param
[
'note'
]))
{
$req
->
setNote
(
$this
->
param
[
'note'
]);
}
if
(
isset
(
$this
->
param
[
'register_info'
]))
{
$req
->
setRegisterInfo
(
$this
->
param
[
'register_info'
]);
}
$this
->
output
=
$c
->
execute
(
$req
,
$sessionKey
);
return
$this
;
}
/**
* ( 淘宝客-公用-私域用户备案信息查询 )
* 查询已生成的渠道id或会员运营id的相关信息。
* https://open.taobao.com/api.htm?docId=37989&docType=2&scopeId=14474
* @param $sessionKey
* @return $this
*/
public
function
tbkScPublisherInfoGet
(
$sessionKey
):
self
{
$c
=
new
TopClient
();
$c
->
appkey
=
$this
->
app_key
;
$c
->
secretKey
=
$this
->
app_secret
;
$req
=
new
TbkScPublisherInfoGetRequest
();
if
(
isset
(
$this
->
param
[
'info_type'
]))
{
$req
->
setInfoType
(
$this
->
param
[
'info_type'
]);
}
if
(
isset
(
$this
->
param
[
'relation_id'
]))
{
$req
->
setRelationId
(
$this
->
param
[
'relation_id'
]);
}
if
(
isset
(
$this
->
param
[
'page_no'
]))
{
$req
->
setPageNo
(
$this
->
param
[
'page_no'
]);
}
if
(
isset
(
$this
->
param
[
'page_size'
]))
{
$req
->
setPageSize
(
$this
->
param
[
'page_size'
]);
}
if
(
isset
(
$this
->
param
[
'relation_app'
]))
{
$req
->
setRelationApp
(
$this
->
param
[
'relation_app'
]);
}
if
(
isset
(
$this
->
param
[
'special_id'
]))
{
$req
->
setSpecialId
(
$this
->
param
[
'special_id'
]);
}
if
(
isset
(
$this
->
param
[
'external_id'
]))
{
$req
->
setExternalId
(
$this
->
param
[
'external_id'
]);
}
$this
->
output
=
$c
->
execute
(
$req
,
$sessionKey
);
return
$this
;
}
/**
* ( 淘宝客-公用-私域用户邀请码生成 )
* 私域用户管理(即渠道管理或会员运营管理)功能中,通过此API可生成淘宝客自身的邀请码。
* https://open.taobao.com/api.htm?docId=38046&docType=2&scopeId=14474
* @param $sessionKey
* @return $this
*/
public
function
tbkScInvitecodeGet
(
$sessionKey
):
self
{
$c
=
new
TopClient
();
$c
->
appkey
=
$this
->
app_key
;
...
...
@@ -79,7 +166,7 @@ class TaoBaoService extends Service
if
(
isset
(
$this
->
param
[
'code_type'
]))
{
$req
->
setCodeType
(
$this
->
param
[
'code_type'
]);
}
$
resp
=
$c
->
execute
(
$req
,
$sessionKey
);
$
this
->
output
=
$c
->
execute
(
$req
,
$sessionKey
);
return
$this
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录