获取到之后,第一步检查数据是否正确:
2.去除转义字符
3.掐头去尾,只保留<itemSchema>部分,同时去掉 id=“infos”的节点
4.最终可使用的更新xml实例如下:
<itemSchema> <field id="title" name="商品标题" type="input"> <rules> <rule name="tipRule" value="避免商品标题不符合行业规范引起的违规下架,请参照<a href="https://rule.fliggy.com/wow/z/pcraft/rules/search?spm=181.13979240.8532506920.5.1ce924243YHyz9&&domainfield=78&ruleId=11000866&type=content">度假商品发布规范标题相关规范</a>进行发布"/> <rule name="requiredRule" value="true"/> <rule name="maxLengthRule" value="60" exProperty="include" unit="byte"/> <rule name="valueTypeRule" value="text"/> </rules> <value>测试请不要拍-境内酒景套餐境内玩乐2小时确认发布成功</value> </field> <field id="lightspot" name="商品亮点" type="complex"> <rules> <rule name="tipRule" value="四条商品亮点展示在宝贝详情页,未来将展示到搜索列表及无线端列表,增加商品的吸引力。"/> </rules> <complex-value> <field id="subtitle2" type="input"> <value>测试请不要拍test-境内酒景套餐境内玩乐2小时确认发布成功</value> </field> <field id="subtitle3" type="input"> <value>测试请不要拍-境内酒景套餐境内玩乐2小时确认发布成功</value> </field> <field id="subtitle1" type="input"> <value>测试请不要拍-境内酒景套餐境内玩乐2小时确认发布成功</value> </field> <field id="subtitle4" type="input"> <value>测试请不要拍-境内酒景套餐境内玩乐2小时确认发布成功</value> </field> </complex-value> <fields> <field id="subtitle1" type="input"> <rules> <rule name="maxLengthRule" value="66" exProperty="include" unit="byte"/> <rule name="tipRule" value="亮点1"/> <rule name="valueTypeRule" value="text"/> </rules> <value>测试请不要拍-境内酒景套餐境内玩乐2小时确认发布成功</value> </field> <field id="subtitle2" type="input"> <rules> <rule name="maxLengthRule" value="66" exProperty="include" unit="byte"/> <rule name="tipRule" value="亮点2"/> <rule name="valueTypeRule" value="text"/> </rules> <value>测试请不要拍test-境内酒景套餐境内玩乐2小时确认发布成功</value> </field> <field id="subtitle3" type="input"> <rules> <rule name="maxLengthRule" value="66" exProperty="include" unit="byte"/> <rule name="tipRule" value="亮点3"/> <rule name="valueTypeRule" value="text"/> </rules> <value>测试请不要拍-境内酒景套餐境内玩乐2小时确认发布成功</value> </field> <field id="subtitle4" type="input"> <rules> <rule name="maxLengthRule" value="66" exProperty="include" unit="byte"/> <rule name="tipRule" value="亮点4"/> <rule name="valueTypeRule" value="text"/> </rules> <value>测试请不要拍-境内酒景套餐境内玩乐2小时确认发布成功</value> </field> </fields> </field> <field id="outerid" name="商家编码" type="input"> <rules> <rule name="maxLengthRule" value="64" exProperty="include" unit="byte"/> <rule name="valueTypeRule" value="text"/> </rules> <value>测试请不要拍-境内酒景套餐境内玩乐2小时确认发布成功</value> </field> <field id="images" name="商品图片" type="complex"> <rules> <rule name="tipRule" value="建议图片长宽比为1:1,图片大小在800px*800px以上"/> <rule name="tipRule" value="图片至少上传2张(第1张不计图片空间容量)。为避免主图不符合发布规范引起的商品违规处罚(下架、删除、降权、扣分、删除等),请参照<a href="//market.m.taobao.com/app/qn/toutiao-new/index-pc.html#/detail/10594299?_k=94szpd" target="_blank">规则</a>发布"/> <rule name="requiredRule" value="true"/> <rule name="tipRule" value="只能上传商家淘宝图片空间的图片链接,非淘宝图片空间链接可先使用api(即:https://open.taobao.com/api.htm?docId=140&docType=2&tb_eagleeyex_t=1)上传图片后获取对应的图片空间链接"/> </rules> <complex-value> <field id="images_1" type="input"> <value>https://img.alicdn.com/bao/uploaded/i1/263687635/O1CN012cTNRf26GsdI7pNxE_!!263687635.jpg</value> </field> <field id="images_0" type="input"> <value>https://img.alicdn.com/bao/uploaded/i4/6000000004372/O1CN01xnxgkw1iAQHMpqrzw_!!6000000004372-0-itemdesc.jpg</value> </field> </complex-value> <fields> <field id="images_0" name="宝贝主图" type="input"> <rules> <rule name="valueTypeRule" value="url"/> </rules> <value>https://img.alicdn.com/bao/uploaded/i4/6000000004372/O1CN01xnxgkw1iAQHMpqrzw_!!6000000004372-0-itemdesc.jpg</value> </field> <field id="images_1" name="商品图片" type="input"> <rules> <rule name="valueTypeRule" value="url"/> </rules> <value>https://img.alicdn.com/bao/uploaded/i1/263687635/O1CN012cTNRf26GsdI7pNxE_!!263687635.jpg</value> </field> <field id="images_2" name="商品图片" type="input"> <rules> <rule name="valueTypeRule" value="url"/> </rules> </field> <field id="images_3" name="商品图片" type="input"> <rules> <rule name="valueTypeRule" value="url"/> </rules> </field> <field id="images_4" name="商品图片" type="input"> <rules> <rule name="valueTypeRule" value="url"/> </rules> </field> </fields> </field> <field id="desc" name="电脑端描述" type="input"> <rules> <rule name="tipRule" value="请保持商品标题、主图、套餐、详情中信息描述一致。如出现任意描述不一致,平台将根据规则对商品和店铺进行处理。"/> <rule name="tipRule" value="<br/>"/> <rule name="requiredRule" value="true"/> <rule name="maxLengthRule" value="50000" exProperty="include" unit="byte"/> <rule name="valueTypeRule" value="text"/> </rules> <value><p>测试请不要拍-境内酒景套餐境内玩乐2小时确认发布成功 </p></value> </field> <field id="fliggyDestProp" name="目的地" type="complex"> <rules> <rule name="tipRule" value="请输入全线路所含目的地城市,有助于搜索曝光哦"/> <rule name="tipRule" value="<a href="https://www.yuque.com/docs/share/ac4a297f-2fcd-41b2-bea9-ec083fc98159" target="_blank" style="display:inline-block;margin-top:7px">申请添加目的地</a>"/> <rule name="requiredRule" value="true"/> </rules> <complex-value> <field id="fliggyDestProp-1" name="国内" type="input"> <value>上海:上海</value> </field> </complex-value> <fields> <field id="fliggyDestProp-1" name="国内" type="input"> <rules> <rule name="tipRule" value="境内地址格式 省:市,多个用逗号(,)隔开, 例子:浙江:杭州,上海:上海"/> </rules> <value>上海:上海</value> </field> </fields> </field> <field id="catProp" name="基本信息" type="complex"> <complex-value> <field id="p-157016590" name="主题玩法" type="singleCheck"> <value inputValue="自驾">42461448</value> </field> <field id="p-127692014" name="出游人群" type="singleCheck"> <value inputValue="情侣">47698</value> </field> </complex-value> <fields> <field id="p-127692014" name="出游人群" type="singleCheck"> <rules> <rule name="tipRule" value="请从其中选择一个最贴切的标签"/> </rules> <options> <option displayName="情侣" value="47698"/> <option displayName="朋友/同事" value="38839650"/> <option displayName="父母" value="118163"/> <option displayName="亲子" value="3373723"/> </options> </field> <field id="p-157016590" name="主题玩法" type="singleCheck"> <rules> <rule name="tipRule" value="请从其中选择一个最贴切的标签"/> <rule name="requiredRule" value="true"/> </rules> <options> <option displayName="自驾" value="42461448"/> <option displayName="乐园/公园" value="1078450518"/> <option displayName="美食" value="4508241"/> <option displayName="农家乐" value="6054961"/> <option displayName="度假村" value="17769577"/> <option displayName="海滨湖泊" value="1642018161"/> <option displayName="亲子" value="3373723"/> <option displayName="游船/邮船" value="1641967811"/> <option displayName="户外" value="3569102"/> <option displayName="滑雪" value="41661"/> <option displayName="潜水" value="41669"/> <option displayName="人文/赏景" value="1112664342"/> <option displayName="古镇游" value="558078639"/> <option displayName="登山" value="103411"/> <option displayName="禅修" value="79673757"/> <option displayName="都市游" value="79128652"/> <option displayName="骑行" value="12411023"/> <option displayName="徒步" value="103412"/> <option displayName="漂流" value="103416"/> <option displayName="露营" value="103415"/> <option displayName="攀岩" value="41660"/> <option displayName="踏青赏花" value="1642036009"/> <option displayName="展览" value="9480522"/> <option displayName="温泉" value="93352"/> <option displayName="游乐园" value="3250328"/> <option displayName="主题公园" value="17080817"/> </options> </field> </fields> </field> <field id="commonTripTime" name="行程天数" type="complex"> <rules> <rule name="requiredRule" value="true"/> </rules> <complex-value> <field id="commonTripTime#day" name="几天" type="singleCheck"> <value>1</value> </field> <field id="commonTripTime#night" name="几晚" type="singleCheck"> <value>0</value> </field> </complex-value> <fields> <field id="commonTripTime#day" name="几天" type="singleCheck"> <value>1</value> <options> <option displayName="1" value="1"/> <option displayName="2" value="2"/> <option displayName="3" value="3"/> <option displayName="4" value="4"/> <option displayName="5" value="5"/> <option displayName="6" value="6"/> <option displayName="7" value="7"/> <option displayName="8" value="8"/> <option displayName="9" value="9"/> <option displayName="10" value="10"/> </options> </field> <field id="commonTripTime#night" name="几晚" type="singleCheck"> <value>0</value> <options> <option displayName="0" value="0"/> <option displayName="1" value="1"/> <option displayName="2" value="2"/> <option displayName="3" value="3"/> <option displayName="4" value="4"/> <option displayName="5" value="5"/> <option displayName="6" value="6"/> <option displayName="7" value="7"/> <option displayName="8" value="8"/> <option displayName="9" value="9"/> <option displayName="10" value="10"/> <option displayName="11" value="11"/> <option displayName="12" value="12"/> <option displayName="13" value="13"/> <option displayName="14" value="14"/> <option displayName="15" value="15"/> <option displayName="16" value="16"/> <option displayName="17" value="17"/> <option displayName="18" value="18"/> <option displayName="19" value="19"/> <option displayName="20" value="20"/> <option displayName="21" value="21"/> <option displayName="22" value="22"/> <option displayName="23" value="23"/> <option displayName="24" value="24"/> <option displayName="25" value="25"/> <option displayName="26" value="26"/> <option displayName="27" value="27"/> <option displayName="28" value="28"/> <option displayName="29" value="29"/> <option displayName="30" value="30"/> </options> </field> </fields> </field> <field id="sellType" name="售卖方式" type="singleCheck"> <rules> <rule name="requiredRule" value="true"/> </rules> <value>1</value> <options> <option displayName="日历商品" value="1"/> <option displayName="普通商品" value="4"/> </options> </field> <field id="comfirmType" name="资源确认方式" type="complex"> <rules> <rule name="tipRule" value="即时确认定义:订单买家拍下付款即可按期顺利出行,无需卖家再确认。即时确认商品, 在商品描述中不得出现行程可能更改、价格可能变动、买家需要事先咨询商家出发日期等商品价格或行程不确定的信息。"/> <rule name="tipRule" value="二次确认订单在支付后需再次确认买家是否可出行,确认失败自动退款"/> </rules> <complex-value> <field id="comfirmTypeSelect" name="资源确认类型" type="singleCheck"> <value>secondComfirm</value> </field> <field id="comfirmTime" name="资源确认时长" type="singleCheck"> <value>2</value> </field> </complex-value> <fields> <field id="comfirmTypeSelect" name="资源确认类型" type="singleCheck"> <rules> <rule name="tipRule" value="当选中【二次确认】项值,请务必选择或输入【资源确认时长】项值"/> </rules> <value>secondComfirm</value> <options> <option displayName="即时确认" value="immediatelyComfirm"/> <option displayName="二次确认" value="secondComfirm"/> </options> </field> <field id="comfirmTime" name="资源确认时长" type="singleCheck"> <rules> <rule name="tipRule" value="工作小时指法定工作日的9:00-18:00。商品资源确认时长规则变动,请于2021年4月20日前完成商品整改,超时未整改将会被下架。规则如下:\n对于境内自由行和境内跟团游,从2021年4月6日起,1-3日行程必须2个工作小时内确认,3日及以上行程最长3个工作小时内确认。对于所有二次确认订单,周末及节假日最长24自然小时内确认。(参加大促的二次确认订单除外)"/> <rule name="requiredRule" value="true"> <depend-group operator="and"> <depend-express fieldId="comfirmTypeSelect" value="secondComfirm" symbol="=="/> </depend-group> </rule> <rule name="disableRule" value="true"> <depend-group operator="and"> <depend-express fieldId="comfirmTypeSelect" value="immediatelyComfirm" symbol="=="/> </depend-group> </rule> </rules> <value>2</value> <options> <option displayName="2 个工作小时内确认" value="2"/> <option displayName="3 个工作小时内确认" value="3"/> <option displayName="6 个工作小时内确认" value="6"/> <option displayName="9 个工作小时内确认" value="9"/> <option displayName="18 个工作小时内确认" value="18"/> </options> </field> </fields> </field> <field id="secondStartEndComboDate" name="可选出发日期" type="complex"> <rules> <rule name="tipRule" value="该日期将影响预约系统内可设置的预约日期,该日期不会展示在宝贝详情页,买家实际可选出发日期以预约系统内维护的可约日期为准。"/> <rule name="tipRule" value="yyyy-MM-dd"/> <rule name="tipRule" value="开始日期:2021-05-17"/> <rule name="tipRule" value="结束日期:2022-05-17"/> <rule name="requiredRule" value="true"> <depend-group operator="and"> <depend-express fieldId="sellType" value="4" symbol="!="/> </depend-group> </rule> <rule name="disableRule" value="false"> <depend-group operator="and"> <depend-express fieldId="sellType" value="4" symbol="!="/> </depend-group> </rule> <rule name="requiredRule" value="false"> <depend-group operator="and"> <depend-express fieldId="sellType" value="4" symbol="=="/> </depend-group> </rule> <rule name="disableRule" value="true"> <depend-group operator="and"> <depend-express fieldId="sellType" value="4" symbol="=="/> </depend-group> </rule> <rule name="disableRule" value="false"> <depend-group operator="and"> <depend-express fieldId="sellType" value="1" symbol="=="/> </depend-group> </rule> <rule name="disableRule" value="false"> <depend-group operator="and"> <depend-express fieldId="sellType" value="2" symbol="=="/> </depend-group> </rule> <rule name="disableRule" value="true"> <depend-group operator="and"> <depend-express fieldId="sellType" value="4" symbol="=="/> </depend-group> </rule> </rules> <complex-value> <field id="secondStartEndComboDate_end" type="input"> <value>2021-07-03</value> </field> <field id="secondStartEndComboDate_start" type="input"> <value>2021-06-16</value> </field> </complex-value> <fields> <field id="secondStartEndComboDate_start" name="开始时间" type="input"> <rules> <rule name="valueTypeRule" value="date"/> </rules> </field> <field id="secondStartEndComboDate_end" name="结束时间" type="input"> <rules> <rule name="valueTypeRule" value="date"/> </rules> </field> </fields> </field> <field id="duration" name="提前报名天数" type="input"> <rules> <rule name="tipRule" value="<span style="display: inline-block;margin-top: 7px">设置0表示当天预定当天可以出发,设置1表示必须提前一天预定即可第二天出发</span>"/> <rule name="requiredRule" value="true"/> <rule name="valueTypeRule" value="integer"/> </rules> <value>0</value> </field> <field id="orderDeadLine" name="最晚收客时间" type="complex"> <rules> <rule name="requiredRule" value="true"/> </rules> <complex-value> <field id="orderDeadLine#hour" name="时" type="singleCheck"> <value>23</value> </field> <field id="orderDeadLine#minute" name="分" type="singleCheck"> <value>00</value> </field> </complex-value> <fields> <field id="orderDeadLine#hour" name="时" type="singleCheck"> <value>23</value> <options> <option displayName="00" value="00"/> <option displayName="01" value="01"/> <option displayName="02" value="02"/> <option displayName="03" value="03"/> <option displayName="04" value="04"/> <option displayName="05" value="05"/> <option displayName="06" value="06"/> <option displayName="07" value="07"/> <option displayName="08" value="08"/> <option displayName="09" value="09"/> <option displayName="10" value="10"/> <option displayName="11" value="11"/> <option displayName="12" value="12"/> <option displayName="13" value="13"/> <option displayName="14" value="14"/> <option displayName="15" value="15"/> <option displayName="16" value="16"/> <option displayName="17" value="17"/> <option displayName="18" value="18"/> <option displayName="19" value="19"/> <option displayName="20" value="20"/> <option displayName="21" value="21"/> <option displayName="22" value="22"/> <option displayName="23" value="23"/> </options> </field> <field id="orderDeadLine#minute" name="分" type="singleCheck"> <value>00</value> <options> <option displayName="00" value="00"/> <option displayName="05" value="05"/> <option displayName="10" value="10"/> <option displayName="15" value="15"/> <option displayName="20" value="20"/> <option displayName="25" value="25"/> <option displayName="30" value="30"/> <option displayName="35" value="35"/> <option displayName="40" value="40"/> <option displayName="45" value="45"/> <option displayName="50" value="50"/> <option displayName="55" value="55"/> </options> </field> </fields> </field> <field id="bookTips" name="预订须知" type="input"> <rules> <rule name="tipRule" value="1、商品如有预订限制(包括但不限于国籍等),需明确说明,如未明确说明而导致订单加价、订单取消的损失由商家承担。"/> <rule name="tipRule" value="2、明确告知行程确认单的发送时间及发送方式。"/> <rule name="requiredRule" value="true"/> <rule name="maxLengthRule" value="3000" exProperty="include" unit="byte"/> <rule name="valueTypeRule" value="text"/> </rules> <value>测试请不要拍-境内酒景套餐境内玩乐2小时确认发布成功</value> </field> <field id="refundrule" name="取消政策" type="complex"> <rules> <rule name="tipRule" value="如需要在自定义模块对退改政策进行描述,请务必保持与取消政策模块保持一致,违规发布将依据规则进行处置。"/> <rule name="requiredRule" value="true"/> </rules> <complex-value> <field id="refundType" type="input"> <value>7</value> </field> <field id="balanceRefundValue" type="multiComplex"> <complex-values> <field id="firstTime" type="input"> <value>00:00</value> </field> <field id="secondTime" type="input"> <value>00:00</value> </field> <field id="firstDay" type="input"> <value>3</value> </field> <field id="sellerPercent" type="input"> <value>11</value> </field> <field id="format" type="input"> <value>HH:mm</value> </field> <field id="secondDay" type="input"> <value>-1</value> </field> <field id="percent" type="input"> <value>11</value> </field> </complex-values> <complex-values> <field id="firstTime" type="input"> <value>00:00</value> </field> <field id="secondTime" type="input"> <value>00:00</value> </field> <field id="firstDay" type="input"> <value>3</value> </field> <field id="sellerPercent" type="input"> <value>12</value> </field> <field id="format" type="input"> <value>HH:mm</value> </field> <field id="secondDay" type="input"> <value>0</value> </field> <field id="percent" type="input"> <value>12</value> </field> </complex-values> <complex-values> <field id="firstTime" type="input"> <value>00:00</value> </field> <field id="secondTime" type="input"> <value>00:00</value> </field> <field id="firstDay" type="input"> <value>0</value> </field> <field id="sellerPercent" type="input"> <value>13</value> </field> <field id="format" type="input"> <value>HH:mm</value> </field> <field id="secondDay" type="input"> <value>-1</value> </field> <field id="percent" type="input"> <value>13</value> </field> </complex-values> </field> </complex-value> <fields> <field id="refundType" name="退款类型" type="singleCheck"> <options> <option displayName="对等取消政策" value="7"/> </options> </field> <field id="balanceRefundValue" name="对等取消政策" type="multiComplex"> <rules> <rule name="disableRule" value="true"> <depend-group operator="and"> <depend-express fieldId="refundType" value="7" symbol="!="/> </depend-group> </rule> <rule name="tipRule" value="<li>订单生效后:</li>\n<li>若因<em class="em">买家原因</em>取消订单,买家按照以下标准支付违约费用;</li>\n<li>若因<em class="em">卖家原因</em>取消订单,商家不仅退回全款,同时按照以下标准向买家支付违约费用;</li>"/> <rule name="tipRule" value="<a target='_blank' href='https://www.yuque.com/docs/share/5af1030b-47b8-4d4c-a623-d61e15629f3a'>功能说明</a>"/> <rule name="tipRule" value="1、若上述表格约定的违约金,低于因商家取消订单导致买家产生的直接实际损失,商家须择一就高赔偿买家<br/>2、订单生效的规定以平台规则的相关规定为准。<br/>3、以上表格里提及的“日”指自然日,且为商品服务所在的当地时间为准。<br/>4、如发生商家已尽合理注意义务但仍不能避免的客观事件或不可抗力因素,导致商家取消订单的不属于商家原因。反之,买家亦然。"/> </rules> <fields> <field id="firstDay" name="出行前从几天" type="input"> <rules> <rule name="valueTypeRule" value="integer"/> </rules> </field> <field id="secondDay" name="出行前到几天" type="input"> <rules> <rule name="devTipRule" value="-1表示不限"/> <rule name="valueTypeRule" value="integer"/> </rules> </field> <field id="firstTime" name="从几点" type="input"> <rules> <rule name="valueTypeRule" value="text"/> </rules> </field> <field id="secondTime" name="到几点" type="input"> <rules> <rule name="valueTypeRule" value="text"/> </rules> </field> <field id="format" name="时间格式" type="input"> <rules> <rule name="valueTypeRule" value="text"/> </rules> </field> <field id="percent" name="买家违约收费总费用比例" type="input"> <rules> <rule name="valueTypeRule" value="integer"/> </rules> </field> <field id="sellerPercent" name="商家违约收费总费用比例" type="input"> <rules> <rule name="valueTypeRule" value="integer"/> </rules> </field> </fields> </field> <field id="holidayRefund" name="节假日退款条例" type="complex"> <rules> <rule name="tipRule" value="如果不存在特殊的节假日退款规则,可不写"/> <rule name="disableRule" value="true"> <depend-group operator="and"> <depend-express fieldId="refundType" value="7" symbol="!="/> </depend-group> </rule> </rules> <fields> <field id="percent" name="买家违约收费总费用比例" type="input"> <rules> <rule name="valueTypeRule" value="integer"/> </rules> </field> <field id="sellerPercent" name="商家违约收费总费用比例" type="input"> <rules> <rule name="valueTypeRule" value="integer"/> </rules> </field> </fields> </field> </fields> </field> <field id="location" name="所在地" type="input"> <rules> <rule name="requiredRule" value="true"/> <rule name="tipRule" value="参考飞猪平台发布页的选项,只需要写入最小行政区划名称即可,非飞猪平台发布页的选项不允许写入,如:杭州"/> </rules> <value>北京</value> </field> <field id="shopcat" name="宝贝分类" type="multiCheck"> <options> <option displayName="父分类-子1" value="1324814786"/> <option displayName="父分类-子2" value="1324814787"/> <option displayName="门票-方特" value="1237195639"/> <option displayName="门票-奥沙测试" value="1324815629"/> <option displayName="12222" value="1382551712"/> <option displayName="行李须知-国际行李" value="1380787989"/> <option displayName="行李须知-国内行李" value="1380787990"/> <option displayName="测试根节点" value="1326998099"/> <option displayName="dw-dwadaw" value="1380513083"/> </options> </field> <field id="shelfTime" name="上架时间" type="complex"> <complex-value> <field id="shelfScheduleTime" name="设定至" type="input"/> <field id="shelfTimeType" name="上架时间选项" type="singleCheck"> <value>2</value> </field> </complex-value> <fields> <field id="shelfTimeType" name="上架时间选项" type="singleCheck"> <rules> <rule name="requiredRule" value="当选项为【定时上架】,【设定至】field 值必须输入!"/> </rules> <value>2</value> <options> <option displayName="立刻上架" value="0"/> <option displayName="定时上架" value="1"/> <option displayName="放入仓库" value="2"/> </options> </field> <field id="shelfScheduleTime" name="设定至" type="input"> <rules> <rule name="tipRule" value="格式例子: yyyy-MM-dd HH:mm:ss"/> <rule name="requiredRule" value="true"> <depend-group operator="and"> <depend-express fieldId="shelfTimeType" value="1" symbol="=="/> </depend-group> </rule> </rules> </field> </fields> </field> <field id="subStock" name="库存计数" type="singleCheck"> <rules> <rule name="requiredRule" value="true"/> </rules> <value>0</value> <options> <option displayName="拍下减库存" value="1"/> <option displayName="付款减库存" value="0"/> </options> </field> <field id="hasDiscount" name="会员打折" type="singleCheck"> <value>0</value> <options> <option displayName="参与会员打折" value="1"/> <option displayName="不参与会员打折" value="0"/> </options> </field> <field id="secondKill" name="秒杀商品" type="multiCheck"> <rules> <rule name="tipRule" value="设置为秒杀商品后,每个消费者每次限购1件该商品。在商品参与秒杀活动期间,必须设为秒杀商品,以防止作弊。"/> </rules> <options> <option displayName="电脑用户" value="1"/> <option displayName="手机用户" value="2"/> </options> </field> <field id="needTravelPerson" name="出行人信息" type="singleCheck"> <rules> <rule name="tipRule" value="请在此处选择是否需要购买用户提供出行人信息,以便出行安排。<a target='blank' href='https://www.yuque.com/docs/share/82b369f5-04da-4e42-9ff8-40912d9e69a0'>详细说明点击查看</a>"/> <rule name="requiredRule" value="true"/> </rules> <value>2</value> <options> <option displayName="需要" value="1"/> <option displayName="不需要" value="2"/> </options> </field> <field id="travelPerson" name="出行人模版" type="singleCheck"> <rules> <rule name="tipRule" value="<span style="color:#ff1818">参与二次预约的商品,将在用户预约出行时要求填写出行人信息,下单时无需填写</span>"/> <rule name="tipRule" value="设置不同模版,用户下单时或者下单之后可以提交相应的个人信息,方便信息采集。<a target='blank' href='https://www.yuque.com/docs/share/82b369f5-04da-4e42-9ff8-40912d9e69a0'>详细说明点击查看</a>"/> <rule name="requiredRule" value="true"> <depend-group operator="and"> <depend-express fieldId="needTravelPerson" value="1" symbol="=="/> </depend-group> </rule> <rule name="disableRule" value="false"> <depend-group operator="and"> <depend-express fieldId="needTravelPerson" value="1" symbol="=="/> </depend-group> </rule> <rule name="requiredRule" value="false"> <depend-group operator="and"> <depend-express fieldId="needTravelPerson" value="2" symbol="=="/> </depend-group> </rule> <rule name="disableRule" value="true"> <depend-group operator="and"> <depend-express fieldId="needTravelPerson" value="2" symbol="=="/> </depend-group> </rule> </rules> <options> <option displayName="酒景模板测试-ZQ" value="1326001"/> <option displayName="酒景套餐测试" value="1321001"/> </options> </field> <field id="feeNotInclude" name="费用不含" type="input"> <rules> <rule name="tipRule" value="1、包含酒店住宿的商品,如售价按2人入住一间计算,必须明确单房差的价格。若根据酒店所在国的规定,买家入住需支付额外费用(包括但不限于部分境外酒店需要交纳的税费等)的,必须明确说明。"/> <rule name="tipRule" value="2、明确描述行程中不包含的其他内容。"/> <rule name="requiredRule" value="true"/> <rule name="maxLengthRule" value="3000" exProperty="include" unit="byte"/> <rule name="valueTypeRule" value="text"/> </rules> <value>测试请不要拍-境内酒景套餐境内玩乐2小时确认发布成功</value> </field> <field id="playPrePackageInfo" name="套餐设置" type="multiComplex"> <complex-values> <field id="packageDesc" name="套餐说明" type="input"> <value>测试请不要拍-境内酒景套餐境内玩乐2小时确认发布成功</value> </field> <field id="playCalendarPrice" name="套餐库存" type="multiComplex"> <complex-values> <field id="date" type="input"> <value>2021-05-03</value> </field> <field id="manPrice" type="input"> <value>200</value> </field> <field id="childNum" type="input"> <value>5</value> </field> <field id="manNum" type="input"> <value>3</value> </field> <field id="diffPrice" type="input"> <value>600</value> </field> <field id="childPrice" type="input"> <value>400</value> </field> </complex-values> </field> <field id="outId" name="商家编码" type="input"> <value>121</value> </field> <field id="packageName" name="套餐名称" type="input"> <value>21</value> </field> <field id="normalSku" name="库存价格设置" type="complex"/> <field id="element" name="元素列表" type="multiComplex"> <complex-values> <field id="elementOutId" type="input"> <value>10009_10087_10000</value> </field> <field id="elementNum" type="input"> <value>1</value> </field> </complex-values> <complex-values> <field id="elementOutId" type="input"> <value>1qqq</value> </field> <field id="elementNum" type="input"> <value>1</value> </field> </complex-values> </field> </complex-values> <fields> <field id="packageName" name="套餐名称" type="input"> <rules> <rule name="tipRule" value="套餐名称不得包含意外险、单房差、补差价、单签证、单门票、单接送机、定制、儿童占床/不占床、即时确认、飞猪专线、咨询客服、日历等类似信息。"/> <rule name="requiredRule" value="true"/> <rule name="maxLengthRule" value="20" exProperty="include" unit="byte"/> <rule name="valueTypeRule" value="text"/> </rules> </field> <field id="outId" name="商家编码" type="input"> <rules> <rule name="maxLengthRule" value="60" exProperty="include" unit="byte"/> <rule name="valueTypeRule" value="text"/> </rules> </field> <field id="playCalendarPrice" name="套餐库存" type="multiComplex"> <rules> <rule name="tipRule" value="成人、儿童至少必填一项。"/> <rule name="disableRule" value="true"> <depend-group operator="and"> <depend-express fieldId="sellType" value="1" symbol="!="/> </depend-group> </rule> </rules> <fields> <field id="date" name="日期" type="input"> <rules> <rule name="valueTypeRule" value="date"/> </rules> </field> <field id="manPrice" name="成人价格" type="input"> <rules> <rule name="valueTypeRule" value="double"/> </rules> </field> <field id="manNum" name="成人库存" type="input"> <rules> <rule name="valueTypeRule" value="integer"/> </rules> </field> <field id="childPrice" name="儿童价格" type="input"> <rules> <rule name="valueTypeRule" value="double"/> </rules> </field> <field id="childNum" name="儿童库存" type="input"> <rules> <rule name="valueTypeRule" value="integer"/> </rules> </field> <field id="diffPrice" name="单人房差" type="input"> <rules> <rule name="valueTypeRule" value="double"/> </rules> </field> </fields> </field> <field id="normalSku" name="库存价格设置" type="complex"> <rules> <rule name="disableRule" value="true"> <depend-group operator="and"> <depend-express fieldId="sellType" value="4" symbol="!="/> </depend-group> </rule> </rules> <fields> <field id="diff" name="单房差" type="complex"> <fields> <field id="price" name="价格" type="input"> <rules> <rule name="valueTypeRule" value="double"/> </rules> </field> <field id="stock" name="库存" type="input"> <rules> <rule name="valueTypeRule" value="integer"/> </rules> </field> </fields> </field> <field id="adult" name="成人" type="complex"> <fields> <field id="price" name="价格" type="input"> <rules> <rule name="valueTypeRule" value="double"/> </rules> </field> <field id="stock" name="库存" type="input"> <rules> <rule name="valueTypeRule" value="integer"/> </rules> </field> </fields> </field> <field id="child" name="儿童" type="complex"> <fields> <field id="price" name="价格" type="input"> <rules> <rule name="valueTypeRule" value="double"/> </rules> </field> <field id="stock" name="库存" type="input"> <rules> <rule name="valueTypeRule" value="integer"/> </rules> </field> </fields> </field> </fields> </field> <field id="packageDesc" name="套餐说明" type="input"> <rules> <rule name="maxLengthRule" value="500" exProperty="include" unit="byte"/> <rule name="valueTypeRule" value="text"/> </rules> </field> <field id="element" name="元素列表" type="multiComplex"> <fields> <field id="elementOutId" name="元素的商家编码" type="input"> <rules> <rule name="valueTypeRule" value="text"/> </rules> </field> <field id="elementNum" name="绑定销售的元素份数" type="input"> <rules> <rule name="valueTypeRule" value="integer"/> </rules> </field> </fields> </field> </fields> </field> <field id="weeks" name="不可使用周期" type="multiCheck"> <rules> <rule name="requiredRule" value="false"> <depend-group operator="and"> <depend-express fieldId="sellType" value="1" symbol="=="/> </depend-group> </rule> <rule name="disableRule" value="true"> <depend-group operator="and"> <depend-express fieldId="sellType" value="1" symbol="=="/> </depend-group> </rule> <rule name="requiredRule" value="false"> <depend-group operator="and"> <depend-express fieldId="sellType" value="1" symbol="!="/> </depend-group> </rule> <rule name="disableRule" value="false"> <depend-group operator="and"> <depend-express fieldId="sellType" value="1" symbol="!="/> </depend-group> </rule> </rules> <options> <option displayName="周一" value="1"/> <option displayName="周二" value="2"/> <option displayName="周三" value="3"/> <option displayName="周四" value="4"/> <option displayName="周五" value="5"/> <option displayName="周六" value="6"/> <option displayName="周日" value="7"/> </options> </field> <field id="forbidUseTime" name="不可使用日期" type="multiComplex"> <rules> <rule name="requiredRule" value="false"> <depend-group operator="and"> <depend-express fieldId="sellType" value="1" symbol="=="/> </depend-group> </rule> <rule name="disableRule" value="true"> <depend-group operator="and"> <depend-express fieldId="sellType" value="1" symbol="=="/> </depend-group> </rule> <rule name="requiredRule" value="false"> <depend-group operator="and"> <depend-express fieldId="sellType" value="1" symbol="!="/> </depend-group> </rule> <rule name="disableRule" value="false"> <depend-group operator="and"> <depend-express fieldId="sellType" value="1" symbol="!="/> </depend-group> </rule> </rules> <fields> <field id="forbidUseTime_start" name="forbidUseTime开始时间" type="input"> <rules> <rule name="valueTypeRule" value="date"/> </rules> </field> <field id="forbidUseTime_end" name="forbidUseTime结束时间" type="input"> <rules> <rule name="valueTypeRule" value="date"/> </rules> </field> </fields> </field> <field id="hotelInvoice" name="发票" type="singleCheck"> <rules> <rule name="requiredRule" value="true"/> </rules> <value>1</value> <options> <option displayName="酒店提供" value="1"/> <option displayName="卖家提供" value="0"/> </options> </field> <field id="checkInTime" name="可入住日期" type="complex"> <rules> <rule name="tipRule" value="yyyy-MM-dd"/> <rule name="requiredRule" value="false"> <depend-group operator="and"> <depend-express fieldId="sellType" value="4" symbol="=="/> </depend-group> </rule> <rule name="disableRule" value="false"> <depend-group operator="and"> <depend-express fieldId="sellType" value="4" symbol="=="/> </depend-group> </rule> <rule name="requiredRule" value="false"> <depend-group operator="and"> <depend-express fieldId="sellType" value="4" symbol="!="/> </depend-group> </rule> <rule name="disableRule" value="true"> <depend-group operator="and"> <depend-express fieldId="sellType" value="4" symbol="!="/> </depend-group> </rule> </rules> <complex-value> <field id="checkInTime_end" type="input"> <value>2021-07-03</value> </field> <field id="checkInTime_start" type="input"> <value>2021-06-16</value> </field> </complex-value> <fields> <field id="checkInTime_start" name="开始时间" type="input"> <rules> <rule name="valueTypeRule" value="date"/> </rules> </field> <field id="checkInTime_end" name="结束时间" type="input"> <rules> <rule name="valueTypeRule" value="date"/> </rules> </field> </fields> </field> </itemSchema>
使用第一步get接口加工后的xml作为schema_xml_fields参数,可以完成测试
通过类目id获取该类目的商品发布模板
根据第三步获取到xml模板之后,操作第一步。然后在模板内添加以下信息(均为必填项):
1.商品图片url
2.电脑描述
3.行程天数
4.主题玩法
5.出游人群
6.售卖方式
7.预定须知
8.所在地
9.套餐设置(未设置会报:商品元素不能为空)
模板加工好之后,通过此接口请求添加即可,添加成功会返回商品id。