1 |
- (function(e){function t(t){for(var a,r,u=t[0],i=t[1],d=t[2],s=0,f=[];s<u.length;s++)r=u[s],Object.prototype.hasOwnProperty.call(o,r)&&o[r]&&f.push(o[r][0]),o[r]=0;for(a in i)Object.prototype.hasOwnProperty.call(i,a)&&(e[a]=i[a]);l&&l(t);while(f.length)f.shift()();return c.push.apply(c,d||[]),n()}function n(){for(var e,t=0;t<c.length;t++){for(var n=c[t],a=!0,r=1;r<n.length;r++){var u=n[r];0!==o[u]&&(a=!1)}a&&(c.splice(t--,1),e=i(i.s=n[0]))}return e}var a={},r={app:0},o={app:0},c=[];function u(e){return i.p+"static/js/"+({}[e]||e)+"."+{"chunk-078a63a2":"d699f51c","chunk-0d434337":"7d993fb7","chunk-13e4e2e4":"19e131b9","chunk-157bba72":"0ff5e257","chunk-19e9f202":"6d072877","chunk-2d0c8639":"7d2f5dfe","chunk-31634f89":"48fccf16","chunk-34a2d722":"0b008862","chunk-5ce452c0":"6b80711b","chunk-5e8bbc06":"258aa484","chunk-65af7ca2":"91c28d3e","chunk-69ce85df":"052a3930","chunk-76235eb7":"5d7e5537","chunk-773182e5":"a0bb9ceb","chunk-bb92fb4e":"57f454bc","chunk-cecf26ae":"14d62aa3","chunk-ff115d98":"6516c14a","chunk-ffd8ef52":"2c0ad903"}[e]+".js"}function i(t){if(a[t])return a[t].exports;var n=a[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-078a63a2":1,"chunk-19e9f202":1,"chunk-34a2d722":1,"chunk-5ce452c0":1,"chunk-76235eb7":1,"chunk-cecf26ae":1,"chunk-ff115d98":1};r[e]?t.push(r[e]):0!==r[e]&&n[e]&&t.push(r[e]=new Promise((function(t,n){for(var a="static/css/"+({}[e]||e)+"."+{"chunk-078a63a2":"eee9bbd5","chunk-0d434337":"31d6cfe0","chunk-13e4e2e4":"31d6cfe0","chunk-157bba72":"31d6cfe0","chunk-19e9f202":"2f692310","chunk-2d0c8639":"31d6cfe0","chunk-31634f89":"31d6cfe0","chunk-34a2d722":"6ac68650","chunk-5ce452c0":"380032ff","chunk-5e8bbc06":"31d6cfe0","chunk-65af7ca2":"31d6cfe0","chunk-69ce85df":"31d6cfe0","chunk-76235eb7":"2f692310","chunk-773182e5":"31d6cfe0","chunk-bb92fb4e":"31d6cfe0","chunk-cecf26ae":"ab26c938","chunk-ff115d98":"2f692310","chunk-ffd8ef52":"31d6cfe0"}[e]+".css",o=i.p+a,c=document.getElementsByTagName("link"),u=0;u<c.length;u++){var d=c[u],s=d.getAttribute("data-href")||d.getAttribute("href");if("stylesheet"===d.rel&&(s===a||s===o))return t()}var f=document.getElementsByTagName("style");for(u=0;u<f.length;u++){d=f[u],s=d.getAttribute("data-href");if(s===a||s===o)return t()}var l=document.createElement("link");l.rel="stylesheet",l.type="text/css",l.onload=t,l.onerror=function(t){var a=t&&t.target&&t.target.src||o,c=new Error("Loading CSS chunk "+e+" failed.\n("+a+")");c.code="CSS_CHUNK_LOAD_FAILED",c.request=a,delete r[e],l.parentNode.removeChild(l),n(c)},l.href=o;var h=document.getElementsByTagName("head")[0];h.appendChild(l)})).then((function(){r[e]=0})));var a=o[e];if(0!==a)if(a)t.push(a[2]);else{var c=new Promise((function(t,n){a=o[e]=[t,n]}));t.push(a[2]=c);var d,s=document.createElement("script");s.charset="utf-8",s.timeout=120,i.nc&&s.setAttribute("nonce",i.nc),s.src=u(e);var f=new Error;d=function(t){s.onerror=s.onload=null,clearTimeout(l);var n=o[e];if(0!==n){if(n){var a=t&&("load"===t.type?"missing":t.type),r=t&&t.target&&t.target.src;f.message="Loading chunk "+e+" failed.\n("+a+": "+r+")",f.name="ChunkLoadError",f.type=a,f.request=r,n[1](f)}o[e]=void 0}};var l=setTimeout((function(){d({type:"timeout",target:s})}),12e4);s.onerror=s.onload=d,document.head.appendChild(s)}return Promise.all(t)},i.m=e,i.c=a,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 a in e)i.d(n,a,function(t){return e[t]}.bind(null,a));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="/material/",i.oe=function(e){throw console.error(e),e};var d=window["webpackJsonp"]=window["webpackJsonp"]||[],s=d.push.bind(d);d.push=t,d=d.slice();for(var f=0;f<d.length;f++)t(d[f]);var l=s;c.push(["c712","chunk-vendors"]),n()})({"0088":function(e,t,n){"use strict";n("9a83");var a=n("f564"),r=(n("d9e2"),n("d401"),n("d3b7"),n("bc3a")),o=n.n(r),c=n("2883"),u=n("73b7"),i=n("a923"),d=o.a.create({baseURL:i["a"].baseApi,timeout:5e3});d.interceptors.request.use((function(e){var t=Object(u["a"])();return t&&(e.headers["Access-Token"]=t),e}),(function(e){return console.log(e),Promise.reject(e)})),d.interceptors.response.use((function(e){var t=e.data;return 200!==t.code?(Object(a["a"])({type:"danger",message:t.message}),Promise.reject(new Error(t.message||"Error"))):t}),(function(e){return console.log(e),e&&e.response?(Object(a["a"])({type:"danger",message:e.response.data.message}),401===e.response.status&&c["a"].dispatch("user/resetToken").then((function(){location.reload()}))):Object(a["a"])({type:"danger",message:e.message}),Promise.reject(e)})),t["a"]=d},2883:function(e,t,n){"use strict";n("13d5"),n("d3b7"),n("ac1f"),n("5319"),n("ddb0");var a=n("2b0e"),r=n("2f62"),o={user_id:function(e){return e.user.id},token:function(e){return e.user.token},username:function(e){return e.user.username},role_name:function(e){return e.user.role_name},phone:function(e){return e.user.phone},setting:function(e){return e.user.setting}},c=o,u=n("eaf8");a["a"].use(r["a"]);var i=n("8a8c"),d=i.keys().reduce((function(e,t){var n=t.replace(/^\.\/(.*)\.\w+$/,"$1"),a=i(t);return e[n]=a.default,e}),{}),s=n("47ba"),f=s.keys().reduce((function(e,t){var n=t.replace(/^\.\/(.*)\.\w+$/,"$1"),a=s(t);return e[n]=a.default,e}),{});d=Object(u["c"])(d,f);var l=new r["a"].Store({modules:d,getters:c});t["a"]=l},"47ba":function(e,t,n){var a={"./loading.js":"b9a8"};function r(e){var t=o(e);return n(t)}function o(e){if(!n.o(a,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return a[e]}r.keys=function(){return Object.keys(a)},r.resolve=o,e.exports=r,r.id="47ba"},"6a4f":function(e,t,n){"use strict";n.r(t);n("d3b7");var a=n("73b7"),r=n("0088");function o(e){return Object(r["a"])({url:"login",method:"post",data:e})}function c(){return Object(r["a"])({url:"info",method:"get"})}function u(e){return Object(r["a"])({url:"info",method:"put",data:e})}function i(){return Object(r["a"])({url:"logout",method:"post"})}function d(e){return Object(r["a"])({url:"password",method:"put",data:e})}var s={id:0,token:Object(a["a"])(),username:"",role_name:"",phone:"",setting:{}},f={SET_TOKEN:function(e,t){e.token=t},SET_USERNAME:function(e,t){e.username=t},SET_ROLE_NAME:function(e,t){e.role_name=t},SET_PHONE:function(e,t){e.phone=t},SET_SETTING:function(e,t){e.setting=t},SET_ID:function(e,t){e.id=t}},l={login:function(e,t){var n=e.commit;return new Promise((function(e,r){o(t).then((function(t){200!==t.code&&r(t.msg),n("SET_TOKEN",t.data.token),Object(a["c"])(t.data.token),e()})).catch((function(e){r(e)}))}))},logout:function(e){var t=e.commit,n=e.state;return new Promise((function(e,r){i(n.token).then((function(n){t("SET_TOKEN",""),t("SET_ID",0),Object(a["b"])(),e()})).catch((function(e){r(e)}))}))},getInfo:function(e){var t=e.commit,n=e.state;return new Promise((function(e,a){c(n.token).then((function(n){var a=n.data,r=a.id,o=a.username,c=a.phone,u=a.role_name,i=a.setting;t("SET_ID",r),t("SET_PHONE",c),t("SET_USERNAME",o),t("SET_ROLE_NAME",u),t("SET_SETTING",i),console.log(n),e(n.data)})).catch((function(e){a(e)}))}))},updateInfo:function(e,t){var n=e.commit;e.state;return new Promise((function(e,a){u(t).then((function(t){n("SET_ID",0),e(t.data)})).catch((function(e){a(e)}))}))},updatePassword:function(e,t){var n=e.commit;e.state;return new Promise((function(e,r){d(t).then((function(t){n("SET_ID",0),n("SET_TOKEN",""),Object(a["b"])(),e(t.data)})).catch((function(e){r(e)}))}))},resetToken:function(e){var t=e.commit;return new Promise((function(e){t("SET_TOKEN",""),Object(a["b"])(),e()}))}};t["default"]={namespaced:!0,state:s,mutations:f,actions:l}},"73b7":function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"b",(function(){return i}));var a=n("a78e"),r=n.n(a),o="Material-Token";function c(){return r.a.get(o)}function u(e){return r.a.set(o,e)}function i(){return r.a.remove(o)}},"8a8c":function(e,t,n){var a={"./user.js":"6a4f"};function r(e){var t=o(e);return n(t)}function o(e){if(!n.o(a,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return a[e]}r.keys=function(){return Object.keys(a)},r.resolve=o,e.exports=r,r.id="8a8c"},a923:function(e,t,n){"use strict";var a={development:{baseApi:"http://localhost:4000/api/material/",baseUrl:"http://localhost:4000/"},production:{baseApi:"/api/material/",baseUrl:"https://jz.nczyzs.com/"}};t["a"]=a["production"]},b9a8:function(e,t,n){"use strict";n.r(t);var a={loading:!1},r={showLoading:function(e){e.loading=!0},hideLoading:function(e){e.loading=!1}},o={};t["default"]={namespaced:!0,state:a,mutations:r,actions:o}},c712:function(e,t,n){"use strict";n.r(t);n("2cbd");var a=n("ab2c"),r=(n("480b"),n("a37c")),o=(n("b000"),n("1a23")),c=(n("342a"),n("1437")),u=(n("5d17"),n("f9bd")),i=(n("c194"),n("7744")),d=(n("9a83"),n("f564")),s=(n("91d5"),n("f0ca")),f=(n("5852"),n("d961")),l=(n("61ae"),n("d314")),h=(n("09d3"),n("2d6d")),p=(n("f06a"),n("20fb")),b=(n("46de"),n("a822")),m=(n("db2c"),n("1125")),v=(n("a44c"),n("e27c")),g=(n("4ddd"),n("9f14")),k=(n("e17f"),n("2241")),_=(n("5f5f"),n("f253")),y=(n("8a58"),n("e41f")),O=(n("c3a6"),n("ad06")),E=(n("e7e5"),n("d399")),w=(n("bda7"),n("5e46")),j=(n("da3c"),n("0b33")),T=(n("2994"),n("2bdd")),x=(n("5246"),n("6b41")),S=(n("a52c"),n("2ed4")),P=(n("537a"),n("ac28")),N=(n("4056"),n("44bf")),A=(n("66cf"),n("343b")),C=(n("be7f"),n("565f")),L=(n("38d5"),n("772a")),I=(n("66b9"),n("b650")),U=(n("e260"),n("e6cf"),n("cca6"),n("a79d"),n("db4d"),n("2b0e")),D=function(){var e=this,t=e._self._c;return t("div",{staticClass:"bg-gray-100 min-h-screen text-gray-600 text-base xl:w-800px xl:mx-auto",attrs:{id:"app"}},[t("Loading",{directives:[{name:"show",rawName:"v-show",value:e.loading,expression:"loading"}]}),t("router-view")],1)},M=[],$=function(){var e=this,t=e._self._c;return t("div",{staticClass:"fixed z-max w-full h-full flex justify-center items-center bg-white bg-opacity-50"},[t("van-loading",{attrs:{type:"spinner",color:"#1989fa"}})],1)},z=[],R=(n("ac1e"),n("543e"));U["a"].use(R["a"]);var F={name:"Loading",data:function(){return{}}},K=F,B=n("2877"),q=Object(B["a"])(K,$,z,!1,null,null,null),H=q.exports,G={components:{Loading:H},computed:{loading:function(){return this.$store.state.loading.loading}}},J=G,Q=Object(B["a"])(J,D,M,!1,null,null,null),V=Q.exports,W=n("2883"),X=(n("c975"),n("d3b7"),n("3ca3"),n("ddb0"),n("8c4f")),Y=n("73b7"),Z=function(){var e=this,t=e._self._c;return t("div",[t("router-view"),t("app-footer")],1)},ee=[],te=function(){var e=this,t=e._self._c;return t("p",{staticClass:"text-center pb-20 pt-10 text-gray-400 text-xs"},[e._v(e._s(e.data))])},ne=[],ae=n("e5c0"),re=n.n(ae),oe={name:"Footer",data:function(){return{data:ae["footer"]}}},ce=oe,ue=Object(B["a"])(ce,te,ne,!1,null,null,null),ie=ue.exports,de={name:"Page",components:{AppFooter:ie}},se=de,fe=Object(B["a"])(se,Z,ee,!1,null,null,null),le=fe.exports,he=function(){var e=this,t=e._self._c;return t("div",[t("router-view"),t("app-footer"),t("tabbar")],1)},pe=[],be=function(){var e=this,t=e._self._c;return t("van-tabbar",{staticClass:"xl:w-800px xl:left-400pxh",attrs:{route:""}},[t("van-tabbar-item",{attrs:{to:"/home",icon:"wap-home-o"}},[e._v("首页")]),t("van-tabbar-item",{attrs:{to:"/pick/orders",icon:"goods-collect-o"}},[e._v("选材单")]),t("van-tabbar-item",{attrs:{to:"/bid/orders",icon:"balance-list-o"}},[e._v("报价单")]),t("van-tabbar-item",{attrs:{to:"/personal",icon:"friends-o"}},[e._v("我的")])],1)},me=[],ve={data:function(){return{active:0,icon:{repair_active:"repair",repair_inactive:"repair"}}}},ge=ve,ke=Object(B["a"])(ge,be,me,!1,null,null,null),_e=ke.exports,ye={name:"Page",components:{AppFooter:ie,Tabbar:_e}},Oe=ye,Ee=Object(B["a"])(Oe,he,pe,!1,null,null,null),we=Ee.exports,je=n("e5c0");U["a"].use(X["a"]);var Te=[{path:"/redirect",children:[{path:"/redirect/:path(.*)",component:function(){return n.e("chunk-2d0c8639").then(n.bind(null,"5558"))}}]},{path:"/404",component:function(){return n.e("chunk-773182e5").then(n.bind(null,"dfafb"))},hidden:!0},{path:"/login",component:function(){return n.e("chunk-157bba72").then(n.bind(null,"48a9"))},meta:{title:"登录"},hidden:!0},{path:"/bid",component:le,children:[{path:"outline",component:function(){return n.e("chunk-cecf26ae").then(n.bind(null,"4342"))},meta:{title:"报价概算"}},{path:"detail",component:function(){return n.e("chunk-76235eb7").then(n.bind(null,"ddfa"))},meta:{title:"报价精算"}},{path:"toilet_detail",component:function(){return n.e("chunk-ff115d98").then(n.bind(null,"ba1b"))},meta:{title:"报价精算"}},{path:"customize",component:function(){return n.e("chunk-34a2d722").then(n.bind(null,"1b4b"))},meta:{title:"个性化"}},{path:"outline/:order_id(\\d+)/info",component:function(){return n.e("chunk-cecf26ae").then(n.bind(null,"4342"))},meta:{title:"详情"}},{path:"orders/:order_id(\\d+)/info",component:function(){return n.e("chunk-5ce452c0").then(n.bind(null,"b3f9"))},meta:{title:"详情"}},{path:"orders/:order_id(\\d+)/edit",component:function(){return n.e("chunk-76235eb7").then(n.bind(null,"ddfa"))},meta:{title:"编辑"}},{path:"upgrade",component:function(){return n.e("chunk-19e9f202").then(n.bind(null,"a6a0"))},meta:{title:"升级价计算"}}]},{path:"/pkgs",component:le,children:[{path:":pkg_id(\\d+)/info",component:function(){return n.e("chunk-5e8bbc06").then(n.bind(null,"66ee"))},meta:{title:"详情"}}]},{path:"/",component:we,redirect:"/home",children:[{path:"home",component:function(){return n.e("chunk-0d434337").then(n.bind(null,"7719"))},meta:{title:"首页"}},{path:"pick/orders",component:function(){return n.e("chunk-13e4e2e4").then(n.bind(null,"4c2e"))},meta:{title:"选材订单"}},{path:"bid/orders",component:function(){return n.e("chunk-bb92fb4e").then(n.bind(null,"b583"))},meta:{title:"报价订单"}},{path:"/personal",component:function(){return n.e("chunk-69ce85df").then(n.bind(null,"303e"))},meta:{title:"我的信息"}}]},{path:"/personal/password",component:le,children:[{path:"",component:function(){return n.e("chunk-65af7ca2").then(n.bind(null,"3860"))},meta:{title:"修改密码"}}]},{path:"/pick",component:le,children:[{path:"orders/add",component:function(){return n.e("chunk-ffd8ef52").then(n.bind(null,"e5e4"))},name:"pkgOrderAdd",hidden:!0,meta:{title:"添加报价"},noCache:!0},{path:"orders/chooseItem",component:function(){return n.e("chunk-078a63a2").then(n.bind(null,"3a59"))},name:"pkgOrderChooseItem",hidden:!0,meta:{title:"选择主材"},noCache:!0},{path:"orders/:order_id(\\d+)/info",component:function(){return n.e("chunk-31634f89").then(n.bind(null,"40d7"))},meta:{title:"详情"}},{path:"orders/:order_id(\\d+)/edit",component:function(){return n.e("chunk-ffd8ef52").then(n.bind(null,"e5e4"))},meta:{title:"编辑"}}]},{path:"*",redirect:"/404"}],xe=new X["a"]({routes:Te}),Se=["/login"];xe.beforeEach((function(e,t,n){var a=e.meta&&e.meta.title;a&&(document.title=je.title+"-"+a);var r=Object(Y["a"])();if(r)if("/login"===e.path)n({path:"/"});else{var o=W["a"].getters.user_id;0===o?W["a"].dispatch("user/getInfo").then((function(){n()})):n()}else-1!==Se.indexOf(e.path)?n():n("/login?redirect=".concat(e.fullPath))}));var Pe=xe,Ne=(n("b972"),n("c883"),n("e886"),n("bc3a")),Ae=n.n(Ne),Ce=n("a923");U["a"].use(I["a"]),U["a"].use(L["a"]),U["a"].use(C["a"]),U["a"].use(A["a"]),U["a"].use(N["a"]),U["a"].use(P["a"]),U["a"].use(S["a"]),U["a"].use(x["a"]),U["a"].use(T["a"]),U["a"].use(j["a"]),U["a"].use(w["a"]),U["a"].use(E["a"]),U["a"].use(O["a"]),U["a"].use(y["a"]),U["a"].use(_["a"]),U["a"].use(k["a"]),U["a"].use(g["a"]),U["a"].use(v["a"]),U["a"].use(m["a"]),U["a"].use(b["a"]),U["a"].use(p["a"]),U["a"].use(h["a"]),U["a"].use(l["a"]),U["a"].use(f["a"]),U["a"].use(s["a"]),U["a"].use(d["a"]),U["a"].use(i["a"]),U["a"].use(u["a"]),U["a"].use(c["a"]),U["a"].use(o["a"]),U["a"].use(r["a"]),U["a"].use(a["a"]),U["a"].config.productionTip=!1,U["a"].prototype.$env=Ce["a"],U["a"].prototype.$axios=Ae.a,U["a"].prototype.$settings=re.a,U["a"].prototype.$notify=d["a"],U["a"].prototype.$dialog=k["a"],new U["a"]({router:Pe,store:W["a"],el:"#app",render:function(e){return e(V)}})},c883:function(e,t,n){},e5c0:function(e,t){e.exports={title:"志远选材系统",footer:"@2021 志远选材系统",logo:"https://image.nczyzs.com/zhiyuan-logo.png",validCss:["text-gray-400","text-blue-400","text-green-400","text-purple-500","text-indigo-500"]}},e886:function(e,t,n){},eaf8:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return c}));var a=n("53ca");n("d401"),n("4160"),n("c975"),n("fb6a"),n("b64b"),n("d3b7"),n("e25e"),n("4d63"),n("c607"),n("ac1f"),n("2c3e"),n("00b4"),n("25f0"),n("3ca3"),n("4d90"),n("5319"),n("159b"),n("ddb0"),n("2b3d"),n("bf19"),n("9861"),n("88a7"),n("271a"),n("5494");function r(){return window.navigator.userAgent.toLowerCase().indexOf("micromessenger")>-1}function o(e,t){if("download"in document.createElement("a")){var n=window.URL.createObjectURL(t),a=document.createElement("a");a.style.display="none",a.href=n,a.setAttribute("download",e),document.body.appendChild(a),a.click(),document.body.removeChild(a)}else navigator.msSaveBlob(t,e)}function c(e,t){return"object"!==Object(a["a"])(e)&&(e={}),Array.isArray(t)?t.slice():(Object.keys(t).forEach((function(n){var r=t[n];"object"===Object(a["a"])(r)?e[n]=c(e[n],r):e[n]=r})),e)}}});
|