Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a24470f2
authored
Jul 07, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
众筹模式-浏览明细
1 parent
cc83b24b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
185 additions
and
190 deletions
src/api/modules/seckillActivity.js
src/assets/css/public.scss
src/router/routes.js
src/views/seckillActivity/browseList.vue
src/views/seckillActivity/crowdFundDetail.vue
src/views/seckillActivity/crowdFundList.vue
src/api/modules/seckillActivity.js
View file @
a24470f
...
...
@@ -24,6 +24,17 @@ const getCrowdfundListApi = params => {
})
}
//分页浏览明细
const
getBrowseListApi
=
params
=>
{
params
.
method
=
'scrm.api.shopmall.customer.browse.records'
return
http
({
url
:
'rop-scrm-shopmall/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
//创建/编辑活动
const
addOrUpdateActivityApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
add.or.update`
...
...
@@ -94,4 +105,4 @@ const getSharedApi = params => {
})
}
export
default
{
getActivityPageApi
,
getCrowdfundListApi
,
toggleStatusApi
,
deleteActivityApi
,
topActivityApi
,
getSharedApi
,
addOrUpdateActivityApi
,
getActivityDetailApi
}
export
default
{
getActivityPageApi
,
getCrowdfundListApi
,
getBrowseListApi
,
toggleStatusApi
,
deleteActivityApi
,
topActivityApi
,
getSharedApi
,
addOrUpdateActivityApi
,
getActivityDetailApi
}
src/assets/css/public.scss
View file @
a24470f
...
...
@@ -235,6 +235,11 @@ html {
width
:
100%
;
}
.marketing
.img-36
{
width
:
36px
;
height
:
36px
;
}
.marketing
.img-60
{
width
:
60px
;
height
:
60px
;
...
...
@@ -299,10 +304,18 @@ html {
margin-right
:
20px
;
}
.marketing
.m-l-10
{
margin-left
:
10px
;
}
.marketing
.m-l-20
{
margin-left
:
20px
;
}
.marketing
.p-20
{
padding
:
20px
;
}
.marketing.p-t-10
,
.marketing
.p-t-10
{
padding-top
:
10px
;
...
...
@@ -565,10 +578,10 @@ html {
.marketing
.line-20
{
line-height
:
20px
;
}
.marketin
.weight-5
{
.marketin
g
.weight-5
{
font-weight
:
500
;
}
.marketin
.weight-4
{
.marketin
g
.weight-4
{
font-weight
:
400
;
}
.el-tooltip__popper.is-light
{
...
...
@@ -589,12 +602,12 @@ html {
z-index
:
4000
!
important
;
}
.loadingClass
{
.el-icon-loading
{
.loadingClass
{
.el-icon-loading
{
font-size
:
22px
;
}
.el-icon-loading
,
.el-loading-text
{
color
:
#5850ff
!
important
;
.el-loading-text
{
color
:
#5850ff
!
important
;
}
}
\ No newline at end of file
}
src/router/routes.js
View file @
a24470f
...
...
@@ -346,9 +346,9 @@ const staticRoutes = Object.freeze([
meta
:
{}
},
{
name
:
'
crowdFundDetail
'
,
path
:
'/seckillActivity/
crowdFundDetail
'
,
component
:
resolve
=>
require
([
`@/views/seckillActivity/
crowdFundDetail
.vue`
],
resolve
),
name
:
'
browseList
'
,
path
:
'/seckillActivity/
browseList
'
,
component
:
resolve
=>
require
([
`@/views/seckillActivity/
browseList
.vue`
],
resolve
),
meta
:
{}
}
])
...
...
src/views/seckillActivity/browseList.vue
0 → 100644
View file @
a24470f
<!-- 浏览明细 -->
<
template
>
<div
class=
"edit-share marketing p-t-20 edit-box"
>
<div
class=
"container edit-container"
>
<p
class=
"edit-title"
>
{{
routeInfo
.
activityName
}}
</p>
<div
class=
"p-20"
>
<GLCombiForm
ref=
"showSearch"
class=
"p-t-20"
:rowNumber=
"1"
:formObj=
"searchForm"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<!-- 表格区域 开始 -->
<GLTable
ref=
"browserRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<div
slot=
"customerName"
class=
"flex-align"
slot-scope=
"scope"
>
<el-popover
placement=
"top"
width=
"160"
trigger=
"hover"
popper-class=
"table-popover-block"
>
<img
class=
"table-popover-img"
:src=
"scope.scope.customerAvatar"
/>
<img
class=
"img-36 pointer"
slot=
"reference"
:src=
"scope.scope.customerAvatar"
/>
</el-popover>
<span
class=
"m-l-10"
>
{{
scope
.
scope
.
customerName
}}
</span>
</div>
<div
slot=
"shareName"
class=
"flex-align"
slot-scope=
"scope"
>
<el-popover
placement=
"top"
width=
"160"
trigger=
"hover"
popper-class=
"table-popover-block"
>
<img
class=
"table-popover-img"
:src=
"scope.scope.shareAvatar"
/>
<img
class=
"img-36 pointer"
slot=
"reference"
:src=
"scope.scope.shareAvatar"
/>
</el-popover>
<span
class=
"m-l-10"
>
{{
scope
.
scope
.
shareName
}}
</span>
</div>
</GLTable>
<!-- 表格区域 end -->
</div>
</div>
<div
class=
"footer"
:style=
"
{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button
type=
"default"
@
click=
"handleJump"
>
返回
</el-button>
</div>
</div>
</
template
>
<
script
>
import
*
as
dayjs
from
'dayjs'
import
url
from
'@/assets/empty.png'
export
default
{
name
:
'browseList'
,
data
()
{
return
{
size
:
'small'
,
url
:
url
,
footerLeft
:
'0'
,
footerWidth
:
'0'
,
routeInfo
:
{
id
:
''
,
activityName
:
''
},
searchForm
:
{
zoneName
:
''
},
// 搜索
searchFormData
:
[
{
label
:
'微信昵称'
,
name
:
'zoneName'
,
type
:
'input'
,
maxlength
:
50
},
{
label
:
'手机号'
,
name
:
'zoneName'
,
type
:
'input'
,
maxlength
:
11
}
],
// 表格
getListApi
:
this
.
$apis
.
seckillActivity
.
getBrowseListApi
,
tableParams
:
{
listName
:
'list'
,
tableColumns
:
[
{
label
:
'微信名称'
,
prop
:
'customerName'
,
addHtml
:
'customerName'
},
{
label
:
'手机号'
,
prop
:
'mobile'
},
{
label
:
'来源'
,
prop
:
'shareName'
,
addHtml
:
'shareName'
},
{
label
:
'浏览次数'
,
prop
:
'browseCount'
},
{
label
:
'浏览时间'
,
prop
:
'createdDate'
,
// width: '180',
formatter
:
cellValue
=>
{
return
dayjs
(
cellValue
.
createdDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
}
]
}
}
},
created
()
{
this
.
routeInfo
=
this
.
$route
.
query
},
mounted
()
{
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
},
methods
:
{
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
this
.
searchForm
.
activityId
=
this
.
routeInfo
.
id
resolve
()
})
},
handleJump
(
path
,
row
=
{})
{
this
.
$router
.
push
({
path
:
'/seckillActivity/crowdFundList'
})
},
setTableFinishFun
()
{
//接收到的数据为空
this
.
$refs
.
browserRef
.
data
.
length
?
(
this
.
$refs
.
browserRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
browserRef
.
setTableHeightFun
()
},
handleSearch
()
{
this
.
$refs
.
browserRef
.
refreshTable
()
},
handleReset
()
{
this
.
searchForm
=
{
zoneName
:
''
}
this
.
handleSearch
()
}
}
}
</
script
>
<
style
scoped
></
style
>
src/views/seckillActivity/crowdFundDetail.vue
deleted
100644 → 0
View file @
cc83b24
<!-- 专区管理 -->
<
template
>
<div
class=
"edit-share marketing p-t-20 edit-box"
>
<div
class=
"container edit-container"
>
<p
class=
"edit-title"
>
活动名称
</p>
<GLCombiForm
ref=
"showSearch"
class=
"p-t-20"
:rowNumber=
"1"
:formObj=
"searchForm"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<!-- 表格区域 开始 -->
<GLTable
ref=
"zoneRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<!--
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<GLTableButton
:buttonList=
"tableButtonList"
:buttonItem=
"scope.scope"
:buttonNum=
"3"
></GLTableButton>
</div>
-->
</GLTable>
<!-- 表格区域 end -->
</div>
</div>
</
template
>
<
script
>
import
*
as
dayjs
from
'dayjs'
import
url
from
'@/assets/empty.png'
export
default
{
name
:
'crowdFundDetail'
,
data
()
{
return
{
size
:
'small'
,
url
:
url
,
searchForm
:
{
zoneName
:
''
,
createDate
:
[]
},
tableSearchForm
:
{},
// 搜索
searchFormData
:
[
{
label
:
'专区名称'
,
name
:
'zoneName'
,
type
:
'input'
,
maxlength
:
20
},
{
label
:
'创建日期'
,
name
:
'createDate'
,
type
:
'datePicker'
,
isClear
:
true
,
pickerOptions
:
'beforeRangePickerOptions'
}
],
// 表格按钮
// tableButtonList: [
// {
// type: 'GLButton',
// name: '编辑',
// attrs: {
// type: 'text',
// fn: '编辑'
// },
// listeners: {
// click: row => this.handleEdit(2, row)
// }
// },
// {
// type: 'el-button',
// name: '删除',
// attrs: {
// type: 'text'
// },
// listeners: {
// click: this.handleDelete
// }
// }
// ],
// 表格
getListApi
:
this
.
$apis
.
zoneList
.
getZoneListApi
,
tableParams
:
{
listName
:
'list'
,
tableOption
:
true
,
tableColumns
:
[
{
label
:
'专区名称'
,
prop
:
'zoneName'
},
{
label
:
'创建日期'
,
prop
:
'createdDate'
,
// width: '180',
formatter
:
cellValue
=>
{
return
dayjs
(
cellValue
.
createdDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
}
]
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'currentPage'
,
totalCount
:
'total'
}
}
},
mounted
()
{
},
methods
:
{
getParams
()
{
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
params
.
zoneType
=
'2'
//专区类型(1发现频道,2商城专区)
if
(
this
.
searchForm
.
createDate
.
length
)
{
params
.
startTime
=
new
Date
(
this
.
searchForm
.
createDate
[
0
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 00:00:00'
params
.
endTime
=
new
Date
(
this
.
searchForm
.
createDate
[
1
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 23:59:59'
}
delete
params
.
createDate
return
params
},
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
this
.
tableSearchForm
=
this
.
getParams
()
delete
this
.
tableSearchForm
.
createDate
resolve
()
})
},
secondConfirm
(
title
,
txt
,
apiModule
,
apiName
,
apiParams
,
fn
)
{
this
.
$confirm
(
txt
,
title
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
callback
:
action
=>
{
if
(
action
==
'confirm'
)
{
this
.
$apis
[
apiModule
][
apiName
](
apiParams
).
then
(
res
=>
{
this
.
$message
({
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
if
(
res
.
code
==
'0'
)
{
fn
&&
fn
()
this
.
handleSearch
()
}
})
}
}
})
},
// 1-新增;2-编辑
handleEdit
(
addOrEdit
,
row
)
{
var
params
=
{
addOrEdit
:
addOrEdit
,
$title
:
encodeURI
(
addOrEdit
==
1
?
'新建专区'
:
'编辑专区'
)
}
addOrEdit
!=
1
&&
(
params
.
id
=
row
.
id
)
this
.
$router
.
push
({
path
:
'/zoneList/editZone'
,
query
:
params
})
},
handleDelete
(
row
)
{
this
.
secondConfirm
(
'删除'
,
'是否确认删除该专区?'
,
'zoneList'
,
'deleteZoneApi'
,
{
id
:
row
.
id
})
},
setTableFinishFun
()
{
//接收到的数据为空
this
.
$refs
.
zoneRef
.
data
.
length
?
(
this
.
$refs
.
zoneRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
zoneRef
.
setTableHeightFun
()
},
handleSearch
()
{
this
.
$refs
.
zoneRef
.
refreshTable
()
},
handleReset
()
{
this
.
searchForm
=
{
zoneName
:
''
,
createDate
:
[]
}
this
.
handleSearch
()
}
}
}
</
script
>
<
style
scoped
></
style
>
src/views/seckillActivity/crowdFundList.vue
View file @
a24470f
...
...
@@ -364,9 +364,10 @@ export default {
// 明细
handleDetail
(
row
)
{
this
.
$router
.
push
({
path
:
'/seckillActivity/
crowdFundDetail
'
,
path
:
'/seckillActivity/
browseList
'
,
query
:
{
id
:
row
.
id
id
:
row
.
id
,
activityName
:
row
.
activityName
}
})
},
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment