(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageTwo/me/history"],{"0a35":function(t,e,n){"use strict";n.r(e);var i=n("40f6"),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e["default"]=a.a},"27ef":function(t,e,n){"use strict";n.r(e);var i=n("7adf"),a=n("0a35");for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);n("5a4b");var o=n("f0c5"),s=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,"7bde6597",null,!1,i["a"],void 0);e["default"]=s.exports},"29d0":function(t,e,n){"use strict";(function(t,e){var i=n("4ea4");n("6808");i(n("66fd"));var a=i(n("27ef"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(a.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},"40f6":function(t,e,n){"use strict";(function(t){var i=n("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n("9523")),r=n("26cb");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}var s={components:{delectList:function(){n.e("components/mark-slide-list/mark-slide-list").then(function(){return resolve(n("8685"))}.bind(null,n)).catch(n.oe)}},computed:function(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,a.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}({},(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(){t.setNavigationBarColor({frontColor:"#ffffff",backgroundColor:this.appTheme}),this.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;this.$model.getHistoryList({familyId:this.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=s}).call(this,n("543d")["default"])},"5a4b":function(t,e,n){"use strict";var i=n("fb45"),a=n.n(i);a.a},"7adf":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){}));var i=function(){var t=this.$createElement,e=(this._self._c,this.ranklist.length);this.$mp.data=Object.assign({},{$root:{g0:e}})},a=[]},fb45:function(t,e,n){}},[["29d0","common/runtime","common/vendor"]]]);