合并master

master
lemon橪 2021-06-17 11:45:53 +08:00
commit c158874c31
8 changed files with 106 additions and 40 deletions

View File

@ -17,7 +17,7 @@
<div class="user-img"> <div class="user-img">
<img :src="userInfo.face" /> <img :src="userInfo.face" />
</div> </div>
<p>{{userInfo.username | secrecyMobile}}</p> <p>{{userInfo.nickName}}</p>
</div> </div>
<!-- 循环导航栏 --> <!-- 循环导航栏 -->

View File

@ -5,10 +5,14 @@ import { getRequest, postRequest, putRequest, deleteRequest} from '@/libs/axios'
export const getManagerBrandPage = (params) => { export const getManagerBrandPage = (params) => {
return getRequest('/goods/brand/getByPage', params) return getRequest('/goods/brand/getByPage', params)
} }
// 添加或修改品牌设置 // 添加
export const addBrand = (params) => { export const addBrand = (params) => {
return postRequest('/goods/brand', params) return postRequest('/goods/brand', params)
} }
// 修改品牌设置
export const updateBrand = (params) => {
return putRequest(`/goods/brand/${params.id}`, params)
}
// 禁用品牌 // 禁用品牌
export const disableBrand = (id, params) => { export const disableBrand = (id, params) => {
return putRequest(`/goods/brand/disable/${id}`, params) return putRequest(`/goods/brand/disable/${id}`, params)

View File

@ -82,7 +82,7 @@
</template> </template>
<script> <script>
import {getManagerBrandPage, addBrand, disableBrand} from "@/api/goods"; import {getManagerBrandPage, addBrand,updateBrand, disableBrand} from "@/api/goods";
import uploadPicInput from "@/views/my-components/lili/upload-pic-input"; import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
export default { export default {
@ -323,7 +323,7 @@
}); });
} else { } else {
// //
addBrand(this.form).then((res) => { updateBrand(this.form).then((res) => {
this.submitLoading = false; this.submitLoading = false;
if (res.success) { if (res.success) {
this.$Message.success("操作成功"); this.$Message.success("操作成功");

View File

@ -376,6 +376,7 @@ export default {
}); });
}, },
getAllList(parent_id) { getAllList(parent_id) {
this.sortCateList = []
this.loading = true; this.loading = true;
getCategoryTree(parent_id).then((res) => { getCategoryTree(parent_id).then((res) => {
this.loading = false; this.loading = false;

View File

@ -41,22 +41,24 @@ export default {
saveTemplate() { saveTemplate() {
// //
this.$Modal.confirm({ this.$Modal.confirm({
title: "Title", title: "是否立即发布?",
content: "<p>Content of dialog</p><p>Content of dialog</p>",
onOk: () => { onOk: () => {
this.$Message.info("Clicked ok"); this.submitTemplate("OPEN");
}, },
onCancel: () => { onCancel: () => {
this.$Message.info("Clicked cancel"); this.submitTemplate("CLOSE");
}, },
}); });
},
//
submitTemplate(pageShow) {
this.modelForm.list.unshift(this.$refs.modelForm.navList); this.modelForm.list.unshift(this.$refs.modelForm.navList);
this.modelForm.list.unshift(this.$refs.modelForm.topAdvert); this.modelForm.list.unshift(this.$refs.modelForm.topAdvert);
const modelForm = JSON.stringify(this.modelForm); const modelForm = JSON.stringify(this.modelForm);
const data = { const data = {
id: this.$route.query.id, id: this.$route.query.id,
pageData: modelForm, pageData: modelForm,
pageShow,
}; };
API_floor.updateHome(this.$route.query.id, data).then((res) => { API_floor.updateHome(this.$route.query.id, data).then((res) => {
if (res.success) { if (res.success) {

View File

@ -24,35 +24,78 @@
<Row class="operation padding-row"> <Row class="operation padding-row">
<Button type="primary" @click="add"></Button> <Button type="primary" @click="add"></Button>
</Row> </Row>
<Tabs value="list" @on-click="clickTabPane"> <Table
<TabPane label="秒杀活动列表" name="list"> :loading="loading"
<Table :loading="loading" border :columns="columns" :data="data" ref="table" class="page"> border
:columns="columns"
:data="data"
ref="table"
class="page"
>
<template slot-scope="{ row }" slot="action"> <template slot-scope="{ row }" slot="action">
<Button type="info" size="small" class="mr_5" v-if="row.promotionStatus == 'NEW'" @click="edit(row)"></Button> <Button
type="info"
size="small"
class="mr_5"
v-if="row.promotionStatus == 'NEW'"
@click="edit(row)"
>编辑</Button
>
<Button type="info" size="small" class="mr_5" v-else @click="manage(row)"></Button> <Button
type="info"
size="small"
class="mr_5"
v-else
@click="manage(row)"
>查看</Button
>
<Button type="primary" size="small" class="mr_5" v-if="row.promotionStatus == 'NEW'" @click="manage(row)"></Button> <Button
type="primary"
size="small"
class="mr_5"
v-if="row.promotionStatus == 'NEW'"
@click="manage(row)"
>管理</Button
>
<Button type="error" size="small" v-if=" <!-- <Button type="success" size="small" class="mr_5" v-if="row.promotionStatus == 'NEW' || row.promotionStatus == 'END'" @click="upper(row)"></Button> -->
<Button
type="error"
size="small"
v-if="
row.promotionStatus == 'START' || row.promotionStatus == 'NEW' row.promotionStatus == 'START' || row.promotionStatus == 'NEW'
" class="mr_5" @click="off(row)">下架</Button> "
&nbsp; class="mr_5"
<Button type="error" size="small" v-if="row.promotionStatus == 'CLOSE'" ghost @click="expire(row)"></Button> @click="off(row)"
>下架</Button
>
<Button
type="error"
size="small"
v-if="row.promotionStatus == 'CLOSE'"
ghost
@click="expire(row)"
>删除</Button
>
</template> </template>
</Table> </Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page style="margin: 20px 0;" :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" <Page
:page-size-opts="[10, 20, 50]" size="small" show-total show-elevator show-sizer></Page> :current="searchForm.pageNumber + 1"
:total="total"
:page-size="searchForm.pageSize"
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="[10, 20, 50]"
size="small"
show-total
show-elevator
show-sizer
></Page>
</Row> </Row>
</TabPane>
<TabPane label="秒杀活动设置" name="setup">
<setupSeckill v-if="setupFlag"></setupSeckill>
</TabPane>
</Tabs>
</Card> </Card>
</div> </div>
</template> </template>
@ -260,6 +303,6 @@ export default {
<style lang="scss"> <style lang="scss">
@import "@/styles/table-common.scss"; @import "@/styles/table-common.scss";
.mr_5{ .mr_5{
margin: 0 5px; margin: 0 4px;
} }
</style> </style>

View File

@ -472,3 +472,9 @@ div.base-info-item {
.template-item { .template-item {
justify-content: flex-start !important; justify-content: flex-start !important;
} }
.tree-bar{
height: auto !important;
max-height: auto !important;
min-height: 240px !important;
}

View File

@ -294,9 +294,20 @@
</div> </div>
<h4>商品详情描述</h4> <h4>商品详情描述</h4>
<div class="form-item-view"> <div class="form-item-view">
<div class="tree-bar" :style="{ maxHeight: maxHeight }"> <div class="tree-bar" >
<FormItem class="form-item-view-el" label="店内分类" prop="shopCategory"> <FormItem
<Tree ref="tree" :data="shopCategory" show-checkbox @on-select-change="selectTree" @on-check-change="changeSelect" :check-strictly="!strict"></Tree> class="form-item-view-el"
label="店内分类"
prop="shopCategory"
>
<Tree
ref="tree"
:data="shopCategory"
show-checkbox
@on-select-change="selectTree"
@on-check-change="changeSelect"
:check-strictly="!strict"
></Tree>
</FormItem> </FormItem>
</div> </div>
<FormItem class="form-item-view-el" label="商品描述" prop="intro"> <FormItem class="form-item-view-el" label="商品描述" prop="intro">
@ -594,7 +605,6 @@ export default {
/** 3级分类列表*/ /** 3级分类列表*/
categoryListLevel3: [], categoryListLevel3: [],
maxHeight: "240px",
/** 请求的商品参数组列表 */ /** 请求的商品参数组列表 */
goodsParams: [ goodsParams: [
{ {