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
陈智峰
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'
import
theme
from
'./lingxi.theme.config'
const
OPEN_THEME_BUILD
=
process
.
env
.
NODE_ENV
===
'production'
?
true
:
false
// 是否开启动态主题
const
isProduction
=
process
.
env
.
NODE_ENV
===
'production'
?
true
:
false
const
config
:
any
=
{
// 如需写入环境变量 需在config中先写入
...
...
@@ -49,29 +50,29 @@ const config: any = {
defaultSizes
:
'parsed'
,
// stat // gzip
},
inlineLimit
:
10000
,
// chunks:
['vendors', 'umi'],
//
chainWebpack: function (config, { webpack }) {
//
config.merge({
//
optimization: {
//
minimize: true,
//
splitChunks: {
//
chunks: 'all',
//
minSize: 30000,
//
minChunks: 3,
//
automaticNameDelimiter: '.',
//
cacheGroups: {
//
vendor: {
//
name: 'vendors',
//
test({ resource }) {
//
return /[\\/]node_modules[\\/]/.test(resource);
//
},
//
priority: 10,
//
},
//
},
//
},
//
}
//
});
//
},
chunks
:
isProduction
&&
[
'vendors'
,
'umi'
],
chainWebpack
:
function
(
config
,
{
webpack
})
{
isProduction
&&
config
.
merge
({
optimization
:
{
minimize
:
true
,
splitChunks
:
{
chunks
:
'all'
,
minSize
:
30000
,
minChunks
:
3
,
automaticNameDelimiter
:
'.'
,
cacheGroups
:
{
vendor
:
{
name
:
'vendors'
,
test
({
resource
})
{
return
/
[\\/]
node_modules
[\\/]
/
.
test
(
resource
);
},
priority
:
10
,
},
},
},
}
});
},
cssLoader
:
{
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) => {
if
(
min
||
min
===
0
)
{
setMinCount
(
min
)
if
(
value
<
min
)
{
onChange
(
min
)
onChange
(
min
,
'blur'
)
}
}
if
(
max
||
max
===
0
)
{
setMaxCount
(
max
)
if
(
value
>
max
)
{
onChange
(
max
)
onChange
(
max
,
'blur'
)
}
}
},
[
min
,
max
])
...
...
@@ -35,14 +35,14 @@ const InputNumber: React.FC<InputNumberPropsType> = (props) => {
const
handleReduce
=
(
e
)
=>
{
e
.
stopPropagation
()
if
(
value
>
minCount
)
{
onChange
(
Number
(
value
)
-
1
)
onChange
(
Number
(
value
)
-
1
,
'click'
)
}
}
const
handleAdd
=
(
e
)
=>
{
e
.
stopPropagation
()
if
(
value
<
maxCount
)
{
onChange
(
Number
(
value
)
+
1
)
onChange
(
Number
(
value
)
+
1
,
'click'
)
}
}
...
...
@@ -50,17 +50,22 @@ const InputNumber: React.FC<InputNumberPropsType> = (props) => {
const
{
value
}
=
e
.
target
;
const
reg
=
/^
\d
*
?
$/
;
if
(
reg
.
test
(
value
))
{
onChange
(
value
)
onChange
(
value
,
'change'
)
}
}
const
handleBlur
=
(
e
)
=>
{
const
{
value
}
=
e
.
target
;
if
(
value
===
""
)
{
onChange
(
minCount
)
onChange
(
minCount
,
'blur'
)
}
else
{
Number
(
value
)
<
minCount
&&
onChange
(
minCount
)
Number
(
value
)
>
maxCount
&&
onChange
(
maxCount
)
if
(
Number
(
value
)
<
minCount
)
{
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)
setConfirmLoading
(
true
)
let
newParam
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
newProps
))
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
}
`
}
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) => {
},
[
current
])
const
fetchCommentList
=
(
type
=
''
)
=>
{
le
t
param
:
any
=
{
cons
t
param
:
any
=
{
current
,
pageSize
,
productIds
:
productIds
.
toString
()
// '2339'
...
...
@@ -55,7 +55,7 @@ const Comment: React.FC<CommentPropsType> = (props) => {
param
.
starLevel
=
1
}
setSpinLoading
(
true
)
//@ts-ignore
PublicApi
.
getMemberCommentMallTradeHistoryPage
(
param
).
then
(
res
=>
{
setSpinLoading
(
false
)
if
(
res
.
code
===
1000
)
{
...
...
@@ -85,7 +85,7 @@ const Comment: React.FC<CommentPropsType> = (props) => {
let
middleCount
=
0
let
badCount
=
0
if
(
data
)
{
for
(
le
t
item
of
data
)
{
for
(
cons
t
item
of
data
)
{
switch
(
item
.
star
)
{
case
1
:
case
2
:
...
...
@@ -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
:
'全部评价'
,
sum
:
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 {
}
const
ImageViewList
:
React
.
FC
<
ImageViewListPropsType
>
=
(
props
)
=>
{
const
{
imgList
=
[]}
=
props
const
[
previewImage
,
setPreviewImage
]
=
useState
<
number
>
(
-
1
)
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
)
=>
{
if
(
previewImage
!==
index
)
{
setPreviewImage
(
index
)
...
...
@@ -39,7 +34,7 @@ const ImageViewList: React.FC<ImageViewListPropsType> = (props) => {
setRotateZ
(
0
)
break
case
'preview'
:
le
t
el
=
document
.
createElement
(
'a'
)
cons
t
el
=
document
.
createElement
(
'a'
)
el
.
href
=
imgList
[
previewImage
];
el
.
target
=
'_blank'
;
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