아이슬라이드 기능 좌우 이동되도록 적용

dev_bert
jonghwan76 3 years ago
parent f351917f62
commit 985fd41993

@ -9,9 +9,12 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="4099ff18-820b-4e43-a4c5-6159d58dccc4" name="변경" comment="1. D-Day 없을경우 링크 되도록 수정&#10;2. 간식기록제품 홈정보 표시오류 수정">
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<list default="true" id="4099ff18-820b-4e43-a4c5-6159d58dccc4" name="변경" comment="기록정보 홈화면 표시오류 수정-2">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/backoffice/m/index/M_IndexController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/backoffice/m/index/M_IndexController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/webapp/WEB-INF/views/ftl/m/index/index.ftl" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/WEB-INF/views/ftl/m/index/index.ftl" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/webapp/WEB-INF/views/ftl/m/index/index_20220409.ftl" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/webapp/WEB-INF/views/ftl/m/index/index_20220426.ftl" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/WEB-INF/views/ftl/m/index/index_20220514.ftl" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -57,7 +60,7 @@
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/src/main/webapp/WEB-INF/views/ftl/m/login" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/src/main/webapp/WEB-INF/views/ftl/m/index" />
<property name="project.structure.last.edited" value="프로젝트" />
<property name="project.structure.proportion" value="0.0" />
<property name="project.structure.side.proportion" value="0.0" />
@ -66,9 +69,9 @@
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="C:\project\bf\src\main\webapp\WEB-INF\views\ftl\m\index" />
<recent name="C:\project\bf\src\main\webapp\WEB-INF\views\ftl\m\login" />
<recent name="C:\project\bf\src\main\webapp\WEB-INF\views\ftl\m\include" />
<recent name="C:\project\bf\src\main\webapp\WEB-INF\views\ftl\m\index" />
<recent name="C:\project\bf\src\main\java\com\backoffice\m\tutorial" />
<recent name="C:\project\bf\src\main\java\com\backoffice\m" />
</key>
@ -608,6 +611,17 @@
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
<component name="Vcs.Log.History.Properties">
<option name="COLUMN_ID_ORDER">
<list>
<option value="Default.Root" />
<option value="Default.Author" />
<option value="Default.Date" />
<option value="Default.Subject" />
<option value="Space.CommitStatus" />
</list>
</option>
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>

@ -134,7 +134,6 @@ public class M_IndexController extends AbstractControllerManager{
String redirect_url = "m/index/index";
DataMap rm_agent = logAgent.parse(paramMap, request);
String agent = RenaStringUtil.getData(rm_agent, "agent");
// String smc_index = RenaStringUtil.getData(paramMap, "smc_index") == "" ? "0":RenaStringUtil.getData(paramMap, "smc_index");
if(RenaStringUtil.isNullOrEmpty(agent) == false) {
if(agent.contains("iOS") || agent.contains("iPhone")) {
@ -252,6 +251,119 @@ public class M_IndexController extends AbstractControllerManager{
}
/**
* ajax - snut97
* @param model
* @param request
* @param response
* @param redirectAttributes
* @return
*/
@RequestMapping(value="ajax_index", method=RequestMethod.GET)
@ResponseBody
public DataMap ajax_index(@ModelAttribute("model") ModelMap model, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
DataMap paramMap = gmUtil.getDataMapFromRequest(request);
DataMap result = new DataMap();
result.put("RESULT", ConstantResultCode.RESULT_INIT);
result.put("URL_ROOT", ConstantSystem.URL_BASE);
try {
boolean is_login = gmUtil.setSessionForMobileMember(request, paramMap);
if(is_login == false) {
ConstantResultCode.putResultCode(result, false, ConstantResultCode.RESULT_SESSION_OUT);
}else{
String base_dt = DateUtil.getDateString(DateUtil.F_YYYYMMDDDash);
paramMap.put("base_dt", base_dt);
paramMap.put("cg_cd", "BF_RECORD_CATEGORY");
// 아이
DataMap rm_child = init_child(model, request, paramMap);
if(rm_child != null) {
// 선택아이 성장 정보 조회
DataMap rm_last_h = init_child_info(model, request, paramMap, "Y", "N");
result.put("rm_last_h", rm_last_h);
DataMap rm_last_w = init_child_info(model, request, paramMap, "N", "Y");
result.put("rm_last_w", rm_last_w);
//기록 카테고리 목록 조회
List<DataMap> category_list = indexBO.select_code_list(paramMap);
result.put("category_list", category_list);
// 오늘 영양입력 조회
List<DataMap> lm_nutrition = bf_daily_nutritionBO.select_bf_daily_nutrition_list_by_day(paramMap);
result.put("lm_nutrition", lm_nutrition);
//마지막 식사
DataMap lm_last_meal = bf_daily_nutritionBO.select_bf_last_meal_status(paramMap);
//마지막 수면
DataMap lm_last_sleep = bf_daily_nutritionBO.select_bf_last_sleep_status(paramMap);
//마지막 대소변
DataMap lm_last_bedpan = bf_daily_nutritionBO.select_bf_last_bedpan_status(paramMap);
result.put("lm_last_meal", lm_last_meal);
result.put("lm_last_sleep", lm_last_sleep);
result.put("lm_last_bedpan", lm_last_bedpan);
// 60개월 미만 인경우만 영양점수 계산
int m = rm_child.getInt("m");
DataMap today = new DataMap();
List<DataMap> daily = new ArrayList<DataMap>();
//성장점수 및 식품영양점수
if(m>5 && m<60 ) {
// 당일 균형 판정
Calendar cal = Calendar.getInstance();
SimpleDateFormat format = new SimpleDateFormat ("yyyy-MM-dd");
result.put("scope", "day");
result.put("reg_dt", format.format(cal.getTime()));
DataMap today_dm = scoreBO.select_day_total(paramMap);
if(today_dm == null) {
today_dm = new DataMap();
result.put("month", rm_child.get("m"));
}
// 일일 균형 판정
List<DataMap> day_lm = scoreBO.select_daily_list_for_graph(paramMap);
if(day_lm.size() > 0) {
DataMap tot = scoreBO.select_day_total(day_lm.get(0));
NutrientScoreCalculation nut = new NutrientScoreCalculation(tot);
DataMap nut_score = nut.getScore();
FoodScoreCalculation food = new FoodScoreCalculation(tot);
DataMap food_score = food.getScore();
rm_child.put("totalNutrition", Math.round(nut_score.getLong("totalNutrition")));
rm_child.put("totalFood", Math.round(food_score.getLong("totalFood")));
} else {
rm_child.put("totalNutrition", 0);
rm_child.put("totalFood", 0);
}
}
}
result.put("rm_child", rm_child);
result.put("RESULT", ConstantResultCode.RESULT_SUCCESS);
}
} catch (Exception ex1) {
ex1.printStackTrace();
result.put("RESULT", ConstantResultCode.RESULT_EXCEPTION);
result.put("msg", ex1.getMessage());
}
return result;
}
private DataMap init_member(ModelMap model, HttpServletRequest request, DataMap paramMap) throws Exception{
HttpSession session = request.getSession(false);
DataMap rm_mem = (DataMap) session.getAttribute(ConstantSystem.SESSION_RM_MEMBER);
@ -326,34 +438,6 @@ public class M_IndexController extends AbstractControllerManager{
if(rm_child != null) {
paramMap.copyFromDataMapByKeys(rm_child, new String[]{"smc_no"});
// 선택된 아이 가장 먼저
List<DataMap> lm_child2 = new ArrayList<DataMap>();
// lm_child2.add(rm_child);
smc_no = RenaStringUtil.getData(rm_child, "smc_no");
int smc_index = 0;
for(DataMap rm_child2 : lm_child) {
String smc_no2 = RenaStringUtil.getData(rm_child2, "smc_no");
if(smc_no2.equals(smc_no)) {
rm_child2.put("rep", "Y");
paramMap.put("smc_index", smc_index); //아이 노출 인덱스
} else {
rm_child2.put("rep", "N");
}
smc_index++;
lm_child2.add(rm_child2);
log.info("---------------------- rm_child2 ---------------- ");
log.info(rm_child2);
}
DataMap.putToModel(model, "lm_child", lm_child2);
}
/*
if(rm_child != null) {
paramMap.copyFromDataMapByKeys(rm_child, new String[]{"smc_no"});
// 선택된 아이 가장 먼저
List<DataMap> lm_child2 = new ArrayList<DataMap>();
lm_child2.add(rm_child);
@ -368,8 +452,6 @@ public class M_IndexController extends AbstractControllerManager{
DataMap.putToModel(model, "lm_child", lm_child2);
}
*/
return rm_child;
}
@ -383,6 +465,7 @@ public class M_IndexController extends AbstractControllerManager{
return rm_last;
}
/**
* - views/ftl/m/index/index.ftl - snut97
* @param model

@ -82,51 +82,50 @@
<#if (model['lm_child'])?has_content>
<!-- 현재 선택한 아이정보만 출력 -->
<#list model['lm_child'] as item>
<#if item['rep'] == "Y">
<li>
<div class="main_pofile_txt">
<h2>${item['name']!} (${item['gender_ko']!})</h2>
<p>${(item['past_day'])!}일 (${(item['past_day']?number/7)!}주 ${(item['past_day']?number%7)!}일/${item['past_month']!}개월 ${(item['past_day']?number%7)!}일)</p>
<p class="d_day">
<#if item['d_day_year']? has_content>
<#if item['d_day_year']? has_content>
<a style='color:white' href="${URL_ROOT}/m/member_env/setting_env_viewnm.do?return_url=setting&view_nm=view_d_day&viewYear=${item['d_day_year']}&viewMonth=${item['d_day_month']}">
<#else>
<a style='color:white' href="${URL_ROOT}/m/member_env/setting_env_viewnm.do?return_url=setting&view_nm=view_d_day">
</#if>
<#if item['day100'] gt 0>
<#if item['diff_d_day'] gt item['day100'] || item['diff_d_day'] lt 0>
100일 D-${(item['day100'])!}일,${item['day100date']!}
<#elseif item['diff_d_day'] gt 0>
${(item['d_title'])!} D-${(item['diff_d_day'])!}일,${item['d_day']!}
</#if>
<#elseif item['day200'] gt 0>
<#if item['diff_d_day'] gt item['day200'] || item['diff_d_day'] lt 0>
200일 D-${(item['day200'])!}일,${item['day200date']!}
<#elseif item['diff_d_day'] gt 0>
${(item['d_title'])!} D-${(item['diff_d_day'])!}일,${item['d_day']!}
</#if>
<#elseif item['day300'] gt 0>
<#if item['diff_d_day'] gt item['day300'] || item['diff_d_day'] lt 0>
300일 D-${(item['day300'])!}일,${item['day300date']!}
<#elseif item['diff_d_day'] gt 0>
${(item['d_title'])!} D-${(item['diff_d_day'])!}일,${item['d_day']!}
</#if>
<#elseif item['day365'] gt 0>
<#if item['diff_d_day'] gt item['day365'] || item['diff_d_day'] lt 0>
첫돌 D-${(item['day365'])!}일,${item['day365date']!}
<#elseif item['diff_d_day'] gt 0>
${(item['d_title'])!} D-${(item['diff_d_day'])!}일,${item['d_day']!}
</#if>
<#elseif item['day365'] lt 0>
<#if item['diff_d_day'] gt 0>
${(item['d_title'])!} D-${(item['diff_d_day'])!}일,${item['d_day']!}
<#else>
설정된 D-Day가 없습니다.
</#if>
</#if>
</a>
<a style='color:white' href="${URL_ROOT}/m/member_env/setting_env_viewnm.do?return_url=setting&view_nm=view_d_day">
</#if>
<#if item['day100'] gt 0>
<#if item['diff_d_day'] gt item['day100'] || item['diff_d_day'] lt 0>
100일 D-${(item['day100'])!}일,${item['day100date']!}
<#elseif item['diff_d_day'] gt 0>
${(item['d_title'])!} D-${(item['diff_d_day'])!}일,${item['d_day']!}
</#if>
<#elseif item['day200'] gt 0>
<#if item['diff_d_day'] gt item['day200'] || item['diff_d_day'] lt 0>
200일 D-${(item['day200'])!}일,${item['day200date']!}
<#elseif item['diff_d_day'] gt 0>
${(item['d_title'])!} D-${(item['diff_d_day'])!}일,${item['d_day']!}
</#if>
<#elseif item['day300'] gt 0>
<#if item['diff_d_day'] gt item['day300'] || item['diff_d_day'] lt 0>
300일 D-${(item['day300'])!}일,${item['day300date']!}
<#elseif item['diff_d_day'] gt 0>
${(item['d_title'])!} D-${(item['diff_d_day'])!}일,${item['d_day']!}
</#if>
<#elseif item['day365'] gt 0>
<#if item['diff_d_day'] gt item['day365'] || item['diff_d_day'] lt 0>
첫돌 D-${(item['day365'])!}일,${item['day365date']!}
<#elseif item['diff_d_day'] gt 0>
${(item['d_title'])!} D-${(item['diff_d_day'])!}일,${item['d_day']!}
</#if>
<#elseif item['day365'] lt 0>
<#if item['diff_d_day'] gt 0>
${(item['d_title'])!} D-${(item['diff_d_day'])!}일,${item['d_day']!}
<#else>
설정된 D-Day가 없습니다.
</#if>
</#if>
</a>
</p>
</div>
<div class="main_pofile_img">
@ -135,12 +134,6 @@
</p>
</div>
</li>
<#else>
<li>
<div class="main_pofile_txt">
</div>
</li>
</#if>
</#list>
</#if>
@ -155,14 +148,16 @@
<div class="main_pofile_info main_pofile_info01">
<!-- main_pofile_info_txt -->
<div class="main_pofile_info_txt txt01 active">
<div class="main_pofile_info_txt02"><strong><#if model['rm_last_h']['height']?exists>${model['rm_last_h']['height']!}<#else>-</#if></strong>cm</div>
<div class="main_pofile_info_txt02">
<strong id="l_height"><#if model['rm_last_h']['height']?exists>${model['rm_last_h']['height']!}<#else>-</#if></strong>cm
</div>
</div>
<!-- main_pofile_info_txt -->
<#if model['rm_last_w']?exists == true>
<div class="main_pofile_info_txt txt02">
<div class="main_pofile_info_txt02">
<strong><#if model['rm_last_w']['weight']?exists>${model['rm_last_w']['weight']!}kg<#else>-</#if></strong></div>
<strong id="l_weight"><#if model['rm_last_w']['weight']?exists>${model['rm_last_w']['weight']!}kg<#else>-</#if></strong></div>
</div>
</#if>
<div class="main_pofile_info_tit">
@ -178,10 +173,10 @@
<div class="main_pofile_info_txt txt01 active">
<div class="main_pofile_info_txt02">
<#if model['rm_child']['totalNutrition']?exists == true>
<strong>${model['rm_child']['totalNutrition']}</strong>점
<strong id="totalNutrition">${model['rm_child']['totalNutrition']}</strong>점
</#if>
<#if model['rm_child']['totalNutrition']?exists == false>
<strong>-</strong>
<strong id="totalNutrition">-</strong>
</#if>
</div>
</div>
@ -190,10 +185,10 @@
<div class="main_pofile_info_txt txt02">
<div class="main_pofile_info_txt02">
<#if model['rm_child']['totalFood']?exists == true>
<strong>${model['rm_child']['totalFood']}</strong>%
<strong id="totalFood">${model['rm_child']['totalFood']}</strong>%
</#if>
<#if model['rm_child']['totalFood']?exists == false>
<strong>-</strong>
<strong id="totalFood">-</strong>
</#if>
</div>
</div>
@ -232,28 +227,28 @@
<div>
<p>마지막 식사</p>
<#if (model['lm_last_meal'])?has_content>
<span>${model['lm_last_meal']['ago']!} / ${model['lm_last_meal']['time_val']!}</span>
<span id="last_meal">${model['lm_last_meal']['ago']!} / ${model['lm_last_meal']['time_val']!}</span>
</#if>
<#if (model['lm_last_meal'])?has_content == false>
-
<span id="last_meal">-</span>
</#if>
</div>
<div>
<p>마지막 수면</p>
<#if (model['lm_last_sleep'])?has_content>
<span>${model['lm_last_sleep']['ago']!} / ${model['lm_last_sleep']['time_val']!}</span>
<span id="last_sleep">${model['lm_last_sleep']['ago']!} / ${model['lm_last_sleep']['time_val']!}</span>
</#if>
<#if (model['lm_last_sleep'])?has_content == false>
-
<span id="last_sleep">-</span>
</#if>
</div>
<div>
<p>마지막 대소변</p>
<#if (model['lm_last_bedpan'])?has_content>
<span>${model['lm_last_bedpan']['ago']!} / ${model['lm_last_bedpan']['time_val']!}</span>
<span id="last_bedpan">${model['lm_last_bedpan']['ago']!} / ${model['lm_last_bedpan']['time_val']!}</span>
</#if>
<#if (model['lm_last_bedpan'])?has_content == false>
-
<span id="last_bedpan">-</span>
</#if>
</div>
@ -367,15 +362,119 @@
</#if>
];
var smc_index = 0;
var ajax_child_info = function(idx){
let smc_no = arr_smc_no[idx];
<#if (model['lm_child'])?has_content>
smc_index = parseInt("${model['smc_index']}");
</#if>
$.ajax({
url:'${URL_ROOT}/m/index/ajax_index.do',
type:'get',
data: {
"smc_no" : smc_no
},
dataType:'json',
}).done(function(result) {
console.log(result);
if (result === undefined){
Swal.fire({text: '오류가 발생했습니다.'})
}else{
var URL_ROOT = result.URL_ROOT;
//키,체중
if(result.rm_last_h != null) {
$("#l_height").text(result.rm_last_h.height);
} else {
$("#l_height").text("-");
}
if(result.rm_last_w != null) {
$("#l_weight").text(result.rm_last_w.weight);
} else {
$("#l_weight").text("-");
}
//마지막 식사,수면,대소변
if(result.lm_last_meal != null) {
$("#last_meal").text(result.lm_last_meal.ago + "/" + result.lm_last_meal.time_val);
} else {
$("#last_meal").text("-");
}
if(result.lm_last_sleep != null) {
$("#last_sleep").text(result.lm_last_sleep.ago + "/" + result.lm_last_sleep.time_val);
} else {
$("#last_sleep").text("-");
}
if(result.lm_last_bedpan != null) {
$("#last_bedpan").text(result.lm_last_bedpan.ago + "/" + result.lm_last_bedpan.time_val);
} else {
$("#last_bedpan").text("-");
}
//영양점수
if(result.rm_child.totalNutrition != null) {
$("#totalNutrition").text(result.rm_child.totalNutrition);
} else {
$("#totalNutrition").text("-");
}
//식품점수
if(result.rm_child.totalFood != null) {
$("#totalFood").text(result.rm_child.totalFood);
} else {
$("#totalFood").text("-");
}
$("#ul_photo").html("");
var strRecordList = "";
if(result.lm_nutrition != null) {
for(var i=0;i<result.lm_nutrition.length;i++) {
var item = result.lm_nutrition[i];
// var img_href = "" + item.dn_no + "\"";
strRecordList += " <li name='li_img_preview' onclick='fncGoViewEdit(" + item.dn_no + ")'>";
strRecordList += " <div class='img_preview'>";
if(item.append_src_img_file == null) {
strRecordList += " <img src='" + URL_ROOT + "/bf/m/img/child/child_pic_02.png' alt='사진영역'>";
} else {
strRecordList += " <img src='/bf/file/get_img.do?mt_file_seq=" + item.append_src_img_file + "' alt='사진영역'>";
}
strRecordList += " </div>";
strRecordList += " <div class='main_cont_circle' style='border-color: " + item.color_cd + ";'></div>";
strRecordList += " <div class='main_cont_info'>";
strRecordList += " <div class='info_title'>";
strRecordList += " <p style='color: #A1D3E3;'>" + item.nutirition_cd_no_title + "</p>";
strRecordList += " <span class='info_time'>" + item.ago + "</span>";
strRecordList += " </div>";
strRecordList += " <div class='info_amount'>";
strRecordList += " <p>소변량 매우많음</p>";
strRecordList += " </div>";
strRecordList += " <div class='info_recode' style='border-color: " + item.color_cd + ";' onclick='fncGoViewEdit(" + item.dn_no + ")'>";
strRecordList += " <p style='color: #A1D3E3;'>순간의 기록</p>";
strRecordList += " <span>";
strRecordList += item.memo;
strRecordList += " </span>";
strRecordList += " </div>";
strRecordList += " </div>";
strRecordList += " </li>";
}
strRecordList += " <li>";
strRecordList += " <div class='img_preview'>";
strRecordList += " <p><label for='append_src_img_file'><img id='img_preview' src='../img/main/main_cont_img_camera.png' alt='사진영역'></label></p>";
strRecordList += " </div>";
strRecordList += " <input type='file' id='append_src_img_file' name='append_src_img_file'>";
strRecordList += " </li>";
$("#ul_photo").html(strRecordList);
}
}
}.bind(this))
}
//기록수정화면 이동
function fncGoViewEdit(dn_no) {
location.href = "/bf/m/bf_daily_nutrition/view_bf_daily_nutrition.do?dn_no=" + dn_no;
}
// main_pofile_slider 프로필 슬라이드
$(document).ready(function(){
// $(".main_cont_kinds").hide();
$('.main_pofile_slider').bxSlider({
auto: false,
speed: 500,
@ -392,17 +491,8 @@
},
onSlideAfter: function($slideElement, oldIndex, newIndex) {
// alert(oldIndex + "," + newIndex);
//우측으로 슬라이더시
if(newIndex > oldIndex) {
if(smc_index >= arr_smc_no.length-1) {
smc_index = 0;
} else {
smc_index++;
}
location.href = "${URL_ROOT}/m/index/index.do?smc_no=" + arr_smc_no[smc_index];
}
// $(".main_cont_kinds").hide();
ajax_child_info(newIndex);
}
});
@ -514,6 +604,7 @@
}
}
</script>

@ -1,552 +0,0 @@
<#include "/m/include/index_top.ftl">
<link href="../css/custom.css?2" rel="stylesheet" type="text/css" >
<script src="../js/jquery.bxslider.js"></script>
<script type="text/javascript" src="../js/masonry.pkgd.min.js"></script>
<!-- <#--<script src="../js/jquery.bxslider.js"></script>--> -->
<link rel="stylesheet" href="../css/swiper.min.css">
<script src="../js/swiper.min.js"></script>
<style>
/* main_cont_camera 이미지 불러오기 */
/* .main_cont_camera { padding-top:50px; background: url(../img/main/main_cont_img_camera_bg01.png)no-repeat top center/18px auto; } */
/* .main_cont_camera li { width:100%; padding-bottom:40px; text-align:center; background: url(../img/main/main_cont_img_camera_bg02.png)no-repeat bottom center/18px auto; } */
/* .main_cont_camera li:last-child { padding-bottom:50px; background: url(../img/main/main_cont_img_camera_bg03.png)no-repeat bottom center/18px auto; } */
.main_cont_camera input { display:none; }
/* .main_cont_camera .img_preview { position:relative; overflow:hidden; width:180px; height:170px; margin:0 auto; background:#fff; border:5px solid #fff; border-radius:20px; box-shadow: 0 0 6px rgba(0, 0, 0, 0.2); } */
.main_cont_camera .img_preview label { display:block; width:100%; height:auto; }
.main_cont_camera .img_preview img { position: absolute; width:100%; height:100%; top: 50%; left: 50%; transform: translate(-50%, -50%); }
/* 퍼블리싱 수정 css */
.main_cont_camera { padding-top:50px; background: none; }
.main_cont_camera li { position:relative; width:100%; padding-bottom:200px; text-align:center; background: none; display: flex; }
.main_cont_camera li:last-child { padding-bottom:50px; background: none; }
.main_cont_camera .img_preview { position:relative; overflow:hidden; width: 70px; height: 70px; margin: 0 43px 0 20px; background:#fff; border:5px solid #fff; border-radius:20px; box-shadow: 0 0 6px rgba(0, 0, 0, 0.2); }
.main_cont_camera .img_preview:after {
content: "";
display: block;
padding-bottom: 100%;
}
</style>
<body>
<!-- wrap -->
<div class="wrap">
<!-- header -->
<header class="header_wrapper">
<div class="left_btn_box">
<a href="${URL_ROOT}/m/member_env/setting_nm.do?view_nm=setting" class="side_Rbtn setting_btn hidden">설정</a>
</div>
<div class="center_btn_box">
<h1 class="brand_logo hidden">이유식당</h1>
</div>
<div class="right_btn_box">
<a href="${URL_ROOT}/m/bf_notice/list_bf_notice.do" class="side_Rbtn noti_new_btn hidden">알림센터</a>
</div>
</header>
<!-- main -->
<div class="main">
<#if model['rm_child']['smc_no']?exists == false>
<#include "/m/index/include_nochild.ftl">
<#else>
<script>
function CMD_MEASUREMENT_HEIGHT(smc_no) {
var cmd = 'CMD_MEASUREMENT_HEIGHT';
var args = {
smc_no: smc_no,
};
try{
window.interface.executeInterface(function(r){console.log('sussess:', r);}, function(r){console.log('fail:', r);}, cmd, args);
}catch(e){
alert(e);
}
}
</script>
<form id="frm" name="frm" method="post" action="${URL_ROOT}/m/bf_daily_nutrition/insert_bf_daily_nutrition.do" enctype="multipart/form-data">
<input type="hidden" id="smc_no" name="smc_no" value="${model['rm_child']['smc_no']!}" />
<input type="hidden" id="nutirition_cd_no" name="nutirition_cd_no" />
<!-- main_top -->
<div class="main_top">
<!-- main_pofile -->
<div class="main_pofile">
<!-- main_pofile_slider -->
<div class="bxslider-wrapper" style="visibility: hidden; opacity: 0;">
<ul class="main_pofile_slider">
<#if (model['lm_child'])?has_content>
<#list model['lm_child'] as item>
<li>
<div class="main_pofile_txt">
<h2>${item['name']!} (${item['gender_ko']!})</h2>
<p>${(item['past_day'])!}일 (${(item['past_day']?number/7)!}주 ${(item['past_day']?number%7)!}일/${item['past_month']!}개월 ${(item['past_day']?number%7)!}일)</p>
<p class="d_day">
<#if item['day100'] gt 0>
<#if item['diff_d_day'] gt item['day100'] || item['diff_d_day'] lt 0>
100일 D-${(item['day100'])!}일,${item['day100date']!}
<#elseif item['diff_d_day'] gt 0>
${(item['d_title'])!} D-${(item['diff_d_day'])!}일,${item['d_day']!}
</#if>
<#elseif item['day200'] gt 0>
<#if item['diff_d_day'] gt item['day200'] || item['diff_d_day'] lt 0>
200일 D-${(item['day200'])!}일,${item['day200date']!}
<#elseif item['diff_d_day'] gt 0>
${(item['d_title'])!} D-${(item['diff_d_day'])!}일,${item['d_day']!}
</#if>
<#elseif item['day300'] gt 0>
<#if item['diff_d_day'] gt item['day300'] || item['diff_d_day'] lt 0>
300일 D-${(item['day300'])!}일,${item['day300date']!}
<#elseif item['diff_d_day'] gt 0>
${(item['d_title'])!} D-${(item['diff_d_day'])!}일,${item['d_day']!}
</#if>
<#elseif item['day365'] gt 0>
<#if item['diff_d_day'] gt item['day360'] || item['diff_d_day'] lt 0>
첫돌 D-${(item['day365'])!}일,${item['day365date']!}
<#elseif item['diff_d_day'] gt 0>
${(item['d_title'])!} D-${(item['diff_d_day'])!}일,${item['d_day']!}
</#if>
</#if>
</p>
</div>
<div class="main_pofile_img">
<p>
<a href ="${URL_ROOT}/m/bf_family_baby/view_bf_family_baby.do?smc_no=${item['smc_no']!}" ><img src="<#if item['append_300_img_file']?exists>${URL_ROOT}/file/get_img.do?mt_file_seq=${item['append_300_img_file']}<#else>${URL_STATIC_ROOT}/m/img/main/main_profile_img02.png</#if>" alt="프로필 사진" /></a>
</p>
</div>
</li>
</#list>
</#if>
</ul>
</div>
<!-- //main_pofile_slider -->
<!-- main_pofile_info_wrap -->
<div class="main_pofile_info_wrap">
<!-- main_pofile_info -->
<div class="main_pofile_info main_pofile_info01">
<!-- main_pofile_info_txt -->
<div class="main_pofile_info_txt txt01 active">
<div class="main_pofile_info_txt02"><strong><#if model['rm_last_h']['height']?exists>${model['rm_last_h']['height']!}<#else>-</#if></strong>cm</div>
</div>
<!-- main_pofile_info_txt -->
<#if model['rm_last_w']?exists == true>
<div class="main_pofile_info_txt txt02">
<div class="main_pofile_info_txt02">
<strong><#if model['rm_last_w']['weight']?exists>${model['rm_last_w']['weight']!}kg<#else>-</#if></strong></div>
</div>
</#if>
<div class="main_pofile_info_tit">
<span class="txt01 active">cm</span>
<span class="txt02">kg</span>
</div>
</div>
<!-- main_pofile_info -->
<div class="main_pofile_info main_pofile_info02">
<!-- main_pofile_info_txt -->
<div class="main_pofile_info_txt txt01 active">
<div class="main_pofile_info_txt02">
<#if model['rm_child']['totalNutrition']?exists == true>
<strong>${model['rm_child']['totalNutrition']}</strong>점
</#if>
<#if model['rm_child']['totalNutrition']?exists == false>
<strong>-</strong>
</#if>
</div>
</div>
<!-- main_pofile_info_txt -->
<div class="main_pofile_info_txt txt02">
<div class="main_pofile_info_txt02">
<#if model['rm_child']['totalFood']?exists == true>
<strong>${model['rm_child']['totalFood']}</strong>%
</#if>
<#if model['rm_child']['totalFood']?exists == false>
<strong>-</strong>
</#if>
</div>
</div>
<div class="main_pofile_info_tit">
<span class="txt01 active">영양</span>
<span class="txt02">식품</span>
</div>
</div>
</div>
<!-- //main_pofile_info_wrap -->
<!-- main_cont_kinds -->
<!-- class명 active 를 넣으면 display:block 처리, 빼면 none 처리입니다. -->
<div class="main_cont_kinds active">
<div class="swiper-container">
<div class="swiper-wrapper">
<#list model['category_list'] as item>
<div class="swiper-slide">
<a href="javascript:void(0);" style="background-color:${item['color_cd']}" key="${item['val_1']!}"><span>${item['title']!}</span></a>
</div>
</#list>
<div class="swiper-slide">
<a href="${URL_ROOT}/m/member_env/setting_env_viewnm.do?return_url=setting&view_nm=view_set_record_order"><span>수정<br>설정</span></a>
</div>
</div>
</div>
</div>
<!-- //main_cont_kinds -->
<!-- main_cont_last_status -->
<div class="main_cont_last_status">
<div>
<p>마지막 식사</p>
<#if (model['lm_last_meal'])?has_content>
<span>${model['lm_last_meal']['ago']!} / ${model['lm_last_meal']['time_val']!}</span>
</#if>
<#if (model['lm_last_meal'])?has_content == false>
-
</#if>
</div>
<div>
<p>마지막 수면</p>
<#if (model['lm_last_sleep'])?has_content>
<span>${model['lm_last_sleep']['ago']!} / ${model['lm_last_sleep']['time_val']!}</span>
</#if>
<#if (model['lm_last_sleep'])?has_content == false>
-
</#if>
</div>
<div>
<p>마지막 대소변</p>
<#if (model['lm_last_bedpan'])?has_content>
<span>${model['lm_last_bedpan']['ago']!} / ${model['lm_last_bedpan']['time_val']!}</span>
</#if>
<#if (model['lm_last_bedpan'])?has_content == false>
-
</#if>
</div>
</div>
<!-- //main_cont_last_status -->
</div>
<!-- //main_pofile -->
</div>
<!-- //main_top -->
<style>
.img_title{
position: absolute;
top:0%;
right:0%;
z-index:9999;
}
</style>
<!-- main_cont -->
<div class="main_cont">
<!-- 타임라인 line -->
<div class="main_cont_line"></div>
<!-- 이미지 업로드 main_cont_camera -->
<ul id="ul_photo" class="main_cont_camera">
<#assign nutirition_cd_no_title = ''>
<#assign ago = ''>
<#if (model['lm_nutrition'])?has_content>
<#list model['lm_nutrition'] as item>
<#assign nutirition_cd_no_title = ''>
<#assign ago = item['ago']>
<li name="li_img_preview" onclick="location.href='${URL_ROOT}/m/bf_daily_nutrition/view_bf_daily_nutrition.do?dn_no=${item['dn_no']}'" >
<div class="img_preview">
<#if (item['nutirition_cd_no_title'])?has_content>
<#assign nutirition_cd_no_title = item['nutirition_cd_no_title']>
<#assign memo = item['memo']!>
<#assign time_text = item['time_val']!>
</#if>
<img src="<#if item['append_300_img_file']?exists>${URL_ROOT}/file/get_img.do?mt_file_seq=${item['append_300_img_file']}<#else>${URL_STATIC_ROOT}/m/img/child/child_pic_02.png</#if>" alt="사진영역">
</div>
<div class="main_cont_circle" style="border-color: ${item['color_cd']};"></div>
<div class="main_cont_info">
<div class="info_title">
<p style="color: ${item['color_cd']};"><#if (model['lm_nutrition'])?has_content>${nutirition_cd_no_title}</#if></p>
<span class="info_time">${ago}</span>
</div>
<div class="info_amount">
<p>${time_text}</p>
</div>
<div class="info_recode" style="border-color: ${item['color_cd']};" onclick="location.href='${URL_ROOT}/m/bf_daily_nutrition/view_bf_daily_nutrition.do?dn_no=${item['dn_no']}'">
<p style="color: ${item['color_cd']};">순간의 기록</p>
<span>
${memo}<br/>
</span>
</div>
</div>
</li>
</#list>
</#if>
<li>
<div class="img_preview">
<p><label for="append_src_img_file"><img id="img_preview" src="../img/main/main_cont_img_camera.png" alt="사진영역"></label></p>
</div>
<input type="file" id="append_src_img_file" name="append_src_img_file">
</li>
</ul>
<!-- //main_cont_camera -->
</div>
<!-- //main_cont -->
</form>
</#if>
</div>
<!-- //main -->
<!-- float chatbot -->
<#if model[ 'rm_child']? has_content>
<a href="http://devops.lookylooks.ai:42110/browser_common_index.html?site_id=7973031d-157e-4140-914e-8f39059098d2&cb_id=31ef0fe4-3c2d-4d5a-b73b-76f7213b1737&ch_id=null&in=test_in_id&phone_num=${model['rm_mem']['phone_num']!}&name=${model['rm_child']['name']}&month=${(model['rm_child']['past_month'])}">
<div class="float_chatbot">
<img src="https://ccbot.hanaw.com/img/hana_icon.JPG">
</div>
</a>
<#else>
<a href="http://devops.lookylooks.ai:42110/browser_common_index.html?site_id=7973031d-157e-4140-914e-8f39059098d2&cb_id=31ef0fe4-3c2d-4d5a-b73b-76f7213b1737&ch_id=null&in=test_in_id&phone_num=${model['rm_mem']['phone_num']!}&name=null&month=null">
<div class="float_chatbot">
<img src="https://ccbot.hanaw.com/img/hana_icon.JPG">
</div>
</a>
</#if>
</div>
<!-- //wrap -->
<script>
// main_pofile_slider 프로필 슬라이드
$(document).ready(function(){
// $(".main_cont_kinds").hide();
$('.main_pofile_slider').bxSlider({
auto: false,
speed: 500,
pause: 4000,
mode:'horizontal',
autoControls: false,
controls: false,
pager:true,
infiniteLoop: false,
onSliderLoad: function(){
$('.bxslider-wrapper').css('visibility', 'visible').animate({opacity: 1});
},
onSlideAfter: function($slideElement, oldIndex, newIndex) {
$(".main_cont_kinds").hide();
// ajax_child_info(newIndex);
location.href = "${URL_ROOT}/m/index/index.do?smc_no=" + arr_smc_no[newIndex];
}
});
init();
});
window.bxslider_mouse_over_slide=null;
$(function() {
// for desktop get link event
$('.main_pofile_slider li a').mouseover(function(event) {
window.bxslider_mouse_over_slide=$(this);
});
$('.main_pofile_slider li a').mouseleave(function(event) {
setTimeout(function(){
window.bxslider_mouse_over_slide = null;
}, 200);
});
// for mobile touch event
$('.main_pofile_slider li a').on('touchstart', function(event) {
window.bxslider_mouse_over_slide=$(this);
});
});
$('.main_pofile_slider ').parent().on('click', function (event) {
//Check if we've got a slide under the mouse
if ((window.bxslider_mouse_over_slide!=null)){
var hrefUrl = window.bxslider_mouse_over_slide.attr('href');
window.location.href = hrefUrl;
}
});
var init = function(){
// main_cont_camera 이미지 업로드
$('#append_src_img_file').on('change', function() {
ext = $(this).val().split('.').pop().toLowerCase(); //확장자
//배열에 추출한 확장자가 존재하는지 체크
if($.inArray(ext, ['gif', 'png', 'jpg', 'jpeg']) == -1) {
resetFormElement($(this)); //폼 초기화
window.alert('이미지 파일이 아닙니다! (gif, png, jpg, jpeg 만 업로드 가능)');
} else {
file = $('#append_src_img_file').prop("files")[0];
blobURL = window.URL.createObjectURL(file);
$('#img_preview').attr('src', blobURL);
$('.img_preview').slideDown(); //업로드한 이미지 미리보기
$(this).slideUp(); //파일 양식 감춤
$(".main_cont_kinds").show();
//$(".main_cont_kinds").attr('class','main_cont_kinds active');
}
});
$(".main_pofile_info_tit>span").click(function(e){
e.stopPropagation();
if( !$(this).hasClass("active") ){
$(this).siblings().removeClass("active");
$(this).addClass("active");
var id = $(this).attr('class').replace("active","");
$(this).parent().parent().children(".main_pofile_info_txt").removeClass("active");
$(this).parent().parent().children("." + id).addClass("active");
}
});
// main_cont_kinds
$(".main_cont_kinds .swiper-slide a").click(function(e){
e.stopPropagation();
if( !$(this).hasClass("on") ){
$(".main_cont_kinds li a.on").removeClass("on");
$(this).addClass("on");
$('#nutirition_cd_no').val($(this).attr('key'));
if($('#smc_no').val() == ''){
Swal.fire({text: '아이를 먼저 등록해 주세요'});
} else{
$('#frm').submit();
}
}
});
}
var swiper = new Swiper('.swiper-container', {
slidesPerView: 5,
slidesPerGroup: 1,
spaceBetween: 10,
loopFillGroupWithBlank: true,
pagination: {
loop: false,
el: '.swiper-pagination',
clickable: true
},
});
</script>
<script>
let not_h = '아이 키 성장 기록이 없습니다';
let not_w = '아이 체중 성장 기록이 없습니다';
let arr_smc_no = [
<#if (model['lm_child'])?has_content>
<#list model['lm_child'] as item>
${item['smc_no']},
</#list>
</#if>
];
var ajax_child_info = function(idx){
let smc_no = arr_smc_no[idx];
console.log('ajax_child_info:smc_no:' + smc_no);
$.ajax({
url:'${URL_ROOT}/m/index/ajax_child_info.do',
type:'get',
data: {
"smc_no" : smc_no
},
dataType:'json',
}).done(function(result) {
console.log(result)
if (result === undefined){
Swal.fire({text: '오류가 발생했습니다.'})
}else{
if(result.rm_child){
$('#smc_no').val(result.rm_child.smc_no)
$("span[name=child_nm]").text(result.rm_child.name)
$("li[name=li_img_preview]").remove();
}else{
$("span[name=child_nm]").text('')
}
if(result.rm_last_h){
$('#base_dt_max_h').text(result.rm_last_h.base_dt_max)
$('#last_h').text(result.rm_last_h.height)
}else{
$('#base_dt_max_h').text(not_h)
$('#last_h').text( '-')
}
if(result.rm_last_w){
$('#base_dt_max_w').text(result.rm_last_w.base_dt_max)
$('#last_w').text(result.rm_last_w.height)
}else{
$('#base_dt_max_w').text(not_w)
$('#last_w').text('-')
}
var html = '';
$('#ul_photo').empty();
$('#last_ago').text("");
if(result.lm_nutrition != null && result.lm_nutrition.length > 0) {
for(var i=0;i<result.lm_nutrition.length;i++) {
var dn_no = result.lm_nutrition[i].dn_no;
var append_300_img_file = result.lm_nutrition[i].append_300_img_file;
var nutirition_cd_no_title = result.lm_nutrition[i].nutirition_cd_no_title;
html +='<li name="li_img_preview" onclick="location.href=\'${URL_ROOT}/m/bf_daily_nutrition/view_bf_daily_nutrition.do?dn_no=' + dn_no + '\'" >';
html +=' <div class="img_preview">';
html +=' <span class="img_title">' + nutirition_cd_no_title + '</span>'
html +=' <img src="${URL_ROOT}/file/get_img.do?mt_file_seq=' + append_300_img_file + '" alt="사진영역">';
html +=' </div>';
html +='</li>';
}
var nutirition_cd_no_title = result.lm_nutrition[result.lm_nutrition.length -1].nutirition_cd_no_title;
var ago = result.lm_nutrition[result.lm_nutrition.length -1].ago;
$('#last_ago').text(nutirition_cd_no_title + "(" + ago + ")");
}
html +='<li>';
html +=' <div class="img_preview">';
html +=' <p><label for="append_src_img_file"><img id="img_preview" src="${URL_STATIC_ROOT}/m/img/main/main_cont_img_camera.png" alt="사진영역"></label></p>';
html +=' </div>';
html +=' <input type="file" id="append_src_img_file" name="append_src_img_file">';
html +='</li> ';
$('#ul_photo').append(html);
init();
if(result.RESULT == 7){
Swal.fire({text: '로그인 세션이 만료되었습니다.'}).then((result)=>{ window.location.href = '${URL_ROOT}/m/index.do' })
}
}
}.bind(this))
}
$(document).ready(function(){
//if(arr_smc_no.length > 0) ajax_child_info(0);
});
</script>
<!-- 하단 네비 iyu_nav -->
<#include "/m/include/index_bottom_menu.ftl">
<!-- //iyu_nav -->
<#include "/m/include/index_bottom.ftl">

@ -42,7 +42,7 @@
<#if model['recent_notice_cnt'] gt 0 >
<a href="${URL_ROOT}/m/bf_notice/list_bf_notice.do" class="side_Rbtn noti_new_btn hidden">알림센터${model['recent_notice_cnt']}</a>
<#else>
<a href="${URL_ROOT}/m/bf_notice/list_bf_notice.do" class="side_Rbtn hidden">알림센터</a>
<a href="${URL_ROOT}/m/bf_notice/list_bf_notice.do" class="side_Rbtn noti_btn hidden">알림센터</a>
</#if>
</div>
</header>
@ -80,52 +80,68 @@
<div class="bxslider-wrapper" style="visibility: hidden; opacity: 0;">
<ul class="main_pofile_slider">
<#if (model['lm_child'])?has_content>
<!-- 현재 선택한 아이정보만 출력 -->
<#list model['lm_child'] as item>
<li>
<div class="main_pofile_txt">
<h2>${item['name']!} (${item['gender_ko']!})</h2>
<p>${(item['past_day'])!}일 (${(item['past_day']?number/7)!}주 ${(item['past_day']?number%7)!}일/${item['past_month']!}개월 ${(item['past_day']?number%7)!}일)</p>
<p class="d_day">
<#if item['day100'] gt 0>
<#if item['diff_d_day'] gt item['day100'] || item['diff_d_day'] lt 0>
100일 D-${(item['day100'])!}일,${item['day100date']!}
<#elseif item['diff_d_day'] gt 0>
${(item['d_title'])!} D-${(item['diff_d_day'])!}일,${item['d_day']!}
</#if>
<#elseif item['day200'] gt 0>
<#if item['diff_d_day'] gt item['day200'] || item['diff_d_day'] lt 0>
200일 D-${(item['day200'])!}일,${item['day200date']!}
<#elseif item['diff_d_day'] gt 0>
${(item['d_title'])!} D-${(item['diff_d_day'])!}일,${item['d_day']!}
</#if>
<#elseif item['day300'] gt 0>
<#if item['diff_d_day'] gt item['day300'] || item['diff_d_day'] lt 0>
300일 D-${(item['day300'])!}일,${item['day300date']!}
<#elseif item['diff_d_day'] gt 0>
${(item['d_title'])!} D-${(item['diff_d_day'])!}일,${item['d_day']!}
</#if>
<#elseif item['day365'] gt 0>
<#if item['diff_d_day'] gt item['day365'] || item['diff_d_day'] lt 0>
첫돌 D-${(item['day365'])!}일,${item['day365date']!}
<#elseif item['diff_d_day'] gt 0>
${(item['d_title'])!} D-${(item['diff_d_day'])!}일,${item['d_day']!}
</#if>
<#elseif item['day365'] lt 0>
<#if item['diff_d_day'] gt 0>
${(item['d_title'])!} D-${(item['diff_d_day'])!}일,${item['d_day']!}
<#else>
설정된 D-Day가 없습니다.
</#if>
<#if item['rep'] == "Y">
<li>
<div class="main_pofile_txt">
<h2>${item['name']!} (${item['gender_ko']!})</h2>
<p>${(item['past_day'])!}일 (${(item['past_day']?number/7)!}주 ${(item['past_day']?number%7)!}일/${item['past_month']!}개월 ${(item['past_day']?number%7)!}일)</p>
<p class="d_day">
<#if item['d_day_year']? has_content>
<a style='color:white' href="${URL_ROOT}/m/member_env/setting_env_viewnm.do?return_url=setting&view_nm=view_d_day&viewYear=${item['d_day_year']}&viewMonth=${item['d_day_month']}">
<#else>
<a style='color:white' href="${URL_ROOT}/m/member_env/setting_env_viewnm.do?return_url=setting&view_nm=view_d_day">
</#if>
</p>
</div>
<div class="main_pofile_img">
<p>
<a href ="${URL_ROOT}/m/bf_family_baby/view_bf_family_baby.do?smc_no=${item['smc_no']!}" ><img src="<#if item['append_300_img_file']?exists>${URL_ROOT}/file/get_img.do?mt_file_seq=${item['append_300_img_file']}<#else>${URL_STATIC_ROOT}/m/img/main/main_profile_img02.png</#if>" alt="프로필 사진" /></a>
</p>
</div>
</li>
<#if item['day100'] gt 0>
<#if item['diff_d_day'] gt item['day100'] || item['diff_d_day'] lt 0>
100일 D-${(item['day100'])!}일,${item['day100date']!}
<#elseif item['diff_d_day'] gt 0>
${(item['d_title'])!} D-${(item['diff_d_day'])!}일,${item['d_day']!}
</#if>
<#elseif item['day200'] gt 0>
<#if item['diff_d_day'] gt item['day200'] || item['diff_d_day'] lt 0>
200일 D-${(item['day200'])!}일,${item['day200date']!}
<#elseif item['diff_d_day'] gt 0>
${(item['d_title'])!} D-${(item['diff_d_day'])!}일,${item['d_day']!}
</#if>
<#elseif item['day300'] gt 0>
<#if item['diff_d_day'] gt item['day300'] || item['diff_d_day'] lt 0>
300일 D-${(item['day300'])!}일,${item['day300date']!}
<#elseif item['diff_d_day'] gt 0>
${(item['d_title'])!} D-${(item['diff_d_day'])!}일,${item['d_day']!}
</#if>
<#elseif item['day365'] gt 0>
<#if item['diff_d_day'] gt item['day365'] || item['diff_d_day'] lt 0>
첫돌 D-${(item['day365'])!}일,${item['day365date']!}
<#elseif item['diff_d_day'] gt 0>
${(item['d_title'])!} D-${(item['diff_d_day'])!}일,${item['d_day']!}
</#if>
<#elseif item['day365'] lt 0>
<#if item['diff_d_day'] gt 0>
${(item['d_title'])!} D-${(item['diff_d_day'])!}일,${item['d_day']!}
<#else>
설정된 D-Day가 없습니다.
</#if>
</#if>
</a>
</p>
</div>
<div class="main_pofile_img">
<p>
<a href ="${URL_ROOT}/m/bf_family_baby/view_bf_family_baby.do?smc_no=${item['smc_no']!}" ><img src="<#if item['append_300_img_file']?exists>${URL_ROOT}/file/get_img.do?mt_file_seq=${item['append_300_img_file']}<#else>${URL_STATIC_ROOT}/m/img/main/main_profile_img02.png</#if>" alt="프로필 사진" /></a>
</p>
</div>
</li>
<#else>
<li>
<div class="main_pofile_txt">
</div>
</li>
</#if>
</#list>
</#if>
</ul>
@ -197,9 +213,11 @@
<div class="swiper-container">
<div class="swiper-wrapper">
<#list model['category_list'] as item>
<div class="swiper-slide">
<a href="javascript:void(0);" style="background-color:${item['color_cd']}" key="${item['val_1']!}"><span>${item['title']!}</span></a>
</div>
<#if item['view_yn'] == 'Y'>
<div class="swiper-slide">
<a href="javascript:void(0);" style="background-color:${item['color_cd']}" key="${item['val_1']!}"><span>${item['title']!}</span></a>
</div>
</#if>
</#list>
<div class="swiper-slide">
<a href="${URL_ROOT}/m/member_env/setting_env_viewnm.do?return_url=setting&view_nm=view_set_record_order"><span>수정<br>설정</span></a>
@ -333,11 +351,31 @@
</div>
<!-- //wrap -->
<#if model['tutorial_cnt'] == 0>
<#include "/m/include/index_tutorial.ftl">
</#if>
<script>
let not_h = '아이 키 성장 기록이 없습니다';
let not_w = '아이 체중 성장 기록이 없습니다';
var arr_smc_no = [
<#if (model['lm_child'])?has_content>
<#list model['lm_child'] as item>
${item['smc_no']},
</#list>
</#if>
];
var smc_index = 0;
<#if (model['lm_child'])?has_content>
smc_index = parseInt("${model['smc_index']}");
</#if>
// main_pofile_slider 프로필 슬라이드
$(document).ready(function(){
// $(".main_cont_kinds").hide();
$('.main_pofile_slider').bxSlider({
auto: false,
speed: 500,
@ -348,15 +386,29 @@
pager:true,
infiniteLoop: false,
onSliderLoad: function(){
$('.bxslider-wrapper').css('visibility', 'visible').animate({opacity: 1});
try {
$('.bxslider-wrapper').css('visibility', 'visible').animate({opacity: 1});
} catch(e) {}
},
onSlideAfter: function($slideElement, oldIndex, newIndex) {
$(".main_cont_kinds").hide();
// ajax_child_info(newIndex);
location.href = "${URL_ROOT}/m/index/index.do?smc_no=" + arr_smc_no[newIndex];
// alert(oldIndex + "," + newIndex);
//우측으로 슬라이더시
if(newIndex > oldIndex) {
if(smc_index >= arr_smc_no.length-1) {
smc_index = 0;
} else {
smc_index++;
}
location.href = "${URL_ROOT}/m/index/index.do?smc_no=" + arr_smc_no[smc_index];
}
}
});
// $(".bx-pager-link").removeClass("active");
// $(".bx-pager-link").eq(smc_index).addClass("active");
init();
});
@ -377,6 +429,8 @@
window.bxslider_mouse_over_slide=$(this);
});
});
$('.main_pofile_slider ').parent().on('click', function (event) {
//Check if we've got a slide under the mouse
if ((window.bxslider_mouse_over_slide!=null)){
@ -453,25 +507,17 @@
},
});
</script>
<script>
let not_h = '아이 키 성장 기록이 없습니다';
let not_w = '아이 체중 성장 기록이 없습니다';
let arr_smc_no = [
<#if (model['lm_child'])?has_content>
<#list model['lm_child'] as item>
${item['smc_no']},
</#list>
</#if>
];
function fncGoDday(d_day_year, d_day_month) {
if(d_day_year == null) {
location.href = "${URL_ROOT}/m/member_env/setting_env_viewnm.do?return_url=setting&view_nm=view_d_day";
} else {
location.href = "${URL_ROOT}/m/member_env/setting_env_viewnm.do?return_url=setting&view_nm=view_d_day&viewYear=" + d_day_year + "&viewMonth=" + d_day_month;
}
$(document).ready(function(){
//if(arr_smc_no.length > 0) ajax_child_info(0);
});
}
</script>
<!-- 하단 네비 iyu_nav -->
<#include "/m/include/index_bottom_menu.ftl">
<!-- //iyu_nav -->
Loading…
Cancel
Save