合并master 更改并提交内容
commit
59cfa0efb0
|
@ -14,19 +14,19 @@ export default {
|
|||
},
|
||||
methods:{
|
||||
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();
|
||||
}else{
|
||||
// 如果缓存过期,则获取最新的信息
|
||||
if (new Date() > localStorage.getItem("sitelogo_expiration_time")) {
|
||||
if (new Date() > storage.getItem("sitelogo_expiration_time")) {
|
||||
this.getSite();
|
||||
return;
|
||||
}else{
|
||||
window.document.title = localStorage.getItem("siteName");
|
||||
window.document.title = storage.getItem("siteName");
|
||||
//动态获取icon
|
||||
let link =document.querySelector("link[rel*='icon']") ||document.createElement("link");
|
||||
link.type = "image/x-icon";
|
||||
link.href = localStorage.getItem("logoImg");
|
||||
link.href = storage.getItem("logoImg");
|
||||
link.rel = "shortcut icon";
|
||||
document.getElementsByTagName("head")[0].appendChild(link);
|
||||
}
|
||||
|
@ -41,10 +41,10 @@ export default {
|
|||
// 过期时间
|
||||
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);
|
||||
localStorage.setItem('logoImg', data.buyerSideLogo);
|
||||
storage.setItem('siteName', data.siteName);
|
||||
storage.setItem('logoImg', data.buyerSideLogo);
|
||||
|
||||
window.document.title = data.siteName;
|
||||
//动态获取icon
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
const Cookie = require('js-cookie')
|
||||
module.exports = {
|
||||
title:Cookie.get('siteName'), //配置显示在浏览器标签的title、底部信息、部分信息展示的值
|
||||
title:Cookie.get('siteName') || 'lilishop', //配置显示在浏览器标签的title、底部信息、部分信息展示的值
|
||||
icpCard: "", // icp证
|
||||
company: {
|
||||
href: "https://pickmall.cn",
|
||||
|
|
|
@ -12,7 +12,7 @@ export default new Vuex.Store({
|
|||
navList: [], // 首页快捷导航
|
||||
cartNum: storage.getItem('cartNum') || 0,
|
||||
logoImg: storage.getItem('logoImg') || require('@/assets/images/logo2.png'),
|
||||
siteName:storage.getItem('siteName')|| null,
|
||||
siteName:storage.getItem('siteName')|| 'lilishop',
|
||||
hotWordsList: storage.getItem('hotWordsList'),
|
||||
category: JSON.parse(localStorage.getItem('category'))
|
||||
},
|
||||
|
|
|
@ -129,28 +129,15 @@ export default {
|
|||
if (currWidth <= 1200) {
|
||||
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");
|
||||
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") + " - 运营后台";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
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") + " - 运营后台";
|
||||
// 读取未读消息数
|
||||
getNoticePage({}).then((res) => {
|
||||
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) {
|
||||
//个人中心
|
||||
|
|
|
@ -6,7 +6,10 @@
|
|||
<h4>基本信息</h4>
|
||||
<div class="form-item-view">
|
||||
<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 label="商品名称">
|
||||
{{ goods.goodsName }}
|
||||
|
@ -20,16 +23,30 @@
|
|||
<div class="form-item-view">
|
||||
<FormItem label="计量单位"> {{ goods.goodsUnit }}</FormItem>
|
||||
<FormItem label="销售模式">
|
||||
{{ goods.salesModel === 'RETAIL' ? '零售型' : '批发型' }}
|
||||
{{ goods.salesModel === "RETAIL" ? "零售型" : "批发型" }}
|
||||
</FormItem>
|
||||
<FormItem label="销售规则">
|
||||
<Table
|
||||
border
|
||||
:columns="wholesalePreviewColumns"
|
||||
:data="wholesaleData"
|
||||
>
|
||||
</Table>
|
||||
</FormItem>
|
||||
</div>
|
||||
<h4>商品规格及图片</h4>
|
||||
<div class="form-item-view">
|
||||
<FormItem label="商品编号"> {{ goods.id }}</FormItem>
|
||||
<FormItem label="商品价格"> ¥{{ goods.price | unitPrice }} </FormItem>
|
||||
<FormItem label="商品价格">
|
||||
¥{{ goods.price | unitPrice }}
|
||||
</FormItem>
|
||||
<FormItem label="商品图片">
|
||||
<div class="demo-upload-list" v-for="(item, __index) in goods.goodsGalleryList" :key="__index">
|
||||
<img :src="item"/>
|
||||
<div
|
||||
class="demo-upload-list"
|
||||
v-for="(item, __index) in goods.goodsGalleryList"
|
||||
:key="__index"
|
||||
>
|
||||
<img :src="item" />
|
||||
<div class="demo-upload-list-cover">
|
||||
<Icon
|
||||
type="ios-eye-outline"
|
||||
|
@ -48,12 +65,45 @@
|
|||
<FormItem label="商品规格">
|
||||
<Table :columns="skuColumn" :data="skuData">
|
||||
<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>
|
||||
<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>
|
||||
</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>
|
||||
</FormItem>
|
||||
</div>
|
||||
|
@ -62,9 +112,7 @@
|
|||
<FormItem label="商品描述">
|
||||
<div v-html="goods.intro"></div>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label="移动端描述"
|
||||
>
|
||||
<FormItem label="移动端描述">
|
||||
<div v-html="goods.mobileIntro"></div>
|
||||
</FormItem>
|
||||
</div>
|
||||
|
@ -74,74 +122,101 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {getGoodsDetail} from "@/api/goods";
|
||||
import { getGoodsDetail } from "@/api/goods";
|
||||
export default {
|
||||
name: "goodsDetail",
|
||||
data() {
|
||||
return {
|
||||
goods: {}, // 商品信息
|
||||
previewGoodsPicture: '', // 预览图片
|
||||
previewGoodsPicture: "", // 预览图片
|
||||
goodsPictureVisible: false, // 预览图片模态框
|
||||
skuColumn: [ // 规格表头
|
||||
wholesalePreviewColumns: [
|
||||
{
|
||||
title: '规格',
|
||||
key: 'specs'
|
||||
title: "销售规则",
|
||||
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() {
|
||||
this.initGoods(this.$route.query.id);
|
||||
}
|
||||
,
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据,获取商品详情
|
||||
initGoods(id) {
|
||||
getGoodsDetail(id).then(res => {
|
||||
getGoodsDetail(id).then((res) => {
|
||||
this.goods = res.result;
|
||||
let that = this
|
||||
let that = this;
|
||||
res.result.skuList.forEach(function (sku, index, array) {
|
||||
that.skuData.push({
|
||||
'specs': sku.goodsName,
|
||||
'sn': sku.sn,
|
||||
'weight': sku.weight,
|
||||
'cost': that.$options.filters.unitPrice(sku.cost, "¥"),
|
||||
'price': that.$options.filters.unitPrice(sku.price, "¥"),
|
||||
'image': sku.thumbnail,
|
||||
specs: sku.goodsName,
|
||||
sn: sku.sn,
|
||||
weight: sku.weight,
|
||||
cost: that.$options.filters.unitPrice(sku.cost, "¥"),
|
||||
price: that.$options.filters.unitPrice(sku.price, "¥"),
|
||||
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) {
|
||||
this.previewGoodsPicture = url;
|
||||
this.goodsPictureVisible = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" soped>
|
||||
|
@ -164,7 +239,7 @@ div.base-info-item {
|
|||
}
|
||||
}
|
||||
|
||||
.demo-upload-list{
|
||||
.demo-upload-list {
|
||||
display: inline-block;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
|
@ -175,26 +250,26 @@ div.base-info-item {
|
|||
overflow: hidden;
|
||||
background: #fff;
|
||||
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;
|
||||
}
|
||||
.demo-upload-list img{
|
||||
.demo-upload-list img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.demo-upload-list-cover{
|
||||
.demo-upload-list-cover {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 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;
|
||||
}
|
||||
.demo-upload-list-cover i{
|
||||
.demo-upload-list-cover i {
|
||||
color: #fff;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
|
@ -203,5 +278,4 @@ div.base-info-item {
|
|||
.ivu-table table {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
@ -1,14 +1,71 @@
|
|||
<template>
|
||||
<div>
|
||||
<Row class="header">
|
||||
<img src="../../assets/logo.png" class="logo" width="220px">
|
||||
<img :src="domainLogo" class="logo" width="220px" />
|
||||
</Row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getBaseSite } from "@/api/common.js";
|
||||
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>
|
||||
|
||||
|
|
|
@ -25,11 +25,11 @@
|
|||
<Button @click="onClickImg('buyerSideLogo')">选择图片</Button>
|
||||
</div>
|
||||
</FormItem>
|
||||
<FormItem label="商家端Logo" prop="sellerSideLogo">
|
||||
<FormItem label="商家端Logo" prop="storeSideLogo">
|
||||
<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="">
|
||||
<Button @click="onClickImg('sellerSideLogo')">选择图片</Button>
|
||||
<Button @click="onClickImg('storeSideLogo')">选择图片</Button>
|
||||
</div>
|
||||
</FormItem>
|
||||
|
||||
|
@ -72,7 +72,7 @@ export default {
|
|||
buyerSideLogo: "",
|
||||
domainLogo: "",
|
||||
icp: "",
|
||||
sellerSideLogo: "",
|
||||
storeSideLogo: "",
|
||||
siteName: "",
|
||||
staticPageAddress: "",
|
||||
staticPageWapAddress: "",
|
||||
|
|
|
@ -1,20 +1,44 @@
|
|||
<template>
|
||||
<div class="layout">
|
||||
<Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate" :rules="ruleValidate">
|
||||
|
||||
<FormItem label="endPoint" prop="endPoint">
|
||||
<Input v-model="formValidate.endPoint" />
|
||||
<RadioGroup v-model="formValidate.type" type="button">
|
||||
<Radio label="ALI_OSS">阿里OSS</Radio>
|
||||
<Radio label="MINIO">MINIO</Radio>
|
||||
</RadioGroup>
|
||||
</FormItem>
|
||||
<FormItem label="bucketName" class="label-item" prop="bucketName">
|
||||
<Input v-model="formValidate.bucketName" />
|
||||
<!-- 阿里云存储-->
|
||||
<FormItem v-if="formValidate.type==='ALI_OSS'" label="endPoint" prop="endPoint">
|
||||
<Input v-model="formValidate.endPoint"/>
|
||||
</FormItem>
|
||||
<FormItem label="picLocation" prop="bucketName">
|
||||
<Input v-model="formValidate.picLocation" />
|
||||
<FormItem v-if="formValidate.type==='ALI_OSS'" label="bucketName" class="label-item" prop="bucketName">
|
||||
<Input v-model="formValidate.bucketName"/>
|
||||
</FormItem>
|
||||
<FormItem label="accessKeyId" prop="accessKeyId">
|
||||
<Input v-model="formValidate.accessKeyId" />
|
||||
<FormItem v-if="formValidate.type==='ALI_OSS'" label="picLocation" prop="bucketName">
|
||||
<Input v-model="formValidate.picLocation"/>
|
||||
</FormItem>
|
||||
<FormItem label="accessKeySecret" prop="accessKeySecret">
|
||||
<Input v-model="formValidate.accessKeySecret" />
|
||||
<FormItem v-if="formValidate.type==='ALI_OSS'" label="accessKeyId" prop="accessKeyId">
|
||||
<Input v-model="formValidate.accessKeyId"/>
|
||||
</FormItem>
|
||||
<FormItem v-if="formValidate.type==='ALI_OSS'" label="accessKeySecret" prop="accessKeySecret">
|
||||
<Input v-model="formValidate.accessKeySecret"/>
|
||||
</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">
|
||||
<Button type="primary" @click="submit('formValidate')">保存</Button>
|
||||
|
@ -24,18 +48,24 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { setSetting } from "@/api/index";
|
||||
import { handleSubmit } from "./validate";
|
||||
import {setSetting} from "@/api/index";
|
||||
import {handleSubmit} from "./validate";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ruleValidate: {}, // 验证规则
|
||||
formValidate: { // 表单数据
|
||||
type: "",
|
||||
accessKeyId: "",
|
||||
accessKeySecret: "",
|
||||
bucketName: "",
|
||||
picLocation: "",
|
||||
endPoint: "",
|
||||
m_endpoint: "",
|
||||
m_accessKey: "",
|
||||
m_secretKey: "",
|
||||
m_bucketName: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
|
@ -47,7 +77,7 @@ export default {
|
|||
// 保存
|
||||
submit(name) {
|
||||
let that = this;
|
||||
if( handleSubmit(that, name )){
|
||||
if (handleSubmit(that, name)) {
|
||||
this.setupSetting()
|
||||
}
|
||||
},
|
||||
|
@ -65,7 +95,7 @@ export default {
|
|||
init() {
|
||||
this.res = JSON.parse(this.res);
|
||||
|
||||
this.$set(this, "formValidate", { ...this.res });
|
||||
this.$set(this, "formValidate", {...this.res});
|
||||
Object.keys(this.formValidate).forEach((item) => {
|
||||
this.ruleValidate[item] = [
|
||||
{
|
||||
|
@ -82,13 +112,16 @@ export default {
|
|||
|
||||
<style lang="scss" scoped>
|
||||
@import "./style.scss";
|
||||
|
||||
.label-item {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
/deep/ .ivu-input {
|
||||
width: 300px !important;
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
.ivu-input-wrapper {
|
||||
width: 300px;
|
||||
margin-right: 10px;
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
<template>
|
||||
<div class="layout">
|
||||
<Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate" :rules="ruleValidate">
|
||||
<FormItem label="消费1元赠送积分" prop="money">
|
||||
<Input type="number" v-model="formValidate.money">
|
||||
<FormItem label="消费1元赠送积分" prop="consumer">
|
||||
<Input type="number" v-model="formValidate.consumer">
|
||||
<span slot="append">积分</span>
|
||||
<!-- <span slot="append">人民币</span>-->
|
||||
</Input>
|
||||
|
||||
</FormItem>
|
||||
|
|
|
@ -50,7 +50,7 @@ export default {
|
|||
//阿里OSS配置
|
||||
{
|
||||
type: "OSS_SETTING",
|
||||
name: "阿里OSS配置",
|
||||
name: "OSS配置",
|
||||
},
|
||||
//阿里短信配置
|
||||
{
|
||||
|
|
|
@ -16,3 +16,9 @@ export const getRegion = (params) => {
|
|||
export function getIMDetail () {
|
||||
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="sidebar-menu-con menu-bar">
|
||||
<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>
|
||||
<shrinkable-menu></shrinkable-menu>
|
||||
</div>
|
||||
<!-- 顶部标题栏主体 -->
|
||||
<div class="main-header-con">
|
||||
<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">
|
||||
<Row type="flex" justify="end" align="middle" class="user-dropdown-innercon">
|
||||
<Dropdown transfer trigger="hover" @on-click="handleClickUserDropdown">
|
||||
<Row
|
||||
type="flex"
|
||||
justify="end"
|
||||
align="middle"
|
||||
class="user-dropdown-innercon"
|
||||
>
|
||||
<Dropdown
|
||||
transfer
|
||||
trigger="hover"
|
||||
@on-click="handleClickUserDropdown"
|
||||
>
|
||||
<div class="dropList">
|
||||
<span class="main-user-name">{{ userInfo.storeName }}</span>
|
||||
<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>
|
||||
<DropdownMenu slot="list">
|
||||
<DropdownItem name="changePass">修改密码</DropdownItem>
|
||||
|
@ -71,6 +89,7 @@ export default {
|
|||
sliceNum: 5, // 展示nav数量
|
||||
userInfo: {}, // 用户信息
|
||||
navType: 1, // nav类型
|
||||
storeSideLogo: "", //logo图片
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
@ -98,6 +117,16 @@ export default {
|
|||
if (pathArr.length >= 2) {
|
||||
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"));
|
||||
this.userInfo = userInfo;
|
||||
|
|
|
@ -1,14 +1,77 @@
|
|||
<template>
|
||||
<div>
|
||||
<Row class="header">
|
||||
<img class="logo" src="@/assets/logo.png" >
|
||||
<img class="logo" :src="storeSideLogo" />
|
||||
</Row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getBaseSite } from "@/api/common.js";
|
||||
export default {
|
||||
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>
|
||||
|
||||
|
|
|
@ -129,10 +129,10 @@
|
|||
<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" />
|
||||
首(续)件(重)费应输入大于0的整数
|
||||
</div>
|
||||
|
@ -357,9 +357,9 @@ export default {
|
|||
if (
|
||||
this.form.freightTemplateChildList[i].area == "" ||
|
||||
this.form.freightTemplateChildList[i].firstCompany == "" ||
|
||||
this.form.freightTemplateChildList[i].firstPrice == "" ||
|
||||
this.form.freightTemplateChildList[i].continuedCompany == "" ||
|
||||
this.form.freightTemplateChildList[i].continuedPrice == ""
|
||||
// this.form.freightTemplateChildList[i].firstPrice == "" ||
|
||||
this.form.freightTemplateChildList[i].continuedCompany == ""
|
||||
// this.form.freightTemplateChildList[i].continuedPrice == ""
|
||||
) {
|
||||
this.saveError = true;
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue