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
82899bd1
Commit
82899bd1
authored
Dec 07, 2020
by
Bill
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of 10.0.0.22:lingxi/lingxi-business-paltform into dev
parents
335fb03d
b932ee57
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
14 deletions
+26
-14
index.tsx
src/pages/editor/channelEdit/index.tsx
+16
-5
index.tsx
src/pages/lxMall/commodityDetail/index.tsx
+1
-0
index.tsx
src/pages/lxMall/components/SideNav/index.tsx
+1
-1
index.tsx
src/utils/index.tsx
+8
-8
No files found.
src/pages/editor/channelEdit/index.tsx
View file @
82899bd1
...
...
@@ -9,6 +9,7 @@ import { topBarConfig, topAdvertConfig, headerConfig, mainNavConfig, bannerAdver
import
Loading
from
'../components/Loading'
import
{
menuData
}
from
'./defaultMenu'
import
{
PublicApi
}
from
'@/services/api'
import
{
getAuth
}
from
'@/utils/auth'
import
styles
from
'./index.less'
interface
ChannelPreviewPropsType
{
...
...
@@ -30,6 +31,7 @@ const TemplateList = ['science']
const
ChannelPreview
:
React
.
FC
<
ChannelPreviewPropsType
>
=
(
props
)
=>
{
const
{
query
:
{
id
,
template
}
}
=
props
.
location
const
userInfo
=
getAuth
()
||
{}
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
true
)
const
[
theme
,
setTheme
]
=
useState
<
string
>
(
'theme-channel-science'
)
const
[
componentConfigs
,
setComponentConfigs
]
=
useState
({})
...
...
@@ -47,7 +49,8 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
return
new
Promise
((
resolve
)
=>
{
const
params
:
any
=
{
templateId
:
id
,
type
:
1
type
:
1
,
memberId
:
userInfo
.
memberId
}
PublicApi
.
getTemplateChannelFindAdvertsByType
(
params
).
then
(
res
=>
{
...
...
@@ -64,7 +67,8 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
return
new
Promise
((
resolve
)
=>
{
const
params
:
any
=
{
templateId
:
id
,
type
:
2
type
:
2
,
memberId
:
userInfo
.
memberId
}
PublicApi
.
getTemplateChannelFindAdvertsByType
(
params
).
then
(
res
=>
{
...
...
@@ -82,7 +86,10 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
*/
const
fetchFirstCategory
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
PublicApi
.
getTemplateChannelFindAllFirstCategory
().
then
(
res
=>
{
const
params
:
any
=
{
memberId
:
userInfo
.
memberId
}
PublicApi
.
getTemplateChannelFindAllFirstCategory
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
...
...
@@ -97,7 +104,8 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
return
new
Promise
((
resolve
)
=>
{
const
param
:
any
=
{
templateId
:
id
,
categoryId
categoryId
,
memberId
:
userInfo
.
memberId
}
PublicApi
.
getTemplateChannelFindFirstCategoryDetail
(
param
).
then
(
res
=>
{
...
...
@@ -112,7 +120,10 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
*/
const
fetchShopInfo
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
PublicApi
.
getTemplateChannelFindChannel
().
then
(
res
=>
{
const
params
:
any
=
{
memberId
:
userInfo
.
memberId
}
PublicApi
.
getTemplateChannelFindChannel
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
...
...
src/pages/lxMall/commodityDetail/index.tsx
View file @
82899bd1
...
...
@@ -518,6 +518,7 @@ const CommodityDetail = (props) => {
shopId
:
storeId
,
memberRoleId
:
commodityDetail
.
memberRoleId
}
PublicApi
.
postOrderDirectPayment
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
message
.
destroy
()
...
...
src/pages/lxMall/components/SideNav/index.tsx
View file @
82899bd1
...
...
@@ -56,7 +56,7 @@ const SideNav: React.FC<SideNavPropsType> = (props) => {
<
div
className=
"side_nav_list_item"
onClick=
{
()
=>
linkToPurchaseOrder
()
}
>
<
MyIcon
type=
"icon-gouwuche"
/>
</
div
>
<
div
className=
"side_nav_list_item"
>
<
div
className=
"side_nav_list_item"
onClick=
{
()
=>
history
.
push
(
'/memberCenter/systemSetting/message'
)
}
>
<
MyIcon
type=
"icon-xiaoxi"
/>
</
div
>
<
div
className=
"side_nav_list_item"
>
...
...
src/utils/index.tsx
View file @
82899bd1
...
...
@@ -13,7 +13,7 @@ export function isObject(obj: any) {
return
Object
.
prototype
.
toString
.
call
(
obj
)
===
'[object Object]'
}
export
function
formatTimeString
(
date
,
format
:
string
=
'YYYY-MM-DD HH:mm:ss'
)
{
export
function
formatTimeString
(
date
,
format
=
'YYYY-MM-DD HH:mm:ss'
)
{
return
date
?
moment
(
date
).
format
(
format
)
:
''
}
...
...
@@ -115,7 +115,7 @@ export function timeRange(val: number) {
export
const
arrayGroupsByCount
=
(
array
,
count
)
=>
{
let
index
=
0
;
le
t
newArray
=
[];
cons
t
newArray
=
[];
while
(
index
<
array
.
length
)
{
newArray
.
push
(
array
.
slice
(
index
,
index
+=
count
));
}
...
...
@@ -139,7 +139,7 @@ export function isPrimeNum(num) {
if
(
!
isThree
(
num
))
{
return
false
;
}
for
(
var
i
=
2
;
i
<
num
/
5
+
1
;
i
++
)
{
for
(
let
i
=
2
;
i
<
num
/
5
+
1
;
i
++
)
{
if
(
num
%
i
==
0
)
{
return
false
;
}
...
...
@@ -154,13 +154,13 @@ function isNum(num) {
}
function
isDual
(
num
)
{
var
num
=
num
.
toString
();
var
lastNum
=
num
.
substring
(
num
.
length
-
1
,
num
.
length
);
const
lastNum
=
num
.
substring
(
num
.
length
-
1
,
num
.
length
);
return
lastNum
%
2
==
0
||
lastNum
%
5
==
0
?
false
:
true
;
}
function
isThree
(
num
)
{
var
str
=
num
.
toString
();
var
sum
=
0
;
for
(
var
i
=
0
;
i
<
str
.
length
;
i
++
)
{
const
str
=
num
.
toString
();
let
sum
=
0
;
for
(
let
i
=
0
;
i
<
str
.
length
;
i
++
)
{
sum
+=
+
str
.
substring
(
i
,
i
+
1
);
};
return
sum
%
3
==
0
?
false
:
true
;
...
...
@@ -528,7 +528,7 @@ export const findLastIndexFlowState = (data: any[], customKey = 'isExecute'): nu
}
// 循环数据,找到状态值,一直覆盖
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
(
!
Boolean
(
data
[
i
][
customKey
])
)
{
if
(
!
data
[
i
][
customKey
]
)
{
index
=
i
-
1
;
}
// 循环到最后如果 index 还是为 0 的话,说明工作流全部跑完了,此时 index 为 data.length - 1
...
...
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