Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linweijiong
jinfa-platform
Commits
2d535161
Commit
2d535161
authored
Jun 21, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 处理商品描述上传文件没token问题
parent
ff8b7fea
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
productDescFormDefault.tsx
...odity/products/addProductsItem/productDescFormDefault.tsx
+4
-0
directChannel.tsx
src/pages/commodity/products/directChannel.tsx
+1
-1
index.tsx
src/pages/transaction/purchaseOrder/readyFileOrder/index.tsx
+1
-1
No files found.
src/pages/commodity/products/addProductsItem/productDescFormDefault.tsx
View file @
2d535161
...
@@ -9,12 +9,14 @@ import ImgCrop from 'antd-img-crop';
...
@@ -9,12 +9,14 @@ import ImgCrop from 'antd-img-crop';
import
{
inject
,
observer
}
from
'mobx-react'
import
{
inject
,
observer
}
from
'mobx-react'
import
{
store
}
from
'@/store'
import
{
store
}
from
'@/store'
import
{
getAuth
}
from
'@/utils/auth'
const
ProductDescFormDefualt
:
React
.
FC
<
{}
>
=
(
props
)
=>
{
const
ProductDescFormDefualt
:
React
.
FC
<
{}
>
=
(
props
)
=>
{
const
[
fileImageList
,
setFileImageList
]
=
useState
<
any
>
([])
const
[
fileImageList
,
setFileImageList
]
=
useState
<
any
>
([])
const
[
videoList
,
setVideoList
]
=
useState
<
any
>
([])
const
[
videoList
,
setVideoList
]
=
useState
<
any
>
([])
const
flagRef
=
useRef
<
boolean
>
(
false
)
const
flagRef
=
useRef
<
boolean
>
(
false
)
const
[
isLoading
,
setIsLoading
]
=
useState
<
boolean
>
(
false
)
// 上传的加载状态
const
[
isLoading
,
setIsLoading
]
=
useState
<
boolean
>
(
false
)
// 上传的加载状态
const
{
userId
,
memberId
,
token
}
=
getAuth
()
||
{}
const
{
ProductStore
}
=
store
const
{
ProductStore
}
=
store
const
{
productInfoByEdit
,
setProductDescription
,
selectCategoryId
}
=
ProductStore
const
{
productInfoByEdit
,
setProductDescription
,
selectCategoryId
}
=
ProductStore
...
@@ -56,6 +58,7 @@ const ProductDescFormDefualt: React.FC<{}> = (props) => {
...
@@ -56,6 +58,7 @@ const ProductDescFormDefualt: React.FC<{}> = (props) => {
name
:
'file'
,
name
:
'file'
,
action
:
'/api/file/file/upload'
,
action
:
'/api/file/file/upload'
,
showUploadList
:
false
,
showUploadList
:
false
,
headers
:
{
token
},
data
:
{
fileType
:
UPLOAD_TYPE
},
data
:
{
fileType
:
UPLOAD_TYPE
},
beforeUpload
(
file
)
{
beforeUpload
(
file
)
{
const
isJpgOrPng
=
file
.
type
===
'image/jpeg'
||
file
.
type
===
'image/jpg'
||
file
.
type
===
'image/png'
||
file
.
type
===
'image/gif'
;
const
isJpgOrPng
=
file
.
type
===
'image/jpeg'
||
file
.
type
===
'image/jpg'
||
file
.
type
===
'image/png'
||
file
.
type
===
'image/gif'
;
...
@@ -91,6 +94,7 @@ const ProductDescFormDefualt: React.FC<{}> = (props) => {
...
@@ -91,6 +94,7 @@ const ProductDescFormDefualt: React.FC<{}> = (props) => {
name
:
'file'
,
name
:
'file'
,
action
:
'/api/file/file/upload'
,
action
:
'/api/file/file/upload'
,
showUploadList
:
false
,
showUploadList
:
false
,
headers
:
{
token
},
data
:
{
fileType
:
UPLOAD_TYPE
},
data
:
{
fileType
:
UPLOAD_TYPE
},
beforeUpload
(
file
)
{
beforeUpload
(
file
)
{
const
isVideo
=
file
.
type
===
'video/mp4'
;
const
isVideo
=
file
.
type
===
'video/mp4'
;
...
...
src/pages/commodity/products/directChannel.tsx
View file @
2d535161
...
@@ -303,7 +303,7 @@ const DirectChannel: React.FC<{}> = () => {
...
@@ -303,7 +303,7 @@ const DirectChannel: React.FC<{}> = () => {
PublicApi
.
getTemplateWebMemberChannelWebFindCurrMemberChannel
().
then
(
res
=>
{
PublicApi
.
getTemplateWebMemberChannelWebFindCurrMemberChannel
().
then
(
res
=>
{
if
(
res
.
data
.
id
){
if
(
res
.
data
.
id
){
setCheckedValues
(
values
)
setCheckedValues
(
values
)
setShopId
(
res
.
data
.
id
)
setShopId
(
res
?.
data
?
.
id
)
}
else
{
}
else
{
message
.
error
(
'您还没有开通店铺,无法上下架商品!'
)
message
.
error
(
'您还没有开通店铺,无法上下架商品!'
)
}
}
...
...
src/pages/transaction/purchaseOrder/readyFileOrder/index.tsx
View file @
2d535161
...
@@ -84,7 +84,7 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
...
@@ -84,7 +84,7 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
}
}
}
}
formilyChilds=
{
{
formilyChilds=
{
{
children
:
<
Space
>
children
:
<
Space
>
<
Button
onClick=
{
handleSubmitBatch
}
loading=
{
loading
}
>
批量
提交审核
</
Button
>
<
Button
onClick=
{
handleSubmitBatch
}
loading=
{
loading
}
>
批量
归档
</
Button
>
</
Space
>,
</
Space
>,
layouts
:
{
layouts
:
{
span
:
8
span
:
8
...
...
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