(function() { var dd = dialog({ contentType: 'load', skin: 'bk-popup', content: '保存中...' }); var d = dialog({ contentType: 'load', skin: 'bk-popup' }); new Vue({ el: "#app", data: { baseInfo:{} }, mounted:function(){ this.initData(); }, methods: { initData:function(){ var vm = this; d.show(); sendPost("/patient/baseinfo", {}, 'JSON', 'post', this.queryFailed, function(res) { vm.baseInfo = res.data; d.close(); }) }, queryFailed:function(res){ d.close(); if(res && res.msg) { dialog({ contentType: 'tipsbox', bottom: true, skin: 'bk-popup', content: res.msg }).show(); } else { dialog({ contentType: 'tipsbox', bottom: true, skin: 'bk-popup', content: '加载失败' }).show(); } }, updateSsc:function(){ var ssc = this.baseInfo.ssc; var userAgent = window.localStorage.getItem(agentName); var jsonstr = $.parseJSON(userAgent); var openid = jsonstr.openid; window.location.href = "update-ssc.html?openid=" + openid + "&ssc="+ ssc + "&1=1"; } }, }) })()