Commit 2532fdd8 authored by GuanHua's avatar GuanHua

fix: app店铺,app渠道装修添加请求头environment参数

parent 8722d315
......@@ -75,7 +75,6 @@ const Banner: React.FC<BannerPropsType> = (props) => {
const [productRowSelection, productRowCtl] = useRowSelectionTable({type: 'radio'})
useEffect(() => {
console.log(storeId, "storeId")
initDataList()
}, [dataList])
......@@ -393,7 +392,9 @@ const Banner: React.FC<BannerPropsType> = (props) => {
...param,
}
let getFn: any = null
const headers: any = {}
const headers: any = {
environment: "4"
}
switch(currentInfo?.type) {
case 1:
params.priceTypeList = [1]
......
......@@ -271,7 +271,8 @@ const ChannelGoods: React.FC<QualityPropsType> = (props) => {
}
const headers = {
"type": "3"
"type": "3",
environment: "4"
}
const res = await PublicApi.postSearchMobileShopChannelGetCommodityList(params, { headers })
message.destroy()
......
......@@ -223,8 +223,10 @@ const RecommendCommodity: React.FC<BannerPropsType> = (props) => {
idNotInList: productIdList || [],
storeId
}
const res = await PublicApi.postSearchMobileShopStoreGetCommodityList(params, {ctlType: 'none'})
const headers = {
environment: "4"
}
const res = await PublicApi.postSearchMobileShopStoreGetCommodityList(params, { ctlType: 'none', headers })
message.destroy()
return res.data
}
......
......@@ -54,7 +54,10 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
const [loading, setLoading] = useState<boolean>(true)
const [theme, setTheme] = useState<string>('theme-mall-science')
const [componentConfigs, setComponentConfigs] = useState({})
const { memberId, memberRoleId } = getAuth() || {}
const headers = {
environment: "4"
}
useEffect(() => {
if (!TemplateList.includes(template)) {
......@@ -111,7 +114,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
priceTypeList: [1],
channelMemberId,
}
PublicApi.postSearchMobileShopChannelGetCommodityList(param).then(res => {
PublicApi.postSearchMobileShopChannelGetCommodityList(param, { headers }).then(res => {
message.destroy()
resolve(res.data.data)
}).catch(() => {
......@@ -129,7 +132,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
channelMemberId,
}
PublicApi.getSearchMobileShopChannelGetCustomerCategoryTree(param).then((res) => {
PublicApi.getSearchMobileShopChannelGetCustomerCategoryTree(param, { headers }).then((res) => {
if (res.code === 1000) {
resolve(res.data)
} else {
......
......@@ -52,7 +52,10 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
const [loading, setLoading] = useState<boolean>(true)
const [theme, setTheme] = useState<string>('theme-mall-science')
const [componentConfigs, setComponentConfigs] = useState({})
const { memberId, memberRoleId } = getAuth() || {}
const headers = {
environment: "4"
}
useEffect(() => {
if (!TemplateList.includes(template)) {
......@@ -109,7 +112,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
priceTypeList: [1],
channelMemberId,
}
PublicApi.postSearchMobileShopChannelGetCommodityList(param).then(res => {
PublicApi.postSearchMobileShopChannelGetCommodityList(param, { headers }).then(res => {
message.destroy()
resolve(res.data.data)
}).catch(() => {
......
......@@ -53,6 +53,10 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
const [componentConfigs, setComponentConfigs] = useState({})
const { memberId, memberRoleId } = getAuth() || {}
const headers = {
environment: "4"
}
useEffect(() => {
if (!TemplateList.includes(template)) {
setTheme(`theme-mall-${TemplateList[0]}`)
......@@ -71,7 +75,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
memberId,
roleId: memberRoleId
}
PublicApi.getTemplateWebMemberShopWebFindByMemberIdAndRoleId(param).then(res => {
PublicApi.getTemplateWebMemberShopWebFindByMemberIdAndRoleId(param, { headers }).then(res => {
if (res.code === 1000) {
resolve(res.data)
}
......@@ -87,7 +91,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
const param: any = {
templateId: id
}
PublicApi.getTemplateAdornAppStoreFind(param).then(res => {
PublicApi.getTemplateAdornAppStoreFind(param, { headers }).then(res => {
if(res.code === 1000) {
resolve(res.data)
} else {
......@@ -137,7 +141,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
const param = {
idList
}
PublicApi.postSearchMobileShopStoreGetCategoryByCommodityId(param).then((res) => {
PublicApi.postSearchMobileShopStoreGetCategoryByCommodityId(param, { headers }).then((res) => {
message.destroy()
if (res.code === 1000) {
resolve(changeData(res.data))
......
......@@ -51,6 +51,10 @@ const mobileShopTempletePreview: React.FC<ShopPreviewPropsType> = (props) => {
const [componentConfigs, setComponentConfigs] = useState({})
const { memberId, memberRoleId } = getAuth() || {}
const headers = {
environment: "4"
}
useEffect(() => {
if (!TemplateList.includes(template)) {
setTheme(`theme-mall-${TemplateList[0]}`)
......@@ -69,7 +73,7 @@ const mobileShopTempletePreview: React.FC<ShopPreviewPropsType> = (props) => {
memberId,
roleId: memberRoleId
}
PublicApi.getTemplateWebMemberShopWebFindByMemberIdAndRoleId(param).then(res => {
PublicApi.getTemplateWebMemberShopWebFindByMemberIdAndRoleId(param, { headers }).then(res => {
if (res.code === 1000) {
resolve(res.data)
}
......@@ -85,7 +89,7 @@ const mobileShopTempletePreview: React.FC<ShopPreviewPropsType> = (props) => {
const param: any = {
templateId: id
}
PublicApi.getTemplateAdornAppStoreFind(param).then(res => {
PublicApi.getTemplateAdornAppStoreFind(param, { headers }).then(res => {
if(res.code === 1000) {
resolve(res.data)
} else {
......@@ -135,7 +139,7 @@ const mobileShopTempletePreview: React.FC<ShopPreviewPropsType> = (props) => {
const param = {
idList
}
PublicApi.postSearchMobileShopStoreGetCategoryByCommodityId(param).then((res) => {
PublicApi.postSearchMobileShopStoreGetCategoryByCommodityId(param, { headers }).then((res) => {
message.destroy()
if (res.code === 1000) {
resolve(changeData(res.data))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment