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
shenshaokai
jinfa-platform
Commits
2983dfdd
Commit
2983dfdd
authored
Nov 26, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev
parents
ed7867bb
bddcdc38
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
45 additions
and
44 deletions
+45
-44
config.ts
config/config.ts
+24
-23
index.tsx
src/components/InputNumber/index.tsx
+13
-8
index.tsx
...ngsPanel/propsSettings/components/AdvertSetting/index.tsx
+1
-1
index.tsx
...omponents/ProductDescription/components/Comment/index.tsx
+5
-5
index.tsx
...nts/ProductDescription/components/ImageViewList/index.tsx
+2
-7
index.tsx
src/pages/lxMall/commodityDetail/index.tsx
+0
-0
index.tsx
src/pages/lxMall/purchaseOrder/index.tsx
+0
-0
No files found.
config/config.ts
View file @
2983dfdd
...
@@ -4,6 +4,7 @@ import proxy from './proxy'
...
@@ -4,6 +4,7 @@ import proxy from './proxy'
import
theme
from
'./lingxi.theme.config'
import
theme
from
'./lingxi.theme.config'
const
OPEN_THEME_BUILD
=
process
.
env
.
NODE_ENV
===
'production'
?
true
:
false
// 是否开启动态主题
const
OPEN_THEME_BUILD
=
process
.
env
.
NODE_ENV
===
'production'
?
true
:
false
// 是否开启动态主题
const
isProduction
=
process
.
env
.
NODE_ENV
===
'production'
?
true
:
false
const
config
:
any
=
{
const
config
:
any
=
{
// 如需写入环境变量 需在config中先写入
// 如需写入环境变量 需在config中先写入
...
@@ -49,29 +50,29 @@ const config: any = {
...
@@ -49,29 +50,29 @@ const config: any = {
defaultSizes
:
'parsed'
,
// stat // gzip
defaultSizes
:
'parsed'
,
// stat // gzip
},
},
inlineLimit
:
10000
,
inlineLimit
:
10000
,
// chunks:
['vendors', 'umi'],
chunks
:
isProduction
&&
[
'vendors'
,
'umi'
],
//
chainWebpack: function (config, { webpack }) {
chainWebpack
:
function
(
config
,
{
webpack
})
{
//
config.merge({
isProduction
&&
config
.
merge
({
//
optimization: {
optimization
:
{
//
minimize: true,
minimize
:
true
,
//
splitChunks: {
splitChunks
:
{
//
chunks: 'all',
chunks
:
'all'
,
//
minSize: 30000,
minSize
:
30000
,
//
minChunks: 3,
minChunks
:
3
,
//
automaticNameDelimiter: '.',
automaticNameDelimiter
:
'.'
,
//
cacheGroups: {
cacheGroups
:
{
//
vendor: {
vendor
:
{
//
name: 'vendors',
name
:
'vendors'
,
//
test({ resource }) {
test
({
resource
})
{
//
return /[\\/]node_modules[\\/]/.test(resource);
return
/
[\\/]
node_modules
[\\/]
/
.
test
(
resource
);
//
},
},
//
priority: 10,
priority
:
10
,
//
},
},
//
},
},
//
},
},
//
}
}
//
});
});
//
},
},
cssLoader
:
{
cssLoader
:
{
localsConvention
:
'camelCase'
,
// 将style中的class由 .foo-body 转化为fooBody调用
localsConvention
:
'camelCase'
,
// 将style中的class由 .foo-body 转化为fooBody调用
},
},
...
...
src/components/InputNumber/index.tsx
View file @
2983dfdd
...
@@ -21,13 +21,13 @@ const InputNumber: React.FC<InputNumberPropsType> = (props) => {
...
@@ -21,13 +21,13 @@ const InputNumber: React.FC<InputNumberPropsType> = (props) => {
if
(
min
||
min
===
0
)
{
if
(
min
||
min
===
0
)
{
setMinCount
(
min
)
setMinCount
(
min
)
if
(
value
<
min
)
{
if
(
value
<
min
)
{
onChange
(
min
)
onChange
(
min
,
'blur'
)
}
}
}
}
if
(
max
||
max
===
0
)
{
if
(
max
||
max
===
0
)
{
setMaxCount
(
max
)
setMaxCount
(
max
)
if
(
value
>
max
)
{
if
(
value
>
max
)
{
onChange
(
max
)
onChange
(
max
,
'blur'
)
}
}
}
}
},
[
min
,
max
])
},
[
min
,
max
])
...
@@ -35,14 +35,14 @@ const InputNumber: React.FC<InputNumberPropsType> = (props) => {
...
@@ -35,14 +35,14 @@ const InputNumber: React.FC<InputNumberPropsType> = (props) => {
const
handleReduce
=
(
e
)
=>
{
const
handleReduce
=
(
e
)
=>
{
e
.
stopPropagation
()
e
.
stopPropagation
()
if
(
value
>
minCount
)
{
if
(
value
>
minCount
)
{
onChange
(
Number
(
value
)
-
1
)
onChange
(
Number
(
value
)
-
1
,
'click'
)
}
}
}
}
const
handleAdd
=
(
e
)
=>
{
const
handleAdd
=
(
e
)
=>
{
e
.
stopPropagation
()
e
.
stopPropagation
()
if
(
value
<
maxCount
)
{
if
(
value
<
maxCount
)
{
onChange
(
Number
(
value
)
+
1
)
onChange
(
Number
(
value
)
+
1
,
'click'
)
}
}
}
}
...
@@ -50,17 +50,22 @@ const InputNumber: React.FC<InputNumberPropsType> = (props) => {
...
@@ -50,17 +50,22 @@ const InputNumber: React.FC<InputNumberPropsType> = (props) => {
const
{
value
}
=
e
.
target
;
const
{
value
}
=
e
.
target
;
const
reg
=
/^
\d
*
?
$/
;
const
reg
=
/^
\d
*
?
$/
;
if
(
reg
.
test
(
value
))
{
if
(
reg
.
test
(
value
))
{
onChange
(
value
)
onChange
(
value
,
'change'
)
}
}
}
}
const
handleBlur
=
(
e
)
=>
{
const
handleBlur
=
(
e
)
=>
{
const
{
value
}
=
e
.
target
;
const
{
value
}
=
e
.
target
;
if
(
value
===
""
)
{
if
(
value
===
""
)
{
onChange
(
minCount
)
onChange
(
minCount
,
'blur'
)
}
else
{
}
else
{
Number
(
value
)
<
minCount
&&
onChange
(
minCount
)
if
(
Number
(
value
)
<
minCount
)
{
Number
(
value
)
>
maxCount
&&
onChange
(
maxCount
)
onChange
(
minCount
,
'blur'
)
}
else
if
(
Number
(
value
)
>
maxCount
)
{
onChange
(
maxCount
,
'blur'
)
}
else
{
onChange
(
value
,
'blur'
)
}
}
}
}
}
...
...
src/pages/editor/settingsPanel/propsSettings/components/AdvertSetting/index.tsx
View file @
2983dfdd
...
@@ -195,7 +195,7 @@ const AdvertSetting: React.FC<AdvertSettingPropsType> = forwardRef((props, ref)
...
@@ -195,7 +195,7 @@ const AdvertSetting: React.FC<AdvertSettingPropsType> = forwardRef((props, ref)
setConfirmLoading
(
true
)
setConfirmLoading
(
true
)
let
newParam
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
newProps
))
let
newParam
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
newProps
))
newParam
.
advertList
=
newParam
.
advertList
.
map
((
item
)
=>
{
newParam
.
advertList
=
newParam
.
advertList
.
map
((
item
)
=>
{
if
(
!
item
.
link
.
startsWith
(
'http://'
)
&&
!
item
.
link
.
startsWith
(
'https://'
))
{
if
(
!
item
.
link
&&
!
item
.
link
.
startsWith
(
'http://'
)
&&
!
item
.
link
.
startsWith
(
'https://'
))
{
item
.
link
=
`http://
${
item
.
link
}
`
item
.
link
=
`http://
${
item
.
link
}
`
}
}
return
item
return
item
...
...
src/pages/lxMall/commodityDetail/components/ProductDescription/components/Comment/index.tsx
View file @
2983dfdd
...
@@ -42,7 +42,7 @@ const Comment: React.FC<CommentPropsType> = (props) => {
...
@@ -42,7 +42,7 @@ const Comment: React.FC<CommentPropsType> = (props) => {
},
[
current
])
},
[
current
])
const
fetchCommentList
=
(
type
=
''
)
=>
{
const
fetchCommentList
=
(
type
=
''
)
=>
{
le
t
param
:
any
=
{
cons
t
param
:
any
=
{
current
,
current
,
pageSize
,
pageSize
,
productIds
:
productIds
.
toString
()
// '2339'
productIds
:
productIds
.
toString
()
// '2339'
...
@@ -55,7 +55,7 @@ const Comment: React.FC<CommentPropsType> = (props) => {
...
@@ -55,7 +55,7 @@ const Comment: React.FC<CommentPropsType> = (props) => {
param
.
starLevel
=
1
param
.
starLevel
=
1
}
}
setSpinLoading
(
true
)
setSpinLoading
(
true
)
//@ts-ignore
PublicApi
.
getMemberCommentMallTradeHistoryPage
(
param
).
then
(
res
=>
{
PublicApi
.
getMemberCommentMallTradeHistoryPage
(
param
).
then
(
res
=>
{
setSpinLoading
(
false
)
setSpinLoading
(
false
)
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
...
@@ -85,7 +85,7 @@ const Comment: React.FC<CommentPropsType> = (props) => {
...
@@ -85,7 +85,7 @@ const Comment: React.FC<CommentPropsType> = (props) => {
let
middleCount
=
0
let
middleCount
=
0
let
badCount
=
0
let
badCount
=
0
if
(
data
)
{
if
(
data
)
{
for
(
le
t
item
of
data
)
{
for
(
cons
t
item
of
data
)
{
switch
(
item
.
star
)
{
switch
(
item
.
star
)
{
case
1
:
case
1
:
case
2
:
case
2
:
...
@@ -103,9 +103,9 @@ const Comment: React.FC<CommentPropsType> = (props) => {
...
@@ -103,9 +103,9 @@ const Comment: React.FC<CommentPropsType> = (props) => {
}
}
}
}
}
}
le
t
allCount
=
goodCount
+
middleCount
+
badCount
cons
t
allCount
=
goodCount
+
middleCount
+
badCount
le
t
result
=
[{
cons
t
result
=
[{
title
:
'全部评价'
,
title
:
'全部评价'
,
sum
:
allCount
,
sum
:
allCount
,
sumText
:
allCount
>
200
?
`(200+)`
:
`(
${
allCount
}
)`
,
sumText
:
allCount
>
200
?
`(200+)`
:
`(
${
allCount
}
)`
,
...
...
src/pages/lxMall/commodityDetail/components/ProductDescription/components/ImageViewList/index.tsx
View file @
2983dfdd
...
@@ -8,15 +8,10 @@ interface ImageViewListPropsType {
...
@@ -8,15 +8,10 @@ interface ImageViewListPropsType {
}
}
const
ImageViewList
:
React
.
FC
<
ImageViewListPropsType
>
=
(
props
)
=>
{
const
ImageViewList
:
React
.
FC
<
ImageViewListPropsType
>
=
(
props
)
=>
{
const
{
imgList
=
[]}
=
props
const
[
previewImage
,
setPreviewImage
]
=
useState
<
number
>
(
-
1
)
const
[
previewImage
,
setPreviewImage
]
=
useState
<
number
>
(
-
1
)
const
[
rotateZ
,
setRotateZ
]
=
useState
<
number
>
(
0
)
const
[
rotateZ
,
setRotateZ
]
=
useState
<
number
>
(
0
)
const
imgList
=
[
"https://woodmartcdn-cec2.kxcdn.com/wp-content/uploads/2016/09/product-furniture-1.jpg"
,
"https://woodmartcdn-cec2.kxcdn.com/wp-content/uploads/2016/09/product-furniture-1-5.jpg"
,
"https://woodmartcdn-cec2.kxcdn.com/wp-content/uploads/2016/09/product-furniture-1-3.jpg"
]
const
handlePreviewImg
=
(
index
:
number
)
=>
{
const
handlePreviewImg
=
(
index
:
number
)
=>
{
if
(
previewImage
!==
index
)
{
if
(
previewImage
!==
index
)
{
setPreviewImage
(
index
)
setPreviewImage
(
index
)
...
@@ -39,7 +34,7 @@ const ImageViewList: React.FC<ImageViewListPropsType> = (props) => {
...
@@ -39,7 +34,7 @@ const ImageViewList: React.FC<ImageViewListPropsType> = (props) => {
setRotateZ
(
0
)
setRotateZ
(
0
)
break
break
case
'preview'
:
case
'preview'
:
le
t
el
=
document
.
createElement
(
'a'
)
cons
t
el
=
document
.
createElement
(
'a'
)
el
.
href
=
imgList
[
previewImage
];
el
.
href
=
imgList
[
previewImage
];
el
.
target
=
'_blank'
;
el
.
target
=
'_blank'
;
el
.
click
()
el
.
click
()
...
...
src/pages/lxMall/commodityDetail/index.tsx
View file @
2983dfdd
This diff is collapsed.
Click to expand it.
src/pages/lxMall/purchaseOrder/index.tsx
View file @
2983dfdd
This diff is collapsed.
Click to expand it.
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