(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageTwo/me/history"],{"0dc8":function(t,e,n){"use strict";n.r(e);var r=n("d6f2"),i=n.n(r);for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e["default"]=i.a},1136:function(t,e,n){"use strict";n.r(e);var r=n("aa1a"),i=n("0dc8");for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);n("cd99");var a,s=n("f0c5"),c=Object(s["a"])(i["default"],r["b"],r["c"],!1,null,"9104f0fc",null,!1,r["a"],a);e["default"]=c.exports},"699d":function(t,e,n){},7185:function(t,e,n){"use strict";(function(t){n("e568");r(n("66fd"));var e=r(n("1136"));function r(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=n,t(e.default)}).call(this,n("543d")["createPage"])},aa1a:function(t,e,n){"use strict";var r;n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return r}));var i=function(){var t=this,e=t.$createElement;t._self._c},o=[]},cd99:function(t,e,n){"use strict";var r=n("699d"),i=n.n(r);i.a},d6f2:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("26cb");function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(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/mark-slide-list/mark-slide-list").then(function(){return resolve(n("c44f"))}.bind(null,n)).catch(n.oe)},c={components:{delectList:s},computed:o({},(0,r.mapState)(["user","appTheme"])),data:function(){return{buttonList:[{title:"删除",background:"#ff3b32"}],list:["测量时间","体重","BMI","操作"],ranklist:[],page:1,lastPage:1,type:null,id:null,startX:0,endX:0}},onLoad:function(){var e=this;t.setNavigationBarColor({frontColor:"#ffffff",backgroundColor:e.appTheme}),e.getList(1)},onReachBottom:function(){console.log("this.lastPage",this.lastPage),!this.lastPage||this.page>=this.lastPage?t.showToast({title:"没有更多数据！",icon:"none"}):(this.page++,this.getList(this.page))},methods:{changeDelete:function(e){var n=this;t.showModal({title:"友情提示",content:"是否删除当前测量记录？",success:function(t){t.confirm?n.$model.gethistorydelete({id:e.id}).then((function(t){0==t.code?(n.ranklist.splice(n.ranklist.findIndex((function(t){return t.id===e.id})),1),n.$store.dispatch("getUserInfo",{familyid:n.user.familyid}),n.$store.dispatch("getResult",{birthday:n.user.birthday,familyid:n.user.familyid,height:n.user.height,sex:n.user.sex}),n.$tools.msg("删除成功")):n.$tools.msg(t.message)})):t.cancel&&n.$tools.msg("您已取消操作！")}})},getList:function(t){var e=this,n=this;n.$model.getHistoryList({familyId:n.user.familyid,pageNo:t,pageSize:10}).then((function(t){console.log("历史记录",t),0==t.code&&(t.data.rows.forEach((function(t){t.slide_x=0})),e.ranklist=e.ranklist.concat(t.data.rows),e.lastPage=t.data.totalpage)}))},touchStart:function(t){this.startX=t.touches[0].clientX},touchEnd:function(t){console.log("2",t);var e=t.currentTarget;this.endX=t.changedTouches[0].clientX,0==e.dataset.type&&this.startX-this.endX>30&&(this.restSlide(),e.dataset.type=1),1==e.dataset.type&&this.startX-this.endX<-30&&(this.restSlide(),e.dataset.type=0),this.startX=0,this.endX=0},checkSlide:function(){for(var t=document.querySelectorAll(".list"),e=0;e<t.length;e++)if(1==t[e].dataset.type)return!0;return!1},restSlide:function(){for(var t=document.querySelectorAll("list"),e=0;e<t.length;e++)t[e].dataset.type=0}}};e.default=c}).call(this,n("543d")["default"])}},[["7185","common/runtime","common/vendor"]]]);