合并master 更改并提交内容
commit
59cfa0efb0
|
@ -14,19 +14,19 @@ export default {
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
init(){
|
init(){
|
||||||
if(!localStorage.getItem("siteName")||!localStorage.getItem("logoImg")||!localStorage.getItem("sitelogo_expiration_time")) {
|
if(!storage.getItem("siteName")||!storage.getItem("logoImg")||!storage.getItem("sitelogo_expiration_time")) {
|
||||||
this.getSite();
|
this.getSite();
|
||||||
}else{
|
}else{
|
||||||
// 如果缓存过期,则获取最新的信息
|
// 如果缓存过期,则获取最新的信息
|
||||||
if (new Date() > localStorage.getItem("sitelogo_expiration_time")) {
|
if (new Date() > storage.getItem("sitelogo_expiration_time")) {
|
||||||
this.getSite();
|
this.getSite();
|
||||||
return;
|
return;
|
||||||
}else{
|
}else{
|
||||||
window.document.title = localStorage.getItem("siteName");
|
window.document.title = storage.getItem("siteName");
|
||||||
//动态获取icon
|
//动态获取icon
|
||||||
let link =document.querySelector("link[rel*='icon']") ||document.createElement("link");
|
let link =document.querySelector("link[rel*='icon']") ||document.createElement("link");
|
||||||
link.type = "image/x-icon";
|
link.type = "image/x-icon";
|
||||||
link.href = localStorage.getItem("logoImg");
|
link.href = storage.getItem("logoImg");
|
||||||
link.rel = "shortcut icon";
|
link.rel = "shortcut icon";
|
||||||
document.getElementsByTagName("head")[0].appendChild(link);
|
document.getElementsByTagName("head")[0].appendChild(link);
|
||||||
}
|
}
|
||||||
|
@ -41,10 +41,10 @@ export default {
|
||||||
// 过期时间
|
// 过期时间
|
||||||
var expirationTime = new Date().setHours(new Date().getHours() + 1);
|
var expirationTime = new Date().setHours(new Date().getHours() + 1);
|
||||||
// 存放过期时间
|
// 存放过期时间
|
||||||
localStorage.setItem("sitelogo_expiration_time", expirationTime);
|
storage.setItem("sitelogo_expiration_time", expirationTime);
|
||||||
// 存放信息
|
// 存放信息
|
||||||
localStorage.setItem('siteName', data.siteName);
|
storage.setItem('siteName', data.siteName);
|
||||||
localStorage.setItem('logoImg', data.buyerSideLogo);
|
storage.setItem('logoImg', data.buyerSideLogo);
|
||||||
|
|
||||||
window.document.title = data.siteName;
|
window.document.title = data.siteName;
|
||||||
//动态获取icon
|
//动态获取icon
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
const Cookie = require('js-cookie')
|
const Cookie = require('js-cookie')
|
||||||
module.exports = {
|
module.exports = {
|
||||||
title:Cookie.get('siteName'), //配置显示在浏览器标签的title、底部信息、部分信息展示的值
|
title:Cookie.get('siteName') || 'lilishop', //配置显示在浏览器标签的title、底部信息、部分信息展示的值
|
||||||
icpCard: "", // icp证
|
icpCard: "", // icp证
|
||||||
company: {
|
company: {
|
||||||
href: "https://pickmall.cn",
|
href: "https://pickmall.cn",
|
||||||
|
|
|
@ -12,7 +12,7 @@ export default new Vuex.Store({
|
||||||
navList: [], // 首页快捷导航
|
navList: [], // 首页快捷导航
|
||||||
cartNum: storage.getItem('cartNum') || 0,
|
cartNum: storage.getItem('cartNum') || 0,
|
||||||
logoImg: storage.getItem('logoImg') || require('@/assets/images/logo2.png'),
|
logoImg: storage.getItem('logoImg') || require('@/assets/images/logo2.png'),
|
||||||
siteName:storage.getItem('siteName')|| null,
|
siteName:storage.getItem('siteName')|| 'lilishop',
|
||||||
hotWordsList: storage.getItem('hotWordsList'),
|
hotWordsList: storage.getItem('hotWordsList'),
|
||||||
category: JSON.parse(localStorage.getItem('category'))
|
category: JSON.parse(localStorage.getItem('category'))
|
||||||
},
|
},
|
||||||
|
|
|
@ -129,15 +129,6 @@ export default {
|
||||||
if (currWidth <= 1200) {
|
if (currWidth <= 1200) {
|
||||||
this.sliceNum = 2;
|
this.sliceNum = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!localStorage.getItem("icon")||!localStorage.getItem("title")||!localStorage.getItem("icontitle_expiration_time")) {
|
|
||||||
this.getSite();
|
|
||||||
}else{
|
|
||||||
// 如果缓存过期,则获取最新的信息
|
|
||||||
if (new Date() > localStorage.getItem("icontitle_expiration_time")) {
|
|
||||||
this.getSite();
|
|
||||||
return;
|
|
||||||
}else{
|
|
||||||
this.domainLogo = localStorage.getItem("icon");
|
this.domainLogo = localStorage.getItem("icon");
|
||||||
let link =
|
let link =
|
||||||
document.querySelector("link[rel*='icon']") ||
|
document.querySelector("link[rel*='icon']") ||
|
||||||
|
@ -147,10 +138,6 @@ export default {
|
||||||
link.rel = "shortcut icon";
|
link.rel = "shortcut icon";
|
||||||
document.getElementsByTagName("head")[0].appendChild(link);
|
document.getElementsByTagName("head")[0].appendChild(link);
|
||||||
window.document.title = localStorage.getItem("title") + " - 运营后台";
|
window.document.title = localStorage.getItem("title") + " - 运营后台";
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 读取未读消息数
|
// 读取未读消息数
|
||||||
getNoticePage({}).then((res) => {
|
getNoticePage({}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
@ -160,28 +147,7 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getSite(){
|
|
||||||
//获取domainLogo
|
|
||||||
getBaseSite().then((res) => {
|
|
||||||
const { domainLogo, siteName } = JSON.parse(res.result.settingValue);
|
|
||||||
this.domainLogo = domainLogo;
|
|
||||||
// 过期时间
|
|
||||||
var expirationTime = new Date().setHours(new Date().getHours() + 1);
|
|
||||||
// 存放过期时间
|
|
||||||
localStorage.setItem("icontitle_expiration_time", expirationTime);
|
|
||||||
// 存放信息
|
|
||||||
localStorage.setItem('icon', domainLogo);
|
|
||||||
localStorage.setItem('title', siteName);
|
|
||||||
let link =
|
|
||||||
document.querySelector("link[rel*='icon']") ||
|
|
||||||
document.createElement("link");
|
|
||||||
link.type = "image/x-icon";
|
|
||||||
link.href = domainLogo;
|
|
||||||
link.rel = "shortcut icon";
|
|
||||||
document.getElementsByTagName("head")[0].appendChild(link);
|
|
||||||
window.document.title = siteName + " - 运营后台";
|
|
||||||
})
|
|
||||||
},
|
|
||||||
//用户头像下方抽屉点击
|
//用户头像下方抽屉点击
|
||||||
handleClickUserDropdown(name) {
|
handleClickUserDropdown(name) {
|
||||||
//个人中心
|
//个人中心
|
||||||
|
|
|
@ -6,7 +6,10 @@
|
||||||
<h4>基本信息</h4>
|
<h4>基本信息</h4>
|
||||||
<div class="form-item-view">
|
<div class="form-item-view">
|
||||||
<FormItem label="商品分类">
|
<FormItem label="商品分类">
|
||||||
<span v-for="(item,index) in goods.categoryName" :key="index"> {{ item }} <i v-if="index !== (goods.categoryName.length-1)">></i> </span>
|
<span v-for="(item, index) in goods.categoryName" :key="index">
|
||||||
|
{{ item }}
|
||||||
|
<i v-if="index !== goods.categoryName.length - 1">></i>
|
||||||
|
</span>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="商品名称">
|
<FormItem label="商品名称">
|
||||||
{{ goods.goodsName }}
|
{{ goods.goodsName }}
|
||||||
|
@ -20,15 +23,29 @@
|
||||||
<div class="form-item-view">
|
<div class="form-item-view">
|
||||||
<FormItem label="计量单位"> {{ goods.goodsUnit }}</FormItem>
|
<FormItem label="计量单位"> {{ goods.goodsUnit }}</FormItem>
|
||||||
<FormItem label="销售模式">
|
<FormItem label="销售模式">
|
||||||
{{ goods.salesModel === 'RETAIL' ? '零售型' : '批发型' }}
|
{{ goods.salesModel === "RETAIL" ? "零售型" : "批发型" }}
|
||||||
|
</FormItem>
|
||||||
|
<FormItem label="销售规则">
|
||||||
|
<Table
|
||||||
|
border
|
||||||
|
:columns="wholesalePreviewColumns"
|
||||||
|
:data="wholesaleData"
|
||||||
|
>
|
||||||
|
</Table>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</div>
|
</div>
|
||||||
<h4>商品规格及图片</h4>
|
<h4>商品规格及图片</h4>
|
||||||
<div class="form-item-view">
|
<div class="form-item-view">
|
||||||
<FormItem label="商品编号"> {{ goods.id }}</FormItem>
|
<FormItem label="商品编号"> {{ goods.id }}</FormItem>
|
||||||
<FormItem label="商品价格"> ¥{{ goods.price | unitPrice }} </FormItem>
|
<FormItem label="商品价格">
|
||||||
|
¥{{ goods.price | unitPrice }}
|
||||||
|
</FormItem>
|
||||||
<FormItem label="商品图片">
|
<FormItem label="商品图片">
|
||||||
<div class="demo-upload-list" v-for="(item, __index) in goods.goodsGalleryList" :key="__index">
|
<div
|
||||||
|
class="demo-upload-list"
|
||||||
|
v-for="(item, __index) in goods.goodsGalleryList"
|
||||||
|
:key="__index"
|
||||||
|
>
|
||||||
<img :src="item" />
|
<img :src="item" />
|
||||||
<div class="demo-upload-list-cover">
|
<div class="demo-upload-list-cover">
|
||||||
<Icon
|
<Icon
|
||||||
|
@ -48,12 +65,45 @@
|
||||||
<FormItem label="商品规格">
|
<FormItem label="商品规格">
|
||||||
<Table :columns="skuColumn" :data="skuData">
|
<Table :columns="skuColumn" :data="skuData">
|
||||||
<template slot="showImage" slot-scope="scope">
|
<template slot="showImage" slot-scope="scope">
|
||||||
<div style="margin-top: 5px;height: 80px; display: flex;">
|
<div style="margin-top: 5px; height: 80px; display: flex">
|
||||||
<div>
|
<div>
|
||||||
<img :src="scope.row.image" style="height: 60px;margin-top: 1px;width: 60px">
|
<img
|
||||||
|
:src="scope.row.image"
|
||||||
|
style="height: 60px; margin-top: 1px; width: 60px"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<template slot-scope="{ row }" slot="wholePrice0">
|
||||||
|
<Input
|
||||||
|
v-if="wholesaleData[0]"
|
||||||
|
clearable
|
||||||
|
disabled
|
||||||
|
v-model="wholesaleData[0].price"
|
||||||
|
>
|
||||||
|
<span slot="append">元</span>
|
||||||
|
</Input>
|
||||||
|
</template>
|
||||||
|
<template slot-scope="{ row }" slot="wholePrice1">
|
||||||
|
<Input
|
||||||
|
v-if="wholesaleData[1]"
|
||||||
|
clearable
|
||||||
|
disabled
|
||||||
|
v-model="wholesaleData[1].price"
|
||||||
|
>
|
||||||
|
<span slot="append">元</span>
|
||||||
|
</Input>
|
||||||
|
</template>
|
||||||
|
<template slot-scope="{ row }" slot="wholePrice2">
|
||||||
|
<Input
|
||||||
|
v-if="wholesaleData[2]"
|
||||||
|
clearable
|
||||||
|
disabled
|
||||||
|
v-model="wholesaleData[2].price"
|
||||||
|
>
|
||||||
|
<span slot="append">元</span>
|
||||||
|
</Input>
|
||||||
|
</template>
|
||||||
</Table>
|
</Table>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</div>
|
</div>
|
||||||
|
@ -62,9 +112,7 @@
|
||||||
<FormItem label="商品描述">
|
<FormItem label="商品描述">
|
||||||
<div v-html="goods.intro"></div>
|
<div v-html="goods.intro"></div>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem label="移动端描述">
|
||||||
label="移动端描述"
|
|
||||||
>
|
|
||||||
<div v-html="goods.mobileIntro"></div>
|
<div v-html="goods.mobileIntro"></div>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</div>
|
</div>
|
||||||
|
@ -80,68 +128,95 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
goods: {}, // 商品信息
|
goods: {}, // 商品信息
|
||||||
previewGoodsPicture: '', // 预览图片
|
previewGoodsPicture: "", // 预览图片
|
||||||
goodsPictureVisible: false, // 预览图片模态框
|
goodsPictureVisible: false, // 预览图片模态框
|
||||||
skuColumn: [ // 规格表头
|
wholesalePreviewColumns: [
|
||||||
{
|
{
|
||||||
title: '规格',
|
title: "销售规则",
|
||||||
key: 'specs'
|
width: 300,
|
||||||
|
render: (h, params) => {
|
||||||
|
let guide =
|
||||||
|
"当商品购买数量 ≥" +
|
||||||
|
params.row.num +
|
||||||
|
" 时,售价为 ¥" +
|
||||||
|
params.row.price +
|
||||||
|
" /" +
|
||||||
|
this.goods.goodsUnit;
|
||||||
|
return h("div", guide);
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: '编号',
|
|
||||||
key: 'sn'
|
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: '重量(kg)',
|
|
||||||
key: 'weight'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '成本',
|
|
||||||
key: 'cost'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '价格',
|
|
||||||
key: 'price'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '图片',
|
|
||||||
slot: "showImage",
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
skuData: [] // sku数据
|
wholesaleData: [],
|
||||||
}
|
skuColumn: [
|
||||||
|
// 规格表头
|
||||||
|
{
|
||||||
|
title: "规格",
|
||||||
|
key: "specs",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "编号",
|
||||||
|
key: "sn",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "重量(kg)",
|
||||||
|
key: "weight",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
skuData: [], // sku数据
|
||||||
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initGoods(this.$route.query.id);
|
this.initGoods(this.$route.query.id);
|
||||||
}
|
},
|
||||||
,
|
|
||||||
methods: {
|
methods: {
|
||||||
// 初始化数据,获取商品详情
|
// 初始化数据,获取商品详情
|
||||||
initGoods(id) {
|
initGoods(id) {
|
||||||
getGoodsDetail(id).then(res => {
|
getGoodsDetail(id).then((res) => {
|
||||||
this.goods = res.result;
|
this.goods = res.result;
|
||||||
let that = this
|
let that = this;
|
||||||
res.result.skuList.forEach(function (sku, index, array) {
|
res.result.skuList.forEach(function (sku, index, array) {
|
||||||
that.skuData.push({
|
that.skuData.push({
|
||||||
'specs': sku.goodsName,
|
specs: sku.goodsName,
|
||||||
'sn': sku.sn,
|
sn: sku.sn,
|
||||||
'weight': sku.weight,
|
weight: sku.weight,
|
||||||
'cost': that.$options.filters.unitPrice(sku.cost, "¥"),
|
cost: that.$options.filters.unitPrice(sku.cost, "¥"),
|
||||||
'price': that.$options.filters.unitPrice(sku.price, "¥"),
|
price: that.$options.filters.unitPrice(sku.price, "¥"),
|
||||||
'image': sku.thumbnail,
|
image: sku.thumbnail,
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
console.warn(this.skuData)
|
if (res.result.salesModel === "WHOLESALE" && res.result.wholesaleList) {
|
||||||
|
res.result.wholesaleList.forEach((item, index) => {
|
||||||
|
this.skuColumn.push({
|
||||||
|
title: "购买量 ≥ " + item.num,
|
||||||
|
slot: "wholePrice" + index,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.skuColumn.push(
|
||||||
|
{
|
||||||
|
title: "成本",
|
||||||
|
key: "cost",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "价格",
|
||||||
|
key: "price",
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
this.skuColumn.push({
|
||||||
|
title: "图片",
|
||||||
|
slot: "showImage",
|
||||||
|
});
|
||||||
|
this.wholesaleData = res.result.wholesaleList;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 预览商品图片
|
// 预览商品图片
|
||||||
handleViewGoodsPicture(url) {
|
handleViewGoodsPicture(url) {
|
||||||
this.previewGoodsPicture = url;
|
this.previewGoodsPicture = url;
|
||||||
this.goodsPictureVisible = true;
|
this.goodsPictureVisible = true;
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" soped>
|
<style lang="scss" soped>
|
||||||
|
@ -175,7 +250,7 @@ div.base-info-item {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
position: relative;
|
position: relative;
|
||||||
box-shadow: 0 1px 1px rgba(0,0,0,.2);
|
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
.demo-upload-list img {
|
.demo-upload-list img {
|
||||||
|
@ -189,7 +264,7 @@ div.base-info-item {
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
background: rgba(0,0,0,.6);
|
background: rgba(0, 0, 0, 0.6);
|
||||||
}
|
}
|
||||||
.demo-upload-list:hover .demo-upload-list-cover {
|
.demo-upload-list:hover .demo-upload-list-cover {
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -203,5 +278,4 @@ div.base-info-item {
|
||||||
.ivu-table table {
|
.ivu-table table {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,14 +1,71 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<Row class="header">
|
<Row class="header">
|
||||||
<img src="../../assets/logo.png" class="logo" width="220px">
|
<img :src="domainLogo" class="logo" width="220px" />
|
||||||
</Row>
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { getBaseSite } from "@/api/common.js";
|
||||||
export default {
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
domainLogo: require("@/assets/logo.png"),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init() {
|
||||||
|
if (
|
||||||
|
!localStorage.getItem("icon") ||
|
||||||
|
!localStorage.getItem("title") ||
|
||||||
|
!localStorage.getItem("icontitle_expiration_time")
|
||||||
|
) {
|
||||||
|
this.getSite();
|
||||||
|
} else {
|
||||||
|
// 如果缓存过期,则获取最新的信息
|
||||||
|
if (new Date() > localStorage.getItem("icontitle_expiration_time")) {
|
||||||
|
this.getSite();
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
this.domainLogo = localStorage.getItem("icon");
|
||||||
|
let link =
|
||||||
|
document.querySelector("link[rel*='icon']") ||
|
||||||
|
document.createElement("link");
|
||||||
|
link.type = "image/x-icon";
|
||||||
|
link.href = localStorage.getItem("icon");
|
||||||
|
link.rel = "shortcut icon";
|
||||||
|
document.getElementsByTagName("head")[0].appendChild(link);
|
||||||
|
window.document.title = localStorage.getItem("title") + " - 运营后台";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getSite() {
|
||||||
|
//获取domainLogo
|
||||||
|
getBaseSite().then((res) => {
|
||||||
|
const { domainLogo, siteName } = JSON.parse(res.result.settingValue);
|
||||||
|
this.domainLogo = domainLogo;
|
||||||
|
// 过期时间
|
||||||
|
var expirationTime = new Date().setHours(new Date().getHours() + 1);
|
||||||
|
// 存放过期时间
|
||||||
|
localStorage.setItem("icontitle_expiration_time", expirationTime);
|
||||||
|
// 存放信息
|
||||||
|
localStorage.setItem("icon", domainLogo);
|
||||||
|
localStorage.setItem("title", siteName);
|
||||||
|
let link =
|
||||||
|
document.querySelector("link[rel*='icon']") ||
|
||||||
|
document.createElement("link");
|
||||||
|
link.type = "image/x-icon";
|
||||||
|
link.href = domainLogo;
|
||||||
|
link.rel = "shortcut icon";
|
||||||
|
document.getElementsByTagName("head")[0].appendChild(link);
|
||||||
|
window.document.title = siteName + " - 运营后台";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.init();
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -25,11 +25,11 @@
|
||||||
<Button @click="onClickImg('buyerSideLogo')">选择图片</Button>
|
<Button @click="onClickImg('buyerSideLogo')">选择图片</Button>
|
||||||
</div>
|
</div>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="商家端Logo" prop="sellerSideLogo">
|
<FormItem label="商家端Logo" prop="storeSideLogo">
|
||||||
<div class="label-item-upload">
|
<div class="label-item-upload">
|
||||||
<img v-if="formValidate.sellerSideLogo" class="img" :src="formValidate.sellerSideLogo" />
|
<img v-if="formValidate.storeSideLogo" class="img" :src="formValidate.storeSideLogo" />
|
||||||
<img v-else class="img" src="../../../../assets/emptyImg.png" alt="">
|
<img v-else class="img" src="../../../../assets/emptyImg.png" alt="">
|
||||||
<Button @click="onClickImg('sellerSideLogo')">选择图片</Button>
|
<Button @click="onClickImg('storeSideLogo')">选择图片</Button>
|
||||||
</div>
|
</div>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ export default {
|
||||||
buyerSideLogo: "",
|
buyerSideLogo: "",
|
||||||
domainLogo: "",
|
domainLogo: "",
|
||||||
icp: "",
|
icp: "",
|
||||||
sellerSideLogo: "",
|
storeSideLogo: "",
|
||||||
siteName: "",
|
siteName: "",
|
||||||
staticPageAddress: "",
|
staticPageAddress: "",
|
||||||
staticPageWapAddress: "",
|
staticPageWapAddress: "",
|
||||||
|
|
|
@ -1,21 +1,45 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate" :rules="ruleValidate">
|
<Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate" :rules="ruleValidate">
|
||||||
|
|
||||||
<FormItem label="endPoint" prop="endPoint">
|
<FormItem label="endPoint" prop="endPoint">
|
||||||
|
<RadioGroup v-model="formValidate.type" type="button">
|
||||||
|
<Radio label="ALI_OSS">阿里OSS</Radio>
|
||||||
|
<Radio label="MINIO">MINIO</Radio>
|
||||||
|
</RadioGroup>
|
||||||
|
</FormItem>
|
||||||
|
<!-- 阿里云存储-->
|
||||||
|
<FormItem v-if="formValidate.type==='ALI_OSS'" label="endPoint" prop="endPoint">
|
||||||
<Input v-model="formValidate.endPoint"/>
|
<Input v-model="formValidate.endPoint"/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="bucketName" class="label-item" prop="bucketName">
|
<FormItem v-if="formValidate.type==='ALI_OSS'" label="bucketName" class="label-item" prop="bucketName">
|
||||||
<Input v-model="formValidate.bucketName"/>
|
<Input v-model="formValidate.bucketName"/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="picLocation" prop="bucketName">
|
<FormItem v-if="formValidate.type==='ALI_OSS'" label="picLocation" prop="bucketName">
|
||||||
<Input v-model="formValidate.picLocation"/>
|
<Input v-model="formValidate.picLocation"/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="accessKeyId" prop="accessKeyId">
|
<FormItem v-if="formValidate.type==='ALI_OSS'" label="accessKeyId" prop="accessKeyId">
|
||||||
<Input v-model="formValidate.accessKeyId"/>
|
<Input v-model="formValidate.accessKeyId"/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="accessKeySecret" prop="accessKeySecret">
|
<FormItem v-if="formValidate.type==='ALI_OSS'" label="accessKeySecret" prop="accessKeySecret">
|
||||||
<Input v-model="formValidate.accessKeySecret"/>
|
<Input v-model="formValidate.accessKeySecret"/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- MINIO存储-->
|
||||||
|
|
||||||
|
<FormItem v-if="formValidate.type==='MINIO'" label="endpoint" prop="m_endpoint">
|
||||||
|
<Input v-model="formValidate.m_endpoint"/>
|
||||||
|
</FormItem>
|
||||||
|
<FormItem v-if="formValidate.type==='MINIO'" label="accessKey" class="label-item" prop="m_accessKey">
|
||||||
|
<Input v-model="formValidate.m_accessKey"/>
|
||||||
|
</FormItem>
|
||||||
|
<FormItem v-if="formValidate.type==='MINIO'" label="secretKey" prop="bucketName">
|
||||||
|
<Input v-model="formValidate.m_secretKey"/>
|
||||||
|
</FormItem>
|
||||||
|
<FormItem v-if="formValidate.type==='MINIO'" label="bucketName" prop="accessKeyId">
|
||||||
|
<Input v-model="formValidate.m_bucketName"/>
|
||||||
|
</FormItem>
|
||||||
<div class="label-btns">
|
<div class="label-btns">
|
||||||
<Button type="primary" @click="submit('formValidate')">保存</Button>
|
<Button type="primary" @click="submit('formValidate')">保存</Button>
|
||||||
|
|
||||||
|
@ -26,16 +50,22 @@
|
||||||
<script>
|
<script>
|
||||||
import {setSetting} from "@/api/index";
|
import {setSetting} from "@/api/index";
|
||||||
import {handleSubmit} from "./validate";
|
import {handleSubmit} from "./validate";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
ruleValidate: {}, // 验证规则
|
ruleValidate: {}, // 验证规则
|
||||||
formValidate: { // 表单数据
|
formValidate: { // 表单数据
|
||||||
|
type: "",
|
||||||
accessKeyId: "",
|
accessKeyId: "",
|
||||||
accessKeySecret: "",
|
accessKeySecret: "",
|
||||||
bucketName: "",
|
bucketName: "",
|
||||||
picLocation: "",
|
picLocation: "",
|
||||||
endPoint: "",
|
endPoint: "",
|
||||||
|
m_endpoint: "",
|
||||||
|
m_accessKey: "",
|
||||||
|
m_secretKey: "",
|
||||||
|
m_bucketName: "",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -82,13 +112,16 @@ export default {
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import "./style.scss";
|
@import "./style.scss";
|
||||||
|
|
||||||
.label-item {
|
.label-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .ivu-input {
|
/deep/ .ivu-input {
|
||||||
width: 300px !important;
|
width: 300px !important;
|
||||||
margin: 0 10px;
|
margin: 0 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ivu-input-wrapper {
|
.ivu-input-wrapper {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate" :rules="ruleValidate">
|
<Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate" :rules="ruleValidate">
|
||||||
<FormItem label="消费1元赠送积分" prop="money">
|
<FormItem label="消费1元赠送积分" prop="consumer">
|
||||||
<Input type="number" v-model="formValidate.money">
|
<Input type="number" v-model="formValidate.consumer">
|
||||||
<span slot="append">积分</span>
|
<span slot="append">积分</span>
|
||||||
<!-- <span slot="append">人民币</span>-->
|
|
||||||
</Input>
|
</Input>
|
||||||
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
|
@ -50,7 +50,7 @@ export default {
|
||||||
//阿里OSS配置
|
//阿里OSS配置
|
||||||
{
|
{
|
||||||
type: "OSS_SETTING",
|
type: "OSS_SETTING",
|
||||||
name: "阿里OSS配置",
|
name: "OSS配置",
|
||||||
},
|
},
|
||||||
//阿里短信配置
|
//阿里短信配置
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,3 +16,9 @@ export const getRegion = (params) => {
|
||||||
export function getIMDetail () {
|
export function getIMDetail () {
|
||||||
return getRequest(`${commonUrl}/common/common/IM`);
|
return getRequest(`${commonUrl}/common/common/IM`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//获取图片logo
|
||||||
|
export function getBaseSite () {
|
||||||
|
return getRequest(`${commonUrl}/common/common/site`);
|
||||||
|
}
|
||||||
|
|
|
@ -6,22 +6,40 @@
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<div class="sidebar-menu-con menu-bar">
|
<div class="sidebar-menu-con menu-bar">
|
||||||
<div class="logo-con">
|
<div class="logo-con">
|
||||||
<img src="../assets/logo.png" key="max-logo" />
|
<!-- <img src="../assets/logo.png" key="max-logo" /> -->
|
||||||
|
<img :src="storeSideLogo" key="max-logo" />
|
||||||
</div>
|
</div>
|
||||||
<shrinkable-menu></shrinkable-menu>
|
<shrinkable-menu></shrinkable-menu>
|
||||||
</div>
|
</div>
|
||||||
<!-- 顶部标题栏主体 -->
|
<!-- 顶部标题栏主体 -->
|
||||||
<div class="main-header-con">
|
<div class="main-header-con">
|
||||||
<div class="main-header">
|
<div class="main-header">
|
||||||
<div :class="{'header-avator-con':navType!=4, 'header-avator-con nav4':navType == 4}">
|
<div
|
||||||
|
:class="{
|
||||||
|
'header-avator-con': navType != 4,
|
||||||
|
'header-avator-con nav4': navType == 4,
|
||||||
|
}"
|
||||||
|
>
|
||||||
<!-- 用户头像 -->
|
<!-- 用户头像 -->
|
||||||
<div class="user-dropdown-menu-con">
|
<div class="user-dropdown-menu-con">
|
||||||
<Row type="flex" justify="end" align="middle" class="user-dropdown-innercon">
|
<Row
|
||||||
<Dropdown transfer trigger="hover" @on-click="handleClickUserDropdown">
|
type="flex"
|
||||||
|
justify="end"
|
||||||
|
align="middle"
|
||||||
|
class="user-dropdown-innercon"
|
||||||
|
>
|
||||||
|
<Dropdown
|
||||||
|
transfer
|
||||||
|
trigger="hover"
|
||||||
|
@on-click="handleClickUserDropdown"
|
||||||
|
>
|
||||||
<div class="dropList">
|
<div class="dropList">
|
||||||
<span class="main-user-name">{{ userInfo.storeName }}</span>
|
<span class="main-user-name">{{ userInfo.storeName }}</span>
|
||||||
<Icon type="md-arrow-dropdown" />
|
<Icon type="md-arrow-dropdown" />
|
||||||
<Avatar :src="userInfo.storeLogo" style="background: #fff;margin-left: 10px;"></Avatar>
|
<Avatar
|
||||||
|
:src="userInfo.storeLogo"
|
||||||
|
style="background: #fff; margin-left: 10px"
|
||||||
|
></Avatar>
|
||||||
</div>
|
</div>
|
||||||
<DropdownMenu slot="list">
|
<DropdownMenu slot="list">
|
||||||
<DropdownItem name="changePass">修改密码</DropdownItem>
|
<DropdownItem name="changePass">修改密码</DropdownItem>
|
||||||
|
@ -71,6 +89,7 @@ export default {
|
||||||
sliceNum: 5, // 展示nav数量
|
sliceNum: 5, // 展示nav数量
|
||||||
userInfo: {}, // 用户信息
|
userInfo: {}, // 用户信息
|
||||||
navType: 1, // nav类型
|
navType: 1, // nav类型
|
||||||
|
storeSideLogo: "", //logo图片
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -98,6 +117,16 @@ export default {
|
||||||
if (pathArr.length >= 2) {
|
if (pathArr.length >= 2) {
|
||||||
this.$store.commit("addOpenSubmenu", pathArr[1].name);
|
this.$store.commit("addOpenSubmenu", pathArr[1].name);
|
||||||
}
|
}
|
||||||
|
this.storeSideLogo = localStorage.getItem("sellerlogoImg");
|
||||||
|
window.document.title = localStorage.getItem("sellersiteName");
|
||||||
|
//动态获取icon
|
||||||
|
let link =
|
||||||
|
document.querySelector("link[rel*='icon']") ||
|
||||||
|
document.createElement("link");
|
||||||
|
link.type = "image/x-icon";
|
||||||
|
link.href = localStorage.getItem("sellerlogoImg");
|
||||||
|
link.rel = "shortcut icon";
|
||||||
|
document.getElementsByTagName("head")[0].appendChild(link);
|
||||||
|
|
||||||
let userInfo = JSON.parse(Cookies.get("userInfoSeller"));
|
let userInfo = JSON.parse(Cookies.get("userInfoSeller"));
|
||||||
this.userInfo = userInfo;
|
this.userInfo = userInfo;
|
||||||
|
|
|
@ -1,14 +1,77 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<Row class="header">
|
<Row class="header">
|
||||||
<img class="logo" src="@/assets/logo.png" >
|
<img class="logo" :src="storeSideLogo" />
|
||||||
</Row>
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { getBaseSite } from "@/api/common.js";
|
||||||
export default {
|
export default {
|
||||||
name: "header",
|
name: "header",
|
||||||
|
data(){
|
||||||
|
return{
|
||||||
|
storeSideLogo: require('@/assets/logo.png')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init() {
|
||||||
|
if (
|
||||||
|
!localStorage.getItem("sellersiteName") ||
|
||||||
|
!localStorage.getItem("sellerlogoImg") ||
|
||||||
|
!localStorage.getItem("seller_expiration_time")
|
||||||
|
) {
|
||||||
|
this.getSite();
|
||||||
|
} else {
|
||||||
|
// 如果缓存过期,则获取最新的信息
|
||||||
|
if (new Date() > localStorage.getItem("seller_expiration_time")) {
|
||||||
|
this.getSite();
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
this.storeSideLogo = localStorage.getItem("sellerlogoImg");
|
||||||
|
window.document.title = localStorage.getItem("sellersiteName");
|
||||||
|
//动态获取icon
|
||||||
|
let link =
|
||||||
|
document.querySelector("link[rel*='icon']") ||
|
||||||
|
document.createElement("link");
|
||||||
|
link.type = "image/x-icon";
|
||||||
|
link.href = localStorage.getItem("sellerlogoImg");
|
||||||
|
link.rel = "shortcut icon";
|
||||||
|
document.getElementsByTagName("head")[0].appendChild(link);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getSite() {
|
||||||
|
//获取基本站点信息
|
||||||
|
getBaseSite().then((res) => {
|
||||||
|
if (res.success && res.result.settingValue) {
|
||||||
|
let data = JSON.parse(res.result.settingValue);
|
||||||
|
// 过期时间
|
||||||
|
var expirationTime = new Date().setHours(new Date().getHours() + 1);
|
||||||
|
// 存放过期时间
|
||||||
|
localStorage.setItem("seller_expiration_time", expirationTime);
|
||||||
|
// 存放信息
|
||||||
|
localStorage.setItem("sellersiteName", data.siteName);
|
||||||
|
localStorage.setItem("sellerlogoImg", data.storeSideLogo);
|
||||||
|
console.log(data,'datadadada')
|
||||||
|
window.document.title = data.siteName;
|
||||||
|
//动态获取icon
|
||||||
|
let link =
|
||||||
|
document.querySelector("link[rel*='icon']") ||
|
||||||
|
document.createElement("link");
|
||||||
|
link.type = "image/x-icon";
|
||||||
|
link.href = data.storeSideLogo;
|
||||||
|
link.rel = "shortcut icon";
|
||||||
|
document.getElementsByTagName("head")[0].appendChild(link);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.init();
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -129,10 +129,10 @@
|
||||||
<i class="fa fa-exclamation-circle" aria-hidden="true"></i>
|
<i class="fa fa-exclamation-circle" aria-hidden="true"></i>
|
||||||
<Icon type="ios-information-circle-outline" />
|
<Icon type="ios-information-circle-outline" />
|
||||||
指定地区城市为空或指定错误
|
指定地区城市为空或指定错误
|
||||||
<Icon type="ios-information-circle-outline" />
|
<!-- <Icon type="ios-information-circle-outline" />
|
||||||
首费应输入正确的金额
|
首费应输入正确的金额
|
||||||
<Icon type="ios-information-circle-outline" />
|
<Icon type="ios-information-circle-outline" />
|
||||||
续费应输入正确的金额
|
续费应输入正确的金额 -->
|
||||||
<Icon type="ios-information-circle-outline" />
|
<Icon type="ios-information-circle-outline" />
|
||||||
首(续)件(重)费应输入大于0的整数
|
首(续)件(重)费应输入大于0的整数
|
||||||
</div>
|
</div>
|
||||||
|
@ -357,9 +357,9 @@ export default {
|
||||||
if (
|
if (
|
||||||
this.form.freightTemplateChildList[i].area == "" ||
|
this.form.freightTemplateChildList[i].area == "" ||
|
||||||
this.form.freightTemplateChildList[i].firstCompany == "" ||
|
this.form.freightTemplateChildList[i].firstCompany == "" ||
|
||||||
this.form.freightTemplateChildList[i].firstPrice == "" ||
|
// this.form.freightTemplateChildList[i].firstPrice == "" ||
|
||||||
this.form.freightTemplateChildList[i].continuedCompany == "" ||
|
this.form.freightTemplateChildList[i].continuedCompany == ""
|
||||||
this.form.freightTemplateChildList[i].continuedPrice == ""
|
// this.form.freightTemplateChildList[i].continuedPrice == ""
|
||||||
) {
|
) {
|
||||||
this.saveError = true;
|
this.saveError = true;
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue