1 line
37 KiB
Plaintext
1 line
37 KiB
Plaintext
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/styles/element-variables.scss?5e2d","webpack:///./src/store/modules/user.js","webpack:///./src/store/modules/app.js","webpack:///./src/store/modules/index.js","webpack:///./src/store/getters.js","webpack:///./src/store/index.js","webpack:///./src/App.vue?452c","webpack:///src/App.vue","webpack:///./src/App.vue?4c4f","webpack:///./src/App.vue","webpack:///./src/plugins/element.js","webpack:///./src/permission.js","webpack:///./src/main.js","webpack:///./src/App.vue?6656","webpack:///./src/App.vue?6e56","webpack:///./src/router/index.js","webpack:///./src/api/app.js","webpack:///./src/plugins/axios.js","webpack:///./src/utils/util.js","webpack:///./src/config.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","installedCssChunks","jsonpScriptSrc","p","exports","module","l","e","promises","cssChunks","Promise","resolve","reject","href","fullhref","existingLinkTags","document","getElementsByTagName","tag","dataHref","getAttribute","rel","existingStyleTags","linkTag","createElement","type","onload","onerror","event","request","target","src","err","Error","code","parentNode","removeChild","head","appendChild","then","installedChunkData","promise","onScriptComplete","script","charset","timeout","nc","setAttribute","error","clearTimeout","chunk","errorType","realSrc","message","name","undefined","setTimeout","all","m","c","d","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","console","jsonpArray","window","oldJsonpFunction","slice","state","token","userInfo","mutations","SET_USER_INFO","SET_TOKEN","clearUserInfo","actions","login","form","commit","apiLogin","catch","getUserInfo","apiKefuDetail","logout","user","config","setConfig","app","shopId","shop_id","baseUrl","base_domain","copyright","company_name","wsUrl","ws_domain","Vue","use","Vuex","vuexLocal","VuexPersistence","storage","localStorage","Store","getters","plugins","plugin","_vm","this","_h","$createElement","_c","_self","attrs","_e","staticRenderFns","routerAlive","provide","reload","methods","created","apiGetConfig","favicon","component","Element","loginPath","defaultPath","whiteList","NProgress","configure","showSpinner","router","beforeEach","to","from","next","start","meta","title","query","store","path","includes","redirect","fullPath","afterEach","done","OverlayScrollbarsComponent","productionTip","render","h","App","$mount","VueRouter","routes","base","process","post","client","apiChatUserList","params","apiChatHistory","apiServiceList","apiReplyList","apiUserInfo","apiUserOrder","eventResponse","success","show","msg","Message","log","throttle","dispatch","replace","baseURL","configs","headers","_axios","axios","interceptors","response","Plugin","install","options","defineProperties","$axios","fn","time","previousTime","Date","getTime","nowTime","args","debounce","delay","fun","self","arguments","objectToQuery","_result","Array","isArray","forEach","_value","join","version"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAG/Be,GAAqBA,EAAoBhB,GAE5C,MAAMO,EAASC,OACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,GAAY,GAE3CA,IACFL,EA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B,IAAIuP,EAAU,GADqB,WAG1B/I,GACL,IAAIN,EAAQlG,EAAKwG,GACbgJ,MAAMC,QAAQvJ,GACdA,EAAMwJ,SAAQ,SAAAC,GACVJ,EAAQzO,KAAK0F,EAAM,IAAMmJ,MAG7BJ,EAAQzO,KAAK0F,EAAM,IAAMN,IAPjC,IAAK,IAAIM,KAAOxG,EAAM,EAAbwG,GAWT,OAAO+I,EAAQK,KAAK,O,kCCtGT,QAEXC,QAAS,QACT/B,QAAgD","file":"js/app.837b8e0c.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded CSS chunks\n \tvar installedCssChunks = {\n \t\t\"app\": 0\n \t}\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"app\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"js/\" + ({}[chunkId]||chunkId) + \".\" + {\"chunk-0f226f0a\":\"d8650179\",\"chunk-72ef8297\":\"586104ce\"}[chunkId] + \".js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// mini-css-extract-plugin CSS loading\n \t\tvar cssChunks = {\"chunk-0f226f0a\":1,\"chunk-72ef8297\":1};\n \t\tif(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);\n \t\telse if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {\n \t\t\tpromises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) {\n \t\t\t\tvar href = \"css/\" + ({}[chunkId]||chunkId) + \".\" + {\"chunk-0f226f0a\":\"0f952df5\",\"chunk-72ef8297\":\"71bfa63a\"}[chunkId] + \".css\";\n \t\t\t\tvar fullhref = __webpack_require__.p + href;\n \t\t\t\tvar existingLinkTags = document.getElementsByTagName(\"link\");\n \t\t\t\tfor(var i = 0; i < existingLinkTags.length; i++) {\n \t\t\t\t\tvar tag = existingLinkTags[i];\n \t\t\t\t\tvar dataHref = tag.getAttribute(\"data-href\") || tag.getAttribute(\"href\");\n \t\t\t\t\tif(tag.rel === \"stylesheet\" && (dataHref === href || dataHref === fullhref)) return resolve();\n \t\t\t\t}\n \t\t\t\tvar existingStyleTags = document.getElementsByTagName(\"style\");\n \t\t\t\tfor(var i = 0; i < existingStyleTags.length; i++) {\n \t\t\t\t\tvar tag = existingStyleTags[i];\n \t\t\t\t\tvar dataHref = tag.getAttribute(\"data-href\");\n \t\t\t\t\tif(dataHref === href || dataHref === fullhref) return resolve();\n \t\t\t\t}\n \t\t\t\tvar linkTag = document.createElement(\"link\");\n \t\t\t\tlinkTag.rel = \"stylesheet\";\n \t\t\t\tlinkTag.type = \"text/css\";\n \t\t\t\tlinkTag.onload = resolve;\n \t\t\t\tlinkTag.onerror = function(event) {\n \t\t\t\t\tvar request = event && event.target && event.target.src || fullhref;\n \t\t\t\t\tvar err = new Error(\"Loading CSS chunk \" + chunkId + \" failed.\\n(\" + request + \")\");\n \t\t\t\t\terr.code = \"CSS_CHUNK_LOAD_FAILED\";\n \t\t\t\t\terr.request = request;\n \t\t\t\t\tdelete installedCssChunks[chunkId]\n \t\t\t\t\tlinkTag.parentNode.removeChild(linkTag)\n \t\t\t\t\treject(err);\n \t\t\t\t};\n \t\t\t\tlinkTag.href = fullhref;\n\n \t\t\t\tvar head = document.getElementsByTagName(\"head\")[0];\n \t\t\t\thead.appendChild(linkTag);\n \t\t\t}).then(function() {\n \t\t\t\tinstalledCssChunks[chunkId] = 0;\n \t\t\t}));\n \t\t}\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/kefu/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"primary\":\"#4073FA\"};","/**\n * 用户\n */\n\n\nimport {apiLogin, apiKefuDetail} from '@/api/app'\n\n\n// State\nconst state = {\n token: '',\n userInfo: {},\n}\n\n\n// Mutations\nconst mutations= {\n // 设置用户信息\n SET_USER_INFO: (state, data) => {\n state.userInfo = data;\n },\n\n SET_TOKEN: (state, token) => {\n state.token = token\n },\n\n // 清除用户信息\n clearUserInfo: (state) => {\n state.userInfo = {};\n }\n}\n\n\n// Actions\nconst actions = {\n login({commit}, form) {\n return new Promise((resolve, reject) => {\n apiLogin(form).then(data => {\n commit('SET_TOKEN', data.token)\n resolve(data)\n }).catch(err => {\n reject(err)\n })\n })\n },\n\n getUserInfo({commit}) {\n return new Promise((resolve, reject) => {\n apiKefuDetail().then(data => {\n commit('SET_USER_INFO', data)\n resolve(data)\n }).catch(err => {\n // reject(err)\n })\n })\n },\n\n logout({commit}) {\n return new Promise((resolve, reject) => {\n commit('SET_TOKEN', '')\n commit('clearUserInfo')\n resolve()\n })\n }\n\n}\n\n\nconst user = {\n state,\n mutations,\n actions\n}\n\nexport default user\n","import { apiLogin, apiKefuDetail } from '@/api/app'\n\n// State\nconst state = {\n config: {},\n}\n\n// Mutations\nconst mutations = {\n setConfig(state, data) {\n state.config = data\n }\n}\n\n// Actions\nconst actions = {\n \n}\n\nconst user = {\n state,\n mutations,\n actions,\n}\n\nexport default user\n","\nimport user from \"./user\";\nimport app from \"./app\";\nexport default {\n user,\n app\n};\n\n","export default {\n // 获取Token\n token: (state) => state.user.token || null,\n // 店铺id\n shopId:(state) => state.user.userInfo?.shop_id || 0,\n // 用户信息\n userInfo: state => state.user.userInfo,\n baseUrl: state => state.app.config.base_domain,\n copyright: state => state.app.config.company_name,\n wsUrl: state => state.app.config.ws_domain\n}\n","import Vue from 'vue'\nimport Vuex from 'vuex'\nimport VuexPersistence from 'vuex-persist'\nimport modules from './modules'\nimport getters from './getters'\nVue.use(Vuex)\n\nconst vuexLocal = new VuexPersistence({\n key: 'vuexbase', // 这里可以自定义存入localStorage的键名,默认vuex\n storage: window.localStorage,\n modules: ['user'],\n})\n\nexport default new Vuex.Store({\n modules: modules,\n\tgetters: getters,\n plugins: [vuexLocal.plugin],\n})\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"app\"}},[(_vm.routerAlive)?_c('router-view'):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <div id=\"app\">\n <router-view v-if=\"routerAlive\" />\n </div>\n</template>\n\n<script>\n\nimport { apiGetConfig } from '@/api/app'\nexport default {\n data() {\n return {\n routerAlive: true\n }\n },\n provide() {\n return {\n reload: this.reload\n }\n },\n methods: {\n reload() {\n this.routerAlive = false\n this.$nextTick(() => {\n this.routerAlive = true\n })\n },\n },\n created(){\n apiGetConfig().then((data) => {\n this.$store.commit('setConfig', data)\n let favicon = document.querySelector('link[rel=\"icon\"]')\n if (favicon) {\n favicon.href = data.web_favicon\n return\n }\n favicon = document.createElement('link')\n favicon.rel = 'icon'\n favicon.href = data.web_favicon\n document.head.appendChild(favicon)\n })\n }\n}\n</script>\n\n<style lang=\"scss\">\n@import './styles/index.scss';\n#app {\n min-width: 1200px;\n}\n</style>\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--13-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--13-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=49b2e1b2&\"\nimport script from \"./App.vue?vue&type=script&lang=js&\"\nexport * from \"./App.vue?vue&type=script&lang=js&\"\nimport style0 from \"./App.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import Vue from 'vue'\nimport Element from 'element-ui'\nimport '../styles/element-variables.scss'\nVue.use(Element)","import router from './router'\nimport store from './store'\nimport NProgress from 'nprogress'\n\n\nconst loginPath = '/login'\nconst defaultPath = '/'\nconst whiteList = ['login']\nNProgress.configure({ showSpinner: false }) \n\nrouter.beforeEach((to, from, next) => {\n NProgress.start()\n // 设置文档title\n to.meta?.title && (document.title = to.meta.title)\n let { token } = to.query\n if(token) {\n store.commit('SET_TOKEN', token)\n }\n token = token || store.getters.token;\n if (token) {\n if (to.path === loginPath) {\n next({ path: defaultPath })\n } else {\n next();\n }\n } else {\n if (whiteList.includes(to.name)) {\n // 在免登录白名单,直接进入\n next()\n } else {\n next({ path: loginPath, query: { redirect: to.fullPath } })\n }\n }\n\n})\n\n\nrouter.afterEach(() => {\n NProgress.done()\n})\n","import Vue from 'vue'\nimport './plugins/axios'\nimport App from './App.vue'\nimport router from './router'\nimport store from './store'\nimport './plugins/axios'\nimport './plugins/element'\nimport './permission'\nimport './styles/emoji.css'\n\n// global registration OverlayScrollbars\nimport 'overlayscrollbars/css/OverlayScrollbars.css'\nimport { OverlayScrollbarsComponent } from 'overlayscrollbars-vue'\nVue.component('overlay-scrollbars', OverlayScrollbarsComponent)\n\nVue.config.productionTip = false\n\nnew Vue({\n router,\n store,\n render: h => h(App)\n}).$mount('#app')\n","export * from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&lang=scss&\"","// extracted by mini-css-extract-plugin\nmodule.exports = {\"primary\":\"#4073FA\"};","import Vue from 'vue'\nimport VueRouter from 'vue-router'\n\nVue.use(VueRouter)\n\nconst routes = [\n {\n path: '*',\n redirect: '/error/404',\n },\n {\n path: '/',\n name: 'index',\n meta: {\n title: '客服',\n },\n component: () => import('@/views/window'),\n },\n {\n path: '/login',\n name: 'login',\n meta: {\n title: '登录',\n },\n component: () => import('@/views/account/login'),\n },\n]\n\nconst router = new VueRouter({\n mode: 'history',\n base: process.env.BASE_URL,\n routes,\n})\n\nexport default router\n","import request from '@/plugins/axios'\n\n// 登录\nexport const apiLogin = data => request.post('/kefuapi/account/login', {...data, client: 5})\n\n// 退出登录\nexport const apiLogout = () => request.post('/kefuapi/account/logout')\n\n\n\n// 用户列表\nexport const apiChatUserList = params => request.get('/kefuapi/chat/user', {params})\n\n// 聊天记录\nexport const apiChatHistory = params => request.get('/kefuapi/chat/record', {params})\n\n// 客服列表\nexport const apiServiceList = params => request.get('/kefuapi/chat/online', {params})\n\n\n// 快捷回复\nexport const apiReplyList = params => request.get('/kefuapi/chat/reply', {params})\n\n\n// 获取用户详情\nexport const apiUserInfo = params => request.get('/kefuapi/chat/userInfo', {params})\n\n// 获取订单列表\nexport const apiUserOrder = params => request.get('/kefuapi/chat/order', {params})\n\n// 文件上传\nexport const apiUploadFile = data => request.post('/kefuapi/file/formImage', data)\n\n// 获取客服详情\nexport const apiKefuDetail = () => request.get('/kefuapi/chat/kefuInfo')\n\n// 获取配置信息\nexport const apiGetConfig = () => request.get('/kefuapi/chat/config')\n","'use strict'\n\nimport Vue from 'vue'\nimport store from '@/store'\nimport axios from 'axios'\nimport router from '@/router'\nimport configs from '@/config'\nimport { Message } from 'element-ui'\nimport { throttle } from '@/utils/util'\n\n// 事件集\nconst eventResponse = {\n\t// 成功\n\tsuccess({ show, msg, data }) {\n\t\tif (show * 1) Message({ type: 'success', message: msg });\n\t\treturn data;\n\t},\n\t// 失败\n\terror({ show, msg }) {\n\t\tif (show * 1) Message({ type: 'error', message: msg });\n\t\tconsole.log(\"Error...\");\n\t\treturn Promise.reject();\n\t},\n\t// 重定向\n\tredirect: throttle(() => {\n store.dispatch('logout')\n router.replace('/login')\n\t\treturn Promise.reject();\n\t}),\n}\n\n\n\nlet config = {\n baseURL: `${configs.baseURL}`,\n headers: {\n 'content-type': 'application/json',\n },\n}\n\nconst _axios = axios.create(config)\n\n_axios.interceptors.request.use(\n function (config) {\n // Do something before request is sent\n\t\tconst token = store.getters.token;\n\t\t// header参入Token\n\t\tif (token) config.headers['token'] = token;\n return config\n },\n function (error) {\n // Do something with request error\n\t\t\n return Promise.reject(error)\n }\n)\n\n// Add a response interceptor\n_axios.interceptors.response.use(\n function (response) {\n // Do something with response data\n\t\tconst { code } = response.data;\n\t\tswitch(code) {\n\t\t\tcase 1: return eventResponse.success(response.data)\n\t\t\tcase 0: return eventResponse.error(response.data)\n\t\t\tcase -1: return eventResponse.redirect(response.data)\n\t\t}\n },\n function (error) {\n // Do something with response error\n\t\tMessage({ type: 'error', message: '系统错误,请稍候再试' });\n return Promise.reject(error)\n }\n)\n\nPlugin.install = function (Vue, options) {\n Vue.axios = _axios\n window.axios = _axios\n Object.defineProperties(Vue.prototype, {\n axios: {\n get() {\n return _axios\n },\n },\n $axios: {\n get() {\n return _axios\n },\n },\n })\n}\n\nVue.use(Plugin)\n\nexport default _axios\n","\n/**\n * @description 节流\n * @param fn { Function } 方法\n * @param time { Number } 间隔时间\n * @return { Function } 节流处理的后的方法\n */\nexport const throttle = (\n fn,\n time = 1000\n) => {\n let previousTime = new Date(0).getTime();\n return (...args ) => {\n let nowTime = new Date().getTime();\n if (nowTime - previousTime > time) {\n previousTime = nowTime;\n return fn(args);\n }\n }\n}\n\n\n/**\n * @description 防抖\n * @param fn { Function } 方法\n * @param time { Number } 间隔时间\n * @return { Function } 防抖处理的后的方法\n */\nexport function debounce(delay, fun) {\n\tlet time = null\n\treturn function () {\n\t\tlet self = this\n\t\tif (time) clearTimeout(time)\n\t\ttime = setTimeout(() => {\n\t\t\treturn fun.apply(self, arguments)\n\t\t}, delay)\n\t}\n}\n\n\n\n/**\n * @description 数组扁平化\n * @param arr { Array } 扁平化对象\n * @return { Array } 扁平化后的数组\n */\nexport const flatten = (arr) => {\n return arr.reduce((result, item) => {\n return result.concat(Array.isArray(item) ? flatten(item) : item);\n }, []);\n}\n\n\n\n\n/**\n * @description 获取不重复的id\n * @param length { Number } id的长度\n * @return { String } id\n */\nexport const getNonDuplicateID = (length = 8) => {\n let idStr = Date.now().toString(36)\n idStr += Math.random().toString(36).substr(3, length)\n return idStr\n}\n\n\n/**\n * @description 复制到剪切板\n * @param value { String } 复制内容\n * @return { Promise } resolve | reject\n */\nexport const copyClipboard = (value) => {\n const elInput = document.createElement('input')\n\n elInput.setAttribute('value', value)\n document.body.appendChild(elInput)\n elInput.select()\n\n try {\n if (document.execCommand('copy'))\n return Promise.resolve()\n else\n throw new Error()\n } catch (err) {\n return Promise.reject(err)\n } finally {\n document.body.removeChild(elInput)\n }\n}\n\n\nexport const objectToQuery = (data) => {\n let _result = []\n\n for (let key in data) {\n let value = data[key]\n if (Array.isArray(value)) {\n value.forEach(_value => {\n _result.push(key + \"=\" + _value)\n })\n } else {\n _result.push(key + '=' + value)\n }\n }\n\n return _result.join('&')\n}\n","// 开发环境域名\n\nconst host_development = 'https://likeshopb2b2c.yixiangonline.com'\n\nexport default {\n // 版本\n version: '1.3.1',\n baseURL: process.env.NODE_ENV == 'production' ? '' : host_development,\n // ChatWss: 'wss://likeshopb2b2cchat.yixiangonline.com'\n}\n\n\n"],"sourceRoot":""} |