canyin-project/ybcy/views/cashier/static/js/app.e284ec24.js
2024-11-01 16:07:54 +08:00

726 lines
34 KiB
JavaScript

(function (e) {
function t(t) {
for (var r, a, c = t[0], i = t[1], u = t[2], l = 0, d = []; l < c.length; l++) a = c[l], Object.prototype.hasOwnProperty.call(o, a) && o[a] && d.push(o[a][0]), o[a] = 0;
for (r in i) Object.prototype.hasOwnProperty.call(i, r) && (e[r] = i[r]);
f && f(t);
while (d.length) d.shift()();
return s.push.apply(s, u || []), n()
}
function n() {
for (var e, t = 0; t < s.length; t++) {
for (var n = s[t], r = !0, a = 1; a < n.length; a++) {
var c = n[a];
0 !== o[c] && (r = !1)
}
r && (s.splice(t--, 1), e = i(i.s = n[0]))
}
return e
}
var r = {}, a = {app: 0}, o = {app: 0}, s = [];
function c(e) {
return i.p + "static/js/" + ({}[e] || e) + "." + {
"chunk-3244ac0f": "1b6d660e",
"chunk-3714c0d8": "bd08a9ee",
"chunk-43fdc20a": "d53f35de",
"chunk-2ea19d1e": "8a59daf6",
"chunk-fa969d0c": "0c64f9d3",
"chunk-280c16e0": "f3493ca8",
"chunk-5b6808f8": "a03f58c0",
"chunk-4b4ed4c0": "ea941e75",
"chunk-76b2d41b": "944d90cf",
"chunk-d6365a9c": "202928a4"
}[e] + ".js"
}
function i(t) {
if (r[t]) return r[t].exports;
var n = r[t] = {i: t, l: !1, exports: {}};
return e[t].call(n.exports, n, n.exports, i), n.l = !0, n.exports
}
i.e = function (e) {
var t = [], n = {
"chunk-3244ac0f": 1,
"chunk-3714c0d8": 1,
"chunk-2ea19d1e": 1,
"chunk-fa969d0c": 1,
"chunk-280c16e0": 1,
"chunk-5b6808f8": 1,
"chunk-4b4ed4c0": 1,
"chunk-76b2d41b": 1,
"chunk-d6365a9c": 1
};
a[e] ? t.push(a[e]) : 0 !== a[e] && n[e] && t.push(a[e] = new Promise((function (t, n) {
for (var r = "static/css/" + ({}[e] || e) + "." + {
"chunk-3244ac0f": "6f30cf3c",
"chunk-3714c0d8": "a6c07dd8",
"chunk-43fdc20a": "31d6cfe0",
"chunk-2ea19d1e": "75066c8e",
"chunk-fa969d0c": "65ba7cd9",
"chunk-280c16e0": "676a78be",
"chunk-5b6808f8": "20f7e9e1",
"chunk-4b4ed4c0": "6f3c88ba",
"chunk-76b2d41b": "1e61c641",
"chunk-d6365a9c": "4c58f3db"
}[e] + ".css", o = i.p + r, s = document.getElementsByTagName("link"), c = 0; c < s.length; c++) {
var u = s[c], l = u.getAttribute("data-href") || u.getAttribute("href");
if ("stylesheet" === u.rel && (l === r || l === o)) return t()
}
var d = document.getElementsByTagName("style");
for (c = 0; c < d.length; c++) {
u = d[c], l = u.getAttribute("data-href");
if (l === r || l === o) return t()
}
var f = document.createElement("link");
f.rel = "stylesheet", f.type = "text/css", f.onload = t, f.onerror = function (t) {
var r = t && t.target && t.target.src || o,
s = new Error("Loading CSS chunk " + e + " failed.\n(" + r + ")");
s.code = "CSS_CHUNK_LOAD_FAILED", s.request = r, delete a[e], f.parentNode.removeChild(f), n(s)
}, f.href = o;
var h = document.getElementsByTagName("head")[0];
h.appendChild(f)
})).then((function () {
a[e] = 0
})));
var r = o[e];
if (0 !== r) if (r) t.push(r[2]); else {
var s = new Promise((function (t, n) {
r = o[e] = [t, n]
}));
t.push(r[2] = s);
var u, l = document.createElement("script");
l.charset = "utf-8", l.timeout = 120, i.nc && l.setAttribute("nonce", i.nc), l.src = c(e);
var d = new Error;
u = function (t) {
l.onerror = l.onload = null, clearTimeout(f);
var n = o[e];
if (0 !== n) {
if (n) {
var r = t && ("load" === t.type ? "missing" : t.type), a = t && t.target && t.target.src;
d.message = "Loading chunk " + e + " failed.\n(" + r + ": " + a + ")", d.name = "ChunkLoadError", d.type = r, d.request = a, n[1](d)
}
o[e] = void 0
}
};
var f = setTimeout((function () {
u({type: "timeout", target: l})
}), 12e4);
l.onerror = l.onload = u, document.head.appendChild(l)
}
return Promise.all(t)
}, i.m = e, i.c = r, i.d = function (e, t, n) {
i.o(e, t) || Object.defineProperty(e, t, {enumerable: !0, get: n})
}, i.r = function (e) {
"undefined" !== typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(e, "__esModule", {value: !0})
}, i.t = function (e, t) {
if (1 & t && (e = i(e)), 8 & t) return e;
if (4 & t && "object" === typeof e && e && e.__esModule) return e;
var n = Object.create(null);
if (i.r(n), Object.defineProperty(n, "default", {
enumerable: !0,
value: e
}), 2 & t && "string" != typeof e) for (var r in e) i.d(n, r, function (t) {
return e[t]
}.bind(null, r));
return n
}, i.n = function (e) {
var t = e && e.__esModule ? function () {
return e["default"]
} : function () {
return e
};
return i.d(t, "a", t), t
}, i.o = function (e, t) {
return Object.prototype.hasOwnProperty.call(e, t)
}, i.p = "", i.oe = function (e) {
throw console.error(e), e
};
var u = window["webpackJsonp"] = window["webpackJsonp"] || [], l = u.push.bind(u);
u.push = t, u = u.slice();
for (var d = 0; d < u.length; d++) t(u[d]);
var f = l;
s.push([0, "chunk-vendors"]), n()
})({
0: function (e, t, n) {
e.exports = n("56d7")
}, "1f0b": function (e, t, n) {
}, "294d": function (e, t, n) {
"use strict";
n.d(t, "h", (function () {
return a
})), n.d(t, "i", (function () {
return o
})), n.d(t, "j", (function () {
return s
})), n.d(t, "f", (function () {
return c
})), n.d(t, "d", (function () {
return i
})), n.d(t, "a", (function () {
return u
})), n.d(t, "c", (function () {
return l
})), n.d(t, "g", (function () {
return d
})), n.d(t, "b", (function () {
return f
})), n.d(t, "e", (function () {
return h
}));
var r = n("b775");
function a(e) {
return Object(r["a"])({url: "channel/login/loginin", method: "post", data: e})
}
function o(e) {
return Object(r["a"])({url: "channel/login/login-out", method: "post", data: e})
}
function s(e) {
return Object(r["a"])({url: "channel/login/user-save", method: "post", data: e})
}
function c(e) {
return Object(r["a"])({url: "channel/cashier/give-out", method: "post", data: e})
}
function i(e) {
return Object(r["a"])({url: "channel/cashier/get-cashier-info", method: "get", params: e})
}
function u(e) {
return Object(r["a"])({url: "channel/cashier/cashier-info", method: "get", params: e})
}
function l(e) {
return Object(r["a"])({url: "channel/cashier/check-plug", method: "get", params: e})
}
function d(e) {
return Object(r["a"])({url: "channel/cashier-order/handle-order", method: "post", data: e})
}
function f(e) {
return Object(r["a"])({url: "channel/cashier-order/change-money", method: "post", data: e})
}
function h(e) {
return Object(r["a"])({url: "channel/in-store/statistics", method: "get", params: e})
}
}, "3a10": function (e, t, n) {
}, 4360: function (e, t, n) {
"use strict";
n("a9e3");
var r = n("2b0e"), a = n("2f62"), o = n("6fa2");
r["default"].use(a["a"]), t["a"] = new a["a"].Store({
state: {
goodList: [],
cashierList: [],
carMoney: "",
carCount: "",
outTradeNo: "",
orderCount: "",
currCarIetm: {},
userData: sessionStorage.getItem("userData") ? JSON.parse(sessionStorage.getItem("userData")) : {},
cashierInfo: sessionStorage.getItem("cashierInfo") ? JSON.parse(sessionStorage.getItem("cashierInfo")) : {},
vipUserId: sessionStorage.getItem("vipUserId") ? sessionStorage.getItem("vipUserId") : "",
vipUserIcon: sessionStorage.getItem("vipUserIcon") ? sessionStorage.getItem("vipUserIcon") : "",
vipUserTel: sessionStorage.getItem("vipUserTel") ? sessionStorage.getItem("vipUserTel") : "",
tableInfo: sessionStorage.getItem("tableInfo") ? JSON.parse(sessionStorage.getItem("tableInfo")) : {},
tableOrderInfo: sessionStorage.getItem("tableOrderInfo") ? JSON.parse(sessionStorage.getItem("tableOrderInfo")) : {},
tableGoodList: [],
tableCurrCarIetm: {},
tableCarMoney: "",
tableCarMoney2: "",
tableOutTradeNo: "",
tableCarCount: "",
tableCarCount2: "",
selStatus: "",
localStatus: "",
discount: "",
instoreSet: {},
detail: {},
tableData: {},
boxMoney: "",
SateIsOut: sessionStorage.getItem("setIsOut") ? sessionStorage.getItem("setIsOut") : "1",
typeListHover: sessionStorage.getItem("setTypeListHover") ? Number(sessionStorage.getItem("setTypeListHover")) : 0,
jListHover: sessionStorage.getItem("setJListHover") ? Number(sessionStorage.getItem("setJListHover")) : 0,
kListHover: sessionStorage.getItem("setKListHover") ? Number(sessionStorage.getItem("setKListHover")) : -1,
typeListHoverItem: sessionStorage.getItem("setTypeListHoverItem") ? JSON.parse(sessionStorage.getItem("setTypeListHoverItem")) : {}
}, mutations: {
setGoodList: function (e, t) {
e.goodList = t.data, e.carMoney = t.money, e.carCount = t.count, e.outTradeNo = t.outTradeNo, e.orderCount = t.orderCount, e.boxMoney = t.instoreSet.boxMoney, e.detail = t.detail
}, setCurrCarIetm: function (e, t) {
e.currCarIetm = t
}, setVipUserId: function (e, t) {
e.vipUserId = t
}, setVipUserTel: function (e, t) {
e.vipUserTel = t
}, setVipUserIcon: function (e, t) {
e.vipUserIcon = t
}, setUserData: function (e, t) {
e.userData = t
}, setCashierInfo: function (e, t) {
e.cashierInfo = t
}, setTableGoodList: function (e, t) {
if (e.tableGoodList = t.data, e.tableCarMoney = t.money, e.tableCarCount = t.count, e.tableCarCount2 = t.carCount, e.tableCarMoney2 = t.carMoney, e.tableOutTradeNo = t.outTradeNo, e.discount = t.discount, e.selStatus = t.selStatus, e.orderId = t.orderId, e.cashierList = t.cashierData, e.instoreSet = t.instoreSet, e.detail = t.detail, e.tableData = t.tableData, e.carCount = t.carCount, e.carMoney = t.carMoney, t.data.length > 0) for (var n = 0; n < t.data.length; n++) t.data[n].createdAt && (e.tableGoodList[n].createdAt = Object(o["c"])(t.data[n].createdAt))
}, setTableCurrCarIetm: function (e, t) {
e.tableCurrCarIetm = t
}, setTableInfo: function (e, t) {
e.tableInfo = t
}, setTableOrderInfo: function (e, t) {
e.tableOrderInfo = t
}, setLocalStatus: function (e, t) {
e.localStatus = t
}, setIsOut: function (e, t) {
e.SateIsOut = t
}, setTypeListHover: function (e, t) {
e.typeListHover = t
}, setJListHover: function (e, t) {
e.jListHover = t
}, setKListHover: function (e, t) {
e.kListHover = t
}, setTypeListHoverItem: function (e, t) {
e.typeListHoverItem = t
}
}, actions: {}, modules: {}
})
}, "46ad": function (e, t, n) {
"use strict";
n("1f0b")
}, 5143: function (e, t, n) {
}, "56d7": function (e, t, n) {
"use strict";
n.r(t);
n("96cf");
var r = n("1da1"), a = (n("e623"), n("e379"), n("5dc8"), n("37e1"), n("2b0e")), o = function () {
var e = this, t = e.$createElement, n = e._self._c || t;
return n("div", {attrs: {id: "app"}}, [n("router-view")], 1)
}, s = [], c = {
name: "App", created: function () {
}, methods: {}
}, i = c, u = n("0c7c"), l = Object(u["a"])(i, o, s, !1, null, null, null), d = l.exports, f = n("a18c"),
h = n("4360"), p = n("5c96"), m = n.n(p), b = n("778c"), g = n("2ef0"), v = function (e) {
e.prototype.$baseMessage = function (e, t) {
Object(p["Message"])({
offset: 60,
showClose: !0,
message: e,
type: t,
dangerouslyUseHTMLString: !0,
duration: b["messageDuration"]
})
}, e.prototype.$baseConfirm = function (e, t, n, r) {
p["MessageBox"].confirm(e, t || "温馨提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
closeOnClickModal: !1,
type: "warning"
}).then((function () {
n && n()
})).catch((function () {
r && r()
}))
}, e.prototype.$baseConfirm2 = function (e, t, n, r, a, o) {
p["MessageBox"].confirm(e, t || "温馨提示", {
confirmButtonText: n || "确定",
cancelButtonText: r || "取消",
closeOnClickModal: !1,
type: "warning"
}).then((function () {
a && a()
})).catch((function () {
o && o()
}))
}, e.prototype.$baseLodash = g, e.prototype.$baseEventBus = new e
};
"undefined" !== typeof window && window.Vue && v(window.Vue);
var I = v, y = n("294d");
a["default"].config.productionTip = !1, a["default"].use(m.a), a["default"].use(I), f["a"].beforeEach(function () {
var e = Object(r["a"])(regeneratorRuntime.mark((function e(t, n, r) {
var o, s;
return regeneratorRuntime.wrap((function (e) {
while (1) switch (e.prev = e.next) {
case 0:
if ("/" === t.path) {
e.next = 13;
break
}
return e.next = 3, Object(y["c"])();
case 3:
if (o = e.sent, s = o.type, "1" != s) {
e.next = 9;
break
}
r(), e.next = 11;
break;
case 9:
return a["default"].prototype.$baseMessage("该平台未开通收银台", "error"), e.abrupt("return", r({path: "/"}));
case 11:
e.next = 14;
break;
case 13:
r();
case 14:
case"end":
return e.stop()
}
}), e)
})));
return function (t, n, r) {
return e.apply(this, arguments)
}
}()), new a["default"]({
router: f["a"], store: h["a"], render: function (e) {
return e(d)
}
}).$mount("#app")
}, "6ac3": function (e, t, n) {
"use strict";
n("d808")
}, "6fa2": function (e, t, n) {
"use strict";
n.d(t, "a", (function () {
return r
})), n.d(t, "b", (function () {
return a
})), n.d(t, "c", (function () {
return o
}));
n("a15b"), n("d3b7"), n("ac1f"), n("25f0"), n("1276");
function r(e) {
return "undefined" === typeof Array.isArray ? "[object Array]" === Object.prototype.toString.call(e) : Array.isArray(e)
}
function a(e) {
var t = /^[0-9]*$/;
return t.test(e)
}
var o = function (e) {
for (var t = (e + "").split(""), n = 0; n < 13; n++) t[n] || (t[n] = "0");
e = 1 * t.join("");
var r = 6e4, a = 60 * r, o = 24 * a, s = 30 * o, c = (new Date).getTime(), i = c - e;
if (i < 0) return "不久前";
var u = i / s, l = i / (7 * o), d = i / o, f = i / a, h = i / r, p = function (e) {
return e < 10 ? "0" + e : e
};
return l >= 1 ? function () {
var t = new Date(e), n = (new Date).getFullYear();
return l >= 1 && n == t.getFullYear() ? p(t.getMonth() + 1) + "月" + p(t.getDate()) + "日" : t.getFullYear() + "年" + p(t.getMonth() + 1) + "月" + p(t.getDate()) + "日"
}() : u >= 1 ? parseInt(u) + "月前" : l >= 1 ? parseInt(l) + "周前" : d >= 1 ? parseInt(d) + "天前" : f >= 1 ? parseInt(f) + "小时前" : h >= 1 ? parseInt(h) + "分钟前" : "刚刚"
}
}, "778c": function (e, t, n) {
n("ac1f"), n("466d"), e.exports = {
baseURL: location.href.match(/(\S*)views/)[1] + "index.php/",
title: "收银后台",
routerMode: "hash",
loadingText: "正在加载中...",
contentType: "application/json;charset=UTF-8",
messageDuration: 2e3,
requestTimeout: 6e4,
successCode: 1,
errorLog: ["development", "test", "production"],
loginInterception: !0,
httpRequestFile: !1,
debounce: ["doEdit", "del-tel"]
}
}, "81ce": function (e, t, n) {
e.exports = n.p + "static/img/sytLogo2.0e832a66.png"
}, 8610: function (e, t, n) {
}, a18c: function (e, t, n) {
"use strict";
n("d3b7");
var r = n("2b0e"), a = n("8c4f"), o = function () {
var e = this, t = e.$createElement, n = e._self._c || t;
return n("div", {attrs: {id: "app"}}, [n("router-view")], 1)
}, s = [], c = {
name: "loginMain", created: function () {
}, methods: {}
}, i = c, u = n("0c7c"), l = Object(u["a"])(i, o, s, !1, null, null, null), d = l.exports, f = function () {
var e = this, t = e.$createElement, n = e._self._c || t;
return n("div", {attrs: {id: "app"}}, [n("el-container", [n("el-header", [n("top")], 1), n("el-container", {staticClass: "container"}, [n("el-aside", {
directives: [{
name: "show",
rawName: "v-show",
value: "userInfo" != e.$route.name,
expression: "$route.name !='userInfo'"
}], staticClass: "main_left bor_rad20", attrs: {width: "90px"}
}, [n("SliderBar")], 1), n("el-main", [n("router-view")], 1)], 1)], 1)], 1)
}, h = [], p = (n("96cf"), n("1da1")), m = (n("0fae"), n("5143"), n("d6eb"), n("3a10"), n("e1c3")),
b = function () {
var e = this, t = e.$createElement, n = e._self._c || t;
return n("div", {staticClass: "heighthv flex-col flex-bet"}, [n("div", {staticClass: "wid"}, [n("el-menu", {
staticClass: "el-menu-vertical-demo",
attrs: {"default-active": e.$route.name, router: !0},
on: {open: e.handleOpen, close: e.handleClose}
}, [1 == e.cashierInfo.cashier ? n("el-menu-item", {
class: {"is-active": "cashier" == e.$route.name},
attrs: {index: "cashier"}
}, [n("div", {
staticClass: "menu_text_box",
class: {"is-active": "cashier" == e.$route.name}
}, [n("i", {staticClass: "el-icon-menu el_fontSize"}), n("div", {
staticClass: "menu_text",
attrs: {slot: "title"},
slot: "title"
}, [e._v("收银")])])]) : e._e(), 1 == e.cashierInfo.fastFood ? n("el-menu-item", {
class: {"is-active": "table" == e.$route.name},
attrs: {index: "table"}
}, [n("div", {
staticClass: "menu_text_box",
class: {"is-active": "table" == e.$route.name}
}, [n("i", {staticClass: "el-icon-setting el_fontSize"}), n("div", {
staticClass: "menu_text",
attrs: {slot: "title"},
slot: "title"
}, [e._v("桌台")])])]) : e._e(), n("el-menu-item", {
class: {"is-active": "order" == e.$route.name},
attrs: {index: "order"}
}, [n("div", {
staticClass: "menu_text_box",
class: {"is-active": "order" == e.$route.name}
}, [n("i", {staticClass: "el-icon-document el_fontSize"}), n("div", {
staticClass: "menu_text",
attrs: {slot: "title"},
slot: "title"
}, [e._v("订单")])])])], 1)], 1), n("div", {staticClass: "color_f pad_b_15"}, [e._v(e._s(e.dateFormat(e.date)))])])
}, g = [], v = (n("b0c0"), n("5530")), I = n("2f62"), y = {
computed: Object(v["a"])({}, Object(I["c"])(["cashierInfo"])), name: "sliderBar", data: function () {
return {now: this.$route.name, date: new Date}
}, mounted: function () {
var e = this;
this.timer = setInterval((function () {
e.date = new Date
}), 1e3)
}, beforeDestroy: function () {
this.timer && clearInterval(this.timer)
}, methods: {
handleOpen: function (e, t) {
console.log(e, t)
}, handleClose: function (e, t) {
console.log(e, t)
}, dateFormat: function (e) {
var t = new Date(e), n = t.getFullYear(),
r = t.getMonth() + 1 < 10 ? "0" + (t.getMonth() + 1) : t.getMonth() + 1,
a = t.getDate() < 10 ? "0" + t.getDate() : t.getDate(),
o = t.getHours() < 10 ? "0" + t.getHours() : t.getHours(),
s = t.getMinutes() < 10 ? "0" + t.getMinutes() : t.getMinutes(),
c = t.getSeconds() < 10 ? "0" + t.getSeconds() : t.getSeconds();
return n + "-" + r + "-" + a + " " + o + ":" + s + ":" + c
}
}
}, C = y, w = (n("6ac3"), Object(u["a"])(C, b, g, !1, null, "52ae019c", null)), k = w.exports, O = n("294d"),
S = {
name: "App", components: {top: m["a"], SliderBar: k}, created: function () {
this.cashierInfoFunction()
}, methods: {
cashierInfoFunction: function () {
return Object(p["a"])(regeneratorRuntime.mark((function e() {
var t, n, r;
return regeneratorRuntime.wrap((function (e) {
while (1) switch (e.prev = e.next) {
case 0:
return e.next = 2, Object(O["a"])();
case 2:
t = e.sent, n = t.code, r = t.data, "1" == n && (document.title = r.cashName ? r.cashName : "收银台");
case 6:
case"end":
return e.stop()
}
}), e)
})))()
}
}
}, _ = S, j = (n("daf1"), Object(u["a"])(_, f, h, !1, null, null, null)), x = j.exports;
r["default"].use(a["a"]);
var T = [{
path: "/", name: "login", component: d, children: [{
path: "/", name: "login", component: function () {
return n.e("chunk-d6365a9c").then(n.bind(null, "c1d1"))
}
}, {
path: "/handover", name: "handover", component: function () {
return n.e("chunk-76b2d41b").then(n.bind(null, "f6fc"))
}
}]
}, {
path: "/",
name: "Index",
component: x,
children: [{
path: "/userInfo", name: "userInfo", component: function () {
return n.e("chunk-3244ac0f").then(n.bind(null, "709f"))
}
}, {
path: "/cashier", name: "cashier", component: function () {
return Promise.all([n.e("chunk-3714c0d8"), n.e("chunk-43fdc20a"), n.e("chunk-2ea19d1e")]).then(n.bind(null, "f25a"))
}
}, {
path: "/table", name: "table", component: function () {
return Promise.all([n.e("chunk-3714c0d8"), n.e("chunk-fa969d0c"), n.e("chunk-280c16e0")]).then(n.bind(null, "0cac"))
}
}, {
path: "/ordering", name: "table", component: function () {
return Promise.all([n.e("chunk-3714c0d8"), n.e("chunk-fa969d0c"), n.e("chunk-43fdc20a"), n.e("chunk-5b6808f8")]).then(n.bind(null, "441a"))
}
}, {
path: "/order", name: "order", component: function () {
return n.e("chunk-4b4ed4c0").then(n.bind(null, "7915"))
}
}]
}], L = new a["a"]({mode: "hash", base: "", routes: T}), M = a["a"].prototype.push;
a["a"].prototype.push = function (e) {
return M.call(this, e).catch((function (e) {
return e
}))
};
t["a"] = L
}, b775: function (e, t, n) {
"use strict";
n("4160"), n("caad6"), n("d3b7"), n("2532"), n("159b");
var r, a = n("bc3a"), o = n.n(a), s = n("778c"), c = n("5c96"), i = (n("4360"), n("4328")), u = n.n(i),
l = n("a18c"), d = n("2ef0"), f = n.n(d), h = n("6fa2"), p = n("2b0e"), m = o.a.create({
baseURL: s["baseURL"],
timeout: s["requestTimeout"],
headers: {"Content-Type": s["contentType"]}
});
m.interceptors.request.use((function (e) {
"application/x-www-form-urlencoded;charset=UTF-8" === s["contentType"] && e.data && (e.data = u.a.stringify(e.data));
var t = function () {
var t = !1;
return s["debounce"].forEach((function (n) {
f.a.includes(e.url, n) && (t = !0)
})), t
};
return t() && (r = c["Loading"].service()), e
}), (function (e) {
return Promise.reject(e)
}));
var b = function (e) {
return Object(c["Message"])({message: e, type: "error", duration: s["messageDuration"]})
};
m.interceptors.response.use((function (e) {
r && r.close();
e.status;
var t = e.data, n = e.config, a = t.code, o = t.msg, c = !1;
if (Object(h["b"])(s["successCode"]) && (c = a !== s["successCode"]), Object(h["a"])(s["successCode"])) for (var i = 0; i < s["successCode"].length; i++) if (a === i) {
c = a !== i;
break
}
if (c) {
switch (a) {
case s["invalidCode"]:
b(o || "后端接口".concat(a, "异常1"));
break;
case s["noPermissionCode"]:
l["a"].push({path: "/401"});
break;
default:
b(o || "后端接口".concat(a, "异常2"));
break
}
return p["default"].prototype.bus.$emit("loading", !1), Promise.reject("请求异常拦截:" + JSON.stringify({
url: n.url,
code: a,
msg: o
}) || !1)
}
return t
}), (function (e) {
r && r.close();
var t = e.message;
return "Network Error" == t && (t = "后端接口连接异常"), t.includes("timeout") && (t = "后端接口请求超时"), t.includes("Request failed with status code") && (t = "后端接口" + t.substr(t.length - 3) + "异常"), p["default"].prototype.bus.$emit("loading", !1), b(t || "后端接口未知异常"), Promise.reject(e)
})), t["a"] = m
}, d6eb: function (e, t, n) {
}, d808: function (e, t, n) {
}, daf1: function (e, t, n) {
"use strict";
n("8610")
}, e1c3: function (e, t, n) {
"use strict";
var r = function () {
var e = this, t = e.$createElement, r = e._self._c || t;
return r("div", {staticClass: "menu flex-bet"}, [r("div", {staticClass: "flex mar_l10"}, [r("div", {staticClass: "logo flex-center"}, [e.cashierInfo.icon ? r("img", {
staticClass: "wid",
attrs: {alt: "logo", src: e.cashierInfo.icon}
}) : r("img", {
staticClass: "wid",
attrs: {alt: "logo", src: n("81ce")}
})]), r("div", {staticClass: "fon_20 color_f mar_l20"}, [r("span", {staticClass: "font_w600 mar_r10"}, [e._v(e._s(e.cashierInfo.cashName || "收银台"))]), r("span", {staticClass: "fon_14"}, [e._v("(店铺名称:" + e._s(e.cashierInfo.name || "店铺名称") + ")")])])]), r("div", {
directives: [{
name: "show",
rawName: "v-show",
value: "login" != e.$route.name,
expression: "$route.name !='login'"
}], staticClass: "fon_16 subjectcolor3 pad_r_20"
}, [r("el-dropdown", [r("span", {staticClass: "el-dropdown-link"}, [e._v(" " + e._s(e.userData.trueName)), r("i", {staticClass: "el-icon-arrow-down el-icon--right"})]), r("el-dropdown-menu", {
attrs: {slot: "dropdown"},
slot: "dropdown"
}, [r("el-dropdown-item", [r("a", {
staticClass: "color_3",
on: {click: e.userInfo}
}, [e._v("个人信息")])]), r("el-dropdown-item", [r("a", {
staticClass: "color_3",
on: {click: e.syjiaoban}
}, [e._v("收银交班")])]), r("el-dropdown-item", [r("a", {
staticClass: "color_3",
on: {click: e.outSystem}
}, [e._v("退出登录")])])], 1)], 1)], 1)])
}, a = [], o = (n("96cf"), n("1da1")), s = n("5530"), c = n("2f62"), i = n("294d"), u = {
computed: Object(s["a"])({}, Object(c["c"])(["userData", "cashierInfo"])),
name: "top",
created: function () {
this.cashierInfoFunction()
},
data: function () {
return {}
},
methods: Object(s["a"])(Object(s["a"])({}, Object(c["b"])(["setCashierInfo"])), {}, {
cashierInfoFunction: function () {
var e = this;
return Object(o["a"])(regeneratorRuntime.mark((function t() {
var n, r, a;
return regeneratorRuntime.wrap((function (t) {
while (1) switch (t.prev = t.next) {
case 0:
return t.next = 2, Object(i["a"])();
case 2:
n = t.sent, r = n.code, a = n.data, "1" == r && (e.setCashierInfo(a), sessionStorage.setItem("cashierInfo", JSON.stringify(a)));
case 6:
case"end":
return t.stop()
}
}), t)
})))()
}, userInfo: function () {
this.$router.push({path: "/userInfo"})
}, syjiaoban: function () {
this.$router.push({path: "/handover"})
}, outSystem: function () {
var e = this;
return Object(o["a"])(regeneratorRuntime.mark((function t() {
var n, r;
return regeneratorRuntime.wrap((function (t) {
while (1) switch (t.prev = t.next) {
case 0:
return t.next = 2, Object(i["i"])();
case 2:
n = t.sent, r = n.code, "1" == r && e.$router.push({path: "/"});
case 5:
case"end":
return t.stop()
}
}), t)
})))()
}
})
}, l = u, d = (n("46ad"), n("0c7c")), f = Object(d["a"])(l, r, a, !1, null, "934e5cf8", null);
t["a"] = f.exports
}
});