合并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:{
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

View File

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

View File

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

View File

@ -129,15 +129,6 @@ 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']") ||
@ -147,10 +138,6 @@ export default {
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) {
//

View File

@ -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)">&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 label="商品名称">
{{ goods.goodsName }}
@ -20,15 +23,29 @@
<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">
<div
class="demo-upload-list"
v-for="(item, __index) in goods.goodsGalleryList"
:key="__index"
>
<img :src="item" />
<div class="demo-upload-list-cover">
<Icon
@ -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>
@ -80,68 +128,95 @@ export default {
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>
@ -175,7 +250,7 @@ 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 {
@ -189,7 +264,7 @@ div.base-info-item {
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 {
display: block;
@ -203,5 +278,4 @@ div.base-info-item {
.ivu-table table {
width: 100% !important;
}
</style>

View File

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

View File

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

View File

@ -1,21 +1,45 @@
<template>
<div class="layout">
<Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate" :rules="ruleValidate">
<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"/>
</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"/>
</FormItem>
<FormItem label="picLocation" prop="bucketName">
<FormItem v-if="formValidate.type==='ALI_OSS'" label="picLocation" prop="bucketName">
<Input v-model="formValidate.picLocation"/>
</FormItem>
<FormItem label="accessKeyId" prop="accessKeyId">
<FormItem v-if="formValidate.type==='ALI_OSS'" label="accessKeyId" prop="accessKeyId">
<Input v-model="formValidate.accessKeyId"/>
</FormItem>
<FormItem label="accessKeySecret" prop="accessKeySecret">
<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>
@ -26,16 +50,22 @@
<script>
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: "",
},
};
},
@ -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;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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