1 line
5.4 KiB
JavaScript
1 line
5.4 KiB
JavaScript
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/target/target"],{"11b3":function(t,e,n){},"637b":function(t,e,n){"use strict";(function(t){n("0d2f");i(n("66fd"));var e=i(n("eab0"));function i(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=n,t(e.default)}).call(this,n("543d")["createPage"])},"7e3e":function(t,e,n){"use strict";var i=n("11b3"),r=n.n(i);r.a},"7ef1":function(t,e,n){"use strict";var i;n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return i}));var r=function(){var t=this,e=t.$createElement,n=(t._self._c,t.lineData&&t.lineData.categories.length&&t.handTrue?{enableScroll:!0,xAxis:{scrollShow:!1,itemCount:3}}:null),i=t.userInfo.totalweight?Math.abs(t.userInfo.totalweight):null,r=Number(t.userInfo.totalweight);t.$mp.data=Object.assign({},{$root:{a0:n,g0:i,m0:r}})},a=[]},a2bc:function(t,e,n){"use strict";n.r(e);var i=n("d33a"),r=n.n(i);for(var a in i)"default"!==a&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=r.a},d33a:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("26cb");function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var s=function(){n.e("components/userLogin").then(function(){return resolve(n("b06c"))}.bind(null,n)).catch(n.oe)},c=function(){n.e("components/target/targetWeight").then(function(){return resolve(n("a0f7"))}.bind(null,n)).catch(n.oe)},u=function(){n.e("components/target/firstweight").then(function(){return resolve(n("c4e2"))}.bind(null,n)).catch(n.oe)},l=function(){n.e("components/target/manuaRecord").then(function(){return resolve(n("d95c"))}.bind(null,n)).catch(n.oe)},h=function(){Promise.all([n.e("common/vendor"),n.e("uni_modules/qiun-data-charts/components/qiun-data-charts")]).then(function(){return resolve(n("b9b4"))}.bind(null,n)).catch(n.oe)},f={components:{targetWeight:c,firstweight:u,manuaRecord:l,userPopup:s,qiunDataCharts:h},computed:a(a({},(0,i.mapState)(["user","Trend"])),{},{userInfo:function(){return this.user},endDate:function(){return this.$tools.getDate("start")},startDate:function(){return this.$tools.GetDateStr(-90)}}),onShow:function(){var e=this;this.token=t.getStorageSync("token"),this.active=0,this.startTime="",this.endTime="",e.getList(this.startDate,this.endDate)},methods:{getList:function(e,n){console.log("fanhui",e,n);var i=this;i.$model.getTrendList({familyid:t.getStorageSync("familyid"),starttime:e,endtime:n}).then((function(t){if(t){for(var e=0;e<i.weightList.length;e++)i.weightList[e].Line=t[i.weightList[e].key];i.showbox(0)}}))},showbox:function(t){var e=this;e.handTrue=!1,this.$nextTick((function(){e.handTrue=!0,e.lineData=e.weightList[t].Line})),e.active1=t},handStartTimeH:function(t){var e=this;if(this.endTime){if(Date.parse(t.target.value)>Date.parse(this.endTime))return void this.$tools.msg("请选择正确的时间")}else if(Date.parse(t.target.value)>Date.parse(this.endDate))return void this.$tools.msg("请选择正确的时间");this.startTime=t.target.value;var n=e.endTime?e.endTime:e.endDate;this.getList(e.startTime,n)},handEndTimeH:function(t){var e=this;if(this.startTime){if(Date.parse(t.target.value)<Date.parse(this.startTime))return void this.$tools.msg("请选择正确的时间")}else if(Date.parse(t.target.value)<Date.parse(this.startDate))return void this.$tools.msg("请选择正确的时间");this.endTime=t.target.value;var n=e.startTime?e.startTime:e.startDate;this.getList(n,this.endTime)},handAllTime:function(e){var n=this;t.getStorageSync("token")?(this.active=e,this.startTime=0==e?n.$tools.GetDateStr(-90):n.$tools.GetDateStr(-180),this.getList(this.startTime,this.endDate)):this.$store.commit("changeUserLogin",!0)},handleClick:function(e){t.getStorageSync("token")?0!=e?1!=e?2!=e||this.$store.commit("changeRecord",!0):this.$store.commit("changeFirst",!0):this.$store.commit("changeTarget",!0):this.$store.commit("changeUserLogin",!0)}},data:function(){return{lineData:null,type:null,active1:0,weight:"",startTime:"",endTime:"",active:0,token:null,handTrue:!0,weightList:[{title:"体重",key:"weight",showCon:!1,Line:{categories:[],series:[{color:"#fb7b92",name:"体重",data:[]}]}},{title:"BMI",key:"bmi",Line:{categories:[],series:[{color:"#6bb0fe",name:"bmi",data:[]}]}},{title:"肌肉",key:"muscle",showCon:!1,Line:{categories:[],series:[{color:"#ff9f40",name:"肌肉率",data:[]}]}},{title:"脂肪",key:"fat_r",showCon:!1,Line:{categories:[],series:[{color:"#3fcba7",name:"脂肪率",data:[]}]}}]}}};e.default=f}).call(this,n("543d")["default"])},eab0:function(t,e,n){"use strict";n.r(e);var i=n("7ef1"),r=n("a2bc");for(var a in r)"default"!==a&&function(t){n.d(e,t,(function(){return r[t]}))}(a);n("7e3e");var o,s=n("f0c5"),c=Object(s["a"])(r["default"],i["b"],i["c"],!1,null,"633c30bd",null,!1,i["a"],o);e["default"]=c.exports}},[["637b","common/runtime","common/vendor"]]]); |