合并master 更改并提交内容

master
lemon橪 2022-06-07 10:22:42 +08:00
commit 59cfa0efb0
14 changed files with 375 additions and 148 deletions

View File

@ -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

View File

@ -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",

View File

@ -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'))
}, },

View File

@ -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) {
// //

View File

@ -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)">&gt;</i> </span> <span v-for="(item, index) in goods.categoryName" :key="index">
{{ item }}
<i v-if="index !== goods.categoryName.length - 1">&gt;</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>

View File

@ -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>

View File

@ -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: "",

View File

@ -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;

View File

@ -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>

View File

@ -50,7 +50,7 @@ export default {
//OSS //OSS
{ {
type: "OSS_SETTING", type: "OSS_SETTING",
name: "阿里OSS配置", name: "OSS配置",
}, },
// //
{ {

View File

@ -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`);
}

View File

@ -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;

View File

@ -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>

View File

@ -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;