123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- var $body = $('.my-main'),
- patiCode,
- self;
- mui.plusReady(function(){
- self = plus.webview.currentWebview();
- patiCode = self.patiCode;
-
- // plus.nativeUI.showWaiting()
- // sendPost("",{},function(){
- // plus.nativeUI.closeWaiting()
- // mui.toast("请求失败")
- // }, function(res){
- //
- // })
- bindEvent()
- })
- function bindEvent(){
- //头部展示
- showActive()
- mui('.my-nav').scroll({
- scrollY: false, //是否竖向滚动
- scrollX: true, //是否横向滚动
- })
- //切换类型
- $('.j-change').on('tap',function(){
- var $this = $(this)
- if(!$this.hasClass('active')){
- $this.addClass('active').siblings().removeClass('active')
- }
- })
- //展开数据
- $('.cj-flex-1.icon').on('tap',function(){
- var $this = $(this).parent()
- if($this.hasClass('active')){
- $this.removeClass('active')
- }else{
- $this.addClass('active')
- }
- })
- //接种详情
- $('.j-record').on('tap',function(){
- var $this = $(this)
- mui.openWindow({
- id: "jiezhongjilu",
- url: "jiezhongjilu.html",
- waiting:{autoShow:false},
- extras: {
-
- }
- })
- })
- }
- //优先展示
- function showActive(route){
- var $list = $('.j-change');
- if(route){
- for(var i=0;i<$list.length;i++){
- if($list.eq(i).attr('data-id') == route){
- $list.eq(i).addClass('active')
- return
- }
- }
- }else{
- $list.eq(0).addClass('active')
- }
- }
|