Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
marketing
Overview
Overview
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
marketing-web
marketing
Commits
793f1d58
Commit
793f1d58
authored
Mar 08, 2022
by
chenyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: update
parent
63214804
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
180 additions
and
2 deletions
+180
-2
index.vue
src/components/layout/index.vue
+4
-2
index.js
src/router/index.js
+1
-0
routes.js
src/router/routes.js
+6
-0
activityCenterApi.js
src/service/api/activityCenterApi.js
+8
-0
ListItem.vue
src/views/activityCenter/components/ListItem.vue
+113
-0
index.vue
src/views/activityCenter/index.vue
+48
-0
No files found.
src/components/layout/index.vue
View file @
793f1d58
<
template
>
<div
class=
"layout-container"
>
<
!--
<
div
class=
"layout-container"
>
<vue-gic-header
class=
"user-header-pop"
style=
"z-index: 1999;"
:projectName=
"projectName"
:collapseFlag=
"collapseFlag"
@
collapseTag=
"collapseTagHandler"
@
toRouterView=
"toRouterView"
></vue-gic-header>
<div
class=
"layout"
>
<aside-menu
class=
"layout-left"
v-if=
"asideShow"
:projectName=
"projectName"
:leftModulesName=
"leftModulesName"
:collapseFlag
.
sync=
"collapseFlag"
></aside-menu>
...
...
@@ -22,10 +22,12 @@
<router-view></router-view>
</div>
</div>
<!--
<vue-gic-footer></vue-gic-footer>
-->
</div>
</div>
<description
:drawer
.
sync=
"drawer"
:direction=
"direction"
:contentTitle=
"contentTitle"
/>
</div>
-->
<div>
<dm-layout
projectName=
"integral-mall"
>
<router-view
/></dm-layout>
</div>
</
template
>
<
script
>
...
...
src/router/index.js
View file @
793f1d58
...
...
@@ -7,6 +7,7 @@ import axios from 'axios';
Vue
.
use
(
Router
);
let
router
=
new
Router
({
base
:
'/marketing/'
,
routes
,
// scrollBehavior: () => ({ y: 0 })
//使用keep-alive标签后部分安卓机返回缓存页位置不精确问题
...
...
src/router/routes.js
View file @
793f1d58
...
...
@@ -4,6 +4,7 @@ import page401 from '@/views/error/401';
import
page403
from
'@/views/error/403'
;
import
page404
from
'@/views/error/404'
;
import
page500
from
'@/views/error/500'
;
import
activityCenter
from
'@/views/activityCenter'
;
//微信营销
import
wechat
from
'./modules/wechat'
;
...
...
@@ -43,6 +44,11 @@ export default [
children
:
[
card
,
ecm
,
scan
,
game
,
message
,
wechat
,
msg
,
calllog
,
recharge
,
evaluation
,
ewash
,
activity
,
cdKey
,
pop
,
signIn
]
},
{
path
:
'/marketing-app-list'
,
name
:
'营销活动'
,
component
:
activityCenter
},
{
path
:
'/401'
,
name
:
'未授权'
,
component
:
page401
...
...
src/service/api/activityCenterApi.js
0 → 100644
View file @
793f1d58
import
{
requests
}
from
'./index'
;
const
PREFIX
=
'api-marketing/'
;
import
config
from
'@/config'
;
export
const
url
=
config
.
api
+
PREFIX
;
// 营销中心活动列表
export
const
activityList
=
params
=>
requests
(
PREFIX
+
'marketing/activity/getList'
,
params
);
src/views/activityCenter/components/ListItem.vue
0 → 100644
View file @
793f1d58
<
template
>
<div
class=
"activity-center-list-item"
>
<header
class=
"item-header"
>
<i
class=
"column-line"
></i><span
class=
"item-header-title"
>
{{
title
}}
</span>
</header>
<div
class=
"flex-wrap"
>
<div
class=
"card-item"
v-for=
"card in list"
:key=
"card"
@
click=
"jump(card.jumpUrl)"
>
<el-image
style=
"width: 40px; height: 40px;margin-right:12px;"
:src=
"card.activityImage"
fit=
"cover"
/>
<div
class=
"card-right"
>
<p
class=
"card-right-title"
>
{{
card
.
activityName
}}
</p>
<p
class=
"card-right-explain"
>
{{
card
.
activityExplain
}}
</p>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
'ListItem'
,
props
:
{
item
:
{
type
:
Object
,
default
()
{
return
{
activityCategoryId
:
''
,
categoryName
:
''
,
childs
:
[]
};
}
}
},
watch
:
{
item
:
{
handler
:
function
(
n
,
o
)
{
this
.
title
=
n
.
categoryName
;
this
.
list
=
[...
n
.
childs
];
},
deep
:
true
,
immediate
:
true
}
},
data
()
{
return
{
list
:
[],
title
:
''
};
},
methods
:
{
jump
(
url
=
''
)
{
if
(
url
)
window
.
location
.
href
=
url
;
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.activity-center-list-item
{
&
+
.activity-center-list-item
{
margin-top
:
40px
;
}
.item-header
{
display
:
flex
;
align-items
:
center
;
height
:
22px
;
margin-bottom
:
20px
;
cursor
:
default
;
.column-line
{
display
:
block
;
width
:
3px
;
height
:
16px
;
margin-right
:
8px
;
background
:
#2f54eb
;
}
&
-title
{
font-size
:
16px
;
font-weight
:
500
;
color
:
#303133
;
line-height
:
22px
;
}
}
.flex-wrap
{
display
:
flex
;
flex-wrap
:
wrap
;
gap
:
16px
;
.card-item
{
display
:
flex
;
align-items
:
center
;
width
:
280px
;
height
:
76px
;
padding-left
:
16px
;
background
:
#f5f6f7
;
border-radius
:
4px
;
cursor
:
pointer
;
transition
:
all
0.3s
;
&:hover
{
background
:
#ebecf0
;
transform
:
translateY
(
-5px
);
}
.card-right-title
{
margin-bottom
:
3px
;
font-size
:
14px
;
font-weight
:
500
;
color
:
#303133
;
line-height
:
20px
;
}
.card-right-explain
{
font-size
:
12px
;
color
:
#606266
;
line-height
:
17px
;
}
}
}
}
</
style
>
src/views/activityCenter/index.vue
0 → 100644
View file @
793f1d58
<
template
>
<dm-layout
projectName=
"integral-mall"
>
<div
style=
"padding:20px;"
>
<list-item
v-for=
"item in list"
:key=
"item"
:item=
"item"
/>
</div>
</dm-layout>
</
template
>
<
script
>
import
ListItem
from
'./components/ListItem.vue'
;
import
{
activityList
}
from
'@/service/api/activityCenterApi.js'
;
export
default
{
components
:
{
ListItem
},
data
()
{
return
{
list
:
[]
};
},
created
()
{
this
.
$store
.
commit
(
'mutations_breadcrumb'
,
[{
name
:
'营销管理'
},
{
name
:
'微信营销'
,
path
:
'/wechat'
},
{
name
:
'素材库'
,
path
:
''
}]);
this
.
$store
.
commit
(
'aside_handler'
,
false
);
this
.
$nextTick
(
_
=>
{
this
.
$store
.
commit
(
'aside_handler'
,
true
);
});
},
mounted
()
{
this
.
getLIst
();
},
methods
:
{
async
getLIst
()
{
const
{
result
=
[]
}
=
await
activityList
({
orderBy
:
'activity_sort ASC'
});
console
.
log
(
result
);
const
map
=
{};
result
.
forEach
(
el
=>
{
if
(
map
[
el
.
activityCategoryId
])
{
map
[
el
.
activityCategoryId
].
childs
.
push
({
...
el
});
}
else
{
map
[
el
.
activityCategoryId
]
=
{
activityCategoryId
:
el
.
activityCategoryId
,
categoryName
:
el
.
categoryName
,
childs
:
[{
...
el
}]
};
}
});
this
.
list
=
Object
.
values
(
map
);
}
}
};
</
script
>
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