|
@ -71,7 +71,19 @@
|
|
|
var nums = 120;
|
|
|
|
|
|
checkUserAgent();
|
|
|
|
|
|
function queryInit() {
|
|
|
var agentName = localStorage.getItem(agentName1)
|
|
|
if(agentName) {
|
|
|
try{
|
|
|
agentName = JSON.parse(agentName)
|
|
|
if(agentName.name) {
|
|
|
$("#name").val(agentName.name)
|
|
|
}
|
|
|
}catch(e){
|
|
|
//TODO handle the exception
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
function commit(){
|
|
|
|
|
|
var name = $("#name").val();
|
|
@ -80,12 +92,13 @@
|
|
|
var userAgent = window.localStorage.getItem(agentName);
|
|
|
if(userAgent) {
|
|
|
userAgent = JSON.parse(userAgent)
|
|
|
var isValid = validate({
|
|
|
var data = {
|
|
|
patient: userAgent.uid,
|
|
|
name: name,
|
|
|
idcard: idcard,
|
|
|
ssc: ssc
|
|
|
})
|
|
|
}
|
|
|
var isValid = validate(data)
|
|
|
if(isValid) {
|
|
|
dd.showModal()
|
|
|
sendPost("/weixin/savePatientInfo", data, "json", "post", submitFailed, submitSuccess);
|