1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- (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";
- }
- },
- })
- })()
|