1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- function queryInit() {
- // 验证居民信息是否完善
- checkBaseInfo()
- }
- ;(function() {
-
- checkUserAgent()
-
- 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;
- if(vm.baseInfo.idcard && vm.baseInfo.idcard.indexOf("WLYY")>-1) {
- vm.baseInfo.idcard = ""
- }
- 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";
- },
- updateIdcard:function() {
- var vm = this;
- window.location.href = "update-idcard.html?idcard="+(vm.baseInfo.idcard || "");
- }
- },
- })
- })()
|