Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
op-web-service
Project
Project
Details
Activity
Releases
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
bp
op-web-service
Commits
bc156245
Commit
bc156245
authored
Aug 11, 2021
by
lihui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: bug-more
parent
bc8ee4ae
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
101 additions
and
29 deletions
+101
-29
activity.js
server/controllers/activity.js
+1
-1
router.js
server/router.js
+1
-1
YDDialog.vue
src/components/YDDialog.vue
+36
-0
index.vue
src/pages/Activity/Manage/index.vue
+5
-2
addProduc.vue
src/pages/Activity/releaseProduc/components/addProduc.vue
+22
-13
spellOrderSet.vue
...pages/Activity/releaseProduc/components/spellOrderSet.vue
+31
-9
index.vue
src/pages/Activity/releaseProduc/index.vue
+4
-2
index.js
src/service/Activity/index.js
+1
-1
No files found.
server/controllers/activity.js
View file @
bc156245
...
@@ -115,7 +115,7 @@ exports.marketingInfo = async ctx => {
...
@@ -115,7 +115,7 @@ exports.marketingInfo = async ctx => {
// 关闭/开启 活动
// 关闭/开启 活动
exports
.
updateActivity
=
async
ctx
=>
{
exports
.
updateActivity
=
async
ctx
=>
{
const
url
=
`
${
ACTIVITY_URI
}
/marketing/background/update_marketing`
;
const
url
=
`
${
ACTIVITY_URI
}
/marketing/background/update_marketing
_online_status
`
;
const
opts
=
{
const
opts
=
{
url
,
url
,
method
:
"POST"
,
method
:
"POST"
,
...
...
server/router.js
View file @
bc156245
...
@@ -68,7 +68,7 @@ router.post(`${API_VERSION}/merchant/authority/get_user_info`, user.getUser_deta
...
@@ -68,7 +68,7 @@ router.post(`${API_VERSION}/merchant/authority/get_user_info`, user.getUser_deta
router
.
get
(
`
${
API_VERSION
}
/marketing/background/marketing_list`
,
activity
.
getActivityList
)
router
.
get
(
`
${
API_VERSION
}
/marketing/background/marketing_list`
,
activity
.
getActivityList
)
router
.
get
(
`
${
API_VERSION
}
/order/background/pindan_marketing_info_data_statistics`
,
activity
.
checkActivityDetailInfo
)
router
.
get
(
`
${
API_VERSION
}
/order/background/pindan_marketing_info_data_statistics`
,
activity
.
checkActivityDetailInfo
)
router
.
post
(
`
${
API_VERSION
}
/goods/background/edit_goods`
,
activity
.
editGoodsDetail
)
router
.
post
(
`
${
API_VERSION
}
/goods/background/edit_goods`
,
activity
.
editGoodsDetail
)
router
.
post
(
`
${
API_VERSION
}
/marketing/background/update_marketing`
,
activity
.
updateActivity
)
router
.
post
(
`
${
API_VERSION
}
/marketing/background/update_marketing
_online_status
`
,
activity
.
updateActivity
)
router
.
post
(
`
${
API_VERSION
}
/marketing/background/marketing_info`
,
activity
.
checkActivityDetail
)
router
.
post
(
`
${
API_VERSION
}
/marketing/background/marketing_info`
,
activity
.
checkActivityDetail
)
//
//
router
.
get
(
`
${
API_VERSION
}
/marketing/background/take_place_list`
,
activity
.
getPlaceList
)
router
.
get
(
`
${
API_VERSION
}
/marketing/background/take_place_list`
,
activity
.
getPlaceList
)
...
...
src/components/YDDialog.vue
0 → 100644
View file @
bc156245
<
template
>
<el-dialog
title=
"提示"
v-model=
"dialogVisible"
width=
"30%"
:before-close=
"handleClose"
>
<span>
这是一段信息
</span>
<template
#
footer
>
<span
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"dialogVisible = false"
>
确 定
</el-button
>
</span>
</
template
>
</el-dialog>
</template>
<
script
>
export
default
{
components
:
{},
props
:
{},
data
()
{
return
{
dialogVisible
:
true
};
},
watch
:
{},
computed
:
{},
methods
:
{},
created
()
{},
mounted
()
{}
};
</
script
>
<
style
lang=
"less"
scoped
></
style
>
src/pages/Activity/Manage/index.vue
View file @
bc156245
...
@@ -155,6 +155,7 @@
...
@@ -155,6 +155,7 @@
<
/div
>
<
/div
>
<
/el-form
>
<
/el-form
>
<
/div
>
<
/div
>
<
YDDialog
/>
<
/layout
>
<
/layout
>
<
/template
>
<
/template
>
<
script
>
<
script
>
...
@@ -298,14 +299,16 @@ export default {
...
@@ -298,14 +299,16 @@ export default {
this
.
storeQuery
=
{
this
.
storeQuery
=
{
marketing_id
:
val
.
activiteId
,
marketing_id
:
val
.
activiteId
,
online_status
:
2
,
// 1 启用 2 关闭
online_status
:
2
,
// 1 启用 2 关闭
end_time
:
dayJs
().
format
(
"YYYY-MM-DD HH:mm:ss"
)
marketing_type
:
4
// end_time: dayJs().format("YYYY-MM-DD HH:mm:ss")
}
;
}
;
}
,
}
,
// 开始
// 开始
handleStart
(
val
)
{
handleStart
(
val
)
{
this
.
storeQuery
=
{
this
.
storeQuery
=
{
marketing_id
:
val
.
activiteId
,
marketing_id
:
val
.
activiteId
,
online_status
:
1
// 1 启用 2 关闭
online_status
:
1
,
// 1 启用 2 关闭
marketing_type
:
4
}
;
}
;
}
,
}
,
// 查看详情
// 查看详情
...
...
src/pages/Activity/releaseProduc/components/addProduc.vue
View file @
bc156245
...
@@ -253,6 +253,10 @@ export default {
...
@@ -253,6 +253,10 @@ export default {
addProduc
:
{
addProduc
:
{
type
:
Array
,
type
:
Array
,
required
:
()
=>
{}
required
:
()
=>
{}
},
stepTwoTitle
:
{
type
:
String
,
default
:
""
}
}
},
},
data
()
{
data
()
{
...
@@ -402,11 +406,16 @@ export default {
...
@@ -402,11 +406,16 @@ export default {
message
:
"修改成功"
,
message
:
"修改成功"
,
type
:
"success"
type
:
"success"
});
});
this
.
pindanGoodsMet
();
await
this
.
pindanGoodsMet
();
setTimeout
(()
=>
{
let
result
=
null
;
for
(
var
j
in
this
.
comLibTableData
)
{
if
(
this
.
comLibTableData
[
j
].
goods_sku_id
==
goodsSkuID
)
{
result
=
this
.
comLibTableData
[
j
];
}
}
for
(
var
i
in
this
.
comTableData
)
{
for
(
var
i
in
this
.
comTableData
)
{
if
(
this
.
comTableData
[
i
].
goods_sku_id
==
goodsSkuID
)
{
if
(
this
.
comTableData
[
i
].
goods_sku_id
==
result
.
goods_sku_id
)
{
this
.
comTableData
.
splice
(
i
,
1
,
this
.
comLibTableData
[
i
]
);
this
.
comTableData
.
splice
(
i
,
1
,
result
);
}
}
}
}
...
@@ -415,7 +424,7 @@ export default {
...
@@ -415,7 +424,7 @@ export default {
// this.comTableData.push(this.comLibTableData[j]);
// this.comTableData.push(this.comLibTableData[j]);
// }
// }
// }
// }
},
500
);
this
.
addCommodityPopup
=
false
;
this
.
addCommodityPopup
=
false
;
}
else
{
}
else
{
ElMessage
.
error
(
res
.
reason
);
ElMessage
.
error
(
res
.
reason
);
...
@@ -446,7 +455,7 @@ export default {
...
@@ -446,7 +455,7 @@ export default {
// 添加商品
// 添加商品
async
addGoodsMet
()
{
async
addGoodsMet
()
{
const
res
=
await
addGoods
({
const
res
=
await
addGoods
({
marketing_name
:
this
.
editInfo
.
t
itle
,
marketing_name
:
this
.
stepTwoT
itle
,
goods_name
:
this
.
commodityForm
.
goods_name
,
goods_name
:
this
.
commodityForm
.
goods_name
,
desc_pic_url
:
this
.
picUploadList
.
join
(
","
),
desc_pic_url
:
this
.
picUploadList
.
join
(
","
),
desc
:
""
,
desc
:
""
,
...
...
src/pages/Activity/releaseProduc/components/spellOrderSet.vue
View file @
bc156245
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
class=
"startTimePicker"
class=
"startTimePicker"
v-model=
"startDate"
v-model=
"startDate"
type=
"datetime"
type=
"datetime"
popper-class=
"date_picker"
:disabledDate=
"pickerOptions.disabledDateStart"
:disabledDate=
"pickerOptions.disabledDateStart"
placeholder=
"拼单开始时间"
placeholder=
"拼单开始时间"
@
change=
"changeStartTime"
@
change=
"changeStartTime"
...
@@ -15,14 +16,14 @@
...
@@ -15,14 +16,14 @@
<el-date-picker
<el-date-picker
class=
"endTimePicker"
class=
"endTimePicker"
v-model=
"endDate"
v-model=
"endDate"
:clearable=
"false"
type=
"datetime"
type=
"datetime"
placeholder=
"拼单结束时间"
placeholder=
"拼单结束时间"
:disabledDate=
"
pickerOptions.disabledDateEnd
"
:disabledDate=
"
option1
"
@
change=
"changeEndTime"
@
change=
"changeEndTime"
>
>
</el-date-picker>
</el-date-picker>
</div>
</div>
<!-- 自提点列表 -->
<!-- 自提点列表 -->
<div
<div
class=
"card-wrapper"
class=
"card-wrapper"
...
@@ -232,6 +233,7 @@ let checkphone = (rule, value, callback) => {
...
@@ -232,6 +233,7 @@ let checkphone = (rule, value, callback) => {
callback
();
callback
();
}
}
}
;
}
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -243,13 +245,7 @@ export default {
...
@@ -243,13 +245,7 @@ export default {
disabledDateStart
(
time
)
{
disabledDateStart
(
time
)
{
let
_now
=
Date
.
now
();
let
_now
=
Date
.
now
();
let
threeDays
=
_now
+
3
*
24
*
60
*
60
*
1000
;
let
threeDays
=
_now
+
3
*
24
*
60
*
60
*
1000
;
return
time
.
getTime
()
<
_now
||
time
.
getTime
()
>
threeDays
;
//大于当前的禁止,小于3天前的禁止
return
time
.
getTime
()
<
_now
-
8.64e7
||
time
.
getTime
()
>
threeDays
;
//大于当前的禁止,小于3天前的禁止
}
,
disabledDateEnd
(
time
)
{
let
_now
=
Date
.
now
();
let
ninety
=
90
*
24
*
60
*
60
*
1000
;
let
ninetyDays
=
_now
+
ninety
;
return
time
.
getTime
()
<
_now
||
time
.
getTime
()
>
ninetyDays
;
//大于当前的禁止,小于90天前的禁止
}
}
}
,
}
,
mapDialogVisible
:
false
,
mapDialogVisible
:
false
,
...
@@ -297,6 +293,22 @@ export default {
...
@@ -297,6 +293,22 @@ export default {
}
// 添加自提点 详细信息
}
// 添加自提点 详细信息
}
;
}
;
}
,
}
,
computed
:
{
option1
()
{
let
_this
=
this
;
return
function
(
time
)
{
let
_now
=
Date
.
now
();
let
ninety
=
90
*
24
*
60
*
60
*
1000
;
let
ninetyDays
=
_now
+
ninety
;
return
(
time
.
getTime
()
<
_this
.
startDate
-
8.64e7
||
time
.
getTime
()
<
_now
-
8.64e7
||
time
.
getTime
()
>
ninetyDays
);
//大于当前的禁止,小于90天前的禁止
}
;
}
}
,
props
:
{
props
:
{
spellOrderSetArr
:
{
spellOrderSetArr
:
{
type
:
Array
,
type
:
Array
,
...
@@ -509,6 +521,16 @@ export default {
...
@@ -509,6 +521,16 @@ export default {
<
/script
>
<
/script
>
<
style
lang
=
"less"
scope
>
<
style
lang
=
"less"
scope
>
.
el
-
picker
-
panel
{
.
el
-
picker
-
panel__footer
{
.
el
-
button
--
text
{
display
:
none
;
}
}
}
<
/style
>
<
style
lang
=
"less"
>
.
card
-
wrapper
{
.
card
-
wrapper
{
width
:
100
%
;
width
:
100
%
;
//height: 500px;
//height: 500px;
...
...
src/pages/Activity/releaseProduc/index.vue
View file @
bc156245
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
v-show=
"active === 2"
v-show=
"active === 2"
:addProduc=
"addProducArr"
:addProduc=
"addProducArr"
:editInfo=
"infoEditArr"
:editInfo=
"infoEditArr"
:stepTwoTitle=
"stepTwoTitle"
/>
/>
<spellOrderSet
<spellOrderSet
ref=
"spellOrderSet"
ref=
"spellOrderSet"
...
@@ -76,7 +77,8 @@ export default {
...
@@ -76,7 +77,8 @@ export default {
endDate
:
""
,
// 结束时间
endDate
:
""
,
// 结束时间
takePlaceIDArr
:
[],
takePlaceIDArr
:
[],
startTime
:
""
,
startTime
:
""
,
endTime
:
""
endTime
:
""
,
stepTwoTitle
:
""
// 传给addProduct的title
};
};
},
},
...
@@ -93,7 +95,7 @@ export default {
...
@@ -93,7 +95,7 @@ export default {
ElMessage
.
error
(
"请填写商品标题"
);
ElMessage
.
error
(
"请填写商品标题"
);
return
;
return
;
}
}
// this.infoEditArr.t
itle = this.$refs.infoEdit.infoEditForm.title;
this
.
stepTwoT
itle
=
this
.
$refs
.
infoEdit
.
infoEditForm
.
title
;
this
.
active
=
2
;
this
.
active
=
2
;
}
else
if
(
this
.
active
===
2
)
{
}
else
if
(
this
.
active
===
2
)
{
if
(
this
.
$refs
.
addProduc
.
comTableData
.
length
==
0
)
{
if
(
this
.
$refs
.
addProduc
.
comTableData
.
length
==
0
)
{
...
...
src/service/Activity/index.js
View file @
bc156245
...
@@ -82,7 +82,7 @@ class ActivityService {
...
@@ -82,7 +82,7 @@ class ActivityService {
// 关闭/开启 活动
// 关闭/开启 活动
static
async
updateActivity
(
query
)
{
static
async
updateActivity
(
query
)
{
const
res
=
await
axios
.
post
(
const
res
=
await
axios
.
post
(
"/api/v1/marketing/background/update_marketing"
,
"/api/v1/marketing/background/update_marketing
_online_status
"
,
{
{
...
query
...
query
}
}
...
...
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