Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
Y
ybf
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
xulili
ybf
Commits
21d3670f
Commit
21d3670f
authored
Apr 15, 2020
by
xd
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://114.67.93.201/xulili/ybf
parents
9c296e92
90bfc3a8
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
67 additions
and
34 deletions
+67
-34
active.js
wx_application/src/api/active.js
+11
-0
activeDetail.vue
wx_application/src/views/active/activeDetail.vue
+2
-2
activeList.vue
wx_application/src/views/active/activeList.vue
+51
-29
createActive.vue
wx_application/src/views/active/createActive.vue
+1
-1
createBigWheelActive.vue
wx_application/src/views/active/createBigWheelActive.vue
+1
-1
index.vue
wx_application/src/views/mainSale/active/template/index.vue
+1
-1
No files found.
wx_application/src/api/active.js
View file @
21d3670f
...
@@ -14,6 +14,17 @@ export function createActive(params) {
...
@@ -14,6 +14,17 @@ export function createActive(params) {
})
})
}
}
/**
* 删除活动
* @param {*} id 活动id
*/
export
function
deleteActive
(
id
)
{
return
request
({
url
:
`activity/delete?id=
${
id
}
`
,
method
:
'delete'
})
}
/**
/**
* 获取活动列表
* 获取活动列表
*/
*/
...
...
wx_application/src/views/active/activeDetail.vue
View file @
21d3670f
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<div
class=
"other"
>
<div
class=
"other"
>
<p>
满
{{
couponDetail
.
salesUnit
}}
元可用
</p>
<p>
满
{{
couponDetail
.
salesUnit
}}
元可用
</p>
<p>
<p>
有效期:
有效期
至
:
<span
style=
"font-size: 12px;"
>
{{
couponDetail
.
end_date
}}
</span>
<span
style=
"font-size: 12px;"
>
{{
couponDetail
.
end_date
}}
</span>
</p>
</p>
<p>
{{
couponDetail
.
deptId
}}
号店通用
</p>
<p>
{{
couponDetail
.
deptId
}}
号店通用
</p>
...
@@ -189,7 +189,7 @@ export default {
...
@@ -189,7 +189,7 @@ export default {
if
(
!
sessionStorage
.
getItem
(
"userId"
))
{
if
(
!
sessionStorage
.
getItem
(
"userId"
))
{
// 1.获取code
// 1.获取code
if
(
this
.
$route
.
query
.
unionid
===
undefined
)
{
if
(
this
.
$route
.
query
.
unionid
===
undefined
)
{
this
.
getUnionid
();
//
this.getUnionid();
}
else
{
}
else
{
this
.
userBaseInfo
.
unionid
=
JSON
.
stringify
(
this
.
$route
.
query
.
unionid
);
this
.
userBaseInfo
.
unionid
=
JSON
.
stringify
(
this
.
$route
.
query
.
unionid
);
this
.
userBaseInfo
.
openid
=
JSON
.
stringify
(
this
.
$route
.
query
.
openid
);
this
.
userBaseInfo
.
openid
=
JSON
.
stringify
(
this
.
$route
.
query
.
openid
);
...
...
wx_application/src/views/active/activeList.vue
View file @
21d3670f
...
@@ -5,12 +5,8 @@
...
@@ -5,12 +5,8 @@
</div>
</div>
<div
class=
"active"
>
<div
class=
"active"
>
<template
v-for=
"(item, index) in wheelList"
>
<template
v-for=
"(item, index) in wheelList"
>
<div
<van-swipe-cell
v-if=
"index
<
wheelActive
_limit
"
:key=
"item.id"
>
v-if=
"index
<
wheelActive
_limit
"
<div
class=
"list"
@
click=
"toDetail(item.id, item.activityType)"
>
class=
"list"
:key=
"item.id"
@
click=
"toDetail(item.id, item.activityType)"
>
<div
class=
"left"
>
<div
class=
"left"
>
<img
:src=
"item.logo"
alt=
"logo"
style=
"width:100%;height:100%;"
/>
<img
:src=
"item.logo"
alt=
"logo"
style=
"width:100%;height:100%;"
/>
</div>
</div>
...
@@ -19,6 +15,10 @@
...
@@ -19,6 +15,10 @@
<p>
{{
item
.
des
}}
</p>
<p>
{{
item
.
des
}}
</p>
</div>
</div>
</div>
</div>
<template
#
right
v-if=
"flag == 1"
>
<van-button
square
type=
"danger"
text=
"删除"
@
click=
"deleteWheelAct(item.id, index)"
/>
</
template
>
</van-swipe-cell>
</template>
</template>
<span
<span
class=
"more"
class=
"more"
...
@@ -32,7 +32,8 @@
...
@@ -32,7 +32,8 @@
<div
v-if=
"couponList.length > 0"
class=
"fg"
>
送券活动
</div>
<div
v-if=
"couponList.length > 0"
class=
"fg"
>
送券活动
</div>
<div
class=
"active"
>
<div
class=
"active"
>
<
template
v-for=
"(item, index) in couponList"
>
<
template
v-for=
"(item, index) in couponList"
>
<div
v-if=
"index
<
couponActive
_limit
"
class=
"list"
:key=
"item.id"
@
click=
"toDetail(item.id, item.activityType)"
>
<van-swipe-cell
v-if=
"index
<
couponActive
_limit
"
:key=
"item.id"
>
<div
class=
"list"
@
click=
"toDetail(item.id, item.activityType)"
>
<div
class=
"left"
>
<div
class=
"left"
>
<img
:src=
"item.logo"
alt=
"logo"
style=
"width:100%;height:100%;"
/>
<img
:src=
"item.logo"
alt=
"logo"
style=
"width:100%;height:100%;"
/>
</div>
</div>
...
@@ -41,6 +42,10 @@
...
@@ -41,6 +42,10 @@
<p>
{{
item
.
des
}}
</p>
<p>
{{
item
.
des
}}
</p>
</div>
</div>
</div>
</div>
<template
#
right
v-if=
"flag == 1"
>
<van-button
square
type=
"danger"
text=
"删除"
@
click=
"deleteCouponAct(item.id, index)"
/>
</
template
>
</van-swipe-cell>
</template>
</template>
<span
<span
class=
"more"
class=
"more"
...
@@ -59,6 +64,7 @@ import * as API_Active from "@/api/active";
...
@@ -59,6 +64,7 @@ import * as API_Active from "@/api/active";
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
flag
:
1
,
wheelActive_limit
:
3
,
wheelActive_limit
:
3
,
wheelList_finished
:
false
,
wheelList_finished
:
false
,
couponActive_limit
:
3
,
couponActive_limit
:
3
,
...
@@ -78,20 +84,37 @@ export default {
...
@@ -78,20 +84,37 @@ export default {
mounted
()
{
mounted
()
{
this
.
getWheelActive
();
this
.
getWheelActive
();
this
.
getCouponActive
();
this
.
getCouponActive
();
this
.
flag
=
sessionStorage
.
getItem
(
"role"
);
},
},
methods
:
{
methods
:
{
deleteCouponAct
(
id
,
index
)
{
API_Active
.
deleteActive
(
id
).
then
(
res
=>
{
if
(
res
.
result
===
"success"
)
{
this
.
couponList
.
splice
(
index
,
1
);
this
.
$toast
(
"删除成功!"
);
}
});
},
deleteWheelAct
(
id
,
index
)
{
API_Active
.
deleteActive
(
id
).
then
(
res
=>
{
if
(
res
.
result
===
"success"
)
{
this
.
wheelList
.
splice
(
index
,
1
);
this
.
$toast
(
"删除成功!"
);
}
});
},
async
getCouponActive
()
{
async
getCouponActive
()
{
let
res
=
await
this
.
getActiveList
(
"coupon"
);
let
res
=
await
this
.
getActiveList
(
"coupon"
);
this
.
couponList
.
push
.
apply
(
this
.
couponList
,
res
.
data
.
list
);
this
.
couponList
.
push
.
apply
(
this
.
couponList
,
res
.
data
.
list
);
if
(
res
.
data
.
list
===
[])
{
if
(
res
.
data
.
list
===
[])
{
this
.
couponList_finished
=
true
this
.
couponList_finished
=
true
;
}
}
},
},
async
getWheelActive
()
{
async
getWheelActive
()
{
let
res
=
await
this
.
getActiveList
(
"wheel"
);
let
res
=
await
this
.
getActiveList
(
"wheel"
);
this
.
wheelList
.
push
.
apply
(
this
.
wheelList
,
res
.
data
.
list
);
this
.
wheelList
.
push
.
apply
(
this
.
wheelList
,
res
.
data
.
list
);
if
(
res
.
data
.
list
===
[])
{
if
(
res
.
data
.
list
===
[])
{
this
.
wheelList_finished
=
true
this
.
wheelList_finished
=
true
;
}
}
},
},
handleActiveMore
(
type
)
{
handleActiveMore
(
type
)
{
...
@@ -102,16 +125,15 @@ export default {
...
@@ -102,16 +125,15 @@ export default {
}
else
if
(
type
===
"coupon"
)
{
}
else
if
(
type
===
"coupon"
)
{
this
.
couponActive_limit
+=
3
;
this
.
couponActive_limit
+=
3
;
this
.
coupon_params
.
pageNo
+=
1
;
this
.
coupon_params
.
pageNo
+=
1
;
this
.
getCouponActive
()
this
.
getCouponActive
()
;
}
}
},
},
// 获取 活动列表
// 获取 活动列表
async
getActiveList
(
type
)
{
async
getActiveList
(
type
)
{
let
page_params
=
{};
let
page_params
=
{};
if
(
type
===
'wheel'
)
{
if
(
type
===
"wheel"
)
{
page_params
=
this
.
wheel_params
;
page_params
=
this
.
wheel_params
;
}
}
else
if
(
type
===
"coupon"
)
{
else
if
(
type
===
'coupon'
)
{
page_params
=
this
.
coupon_params
;
page_params
=
this
.
coupon_params
;
}
}
let
params
=
{
let
params
=
{
...
@@ -128,7 +150,7 @@ export default {
...
@@ -128,7 +150,7 @@ export default {
query
:
{
query
:
{
id
:
active_id
,
id
:
active_id
,
active_type
:
type
,
active_type
:
type
,
iswxClient
:
'false'
iswxClient
:
"false"
}
}
});
});
}
}
...
...
wx_application/src/views/active/createActive.vue
View file @
21d3670f
...
@@ -172,7 +172,7 @@ export default {
...
@@ -172,7 +172,7 @@ export default {
};
};
},
},
created
()
{
created
()
{
this
.
minStartDate
=
new
Date
(
);
this
.
minStartDate
=
new
Date
(
(
new
Date
()
/
1000
+
3600
)
*
1000
)
this
.
minEndDate
=
new
Date
((
new
Date
()
/
1000
+
86400
)
*
1000
);
this
.
minEndDate
=
new
Date
((
new
Date
()
/
1000
+
86400
)
*
1000
);
},
},
methods
:
{
methods
:
{
...
...
wx_application/src/views/active/createBigWheelActive.vue
View file @
21d3670f
...
@@ -351,7 +351,7 @@ export default {
...
@@ -351,7 +351,7 @@ export default {
};
};
},
},
created
()
{
created
()
{
this
.
minStartDate
=
new
Date
();
this
.
minStartDate
=
new
Date
(
(
new
Date
()
/
1000
+
3600
)
*
1000
);
this
.
minEndDate
=
new
Date
((
new
Date
()
/
1000
+
86400
)
*
1000
);
this
.
minEndDate
=
new
Date
((
new
Date
()
/
1000
+
86400
)
*
1000
);
},
},
methods
:
{
methods
:
{
...
...
wx_application/src/views/mainSale/active/template/index.vue
View file @
21d3670f
...
@@ -59,7 +59,7 @@ export default {
...
@@ -59,7 +59,7 @@ export default {
},
},
methods
:
{
methods
:
{
deleteTemplate
(
tem_id
,
index
)
{
deleteTemplate
(
tem_id
,
index
)
{
API_Active
.
deleteTemplate
(
id
).
then
(
res
=>
{
API_Active
.
deleteTemplate
(
tem_
id
).
then
(
res
=>
{
if
(
res
.
result
===
'success'
)
{
if
(
res
.
result
===
'success'
)
{
this
.
active
.
splice
(
index
,
1
);
this
.
active
.
splice
(
index
,
1
);
this
.
$toast
(
'删除成功!'
);
this
.
$toast
(
'删除成功!'
);
...
...
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