chunk-75ae125c.e2d7a3c3.js 6.1 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-75ae125c"],{"16f4":function(e,t,r){},"2de2":function(e,t,r){"use strict";r.d(t,"d",(function(){return n})),r.d(t,"c",(function(){return o})),r.d(t,"b",(function(){return c})),r.d(t,"e",(function(){return a})),r.d(t,"a",(function(){return i}));var n="/duoduo-service/setup-service/",o="/duoduo-service/object-service/",c="/duoduo-service/duoduoenv-service/",a="/duoduo-service/",i="/duoduo-service/custom-service/"},"8a22":function(e,t,r){"use strict";r("16f4")},9151:function(e,t,r){"use strict";r.d(t,"h",(function(){return a})),r.d(t,"g",(function(){return i})),r.d(t,"i",(function(){return u})),r.d(t,"f",(function(){return s})),r.d(t,"a",(function(){return l})),r.d(t,"d",(function(){return d})),r.d(t,"c",(function(){return b})),r.d(t,"b",(function(){return g})),r.d(t,"j",(function(){return p})),r.d(t,"e",(function(){return f})),r("99af");var n=r("59b9"),o=r("ba72"),c=r("2de2"),a=function(e){return Object(n.b)().request("".concat(c.b,"userIntegral/queryUserMessage?").concat(e),o.b.GET,void 0,o.a.json)},i=function(){return Object(n.b)().request("".concat(c.b,"userPortrait/portraitTemp/queryPortraitTempUserTotal"),o.b.GET,void 0,o.a.json)},u=function(){return Object(n.b)().request("".concat(c.b,"userPortrait/portraitLight/queryTotalPortraitLight"),o.b.GET,void 0,o.a.json)},s=function(e){return Object(n.b)().request("".concat(c.b,"userPortrait/portraitTemp/queryPortraitTempUserDetail"),o.b.POST,e,o.a.json)},l=function(e){return Object(n.b)().request("".concat(c.b,"custom/getSeasonBySeasonDate?").concat(e),o.b.GET,void 0,o.a.json)},d=function(e){return Object(n.b)().request("".concat(c.b,"userPortrait/portraitLight/queryPortraitLightUser"),o.b.POST,e,o.a.json)},b=function(e){return Object(n.b)().request("".concat(c.b,"userIntegral/query"),o.b.POST,e,o.a.json)},g=function(e){return Object(n.b)().request("".concat(c.b,"custom/feedback/light/query"),o.b.POST,e,o.a.json)},p=function(e){return Object(n.b)().request("".concat(c.b,"custom/feedbackQuery"),o.b.POST,e,o.a.json)},f=function(){return Object(n.b)().request("".concat(c.b,"userPortrait/queryPortraitModuleList"),o.b.GET,void 0,o.a.json)}},a89b:function(e,t,r){"use strict";function n(e){return Object(o.pushScopeId)("data-v-0c5c3c8e"),e=e(),Object(o.popScopeId)(),e}r.r(t);var o=r("7a23"),c={class:"portrait-top"},a=n((function(){return Object(o.createElementVNode)("div",{class:"portrait-title"},"节能评分",-1)})),i=n((function(){return Object(o.createElementVNode)("span",null,"我的节能",-1)})),u={class:"page-box portrait-content"},s=n((function(){return Object(o.createElementVNode)("span",null,"空调调节",-1)})),l=["src"],d=n((function(){return Object(o.createElementVNode)("span",null,"开关照明",-1)})),b=["src"];r("4160"),r("c975"),r("159b");var g=r("5530"),p=r("6c02"),f=r("0613"),j=r("9151"),m=r("d257"),O=r("93da"),y=Object(o.defineComponent)({components:{},setup:function(){var e=Object(p.d)(),t=[{id:"airConditioner",name:"空调调节",isShow:!0,num:"--",unit:"",img:Object(m.y)("page-portrait","portrait_air.svg")},{id:"light",name:"开关照明",isShow:!0,num:"--",unit:"",img:Object(m.y)("page-portrait","portrait_lamp.svg")}],r=Object(o.reactive)({parseImgUrl:m.y,user:f.a.state.user,energyData:{intergral:0,level:0,totalPoints:0},energyArr:t,goEnergyDetail:function(t){e.push({path:"/energy-savig",query:{type:t}})},dealNumToPoint:function(e,t){return isNaN(e)?"--":e&&1e4<=e?(e=Math.floor(e/1e4*10)/10,r.energyArr[t].unit="万",e||"--"):(r.energyArr[t].unit="",e)},queryTotalIntegral:function(){var e={date:Object(m.b)(""),month:Object(m.n)()};e=Object(m.B)(e);Object(j.h)(e).then((function(e){"success"===e.result&&(r.energyData=e)}))},queryPortraitTempUserTotal:function(){Object(j.g)().then((function(e){"success"===e.result?(e=null!=(e=null==e?void 0:e.data)?e:null,r.energyArr[0].num=e?r.dealNumToPoint(e.adjustDownNum+e.adjustUpNum,0):"--"):r.energyArr[0].num="--"}))},queryTotalPortraitLight:function(){Object(j.i)().then((function(e){"success"===e.result?(e=null!=(e=null==e?void 0:e.data)?e:null,r.energyArr[1].num=e?r.dealNumToPoint(e.totalNum,1):"--"):r.energyArr[1].num="--"}))},queryPortraitModule:function(){Object(j.e)().then((function(e){var t=null!=(e=null==e?void 0:e.data)?e:[];r.energyArr.forEach((function(e){-1<t.indexOf(e.id)?e.isshow=!0:e.isshow=!1})),e={airConditioner:!1,light:!1};-1<t.indexOf("airConditioner")?e.airConditioner=!0:e.airConditioner=!1,-1<t.indexOf("light")?e.light=!0:e.light=!1,Object(m.C)("portraitModule",e),f.a.commit(O.a.SET_AIR,e.airConditioner),f.a.commit(O.a.SET_LIGHT,e.light)}))}});return Object(o.onMounted)((function(){r.queryPortraitModule(),r.queryTotalIntegral(),r.queryPortraitTempUserTotal(),r.queryTotalPortraitLight()})),Object(g.a)({},Object(o.toRefs)(r))}}),v=(r("8a22"),r("6b0d"));r=r.n(v);t.default=r()(y,[["render",function(e,t,r,n,g,p){return Object(o.openBlock)(),Object(o.createElementBlock)(o.Fragment,null,[Object(o.createElementVNode)("div",c,[a,Object(o.createElementVNode)("div",{class:"portrait-count",onClick:t[0]||(t[0]=function(t){return e.goEnergyDetail("energy")})},[i,Object(o.createElementVNode)("span",null,Object(o.toDisplayString)(e.energyData.totalPoints||0==e.energyData.totalPoints?e.energyData.totalPoints:"--"),1)])]),Object(o.createElementVNode)("div",u,[e.energyArr[0].isshow?(Object(o.openBlock)(),Object(o.createElementBlock)("div",{key:0,class:"box",onClick:t[1]||(t[1]=function(t){return e.goEnergyDetail("air")})},[s,Object(o.createElementVNode)("span",null,Object(o.toDisplayString)(e.energyArr[0].num),1),Object(o.createElementVNode)("img",{src:e.parseImgUrl("page-portrait","portrait_air.svg"),alt:""},null,8,l)])):Object(o.createCommentVNode)("",!0),e.energyArr[1].isshow?(Object(o.openBlock)(),Object(o.createElementBlock)("div",{key:1,class:"box",onClick:t[2]||(t[2]=function(t){return e.goEnergyDetail("lamp")})},[d,Object(o.createElementVNode)("span",null,Object(o.toDisplayString)(e.energyArr[1].num),1),Object(o.createElementVNode)("img",{class:"temp-img",src:e.parseImgUrl("page-portrait","portrait_lamp.svg"),alt:""},null,8,b)])):Object(o.createCommentVNode)("",!0)])],64)}],["__scopeId","data-v-0c5c3c8e"]])}}]);