최초 세팅
This commit is contained in:
64
src/main/resources/static/js/mobile/medical/selectMedical.js
Normal file
64
src/main/resources/static/js/mobile/medical/selectMedical.js
Normal file
@@ -0,0 +1,64 @@
|
||||
/****************************************************************************
|
||||
* 시술 정보 조회
|
||||
****************************************************************************/
|
||||
function fn_selectMedical(){
|
||||
let formData = new FormData();
|
||||
formData.append("muAppContentId", muAppContentId)
|
||||
$.ajax({
|
||||
url: encodeURI('/mobilemedical/selectMedical.do'),
|
||||
data: formData,
|
||||
dataType: "json",
|
||||
processData: false,
|
||||
contentType: false,
|
||||
type: 'POST',
|
||||
async: false,
|
||||
success: function(data){
|
||||
if('0'==data.msgCode){
|
||||
if(0 < data.rows.length){
|
||||
const content = data.rows[0];
|
||||
$('.img_box').append(`<img style="width: 100%; height: 100%;" src="${decodeURI(content.filePath)}" alt="${content.title}">`);
|
||||
$('.text_box').append(`<p>${content.title}</p>`);
|
||||
$('.content_box div').append(content.detail);
|
||||
$('.content_box .article').append(content.content);
|
||||
}
|
||||
}
|
||||
else if(data.msgCode=='-1'){
|
||||
modalEvent.warning("조회 오류", data.msgDesc);
|
||||
}
|
||||
else{
|
||||
modalEvent.danger("조회 오류", "조회 중 오류가 발생하였습니다. 잠시후 다시시도하십시오.");
|
||||
}
|
||||
},
|
||||
error : function(xhr, status, error) {
|
||||
modalEvent.danger("조회 오류", "조회 중 오류가 발생하였습니다. 잠시후 다시시도하십시오.");
|
||||
},
|
||||
beforeSend:function(){
|
||||
|
||||
},
|
||||
complete:function(){
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* 페이지 init
|
||||
****************************************************************************/
|
||||
function fn_pageInit(){
|
||||
fn_selectMedical();
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* 페이지 event
|
||||
****************************************************************************/
|
||||
function fn_pageEvent(){
|
||||
}
|
||||
|
||||
$(function(){
|
||||
// 페이지 init
|
||||
fn_pageInit();
|
||||
|
||||
// 페이지 event
|
||||
fn_pageEvent();
|
||||
});
|
||||
Reference in New Issue
Block a user