Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
ruitu-fahuoyi-exension
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
廖健文
ruitu-fahuoyi-exension
Commits
5919c7e2
Commit
5919c7e2
authored
Mar 18, 2024
by
刘燕芳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save
parent
2e9e01f8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
801 additions
and
37 deletions
+801
-37
index.ts
src/background/index.ts
+28
-19
bookingV2.ts
src/content/bookingV2.ts
+315
-11
index.ts
src/content/index.ts
+2
-2
index.tsx
src/popup/components/WayBillModel/index.tsx
+11
-1
index.ts
src/types/index.ts
+445
-4
No files found.
src/background/index.ts
View file @
5919c7e2
import
{
Tabs
}
from
"antd"
;
import
{
Tabs
}
from
"antd"
;
import
{
factoryContentUrls
,
bookingV2Urls
,
homeUrl
,
tmIssueUrl
,
tbIssueUrl
,
tbIssueUrls
}
from
"../config"
;
import
{
factoryContentUrls
,
bookingV2Urls
,
homeUrl
,
tmIssueUrl
,
tbIssueUrl
,
tbIssueUrls
}
from
"../config"
;
import
{
StartPrint
,
Print
,
ACTION
}
from
"../types"
;
import
{
ACTION
}
from
"../types"
;
const
tmNameSiffix
=
[
'旗舰店'
,
'专卖店'
,
'专营店'
]
const
tmNameSiffix
=
[
'旗舰店'
,
'专卖店'
,
'专营店'
]
// platform: PlatformCode,// 平台编码,淘系及其他平台订单模板的为0,拼多多订单的为1,京东订单的为2
// platform: PlatformCode,// 平台编码,淘系及其他平台订单模板的为0,拼多多订单的为1,京东订单的为2
const
PlatfromsMap
=
new
Map
([
const
PlatfromsMap
=
new
Map
([
...
@@ -13,49 +13,58 @@ let monitoringRemoveTabId = new Map();
...
@@ -13,49 +13,58 @@ let monitoringRemoveTabId = new Map();
let
result_sendResponse
:
boolean
=
false
let
result_sendResponse
:
boolean
=
false
let
tb_user
:
any
=
{}
let
tb_user
:
any
=
{}
let
taIssueId
:
any
=
null
let
taIssueId
:
any
=
null
chrome
.
runtime
.
onMessage
.
addListener
(
async
function
(
message
,
sender
,
sendResponse
)
{
chrome
.
runtime
.
onMessage
.
addListener
(
function
(
message
,
sender
,
sendResponse
)
{
console
.
log
(
'message'
,
message
);
// console.log('message1',message,sender
);
if
(
message
.
action
===
ACTION
.
task
)
{
if
(
message
.
action
===
ACTION
.
task
)
{
if
(
JSON
.
stringify
(
tb_user
)
===
"{}"
)
{
if
(
JSON
.
stringify
(
tb_user
)
===
"{}"
)
{
chrome
.
storage
.
sync
.
set
({
"info"
:
'当前千牛登录账号信息获取失败'
})
chrome
.
storage
.
sync
.
set
({
"info"
:
'当前千牛登录账号信息获取失败'
})
console
.
log
(
111
);
sendResponse
({
status
:
-
200
,
task_id
:
message
.
value
.
task_id
,
msg
:
"当前千牛登录账号信息获取失败,请登录千牛账号后重试!"
});
sendResponse
({
status
:
-
200
,
task_id
:
message
.
value
.
task_id
,
msg
:
"当前千牛登录账号信息获取失败,请登录千牛账号后重试!"
});
return
true
return
true
}
else
{
}
else
{
chrome
.
storage
.
sync
.
remove
(
"info"
)
chrome
.
storage
.
sync
.
remove
(
"info"
)
if
(
message
.
value
.
seller
.
seller_name
!==
tb_user
.
userNick
){
if
(
message
.
value
.
seller
.
seller_name
!==
tb_user
.
userNick
){
chrome
.
storage
.
sync
.
set
({
"info"
:
'当前登录的千牛账号与图动力授权的账号信息不一致,请统一登录后重试!'
})
chrome
.
storage
.
sync
.
set
({
"info"
:
'当前登录的千牛账号与图动力授权的账号信息不一致,请统一登录后重试!'
})
console
.
log
(
222
);
sendResponse
({
status
:
-
200
,
task_id
:
message
.
value
.
task_id
,
msg
:
"当前登录的千牛账号与图动力授权的账号信息不一致,请统一登录后重试!"
});
sendResponse
({
status
:
-
200
,
task_id
:
message
.
value
.
task_id
,
msg
:
"当前登录的千牛账号与图动力授权的账号信息不一致,请统一登录后重试!"
});
return
true
return
true
}
}
}
}
chrome
.
tabs
.
query
({
chrome
.
tabs
.
query
({
url
:
tbIssueUrls
url
:
tbIssueUrls
},
async
function
(
tabs
)
{
},
function
(
tabs
)
{
// 如果图动力登录的账号和千牛云登录的账号不一致,则popup页面爆红
// 如果图动力登录的账号和千牛云登录的账号不一致,则popup页面爆红
console
.
log
(
'tabs'
,
tabs
);
console
.
log
(
'tabs'
,
tabs
);
tabs
&&
tabs
.
forEach
(
tab
=>
{
tabs
&&
tabs
.
forEach
(
tab
=>
{
// chrome.tabs.sendMessage(tab.id!, message)
chrome
.
tabs
.
update
(
tab
.
id
!
,
{
active
:
true
},
function
(
tab1
)
{});
chrome
.
tabs
.
update
(
tab
.
id
!
,
{
active
:
true
},
function
(
tab1
)
{});
chrome
.
tabs
.
sendMessage
(
tab
.
id
!
,
{
action
:
ACTION
.
task
,
value
:
message
.
value
},
res
=>
{
chrome
.
tabs
.
sendMessage
(
tab
.
id
!
,
{
action
:
ACTION
.
task
,
value
:
message
.
value
},
res
=>
{
console
.
log
(
'res'
,
res
);
console
.
log
(
'res'
,
res
,
new
Date
().
getTime
()
);
if
(
res
){
if
(
res
){
console
.
log
(
3333
);
sendResponse
(
res
);
sendResponse
(
res
);
chrome
.
tabs
.
update
(
sender
.
tab
!
.
id
!
,
{
active
:
true
},
function
(
tab1
)
{});
chrome
.
tabs
.
update
(
sender
.
tab
!
.
id
!
,
{
active
:
true
},
function
(
tab1
)
{});
}
}
})
})
})
})
if
(
tabs
.
length
==
0
){
if
(
tabs
.
length
==
0
){
console
.
log
(
444
);
sendResponse
({
status
:
-
200
,
task_id
:
message
.
value
.
task_id
,
msg
:
"请打开千牛商家工作台"
});
sendResponse
({
status
:
-
200
,
task_id
:
message
.
value
.
task_id
,
msg
:
"请打开千牛商家工作台"
});
alert
(
'请打开千牛商家工作台'
)
alert
(
'请打开千牛商家工作台'
)
}
}
})
})
}
else
if
(
message
.
action
===
'getUserLoginData'
){
}
else
if
(
message
.
action
===
'getUserLoginData'
){
console
.
log
(
2222
);
getUserLoginData
()
let
awaitResultFun
=
()
=>
{
await
getUserLoginData
()
if
(
result_sendResponse
){
sendResponse
()
sendResponse
()
}
else
{
setTimeout
(()
=>
{
awaitResultFun
()
},
500
);
}
}
awaitResultFun
()
}
}
return
true
;
return
true
;
})
})
chrome
.
tabs
.
onUpdated
.
addListener
(
async
(
tabId
,
changeInfo
,
tab
)
=>
{
chrome
.
tabs
.
onUpdated
.
addListener
(
async
(
tabId
,
changeInfo
,
tab
)
=>
{
...
@@ -80,11 +89,17 @@ chrome.tabs.onUpdated.addListener(async (tabId, changeInfo, tab) => {
...
@@ -80,11 +89,17 @@ chrome.tabs.onUpdated.addListener(async (tabId, changeInfo, tab) => {
result_sendResponse
=
true
;
result_sendResponse
=
true
;
return
return
};
};
// taIssueId&&chrome.tabs.remove(taIssueId)
chrome
.
tabs
.
query
({
chrome
.
tabs
.
query
({
url
:[
tbIssueUrl
]
url
:[
tbIssueUrl
]
},
async
function
(
tabs
)
{
},
async
function
(
tabs
)
{
console
.
log
(
tabs
);
console
.
log
(
'tabs'
,
tabs
);
if
(
!
tabs
.
length
||
(
tabs
.
length
&&!
monitoringRemoveTabId
.
has
(
tabs
[
0
].
id
))){
let
complete_tabs
:
any
=
[]
if
(
tabs
.
length
){
complete_tabs
=
tabs
.
filter
(
item
=>
item
.
status
===
'complete'
)
}
console
.
log
(
'complete_tabs'
,
complete_tabs
);
if
(
!
complete_tabs
.
length
){
taIssueId
=
await
createTab
(
tbIssueUrl
);
taIssueId
=
await
createTab
(
tbIssueUrl
);
}
}
})
})
...
@@ -121,7 +136,6 @@ chrome.tabs.onUpdated.addListener(async (tabId, changeInfo, tab) => {
...
@@ -121,7 +136,6 @@ chrome.tabs.onUpdated.addListener(async (tabId, changeInfo, tab) => {
// }
// }
let
id
:
any
=
tab
.
id
let
id
:
any
=
tab
.
id
result_sendResponse
=
true
;
result_sendResponse
=
true
;
console
.
log
(
4444
);
}
else
{
}
else
{
console
.
log
(
5555
);
console
.
log
(
5555
);
}
}
...
@@ -138,14 +152,9 @@ async function getUserLoginData(){
...
@@ -138,14 +152,9 @@ async function getUserLoginData(){
result_sendResponse
=
false
result_sendResponse
=
false
monitoringRemoveTabId
.
clear
()
monitoringRemoveTabId
.
clear
()
console
.
log
(
'taIssueId'
,
taIssueId
);
console
.
log
(
'taIssueId'
,
taIssueId
);
taIssueId
&&
chrome
.
tabs
.
remove
(
taIssueId
);
taIssueId
&&
chrome
.
tabs
.
remove
(
taIssueId
);
let
tabId
=
await
createTab
(
homeUrl
);
let
tabId
=
await
createTab
(
homeUrl
);
monitoringRemoveTabId
.
set
(
tabId
,
""
);
monitoringRemoveTabId
.
set
(
tabId
,
""
);
await
newTab
()
return
new
Promise
<
void
>
((
resolve
,
reject
)
=>
{
resolve
()
})
}
}
function
newTab
(){
function
newTab
(){
return
new
Promise
<
void
>
((
resolve
,
reject
)
=>
{
return
new
Promise
<
void
>
((
resolve
,
reject
)
=>
{
...
...
src/content/bookingV2.ts
View file @
5919c7e2
import
{
bookingV2Urls
,
tbIssueUrl
}
from
"../config"
;
import
{
bookingV2Urls
,
tbIssueUrl
}
from
"../config"
;
import
axios
from
'axios'
import
axios
from
'axios'
import
{
default_tbEnsureIssueJsonV2
,
default_tbIssueJsonDataV2
}
from
"../types"
;
let
tbEnsureIssueJsonV2
=
default_tbEnsureIssueJsonV2
let
tbIssueJsonDataV2
:
any
;
let
goodsData
:
any
;
async
function
booking
(
info
:
any
)
{
async
function
booking
(
info
:
any
)
{
let
default_info
=
JSON
.
parse
(
info
.
goods
)
const
data
=
{
catId
:
default_info
.
catId
,
jsonBody
:
JSON
.
stringify
(
default_info
)}
let
userData
:
any
=
await
getStorageItem
(
"tb_user"
)
let
userData
:
any
=
await
getStorageItem
(
"tb_user"
)
let
reqMsg
=
{
let
reqMsg
=
{
msg
:
''
,
msg
:
''
,
status
:
-
200
,
status
:
-
200
,
task_id
:
info
.
task_id
task_id
:
info
.
task_id
,
action
:
'task_result'
};
};
if
(
!
userData
){
if
(
!
userData
){
reqMsg
.
msg
=
"请刷新连接"
;
reqMsg
.
msg
=
"请刷新连接"
;
return
reqMsg
return
reqMsg
}
}
let
goodsId
,
result
;
let
userDataJson
:
any
=
JSON
.
parse
(
userData
)
let
userDataJson
:
any
=
JSON
.
parse
(
userData
)
let
{
data
:
result
}
=
await
axios
.
post
(
'https://item.upload.taobao.com/sell/v2/submit.htm'
,
data
,
{
goodsId
=
await
tbGetIssueGoodsIdV2
(
userDataJson
,
goodsData
,
info
.
goods
);
headers
:
{
let
goods
=
info
.
goods
.
replaceAll
(
'775011740120'
,
goodsId
)
'Content-Type'
:
'application/x-www-form-urlencoded'
,
let
default_info
=
JSON
.
parse
(
goods
)
'Accept'
:
'application/json'
,
tbIssueJsonDataV2
=
default_info
'x-xsrf-token'
:
userDataJson
.
token
result
=
await
tbDataJoinAndIssueV2
(
userDataJson
,
goodsData
,
goodsId
);
}
// let {data:result} = await axios.post('https://item.upload.taobao.com/sell/v2/submit.htm', data, {
})
// headers: {
// 'Content-Type': 'application/x-www-form-urlencoded',
// 'Accept':'application/json',
// 'x-xsrf-token': userDataJson.token
// }
// })
let
rJson
=
result
let
rJson
=
result
try
{
try
{
if
(
rJson
.
hasOwnProperty
(
"ret"
))
{
if
(
rJson
.
hasOwnProperty
(
"ret"
))
{
...
@@ -81,12 +90,307 @@ function delayDate(time: number) {
...
@@ -81,12 +90,307 @@ function delayDate(time: number) {
},
time
)
},
time
)
})
})
}
}
async
function
openVerifyTab
(
url
:
string
)
{
async
function
openVerifyTab
(
url
:
string
)
{
chrome
.
tabs
.
create
({
url
:
url
,
active
:
true
},
async
(
tab
)
=>
{
chrome
.
tabs
.
create
({
url
:
url
,
active
:
true
},
async
(
tab
)
=>
{
alert
(
"请手动完成系统自动打开的页面验证码操作!"
)
alert
(
"请手动完成系统自动打开的页面验证码操作!"
)
})
})
}
}
/**
* 设置商品的基础信息
* @param {商品发布的数据信息} goodsData
* @param {商品ID} goodsId
*/
function
setTbBaseDataV2
(
goodsData
:
any
,
goodsId
:
number
)
{
let
goodsDataV2
=
goodsData
.
data
;
let
goodsModel
=
goodsDataV2
.
goodsModel
;
let
userId
=
goodsDataV2
.
userId
;
tbIssueJsonDataV2
.
id
=
goodsId
;
//设置商品ID
tbIssueJsonDataV2
.
userId
=
goodsDataV2
.
userId
;
//设置用户ID
tbIssueJsonDataV2
.
tbExtractWay
.
template
=
goodsModel
.
postageId
+
""
;
//设置运费模板ID
tbIssueJsonDataV2
.
title
=
goodsModel
.
title
;
//设置标题
tbIssueJsonDataV2
.
price
=
goodsModel
.
price
;
//设置价格
tbIssueJsonDataV2
.
catProp
=
JSON
.
parse
(
goodsDataV2
.
specificParamToXytPlusParam
);
//设置类目属性
let
shelfProcessing
=
goodsDataV2
.
shelfProcessing
;
if
(
shelfProcessing
==
null
||
shelfProcessing
==
1
)
shelfProcessing
=
2
;
tbIssueJsonDataV2
.
startTime
.
type
=
shelfProcessing
;
//设置上架还是下架
let
shopCat
=
goodsModel
.
classifyId
;
//设置店铺分类信息
if
(
shopCat
!=
null
&&
shopCat
!=
undefined
&&
shopCat
!=
-
1
)
{
tbIssueJsonDataV2
.
shopcat
=
[
shopCat
];
}
else
{
tbIssueJsonDataV2
.
shopcat
=
[];
}
tbIssueJsonDataV2
.
outerId
=
goodsModel
.
outerId
;
//商品编码
tbIssueJsonDataV2
.
descRepublicOfSell
.
descPageRenderParam
.
userId
=
userId
;
tbIssueJsonDataV2
.
descRepublicOfSell
.
descPageRenderParam
.
itemId
=
goodsId
;
tbIssueJsonDataV2
.
descRepublicOfSell
.
descPageRenderModel
.
wholeConfigBO
.
userId
=
userId
;
tbIssueJsonDataV2
.
descRepublicOfSell
.
descPageRenderModel
.
extendConfig
.
wangpuEditorConfig
.
params
.
itemId
=
goodsId
;
//设置退换货承诺
let
sellPromise
=
goodsModel
.
expandParam
.
tbSJKTHHCN
;
if
(
sellPromise
)
{
tbIssueJsonDataV2
.
sellPromise
=
[{
text
:
"退换货承诺"
,
value
:
1
}];
}
}
/**
* 设置商品的图片信息
* @param {商品发布的数据信息} goodsData
* @param {商品ID} goodsId
*/
// function setTbImageV2(goodsData:any, goodsId: number) {
// let goodsModel = goodsData.data.goodsModel;
// let masterPics = goodsModel.masterPics;
// let descPics = goodsModel.descPics;
// let mp = [];
// let dp = [];
// masterPics.forEach(elem => {
// mp.push({ url: elem });
// });
// // tbIssueJsonDataV2.mainImagesGroup['mainImagesGroup-imageGroup'].images = mp;
// tbIssueJsonDataV2.images = mp;
// let descData = [];
// for (let i = 0; i < descPics.length; i++) {
// let elem = descPics[i];
// let componentId = "component" + randomLenNum(13);
// let groupId = "group" + randomLenNum(13);
// let descParam = {
// "reuseImg": false,
// "groupId": groupId,
// "imageUrls": [
// elem
// ],
// "originImg": true,
// "imageIds": [
// -1
// ],
// "width": 620,
// "size": 310241,
// "splitHeight": 960,
// "height": 961,
// }
// let copyDesc = $.extend(true, {}, tbDetailsPicJsonDataV2)
// copyDesc.componentId = componentId;
// copyDesc.groupId = groupId;
// let copyTbDetailsSonJsonDataV2 = $.extend(true, {}, TbDetailsSonJsonDataV2)
// copyTbDetailsSonJsonDataV2.boxStyle['background-image'] = elem;
// copyTbDetailsSonJsonDataV2.componentId = componentId;
// copyTbDetailsSonJsonDataV2.groupId = goodsId;
// copyDesc.components = [copyTbDetailsSonJsonDataV2];
// descData.push(copyDesc);
// descParam.imageUrls = [elem];
// dp.push(descParam);
// }
// tbDetailsJsonDataV2.groups = descData;
// let dpJson = {
// params: dp,
// }
// tbIssueJsonDataV2.descRepublicOfSell.descPageCommitParam.itemId = goodsId;
// tbIssueJsonDataV2.descRepublicOfSell.descPageCommitParam.userId = goodsData.data.userId;
// tbIssueJsonDataV2.descRepublicOfSell.descPageCommitParam.detailParam = JSON.stringify(dpJson)
// tbIssueJsonDataV2.descRepublicOfSell.descPageCommitParam.templateContent = JSON.stringify(tbDetailsJsonDataV2)
// let whiteImage = goodsModel.whitePic;
// //如果存在白底图就设置白底图的数据信息
// if (whiteImage !== null && whiteImage !== undefined && whiteImage != "") {
// tbIssueJsonDataV2.guideImageGroup.imageGroup.whiteBgImage = [{ url: whiteImage, pix: '800x800' }]
// } else {
// tbIssueJsonDataV2.guideImageGroup.imageGroup.whiteBgImage = [];
// }
// //3:4的方式上传主图
// if (goodsModel.masterLongPics != null && goodsModel.masterLongPics.length > 0) {
// tbIssueJsonDataV2.imageVideoType.text = "3:4";
// tbIssueJsonDataV2.imageVideoType.value = 1;
// let longMp = [];
// goodsModel.masterLongPics.forEach(elem => longMp.push({ url: elem }));
// tbIssueJsonDataV2.threeToFourImages = longMp;
// } else {
// delete tbIssueJsonDataV2['threeToFourImages'];
// tbIssueJsonDataV2.imageVideoType = {};
// }
// tbIssueJsonDataV2.sceneVideos.imageVideo.videoInfo = {};
// let videoId = goodsModel.videoInfo;
// //处理主图视频
// if (videoId != null && videoId != 0) {
// tbIssueJsonDataV2.sceneVideos.imageVideo.videoInfo.videoId = videoId;
// tbIssueJsonDataV2.sceneVideos.imageVideo.videoInfo.sceneCode = "imageVideo";
// let channelList = [];
// channelList.push({ code: "Detail", name: "详情" });
// channelList.push({ code: "MiniDetail", name: "微详情" });
// tbIssueJsonDataV2.sceneVideos.imageVideo.channelList = channelList;
// }
// }
/**
* 设置商品的SKU信息
* @param {商品发布的数据信息} goodsData
* @param {商品ID} goodsId
*/
// function setTbGoodsSkuV2(goodsData:any, goodsId: number) {
// let skuInfoModels = goodsData.data.goodsModel.skuInfoModels;
// let skuPropData = goodsData.data.skuPropData;
// let sku = [];
// skuInfoModels.forEach(item => {
// let skuJson = {
// cspuId: null,
// skuPrice: item.price,
// disabled: null,
// skuId: null,
// skuOuterId: item.outerId,
// skuStock: item.stockNum,
// action: { "selected": true },
// errorInfo: {},
// };
// let skuV = item.items;
// let props = [];
// let salePropKey = "";
// skuV.forEach(sItem => {
// let suProp = skuPropData[sItem.value];
// let pid = suProp.pid.replace("p-", "");
// let prop = {
// name: suProp.pid,
// label: sItem.alias,
// text: sItem.value,
// value: suProp.vid,
// }
// if (goodsData.data.product.product.productType == '双规格区分SKU图') {
// skuJson.skuPicture = [{ url: item.image }];
// }
// if (salePropKey != "") salePropKey = salePropKey + "_"
// salePropKey = salePropKey + pid + "-" + suProp.vid;
// props.push(prop);
// })
// skuJson.props = props;
// skuJson.salePropKey = salePropKey;
// sku.push(skuJson);
// })
// tbIssueJsonDataV2.sku = sku;
// }
// function setTbSalePropV2(goodsData:any, goodsId: number) {
// let skuInfoModels = goodsData.data.goodsModel.skuInfoModels;
// let skuPropData = goodsData.data.skuPropData;
// let saleProp = {};
// skuInfoModels.forEach(item => {
// let values = item.items;
// values.forEach(vItem => {
// let suProp = skuPropData[vItem.value];
// let pId = suProp.pid;
// let pVals = [];
// if (saleProp.hasOwnProperty(pId)) pVals = saleProp[pId];
// let pVal = {
// text: vItem.value,
// value: suProp.vid,
// };
// if ("p-1627207" == pId) {
// pVal.img = item.image;
// }
// let f = true;
// for (let k of pVals) {
// if (k.value == pVal.value) {
// f = false;
// break;
// }
// }
// if (f) {
// pVals.push(pVal);
// }
// saleProp[pId] = pVals;
// })
// })
// tbIssueJsonDataV2.saleProp = saleProp;
// }
async
function
tbDataJoinAndIssueV2
(
userData
:
any
,
goodsData
:
any
,
goodsId
:
number
)
{
// setTbBaseDataV2(goodsData, goodsId);
// setTbImageV2(goodsData, goodsId);
// setTbSalePropV2(goodsData, goodsId);
// setTbGoodsSkuV2(goodsData, goodsId);
console
.
log
(
'tbDataJoinAndIssueV2'
,
tbIssueJsonDataV2
,
goodsId
);
let
data
=
{
jsonBody
:
JSON
.
stringify
(
tbIssueJsonDataV2
),
catId
:
150704
,
//tbIssueJsonDataV2.catId,
itemId
:
goodsId
,
copyItemMode
:
0
}
let
{
data
:
result
}
=
await
axios
.
post
(
'https://item.upload.taobao.com/sell/v2/submit.htm'
,
data
,
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
,
'Accept'
:
'application/json'
,
'x-xsrf-token'
:
userData
.
token
}
})
return
result
;
}
/**
* 获取需要发布的商品ID
* 关联主图信息然后提交得到一个发布页的链接
* 访问发布页链接的数据获取商品ID信息
*
* @param {用户登录的信息} userData
* @param {发布的商品信息} goodsData
* @returns
*/
async
function
tbGetIssueGoodsIdV2
(
userData
:
any
,
goodsData
:
any
,
data
:
any
)
{
// let goodsModel = goodsData.data.goodsModel;
// let picPath = goodsModel.masterPics[0];
// let userId = goodsData.data.userId;
let
default_info
=
JSON
.
parse
(
data
)
tbEnsureIssueJsonV2
.
userId
=
default_info
.
userId
;
tbEnsureIssueJsonV2
.
catImages
=
[{
"url"
:
'https://img.alicdn.com/imgextra/i3/88897371/O1CN01wCaCGh24JyKxMRdkR_!!88897371.jpg_100x100'
}];
let
result
:
any
=
await
axios
.
post
(
"https://item.upload.taobao.com/sell/merge/submit.htm"
,{
jsonBody
:
JSON
.
stringify
(
tbEnsureIssueJsonV2
)
},
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
,
'Accept'
:
'application/json'
,
'x-xsrf-token'
:
userData
.
token
}
})
let
issueGoodsIdRd
=
result
.
data
console
.
log
(
'issueGoodsIdRd'
,
issueGoodsIdRd
);
let
link
=
"https:"
+
issueGoodsIdRd
.
link
;
let
{
data
:
goodsHtml
}:
any
=
await
axios
.
get
(
link
);
console
.
log
(
"goodsHtml"
,
goodsHtml
);
let
index
=
goodsHtml
.
indexOf
(
'data":{"itemId":'
);
let
startIndex
=
index
+
16
;
let
goodsId
=
goodsHtml
.
substring
(
startIndex
,
startIndex
+
12
);
return
goodsId
;
}
export
default
{
export
default
{
booking
booking
}
}
\ No newline at end of file
src/content/index.ts
View file @
5919c7e2
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
import
{
message
}
from
"antd"
;
import
{
message
}
from
"antd"
;
import
{
ACTION
,
Print
,
StartPrint
}
from
"../types"
;
import
{
ACTION
}
from
"../types"
;
import
BookingV2
from
"./bookingV2"
import
BookingV2
from
"./bookingV2"
type
Params
=
{
type
Params
=
{
...
@@ -29,7 +29,7 @@ window.addEventListener("message",function(message:any){
...
@@ -29,7 +29,7 @@ window.addEventListener("message",function(message:any){
//发货易页面
//发货易页面
chrome
.
runtime
.
onMessage
.
addListener
(
function
(
message
,
sender
,
response
)
{
chrome
.
runtime
.
onMessage
.
addListener
(
function
(
message
,
sender
,
response
)
{
console
.
log
(
"发货易页面"
,
message
);
console
.
log
(
"发货易页面"
,
message
,
sender
);
if
(
message
.
action
===
ACTION
.
task
)
{
if
(
message
.
action
===
ACTION
.
task
)
{
let
result
=
null
;
let
result
=
null
;
(
async
()
=>
{
(
async
()
=>
{
...
...
src/popup/components/WayBillModel/index.tsx
View file @
5919c7e2
...
@@ -41,7 +41,14 @@ const WayBillModel = function () {
...
@@ -41,7 +41,14 @@ const WayBillModel = function () {
}
}
})
})
},
[])
},
[])
const
delayDate
=
(
time
:
number
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
setTimeout
(()
=>
{
//console.log(‘开始执行‘)
resolve
(
'status'
)
},
time
)
})
}
useEffect
(()
=>
{
useEffect
(()
=>
{
getLogin
()
getLogin
()
...
@@ -82,6 +89,9 @@ const WayBillModel = function () {
...
@@ -82,6 +89,9 @@ const WayBillModel = function () {
initTime
++
initTime
++
getLogin
()
getLogin
()
chrome
.
runtime
.
sendMessage
({
action
:
'getUserLoginData'
},
async
()
=>
{
chrome
.
runtime
.
sendMessage
({
action
:
'getUserLoginData'
},
async
()
=>
{
console
.
log
(
111
,
new
Date
().
getTime
());
// await delayDate(1000)
// console.log(222,new Date().getTime());
let
userData
:
any
=
await
getStorageItem
(
"tb_user"
)
let
userData
:
any
=
await
getStorageItem
(
"tb_user"
)
console
.
log
(
'userData'
,
userData
,
new
Date
().
getMinutes
(),
new
Date
().
getSeconds
());
console
.
log
(
'userData'
,
userData
,
new
Date
().
getMinutes
(),
new
Date
().
getSeconds
());
if
(
userData
==
null
)
{
if
(
userData
==
null
)
{
...
...
src/types/index.ts
View file @
5919c7e2
...
@@ -7,9 +7,450 @@ export enum ACTION{
...
@@ -7,9 +7,450 @@ export enum ACTION{
task
=
"task"
,
task
=
"task"
,
}
}
interface
Data
{
[
propName
:
string
]
:
any
;
}
export
const
default_tbEnsureIssueJsonV2
:
Data
=
{
"categoryExtParams"
:
[
{
"name"
:
"spm"
,
"value"
:
"a21dvs.23580594.0.0.621e3d0dy8cHpr"
},
{
"name"
:
"fromSmart"
,
"value"
:
true
},
{
"name"
:
"newRouter"
,
"value"
:
1
}
],
"userId"
:
1807767805
,
"publishType"
:
{
"value"
:
"b"
,
"text"
:
"一口价"
},
"selectProp"
:
{},
"catImages"
:
[
{
"url"
:
"https://img.alicdn.com/imgextra/i1/1807767805/O1CN01mH8yVm27Wk6AajLn4_!!1807767805.jpg"
,
}
],
"category"
:
{
"id"
:
150704
,
"name"
:
"手机保护套/壳"
,
"idpath"
:
[
50008090
,
50024094
,
150704
],
"path"
:
[
"3C数码配件"
,
"手机配件"
,
"手机保护套/壳"
],
"leaf"
:
true
,
"publish"
:
true
,
"submitId"
:
150704
,
"empty"
:
false
}
}
export
let
default_tbIssueJsonDataV2
:
Data
=
{
"frontDataLog"
:
{
"identityId"
:
"general-taobao-100"
,
"mainCategoryId"
:
50008090
,
"fromSmart"
:
false
,
"traceId"
:
"21507f6216736822370025435eb1c8"
,
"newPublish"
:
true
},
"auctionType"
:
"b"
,
"sevenDayDefaultValue"
:
1
,
"id"
:
697122796700
,
"copyItemMode"
:
0
,
"spuMatch"
:
null
,
"croRule"
:
"{
\"
url
\"
:
\"
asyncOpt.htm?optType=croRuleAsyncCheck&catId=150704
\"
,
\"
input
\"
:[
\"
id
\"
,
\"
userId
\"
,
\"
catId
\"
,
\"
title
\"
,
\"
desc
\"
,
\"
descForShenbiPc
\"
,
\"
sku
\"
,
\"
price
\"
,
\"
catProp
\"
,
\"
saleProp
\"
,
\"
descType
\"
,
\"
shopping_title
\"
]}"
,
"afterSaleVideo_videoId"
:
null
,
"catSuggest"
:
{
"empty"
:
false
},
"fakeCreditSubmit"
:
false
,
"ifdWarningSubmit"
:
false
,
"riskWarningSubmit"
:
0
,
"feedbackSubmit_catErrorWarningSubmit"
:
0
,
"taobaoMarketTransform"
:
null
,
"taobaoMarketClean"
:
null
,
"snapshotId"
:
null
,
"showDraft"
:
1
,
"newDescVersion"
:
1
,
"descRepublicEnable"
:
1
,
"skyLightRule"
:
null
,
"recommendInfo"
:
null
,
"draftIdKey"
:
"dbDraftId"
,
"firstStartTime"
:
null
,
"itemdiagnoseInfo"
:
"{}"
,
"diagnoseInvokeId"
:
null
,
"diagnoseSource"
:
null
,
"aliColorEnable"
:
"p-1627207"
,
"mediaCenterEnable"
:
null
,
"newMaterialEnable"
:
"imageGroup,productManual,pureImage,whiteBgImage,verticalImage,sceneImages,threeToFourPureImage,threeToFourImageGroup-imageGroup,threeToFourImages,sceneVideos,mainImagesGroup-imageGroup,images,"
,
"catId"
:
150704
,
"userId"
:
1807767805
,
"stuffStatus"
:
{
"value"
:
5
},
"shopping_title"
:
[
{
"name"
:
"applicable_brand"
},
{
"name"
:
"applicable_mobile_model"
},
{
"name"
:
"material"
},
{
"name"
:
"manner"
},
{
"name"
:
"interest"
}
],
"catProp"
:
{
"p-20000"
:
{
"text"
:
"other/其他"
,
"value"
:
29534
},
"p-20000-21920"
:
{
"value"
:
-
1
,
"text"
:
"iphone"
},
"p-20608"
:
[
{
"value"
:
31755
,
"text"
:
"卡通"
}
],
"p-231100582"
:
"卡通流行"
},
"globalStock"
:
{
"value"
:
"globalStock_0"
},
"deliveryTimeType"
:
{
"value"
:
0
},
"sku"
:
[
{
"cspuId"
:
null
,
"skuPrice"
:
"99.00"
,
"disabled"
:
null
,
"skuId"
:
null
,
"skuStock"
:
110
,
"skuQuality"
:
{
"value"
:
"mainSku"
,
"text"
:
"单品"
,
"prefilled"
:
true
,
"prefilledText"
:
{
"bottom"
:
"请确认分类"
}
},
"action"
:
{
"selected"
:
true
},
"props"
:
[
{
"name"
:
"p-228680323"
,
"text"
:
"华为 Mate Xs 2"
,
"value"
:
"21397358634"
,
"label"
:
"适用手机型号"
},
{
"name"
:
"p-1627207"
,
"text"
:
"测试1"
,
"value"
:
-
682337435
,
"label"
:
"颜色分类"
}
],
"salePropKey"
:
"228680323-21397358634_1627207--682337435"
,
"errorInfo"
:
{}
},
{
"cspuId"
:
null
,
"skuPrice"
:
"99.00"
,
"disabled"
:
null
,
"skuId"
:
null
,
"skuStock"
:
110
,
"action"
:
{
"selected"
:
true
},
"props"
:
[
{
"name"
:
"p-228680323"
,
"text"
:
"华为 Mate Xs 2"
,
"value"
:
"21397358634"
,
"label"
:
"适用手机型号"
},
{
"name"
:
"p-1627207"
,
"text"
:
"测试2"
,
"value"
:
-
682340930
,
"label"
:
"颜色分类"
}
],
"salePropKey"
:
"228680323-21397358634_1627207--682340930"
,
"errorInfo"
:
{}
},
{
"cspuId"
:
null
,
"skuPrice"
:
"9.00"
,
"disabled"
:
null
,
"skuId"
:
null
,
"skuStock"
:
110
,
"skuQuality"
:
{
"value"
:
"mainSku"
,
"text"
:
"单品"
,
"prefilled"
:
true
,
"prefilledText"
:
{
"bottom"
:
"请确认分类"
}
},
"action"
:
{
"selected"
:
true
},
"props"
:
[
{
"name"
:
"p-228680323"
,
"text"
:
"华为 Mate 20 Lite"
,
"value"
:
"17547890070"
,
"label"
:
"适用手机型号"
},
{
"name"
:
"p-1627207"
,
"text"
:
"测试1"
,
"value"
:
-
682337435
,
"label"
:
"颜色分类"
}
],
"salePropKey"
:
"228680323-17547890070_1627207--682337435"
,
"errorInfo"
:
{}
},
{
"cspuId"
:
null
,
"skuPrice"
:
"99.00"
,
"disabled"
:
null
,
"skuId"
:
null
,
"skuStock"
:
110
,
"action"
:
{
"selected"
:
true
},
"props"
:
[
{
"name"
:
"p-228680323"
,
"text"
:
"华为 Mate 20 Lite"
,
"value"
:
"17547890070"
,
"label"
:
"适用手机型号"
},
{
"name"
:
"p-1627207"
,
"text"
:
"测试2"
,
"value"
:
-
682340930
,
"label"
:
"颜色分类"
}
],
"salePropKey"
:
"228680323-17547890070_1627207--682340930"
,
"errorInfo"
:
{}
}
],
"quantity"
:
"440"
,
"mainImagesGroup"
:
{
"mainImagesGroup-imageGroup"
:
{
"images"
:
[
{
"url"
:
"https://img.alicdn.com/imgextra/i3/1807767805/O1CN018cvRUU27Wk6OyuIcR_!!1807767805.jpg"
},
{
"url"
:
"https://img.alicdn.com/imgextra/i1/1807767805/O1CN0162GuJA27Wk6EJas8j_!!1807767805.jpg"
},
{
"url"
:
null
},
{
"url"
:
null
}
]
}
},
"imageVideoType"
:
{
"value"
:
1
},
"sceneVideos"
:
{
"imageVideo"
:
{
"videoInfo"
:
{},
"videoType"
:
"宝贝"
,
"channelList"
:
[]
},
"sceneVideo2"
:
{
"videoInfo"
:
{},
"channelList"
:
[]
},
"sceneVideo3"
:
{
"videoInfo"
:
{},
"channelList"
:
[]
}
},
"threeToFourImageGroup"
:
{
"threeToFourImageGroup-imageGroup"
:
{}
},
"guideImageGroup"
:
{
"imageGroup"
:
{}
},
"descRepublicOfSell"
:
{
"descPageCommitParam"
:
{
"opt"
:
2
,
"clientType"
:
1
,
"bizSource"
:
"sell"
,
"userId"
:
1807767805
,
"itemId"
:
697122796700
,
"templateId"
:
0
,
"version"
:
0
,
"freeTry"
:
0
,
"needServerComposite"
:
false
,
"batchPut"
:
false
,
"detailHeight"
:
2696
,
"params"
:
"params"
,
"maxHeight"
:
35000
,
"articleId"
:
0
,
"fliggyItem"
:
false
,
"newItem"
:
true
,
"sell"
:
false
,
"smart"
:
false
,
"changed"
:
true
,
"catId"
:
150704
,
"bseller"
:
false
,
"templateContent"
:
"{
\"
groups
\"
:[{
\"
type
\"
:
\"
group
\"
,
\"
hide
\"
:false,
\"
bizCode
\"
:0,
\"
propertyPanelVisible
\"
:true,
\"
level
\"
:1,
\"
boxStyle
\"
:{
\"
background-color
\"
:
\"
#ffffff
\"
,
\"
width
\"
:620,
\"
height
\"
:426},
\"
position
\"
:
\"
middle
\"
,
\"
groupName
\"
:
\"
模块
\"
,
\"
scenario
\"
:
\"
wde
\"
,
\"
components
\"
:[{
\"
type
\"
:
\"
component
\"
,
\"
level
\"
:2,
\"
sellerEditable
\"
:true,
\"
boxStyle
\"
:{
\"
rotate
\"
:0,
\"
z-index
\"
:0,
\"
top
\"
:0,
\"
left
\"
:0,
\"
width
\"
:620,
\"
height
\"
:426,
\"
background-image
\"
:
\"
https://img.alicdn.com/imgextra/i2/1807767805/O1CN01s1VSmR27Wk6KV0qeW_!!1807767805.jpg
\"
},
\"
componentName
\"
:
\"
图片组件
\"
,
\"
clipType
\"
:
\"
rect
\"
,
\"
imgStyle
\"
:{
\"
top
\"
:0,
\"
left
\"
:0,
\"
width
\"
:620,
\"
height
\"
:426},
\"
picMeta
\"
:{
\"
width
\"
:750,
\"
height
\"
:515,
\"
size
\"
:164688,
\"
id
\"
:1780507574793466600},
\"
isEdit
\"
:false,
\"
componentType
\"
:
\"
pic
\"
,
\"
componentId
\"
:
\"
component1673682393365
\"
,
\"
groupId
\"
:
\"
group1673682389542
\"
,
\"
selected
\"
:false}],
\"
groupId
\"
:
\"
group1673682389542
\"
,
\"
id
\"
:
\"
group1673682389542
\"
,
\"
bizName
\"
:
\"
图文模块
\"
},{
\"
type
\"
:
\"
group
\"
,
\"
hide
\"
:false,
\"
bizCode
\"
:0,
\"
propertyPanelVisible
\"
:true,
\"
level
\"
:1,
\"
boxStyle
\"
:{
\"
background-color
\"
:
\"
#ffffff
\"
,
\"
width
\"
:620,
\"
height
\"
:436},
\"
position
\"
:
\"
middle
\"
,
\"
groupName
\"
:
\"
模块
\"
,
\"
scenario
\"
:
\"
wde
\"
,
\"
components
\"
:[{
\"
type
\"
:
\"
component
\"
,
\"
level
\"
:2,
\"
sellerEditable
\"
:true,
\"
boxStyle
\"
:{
\"
rotate
\"
:0,
\"
z-index
\"
:0,
\"
top
\"
:0,
\"
left
\"
:0,
\"
width
\"
:620,
\"
height
\"
:436,
\"
background-image
\"
:
\"
https://img.alicdn.com/imgextra/i3/1807767805/O1CN018cvRUU27Wk6OyuIcR_!!1807767805.jpg
\"
},
\"
componentName
\"
:
\"
图片组件
\"
,
\"
clipType
\"
:
\"
rect
\"
,
\"
imgStyle
\"
:{
\"
top
\"
:0,
\"
left
\"
:0,
\"
width
\"
:620,
\"
height
\"
:436},
\"
picMeta
\"
:{
\"
width
\"
:750,
\"
height
\"
:528,
\"
size
\"
:154781,
\"
id
\"
:1780507578899727000},
\"
isEdit
\"
:false,
\"
componentType
\"
:
\"
pic
\"
,
\"
componentId
\"
:
\"
component1673682390815
\"
,
\"
groupId
\"
:
\"
group1673682392478
\"
,
\"
selected
\"
:false}],
\"
groupId
\"
:
\"
group1673682392478
\"
,
\"
id
\"
:
\"
group1673682392478
\"
,
\"
bizName
\"
:
\"
图文模块
\"
},{
\"
type
\"
:
\"
group
\"
,
\"
hide
\"
:false,
\"
bizCode
\"
:0,
\"
propertyPanelVisible
\"
:true,
\"
level
\"
:1,
\"
boxStyle
\"
:{
\"
background-color
\"
:
\"
#ffffff
\"
,
\"
width
\"
:620,
\"
height
\"
:1023},
\"
position
\"
:
\"
middle
\"
,
\"
groupName
\"
:
\"
模块
\"
,
\"
scenario
\"
:
\"
wde
\"
,
\"
components
\"
:[{
\"
type
\"
:
\"
component
\"
,
\"
level
\"
:2,
\"
sellerEditable
\"
:true,
\"
boxStyle
\"
:{
\"
rotate
\"
:0,
\"
z-index
\"
:0,
\"
top
\"
:0,
\"
left
\"
:0,
\"
width
\"
:620,
\"
height
\"
:1023,
\"
background-image
\"
:
\"
https://img.alicdn.com/imgextra/i4/1807767805/O1CN01qalH0A27Wk6CCe2KE_!!1807767805.jpg
\"
},
\"
componentName
\"
:
\"
图片组件
\"
,
\"
clipType
\"
:
\"
rect
\"
,
\"
imgStyle
\"
:{
\"
top
\"
:0,
\"
left
\"
:0,
\"
width
\"
:620,
\"
height
\"
:1023},
\"
picMeta
\"
:{
\"
width
\"
:750,
\"
height
\"
:1237,
\"
size
\"
:476592,
\"
id
\"
:1780507567192993000},
\"
isEdit
\"
:false,
\"
componentType
\"
:
\"
pic
\"
,
\"
componentId
\"
:
\"
component1673682391496
\"
,
\"
groupId
\"
:
\"
group1673682397380
\"
,
\"
selected
\"
:false}],
\"
groupId
\"
:
\"
group1673682397380
\"
,
\"
id
\"
:
\"
group1673682397380
\"
,
\"
bizName
\"
:
\"
图文模块
\"
},{
\"
type
\"
:
\"
group
\"
,
\"
hide
\"
:false,
\"
bizCode
\"
:0,
\"
propertyPanelVisible
\"
:true,
\"
level
\"
:1,
\"
boxStyle
\"
:{
\"
background-color
\"
:
\"
#ffffff
\"
,
\"
width
\"
:620,
\"
height
\"
:811},
\"
position
\"
:
\"
middle
\"
,
\"
groupName
\"
:
\"
模块
\"
,
\"
scenario
\"
:
\"
wde
\"
,
\"
components
\"
:[{
\"
type
\"
:
\"
component
\"
,
\"
level
\"
:2,
\"
sellerEditable
\"
:true,
\"
boxStyle
\"
:{
\"
rotate
\"
:0,
\"
z-index
\"
:0,
\"
top
\"
:0,
\"
left
\"
:0,
\"
width
\"
:620,
\"
height
\"
:811,
\"
background-image
\"
:
\"
https://img.alicdn.com/imgextra/i1/1807767805/O1CN019yAoES27Wk6CCdhXg_!!1807767805.jpg
\"
},
\"
componentName
\"
:
\"
图片组件
\"
,
\"
clipType
\"
:
\"
rect
\"
,
\"
imgStyle
\"
:{
\"
top
\"
:0,
\"
left
\"
:0,
\"
width
\"
:620,
\"
height
\"
:811},
\"
picMeta
\"
:{
\"
width
\"
:750,
\"
height
\"
:981,
\"
size
\"
:274307,
\"
id
\"
:1780507567192913200},
\"
isEdit
\"
:false,
\"
componentType
\"
:
\"
pic
\"
,
\"
componentId
\"
:
\"
component1673682393980
\"
,
\"
groupId
\"
:
\"
group1673682390593
\"
,
\"
selected
\"
:false}],
\"
groupId
\"
:
\"
group1673682390593
\"
,
\"
id
\"
:
\"
group1673682390593
\"
,
\"
bizName
\"
:
\"
图文模块
\"
}],
\"
sellergroups
\"
:[]}"
,
"sourceAgent"
:
"sell"
,
"editType"
:
"lite"
,
"detailParam"
:
"{
\"
params
\"
:[{
\"
reuseImg
\"
:false,
\"
groupId
\"
:
\"
group1673682389542
\"
,
\"
width
\"
:620,
\"
size
\"
:164688,
\"
imageUrls
\"
:[
\"
https://img.alicdn.com/imgextra/i2/1807767805/O1CN01s1VSmR27Wk6KV0qeW_!!1807767805.jpg
\"
],
\"
splitHeight
\"
:960,
\"
height
\"
:426,
\"
originImg
\"
:true,
\"
imageIds
\"
:[-1]},{
\"
reuseImg
\"
:false,
\"
groupId
\"
:
\"
group1673682392478
\"
,
\"
width
\"
:620,
\"
size
\"
:154781,
\"
imageUrls
\"
:[
\"
https://img.alicdn.com/imgextra/i3/1807767805/O1CN018cvRUU27Wk6OyuIcR_!!1807767805.jpg
\"
],
\"
splitHeight
\"
:960,
\"
height
\"
:437,
\"
originImg
\"
:true,
\"
imageIds
\"
:[-1]},{
\"
reuseImg
\"
:false,
\"
groupId
\"
:
\"
group1673682397380
\"
,
\"
width
\"
:620,
\"
size
\"
:476592,
\"
imageUrls
\"
:[
\"
https://img.alicdn.com/imgextra/i4/1807767805/O1CN01qalH0A27Wk6CCe2KE_!!1807767805.jpg
\"
],
\"
splitHeight
\"
:960,
\"
height
\"
:1023,
\"
originImg
\"
:true,
\"
imageIds
\"
:[-1]},{
\"
reuseImg
\"
:false,
\"
groupId
\"
:
\"
group1673682390593
\"
,
\"
width
\"
:620,
\"
size
\"
:274307,
\"
imageUrls
\"
:[
\"
https://img.alicdn.com/imgextra/i1/1807767805/O1CN019yAoES27Wk6CCdhXg_!!1807767805.jpg
\"
],
\"
splitHeight
\"
:960,
\"
height
\"
:811,
\"
originImg
\"
:true,
\"
imageIds
\"
:[-1]}]}"
},
"descPageRenderParam"
:
{
"userId"
:
1807767805
,
"itemId"
:
697122796700
,
"templateId"
:
0
,
"clientType"
:
1
,
"catId"
:
150704
,
"bizSource"
:
"sell"
,
"newItem"
:
true
,
"bseller"
:
false
,
"smart"
:
false
},
"descPageRenderModel"
:
{
"wholeConfigBO"
:
{
"width"
:
620
,
"maxHeight"
:
35000
,
"splitHeight"
:
960
,
"ratio"
:
2
,
"canCoverFromTmall"
:
false
,
"userId"
:
1807767805
,
"liteCannotEdit"
:
false
,
"renderWhite"
:
false
},
"extendFields"
:
"{}"
,
"extendConfig"
:
{
"httpRequestUrlConfig"
:
{
"imageSelectUrl"
:
"//sucai.wangpu.taobao.com/select.htm"
,
"tokenUrl"
:
"https://xiangqing.wangpu.taobao.com/GetToken.do"
,
"mtopHost"
:
"h5api.m.taobao.com"
,
"mediaUploadUrl"
:
[
"stream.xiangqing.taobao.com"
,
"stream-xiangqing.taobao.com"
],
"httpHost"
:
"sell.xiangqing.taobao.com"
,
"url"
:
"https://xiangqing.wangpu.taobao.com/template/ajax/commit_item_description.do"
},
"wangpuEditorConfig"
:
{
"type"
:
"iframe"
,
"params"
:
{
"isAdescription"
:
1
,
"catId"
:
0
,
"itemId"
:
697122796700
,
"clientType"
:
1
,
"isV3"
:
"true"
},
"url"
:
"https://sell.xiangqing.taobao.com/new_user_panel.htm"
},
"functionConfig"
:
{
"showPreview"
:
false
,
"showDistinguish"
:
false
,
"backOldDiscardDraft"
:
false
,
"showBackOldVersion"
:
true
,
"showTemplate"
:
true
,
"showFastAddText"
:
true
,
"bSeller"
:
false
},
"imagePluginConfig"
:
{
"appkey"
:
"tu"
},
"imageConfig"
:
{
"usePreDraw"
:
true
,
"mustCutImage"
:
false
,
"useCutThreshold"
:
true
,
"cutImageConfig"
:
{
"cutWidthThreshold"
:
1500
,
"cutHeightThreshold"
:
2000
,
"cutMinWidth"
:
620
,
"cutMinHeight"
:
0
}
},
"uploadConfig"
:
{
"localFile"
:
false
,
"picUploadApi"
:
"picUploadApi"
,
"params"
:
{
"folderId"
:
"folderId"
}
}
}
}
},
"shopcat"
:
[
11
],
"subStock"
:
{
"value"
:
1
},
"tbExtractWay"
:
{
"value"
:
[
"2"
],
"template"
:
"54659134050"
},
"regionLimitSale"
:
{
"value"
:
"regionLimitSale_0"
},
"sevenDaySupport"
:
1
,
export
const
StartPrint
=
"StartPrint"
"startTime"
:
{
"type"
:
0
export
const
Print
=
"Print"
},
\ No newline at end of file
"title"
:
"测试手机壳数据"
,
"saleProp"
:
{
"p-228680323"
:
[
{
"text"
:
"华为 Mate Xs 2"
,
"value"
:
"21397358634"
},
{
"text"
:
"华为 Mate 20 Lite"
,
"value"
:
"17547890070"
}
],
"p-1627207"
:
[
{
"text"
:
"测试1"
,
"value"
:
-
682337435
},
{
"text"
:
"测试2"
,
"value"
:
-
682340930
}
]
},
"price"
:
"9.00"
,
}
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