1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- $(function() {
- $("#create_patient_manage_btn").click(function() {
- if ($("#create_patient_manage_btn").prop("disabled") == true) {
- return;
- }
- var postData = {
- app_type: 1
- }
- postRequest("/org/app/create/submit", postData, doSuccess, doFail);
-
- function doSuccess(res) {
- if (res.state == 0) {
- serverErrorMsg(res);
- return;
- }
- layer.msg("开通成功");
- var patient_manage_address = "http://jk.kuyicloud.com";
- $("#create_patient_manage_btn").attr("disabled", true);
- $("#create_patient_manage_btn").addClass("btn_enter");
- $("#create_patient_manage_btn").removeClass("btn_primary");
- $("#create_patient_manage_btn").hide();
- $("#patient_manage_link").attr("href", patient_manage_address);
- $("#patient_manage_link").addClass("btn_primary");
- $("#patient_manage_link").removeClass("btn_enter");
- $("#patient_manage_link").show();
- }
- });
-
- $("#create_dialysis_manage_btn").click(function() {
- if ($("#create_dialysis_manage_btn").prop("disabled") == true) {
- return;
- }
- var postData = {
- app_type: 3
- }
- postRequest("/org/app/create/submit", postData, doSuccess, doFail);
-
- function doSuccess(res) {
- if (res.state == 0) {
- serverErrorMsg(res);
- return;
- }
- layer.msg("开通成功");
- var dialysis_manage_address = "http://xt.test.sgjyun.com";
- $("#create_dialysis_manage_btn").attr("disabled", true);
- $("#create_dialysis_manage_btn").addClass("btn_enter");
- $("#create_dialysis_manage_btn").removeClass("btn_primary");
- $("#create_dialysis_manage_btn").hide();
- $("#dialysis_manage_link").attr("href", dialysis_manage_address);
- $("#dialysis_manage_link").addClass("btn_primary");
- $("#dialysis_manage_link").removeClass("btn_enter");
- $("#dialysis_manage_link").show();
- }
- });
- });
-
- function doFail(res) {
- serverErrorMsg(res);
- }
|