Commit 45347a81 authored by pengyunqian's avatar pengyunqian

Merge branch 'dev' of https://git.yidian-inc.com:8021/bp/op-web-service into pyq

parents f067fb6d 579f3ce5
const env = process.env.NODE_ENV || "development"; const env = process.env.NODE_ENV || "development";
const port = process.env.PORT || 8055; const port = process.env.PORT || 8055;
const LOGIN_URI = {
development: "http://bp-test.ini.yidian-inc.com ",
test: "http://web-rest.int.yidian-inc.com",
production: "http://web-rest.int.yidian-inc.com"
};
const PANDORA_URI = { const PANDORA_URI = {
development: "http://pandora.yidian-inc.com", development: "http://pandora.yidian-inc.com",
test: "http://pandora.yidian-inc.com", test: "http://pandora.yidian-inc.com",
...@@ -14,29 +8,15 @@ const PANDORA_URI = { ...@@ -14,29 +8,15 @@ const PANDORA_URI = {
}; };
const API_INTERNAL_URI = { const API_INTERNAL_URI = {
development: "http://bp-test.ini.yidian-inc.com", 'development': "http://bp-dev.ini.yidian-inc.com",
test: "http://bp-test.ini.yidian-inc.com", 'test': "http://bp-test.ini.yidian-inc.com",
production: "http://bp-test.ini.yidian-inc.com" 'production': "http://bp.int.yidian-inc.com"
}; }
const GOODS_URI = {
development: "http://bp-dev.ini.yidian-inc.com",
test: "http://bp-test.ini.yidian-inc.com",
production: "http://bp-test.ini.yidian-inc.com"
};
const IDGEN_URI = {
development: "https://bp-test.go2yd.com",
test: "http://idgen-test.ini.yidian-inc.com",
production: "http://idgen-test.ini.yidian-inc.com"
};
module.exports = { module.exports = {
env: env, env: env,
port: port, port: port,
LOGIN_URI: LOGIN_URI[env],
API_INTERNAL_URI: API_INTERNAL_URI[env], API_INTERNAL_URI: API_INTERNAL_URI[env],
PANDORA_URI: PANDORA_URI[env], PANDORA_URI: PANDORA_URI[env],
IDGEN_URI: IDGEN_URI[env], GOODS_URI: API_INTERNAL_URI[env]
GOODS_URI: GOODS_URI[env]
}; };
...@@ -15,12 +15,64 @@ const req = require("../utils/request").httpReq; ...@@ -15,12 +15,64 @@ const req = require("../utils/request").httpReq;
* ctx.body = await req(ctx,opts); 将发送请求后的数据传递给前端页面 * ctx.body = await req(ctx,opts); 将发送请求后的数据传递给前端页面
* }; * };
*/ */
// 获取分类
exports.getCategoryList = async ctx => { exports.getCategoryList = async ctx => {
const url = `${GOODS_URI}/goods/background/get_goods_category_list`; const url = `${GOODS_URI}/goods/background/get_goods_category_list`;
const opts = {
url,
method: "GET"
};
ctx.body = await req(ctx, opts);
};
// 获取商品列表
exports.getList = async ctx => {
const url = `${GOODS_URI}/goods/background/get_goods_list`;
const opts = { const opts = {
url, url,
method: "GET", method: "GET",
qs: ctx.request.query
};
ctx.body = await req(ctx, opts);
};
// 商品上架
exports.putOnline = async ctx => {
const url = `${GOODS_URI}/goods/background/online`;
const opts = {
url,
method: "POST",
json: true,
body: ctx.request.body
};
ctx.body = await req(ctx, opts);
};
// 商品下架
exports.putOffline = async ctx => {
const url = `${GOODS_URI}/goods/background/offline`;
const opts = {
url,
method: "POST",
json: true,
body: ctx.request.body
};
ctx.body = await req(ctx, opts);
};
// 获取商品详情列表
exports.getGoodsInfo = async ctx => {
const url = `${GOODS_URI}/goods/background/get_goods_info`;
const opts = {
url,
method: "GET",
qs: ctx.request.query
};
ctx.body = await req(ctx, opts);
};
// 商品审核通过
exports.postSuccess = async ctx => {
const opts = {
url: `${GOODS_URI}/goods/background/audit_pass`,
method: "POST",
json: true,
body: ctx.request.body
}; };
ctx.body = await req(ctx, opts); ctx.body = await req(ctx, opts);
}; };
...@@ -33,12 +85,20 @@ exports.getMarketingList = async ctx => { ...@@ -33,12 +85,20 @@ exports.getMarketingList = async ctx => {
json: true, json: true,
body: ctx.request.body body: ctx.request.body
}; };
const res = await req(ctx, opts); ctx.body = await req(ctx, opts);
console.log(res); };
ctx.body = res; // 检查商品名称是否被占用
exports.checkGoodsName = async ctx => {
const opts = {
url: `${GOODS_URI}/goods/background/check_goods_name`,
method: "POST",
json: true,
body: ctx.request.body
};
ctx.body = await req(ctx, opts);
}; };
// 获取查询活动列表 // 获取查询活动列表
exports.getFindGoodsList = async ctx =>{ exports.getFindGoodsList = async ctx => {
const url = `${GOODS_URI}/marketing/background/goods_list`; const url = `${GOODS_URI}/marketing/background/goods_list`;
const opts = { const opts = {
url, url,
...@@ -46,9 +106,19 @@ exports.getFindGoodsList = async ctx =>{ ...@@ -46,9 +106,19 @@ exports.getFindGoodsList = async ctx =>{
json: true, json: true,
body: ctx.request.body body: ctx.request.body
}; };
const res = await req(ctx, opts); ctx.body = await req(ctx, opts);
ctx.body = res;
}; };
// 审核拒绝
exports.auditReject = async ctx => {
const opts = {
url: `${GOODS_URI}/goods/background/audit_reject`,
method: "POST",
json: true,
body: ctx.request.body
};
ctx.body = await req(ctx, opts);
}
// 添加活动列表 // 添加活动列表
exports.getAddMarketingList = async ctx => { exports.getAddMarketingList = async ctx => {
const url = `${GOODS_URI}/marketing/background/add_marketing`; const url = `${GOODS_URI}/marketing/background/add_marketing`;
...@@ -58,9 +128,27 @@ exports.getAddMarketingList = async ctx => { ...@@ -58,9 +128,27 @@ exports.getAddMarketingList = async ctx => {
json: true, json: true,
body: ctx.request.body body: ctx.request.body
}; };
const res = await req(ctx, opts); ctx.body = await req(ctx, opts);
ctx.body = res;
}; };
// 获取门店列表
exports.getShopsList = async ctx => {
const opts = {
url: `${GOODS_URI}/shop/background/shop_list`,
method: "GET",
qs: ctx.request.query
};
ctx.body = await req(ctx, opts);
};
// 添加门店
exports.addShop = async ctx => {
const opts = {
url: `${GOODS_URI}/shop/background/add_shop`,
method: "POST",
json: true,
body: ctx.request.body
};
ctx.body = await req(ctx, opts);
}
// 查看列表详情 // 查看列表详情
exports.getMarketingInfo = async ctx => { exports.getMarketingInfo = async ctx => {
const url = `${GOODS_URI}/marketing/background/marketing_info`; const url = `${GOODS_URI}/marketing/background/marketing_info`;
...@@ -70,8 +158,17 @@ exports.getMarketingInfo = async ctx => { ...@@ -70,8 +158,17 @@ exports.getMarketingInfo = async ctx => {
json: true, json: true,
body: ctx.request.body body: ctx.request.body
}; };
const res = await req(ctx, opts); ctx.body = await req(ctx, opts);
ctx.body = res; };
// 修改商品
exports.editGoods = async ctx => {
const opts = {
url: `${GOODS_URI}/goods/background/edit_goods`,
method: "POST",
json: true,
body: ctx.request.body
}
ctx.body = await req(ctx, opts);
}; };
// 开启关闭状态 // 开启关闭状态
exports.updateMarketingList = async ctx => { exports.updateMarketingList = async ctx => {
......
...@@ -10,7 +10,7 @@ const goods = require('./controllers/goods'); ...@@ -10,7 +10,7 @@ const goods = require('./controllers/goods');
const router = Router(); const router = Router();
const API_VERSION = "/api/v1"; const API_VERSION = "/api/v1";
router.get('/', static.index) router.get(/^\/op.*/, static.index)
router.get(`${API_VERSION}/fetch_user`, system.fetch_user); router.get(`${API_VERSION}/fetch_user`, system.fetch_user);
router.get(`${API_VERSION}/user/:type`, user.query) router.get(`${API_VERSION}/user/:type`, user.query)
...@@ -38,13 +38,24 @@ router.post(`${API_VERSION}/op_commit`, enterprise.opCommit); ...@@ -38,13 +38,24 @@ router.post(`${API_VERSION}/op_commit`, enterprise.opCommit);
router.post(`${API_VERSION}/op_business_update`, enterprise.opBusinessUpdate); router.post(`${API_VERSION}/op_business_update`, enterprise.opBusinessUpdate);
/* 商品管理 */ /* 商品管理 */
router.get(`${API_VERSION}/get_goods_category_list`, goods.getCategoryList);
router.get(`${API_VERSION}/goods/background/get_goods_list`, goods.getList);
router.post(`${API_VERSION}/goods/background/online`, goods.putOnline);
router.post(`${API_VERSION}/goods/background/offline`, goods.putOffline);
router.get(`${API_VERSION}/goods/background/get_goods_info`, goods.getGoodsInfo);
router.post(`${API_VERSION}/goods/background/audit_pass`, goods.postSuccess);
router.post(`${API_VERSION}/goods/background/check_goods_name`, goods.checkGoodsName);
router.post(`${API_VERSION}/goods/background/audit_reject`, goods.auditReject);
router.get(`${API_VERSION}/shop/background/shop_list`, goods.getShopsList);
router.post(`${API_VERSION}/shop/background/add_shop`, goods.addShop);
router.post(`${API_VERSION}/goods/background/edit_goods`, goods.editGoods)
router.get(`${API_VERSION}/get_goods_category_list`, goods.getCategoryList) router.get(`${API_VERSION}/get_goods_category_list`, goods.getCategoryList)
// 营销活动 // 营销活动
router.post(`${API_VERSION}/get_marketing_list`,goods.getMarketingList) router.post(`${API_VERSION}/get_marketing_list`, goods.getMarketingList)
router.post(`${API_VERSION}/get_addmarketing_list`,goods.getAddMarketingList) router.post(`${API_VERSION}/get_addmarketing_list`, goods.getAddMarketingList)
router.post(`${API_VERSION}/get_find_goods_list`,goods.getFindGoodsList) router.post(`${API_VERSION}/get_find_goods_list`, goods.getFindGoodsList)
router.post(`${API_VERSION}/get_marketing_info`,goods.getMarketingInfo) router.post(`${API_VERSION}/get_marketing_info`, goods.getMarketingInfo)
router.post(`${API_VERSION}/update_marketing_list`,goods.updateMarketingList) router.post(`${API_VERSION}/update_marketing_list`, goods.updateMarketingList)
//生活号 //生活号
router.post(`${API_VERSION}/merchant/lifeinner/life_info`, life.get_life_info) router.post(`${API_VERSION}/merchant/lifeinner/life_info`, life.get_life_info)
router.get(`${API_VERSION}/merchant/lifeinner/life_list`, life.get_life_list) router.get(`${API_VERSION}/merchant/lifeinner/life_list`, life.get_life_list)
......
...@@ -4,22 +4,22 @@ export const HEADER_CONFIG = { ...@@ -4,22 +4,22 @@ export const HEADER_CONFIG = {
logo: 'http://si1.go2yd.com/get-image/0ZAJxXeZ6iu', logo: 'http://si1.go2yd.com/get-image/0ZAJxXeZ6iu',
menuItems: [ menuItems: [
{ {
path: '/enterprise/certification', path: '/op/enterprise/certification',
name: '企业认证管理', name: '企业认证管理',
key: 'enterprise', key: 'enterprise',
}, },
{ {
path: '/lifeNo', path: '/op/lifeNo',
name: '生活号管理', name: '生活号管理',
key: 'lifeNo', key: 'lifeNo',
}, },
{ {
path: '/roleManageRole', path: '/op/roleManageRole',
name: '角色管理', name: '角色管理',
key: 'role', key: 'role',
}, },
{ {
path: '/user', path: '/op/user',
name: '用户管理', name: '用户管理',
key: 'user', key: 'user',
} }
......
...@@ -32,7 +32,7 @@ router.beforeResolve(async (to, from, next) => { ...@@ -32,7 +32,7 @@ router.beforeResolve(async (to, from, next) => {
} }
if (!checkPathAuth(to.path)) { if (!checkPathAuth(to.path)) {
router.push('/403') router.push({name: 'Forbidden'})
} else { } else {
next() next()
} }
......
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
<el-table-column <el-table-column
align="center" align="center"
label="提交时间" label="提交时间"
prop="update_time" prop="submit_time"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
align="center" align="center"
...@@ -413,6 +413,7 @@ export default { ...@@ -413,6 +413,7 @@ export default {
async getHistory () { async getHistory () {
const res = await getLog({ enterprise_auth_record_id: this.auditId }); const res = await getLog({ enterprise_auth_record_id: this.auditId });
if (res.code !== 0) return this.$message.error(res.reason); if (res.code !== 0) return this.$message.error(res.reason);
console.log("提交历史", res);
this.historyList = [...res.result]; this.historyList = [...res.result];
}, },
......
.detail {
margin-top: 30px;
}
.detail .state {
display: flex;
align-items: center;
}
.detail .state .update_time {
margin: 0 20px;
}
.detail .message {
display: flex;
}
.detail .message .message_form {
width: 50%;
}
.detail .message .message_image {
width: 50%;
}
.message_border {
border: 1px solid #000000;
border-radius: 10px;
padding: 30px;
margin: 10px 0;
}
.detail { .detail {
margin-top: 30px; height: 100%;
.state { .state {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-start;
.some_state {
display: inline;
}
.update_time { .update_time {
margin: 0 20px; margin: 0 20px;
} }
} }
.message { .message {
display: flex; display: flex;
.message_form { justify-content: flex-start;
width: 50%;
}
.message_image {
width: 50%;
}
} }
} }
.message_border { .message_border {
border: 1px solid #000000;
border-radius: 10px;
padding: 30px;
margin: 10px 0; margin: 10px 0;
} }
.width50p {
width: 50%;
padding: 20px;
}
.el-textarea .el-textarea__inner {
resize: none;
}
.operationButton {
margin-top: 30px;
display: flex;
justify-content: center;
}
.deep_place {
.el-form-item__content {
display: flex;
align-items: center;
}
a {
margin-left: 10px;
text-align: center;
width: 200px;
border-radius: 20px;
color: #fff;
background-color: #199ffb;
}
}
This diff is collapsed.
.goods {
width: 100%;
height: 100%;
padding: 0 30px;
}
.goods .search_condition {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
align-items: center;
}
.goods .search_condition .search_button {
display: flex;
align-items: center;
justify-self: flex-end;
}
.goods .search_condition .search_button .el-form-item__content {
display: flex;
justify-content: space-around;
}
.goods .commodity_list {
margin-top: 30px;
}
.goods .pagination {
margin-top: 30px;
}
.list { .goods {
margin-top: 30px; width: 100%;
.commodity { height: 100%;
margin-top: 30px;
padding: 0 30px; padding: 0 30px;
.search_condition { .search_condition {
display: flex; display: flex;
justify-content: flex-start; justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;
.search_button { .search_button {
display: flex; display: flex;
align-items: center; align-items: center;
justify-self: flex-end;
.el-form-item__content { .el-form-item__content {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
...@@ -23,5 +23,4 @@ ...@@ -23,5 +23,4 @@
.pagination { .pagination {
margin-top: 30px; margin-top: 30px;
} }
}
} }
This diff is collapsed.
<template> <template>
<layout>
<el-card class="container" style="width: 100%; height: 100%"> <el-card class="container" style="width: 100%; height: 100%">
<div class="retail"> <div class="retail">
<el-form inline :model="retailActivitie" ref="retailActivitie"> <el-form inline :model="retailActivitie" ref="retailActivitie">
...@@ -37,7 +38,10 @@ ...@@ -37,7 +38,10 @@
<el-button @click="reset('retailActivitie')">重置</el-button> <el-button @click="reset('retailActivitie')">重置</el-button>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-button type="primary" style="margin-bottom: 10px" @click="createDtb" <el-button
type="primary"
style="margin-bottom: 10px"
@click="createDtb"
>创建分销活动</el-button >创建分销活动</el-button
> >
<!-- Tab --> <!-- Tab -->
...@@ -98,11 +102,18 @@ ...@@ -98,11 +102,18 @@
</el-table-column> </el-table-column>
<el-table-column align="center" prop="update_time" label="更新时间"> <el-table-column align="center" prop="update_time" label="更新时间">
</el-table-column> </el-table-column>
<el-table-column align="center" prop="end_time" label="分销到期时间"> <el-table-column
align="center"
prop="end_time"
label="分销到期时间"
>
</el-table-column> </el-table-column>
<el-table-column fixed="right" align="center" label="操作"> <el-table-column fixed="right" align="center" label="操作">
<template #default="scope"> <template #default="scope">
<el-button @click="handleClick(scope.row)" type="text" size="mini" <el-button
@click="handleClick(scope.row)"
type="text"
size="mini"
>查看</el-button >查看</el-button
> >
<el-button <el-button
...@@ -110,7 +121,8 @@ ...@@ -110,7 +121,8 @@
size="mini" size="mini"
@click.stop="handelEnable(scope.row, 2)" @click.stop="handelEnable(scope.row, 2)"
v-if=" v-if="
scope.row.online_status === 1 && scope.row.online_status !== 3 scope.row.online_status === 1 &&
scope.row.online_status !== 3
" "
> >
关闭 关闭
...@@ -119,7 +131,8 @@ ...@@ -119,7 +131,8 @@
type="text" type="text"
size="mini" size="mini"
v-if=" v-if="
scope.row.online_status === 2 && scope.row.online_status !== 3 scope.row.online_status === 2 &&
scope.row.online_status !== 3
" "
@click.stop="handelEnable(scope.row, 1)" @click.stop="handelEnable(scope.row, 1)"
>启用</el-button >启用</el-button
...@@ -140,15 +153,14 @@ ...@@ -140,15 +153,14 @@
> >
</el-pagination> </el-pagination>
</el-card> </el-card>
</layout>
<!-- 创建分销活动 --> <!-- 创建分销活动 -->
<el-dialog <el-dialog
v-show="shopStart == 0" :fullscreen="true"
fullscreen
title="创建分销活动" title="创建分销活动"
v-model="dialogFormVisible" v-model="dialogFormVisible"
width="100%" width="100%"
:show-close="false" :show-close="false"
dialogClass="no-close"
> >
<div class="bor"> <div class="bor">
<el-row :gutter="50"> <el-row :gutter="50">
...@@ -383,12 +395,12 @@ export default { ...@@ -383,12 +395,12 @@ export default {
message: "请填写一级佣金", message: "请填写一级佣金",
trigger: "blur", trigger: "blur",
}, },
{type: 'number', message: '必须为数值型'} { type: "number", message: "必须为数值型" },
// { validator: commission, trigger: "change" }, // { validator: commission, trigger: "change" },
], ],
second_commission_value: [ second_commission_value: [
{type: 'number', message: '必须为数值型'} { type: "number", message: "必须为数值型" },
// { // {
// validator: commission, // validator: commission,
// trigger: "change", // trigger: "change",
......
<template>
<el-dropdown>
<div class="user-info">
<el-avatar
:src="userInfo.avatar || DEFAULT_AVATAR"
size="small"
></el-avatar>
<span class="user-name">{{userInfo.name}}</span>
</div>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item>
<i class="el-icon-message"></i>
{{userInfo.email}}
</el-dropdown-item>
<el-dropdown-item>
<span><a
class="link"
href="//pandora.yidian-inc.com/"
>返回pandora工具平台</a></span>
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</template>
<script>
import { mapState } from 'vuex'
import { HEADER_CONFIG } from '@/config/pageconfig';
export default {
computed: mapState({
userInfo: state => (state.userInfo || {}),
}),
data () {
return {
DEFAULT_AVATAR: HEADER_CONFIG.miscellaneous.defaultAvatar,
};
},
};
</script>
<style lang="less" scoped>
.user-info {
display: flex;
align-items: center;
}
.user-name {
margin-left: 12px;
color: #fff;
}
</style>
const headerConfig = [
{
name: "商品管理",
path: "/op/goods/list"
},
{
name: "分销",
path: "/op/goods/retail"
},
];
export default headerConfig;
\ No newline at end of file
<template>
<div id="pageheader">
<div class="line"></div>
<el-menu
class="header-menu"
mode="horizontal"
:router="true"
background-color="#545c64"
text-color="#fff"
:default-active="activeMenu"
active-text-color="#ffd04b"
unique-opened
>
<el-menu-item
v-for="item in headerConfig"
:index="item.path"
:key="item.path"
>
{{ item.name }}
</el-menu-item>
<el-menu-item
key="usermenu"
class="user-menu"
>
<user></user>
</el-menu-item>
</el-menu>
</div>
</template>
<script>
import headerConfig from "./config";
import User from "./User.vue";
export default {
name: "PageHeader",
components: {
User
},
data () {
return {
headerConfig
};
},
computed: {
activeMenu () {
return this.$route.path;
}
},
beforeMount () { },
methods: {}
};
</script>
<style lang="less">
</style>
.layout {
display: flex;
flex-direction: column;
height: 100%;
}
.main {
flex: 1;
}
<template>
<div class="layout">
<!-- 页面公共 header -->
<page-header class="page-header"></page-header>
<!-- 页面主体部分 -->
<div class="main">
<slot></slot>
</div>
</div>
</template>
<script>
import PageHeader from '../components/PageHeader';
export default {
components: { PageHeader },
};
</script>
<style lang="less" src="./index.less"></style>
...@@ -3,17 +3,21 @@ ...@@ -3,17 +3,21 @@
*/ */
const goodsRouters = [ const goodsRouters = [
{ {
path: "/goods/list", path: "/op/goods",
redirect: "/op/goods/list"
},
{
path: "/op/goods/list",
name: "GoodsList", name: "GoodsList",
component: () => import(/* webpackChunkName: "goods" */ "@/pages/Goods/List") component: () => import(/* webpackChunkName: "goods" */ "@/pages/Goods/List")
}, },
{ {
path: "/goods/detail", path: "/op/goods/detail",
name: "GoodsDetail", name: "GoodsDetail",
component: () => import(/* webpackChunkName: "goods" */ "@/pages/Goods/Detail") component: () => import(/* webpackChunkName: "goods" */ "@/pages/Goods/Detail")
}, },
{ {
path: "/goods/retail", path: "/op/goods/retail",
name: "GoodsRetail", name: "GoodsRetail",
component: () => import(/* webpackChunkName: "goods" */ "@/pages/Goods/Retail") component: () => import(/* webpackChunkName: "goods" */ "@/pages/Goods/Retail")
} }
......
import { createRouter, createWebHashHistory } from "vue-router"; import { createRouter, createWebHistory } from "vue-router";
import LifeNo from "../pages/Life-no/index.vue"; import LifeNo from "../pages/Life-no/index.vue";
import LifeNoDetail from "../pages/Life-no/life-no-detail.vue"; import LifeNoDetail from "../pages/Life-no/life-no-detail.vue";
...@@ -13,24 +13,24 @@ import goodsRouter from "./Goods/index"; ...@@ -13,24 +13,24 @@ import goodsRouter from "./Goods/index";
const routes = [ const routes = [
{ {
path: "/", path: "/op/enterprise",
redirect: "/enterprise/certification" redirect: "/enterprise/certification"
}, },
{ {
path: "/404", path: "/op/404",
name: "NotFound", name: "NotFound",
component: () => component: () =>
import(/* webpackChunkName: "enterprise" */ "@/pages/Catch/notFound") import(/* webpackChunkName: "enterprise" */ "@/pages/Catch/notFound")
}, },
{ {
path: "/403", path: "/op/403",
name: "Forbidden", name: "Forbidden",
component: () => component: () =>
import(/* webpackChunkName: "enterprise" */ "@/pages/Catch/forbidden") import(/* webpackChunkName: "enterprise" */ "@/pages/Catch/forbidden")
}, },
// 企业认证管理 // 企业认证管理
{ {
path: "/enterprise/certification", path: "/op/enterprise/certification",
name: "Certification", name: "Certification",
component: () => component: () =>
import( import(
...@@ -41,7 +41,7 @@ const routes = [ ...@@ -41,7 +41,7 @@ const routes = [
} }
}, },
{ {
path: "/enterprise/audit", path: "/op/enterprise/audit",
name: "Audit", name: "Audit",
component: () => component: () =>
import(/* webpackChunkName: "enterprise" */ "@/pages/Enterprise/Audit"), import(/* webpackChunkName: "enterprise" */ "@/pages/Enterprise/Audit"),
...@@ -50,7 +50,7 @@ const routes = [ ...@@ -50,7 +50,7 @@ const routes = [
} }
}, },
{ {
path: "/enterprise/establish", path: "/op/enterprise/establish",
name: "Establish", name: "Establish",
component: () => component: () =>
import( import(
...@@ -62,7 +62,7 @@ const routes = [ ...@@ -62,7 +62,7 @@ const routes = [
}, },
//生活号管理 //生活号管理
{ {
path: "/lifeNo", path: "/op/lifeNo",
name: "LifeNo", name: "LifeNo",
component: LifeNo, component: LifeNo,
meta: { meta: {
...@@ -70,24 +70,24 @@ const routes = [ ...@@ -70,24 +70,24 @@ const routes = [
} }
}, },
{ {
path: "/lifeNoDetail", path: "/op/lifeNoDetail",
name: "LifeNoDetail", name: "LifeNoDetail",
component: LifeNoDetail component: LifeNoDetail
}, },
//用户管理 //用户管理
{ {
path: "/user", path: "/op/user",
name: "User", name: "/op/User",
component: User component: User
}, },
{ {
path: "/userDetail", path: "/op/userDetail",
name: "UserDetail", name: "UserDetail",
component: UserDetail component: UserDetail
}, },
//角色管理 //角色管理
{ {
path: "/roleAddRole", path: "/op/roleAddRole",
name: "AddRole", name: "AddRole",
component: AddRole, component: AddRole,
meta: { meta: {
...@@ -96,7 +96,7 @@ const routes = [ ...@@ -96,7 +96,7 @@ const routes = [
} }
}, },
{ {
path: "/roleManageRole", path: "/op/roleManageRole",
name: "ManageRole", name: "ManageRole",
component: ManageRole, component: ManageRole,
meta: { meta: {
...@@ -105,7 +105,7 @@ const routes = [ ...@@ -105,7 +105,7 @@ const routes = [
} }
}, },
{ {
path: "/roleRoleDetail", path: "/op/roleRoleDetail",
name: "RoleDetail", name: "RoleDetail",
component: RoleDetail, component: RoleDetail,
meta: { meta: {
...@@ -118,7 +118,7 @@ const routes = [ ...@@ -118,7 +118,7 @@ const routes = [
console.log(routes); console.log(routes);
const router = createRouter({ const router = createRouter({
history: createWebHashHistory(), history: createWebHistory(),
routes routes
}); });
......
import axios from "@/utils/request"; import axios from "@/utils/request";
// 获取商品分类列表 // 获取商品分类
export async function getGoodsList() { export async function getGoodsList () {
const res = await axios.get("/api/v1/get_goods_category_list"); const res = await axios.get("/api/v1/get_goods_category_list");
return res; return res;
} }
// 获取商品列表
export async function getList (params) {
const res = await axios.get("/api/v1/goods/background/get_goods_list", {
params
});
return res;
}
// 商品上架
export async function putOnline (query) {
const res = await axios.post("/api/v1/goods/background/online", {
goods_spu_id: query
});
return res;
}
// 商品下架
export async function putOffline (query) {
const res = await axios.post("/api/v1/goods/background/offline", {
goods_spu_id: query
});
return res;
}
// 获取商品详情列表
export async function getGoodsInfo (params) {
const res = await axios.get("/api/v1/goods/background/get_goods_info", {
params
});
return res;
}
// 商品详情-审核通过
export async function postSuccess (query) {
const res = await axios.post("/api/v1/goods/background/audit_pass", {
goods_spu_id: query
});
return res;
}
// 审核拒绝
export async function auditReject (query) {
const res = await axios.post("/api/v1/goods/background/audit_reject", query);
return res;
}
// 商品详情-检查商品名称是否重复
export async function checkGoodsName (params) {
const res = await axios.post(
"/api/v1/goods/background/check_goods_name",
params
);
return res;
}
// 获取门店表单
export async function getShopsList (params) {
const res = await axios.get("/api/v1/shop/background/shop_list", { params });
return res;
}
// 添加门店信息
export async function postAddShop (query) {
const res = await axios.post("/api/v1/shop/background/add_shop", query);
return res;
}
export async function editGoods (query) {
const res = await axios.post("/api/v1/goods/background/edit_goods", query);
return res;
}
// 获取营销活动列表 // 获取营销活动列表
export async function getMarketingList(params) { export async function getMarketingList (params) {
const res = await axios.post("/api/v1/get_marketing_list", params); const res = await axios.post("/api/v1/get_marketing_list", params);
return res; return res;
} }
// 获取查询商品列表 // 获取查询商品列表
export async function getFindGoodsList(params) { export async function getFindGoodsList (params) {
const res = await axios.post("/api/v1/get_find_goods_list", params); const res = await axios.post("/api/v1/get_find_goods_list", params);
return res; return res;
} }
// 获取添加活动列表 // 获取添加活动列表
export async function getAddMarketingList(params) { export async function getAddMarketingList (params) {
const res = await axios.post("/api/v1/get_addmarketing_list", params); const res = await axios.post("/api/v1/get_addmarketing_list", params);
return res; return res;
} }
// 获取查看列表 // 获取查看列表
export async function getMarketingInfo(marketing_id) { export async function getMarketingInfo (marketing_id) {
const res = await axios.post("/api/v1/get_marketing_info", marketing_id); const res = await axios.post("/api/v1/get_marketing_info", marketing_id);
return res; return res;
} }
// 获取开启关闭 // 获取开启关闭
export async function updateMarketingList(params) { export async function updateMarketingList (params) {
const res = await axios.post("/api/v1/update_marketing_list", params); const res = await axios.post("/api/v1/update_marketing_list", params);
return res; return res;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment