优化管理端商家端冗余以及配置内容。抽出公共主题颜色、站点标题等内容。分离config中api配置,修改商家发布中拖拽以及控制台出错的bug。

This commit is contained in:
lemon橪
2021-09-22 15:08:34 +08:00
parent 53cc6f46d1
commit 2037b57a5d
50 changed files with 393 additions and 861 deletions

30
manager/public/config.js Normal file
View File

@@ -0,0 +1,30 @@
var BASE = {
/**
* @description api请求基础路径
*/
API_DEV: {
common: "https://common-api.pickmall.cn",
buyer: "https://buyer-api.pickmall.cn",
seller: "https://store-api.pickmall.cn",
manager: "https://admin-api.pickmall.cn"
},
API_PROD: {
common: "https://common-api.pickmall.cn",
buyer: "https://buyer-api.pickmall.cn",
seller: "https://store-api.pickmall.cn",
manager: "https://admin-api.pickmall.cn"
},
/**
* @description // 跳转买家端地址 pc端
*/
PC_URL: "https://pc-b2b2c.pickmall.cn",
/**
* @description // 跳转买家端地址 wap端
*/
WAP_URL: "https://m-b2b2c.pickmall.cn",
/**
* @description api请求基础路径前缀
*/
PREFIX: "/manager"
};

View File

@@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- <meta name="viewport" content="width=device-width,initial-scale=1.0"> -->
<link rel="icon" href="./logo.ico" type="image/x-icon" />
<title>lili admin</title>
<title>admin</title>
<meta name="keywords" content="keywords" />
<meta name="description" content="description" />
<% for(var css of htmlWebpackPlugin.options.cdn.css) { %>
@@ -67,9 +67,10 @@
<% for(var js of htmlWebpackPlugin.options.cdn.js) { %>
<script src="<%=js%>"></script>
<% } %>
<script src="/config.js"></script>
<noscript>
<strong
>We're sorry but lili-admin doesn't work properly without JavaScript
>We're sorry but admin doesn't work properly without JavaScript
enabled. Please enable it to continue.</strong
>
</noscript>

View File

@@ -10,9 +10,9 @@ import {
postRequestWithNoForm,
managerUrl
} from "@/libs/axios";
import config from "@/config";
let commonUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.common : config.api_prod.common)
let commonUrl = (process.env.NODE_ENV === 'development' ? BASE.API_DEV.common : BASE.API_PROD.common)
// 文件上传接口
export const uploadFile = commonUrl+ "/common/upload/file";

View File

@@ -2,7 +2,7 @@ export default {
/**
* @description 配置显示在浏览器标签的title
*/
title: "Lili电商",
title: "lilishop",
/**
* @description token在Cookie中存储的天数默认1天
*/
@@ -16,26 +16,14 @@ export default {
/**
* @description api请求基础路径
*/
api_dev: {
common: "https://common-api.pickmall.cn",
buyer: "https://buyer-api.pickmall.cn",
seller: "https://store-api.pickmall.cn",
manager: "https://admin-api.pickmall.cn"
// common: 'http://192.168.0.100:8890',
// buyer: 'http://192.168.0.100:8888',
// seller: 'http://192.168.0.100:8889',
// manager: 'http://192.168.0.100:8887'
},
api_prod: {
common: "https://common-api.pickmall.cn",
buyer: "https://buyer-api.pickmall.cn",
seller: "https://store-api.pickmall.cn",
manager: "https://admin-api.pickmall.cn"
},
/**
* @description api请求基础路径前缀
/**
* @description 高德web端申请的api key
*/
baseUrlPrefix: "/manager",
aMapKey: "b440952723253aa9fe483e698057bf7d",
/**
* @description 官网地址
*/
website: "https://www.pickmall.cn",
/**
* @description 需要加载的插件
*/

View File

@@ -1,31 +1,36 @@
import axios from "axios";
import config from "@/config";
import {getStore, setStore} from "./storage.js";
import {router} from "../router/index";
import {Message} from "view-design";
import { getStore, setStore } from "./storage.js";
import { router } from "../router/index";
import { Message } from "view-design";
import Cookies from "js-cookie";
import {handleRefreshToken} from "../api/index"
import { handleRefreshToken } from "../api/index";
// 统一请求路径前缀
export const commonUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.common : config.api_prod.common);
export const managerUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.manager : config.api_prod.manager) + config.baseUrlPrefix;
export const commonUrl =
process.env.NODE_ENV === "development"
? BASE.API_DEV.common
: BASE.API_PROD.common;
export const managerUrl =
(process.env.NODE_ENV === "development"
? BASE.API_DEV.manager
: BASE.API_PROD.manager) + BASE.PREFIX;
const service = axios.create({
timeout: 8000,
baseURL: managerUrl
})
});
var isRefreshToken = 0;
const refreshToken = getTokenDebounce()
const refreshToken = getTokenDebounce();
service.interceptors.request.use(
config => {
if (config.method == 'get') {
if (config.method == "get") {
config.params = {
_t: Date.parse(new Date()) / 1000,
...config.params
}
};
}
const uuid = getStore('uuid');
config.headers['uuid'] = uuid;
const uuid = getStore("uuid");
config.headers["uuid"] = uuid;
return config;
},
err => {
@@ -36,7 +41,7 @@ service.interceptors.request.use(
// http response 拦截器
service.interceptors.response.use(
(response) => {
response => {
const data = response.data;
// 根据返回的code值来做不同的处理(和后端约定)
if (!data.success && data.message) {
@@ -76,7 +81,7 @@ service.interceptors.response.use(
return data;
}
},
async (error) => {
async error => {
// 返回状态码不为200时候的错误处理
if (error.response) {
if (error.response.status === 401) {
@@ -85,80 +90,79 @@ service.interceptors.response.use(
// 避免刷新token报错
} else if (error.response.status === 403) {
isRefreshToken++;
if(isRefreshToken === 1) {
if (isRefreshToken === 1) {
const getTokenRes = await refreshToken();
if (getTokenRes === 'success') { // 刷新token
if (getTokenRes === "success") {
// 刷新token
if (isRefreshToken === 1) {
error.response.config.headers.accessToken = getStore('accessToken')
return service(error.response.config)
error.response.config.headers.accessToken = getStore(
"accessToken"
);
return service(error.response.config);
} else {
router.go(0)
router.go(0);
}
} else {
Cookies.set("userInfoManager", "");
router.push('/login')
router.push("/login");
}
isRefreshToken = 0
isRefreshToken = 0;
}
} else {
// 其他错误处理
console.log(error.response.data);
Message.error(error.response.data.message)
Message.error(error.response.data.message);
}
}
/* router.push("/login") */
return Promise.resolve(error);
}
)
);
// 防抖闭包来一波
function getTokenDebounce() {
let lock = false
let success = false
return function () {
let lock = false;
let success = false;
return function() {
if (!lock) {
lock = true
lock = true;
let oldRefreshToken = getStore("refreshToken");
handleRefreshToken(oldRefreshToken).then(res => {
if (res.success) {
let {
accessToken,
refreshToken
} = res.result;
setStore("accessToken", accessToken);
setStore("refreshToken", refreshToken);
handleRefreshToken(oldRefreshToken)
.then(res => {
if (res.success) {
let { accessToken, refreshToken } = res.result;
setStore("accessToken", accessToken);
setStore("refreshToken", refreshToken);
success = true
lock = false
} else {
success = false
lock = false
router.push('/login')
}
}).catch((err) => {
success = false
lock = false
})
success = true;
lock = false;
} else {
success = false;
lock = false;
router.push("/login");
}
})
.catch(err => {
success = false;
lock = false;
});
}
return new Promise(resolve => {
// 一直看lock,直到请求失败或者成功
const timer = setInterval(() => {
if (!lock) {
clearInterval(timer)
clearInterval(timer);
if (success) {
resolve('success')
resolve("success");
} else {
resolve('fail')
resolve("fail");
}
}
}, 500) // 轮询时间间隔
})
}
}, 500); // 轮询时间间隔
});
};
}
export const getRequest = (url, params) => {
let accessToken = getStore("accessToken");
return service({
@@ -180,19 +184,19 @@ export const postRequest = (url, params, headers) => {
transformRequest: headers
? undefined
: [
function (data) {
let ret = "";
for (let it in data) {
ret +=
encodeURIComponent(it) +
"=" +
encodeURIComponent(data[it]) +
"&";
function(data) {
let ret = "";
for (let it in data) {
ret +=
encodeURIComponent(it) +
"=" +
encodeURIComponent(data[it]) +
"&";
}
ret = ret.substring(0, ret.length - 1);
return ret;
}
ret = ret.substring(0, ret.length - 1);
return ret;
}
],
],
headers: {
"Content-Type": "application/x-www-form-urlencoded",
accessToken: accessToken,
@@ -238,19 +242,19 @@ export const putRequest = (url, params, headers) => {
transformRequest: headers
? undefined
: [
function (data) {
let ret = "";
for (let it in data) {
ret +=
encodeURIComponent(it) +
"=" +
encodeURIComponent(data[it]) +
"&";
function(data) {
let ret = "";
for (let it in data) {
ret +=
encodeURIComponent(it) +
"=" +
encodeURIComponent(data[it]) +
"&";
}
ret = ret.substring(0, ret.length - 1);
return ret;
}
ret = ret.substring(0, ret.length - 1);
return ret;
}
],
],
headers: {
"Content-Type": "application/x-www-form-urlencoded",
accessToken: accessToken,
@@ -321,7 +325,6 @@ export const getRequestWithNoToken = (url, params) => {
});
};
/**
* 无需token验证的请求 避免旧token过期导致请求失败
* @param {*} url
@@ -334,4 +337,3 @@ export const postRequestWithNoToken = (url, params) => {
params: params
});
};

View File

@@ -1,21 +1,16 @@
import axios from 'axios';
import {
getCurrentPermissionList
} from '@/api/index';
import lazyLoading from './lazyLoading.js';
import router from '@/router/index';
import { getCurrentPermissionList } from "@/api/index";
import lazyLoading from "./lazyLoading.js";
import Cookies from "js-cookie";
let util = {
let util = {};
};
util.title = function (title) {
title = title || 'lili 运营后台';
util.title = function(title) {
title = title || "运营后台";
window.document.title = title;
};
// 判断元素是否存在于数组中
util.oneOf = function (ele, targetArr) {
util.oneOf = function(ele, targetArr) {
if (targetArr.indexOf(ele) >= 0) {
return true;
} else {
@@ -24,7 +19,7 @@ util.oneOf = function (ele, targetArr) {
};
// 打开新的页面
util.openNewPage = function (vm, name, argu, query) {
util.openNewPage = function(vm, name, argu, query) {
if (!vm.$store) {
return;
}
@@ -33,8 +28,9 @@ util.openNewPage = function (vm, name, argu, query) {
let i = 0;
let tagHasOpened = false;
while (i < openedPageLen) {
if (name == pageOpenedList[i].name) { // 页面已经打开
vm.$store.commit('pageOpenedList', {
if (name == pageOpenedList[i].name) {
// 页面已经打开
vm.$store.commit("pageOpenedList", {
index: i,
argu: argu,
query: query
@@ -45,7 +41,7 @@ util.openNewPage = function (vm, name, argu, query) {
i++;
}
if (!tagHasOpened) {
let tag = vm.$store.state.app.tagsList.filter((item) => {
let tag = vm.$store.state.app.tagsList.filter(item => {
if (item.children) {
return name == item.children[0].name;
} else {
@@ -61,17 +57,21 @@ util.openNewPage = function (vm, name, argu, query) {
if (query) {
tag.query = query;
}
vm.$store.commit('increateTag', tag);
vm.$store.commit("increateTag", tag);
}
}
};
util.toDefaultPage = function (routers, name, route, next) {
util.toDefaultPage = function(routers, name, route, next) {
let len = routers.length;
let i = 0;
let notHandle = true;
while (i < len) {
if (routers[i].name == name && routers[i].children && routers[i].redirect == undefined) {
if (
routers[i].name == name &&
routers[i].children &&
routers[i].redirect == undefined
) {
route.replace({
name: routers[i].children[0].name
});
@@ -86,21 +86,24 @@ util.toDefaultPage = function (routers, name, route, next) {
}
};
util.initRouter = function (vm) { // 初始化路由
util.initRouter = function(vm) {
// 初始化路由
const constRoutes = [];
const otherRoutes = [];
// 404路由需要和动态路由一起加载
const otherRouter = [{
path: '/*',
name: 'error-404',
meta: {
title: '404-页面不存在'
},
frontRoute: 'error-page/404'
}];
const otherRouter = [
{
path: "/*",
name: "error-404",
meta: {
title: "404-页面不存在"
},
frontRoute: "error-page/404"
}
];
// 判断用户是否登录
let userInfo = Cookies.get('userInfoManager')
let userInfo = Cookies.get("userInfoManager");
if (!userInfo) {
// 未登录
return;
@@ -114,13 +117,13 @@ util.initRouter = function (vm) { // 初始化路由
// 格式化数据,设置 空children 为 null
for (let i = 0; i < menuData.length; i++) {
let t = menuData[i].children
let t = menuData[i].children;
for (let k = 0; k < t.length; k++) {
let tt = t[k].children;
for (let z = 0; z < tt.length; z++) {
tt[z].children = null
tt[z].children = null;
// 给所有三级路由添加字段显示一级菜单name方便点击页签时的选中筛选
tt[z].firstRouterName = menuData[i].name
tt[z].firstRouterName = menuData[i].name;
}
}
}
@@ -131,20 +134,23 @@ util.initRouter = function (vm) { // 初始化路由
util.initAllMenuData(constRoutes, menuData);
util.initRouterNode(otherRoutes, otherRouter);
// 添加所有主界面路由
vm.$store.commit('updateAppRouter', constRoutes.filter(item => item.children.length > 0));
vm.$store.commit(
"updateAppRouter",
constRoutes.filter(item => item.children.length > 0)
);
// 添加全局路由
vm.$store.commit('updateDefaultRouter', otherRoutes);
vm.$store.commit("updateDefaultRouter", otherRoutes);
// 添加菜单路由
util.initMenuData(vm, menuData);
// 缓存数据 修改加载标识
window.localStorage.setItem('menuData', JSON.stringify(menuData));
vm.$store.commit('setAdded', true);
window.localStorage.setItem("menuData", JSON.stringify(menuData));
vm.$store.commit("setAdded", true);
});
} else {
// 读取缓存数据
let data = window.localStorage.getItem('menuData');
let data = window.localStorage.getItem("menuData");
if (!data) {
vm.$store.commit('setAdded', false);
vm.$store.commit("setAdded", false);
return;
}
let menuData = JSON.parse(data);
@@ -154,21 +160,20 @@ util.initRouter = function (vm) { // 初始化路由
};
// 添加所有顶部导航栏下的菜单路由
util.initAllMenuData = function (constRoutes, data) {
util.initAllMenuData = function(constRoutes, data) {
let allMenuData = [];
data.forEach(e => {
if (e.level == 0) {
e.children.forEach(item => {
allMenuData.push(item);
})
});
}
})
});
util.initRouterNode(constRoutes, allMenuData);
}
};
// 生成菜单格式数据
util.initMenuData = function (vm, data) {
util.initMenuData = function(vm, data) {
const menuRoutes = [];
let menuData = data;
// 顶部菜单
@@ -177,29 +182,29 @@ util.initMenuData = function (vm, data) {
let nav = {
name: e.name,
title: e.title
}
};
navList.push(nav);
})
});
if (navList.length < 1) {
return;
}
// 存入vuex
vm.$store.commit('setNavList', navList);
let currNav = window.localStorage.getItem('currNav')
vm.$store.commit("setNavList", navList);
let currNav = window.localStorage.getItem("currNav");
if (currNav) {
// 读取缓存title
for (var item of navList) {
if (item.name == currNav) {
vm.$store.commit('setCurrNavTitle', item.title);
vm.$store.commit("setCurrNavTitle", item.title);
break;
}
}
} else {
// 默认第一个
currNav = navList[0].name;
vm.$store.commit('setCurrNavTitle', navList[0].title);
vm.$store.commit("setCurrNavTitle", navList[0].title);
}
vm.$store.commit('setCurrNav', currNav);
vm.$store.commit("setCurrNav", currNav);
for (let item of menuData) {
if (item.name == currNav) {
// 过滤
@@ -209,21 +214,25 @@ util.initMenuData = function (vm, data) {
}
util.initRouterNode(menuRoutes, menuData);
// 刷新界面菜单
vm.$store.commit('updateMenulist', menuRoutes.filter(item => item.children.length > 0));
vm.$store.commit(
"updateMenulist",
menuRoutes.filter(item => item.children.length > 0)
);
let tagsList = [];
vm.$store.state.app.routers.map((item) => {
vm.$store.state.app.routers.map(item => {
if (item.children.length <= 1) {
tagsList.push(item.children[0]);
} else {
tagsList.push(...item.children);
}
});
vm.$store.commit('setTagsList', tagsList);
vm.$store.commit("setTagsList", tagsList);
};
// 生成路由节点
util.initRouterNode = function (routers, data) { // data为所有子菜单数据
util.initRouterNode = function(routers, data) {
// data为所有子菜单数据
for (let item of data) {
let menu = Object.assign({}, item);
@@ -237,8 +246,8 @@ util.initRouterNode = function (routers, data) { // data为所有子菜单数据
let meta = {};
// 给页面添加标题、父级菜单name方便左侧菜单选中
meta.title = menu.title ? menu.title + " - lilishop 运营后台" : null;
meta.firstRouterName = item.firstRouterName
meta.title = menu.title ? menu.title + " - 运营后台" : null;
meta.firstRouterName = item.firstRouterName;
menu.meta = meta;
routers.push(menu);

View File

@@ -1,5 +1,7 @@
import config from '@/config/index'
export default {
lili: 'lili',
lili: config.title,
usernameLogin: 'UsernameLogin',
mobileLogin: 'MobileLogin',
autoLogin: 'Auto Login',

View File

@@ -1,5 +1,6 @@
import config from '@/config/index'
export default {
lili: 'lili',
lili: config.title,
usernameLogin: '账户密码登录',
mobileLogin: '手机号登录',
autoLogin: '自动登录',

View File

@@ -11,7 +11,7 @@ import App from './App'
import { router } from './router/index'
import store from './store'
import i18n from '@/locale'
import vueQr from 'vue-qr'
import { getRequest, postRequest, putRequest, deleteRequest, importRequest, uploadFileRequest } from '@/libs/axios'
import { setStore, getStore, removeStore } from '@/libs/storage'
import util from '@/libs/util'
@@ -21,13 +21,13 @@ import liliDialog from '@/views/lili-dialog'
import {md5} from '@/utils/md5.js';
Vue.config.devtools = true;
Vue.config.productionTip = false
const buyerUrlPC = 'https://pc-b2b2c.pickmall.cn' // 跳转买家端地址 pc端
const buyerUrlWap = 'https://m-b2b2c.pickmall.cn' // 跳转买家端地址 wap端
const PC_URL = BASE.PC_URL; // 跳转买家端地址 pc端
const WAP_URL = BASE.WAP_URL; // 跳转买家端地址 wap端
Vue.prototype.linkTo = function (goodsId, skuId) { // 跳转买家端商品
window.open(`${buyerUrlPC}/goodsDetail?skuId=${skuId}&goodsId=${goodsId}`, '_blank')
window.open(`${PC_URL}/goodsDetail?skuId=${skuId}&goodsId=${goodsId}`, '_blank')
};
Vue.prototype.wapLinkTo = function (goodsId, skuId) { // app端二维码
return `${buyerUrlWap}/pages/product/goods?id=${skuId}&goodsId=${goodsId}`
return `${WAP_URL}/pages/product/goods?id=${skuId}&goodsId=${goodsId}`
};
Vue.use(ViewUI, {
@@ -35,7 +35,7 @@ Vue.use(ViewUI, {
});
Vue.component('liliDialog',liliDialog)
Vue.component(vueQr)

View File

@@ -1,11 +1,11 @@
import Main from "@/views/Main.vue";
import config from '@/config/index'
// 不作为Main组件的子页面展示的页面单独写如下
export const loginRouter = {
path: "/login",
name: "login",
meta: {
title: "登录 - lili运营后台"
title: `登录 - ${config.title}运营后台`
},
component: () => import("@/views/login.vue")
};

View File

@@ -1,4 +1,3 @@
$theme_color: #804ed1;
//自动移滚动条样式
@@ -89,113 +88,15 @@ ul,li{
text-overflow:ellipsis;
white-space: nowrap;
}
/*
* @Author: LMR
* @Date: 2020-08-14 11:04:12
* @Last Modified by: LMR
* @Last Modified time: 2020-08-18 14:21:41
*/
// 主题颜色
// 明亮主题颜色
$primary_color: #2d8cf0;
$primary_light_color: #0f1011;
$primary_dark_color: #2b85e4;
$success_color: #19be6b;
$warning_color: #ff9900;
$error_color: #ed3f14;
$handle-btn-color: #438cde;
$theme_color: #ed3f14;
.theme_color{
color: #ed3f14 !important;
$success_color: #68cabe;
$warning_color: #fa6419;
$error_color: #ff3c2a;
$theme_color: #FF5C58;
.theme_color {
color: $theme_color !important;
}
$border_color: #dddee1;
$title_color: #8c8c8c;
$light_title_color: #1c2438;
$light_content_color: #495060;
$light_sub_color: #80848f;
$light_background_color: #f8f8f9;
$light_white_background_color: #fff;
// 暗黑主题颜色
$dark_background_color: #141414;
$dark_sub_background_color: #1d1d1d; //稍微浅一点的
$dark_content_color: #d5d5d5;
$bg_color: #f1f6fa;
/***** 封装一些方法可用于 黑暗主题 ,明亮主题 *****/
// 背景颜色
@mixin background_color($color) {
/*通过该函数设置字体颜色,后期方便统一管理;*/
background-color: $color;
transition: 0.35s;
[data-theme="dark"] & {
background-color: $dark_background_color;
}
[data-theme="light"] & {
background-color: $light_background_color;
}
}
// 辅助背景颜色
@mixin sub_background_color($color) {
/*通过该函数设置字体颜色,后期方便统一管理;*/
background-color: $color;
transition: 0.35s;
[data-theme="dark"] & {
background-color: $dark_sub_background_color;
}
[data-theme="light"] & {
background-color: $light_background_color;
}
}
@mixin white_background_color() {
/*通过该函数设置字体颜色,后期方便统一管理;*/
background-color: $light_white_background_color;
transition: 0.35s;
[data-theme="dark"] & {
background-color: $dark_sub_background_color;
}
[data-theme="light"] & {
background-color: $light_white_background_color;
}
}
// 正文颜色
@mixin content_color($color) {
/*通过该函数设置字体颜色,后期方便统一管理;*/
color: $color;
[data-theme="dark"] & {
color: $dark_content_color;
}
[data-theme="light"] & {
color: $light_content_color;
}
}
// 辅助颜色
@mixin sub_color($color) {
/*通过该函数设置字体颜色,后期方便统一管理;*/
color: $color;
[data-theme="dark"] & {
color: $dark_content_color;
}
[data-theme="light"] & {
color: $light_sub_color;
}
}
// 标题颜色
@mixin title_color($color) {
/*通过该函数设置字体颜色,后期方便统一管理;*/
color: $color;
[data-theme="dark"] & {
color: $dark_content_color;
}
[data-theme="light"] & {
color: $light_title_color;
}
}
@import "./table-common.scss";

View File

@@ -1,13 +1,16 @@
@import "~view-design/src/styles/index.less";
// iview 自定义样式
@primary-color: #ed3f14;
@primary-color: #ff5c58;
@info-color: #fa6419;
@success-color: #68cabe;
@error-color: #ff3c2a;
@table-thead-bg: #f8f8f9;
@table-td-stripe-bg: #f8f8f9;
@table-td-hover-bg: #ededed;
@table-td-highlight-bg: #ededed;
@font-size-base: 12px;
.ivu-drawer,
.drawer,
.ivu-drawer-wrap {

View File

@@ -74,7 +74,7 @@ export default {
render: (h, params) => {
return h("img", {
attrs: {
src: params.row.thumbnail,
src: params.row.thumbnail || '',
alt: "加载图片失败",
},
style: {

View File

@@ -85,7 +85,7 @@ export default {
render: (h, params) => {
return h("img", {
attrs: {
src: params.row.logo,
src: params.row.logo || '',
alt: "加载图片失败",
},
style: {

View File

@@ -90,8 +90,7 @@ h4 {
color: #ffaa71;
}
}
.count-list {
}
.flow-list {
height: 330px;

View File

@@ -615,7 +615,7 @@ export const modelData = [{
icon: 'md-image',
options: {
list: [{
name: 'LILI生鲜',
name: '生鲜',
describe: "年货带回家 满199减60",
img: require('@/assets/nav/decorate8.png'),
url: '',
@@ -624,8 +624,8 @@ export const modelData = [{
size: '170*170'
},
{
name: 'LILI众筹',
describe: "备孕有孕检测仪",
name: '众筹',
describe: "年货带回家",
img: require('@/assets/nav/decorate9.png'),
url: '',
fromColor: "#325bb4",
@@ -633,7 +633,7 @@ export const modelData = [{
size: '170*170'
},
{
name: 'LILI生鲜',
name: '生鲜',
describe: "年货带回家 满199减60",
img: require('@/assets/nav/decorate8.png'),
url: '',
@@ -642,7 +642,7 @@ export const modelData = [{
size: '170*170'
},
{
name: 'LILI众筹',
name: '众筹',
describe: "备孕有孕检测仪",
img: require('@/assets/nav/decorate9.png'),
url: '',
@@ -651,7 +651,7 @@ export const modelData = [{
size: '170*170'
},
{
name: 'LILI生鲜',
name: '生鲜',
describe: "年货带回家 满199减60",
img: require('@/assets/nav/decorate8.png'),
url: '',
@@ -660,7 +660,7 @@ export const modelData = [{
size: '170*170'
},
{
name: 'LILI众筹',
name: '众筹',
describe: "备孕有孕检测仪",
img: require('@/assets/nav/decorate9.png'),
url: '',

View File

@@ -22,7 +22,7 @@
<div class="person-msg">
<img :src="userInfo.face" v-if="userInfo.face" alt />
<Avatar icon="ios-person" class="mb_10" v-else size="80" />
<div>Hi{{ userInfo.nickName || "欢迎来到LiLi Shop" | secrecyMobile }}</div>
<div>Hi{{ userInfo.nickName || "欢迎来到管理后台" | secrecyMobile }}</div>
<div v-if="userInfo.id">
<Button type="error" shape="circle">会员中心</Button>
</div>
@@ -263,7 +263,7 @@ export default {
margin-left: 5px;
}
span:nth-child(1) {
@include content_color($theme_color);
color: $theme_color;
margin-left: 0;
}
span:nth-child(2) {

View File

@@ -43,7 +43,7 @@
<div class="person-msg">
<img :src="userInfo.face" v-if="userInfo.face" alt />
<Avatar icon="ios-person" class="mb_10" v-else size="80" />
<div>Hi{{ userInfo.nickName || "欢迎来到LiLi Shop" | secrecyMobile }}</div>
<div>Hi{{ userInfo.nickName || "欢迎来到管理后台" | secrecyMobile }}</div>
<div v-if="userInfo.id">
<Button type="error" shape="circle">会员中心</Button>
</div>
@@ -343,7 +343,7 @@ export default {
margin-left: 5px;
}
span:nth-child(1) {
@include content_color($theme_color);
color: $theme_color;
margin-left: 0;
}
span:nth-child(2) {

View File

@@ -141,15 +141,7 @@ export default {
align-items: center;
justify-content: center;
.ivu-tabs-nav-container {
line-height: 2;
font-size: 17px;
box-sizing: border-box;
white-space: nowrap;
overflow: hidden;
position: relative;
zoom: 1;
}
.verify-con {
position: absolute;
top: 150px;
@@ -159,37 +151,27 @@ export default {
.form {
padding-top: 1vh;
.input-verify {
width: 67%;
}
}
.forget-pass,
.other-way {
font-size: 14px;
}
.login-btn,
.other-login {
margin-top: 3vh;
}
.icons {
display: flex;
align-items: center;
}
.other-icon {
.login-btn {
background: linear-gradient(135deg, $theme_color 0%, $warning_color 100%);
height: 40px;
cursor: pointer;
margin-left: 10px;
border-radius: 4px;
display: flex;
align-items: center;
color: rgba(0, 0, 0, 0.2);
:hover {
color: #2d8cf0;
}
justify-content: center;
font-size: 16px;
color: #fff;
width: 100%;
text-align: center;
transition: 0.35s;
}
.login-btn:hover {
opacity: .9;
border-radius: 10px;
}
}
.flex {
justify-content: center;

View File

@@ -1,28 +1,26 @@
<template>
<div class="foot">
<Row type="flex" justify="space-around" class="help">
<a class="item" href="https://pickmall.com" target="_blank">{{ $t('help') }}</a>
<a class="item" href="https://pickmall.com" target="_blank">{{ $t('privacy') }}</a>
<a class="item" href="https://pickmall.com" target="_blank">{{ $t('terms') }}</a>
<a class="item" :href="config.website" target="_blank">帮助</a>
<a class="item" :href="config.website" target="_blank">隐私</a>
<a class="item" :href="config.website" target="_blank">条款</a>
</Row>
<Row type="flex" justify="center" class="copyright">
Copyright © {{year}} - Present
<a
href="https://pickmall.cn/"
target="_blank"
style="margin:0 5px;"
>lili-shop</a> {{ $t('rights') }}
<a :href="config.website" class="href" target="_blank" style="margin:0 5px;">{{config.title}}</a>
</Row>
</div>
</template>
<script>
import config from '@/config/index'
export default {
name: "footer",
data() {
return {
year: new Date().getFullYear()
}
config,
year: new Date().getFullYear(), // 年
};
},
};
</script>
@@ -46,4 +44,5 @@ export default {
}
}
}
</style>

View File

@@ -248,6 +248,6 @@ export default {
}
}
.ivu-tag-primary, .ivu-tag-primary.ivu-tag-dot .ivu-tag-dot-inner{
background: red;
background: $theme_color;
}
</style>

View File

@@ -31,9 +31,11 @@
<script>
import AMapLoader from "@amap/amap-jsapi-loader";
import { getRegion } from "@/api/common.js";
import config from '@/config'
export default {
data() {
return {
config,
showMap: false, // modal显隐
mapSearch: "", // 地图搜索
map: null, // 初始化地图
@@ -71,7 +73,7 @@ export default {
// 初始化地图组件
init() {
AMapLoader.load({
key: "b440952723253aa9fe483e698057bf7d", // 申请好的Web端开发者Key首次调用 load 时必填
key: this.config.aMapKey, // 申请好的Web端开发者Key首次调用 load 时必填
version: "", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
plugins: [
"AMap.ToolBar",

View File

@@ -20,7 +20,7 @@
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form>
<Row class="operation padding-row">
<Button @click="delAll">批量删除</Button>
</Row>
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-selection-change="changeSelect">
</Table>

View File

@@ -576,7 +576,7 @@ export default {
},
// 点击定位获取店铺地址
getAddress(item) {
this.shopForm.storeCenter = item.position.lat + "," + item.position.lng;
this.shopForm.storeCenter = item.position.lng + ',' + item.position.lat;
this.$set(this.shopForm, "storeAddressPath", item.addr);
this.$set(this.shopForm, "storeAddressIdPath", item.addrId);
},

View File

@@ -47,7 +47,7 @@
<div>
<Upload
style="display:inline-block;"
:action="baseUrl + '/common/upload/file'"
:action="commonUrl + '/common/upload/file'"
:headers="accessToken"
:on-success="handleSuccess"
:on-error="handleError"
@@ -257,6 +257,7 @@ import {
import DPlayer from "dplayer";
import config from "@/config";
import { commonUrl } from "@/libs/axios";
var dp;
export default {
name: "oss-manage",
@@ -268,8 +269,8 @@ export default {
},
data() {
return {
commonUrl, // 上传文件路径
config, // api地址
baseUrl: "", // 基础路径
selectImage: false, //是否是选择
accessToken: {}, // 上传token鉴权
loading: false, // 表单加载状态
@@ -342,7 +343,7 @@ export default {
if (params.row.fileType.includes("image") > 0) {
return h("img", {
attrs: {
src: params.row.url,
src: params.row.url || '',
alt: "加载图片失败",
},
style: {
@@ -813,10 +814,6 @@ export default {
if(!this.isComponent) { // 是组件的话,初始化不调用接口
this.init();
}
this.baseUrl =
process.env.NODE_ENV === "development"
? this.config.api_dev.common
: this.config.api_prod.common;
},
};