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
916006d4
Commit
916006d4
authored
Sep 15, 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
c11fbc7b
db6c73cf
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
88 additions
and
14 deletions
+88
-14
index.tsx
src/pages/channel/templateDetail/index.tsx
+2
-1
index.tsx
...ngsPanel/propsSettings/components/AdvertSetting/index.tsx
+17
-3
index.tsx
...ingsPanel/propsSettings/components/BrandSetting/index.tsx
+17
-1
index.tsx
...opsSettings/components/CategoryreCommendSetting/index.tsx
+17
-1
GoodsItem.tsx
...Panel/propsSettings/components/GoodsSetting/GoodsItem.tsx
+1
-1
index.tsx
...ingsPanel/propsSettings/components/GoodsSetting/index.tsx
+29
-2
index.tsx
src/pages/editor/shopEdit/index.tsx
+0
-1
index.tsx
src/pages/lxMall/purchaseOrder/index.tsx
+1
-0
index.tsx
src/pages/shop/templateDetail/index.tsx
+2
-2
request.ts
src/utils/request.ts
+2
-2
No files found.
src/pages/channel/templateDetail/index.tsx
View file @
916006d4
...
...
@@ -56,7 +56,8 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
}
const
handleLinkEdit
=
()
=>
{
history
.
push
(
`/channel/template/edit?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
`
)
window
.
location
.
href
=
`/channel/template/edit?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
`
// history.push(`/channel/template/edit?id=${detailInfo.id}&template=${detailInfo.fileName}`)
}
return
(
...
...
src/pages/editor/settingsPanel/propsSettings/components/AdvertSetting/index.tsx
View file @
916006d4
...
...
@@ -3,7 +3,7 @@ import { Button, Input } from 'antd'
import
UploadImage
from
'@/components/UploadImage'
import
{
filterPropsFunction
,
getAdvertType
}
from
'../../../../utils'
import
SettingPanel
from
'../../../../components/SettingPanel'
import
{
message
}
from
'antd'
import
{
message
,
Modal
}
from
'antd'
import
{
isEmpty
}
from
'@formily/antd/esm/shared'
import
{
PublicApi
}
from
'@/services/api'
import
{
clearSelectedStatus
,
changeProps
}
from
'lingxi-editor-core'
;
...
...
@@ -171,13 +171,26 @@ const AdvertSetting: React.FC<AdvertSettingPropsType> = forwardRef((props, ref)
changeNewProps
(
'advertList'
,
newList
)
}
const
handleCancel
=
useCallback
(()
=>
{
if
(
JSON
.
stringify
(
props
)
!==
JSON
.
stringify
(
newProps
))
{
Modal
.
confirm
({
content
:
"您还没有保存修改的内容,是否确认关闭?"
,
okText
:
"确认"
,
cancelText
:
"取消"
,
onOk
:
()
=>
{
clearSelectedStatus
()
}
})
}
else
{
clearSelectedStatus
()
}
},
[
newProps
])
const
handleConfirmSave
=
useCallback
((
e
:
any
)
=>
{
e
.
preventDefault
();
if
(
JSON
.
stringify
(
props
)
===
JSON
.
stringify
(
newProps
))
{
return
}
setConfirmLoading
(
true
)
saveAdvert
(
newProps
).
then
(()
=>
{
changeProps
({
...
...
@@ -253,6 +266,7 @@ const AdvertSetting: React.FC<AdvertSettingPropsType> = forwardRef((props, ref)
return
(
<
SettingPanel
confirmLoading=
{
confirmLoading
}
onCancel=
{
handleCancel
}
onOK=
{
handleConfirmSave
}
>
<
div
className=
{
styles
.
advert_setting
}
>
...
...
src/pages/editor/settingsPanel/propsSettings/components/BrandSetting/index.tsx
View file @
916006d4
import
React
,
{
useState
,
useEffect
}
from
'react'
import
{
clearSelectedStatus
,
changeProps
}
from
'lingxi-editor-core'
import
{
Row
,
Col
,
Button
,
Input
,
Pagination
,
Form
,
message
}
from
'antd'
import
{
Row
,
Col
,
Button
,
Input
,
Pagination
,
Form
,
message
,
Modal
}
from
'antd'
import
SettingList
from
'../../../../components/SettingList'
import
BrandItem
from
'./BrandItem'
import
SettingPanel
from
'../../../../components/SettingPanel'
...
...
@@ -161,9 +161,25 @@ const BrandSetting: React.FC<ShopSettingPropsType> = (props) => {
setSelectList
(
selectBrandList
)
}
const
handleCancel
=
()
=>
{
if
(
JSON
.
stringify
(
brandList
)
!==
JSON
.
stringify
(
selectBrandList
))
{
Modal
.
confirm
({
content
:
"您还没有保存修改的内容,是否确认关闭?"
,
okText
:
"确认"
,
cancelText
:
"取消"
,
onOk
:
()
=>
{
clearSelectedStatus
()
}
})
}
else
{
clearSelectedStatus
()
}
}
return
(
<
SettingPanel
confirmLoading=
{
confirmLoading
}
onCancel=
{
handleCancel
}
onOK=
{
()
=>
handleConfirm
()
}
>
<
div
className=
{
styles
.
goods_setting
}
>
...
...
src/pages/editor/settingsPanel/propsSettings/components/CategoryreCommendSetting/index.tsx
View file @
916006d4
import
React
,
{
useState
,
useEffect
,
useCallback
}
from
'react'
import
{
Checkbox
,
Row
,
Col
,
message
}
from
'antd'
import
{
Checkbox
,
Row
,
Col
,
message
,
Modal
}
from
'antd'
import
UploadImage
from
'@/components/UploadImage'
import
SettingPanel
from
'../../../../components/SettingPanel'
import
{
clearSelectedStatus
,
changeProps
}
from
'lingxi-editor-core'
...
...
@@ -127,9 +127,25 @@ const CategoryRecommendSetting: React.FC<CategoryRecommendSettingPropsType> = (p
})
}
const
handleCancel
=
useCallback
(()
=>
{
if
(
JSON
.
stringify
(
props
)
!==
JSON
.
stringify
(
newProps
))
{
Modal
.
confirm
({
content
:
"您还没有保存修改的内容,是否确认关闭?"
,
okText
:
"确认"
,
cancelText
:
"取消"
,
onOk
:
()
=>
{
clearSelectedStatus
()
}
})
}
else
{
clearSelectedStatus
()
}
},
[
newProps
])
return
(
<
SettingPanel
confirmLoading=
{
confirmLoading
}
onCancel=
{
handleCancel
}
onOK=
{
handleConfirmSave
}
>
<
div
className=
{
styles
.
category_recommend
}
>
...
...
src/pages/editor/settingsPanel/propsSettings/components/GoodsSetting/GoodsItem.tsx
View file @
916006d4
...
...
@@ -18,7 +18,7 @@ const GoodsItem: React.FC<GoodsItemPropsType> = (props) => {
<
div
className=
{
styles
.
goods_item_info_name
}
>
{
dataInfo
.
goodsName
}
</
div
>
<
div
className=
{
styles
.
goods_item_info_price
}
>
<
i
>
¥
</
i
>
<
span
>
{
dataInfo
.
priceRange
}
</
span
>
<
span
>
{
dataInfo
.
priceRange
||
dataInfo
.
goodsPrice
}
</
span
>
</
div
>
<
div
className=
{
styles
.
goods_item_info_brief
}
>
<
span
>
品类:
</
span
>
...
...
src/pages/editor/settingsPanel/propsSettings/components/GoodsSetting/index.tsx
View file @
916006d4
import
React
,
{
useState
,
useEffect
,
useCallback
}
from
'react'
import
{
clearSelectedStatus
,
changeProps
}
from
'lingxi-editor-core'
import
{
Row
,
Col
,
Button
,
Input
,
Pagination
,
Select
,
Form
,
message
}
from
'antd'
import
{
Row
,
Col
,
Button
,
Input
,
Pagination
,
Select
,
Form
,
message
,
Modal
}
from
'antd'
import
SettingList
from
'../../../../components/SettingList'
import
GoodsItem
from
'./GoodsItem'
import
SettingPanel
from
'../../../../components/SettingPanel'
...
...
@@ -129,6 +129,21 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
}
}
const
handleCancel
=
()
=>
{
if
(
JSON
.
stringify
(
goodsList
)
!==
JSON
.
stringify
(
selectGoodsList
))
{
Modal
.
confirm
({
content
:
"您还没有保存修改的内容,是否确认关闭?"
,
okText
:
"确认"
,
cancelText
:
"取消"
,
onOk
:
()
=>
{
clearSelectedStatus
()
}
})
}
else
{
clearSelectedStatus
()
}
}
const
handleConfirmSave
=
()
=>
{
console
.
log
(
'handleConfirmSave1'
)
if
(
JSON
.
stringify
(
goodsList
)
===
JSON
.
stringify
(
selectGoodsList
))
{
...
...
@@ -141,11 +156,22 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
}
setConfirmLoading
(
true
)
saveGoods
().
then
(()
=>
{
let
newList
=
JSON
.
parse
(
JSON
.
stringify
(
selectGoodsList
))
newList
=
newList
.
map
(
item
=>
{
let
minPrice
=
0
if
(
item
.
priceRange
&&
typeof
item
.
priceRange
===
'string'
)
{
minPrice
=
item
.
priceRange
.
split
(
"~"
)[
0
]
item
.
goodsPrice
=
minPrice
}
return
item
})
changeProps
({
props
:
{
templateid
,
categoryid
,
goodsList
:
selectGoods
List
goodsList
:
new
List
}
})
clearSelectedStatus
()
...
...
@@ -198,6 +224,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
return
(
<
SettingPanel
confirmLoading=
{
confirmLoading
}
onCancel=
{
handleCancel
}
onOK=
{
()
=>
handleConfirm
()
}
>
<
div
className=
{
styles
.
goods_setting
}
>
...
...
src/pages/editor/shopEdit/index.tsx
View file @
916006d4
...
...
@@ -198,7 +198,6 @@ const ShopEdit: React.FC<ShopEditPropsType> = (props) => {
...
InformationConfig
,
...
FooterConfig
}
setComponentConfigs
(
config
)
setLoading
(
false
)
}
...
...
src/pages/lxMall/purchaseOrder/index.tsx
View file @
916006d4
...
...
@@ -260,6 +260,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
}
})
}
/**
* 批量删除商品
*/
...
...
src/pages/shop/templateDetail/index.tsx
View file @
916006d4
import
React
,
{
useState
,
useEffect
}
from
'react'
import
{
history
}
from
'umi'
;
import
{
LayoutOutlined
,
EyeOutlined
,
PushpinOutlined
}
from
'@ant-design/icons'
import
cx
from
'classnames'
import
DetailPage
from
'@/components/DetailPage'
...
...
@@ -57,7 +56,8 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
}
const
handleLinkEdit
=
()
=>
{
history
.
push
(
`/shop/template/edit?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
`
)
window
.
location
.
href
=
`/shop/template/edit?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
`
// history.push(`/shop/template/edit?id=${detailInfo.id}&template=${detailInfo.fileName}`)
}
return
(
...
...
src/utils/request.ts
View file @
916006d4
...
...
@@ -116,9 +116,9 @@ class ApiRequest {
baseRequest
<
IRequestSuccess
<
T
>>
(
url
,
options
).
then
(
res
=>
{
// 登录验证
if
(
res
.
code
===
1101
)
{
//
removeAuth()
removeAuth
()
// history.replace(`/user/login?redirect=${btoa(encodeURIComponent(String(window.location)))}`)
//
window.location.replace(`/user/login?redirect=${btoa(encodeURIComponent(String(window.location)))}`)
window
.
location
.
replace
(
`/user/login?redirect=
${
btoa
(
encodeURIComponent
(
String
(
window
.
location
)))}
`
)
message
.
destroy
()
message
.
error
(
res
.
message
)
reject
(
res
)
...
...
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