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
72b7c588
Commit
72b7c588
authored
Sep 13, 2021
by
jisiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:增加启用功能
parent
7e0bb981
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
3 deletions
+22
-3
package.json
package.json
+1
-0
goods.js
server/controllers/goods.js
+12
-0
router.js
server/router.js
+1
-0
index.vue
src/pages/Groupmeal/merchantManagement/index.vue
+3
-3
goods.js
src/service/Goods/goods.js
+5
-0
No files found.
package.json
View file @
72b7c588
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
"prod"
:
"sh ./bin/start.sh production"
,
"prod"
:
"sh ./bin/start.sh production"
,
"koa"
:
"nodemon app.js"
,
"koa"
:
"nodemon app.js"
,
"web-dev"
:
"cross-env NODE_ENV=development vue-cli-service serve"
,
"web-dev"
:
"cross-env NODE_ENV=development vue-cli-service serve"
,
"web-dev-test"
:
"cross-env NODE_ENV=test vue-cli-service serve"
,
"web-test"
:
"cross-env NODE_ENV=test vue-cli-service build"
,
"web-test"
:
"cross-env NODE_ENV=test vue-cli-service build"
,
"web-build"
:
"cross-env NODE_ENV=production vue-cli-service build"
,
"web-build"
:
"cross-env NODE_ENV=production vue-cli-service build"
,
"web-build-report"
:
"cross-env NODE_ENV=production vue-cli-service build --report"
,
"web-build-report"
:
"cross-env NODE_ENV=production vue-cli-service build --report"
,
...
...
server/controllers/goods.js
View file @
72b7c588
...
@@ -244,3 +244,15 @@ exports.updateOta = async (ctx) => {
...
@@ -244,3 +244,15 @@ exports.updateOta = async (ctx) => {
const
res
=
await
req
(
ctx
,
opts
);
const
res
=
await
req
(
ctx
,
opts
);
ctx
.
body
=
res
;
ctx
.
body
=
res
;
};
};
//商家列表-取消禁用
exports
.
undeleteOta
=
async
(
ctx
)
=>
{
const
url
=
`
${
GOODS_URI
}
/goods/background/undelete_ota`
;
const
opts
=
{
url
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
,
};
const
res
=
await
req
(
ctx
,
opts
);
ctx
.
body
=
res
;
};
server/router.js
View file @
72b7c588
...
@@ -69,6 +69,7 @@ router.post(`${API_VERSION}/otaList`, goods.otaList);
...
@@ -69,6 +69,7 @@ router.post(`${API_VERSION}/otaList`, goods.otaList);
router
.
post
(
`
${
API_VERSION
}
/addOta`
,
goods
.
addOta
);
router
.
post
(
`
${
API_VERSION
}
/addOta`
,
goods
.
addOta
);
router
.
post
(
`
${
API_VERSION
}
/deleteOta`
,
goods
.
deleteOta
);
router
.
post
(
`
${
API_VERSION
}
/deleteOta`
,
goods
.
deleteOta
);
router
.
post
(
`
${
API_VERSION
}
/updateOta`
,
goods
.
updateOta
);
router
.
post
(
`
${
API_VERSION
}
/updateOta`
,
goods
.
updateOta
);
router
.
post
(
`
${
API_VERSION
}
/undeleteOta`
,
goods
.
undeleteOta
);
//生活号
//生活号
router
.
post
(
`
${
API_VERSION
}
/merchant/lifeinner/life_info`
,
life
.
get_life_info
);
router
.
post
(
`
${
API_VERSION
}
/merchant/lifeinner/life_info`
,
life
.
get_life_info
);
...
...
src/pages/Groupmeal/merchantManagement/index.vue
View file @
72b7c588
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<el-button
type=
"text"
:disabled=
"scope.row.status == 1"
@
click=
"modifyMerchant(scope.row.ota_id, scope.$index)"
>
<el-button
type=
"text"
:disabled=
"scope.row.status == 1"
@
click=
"modifyMerchant(scope.row.ota_id, scope.$index)"
>
修改
修改
</el-button>
</el-button>
<el-button
type=
"text"
:disabled=
"scope.row.status == 1"
@
click=
"handleDisable(scope.row)"
>
<el-button
type=
"text"
@
click=
"handleDisable(scope.row)"
>
{{
scope
.
row
.
status
==
1
?
"启用"
:
"禁用"
}}
{{
scope
.
row
.
status
==
1
?
"启用"
:
"禁用"
}}
</el-button>
</el-button>
</
template
>
</
template
>
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
<
script
>
<
script
>
import
Layout
from
"../layout/index.vue"
;
import
Layout
from
"../layout/index.vue"
;
import
myMap
from
"@/pages/Activity/releaseProduc/components/myMap"
;
import
myMap
from
"@/pages/Activity/releaseProduc/components/myMap"
;
import
{
otaList
,
addOta
,
deleteOta
,
updateOta
}
from
"@/service/Goods/goods"
;
import
{
otaList
,
addOta
,
deleteOta
,
updateOta
,
undeleteOta
}
from
"@/service/Goods/goods"
;
export
default
{
export
default
{
name
:
"merchantManagement"
,
name
:
"merchantManagement"
,
components
:
{
components
:
{
...
@@ -143,7 +143,7 @@
...
@@ -143,7 +143,7 @@
},
},
//禁用
//禁用
async
handleDisable
(
item
)
{
async
handleDisable
(
item
)
{
let
res
=
await
deleteOta
({
ota_id
:
item
.
ota_id
});
let
res
=
item
.
status
==
0
?
await
deleteOta
({
ota_id
:
item
.
ota_id
})
:
await
un
deleteOta
({
ota_id
:
item
.
ota_id
});
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
getOtaList
();
this
.
getOtaList
();
},
},
...
...
src/service/Goods/goods.js
View file @
72b7c588
...
@@ -119,3 +119,8 @@ export async function updateOta(params) {
...
@@ -119,3 +119,8 @@ export async function updateOta(params) {
const
res
=
await
axios
.
post
(
"/api/v1/updateOta"
,
params
);
const
res
=
await
axios
.
post
(
"/api/v1/updateOta"
,
params
);
return
res
;
return
res
;
}
}
// 商家列表-取消禁用
export
async
function
undeleteOta
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/undeleteOta"
,
params
);
return
res
;
}
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