- 电子药箱: 药品库存管理 + 手动录入 + 今日用药打卡 - 药品百科: 搜索 + 分类筛选 + 20种药品静态数据 - 惠教中心: 4条药品使用指南课程 - 我的: 家庭成员信息管理 - 自定义TabBar + navigation-bar组件 - SVG药品分类插图
1 line
1.3 KiB
JavaScript
1 line
1.3 KiB
JavaScript
"use strict";Component({properties:{sdkInstance:{type:Object,value:null},IsUseDarkTheme:{type:Boolean,value:null},data:{type:Object,value:null},status:{type:Number,value:null},visible:{type:Boolean,value:null},type:{type:String,value:null}},data:{regulation:!1},lifetimes:{detached:function(){"function"==typeof this.unsub&&this.unsub(),this.unsub=null}},observers:{sdkInstance:function(t){t&&(this.store=t.store,this.visibleData=!1,this.typeData="")},"visible,type":function(t,e){t===this.visibleData&&e===this.typeData||(this.visibleData=t,this.typeData=e,t&&"detail"===e?this.openAwardDetailDrawer():this.selectComponent("#lottery-drawer").data.flag&&this.selectComponent("#lottery-drawer").hideFrame())}},methods:{openAwardDetailDrawer:function(){this.selectComponent("#lottery-drawer").showFrame()},closeAwardDrawer:function(){this.selectComponent("#lottery-drawer").hideFrame(),this.myCancel()},myCancel:function(){(this.store.get("AwardInfo")||{}).visible&&this.store.set("AwardInfo",{visible:!1,currentId:null}),this.typeData=""},openRegulation:function(){this.setData({regulation:!0})},closeRegulation:function(){this.setData({regulation:!1})},attendLottery:function(){var t,e;null!==(t=this.data)&&void 0!==t&&null!==(e=t.data)&&void 0!==e&&e.UndoAwardCondition?this.closeAwardDrawer():this.triggerEvent("attendLottery",{lotteryId:this.data.data.ID})}}}); |