1、提货点
2、客服(腾讯云智服)
3、接口权限控制
4、复制第三方商品可配置
4、优化附件上传配置
5、手机端核销订单
6、手机端订单统计、订单管理
7、短信优化
8、订阅消息全自动化
This commit is contained in:
张乐
2020-09-15 16:13:25 +08:00
parent 184852afe4
commit 93a781c5ae
245 changed files with 26031 additions and 994 deletions

View File

@@ -1,3 +1,4 @@
import Cookies from 'js-cookie'
/**
* Created by PanJiaChen on 16/11/18.
*/
@@ -31,7 +32,7 @@ function padLeftZero (str) {
}
/**
* Parse the time to string
* 更改时间格式成2010-01-10格式
* @param {(Object|string|number)} time
* @param {string} cFormat
* @returns {string | null}
@@ -47,15 +48,11 @@ export function parseTime(time, cFormat) {
} else {
if ((typeof time === 'string')) {
if ((/^[0-9]+$/.test(time))) {
// support "1548221490638"
time = parseInt(time)
} else {
// support safari
// https://stackoverflow.com/questions/4310953/invalid-date-in-safari
time = time.replace(new RegExp(/-/gm), '/')
}
}
if ((typeof time === 'number') && (time.toString().length === 10)) {
time = time * 1000
}
@@ -381,3 +378,45 @@ export function removeClass(ele, cls) {
ele.className = ele.className.replace(reg, ' ')
}
}
/**
* 判断地址
*/
export function parseQuery() {
const res = {};
const query = (location.href.split("?")[1] || "")
.trim()
.replace(/^(\?|#|&)/, "");
if (!query) {
return res;
}
query.split("&").forEach(param => {
const parts = param.replace(/\+/g, " ").split("=");
const key = decodeURIComponent(parts.shift());
const val = parts.length > 0 ? decodeURIComponent(parts.join("=")) : null;
if (res[key] === undefined) {
res[key] = val;
} else if (Array.isArray(res[key])) {
res[key].push(val);
} else {
res[key] = [res[key], val];
}
});
return res;
}
/**
* 是否是核销员
*/
export function isWriteOff() {
if(localStorage.getItem('storeStaffList')){
let JavaInfo = JSON.parse(Cookies.get('JavaInfo'))
let staff = JSON.parse(localStorage.getItem('storeStaffList'))
return staff.some(item => item.avatar === JavaInfo.account)
}
}