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
a6c99d3e
Commit
a6c99d3e
authored
Aug 06, 2021
by
lihui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:node-problem
parent
afb46957
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
36 deletions
+52
-36
activity.js
server/controllers/activity.js
+2
-0
request.js
server/utils/request.js
+4
-4
infoEditing.vue
src/pages/Activity/releaseProduc/components/infoEditing.vue
+28
-15
spellOrderSet.vue
...pages/Activity/releaseProduc/components/spellOrderSet.vue
+8
-7
index.vue
src/pages/Activity/releaseProduc/index.vue
+10
-10
No files found.
server/controllers/activity.js
View file @
a6c99d3e
...
@@ -152,12 +152,14 @@ exports.checkActivityDetailInfo = async ctx => {
...
@@ -152,12 +152,14 @@ exports.checkActivityDetailInfo = async ctx => {
// 获取自提点列表
// 获取自提点列表
exports
.
getPlaceList
=
async
ctx
=>
{
exports
.
getPlaceList
=
async
ctx
=>
{
console
.
log
(
"执行-------------------"
);
const
url
=
`
${
ACTIVITY_URI
}
/marketing/background/take_place_list`
;
const
url
=
`
${
ACTIVITY_URI
}
/marketing/background/take_place_list`
;
const
opts
=
{
const
opts
=
{
url
,
url
,
method
:
"GET"
method
:
"GET"
};
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
ctx
.
body
=
await
req
(
ctx
,
opts
);
console
.
log
(
"lihui"
,
ctx
.
body
);
};
};
// 添加自提点
// 添加自提点
...
...
server/utils/request.js
View file @
a6c99d3e
const
request
=
require
(
"request"
);
const
request
=
require
(
"request"
);
exports
.
httpReq
=
(
ctx
,
opts
)
=>
{
exports
.
httpReq
=
(
ctx
,
opts
)
=>
{
opts
.
timeout
=
opts
.
timeout
||
1000
;
// opts.timeout = opts.timeout || 10000;
opts
.
timeout
=
10000
;
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
var
time_start
=
+
new
Date
();
var
time_start
=
+
new
Date
();
...
@@ -18,7 +19,8 @@ exports.httpReq = (ctx, opts) => {
...
@@ -18,7 +19,8 @@ exports.httpReq = (ctx, opts) => {
request
(
opts
,
(
err
,
res
,
body
)
=>
{
request
(
opts
,
(
err
,
res
,
body
)
=>
{
console
.
info
(
console
.
info
(
`[Api] httpReq (
${
opts
.
url
}
, user:[
${
opts
.
qs
.
op_cur_user
`[Api] httpReq (
${
opts
.
url
}
, user:[
${
opts
.
qs
.
op_cur_user
}
]) spent:
${
+
new
Date
()
-
time_start
}
ms`
}
]) spent:
${
+
new
Date
()
-
time_start
}
ms`
);
);
...
@@ -31,5 +33,3 @@ exports.httpReq = (ctx, opts) => {
...
@@ -31,5 +33,3 @@ exports.httpReq = (ctx, opts) => {
});
});
});
});
};
};
src/pages/Activity/releaseProduc/components/infoEditing.vue
View file @
a6c99d3e
...
@@ -50,7 +50,7 @@ export default {
...
@@ -50,7 +50,7 @@ export default {
props
:
{
props
:
{
editInfo
:
{
editInfo
:
{
type
:
Object
,
type
:
Object
,
required
:
()
=>
{}
default
:
()
=>
{}
}
}
},
},
data
()
{
data
()
{
...
@@ -91,33 +91,46 @@ export default {
...
@@ -91,33 +91,46 @@ export default {
// 获取营销活动详情
// 获取营销活动详情
marketingInfoMet
()
{
marketingInfoMet
()
{
console
.
log
(
"执行"
);
let
marketingId
=
this
.
$route
.
query
.
marketing_id
;
let
marketingId
=
this
.
$route
.
query
.
marketing_id
;
if
(
marketingId
==
undefined
)
{
if
(
marketingId
==
undefined
)
{
return
;
return
;
}
}
this
.
propData
=
JSON
.
parse
(
localStorage
.
getItem
(
"propData"
));
this
.
propData
=
JSON
.
parse
(
localStorage
.
getItem
(
"propData"
));
this
.
infoEditForm
.
title
=
this
.
propData
.
marketing_name
;
this
.
infoEditForm
.
title
=
this
.
editInfo
.
marketing_name
;
this
.
infoEditForm
.
desc
=
this
.
propData
.
pindan_desc
;
this
.
infoEditForm
.
desc
=
this
.
editInfo
.
pindan_desc
;
for
(
var
i
in
this
.
propData
.
pindan_pic_url
)
{
//
for (var i in this.propData.pindan_pic_url) {
this
.
infoEditForm
.
picUrlList
.
push
({
//
this.infoEditForm.picUrlList.push({
url
:
this
.
propData
.
pindan_pic_url
[
i
]
//
url: this.propData.pindan_pic_url[i]
});
//
});
}
//
}
}
}
},
},
watch
:
{
watch
:
{
editInfo
:
function
(
newVal
)
{
// editInfo: function(newVal) {
let
marketingId
=
this
.
$route
.
query
.
marketing_id
;
// let marketingId = this.$route.query.marketing_id;
if
(
marketingId
==
undefined
)
{
// if (marketingId == undefined) {
return
;
// return;
}
// }
localStorage
.
setItem
(
"propData"
,
JSON
.
stringify
(
newVal
));
// localStorage.setItem("propData", JSON.stringify(newVal));
// }
editInfo
:
{
// 监听props属性 展示自提点列表
handler
:
function
()
{
// TO DO
// console.log("watch");
// console.log("newVal:", newVal);
// console.log("oldVal:", oldVal);
this
.
marketingInfoMet
();
},
deep
:
true
// immediate: true
}
}
},
},
created
()
{
created
()
{
this
.
marketingInfoMet
();
//
this.marketingInfoMet();
}
}
};
};
</
script
>
</
script
>
...
...
src/pages/Activity/releaseProduc/components/spellOrderSet.vue
View file @
a6c99d3e
...
@@ -322,10 +322,11 @@ export default {
...
@@ -322,10 +322,11 @@ export default {
watch
:
{
watch
:
{
spellOrderSetArr
:
{
spellOrderSetArr
:
{
// 监听props属性 展示自提点列表
// 监听props属性 展示自提点列表
handler
:
function
(
newVal
,
oldVal
)
{
handler
:
function
()
{
// TO DO
// TO DO
console
.
log
(
"newVal:"
,
newVal
);
// let a = newVal;
console
.
log
(
"oldVal:"
,
oldVal
);
// console.log("newVal:", newVal);
// console.log("oldVal:", oldVal);
}
,
}
,
deep
:
true
,
deep
:
true
,
immediate
:
true
immediate
:
true
...
@@ -374,7 +375,7 @@ export default {
...
@@ -374,7 +375,7 @@ export default {
let
params
=
Object
.
assign
(
this
.
form
,
{
let
params
=
Object
.
assign
(
this
.
form
,
{
take_place_id
:
this
.
id
//搜索关键词
take_place_id
:
this
.
id
//搜索关键词
}
);
}
);
console
.
log
(
this
.
form
);
//
console.log(this.form);
try
{
try
{
this
.
pageLoading
=
true
;
this
.
pageLoading
=
true
;
await
ActivityService
.
addPlace
(
params
);
await
ActivityService
.
addPlace
(
params
);
...
@@ -436,7 +437,7 @@ export default {
...
@@ -436,7 +437,7 @@ export default {
}
,
}
,
// 复选框
// 复选框
handleSelectionChange
(
val
)
{
handleSelectionChange
(
val
)
{
console
.
log
(
"lihui"
,
val
);
//
console.log("lihui", val);
this
.
checkedNum
=
val
.
length
;
this
.
checkedNum
=
val
.
length
;
this
.
multipleSelection
=
val
;
this
.
multipleSelection
=
val
;
let
takePlaceIds
=
""
;
let
takePlaceIds
=
""
;
...
@@ -451,7 +452,7 @@ export default {
...
@@ -451,7 +452,7 @@ export default {
}
,
}
,
// 勾选某些列表的操作
// 勾选某些列表的操作
toggleSelection
(
rows
)
{
toggleSelection
(
rows
)
{
console
.
log
(
"liuna"
,
rows
);
//
console.log("liuna", rows);
if
(
rows
)
{
if
(
rows
)
{
rows
.
forEach
(
row
=>
{
rows
.
forEach
(
row
=>
{
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
row
);
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
row
);
...
@@ -483,7 +484,7 @@ export default {
...
@@ -483,7 +484,7 @@ export default {
if
(
this
.
$route
.
query
.
marketing_id
)
{
if
(
this
.
$route
.
query
.
marketing_id
)
{
// 此时需要两份数据对比
// 此时需要两份数据对比
this
.
hasCheckedList
=
true
;
this
.
hasCheckedList
=
true
;
console
.
log
(
this
.
spellOrderSetArr
);
//
console.log(this.spellOrderSetArr);
this
.
checkedTakePlacelist
=
this
.
setTableListData
(
this
.
spellOrderSetArr
);
// 选中的自提点列表
this
.
checkedTakePlacelist
=
this
.
setTableListData
(
this
.
spellOrderSetArr
);
// 选中的自提点列表
this
.
toggleSelection
(
this
.
checkedTakePlacelist
);
this
.
toggleSelection
(
this
.
checkedTakePlacelist
);
}
}
...
...
src/pages/Activity/releaseProduc/index.vue
View file @
a6c99d3e
...
@@ -20,13 +20,13 @@
...
@@ -20,13 +20,13 @@
/>
/>
<addProduc
<addProduc
ref=
"addProduc"
ref=
"addProduc"
v-show=
"active ===
2
"
v-show=
"active ===
3
"
:editInfo=
"infoEditArr"
:editInfo=
"infoEditArr"
:addProduc=
"addProducArr"
:addProduc=
"addProducArr"
/>
/>
<spellOrderSet
<spellOrderSet
ref=
"spellOrderSet"
ref=
"spellOrderSet"
v-show=
"active ===
3
"
v-show=
"active ===
2
"
:spellOrderSet=
"spellOrderSetArr"
:spellOrderSet=
"spellOrderSetArr"
@
getTakeTakePlaceListFromChild=
"getTakeTakePlaceListFromChild"
@
getTakeTakePlaceListFromChild=
"getTakeTakePlaceListFromChild"
/>
/>
...
@@ -65,7 +65,7 @@ export default {
...
@@ -65,7 +65,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
active
:
3
,
// 步骤条状态
active
:
2
,
// 步骤条状态
infoEditArr
:
[],
// 信息编辑数据
infoEditArr
:
[],
// 信息编辑数据
addProducArr
:
[],
// 添加商品
addProducArr
:
[],
// 添加商品
goodsSkuIDArr
:
[],
// 接收goods_sku_id
goodsSkuIDArr
:
[],
// 接收goods_sku_id
...
@@ -88,13 +88,13 @@ export default {
...
@@ -88,13 +88,13 @@ export default {
ElMessage
.
error
(
"请填写商品标题"
);
ElMessage
.
error
(
"请填写商品标题"
);
return
;
return
;
}
}
this
.
infoEditArr
=
{
//
this.infoEditArr = {
title
:
this
.
$refs
.
infoEdit
.
infoEditForm
.
title
,
//
title: this.$refs.infoEdit.infoEditForm.title,
desc
:
this
.
$refs
.
infoEdit
.
infoEditForm
.
desc
,
//
desc: this.$refs.infoEdit.infoEditForm.desc,
picUploadList
:
this
.
$refs
.
infoEdit
.
infoEditForm
.
picUploadList
.
join
(
//
picUploadList: this.$refs.infoEdit.infoEditForm.picUploadList.join(
","
//
","
)
//
)
};
//
};
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
)
{
...
...
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