1 line
5.4 KiB
JavaScript
1 line
5.4 KiB
JavaScript
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/target/target"],{6425:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){}));var i=function(){var t=this.$createElement,e=(this._self._c,this.lineData&&this.lineData.categories.length&&this.handTrue),n=e?{enableScroll:!0,xAxis:{scrollShow:!1,itemCount:3}}:null,i=this.userInfo.totalweight?Math.abs(this.userInfo.totalweight):null,r=Number(this.userInfo.totalweight);this.$mp.data=Object.assign({},{$root:{g0:e,a0:n,g1:i,m0:r}})},r=[]},a2d6:function(t,e,n){"use strict";var i=n("cc26"),r=n.n(i);r.a},be8e:function(t,e,n){"use strict";n.r(e);var i=n("6425"),r=n("fb77");for(var a in r)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(a);n("a2d6");var o=n("828b"),s=Object(o["a"])(r["default"],i["b"],i["c"],!1,null,"30ac29c6",null,!1,i["a"],void 0);e["default"]=s.exports},c63f:function(t,e,n){"use strict";(function(t){var i=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n("7ca3")),a=n("8f59");function o(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 s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){(0,r.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var c={components:{targetWeight:function(){n.e("components/target/targetWeight").then(function(){return resolve(n("a6ed"))}.bind(null,n)).catch(n.oe)},firstweight:function(){n.e("components/target/firstweight").then(function(){return resolve(n("10f4"))}.bind(null,n)).catch(n.oe)},manuaRecord:function(){n.e("components/target/manuaRecord").then(function(){return resolve(n("29e9"))}.bind(null,n)).catch(n.oe)},userPopup:function(){n.e("components/userLogin").then(function(){return resolve(n("fbff"))}.bind(null,n)).catch(n.oe)},qiunDataCharts:function(){Promise.all([n.e("common/vendor"),n.e("uni_modules/qiun-data-charts/components/qiun-data-charts")]).then(function(){return resolve(n("35cf"))}.bind(null,n)).catch(n.oe)}},computed:s(s({},(0,a.mapState)(["user","Trend","appTheme"])),{},{userInfo:function(){return this.user},endDate:function(){return this.$tools.getDate("start")},startDate:function(){return this.$tools.GetDateStr(-90)}}),onLoad:function(){t.setNavigationBarColor({frontColor:"#ffffff",backgroundColor:this.appTheme})},onShow:function(){this.token=t.getStorageSync("token"),this.active=0,this.startTime="",this.endTime="",this.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){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 e=this.endTime?this.endTime:this.endDate;this.getList(this.startTime,e)},handEndTimeH:function(t){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 e=this.startTime?this.startTime:this.startDate;this.getList(e,this.endTime)},handAllTime:function(e){t.getStorageSync("token")?(this.active=e,this.startTime=0==e?this.$tools.GetDateStr(-90):this.$tools.GetDateStr(-180),this.getList(this.startTime,this.endDate)):t.redirectTo({url:"/pageTwo/login/login"})},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):t.redirectTo({url:"/pageTwo/login/login"})}},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=c}).call(this,n("df3c")["default"])},cc26:function(t,e,n){},f457:function(t,e,n){"use strict";(function(t,e){var i=n("47a9");n("6846");i(n("3240"));var r=i(n("be8e"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(r.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},fb77:function(t,e,n){"use strict";n.r(e);var i=n("c63f"),r=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=r.a}},[["f457","common/runtime","common/vendor"]]]); |