修改部分冗余代码,新增商家端npmrc配置 后续还会新增yarnrc

master
lemon橪 2021-11-22 11:16:32 +08:00
parent 515cd3ebbd
commit 6ecb6b8055
15 changed files with 18 additions and 206 deletions

View File

@ -16,10 +16,6 @@ module.exports = {
* @description icp备案号 * @description icp备案号
*/ */
icpMessage: "京ICP备20009696号-1", icpMessage: "京ICP备20009696号-1",
/**
* @description token在Cookie中存储的天数默认1天
*/
cookieExpires: 1,
/** /**
* @description 是否使用国际化默认为false * @description 是否使用国际化默认为false
* 如果不使用则需要在路由中给需要在菜单中展示的路由设置meta: {title: 'xxx'} * 如果不使用则需要在路由中给需要在菜单中展示的路由设置meta: {title: 'xxx'}

View File

@ -3,19 +3,6 @@ export default {
* @description 配置显示在浏览器标签的title * @description 配置显示在浏览器标签的title
*/ */
title: "lilishop", title: "lilishop",
/**
* @description token在Cookie中存储的天数默认1天
*/
cookieExpires: 1,
/**
* @description 是否使用国际化默认为false
* 如果不使用则需要在路由中给需要在菜单中展示的路由设置meta: {title: 'xxx'}
* 用来在菜单中显示文字
*/
useI18n: true,
/**
* @description api请求基础路径
*/
/** /**
* @description 高德web端申请的api key * @description 高德web端申请的api key
*/ */
@ -24,13 +11,4 @@ export default {
* @description 官网地址 * @description 官网地址
*/ */
website: "https://www.pickmall.cn", website: "https://www.pickmall.cn",
/**
* @description 需要加载的插件
*/
plugin: {
"error-store": {
showInHeader: true, // 设为false后不会在顶部显示错误日志徽标
developmentOff: true // 设为true后在开发环境不会收集错误信息方便开发中排查错误
}
}
}; };

View File

@ -1,100 +0,0 @@
var idTmr;
function getExplorer () {
var explorer = window.navigator.userAgent;
if (explorer.indexOf('MSIE') >= 0) {
// ie
return 'ie';
} else if (explorer.indexOf('Firefox') >= 0) {
// firefox
return 'Firefox';
} else if (explorer.indexOf('Chrome') >= 0) {
// Chrome
return 'Chrome';
} else if (explorer.indexOf('Opera') >= 0) {
// Opera
return 'Opera';
} else if (explorer.indexOf('Safari') >= 0) {
// Safari
return 'Safari';
};
};
function tranform (table, aId, name) {
let tableHead = table.$children[0].$el;
let tableBody = table.$children[1].$el;
let tableInnerHTML = '<thead><tr>';
if (table.$children.length !== 1) {
let len = tableBody.rows.length;
let i = -1;
while (i < len) {
if (i == -1) {
Array.from(tableHead.rows[0].children).forEach((td) => {
tableInnerHTML = tableInnerHTML + '<th>' + td.children[0].children[0].innerHTML + '</th>';
});
tableInnerHTML += '</tr><thead><tbody>';
} else {
tableInnerHTML += '<tr>';
Array.from(tableBody.rows[i].children).forEach((td) => {
tableInnerHTML = tableInnerHTML + '<td>' + td.children[0].children[0].innerHTML + '</td>';
});
tableInnerHTML += '</tr>';
}
i++;
}
tableInnerHTML += '</tbody>';
}
if (getExplorer() !== 'Safari' && name.substr(-1, 4) !== '.xls') {
name += '.xls';
}
if (getExplorer() == 'ie') {
var curTbl = table;
var oXL = new ActiveXObject('Excel.Application');
var oWB = oXL.Workbooks.Add();
var xlsheet = oWB.Worksheets(1);
var sel = document.body.createTextRange();
sel.moveToElementText(curTbl);
sel.select();
sel.execCommand('Copy');
xlsheet.Paste();
oXL.Visible = true;
try {
var fname = oXL.Application.GetSaveAsFilename('Excel.xls', 'Excel Spreadsheets (*.xls), *.xls');
} catch (e) {
print('Nested catch caught ' + e);
} finally {
oWB.SaveAs(fname);
// oWB.Close(savechanges = false);
oXL.Quit();
oXL = null;
idTmr = setInterval(Cleanup(), 1);
}
} else {
tableToExcel(tableInnerHTML, aId, name);
}
}
function Cleanup () {
window.clearInterval(idTmr);
// CollectGarbage();
}
let tableToExcel = (function () {
let uri = 'data:application/vnd.ms-excel;base64,';
let template = '<html><head><meta charset="UTF-8"></head><body><table>{table}</table></body></html>';
let base64 = function (s) { return window.btoa(unescape(encodeURIComponent(s))); };
let format = function (s, c) {
return s.replace(/{(\w+)}/g, function (m, p) { return c[p]; });
};
return function (table, aId, name) {
let ctx = {worksheet: name || 'Worksheet', table: table};
document.getElementById(aId).href = uri + base64(format(template, ctx));
document.getElementById(aId).download = name;
document.getElementById(aId).click();
};
})();
const table2excel = {};
table2excel.transform = tranform;
export default table2excel;

View File

@ -1,20 +0,0 @@
{
"name": "zh",
"options": {
"months": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
"shortMonths": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
"days": ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
"shortDays": ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
"toolbar": {
"exportToSVG": "下载图表 SVG",
"exportToPNG": "下载图表 PNG",
"menu": "菜单",
"selection": "选择",
"selectionZoom": "区域缩放",
"zoomIn": "缩小",
"zoomOut": "放大",
"pan": "移动",
"reset": "重置缩放"
}
}
}

View File

@ -3,10 +3,7 @@
margin-bottom: 2vh; margin-bottom: 2vh;
} }
.select-count {
font-weight: 600;
color: #40a9ff;
}
.select-clear { .select-clear {
margin-left: 10px; margin-left: 10px;

View File

@ -3,10 +3,6 @@
margin-bottom: 2vh; margin-bottom: 2vh;
} }
.select-title {
font-weight: 600;
color: #40a9ff;
}
.select-clear { .select-clear {
margin-left: 10px; margin-left: 10px;

View File

@ -657,10 +657,6 @@ export default {
margin-bottom: 2vh; margin-bottom: 2vh;
} }
.select-count {
font-weight: 600;
color: #40a9ff;
}
.select-clear { .select-clear {
margin-left: 10px; margin-left: 10px;

View File

@ -103,7 +103,7 @@
<Row > <Row >
<Alert show-icon> <Alert show-icon>
已选择 已选择
<span class="select-count">{{ selectCount }}</span> <span >{{ selectCount }}</span>
<a class="select-clear" @click="clearSelectAll"></a> <a class="select-clear" @click="clearSelectAll"></a>
<span v-if="selectCount > 0" style="margin-left: 15px" <span v-if="selectCount > 0" style="margin-left: 15px"
>共计 {{ totalSize }} 存储量</span >共计 {{ totalSize }} 存储量</span

5
seller/.npmrc Normal file
View File

@ -0,0 +1,5 @@
# 默认依赖包指定淘宝源
registry=https://registry.npm.taobao.org/
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
phantomjs_cdnurl=https://npm.taobao.org/mirrors/phantomjs/
electron_mirror=https://npm.taobao.org/mirrors/electron/

0
seller/.yarnrc Normal file
View File

View File

@ -3,16 +3,7 @@ export default {
* @description 配置显示在浏览器标签的title * @description 配置显示在浏览器标签的title
*/ */
title: "lilishop", title: "lilishop",
/**
* @description token在Cookie中存储的天数默认1天
*/
cookieExpires: 1,
/**
* @description 是否使用国际化默认为false
* 如果不使用则需要在路由中给需要在菜单中展示的路由设置meta: {title: 'xxx'}
* 用来在菜单中显示文字
*/
useI18n: true,
/** /**
* @description 高德web端申请的api key * @description 高德web端申请的api key
*/ */
@ -21,13 +12,5 @@ export default {
* @description 官网地址 * @description 官网地址
*/ */
website: "https://www.pickmall.cn", website: "https://www.pickmall.cn",
/**
* @description 需要加载的插件
*/
plugin: {
"error-store": {
showInHeader: true, // 设为false后不会在顶部显示错误日志徽标
developmentOff: true // 设为true后在开发环境不会收集错误信息方便开发中排查错误
}
}
}; };

View File

@ -1,3 +0,0 @@
import Vue from "vue";
export default new Vue;

View File

@ -1,3 +1,7 @@
/**
* 商家端左侧菜单栏静态数据
*/
export const result = [{ export const result = [{
name: "lili", name: "lili",
level: 0, level: 0,

View File

@ -1,20 +0,0 @@
{
"name": "zh",
"options": {
"months": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
"shortMonths": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
"days": ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
"shortDays": ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
"toolbar": {
"exportToSVG": "下载图表 SVG",
"exportToPNG": "下载图表 PNG",
"menu": "菜单",
"selection": "选择",
"selectionZoom": "区域缩放",
"zoomIn": "缩小",
"zoomOut": "放大",
"pan": "移动",
"reset": "重置缩放"
}
}
}

View File

@ -11,7 +11,7 @@
</Row> </Row>
<Row v-show="openTip" v-if="status == 'manager'"> <Row v-show="openTip" v-if="status == 'manager'">
<Alert show-icon> <Alert show-icon>
已选择 <span class="select-count">{{ selectCount }}</span> 已选择 <span >{{ selectCount }}</span>
<a class="select-clear" @click="clearSelectAll"></a> <a class="select-clear" @click="clearSelectAll"></a>
</Alert> </Alert>
</Row> </Row>