功能测试与修改
parent
ba91d7c26d
commit
a345586b25
File diff suppressed because it is too large
Load Diff
|
@ -3,10 +3,10 @@ var BASE = {
|
|||
* @description api请求基础路径
|
||||
*/
|
||||
API_DEV: {
|
||||
common: "http://192.168.102:8890",
|
||||
buyer: "http://192.168.102:8888",
|
||||
seller: "https://store-api.pickmall.cn",
|
||||
manager: "https://admin-api.pickmall.cn"
|
||||
common: "http://localhost:8890",
|
||||
buyer: "http://localhost:8888",
|
||||
seller: "http://localhost:8889",
|
||||
manager: "http://localhost:8887"
|
||||
},
|
||||
API_PROD: {
|
||||
common: "http://192.168.2.110:8890",
|
||||
|
|
|
@ -45,3 +45,14 @@ export function handleRefreshToken(token) {
|
|||
needToken: false,
|
||||
});
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 获取店铺楼层数据
|
||||
// */
|
||||
// export function getFloorStoreData(params) {
|
||||
// return request({
|
||||
// url: `/buyer/other/pageData?pageClientType=PC`,
|
||||
// method: "get",
|
||||
// params,
|
||||
// });
|
||||
// }
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="merchant">
|
||||
<!-- 普通店铺装修 -->
|
||||
<div v-if="basePageData">
|
||||
<BaseHeader/>
|
||||
<!-- 搜索栏 -->
|
||||
<Search :store="true" @search="search"></Search>
|
||||
|
@ -44,7 +42,8 @@
|
|||
<li class="cate-item" v-for="(cate, index) in cateList" :key="index">
|
||||
<Dropdown v-if="cate.children.length">
|
||||
<div @click.self="searchByCate(cate)">
|
||||
{{ cate.labelName }} <Icon type="ios-arrow-down"></Icon>
|
||||
{{ cate.labelName }}
|
||||
<Icon type="ios-arrow-down"></Icon>
|
||||
</div>
|
||||
<DropdownMenu slot="list">
|
||||
<DropdownItem
|
||||
|
@ -52,7 +51,8 @@
|
|||
:name="sec.id"
|
||||
v-for="sec in cate.children"
|
||||
:key="sec.id"
|
||||
>{{ sec.labelName }}</DropdownItem
|
||||
>{{ sec.labelName }}
|
||||
</DropdownItem
|
||||
>
|
||||
</DropdownMenu>
|
||||
</Dropdown>
|
||||
|
@ -65,71 +65,51 @@
|
|||
|
||||
<div class="promotion-decorate">{{ cateName }}</div>
|
||||
|
||||
<div class="goods-list">
|
||||
<empty v-if="goodsList.length === 0" />
|
||||
<div
|
||||
v-else
|
||||
class="goods-show-info"
|
||||
v-for="(item, index) in goodsList"
|
||||
:key="index"
|
||||
@click="goGoodsDetail(item.content.id, item.content.goodsId)"
|
||||
>
|
||||
<div class="goods-show-img">
|
||||
<img width="220" height="220" :src="item.content.thumbnail" />
|
||||
</div>
|
||||
<div class="goods-show-price">
|
||||
<span>
|
||||
<span class="seckill-price text-danger">{{
|
||||
item.content.price | unitPrice("¥")
|
||||
}}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="goods-show-detail">
|
||||
<span>{{ item.content.goodsName }}</span>
|
||||
</div>
|
||||
<div class="goods-show-num">
|
||||
已有<span>{{ item.content.commentNum || 0 }}</span
|
||||
>人评价
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="goods-page">
|
||||
<Page
|
||||
show-sizer
|
||||
@on-change="changePageNum"
|
||||
@on-page-size-change="changePageSize"
|
||||
:total="total"
|
||||
:page-size="params.pageSize"
|
||||
></Page>
|
||||
</div>
|
||||
<BaseFooter />
|
||||
</div>
|
||||
<!-- <div class="goods-list">-->
|
||||
<!-- <empty v-if="goodsList.length === 0"/>-->
|
||||
<!-- <div-->
|
||||
<!-- v-else-->
|
||||
<!-- class="goods-show-info"-->
|
||||
<!-- v-for="(item, index) in goodsList"-->
|
||||
<!-- :key="index"-->
|
||||
<!-- @click="goGoodsDetail(item.content.id, item.content.goodsId)"-->
|
||||
<!-- >-->
|
||||
<!-- <div class="goods-show-img">-->
|
||||
<!-- <img width="220" height="220" :src="item.content.thumbnail"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="goods-show-price">-->
|
||||
<!-- <span>-->
|
||||
<!-- <span class="seckill-price text-danger">{{-->
|
||||
<!-- item.content.price | unitPrice("¥")-->
|
||||
<!-- }}</span>-->
|
||||
<!-- </span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="goods-show-detail">-->
|
||||
<!-- <span>{{ item.content.goodsName }}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="goods-show-num">-->
|
||||
<!-- 已有<span>{{ item.content.commentNum || 0 }}</span-->
|
||||
<!-- >人评价-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="goods-page">-->
|
||||
<!-- <Page-->
|
||||
<!-- show-sizer-->
|
||||
<!-- @on-change="changePageNum"-->
|
||||
<!-- @on-page-size-change="changePageSize"-->
|
||||
<!-- :total="total"-->
|
||||
<!-- :page-size="params.pageSize"-->
|
||||
<!-- ></Page>-->
|
||||
<!-- </div>-->
|
||||
<!-- -->
|
||||
|
||||
|
||||
<div v-if="enablePageData">
|
||||
<drawer></drawer>
|
||||
<!-- 固定头部 -->
|
||||
<hover-search
|
||||
class="hover-search"
|
||||
:class="{ show: topSearchShow }"
|
||||
></hover-search>
|
||||
<!-- 顶部广告 -->
|
||||
<FixedTopPage :data="topAdvert"></FixedTopPage>
|
||||
<!-- 头部 包括登录,我的订单等 -->
|
||||
<BaseHeader></BaseHeader>
|
||||
<!-- 搜索框、logo -->
|
||||
<Search :store="true" @search="search"></Search>
|
||||
<!-- 商品分类 -->
|
||||
<cateNav
|
||||
:showAlways="true"
|
||||
v-if="showNav"
|
||||
:large="carouselLarge"
|
||||
:opacity="carouselOpacity"
|
||||
></cateNav>
|
||||
<!-- 楼层装修部分 -->
|
||||
<model-form ref="modelForm" :data="modelForm"></model-form>
|
||||
<!-- 底部栏 -->
|
||||
<BaseFooter></BaseFooter>
|
||||
</div>
|
||||
|
||||
<BaseFooter/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -143,6 +123,7 @@ import HoverSearch from "@/components/header/hoverSearch";
|
|||
import storage from "@/plugins/storage";
|
||||
import {getFloorStoreData} from "@/api/index.js";
|
||||
import {seckillByDay} from "@/api/promotion";
|
||||
|
||||
export default {
|
||||
name: "Merchant",
|
||||
components: {
|
||||
|
@ -159,7 +140,6 @@ export default {
|
|||
topSearchShow: false, // 滚动后顶部搜索栏展示
|
||||
carouselLarge: false, // 不同轮播分类尺寸
|
||||
carouselOpacity: false, // 不同轮播分类样式,
|
||||
|
||||
enablePageData: false, //是否显示楼层装修内容
|
||||
basePageData: false, //基础店铺信息
|
||||
storeMsg: {}, // 店铺信息
|
||||
|
@ -226,7 +206,10 @@ export default {
|
|||
// 店铺信息
|
||||
getDetailById(this.$route.query.id).then((res) => {
|
||||
if (res.success) {
|
||||
if (res.result.pageShow == "1") {
|
||||
|
||||
this.storeMsg = res.result;
|
||||
|
||||
|
||||
this.getIndexData();
|
||||
let that = this;
|
||||
window.onscroll = function () {
|
||||
|
@ -238,23 +221,6 @@ export default {
|
|||
that.topSearchShow = false;
|
||||
}
|
||||
};
|
||||
// 楼层装修
|
||||
this.enablePageData = true;
|
||||
} else {
|
||||
this.storeMsg = res.result;
|
||||
document.title = this.storeMsg.storeName;
|
||||
if (this.Cookies.getItem("userInfo")) {
|
||||
isCollection("STORE", this.storeMsg.storeId).then((res) => {
|
||||
if (res.success && res.result) {
|
||||
this.storeCollected = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
this.basePageData = true;
|
||||
|
||||
this.getCateList();
|
||||
this.getGoodsList();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -275,7 +241,8 @@ export default {
|
|||
this.total = res.result.totalElements;
|
||||
}
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
goGoodsDetail(skuId, goodsId) {
|
||||
// 跳转商品详情
|
||||
|
@ -330,15 +297,18 @@ export default {
|
|||
|
||||
<style scoped lang="scss">
|
||||
@import "../assets/styles/goodsList.scss";
|
||||
|
||||
.merchant {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.shop-logo {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
background-color: #666;
|
||||
padding: 4px;
|
||||
color: #fff;
|
||||
|
||||
> div {
|
||||
display: flex;
|
||||
width: 1200px;
|
||||
|
@ -354,9 +324,11 @@ export default {
|
|||
width: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
p:nth-child(1) {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
p:nth-child(2) {
|
||||
font-size: 14px;
|
||||
max-height: 40px;
|
||||
|
@ -367,21 +339,25 @@ export default {
|
|||
.store-category {
|
||||
background-color: #005aa0;
|
||||
color: #fff;
|
||||
|
||||
.cate-list {
|
||||
width: 1200px;
|
||||
margin: 0 auto;
|
||||
clear: left;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
|
||||
.cate-item {
|
||||
margin-right: 25px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.cate-item:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.promotion-decorate::before,
|
||||
.promotion-decorate::after {
|
||||
background-image: url("/src/assets/images/sprite@2x.png");
|
||||
|
|
|
@ -10,12 +10,14 @@
|
|||
"dev": "vue-cli-service serve"
|
||||
},
|
||||
"dependencies": {
|
||||
"-": "0.0.1",
|
||||
"@amap/amap-jsapi-loader": "0.0.7",
|
||||
"@antv/g2": "^4.1.14",
|
||||
"axios": "^0.21.1",
|
||||
"dplayer": "^1.26.0",
|
||||
"dplayer": "^1.27.0",
|
||||
"js-cookie": "^2.2.1",
|
||||
"node-sass": "^4.14.1",
|
||||
"s": "^1.0.0",
|
||||
"sass-loader": "^8.0.2",
|
||||
"sockjs-client": "^1.4.0",
|
||||
"swiper": "^6.3.5",
|
||||
|
|
|
@ -3,25 +3,16 @@ var BASE = {
|
|||
* @description api请求基础路径
|
||||
*/
|
||||
API_DEV: {
|
||||
<<<<<<< HEAD
|
||||
common: "http://192.168.0.102:8890",
|
||||
buyer: "https://buyer-api.pickmall.cn",
|
||||
seller: "http://192.168.0.102:8889",
|
||||
manager: "https://admin-api.pickmall.cn"
|
||||
=======
|
||||
// common: "http://localhost:8890",
|
||||
// buyer: "http://localhost:8888",
|
||||
// seller: "http://localhost:8889",
|
||||
// manager: "http://localhost:8887"
|
||||
common:"http://127.0.0.1:8890",
|
||||
buyer:"http://192.168.0.113:8888",
|
||||
manager:"http://192.168.0.113:8887",
|
||||
<<<<<<< HEAD
|
||||
seller:"http://192.168.0.113:8889"
|
||||
>>>>>>> 32336decc6e9e0ae8a0e67033f8ca66a89bbd372
|
||||
=======
|
||||
seller:"http://127.0.0.1:8889"
|
||||
>>>>>>> 4ea142ea086a3f534419a31b595de80497e16d90
|
||||
|
||||
common: "http://localhost:8890",
|
||||
buyer: "http://localhost:8888",
|
||||
seller: "http://localhost:8889",
|
||||
manager: "http://localhost:8887"
|
||||
// common:"http://127.0.0.1:8890",
|
||||
// buyer:"http://192.168.0.113:8888",
|
||||
// manager:"http://192.168.0.113:8887",
|
||||
//
|
||||
// seller:"http://192.168.0.113:8889"
|
||||
},
|
||||
API_PROD: {
|
||||
common: "https://common-api.pickmall.cn",
|
||||
|
|
|
@ -6,7 +6,8 @@ import {
|
|||
deleteRequest,
|
||||
importRequest,
|
||||
getRequestWithNoToken,
|
||||
commonUrl
|
||||
commonUrl,
|
||||
postRequestWithNoForm
|
||||
} from "@/libs/axios";
|
||||
// 获取数据字典
|
||||
export const getDictData = "/dictData/getByType/";
|
||||
|
@ -355,3 +356,13 @@ export const refundStatistics = params => {
|
|||
export const refundPriceStatistics = params => {
|
||||
return getRequest(`/statistics/refund/order/getPrice`, params);
|
||||
};
|
||||
|
||||
//下载结算单
|
||||
export const downLoadGoods = () => {
|
||||
return getRequest(`/goods/import/downLoad/`, {}, 'blob')
|
||||
}
|
||||
|
||||
// 上传待发货的订单列表
|
||||
export const uploadGoodsExcel = params => {
|
||||
return postRequestWithNoForm(`/goods/import/import`, params );
|
||||
};
|
||||
|
|
|
@ -21,7 +21,6 @@ export const getAllCity = (params) => {
|
|||
export const getCurrentPermissionList = (params) => {
|
||||
return getRequest("/menu/memberMenu", params);
|
||||
};
|
||||
|
||||
// 登陆
|
||||
export const getHomeNotice = params => {
|
||||
return getRequest("/other/article/getByPage?type=STORE_ARTICLE&pageSize=15");
|
||||
|
@ -131,7 +130,6 @@ export const unRelate = params => {
|
|||
export const getRelatedListData = params => {
|
||||
return getRequest("/relate/findByCondition", params);
|
||||
};
|
||||
|
||||
// 获取用户数据 多条件
|
||||
export const getUserListData = params => {
|
||||
return getRequest("/clerk", params);
|
||||
|
|
|
@ -4,10 +4,6 @@ import {
|
|||
postRequest,
|
||||
putRequest,
|
||||
deleteRequest,
|
||||
importRequest,
|
||||
getRequestWithNoToken,
|
||||
putRequestWithNoForm,
|
||||
postRequestWithNoForm,
|
||||
} from "@/libs/axios";
|
||||
|
||||
/**
|
||||
|
@ -15,8 +11,7 @@ import {
|
|||
*
|
||||
*/
|
||||
export const setHomeSetup = params => {
|
||||
|
||||
return postRequest("/other/pageData/add", params);
|
||||
return postRequest("/settings/pageData/save", params);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -25,7 +20,7 @@ export const setHomeSetup = params => {
|
|||
*/
|
||||
export const getHomeData = params => {
|
||||
|
||||
return getRequest(`/other/pageData/${params}`);
|
||||
return getRequest(`/settings/pageData/${params}`);
|
||||
};
|
||||
|
||||
|
||||
|
@ -34,21 +29,8 @@ export const getHomeData = params => {
|
|||
*
|
||||
*/
|
||||
export const getHomeList = params => {
|
||||
return getRequest(`/settings/pageData/${params.pageClientType}/pageDataList`, params);
|
||||
|
||||
return getRequest("/other/pageData/pageDataList", params);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 发布页面
|
||||
*
|
||||
*/
|
||||
|
||||
export const releasePageHome = (id) => {
|
||||
|
||||
return putRequest(`/other/pageData/release/${id}`);
|
||||
};
|
||||
|
||||
|
||||
|
@ -57,8 +39,7 @@ export const getHomeList = params => {
|
|||
*
|
||||
*/
|
||||
export const updateHome = (id, params) => {
|
||||
|
||||
return putRequest(`/other/pageData/update/${id}`, params);
|
||||
return putRequest(`/settings/pageData/update/${id}`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -66,7 +47,15 @@ export const getHomeList = params => {
|
|||
*
|
||||
*/
|
||||
export const removePageHome = (id) => {
|
||||
|
||||
return deleteRequest(`/other/pageData/remove/${id}`);
|
||||
return deleteRequest(`/settings/pageData/removePageData/${id}`);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 发布页面
|
||||
*
|
||||
*/
|
||||
export const releasePageHome = (id) => {
|
||||
return putRequest(`/settings/pageData/release/${id}`);
|
||||
};
|
||||
|
||||
|
|
|
@ -491,14 +491,34 @@ export const result = [{
|
|||
children: null,
|
||||
},
|
||||
{
|
||||
name: "shopAddress",
|
||||
name: "wapList",
|
||||
level: 2,
|
||||
type: 0,
|
||||
title: "自提管理",
|
||||
path: "shopAddress",
|
||||
component: "shop/shopAddress",
|
||||
children: null,
|
||||
}
|
||||
title: "移动楼层",
|
||||
path: "wapList",
|
||||
component: "shop/wap/wapList",
|
||||
children: null
|
||||
|
||||
},
|
||||
{
|
||||
name: "pcList",
|
||||
level: 2,
|
||||
type: 0,
|
||||
title: "PC楼层",
|
||||
path: "pcList",
|
||||
component: "shop/floorList",
|
||||
children: null
|
||||
|
||||
},
|
||||
// {
|
||||
// name: "shopAddress",
|
||||
// level: 2,
|
||||
// type: 0,
|
||||
// title: "自提管理",
|
||||
// path: "shopAddress",
|
||||
// component: "shop/shopAddress",
|
||||
// children: null,
|
||||
// }
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import lazyLoading from './lazyLoading.js';
|
||||
import Cookies from "js-cookie";
|
||||
|
||||
import { result } from './routerJson.js';
|
||||
import { getCurrentPermissionList } from "@/api/index";
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ import "./styles/theme.less";
|
|||
import "core-js/stable";
|
||||
import vueQr from "vue-qr";
|
||||
|
||||
import liliDialog from '@/views/lili-dialog'
|
||||
import App from "./App";
|
||||
import { router } from "./router/index";
|
||||
import store from "./store";
|
||||
|
@ -21,7 +22,6 @@ import { setStore, getStore, removeStore } from "@/libs/storage";
|
|||
import i18nBox from '@/views/lili-components/i18n-translate'
|
||||
import util from "@/libs/util";
|
||||
|
||||
import liliDialog from '@/views/lili-dialog'
|
||||
import VueLazyload from "vue-lazyload";
|
||||
|
||||
import * as filters from "@/utils/filters"; // global filter
|
||||
|
@ -37,6 +37,7 @@ Vue.use(VueLazyload, {
|
|||
Vue.use(ViewUI);
|
||||
Vue.component('liliDialog',liliDialog)
|
||||
Vue.component('i18nBox',i18nBox)
|
||||
Vue.component('liliDialog',liliDialog)
|
||||
Vue.component("vue-qr", vueQr); //此处将vue-qr添加为全局组件
|
||||
|
||||
// 挂载全局使用的方法
|
||||
|
|
|
@ -102,6 +102,18 @@ export const otherRouter = {
|
|||
name: "order-detail",
|
||||
component: () => import("@/views/order/order/orderDetail.vue")
|
||||
},
|
||||
{
|
||||
path: "/floorList/main",
|
||||
title: "编辑模板",
|
||||
name: "main",
|
||||
component: () => import("@/views/shop/wap/main.vue")
|
||||
},
|
||||
{
|
||||
path: "/pcFloorList/main",
|
||||
title: "编辑模板",
|
||||
name: "renovation",
|
||||
component: () => import("@/views/shop/renovation.vue")
|
||||
},
|
||||
{
|
||||
path: "order-complaint-detail",
|
||||
title: "投诉详情",
|
||||
|
|
|
@ -162,3 +162,60 @@ export function formatDate(date, fmt) {
|
|||
}
|
||||
return fmt;
|
||||
}
|
||||
|
||||
// 楼层装修,选择链接处理跳转方式
|
||||
export function formatLinkType (item) {
|
||||
const types = ['goods', 'category', 'shops', 'marketing', 'pages', 'other'] // 所有跳转的分类 依次为 商品、分类、店铺、活动、页面、其他
|
||||
let url = '';
|
||||
switch (item.___type) {
|
||||
case 'goods':
|
||||
url = `/goodsDetail?skuId=${item.id}&goodsId=${item.goodsId}`;
|
||||
break;
|
||||
|
||||
case 'category':
|
||||
url = `/goodsList?categoryId=${item.allId}`;
|
||||
break;
|
||||
|
||||
case 'shops':
|
||||
url = `/merchant?id=${item.id}`;
|
||||
break;
|
||||
|
||||
case 'marketing': // 暂无数据,需要后续修改
|
||||
url = `/seckill?id=${item.id}`;
|
||||
break;
|
||||
|
||||
case 'pages': // 暂无数据,需要后续修改
|
||||
url = `/article?id=${item.id}`;
|
||||
break;
|
||||
|
||||
case 'other':
|
||||
switch (item.title) {
|
||||
case '首页':
|
||||
url = '/';
|
||||
break;
|
||||
case '购物车':
|
||||
url = '/cart';
|
||||
break;
|
||||
case '我的订单':
|
||||
url = '/home/MyOrder';
|
||||
break;
|
||||
case '收藏商品':
|
||||
url = '/home/Favorites';
|
||||
break;
|
||||
case '个人中心':
|
||||
url = '/home';
|
||||
break;
|
||||
case '外部链接':
|
||||
url = item.url;
|
||||
break;
|
||||
case '秒杀频道':
|
||||
url = '/seckill';
|
||||
break;
|
||||
case '领券中心':
|
||||
url = '/coupon';
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
|
|
@ -181,7 +181,7 @@
|
|||
</div>
|
||||
</Modal>
|
||||
<Modal title="导入商品信息" v-model="importModal" :mask-closable="false">
|
||||
<div>
|
||||
<div style="text-align: center">
|
||||
<Upload :before-upload="handleUpload" name="files" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
|
||||
multiple type="drag" :action="action" :headers="accessToken">
|
||||
<div style="padding: 50px 0">
|
||||
|
@ -189,6 +189,7 @@
|
|||
<h2>选择或拖拽文件上传</h2>
|
||||
</div>
|
||||
</Upload>
|
||||
<Button @click="exportGoods" type="text" style="color: red">下载导入模板</Button>
|
||||
</div>
|
||||
<div slot="footer">
|
||||
<Button type="text" @click="importModal = false">确定</Button>
|
||||
|
@ -206,9 +207,12 @@ import {
|
|||
lowGoods,
|
||||
deleteGoods,
|
||||
batchShipTemplate,
|
||||
downLoadGoods
|
||||
} from "@/api/goods";
|
||||
import { baseUrl } from "@/libs/axios.js";
|
||||
import * as API_Shop from "@/api/shops";
|
||||
import Cookies from "js-cookie";
|
||||
import {uploadGoodsExcel} from "../../../api/goods";
|
||||
|
||||
export default {
|
||||
name: "goods",
|
||||
|
@ -511,9 +515,51 @@ export default {
|
|||
this.upload();
|
||||
return false;
|
||||
},
|
||||
/**
|
||||
* 上传文件
|
||||
*/
|
||||
async upload() {
|
||||
let fd = new FormData();
|
||||
fd.append("files", this.file);
|
||||
let res = await uploadGoodsExcel(fd);
|
||||
if (res.success) {
|
||||
this.stepList.map((item) => {
|
||||
item.checked = false;
|
||||
});
|
||||
|
||||
this.stepList[2].checked = true;
|
||||
}
|
||||
},
|
||||
openImportGoods(){
|
||||
this.importModal = true
|
||||
},
|
||||
async exportGoods(){
|
||||
downLoadGoods()
|
||||
.then((res) => {
|
||||
console.log(res)
|
||||
const blob = new Blob([res], {
|
||||
type: "application/vnd.ms-excel;charset=utf-8",
|
||||
});
|
||||
//对于<a>标签,只有 Firefox 和 Chrome(内核) 支持 download 属性
|
||||
//IE10以上支持blob但是依然不支持download
|
||||
if ("download" in document.createElement("a")) {
|
||||
//支持a标签download的浏览器
|
||||
const link = document.createElement("a"); //创建a标签
|
||||
link.download = "商品批量导入模板.xls"; //a标签添加属性
|
||||
link.style.display = "none";
|
||||
link.href = URL.createObjectURL(blob);
|
||||
document.body.appendChild(link);
|
||||
link.click(); //执行下载
|
||||
URL.revokeObjectURL(link.href); //释放url
|
||||
document.body.removeChild(link); //释放标签
|
||||
} else {
|
||||
navigator.msSaveBlob(blob, fileName);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
},
|
||||
// 更新库存
|
||||
updateStock() {
|
||||
let updateStockList = this.stockList.map((i) => {
|
||||
|
|
|
@ -11,6 +11,17 @@ export default [
|
|||
// name: "category"
|
||||
// },
|
||||
|
||||
// {
|
||||
// title: "活动",
|
||||
// url: "3",
|
||||
// name: "marketing"
|
||||
// },
|
||||
// {
|
||||
// title: "页面",
|
||||
// url: "3",
|
||||
// name: "pages"
|
||||
// },
|
||||
|
||||
// {
|
||||
// title: "活动",
|
||||
// url: "3",
|
||||
|
|
|
@ -126,7 +126,7 @@ export default {
|
|||
const data = this.formData;
|
||||
data.status ? (data.pageShow = "OPEN") : (data.pageShow = "CLOSE");
|
||||
delete data.status;
|
||||
(data.pageType = "INDEX"), (data.pageClientType = "PC");
|
||||
(data.pageType = "STORE"), (data.pageClientType = "PC");
|
||||
if (data.id) {
|
||||
API_floor.updateHome(data.id, data).then((res) => {
|
||||
this.$Message.success("编辑模板成功");
|
||||
|
|
|
@ -1,98 +1,5 @@
|
|||
export const modelData = [{
|
||||
type: 'carousel',
|
||||
name: '图片轮播',
|
||||
icon: 'md-image',
|
||||
showName: '',
|
||||
size: "790*340",
|
||||
options: {
|
||||
list: [{
|
||||
img: require('@/assets/nav/1.jpg'),
|
||||
url: ''
|
||||
},
|
||||
{
|
||||
img: require('@/assets/nav/2.jpg'),
|
||||
url: ''
|
||||
},
|
||||
{
|
||||
img: require('@/assets/nav/3.jpg'),
|
||||
url: ''
|
||||
}
|
||||
],
|
||||
},
|
||||
},
|
||||
// {
|
||||
// type: 'carousel1',
|
||||
// name: '图片轮播1',
|
||||
// icon: 'md-image',
|
||||
// size: "1200*470",
|
||||
// options: {
|
||||
// list: [{
|
||||
// img: require('@/assets/nav/1.jpg'),
|
||||
// url: '',
|
||||
// bgColor: 'yellow'
|
||||
// },
|
||||
// {
|
||||
// img: require('@/assets/nav/2.jpg'),
|
||||
// url: '',
|
||||
// bgColor: 'purple'
|
||||
// },
|
||||
// {
|
||||
// img: require('@/assets/nav/3.jpg'),
|
||||
// url: '',
|
||||
// bgColor: 'blue'
|
||||
// }
|
||||
// ],
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// type: 'carousel2',
|
||||
// name: '图片轮播2',
|
||||
// icon: 'md-image',
|
||||
// size: "590*470",
|
||||
// options: {
|
||||
// list: [{
|
||||
// img: require('@/assets/nav/1.jpg'),
|
||||
// url: ''
|
||||
// },
|
||||
// {
|
||||
// img: require('@/assets/nav/2.jpg'),
|
||||
// url: ''
|
||||
// },
|
||||
// {
|
||||
// img: require('@/assets/nav/3.jpg'),
|
||||
// url: ''
|
||||
// }
|
||||
// ],
|
||||
// listRight: [
|
||||
// [{
|
||||
// img: require('@/assets/nav/1.jpg'),
|
||||
// url: ''
|
||||
// },
|
||||
// {
|
||||
// img: require('@/assets/nav/2.jpg'),
|
||||
// url: ''
|
||||
// },
|
||||
// {
|
||||
// img: require('@/assets/nav/3.jpg'),
|
||||
// url: ''
|
||||
// }
|
||||
// ],
|
||||
// [{
|
||||
// img: require('@/assets/nav/1.jpg'),
|
||||
// url: ''
|
||||
// },
|
||||
// {
|
||||
// img: require('@/assets/nav/2.jpg'),
|
||||
// url: ''
|
||||
// },
|
||||
// {
|
||||
// img: require('@/assets/nav/3.jpg'),
|
||||
// url: ''
|
||||
// }
|
||||
// ],
|
||||
// ]
|
||||
// },
|
||||
// },
|
||||
|
||||
export const modelData = [
|
||||
{
|
||||
type: 'hotAdvert',
|
||||
name: '热门广告',
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>)
|
||||
</div>
|
||||
<!-- 左侧轮播装修 -->
|
||||
<Modal
|
||||
|
@ -166,14 +166,12 @@
|
|||
</table>
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
|
||||
</div>
|
||||
</Modal>
|
||||
<!-- 选择商品。链接 -->
|
||||
<liliDialog
|
||||
ref="liliDialog"
|
||||
@selectedLink="selectedLink"
|
||||
|
||||
></liliDialog>
|
||||
<!-- 选择图片 -->
|
||||
<Modal width="1200px" v-model="picModelFlag" footer-hide>
|
||||
|
|
|
@ -459,10 +459,9 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
<<<<<<< HEAD
|
||||
pageShow(type) {
|
||||
this.form.pageShow = type
|
||||
=======
|
||||
},
|
||||
getDeliverAddress(){
|
||||
API_Shop.getDeliverAddress().then(res=>{
|
||||
if(res.success){
|
||||
|
@ -474,7 +473,6 @@ export default {
|
|||
}
|
||||
}
|
||||
})
|
||||
>>>>>>> 4ea142ea086a3f534419a31b595de80497e16d90
|
||||
},
|
||||
//修改售后地址
|
||||
regionClick() {
|
||||
|
|
|
@ -116,7 +116,7 @@ export default {
|
|||
: (this.submitWay.pageShow = "CLOSE");
|
||||
|
||||
this.submitWay.pageData = JSON.stringify(this.$store.state.styleStore);
|
||||
this.submitWay.pageType = "INDEX";
|
||||
this.submitWay.pageType = "STORE";
|
||||
|
||||
this.$route.query.id ? this.update() : this.submit(this.submitWay);
|
||||
},
|
||||
|
@ -128,7 +128,7 @@ export default {
|
|||
pageData: JSON.stringify(this.$store.state.styleStore),
|
||||
name: this.submitWay.name,
|
||||
pageShow: this.submitWay.pageShow,
|
||||
pageType: "INDEX",
|
||||
pageType: "STORE",
|
||||
pageClientType: "H5",
|
||||
})
|
||||
.then((res) => {
|
||||
|
|
|
@ -63,7 +63,7 @@ export default {
|
|||
pageSize: 10,
|
||||
sort: "createTime",
|
||||
order: "desc",
|
||||
pageType: "INDEX",
|
||||
pageType: "STORE",
|
||||
pageClientType: "H5",
|
||||
},
|
||||
total: 0, // 页面数量
|
||||
|
|
Loading…
Reference in New Issue