Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
数据应用
ThinkLibrary
提交
c1cbca20
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 搜索 >>
提交
c1cbca20
编写于
7月 03, 2020
作者:
李光春
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
- 增加淘宝联盟获取官方物料API汇总
上级
25b19962
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
285 addition
and
8 deletion
+285
-8
src/service/aliyun/OssService.php
src/service/aliyun/OssService.php
+1
-1
src/service/baidu/BosService.php
src/service/baidu/BosService.php
+1
-1
src/service/huaweicloud/ObsService.php
src/service/huaweicloud/ObsService.php
+1
-1
src/service/ksyun/Ks3Service.php
src/service/ksyun/Ks3Service.php
+1
-1
src/service/qiniu/KodoService.php
src/service/qiniu/KodoService.php
+1
-1
src/service/taobao/TbkService.php
src/service/taobao/TbkService.php
+277
-0
src/service/tencent/CosService.php
src/service/tencent/CosService.php
+1
-1
src/service/ucloud/UfileService.php
src/service/ucloud/UfileService.php
+1
-1
src/service/upyun/UssService.php
src/service/upyun/UssService.php
+1
-1
未找到文件。
src/service/aliyun/OssService.php
浏览文件 @
c1cbca20
...
...
@@ -82,7 +82,7 @@ class OssService extends Service
try
{
$ossClient
=
new
OssClient
(
$this
->
accessKeyId
,
$this
->
accessKeySecret
,
$this
->
endpoint
);
$ossClient
->
uploadFile
(
$this
->
bucket
,
$object
,
$filePath
);
return
$this
->
app
->
config
->
get
(
'dtapp.aliyun.oss.url'
)
.
$object
;
return
$this
->
app
->
config
->
get
(
'dtapp.aliyun.oss.url'
,
''
)
.
$object
;
}
catch
(
OssException
$e
)
{
return
$e
->
getMessage
();
}
...
...
src/service/baidu/BosService.php
浏览文件 @
c1cbca20
...
...
@@ -91,6 +91,6 @@ class BosService extends Service
// 从文件中直接上传Object
if
(
empty
(
$this
->
bucket
))
$this
->
getConfig
();
$client
->
putObjectFromFile
(
$this
->
bucket
,
$object
,
$filePath
);
return
$this
->
app
->
config
->
get
(
'dtapp.baidu.bos.url'
)
.
$object
;
return
$this
->
app
->
config
->
get
(
'dtapp.baidu.bos.url'
,
''
)
.
$object
;
}
}
src/service/huaweicloud/ObsService.php
浏览文件 @
c1cbca20
...
...
@@ -90,7 +90,7 @@ class ObsService extends Service
'SourceFile'
=>
$filePath
// localfile为待上传的本地文件路径,需要指定到具体的文件名
]);
if
(
isset
(
$resp
[
'RequestId'
]))
{
return
$this
->
app
->
config
->
get
(
'dtapp.huaweicloud.obs.url'
)
.
$object
;
return
$this
->
app
->
config
->
get
(
'dtapp.huaweicloud.obs.url'
,
''
)
.
$object
;
}
else
{
return
false
;
}
...
...
src/service/ksyun/Ks3Service.php
浏览文件 @
c1cbca20
...
...
@@ -101,7 +101,7 @@ class Ks3Service extends Service
];
try
{
$client
->
putObjectByFile
(
$args
);
return
$this
->
app
->
config
->
get
(
'dtapp.ksyun.ks3.url'
)
.
$object
;
return
$this
->
app
->
config
->
get
(
'dtapp.ksyun.ks3.url'
,
''
)
.
$object
;
}
catch
(
\
Ks3ServiceException
$e
)
{
return
false
;
}
...
...
src/service/qiniu/KodoService.php
浏览文件 @
c1cbca20
...
...
@@ -82,6 +82,6 @@ class KodoService extends Service
// 调用 UploadManager 的 putFile 方法进行文件的上传。
list
(
$ret
,
$err
)
=
$uploadMgr
->
putFile
(
$token
,
$object
,
$filePath
);
if
(
$err
!==
null
)
return
false
;
else
return
$this
->
app
->
config
->
get
(
'dtapp.qiniu.kodo.url'
)
.
$object
;
else
return
$this
->
app
->
config
->
get
(
'dtapp.qiniu.kodo.url'
,
''
)
.
$object
;
}
}
src/service/taobao/TbkService.php
浏览文件 @
c1cbca20
...
...
@@ -559,4 +559,281 @@ class TbkService extends Service
foreach
(
$this
->
param
as
$key
=>
$val
)
if
(
$key
!=
''
&&
$val
!=
''
)
$strParam
.
=
$key
.
'='
.
urlencode
(
$val
)
.
'&'
;
return
$strParam
;
}
/**
* 获取官方物料API汇总
* https://market.m.taobao.com/app/qn/toutiao-new/index-pc.html#/detail/10628875?_k=gpov9a
* @return array
*/
public
function
getMaterialIdList
()
{
return
[
[
'name'
=>
'相似推荐'
,
'list'
=>
[
[
'name'
=>
'相似推荐'
,
'material_id'
=>
13256
]
]
],
[
'name'
=>
'猜你喜欢'
,
'list'
=>
[
[
'name'
=>
'含全部商品'
,
'material_id'
=>
6708
],
[
'name'
=>
'营销商品库商品(此为具备“私域用户管理-会员运营管理功能”的媒体专用)'
,
'material_id'
=>
28017
]
]
],
[
'name'
=>
'好券直播'
,
'list'
=>
[
[
'name'
=>
'综合'
,
'material_id'
=>
3756
],
[
'name'
=>
'女装'
,
'material_id'
=>
3767
],
[
'name'
=>
'家居家装'
,
'material_id'
=>
3758
],
[
'name'
=>
'数码家电'
,
'material_id'
=>
3759
],
[
'name'
=>
'鞋包配饰'
,
'material_id'
=>
3762
],
[
'name'
=>
'美妆个护'
,
'material_id'
=>
3763
],
[
'name'
=>
'男装'
,
'material_id'
=>
3764
],
[
'name'
=>
'内衣'
,
'material_id'
=>
3765
],
[
'name'
=>
'母婴'
,
'material_id'
=>
3760
],
[
'name'
=>
'食品'
,
'material_id'
=>
3761
],
[
'name'
=>
'运动户外'
,
'material_id'
=>
3766
]
]
],
[
'name'
=>
'实时热销榜'
,
'list'
=>
[
[
'name'
=>
'综合'
,
'material_id'
=>
28026
],
[
'name'
=>
'大服饰'
,
'material_id'
=>
28029
],
[
'name'
=>
'大快消'
,
'material_id'
=>
28027
],
[
'name'
=>
'电器美家'
,
'material_id'
=>
28028
]
]
],
[
'name'
=>
'本地化生活'
,
'list'
=>
[
]
],
[
'name'
=>
'大额券'
,
'list'
=>
[
[
'name'
=>
'综合'
,
'material_id'
=>
27446
],
[
'name'
=>
'女装'
,
'material_id'
=>
27448
],
[
'name'
=>
'食品'
,
'material_id'
=>
27451
],
[
'name'
=>
'美妆个护'
,
'material_id'
=>
27453
],
[
'name'
=>
'家居家装'
,
'material_id'
=>
27798
],
[
'name'
=>
'母婴'
,
'material_id'
=>
27454
]
]
],
[
'name'
=>
'高佣榜'
,
'list'
=>
[
[
'name'
=>
'综合'
,
'material_id'
=>
13366
],
[
'name'
=>
'女装'
,
'material_id'
=>
13367
],
[
'name'
=>
'家居家装'
,
'material_id'
=>
13368
],
[
'name'
=>
'数码家电'
,
'material_id'
=>
13369
],
[
'name'
=>
'鞋包配饰'
,
'material_id'
=>
13370
],
[
'name'
=>
'美妆个护'
,
'material_id'
=>
13371
],
[
'name'
=>
'男装'
,
'material_id'
=>
13372
],
[
'name'
=>
'内衣'
,
'material_id'
=>
13373
],
[
'name'
=>
'母婴'
,
'material_id'
=>
13374
],
[
'name'
=>
'食品'
,
'material_id'
=>
13375
],
[
'name'
=>
'运动户外'
,
'material_id'
=>
13376
]
]
],
[
'name'
=>
'品牌券'
,
'list'
=>
[
]
],
[
'name'
=>
'猫超优质爆款'
,
'list'
=>
[
[
'name'
=>
'猫超1元购凑单'
,
'material_id'
=>
27162
],
[
'name'
=>
'猫超第二件0元'
,
'material_id'
=>
27161
],
[
'name'
=>
'猫超单件满减包邮'
,
'material_id'
=>
27160
],
]
],
[
'name'
=>
'聚划算单品爆款'
,
'list'
=>
[
[
'name'
=>
'开团热卖中'
,
'material_id'
=>
31371
],
[
'name'
=>
'预热'
,
'material_id'
=>
31370
],
]
],
[
'name'
=>
'天天特卖'
,
'list'
=>
[
[
'name'
=>
'开团热卖中'
,
'material_id'
=>
31362
],
]
],
[
'name'
=>
'母婴主题'
,
'list'
=>
[
[
'name'
=>
'备孕'
,
'material_id'
=>
4040
],
[
'name'
=>
'0至6个月'
,
'material_id'
=>
4041
],
[
'name'
=>
'4至6岁'
,
'material_id'
=>
4044
],
[
'name'
=>
'7至12个月'
,
'material_id'
=>
4042
],
[
'name'
=>
'1至3岁'
,
'material_id'
=>
4043
],
[
'name'
=>
'7至12岁'
,
'material_id'
=>
4045
],
]
],
[
'name'
=>
'潮流范'
,
'list'
=>
[
[
'name'
=>
'潮流范'
,
'material_id'
=>
4093
],
]
],
[
'name'
=>
'特惠'
,
'list'
=>
[
[
'name'
=>
'特惠'
,
'material_id'
=>
4094
],
]
],
];
}
}
src/service/tencent/CosService.php
浏览文件 @
c1cbca20
...
...
@@ -100,6 +100,6 @@ class CosService extends Service
'Body'
=>
$file
)
);
}
return
$this
->
app
->
config
->
get
(
'dtapp.tencent.cos.url'
)
.
$object
;
return
$this
->
app
->
config
->
get
(
'dtapp.tencent.cos.url'
,
''
)
.
$object
;
}
}
src/service/ucloud/UfileService.php
浏览文件 @
c1cbca20
...
...
@@ -44,6 +44,6 @@ class UfileService extends Service
{
list
(
$data
,
$err
)
=
UCloud_PutFile
(
$this
->
bucket
,
$object
,
$filePath
);
if
((
$err
))
return
false
;
return
$this
->
app
->
config
->
get
(
'dtapp.ucloud.ufile.url'
)
.
$object
;
return
$this
->
app
->
config
->
get
(
'dtapp.ucloud.ufile.url'
,
''
)
.
$object
;
}
}
src/service/upyun/UssService.php
浏览文件 @
c1cbca20
...
...
@@ -77,6 +77,6 @@ class UssService extends Service
$client
=
new
Upyun
(
$serviceConfig
);
$file
=
fopen
(
$filePath
,
'r'
);
$client
->
write
(
$object
,
$file
);
return
$this
->
app
->
config
->
get
(
'dtapp.upyun.uss.url'
)
.
$object
;
return
$this
->
app
->
config
->
get
(
'dtapp.upyun.uss.url'
,
''
)
.
$object
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录