淘宝API接口(item_search_img-按图搜索淘宝商品)(拍立淘)

该博客介绍了如何使用淘宝API接口进行商品的图搜索,特别是拍立淘功能。用户可以注册并获取请求参数,通过API实现图片到商品的搜索匹配。响应参数和示例也进行了展示。

欢迎使用淘宝API接口(item_search_img-按图搜索淘宝商品)(拍立淘)

点击注册

请求参数:

响应参数:

响应示例:
 

{
 "real_total_results": 40,
		"error": "",
		"item": [
			{
				"title": "专业NBA精英篮球袜加厚毛巾底缓震高筒运动袜子 男士中筒精英袜",
				"pic_url": "//g-search2.alicdn.com/img/bao/uploaded/i4/TB2OmX0bYsTMeJjSszhXXcGCFXa_!!819836837.jpg",
				"promotion_price": "35.00",
				"price": "35.00",
				"sales": 0,
				"num_iid": "558055440807",
				"post_fee": "0.00",
				"sample_id": "",
				"seller_nick": "331855829qiu",
				"is_tmall": "false",
				"area": "福建 泉州",
				"detail_url": "//item.taobao.com/item.htm?id=558055440807",
				"cid": "50015374"
			},
			{
				"title": "专业篮球袜子男夏季长袜高筒中筒欧文詹姆斯运动袜精英袜毛巾底袜",
				"pic_url": "//g-search3.alicdn.com/img/bao/uploaded/i4/TB2Y7kJDQKWBuNjy1zjXXcOypXa_!!3537451756.jpg",
				"promotion_price": "42.00",
				"price": "42.00",
				"sales": 0,
				"num_iid": "573296192147",
				"post_fee": "0.00",
				"sample_id": "",
				"seller_nick": "潮流篮球袜",
				"is_tmall": "false",
				"area": "浙江 金华",
				"detail_url": "//item.taobao.com/item.htm?id=573296192147",
				"cid": "50017261"
			},
			{
				"title": "加厚长筒毛巾底袜子运动高帮篮球冬季扎裤角包邮买2送一",
				"pic_url": "//g-search2.alicdn.com/img/bao/uploaded/i4/O1CN01WmprpE1CofKp3Ytos_!!383810128.jpg",
				"promotion_price": "9.90",
				"price": "9.90",
				"sales": 2,
				"num_iid": "632139925050",
				"post_fee": "0.00",
				"sample_id": "",
				"seller_nick": "dz体育",
				"is_tmall": "false",
				"area": "安徽 池州",
				"detail_url": "//item.taobao.com/item.htm?id=632139925050",
				"cid": "50017261"
			},
			{
				"title": "篮球袜专业运动袜子男运动袜中帮筒防滑加厚毛巾底科比欧文精英袜",
				"pic_url": "//g-search2.alicdn.com/img/bao/uploaded/i4/O1CN01D560Lq1zyf278WneS_!!2201167936783.jpg",
				"promotion_price": "15.00",
				"price": "15.00",
				"sales": 0,
				"num_iid": "592783123833",
				"post_fee": "0.00",
				"sample_id": "",
				"seller_nick": "扬丰运动用品",
				"is_tmall": "false",
				"area": "广东 东莞",
				"detail_url": "//item.taobao.com/item.htm?id=592783123833",
				"cid": "50017261"
			},
			{
				"title": "UG竞赛级专业篮球袜子男中筒实战精英冠军高帮毛巾底吸汗运动长袜",
				"pic_url": "//g-search2.alicdn.com/img/bao/uploaded/i4/O1CN01rSho4D1moVMrKU8Yh_!!2206621405001.jpg",
				"promotion_price": "49.90",
				"price": "69.90",
				"sales": 0,
				"num_iid": "633317224235",
				"post_fee": "0.00",
				"sample_id": "",
				"seller_nick": "ugupgrade运动旗舰店",
				"is_tmall": "true",
				"area": "浙江 绍兴",
				"detail_url": "//detail.tmall.com/item.htm?id=633317224235",
				"cid": "50015374"
			},
			{
				"title": "全明星篮球袜男高帮加厚毛巾底中筒长筒精英篮球袜子男实战长袜子",
				"pic_url": "//g-search3.alicdn.com/img/bao/uploaded/i4/O1CN01sdU5na260qgiWZkYd_!!928347600.jpg",
				"promotion_price": "14.50",
				"price": "88.00",
				"sales": 0,
				"num_iid": "614032971479",
				"post_fee": "0.00",
				"sample_id": "",
				"seller_nick": "梦之队运动商城",
				"is_tmall": "false",
				"area": "上海",
				"detail_url": "//item.taobao.com/item.htm?id=614032971479",
				"cid": "50017261"
			},
			{
				"title": "IRI2代中筒篮球袜子男专业精英袜夏季四季球袜防滑毛巾加厚运动袜",
				"pic_url": "//g-search2.alicdn.com/img/bao/uploaded/i4/TB2giyVXaLN8KJjSZFKXXb7NVXa_!!2458928551.jpg",
				"promotion_price": "21.00",
				"price": "21.00",
				"sales": 13,
				"num_iid": "557236761067",
				"post_fee": "0.00",
				"sample_id": "",
				"seller_nick": "宜爱巧都市坊",
				"is_tmall": "false",
				"area": "浙江 金华",
				"detail_url": "//item.taobao.com/item.htm?id=557236761067",
				"cid": "50017261"
			},
			{
				"title": "袜子男中筒袜纯棉长袜潮街头比赛运动篮球袜潮牌秋冬季篮球精英袜",
				"pic_url": "//g-search3.alicdn.com/img/bao/uploaded/i4/O1CN0172x5y51q0oiohOr5F_!!727435434.jpg",
				"promotion_pri
<template> <div> <el-dialog v-model="visible" :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false" class="mydialog" > <el-tabs v-model="activeFunc" @tab-click="changeActive"> <el-tab-pane :label="$t('func.jobAnalysis.integratedPage_basicInfo')" name="1"> <BlockBasicInfo ref="blockBasicInfo" :map="map" :blockInfo="blockInfo" :dataScreen="true" /> </el-tab-pane> <el-tab-pane :label="$t('func.jobAnalysis.jobRecords')" name="2"> <BlockWorkInfo :blockInfo="blockInfo" dialogClass="screenSa" :dataScreen="true" v-if="activeFunc == '2'" /> </el-tab-pane> </el-tabs> <div @click="handleBack" class="back">{{ $t('commen.button.return') }}</div> </el-dialog> </div> </template> <script> import BlockBasicInfo from '@/views/ywIndex/blockInfo/BlockBasicInfo'; import BlockWorkInfo from '@/views/ywIndex/blockInfo/BlockWorkInfo'; import { blockDetail } from '@/api/plot'; export default { name: 'BlockInfoDialog', components: { BlockBasicInfo, BlockWorkInfo }, props: { map: Object }, data() { return { blockId: false, visible: false, loading: false, blockInfo: null, activeFunc: '1' }; }, computed: { width() { return this.activeFunc == '2' ? 1050 : 500; } }, watch: { blockId() { this.$refs.blockBasicInfo.clearABline(); this.$refs.blockBasicInfo.clearABText(); this.$refs.blockBasicInfo.functionName = this.$t('func.mapMode.abshow'); this.$refs.blockBasicInfo.abLineFature = null; } }, methods: { open(id) { this.activeFunc = '1'; this.blockId = id; this.visible = true; this.$nextTick(() => { this.$emit('widthChange', this.width); }); this.loading = true; blockDetail({ blockId: this.blockId }) .then((res) => { this.blockInfo = res.data.data; }) .catch((res) => { console.error(res); }) .finally(() => { this.loading = false; }); }, handleBack() { this.visible = false; }, close() { if (this.visible) { this.visible = false; this.$emit('widthChange', 0); } }, changeActive(item) { this.$nextTick(() => { this.$emit('widthChange', this.width); }); }, openedHandler() { if (this.$refs.blockWorkInfo?.resize) { this.$refs.blockWorkInfo.resize(); } }, closeHandler() { this.$emit('close'); } } }; </script> <style scoped lang="scss"> :deep(.mydialog ){ width: 98%; height: 86%; background-image: var(--theme-dataScreen_dialog_bg_full); background-size: 100% 100%; background-repeat: no-repeat; pointer-events: all; position: absolute; bottom: 20rem; left: 1%; overflow: hidden; padding: 20rem; .el-dialog__header { display: none; } .el-tabs__active-bar { background: #646f9eff; } .el-dialog__body { height: 100%; background: transparent; overflow: hidden; position: relative; .back { width: 100px; height: 42px; line-height: 42px; text-align: center; color: #d0d7ec; position: absolute; top: 0; right: 10px; background: var(--theme-screen_plot_checkbox_bg_color); border-radius: 4px; border: var(--theme-dataScreen_back_border); } .el-button--primary { background: rgba(134, 164, 255, 0.3); border-radius: 4px; border: 1rem solid #bbccff; color: #d0d7ec; } .el-tabs { height: 100%; } .el-tabs__content { height: calc(100% - 70rem); } .el-tab-pane { height: 100%; } .el-tabs__nav-wrap { margin-top: 8rem; } .el-descriptions__body, .page-singleStatistics, .el-table, .singleMachineInfo, .page-singleStatistics .data-box .charts-box .date-box, .page-singleStatistics .data-box .charts-box .table-box .card, .page-singleStatistics .data-box .data-label .label-item, .timeRule, .page-singleStatistics .data-box .data-label .label-item .img, .timeRule .timeRuleContainer .ruleSymbol .symbol, .el-tabs__item, .el-cascader__dropdown, .el-calendar, .page-singleStatistics .data-box .data-label .label-item .text .label-item-num, .el-radio-button__inner { background: transparent; color: white; } .el-cascader-menu { background: #151c29ff; } .main .bottom .rightMainMap .topLeft, .el-checkbox { color: #9ba1b2ff; } } .el-checkbox__input.is-checked + .el-checkbox__label, .main .bottom .rightMainMap .topLeft .lockContainer { color: white; } .year-box .monthContainer .month.active { border-top-color: #646f9eff; } .el-cascader .el-input.is-focus .el-input__inner, .el-input__inner:hover { border-color: #9ba1b2ff; } .el-checkbox__input.is-checked .el-checkbox__inner, .page-singleStatistics .data-box .charts-box .date-box[data-v-c5fe9bfa] .el-radio-button__orig-radio:checked + .el-radio-button__inner, [data-v-1ab050e6] .el-dialog .el-table .el-table__empty-text, [data-v-1ab050e6] .el-dialog .el-table thead, [data-v-1ab050e6] .el-dialog .el-table tr { background: var(--theme-dataScreen_input_inner); color: #d0d7ec; } .el-cascader__search-input { background: #272f40ff; } .el-table { margin-top: 10rem; height: calc(100% - 128rem); background: var(--theme-dataScreen_elTabs_header); color: #d0d7ec; overflow-y: auto; & tr, & thead, .el-table__empty-text { background: var(--theme-dataScreen_elTabs_header); color: #d0d7ec; } .el-table__row.statistics-warning-row { background: #272f40; } .el-table__row.default-row td.el-table__cell { background: #2a3243; } .el-table tbody tr:hover > td { background-color: #c0c4cc !important; color: #ffffff; } ::-webkit-scrollbar-thumb { border-radius: 10rem; -webkit-box-shadow: inset 0 0 10rem rgba(53, 116, 55, 0.2); background-color: var(--theme-dataScreen_chartandTable_active); } } .el-pagination { color: #d0d7ec; } .el-input__inner { background: var(--theme-dataScreen_input_bg_color)!important; color: #d8e5f7; outline: 1rem solid rgba(255, 255, 255, 0.4); } :deep(.el-pagination span:not([class*='suffix']) ){ color: rgba(208, 215, 236, 1); } :deep(.el-pagination__editor.el-input .el-input__inner ){ background: var(--theme-dataScreen_input_bg_color) !important; color: rgba(208, 215, 236, 1); border: 1rem solid var(--theme-dataScreen_input_border_color); } .el-input__inner, .el-pagination__jump, .el-range-input { background: var(--theme-dataScreen_input_bg_color) !important; color: #d0d7ec; } } :deep(.el-tabs__active-bar){ background: var(--theme-dataScreen_elTabs_active)!important; } :deep(.el-tabs__item.is-active){ color: var(--theme-dataScreen_elTabs_active_color)!important; } :deep(.el-table thead){ background: var(--theme-dataScreen_elTabs_header)!important; } </style> <style lang="scss"> .mapMode.screenSa { .cardHeader::before { background: var(--theme-dataScreen_cardHeader); } .leftFuncContainer .content { background: rgba(45, 59, 81, 0.2) !important; } .recordList { &::-webkit-scrollbar-thumb { background-color: var(--theme-dataScreen_chartandTable_active); } } .card { &.active { background: var(--theme-dataScreen_cardHeader_car_active); } .cardHeader .cardTitle { span:nth-of-type(1) { color: #d8e5f7 !important; } span:last-of-type { color: #8e94a5 !important; } } .cardContent .agType { span:first-of-type { color: #8e94a5 !important; } span:last-of-type { color: #d8e5f7 !important; } } } .legend { background: rgba(30, 45, 66, 1) !important; .legendTitle, .legendText { color: rgba(216, 229, 247, 1) !important; } .legendBorder { border-bottom-color: rgba(216, 229, 247, 0.2) !important; } .legendEdit .editContainer .legendContiner > div { .el-input-number { .el-input-number__decrease, .el-input-number__increase { color: var(--color_info) !important; } } & > .opButton { color: var(--color_info) !important; } } .legendEdit .editContainer .configContiner .el-form { .el-form-item__label { color: var(--color_info) !important; } .el-input-number { .el-input-number__decrease, .el-input-number__increase { color: var(--color_info) !important; } } .el-radio { color: var(--color_info) !important; } } } .machineSingleInfo { background: var(--theme-dataScreen_machineSingleInfo) !important; .machineSingleSelect .el-select__caret { color: var(--color_info) !important; } } :deep(.el-checkbox){ color:white!important; } :deep(.el-dialog .el-checkbox__input.is-checked .el-checkbox__inner){ background:green!important; } } :deep(.el-tabs__header){ position:absolute!important; top:20rem!important; left:20rem!important; } </style> 这段代码帮我修改成elementplus+vue2的写法,目前存在el-tabs__header is-top在el-tabs__content下方
最新发布
11-04
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值