Commit f33ece61 authored by GuanHua's avatar GuanHua

fix: 渠道和店铺装修品类接口添加参数

parent 2ce65571
...@@ -25,7 +25,8 @@ interface ChannelPreviewPropsType { ...@@ -25,7 +25,8 @@ interface ChannelPreviewPropsType {
* 模板名称 * 模板名称
*/ */
template: string; template: string;
type: number type: number,
shopId: number
} }
} }
} }
...@@ -33,7 +34,7 @@ interface ChannelPreviewPropsType { ...@@ -33,7 +34,7 @@ interface ChannelPreviewPropsType {
const TemplateList = ['science'] const TemplateList = ['science']
const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => { const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
const { query: { id, template, type } } = props.location const { query: { id, template, type, shopId } } = props.location
const userInfo: any = getAuth() || {} const userInfo: any = getAuth() || {}
const [loading, setLoading] = useState<boolean>(true) const [loading, setLoading] = useState<boolean>(true)
const [theme, setTheme] = useState<string>('theme-channel-science') const [theme, setTheme] = useState<string>('theme-channel-science')
...@@ -74,7 +75,10 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => { ...@@ -74,7 +75,10 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
const params: any = { const params: any = {
memberId: userInfo.memberId memberId: userInfo.memberId
} }
PublicApi.getTemplateAdornWebChannelFindAllFirstCategory(params).then(res => { const headers: any = {
shopId
}
PublicApi.getTemplateAdornWebChannelFindAllFirstCategory(params, { headers }).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
resolve(res.data) resolve(res.data)
} }
......
...@@ -25,6 +25,7 @@ interface ShopEditPropsType { ...@@ -25,6 +25,7 @@ interface ShopEditPropsType {
* 模板名称 * 模板名称
*/ */
template: string; template: string;
shopId: number
} }
} }
} }
...@@ -32,7 +33,7 @@ interface ShopEditPropsType { ...@@ -32,7 +33,7 @@ interface ShopEditPropsType {
const TemplateList = ['science'] const TemplateList = ['science']
const ShopEdit: React.FC<ShopEditPropsType> = (props) => { const ShopEdit: React.FC<ShopEditPropsType> = (props) => {
const { query: { id, template } } = props.location const { query: { id, template, shopId } } = props.location
const [loading, setLoading] = useState<boolean>(true) const [loading, setLoading] = useState<boolean>(true)
const [theme, setTheme] = useState<string>('theme-shop-science') const [theme, setTheme] = useState<string>('theme-shop-science')
const [componentConfigs, setComponentConfigs] = useState({}) const [componentConfigs, setComponentConfigs] = useState({})
...@@ -94,7 +95,10 @@ const ShopEdit: React.FC<ShopEditPropsType> = (props) => { ...@@ -94,7 +95,10 @@ const ShopEdit: React.FC<ShopEditPropsType> = (props) => {
memberId, memberId,
roleId: memberRoleId roleId: memberRoleId
} }
PublicApi.getTemplateAdornWebStoreFindAllFirstCategory(param).then(res => { const headers: any = {
shopId
}
PublicApi.getTemplateAdornWebStoreFindAllFirstCategory(param, { headers }).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
resolve(res.data) resolve(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