yzms/touch_mz/dist/4.chunk.js

1 line
6.4 KiB
JavaScript
Raw Permalink Normal View History

2024-04-01 15:54:27 +08:00
webpackJsonp([4],{45:function(t,e,a){a(62);var n=a(19)(a(50),a(67),null,null);n.options.__file="E:\\git_project\\backups_source\\标准版敏卓触摸版\\src\\views\\cancel.vue",n.esModule&&Object.keys(n.esModule).some(function(t){return"default"!==t&&"__esModule"!==t})&&console.error("named exports are not supported in *.vue files."),n.options.functional&&console.error("[vue-loader] cancel.vue: functional components are not supported with templates, they should use render functions."),t.exports=n.exports},50:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={data:function(){return{copy:(new Date).getFullYear()+"© 中国电信佛山分公司版权",username:"-",account:"-",userid:"",iconSize:"13",menuIconColor:"#698aab",readCard:!1,canICancel:!1,dateData:""}},mounted:function(){this.autoSetLayoutMainHeight(),this.readCard=!1,this.getData()},updated:function(){},methods:{goBack:function(){this.$store.commit("setToken",null),this.$store.commit("setCount",0),this.$router.replace({path:"index"})},getData:function(){this.$store.commit("setLoading",!0);var t=this;this.$ajax.get("/api/order/cancel_list/",{params:{token:t.$store.state.token}}).then(function(e){t.$store.commit("setLoading",!1),1===e.data.status?(t.dateData=e.data.data.dateData,t.username=e.data.data.user.username,t.account=e.data.data.user.account):-1===e.data.status&&t.goBack()}).catch(function(e){t.$store.commit("setLoading",!1);var a="";a=e.response?"请求服务器失败":e.request?"等待回复失败":"系统解析出错",t.$Message.error({content:a,top:30,duration:3})})},autoSetLayoutMainHeight:function(){var t=document.querySelector(".layout-menu-left"),e=document.querySelector(".layout-content"),a=document.querySelector(".layout-header"),n=document.querySelector(".layout-copy");t.style.height="auto";var o=document.body.clientHeight;t.offsetHeight<o&&(t.style.height=o-3+"px"),e.style.height=o-n.offsetHeight-a.offsetHeight-parseInt(window.getComputedStyle(document.querySelector(".layout-content"),null).getPropertyValue("margin-bottom"))-parseInt(window.getComputedStyle(document.querySelector(".layout-content"),null).getPropertyValue("margin-top"))-3+"px"},clickDinner:function(t,e){if(0==e)return!1;t.currentTarget.classList.contains("choosen")?t.currentTarget.classList.remove("choosen"):t.currentTarget.classList.add("choosen"),this.canICancel=document.querySelectorAll(".choosen").length},handleCancelDinner:function(t){this.$store.commit("setLoading",!0);var e=this;this.$ajax.post("/api/order/multicancel/",{order_id:t,token:e.$store.state.token}).then(function(t){if(1===t.data.status)return e.$router.replace({path:"result",query:{result:"success",type:"cancel",message:""}}),0;if(-3===t.data.status){var a="";for(var n in t.data.data)a+=t.data.data[n].message+"<br>";return e.$router.replace({path:"result",query:{result:"fail",type:"cancel",message:a}}),0}if(-4===t.data.status){for(var o="",s=0;s<t.data.data.length;s++)o+="<p>"+t.data.data[s].message+"</p>";return e.$router.replace({path:"result",query:{result:"notice",type:"cancel",message:o}}),0}-1===t.data.status&&e.goBack(),e.$store.commit("setLoading",!1),this.$Message.success({content:t.data.message,top:30,duration:3})}).catch(function(t){e.$store.commit("setLoading",!1);var a="";a=t.response?"请求服务器失败":t.request?"等待回复失败":"系统解析出错",e.$Message.error({content:a,top:30,duration:3})})},cancelDinner:function(){for(var t=this,e=[],a="<p>是否确定退订</p>",n=0;n<document.querySelectorAll(".choosen").length;n++)a+="<p>"+document.querySelectorAll(".choosen")[n].getAttribute("data-date")+document.querySelectorAll(".choosen")[n].getAttribute("data-name")+"</p>",e.push(document.querySelectorAll(".choosen")[n].getAttribute("id"));if(!e)return!1;this.$Modal.confirm({title:"退餐提示",content:a,onOk:function(){t.handleCancelDinner(e.join(","))}})}}}},62:function(t,e){},67:function(t,e,a){t.exports={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"layout cancel"},[t.$store.state.loading?a("Spin"