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
79b5a16b
Commit
79b5a16b
authored
May 22, 2020
by
chenxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:限流js;卡券领取记录 默认时间获取
parent
fcf49318
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
10 deletions
+38
-10
main.js
src/main.js
+13
-6
cardApi.js
src/service/api/cardApi.js
+3
-0
marketing.js
src/store/modules/marketing.js
+6
-0
destroy-list.vue
src/views/card/destroy-list.vue
+1
-1
record-get.vue
src/views/card/record-get.vue
+15
-3
No files found.
src/main.js
View file @
79b5a16b
...
...
@@ -4,6 +4,7 @@ import router from './router';
import
store
from
'./store'
;
import
{
axios
}
from
'./service/api/index'
;
import
directives
from
'./directives'
;
import
limit
from
'@/utils/limiting'
;
Vue
.
config
.
productionTip
=
false
;
if
(
process
.
env
.
NODE_ENV
==
'development'
)
{
// eslint-disable-line
...
...
@@ -31,10 +32,16 @@ Vue.prototype.$tips = function({ message = '提示', type = 'success' }) {
};
/* eslint-disable no-new */
new
Vue
({
el
:
'#app'
,
router
,
store
,
components
:
{
App
},
template
:
'<App/>'
limit
({
isApp
:
true
,
createApp
()
{
new
Vue
({
el
:
'#app'
,
router
,
store
,
components
:
{
App
},
template
:
'<App/>'
});
}
});
src/service/api/cardApi.js
View file @
79b5a16b
...
...
@@ -39,6 +39,9 @@ export const saveUpdateCard = params => requests(PREFIX + 'save-update-card', pa
//卡券营销--卡券记录--投放记录/领取记录
export
const
cardRecordPage
=
params
=>
requests
(
PREFIX
+
'card-record-page'
,
params
);
// 卡券营销--会员领取记录--获取领取记录默认时间段
export
const
getCouponDateLimit
=
params
=>
requests
(
PREFIX
+
'coupon-date-limit'
,
params
);
//卡券营销--卡券记录--投放记录/领取记录 - 投放记录
export
const
cardPutOnRecord
=
params
=>
requests
(
PREFIX
+
'card-put-on-record'
,
params
);
...
...
src/store/modules/marketing.js
View file @
79b5a16b
...
...
@@ -2,6 +2,7 @@ import { getIsShowSelf } from '@/service/api/commonApi.js';
// initial state
const
state
=
{
enterpriseId
:
''
,
// 企业id
all
:
0
,
cartData
:
[],
total
:
0
,
...
...
@@ -52,6 +53,11 @@ const actions = {
// mutations
const
mutations
=
{
// 更新企业id
updateEnterpriseId
(
state
,
id
)
{
state
.
enterpriseId
=
id
;
},
mutations_setAll
(
state
,
num
)
{
state
.
all
=
num
;
},
...
...
src/views/card/destroy-list.vue
View file @
79b5a16b
...
...
@@ -104,7 +104,7 @@ export default {
try
{
let
res
=
await
pageCoupDestoryPlan
(
this
.
listParams
);
this
.
tableList
=
res
.
result
.
result
||
[];
this
.
total
=
res
.
totalCount
||
0
;
this
.
total
=
res
.
result
.
totalCount
||
0
;
}
catch
(
err
)
{
this
.
$tips
({
type
:
'error'
,
message
:
'加载列表失败'
});
}
...
...
src/views/card/record-get.vue
View file @
79b5a16b
...
...
@@ -99,7 +99,7 @@
</template>
<
script
>
import
{
formatDateTimeByType
}
from
'@/utils/index.js'
;
import
{
cardRecordPage
,
coupcardDestroy
,
exportReceivedRecordExcel
}
from
'@/service/api/cardApi.js'
;
import
{
cardRecordPage
,
coupcardDestroy
,
exportReceivedRecordExcel
,
getCouponDateLimit
}
from
'@/service/api/cardApi.js'
;
import
cardOrder
from
'./card-order'
;
import
tableMethods
from
'@/mixins/tableMethods.js'
;
import
filterAvater
from
'@/mixins/filterAvater.js'
;
...
...
@@ -113,7 +113,7 @@ export default {
data
()
{
return
{
formatDateTimeByType
,
dateTime
:
[
Date
.
now
()
-
30
*
24
*
60
*
60
*
1000
,
Date
.
now
()
],
dateTime
:
[],
dateTime2
:
[
''
,
''
],
cardStatusOptions
:
[{
value
:
''
,
label
:
'全部卡券状态'
},
{
value
:
4
,
label
:
'待核销'
},
{
value
:
5
,
label
:
'已核销'
},
{
value
:
6
,
label
:
'已过期'
},
{
value
:
7
,
label
:
'已销毁'
},
{
value
:
8
,
label
:
'已占用'
}],
// eslint-disable-line
recordLoading
:
false
,
...
...
@@ -142,7 +142,7 @@ export default {
};
},
created
()
{
this
.
get
TableLis
t
();
this
.
get
CouponDateLimi
t
();
this
.
$store
.
commit
(
'mutations_breadcrumb'
,
[{
name
:
'营销管理'
,
path
:
''
},
{
name
:
'卡券营销'
,
path
:
''
},
{
name
:
'卡券记录'
,
path
:
''
},
{
name
:
'领取记录'
,
path
:
''
}]);
// eslint-disable-line
this
.
$store
.
commit
(
'mutations_layoutTips'
,
...
...
@@ -200,6 +200,18 @@ export default {
this
.
listParams
.
sortBy
=
val
.
order
===
'descending'
?
val
.
prop
+
' desc'
:
val
.
prop
;
this
.
getTableList
();
},
// 获取领取时间段
async
getCouponDateLimit
()
{
let
dateLimitRes
=
await
getCouponDateLimit
();
if
(
dateLimitRes
.
result
==
1
)
{
// 默认1周
this
.
dateTime
=
[
Date
.
now
()
-
0.25
*
30
*
24
*
60
*
60
*
1000
,
Date
.
now
()];
}
else
{
// 默认一个月
this
.
dateTime
=
[
Date
.
now
()
-
30
*
24
*
60
*
60
*
1000
,
Date
.
now
()];
}
this
.
getTableList
();
},
// 领取列表
async
getTableList
()
{
this
.
recordLoading
=
true
;
...
...
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