var Ex_Code ="CEKwu";
var Ex_Code_eye ="gF1UcF"; // 新的一波活動 LaMER | 緊緻彈力眼部精萃
// 判斷是用手機還是用PC登入
function detectmob() {
if( navigator.userAgent.match(/Android/i)
|| navigator.userAgent.match(/webOS/i)
|| navigator.userAgent.match(/iPhone/i)
|| navigator.userAgent.match(/iPad/i)
|| navigator.userAgent.match(/iPod/i)
|| navigator.userAgent.match(/BlackBerry/i)
|| navigator.userAgent.match(/Windows Phone/i)
){
return true;
}
else {
return false;
}
}
var isMobile_check = detectmob();
if (isMobile_check == true){
isMobileWeb='1';
}else{
isMobileWeb='0';
}
// 秀出是手機還是pc的訊息
// alert(isMobileWeb);
/////////// Kuei Start ////////////
//判斷是否為手持裝置
if(isMobileWeb!='1'){
var isMobile = false;
(function (a) {
(/android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|xda(\-|2|g)|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4))) ? isMobile = true: isMobile = false;
})(navigator.userAgent || navigator.vendor || window.opera, true, false);
//alert(window.location.search);
if(isMobile) window.location.href="m/index.php"+window.location.search;
}
function SetCookie(name,value)
{
var Days = 30; //此 cookie 将被保存 30 天
var exp = new Date(); //new Date("December 31, 9998");
exp.setTime(exp.getTime() + Days*24*60*60*1000);
document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();
}
function getCookie(name)//取cookies函数
{
var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
if(arr != null) return unescape(arr[2]); return null;
}
function delCookie(name)//删除cookie
{
var exp = new Date();
exp.setTime(exp.getTime() - 1);
var cval=getCookie(name);
if(cval!=null) document.cookie= name + "="+cval+";expires="+exp.toGMTString();
}
function clickga(url){
ga('send','event',url,url,url);
if(window.console) console.log('clickga:'+url);
}
if(facebook_app_id!='')
{
window.fbAsyncInit = function() {
FB.init({
appId : facebook_app_id,
xfbml : true,
version : 'v2.3'
});
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
}
function loginFirst(response) {
if(window.console) console.log('loginFirst');
if(response && response.status == 'connected') {
if(window.console) {
if(window.console) console.log('Access Token: ' + response.authResponse.accessToken);
if(window.console) console.log(response);
FB.api('/me', {fields: 'id,name,email,gender,link'} , function(response) {
console.log('Good to see you, ' + response.name + '.');
console.log(response);
});
}
FB.api('/me', {fields: 'id,name,email,gender,link'} , function(response) {
$('#_fb_name').val(response.name);
$('#_fb_email').val(response.email);
$('#_fb_uid').val(response.id);
$('#_fb_gender').val(response.gender);
$('#_fb_link').val(response.link);
//alert(response.id);
SetCookie('fb_name',response.name);
SetCookie('fb_email',response.email);
SetCookie('fb_uid',response.id);
SetCookie('fb_gender',response.gender);
SetCookie('fb_link',response.link);
});
} else {
}
}
function loginFirst2(response) {
if(window.console) console.log('loginFirst2');
if(response && response.status == 'connected') {
if(window.console) {
if(window.console) console.log('Access Token: ' + response.authResponse.accessToken);
if(window.console) console.log(response);
FB.api('/me', {fields: 'id,name,email,gender,link'} , function(response) {
console.log('Good to see you, ' + response.name + '.');
console.log(response);
});
}
FB.api('/me', {fields: 'id,name,email,gender,link'} , function(response) {
$('#_fb_name').val(response.name);
$('#_fb_email').val(response.email);
$('#_fb_uid').val(response.id);
$('#_fb_gender').val(response.gender);
$('#_fb_link').val(response.link);
//alert(response.id);
SetCookie('fb_name',response.name);
SetCookie('fb_email',response.email);
SetCookie('fb_uid',response.id);
SetCookie('fb_gender',response.gender);
SetCookie('fb_link',response.link);
$('.reserve_btn').trigger('click');
});
} else {
}
}
function checkLoginStatus(response) {
if(window.console) console.log('checkLoginStatus');
if(response && response.status == 'connected') {
if(window.console) {
if(window.console) console.log('Access Token: ' + response.authResponse.accessToken);
if(window.console) console.log(response);
FB.api('/me', {fields: 'id,name,email,gender,link'} , function(response) {
console.log('Good to see you, ' + response.name + '.');
console.log(response);
});
}
FB.api('/me', {fields: 'id,name,email,gender,link'} , function(response) {
$('#_fb_name').val(response.name);
$('#_fb_email').val(response.email);
$('#_fb_uid').val(response.id);
$('#_fb_gender').val(response.gender);
$('#_fb_link').val(response.link);
//alert(response.id);
SetCookie('fb_name',response.name);
SetCookie('fb_email',response.email);
SetCookie('fb_uid',response.id);
SetCookie('fb_gender',response.gender);
SetCookie('fb_link',response.link);
shareTicket();
});
} else {
}
}
function shareTicket() {
//if (typeof clickga == 'function') {clickga('fb_share7');}
var feed_name = $('#_name').val()+'的海洋拉娜故事';
var feed_desc = $('#_txt').val();
if(window.console) console.log(feed_name);
if(isMobileWeb!=1){
FB.ui({
method: 'feed',
name: feed_name,
link: 'http://www.cremedelamerstory.com/?utm_source=facebook&utm_medium=share&i='+user_time,
picture: 'http://www.cremedelamerstory.com/fb.php?i='+user_time,
caption: '海洋拉娜',
description: feed_desc
},
function(response) {
if (response && response.post_id) {
if(window.console) console.log(response);
$('#fb_post_id').val(response.post_id);
alert('分享完成!');
location.replace('http://event.artstudio.com.tw/MyLaMerStory/');
}
}
);
}else{
var ll = 'http://www.cremedelamerstory.com/?utm_source=facebook&utm_medium=share';
var ll2 = 'http://www.cremedelamerstory.com/m/'+window.location.search;
var pic = 'http://www.cremedelamerstory.com/fb.php?i='+user_time;
var share_url = 'https://m.facebook.com/dialog/feed?app_id='+facebook_app_id+'&caption='+encodeURIComponent(feed_name)+'&description='+encodeURIComponent(feed_desc)+'&picture='+encodeURIComponent(pic)+'&link='+encodeURIComponent(ll)+'&redirect_uri='+encodeURIComponent(ll2);
location.href=share_url;
}
}
/*
autohor: kuei
description:檢查輸入的身份証是否正確
@param 身份証 (id)
@return bollean (true or false)
*/
function checkID( id ) {
tab = "ABCDEFGHJKLMNPQRSTUVXYWZIO"
A1 = new Array (1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3 );
A2 = new Array (0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5 );
Mx = new Array (9,8,7,6,5,4,3,2,1,1);
if ( id.length != 10 ) return false;
i = tab.indexOf( id.charAt(0) );
if ( i == -1 ) return false;
sum = A1[i] + A2[i]*9;
for ( i=1; i<10; i++ ) {
v = parseInt( id.charAt(i) );
if ( isNaN(v) ) return false;
sum = sum + v * Mx[i];
}
if ( sum % 10 != 0 ) return false;
return true;
}
function shareVideo(i) {
//if (typeof clickga == 'function') {clickga('fb_share7');}
if(i=='1'){
var feed_name = '乳霜裡的美麗故事';
var feed_desc = '每一瓶海洋拉娜乳霜的背後,都有段美麗故事。你的故事是什麼呢?#MyLaMerStory';
var pic = 'http://www.cremedelamerstory.com/fb_sharevideo1.jpg';
var shareLink = 'https://youtu.be/vn38LJEfslI';
}else{
var feed_name = 'LA MER:來自深海的美麗奇蹟';
var feed_desc = '自孕育生命的大海,經過歲月的淬鍊而誕生。海洋拉娜的不朽傳奇,是個充滿希望、堅持不懈與頂級工藝的奇蹟故事,為肌膚帶來美麗轉變,重獲新生。';
var shareLink = 'https://youtu.be/p5OfyvSaMDM';
var pic = 'http://www.cremedelamerstory.com/fb_sharevideo3.jpg';
}
if(window.console) console.log(feed_name);
if(isMobileWeb!=1){
FB.ui({
method: 'feed',
name: feed_name,
link: shareLink,
picture: pic,
caption: '海洋拉娜',
description: feed_desc
},
function(response) {
if (response && response.post_id) {
if(window.console) console.log(response);
//$('#fb_post_id').val(response.post_id);
}
}
);
}else{
var ll = shareLink;
var ll2 = 'http://www.cremedelamerstory.com/m/'+window.location.search;
//var pic = 'http://www.cremedelamerstory.com/fb_share600X315.jpg';
var share_url = 'https://m.facebook.com/dialog/feed?app_id='+facebook_app_id+'&caption='+encodeURIComponent(feed_name)+'&description='+encodeURIComponent(feed_desc)+'&picture='+encodeURIComponent(pic)+'&link='+encodeURIComponent(ll)+'&redirect_uri='+encodeURIComponent(ll2);
location.href=share_url;
}
}
function getQueryString_kuei(param) {
var q = document.location.search || document.location.hash;
if (param == null) { return q; }
if (q) {
var pairs = q.substring(1).split("&");
for (var i = 0; i < pairs.length; i++) {
if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
return pairs[i].substring((pairs[i].indexOf("=") + 1));
}
}
}
}
var utm_source = getQueryString_kuei('utm_source');
var utm_content = getQueryString_kuei('utm_content');
var utm_campaign = getQueryString_kuei('utm_campaign');
var utm_medium = getQueryString_kuei('utm_medium');
var utm_term = getQueryString_kuei('utm_term');
if(getQueryString_kuei('utm_source')!=undefined && getQueryString_kuei('utm_source')!='' && getQueryString_kuei('utm_source')!=null){
var utm_source_cookie = SetCookie('utm_source',utm_source);
var utm_content_cookie = SetCookie('utm_content',utm_content);
var utm_campaign_cookie = SetCookie('utm_campaign',utm_campaign);
var utm_medium_cookie = SetCookie('utm_medium',utm_medium);
var utm_term_cookie = SetCookie('utm_term',utm_term);
}
var utm_source_cookie = getCookie('utm_source');
var utm_content_cookie = getCookie('utm_content');
var utm_campaign_cookie = getCookie('utm_campaign');
var utm_medium_cookie = getCookie('utm_medium');
var utm_term_cookie = getCookie('utm_term');
if((utm_source=='' || utm_source==undefined) && utm_source_cookie!='') utm_source = utm_source_cookie;
if((utm_content=='' || utm_content==undefined) && utm_content_cookie!='') utm_content = utm_content_cookie;
if((utm_campaign=='' || utm_campaign==undefined) && utm_campaign_cookie!='') utm_campaign = utm_campaign_cookie;
if((utm_medium=='' || utm_medium==undefined) && utm_medium_cookie!='') utm_medium = utm_medium_cookie;
if((utm_term=='' || utm_term==undefined) && utm_term_cookie!='') utm_term = utm_term_cookie;
function IsNumber(string,sign)
{
var number;
if (string==null) return false;
if ((sign!=null) && (sign!='-') && (sign!='+'))
{
alert('IsNumber(string,sign)的參數出錯:\nsign為null或"-"或"+"');
return false;
}
number = new Number(string);
if (isNaN(number))
{
return false;
}
else if ((sign==null) || (sign=='-' && number<0) || (sign=='+' && number>0))
{
return true;
}
else return false;
}
function ValidEmail(emailtoCheck)
{
var regExp = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
if ( emailtoCheck.match(regExp) )
return true;
else
return false;
}
function checkField() {
$('.looktxt').css('display','none');
if($('#_name').val()==''){
alert("請填寫您的姓名!!");
$('.looktxt').css('display','block');
$('.looktxt').text('請填寫您的姓名!!');
return false;
}
if($('#_tel').val()==''){
alert("請填寫您的行動電話!!");
$('.looktxt').css('display','block');
$('.looktxt').text('請填寫您的行動電話!!');
return false;
}
if (($('#_tel').val()!="") && (IsNumber($('#_tel').val())==false)) {
alert("手機電話需全為數字!!(請勿以符號或全形數字輸入)");
$('.looktxt').css('display','block');
$('.looktxt').text('手機電話需全為數字!!(請勿以符號或全形數字輸入)');
return false;
}
if (($('#_tel').val()!="") && ($('#_tel').val().length != 10)) {
alert("手機電話號碼有問題請檢查!! 謝謝!!(請勿以符號或全形數字輸入)");
return false;
}
if ($('#_tel').val().substring(2,0)!='09') {
alert("請填寫正確的手機號碼!! 謝謝!!");
return false;
}
if ((!$('#_email').val() == "" && $('#_email').val().indexOf('@',0) == -1) || (!$('#_email').val() == "" && $('#_email').val().indexOf('.',0) == -1)){
alert("請填寫正確的email。");
$('.looktxt').css('display','block');
$('.looktxt').text('請填寫正確的email');
return false;
}
if(!ValidEmail($('#_email').val())){
alert("請填寫正確電子信箱!!");
$('.looktxt').css('display','block');
$('.looktxt').text('請填寫正確的email');
return false;
}
if($('#subfile').val()==''){
alert("請上傳您與海洋拉娜的照片!! 謝謝!!");
return false;
}
if($('#_txt').val()==''){
alert("請填寫您與海洋拉娜的故事!! 謝謝!!");
return false;
}
if(isMobileWeb==1){
if(!$("#agree2").prop("checked"))
{
alert('您必須勾選同意讓您的故事在海洋拉娜的官方網站以及社群網站上曝光才能參加本活動!');
return false;
}
}
/*
if ($('#ad1').val()=="") {
alert("請選擇您所在的縣市!!");
return false;
}
if ($('#ad2').val()=="") {
alert("請選擇您所在的市區鄉鎮!!");
return false;
}
if ($('#address').val()=="") {
alert("請填寫您的地址!!");
$('#address').focus();
return false;
}
if(!$('#address').val() == "")
{
if($('#address').val().length < 5)
{
alert("請填寫詳細地址!!");
$('#address').focus();
return false;
}
}
if($('#address').val().length < 5)
{
alert("請填寫詳細地址!!");
$('#address').focus();
return false;
}
if($('#_shop').length && $('#_shop').val() == ""){
alert("請選擇預約專櫃!!");
$('.looktxt').css('display','block');
$('.looktxt').text('請選擇預約專櫃');
return false;
}
if($("#agree").prop("checked") && $("#agree1").prop("checked"))
{
alert('快速眉妝訂製服務 與 精緻眉妝訂製服務 僅能二擇一喔!');
return false;
}
if(!$("#agree").prop("checked") && !$("#agree1").prop("checked")){
alert('請勾選您要預約的眉妝訂製服務 (二擇一)!');
return false;
}
if($('input[name=agree]:checked').val()!='1' && $('input[name=agree]:checked').val()!='2')
{
alert("請勾選您要預約的眉妝訂製服務 (二擇一)");
$('.looktxt').css('display','block');
$('.looktxt').text('請勾選您要預約的眉妝訂製服務 (二擇一)');
return false;
}
*/
return true;
}
function checkField2() {
$('.looktxt').css('display','none');
if($('#_name2').val()==''){
alert("請填寫您的姓名!!");
$('.looktxt').css('display','block');
$('.looktxt').text('請填寫您的姓名!!');
return false;
}
if($('#_tel2').val()==''){
alert("請填寫您的行動電話!!");
$('.looktxt').css('display','block');
$('.looktxt').text('請填寫您的行動電話!!');
return false;
}
if (($('#_tel2').val()!="") && (IsNumber($('#_tel2').val())==false)) {
alert("手機電話需全為數字!!(請勿以符號或全形數字輸入)");
$('.looktxt').css('display','block');
$('.looktxt').text('手機電話需全為數字!!(請勿以符號或全形數字輸入)');
return false;
}
if (($('#_tel2').val()!="") && ($('#_tel2').val().length != 10)) {
alert("手機電話號碼有問題請檢查!! 謝謝!!(請勿以符號或全形數字輸入)");
return false;
}
if ($('#_tel2').val().substring(2,0)!='09') {
alert("請填寫正確的手機號碼!! 謝謝!!");
return false;
}
if ((!$('#_email2').val() == "" && $('#_email2').val().indexOf('@',0) == -1) || (!$('#_email2').val() == "" && $('#_email2').val().indexOf('.',0) == -1)){
alert("請填寫正確的email。");
$('.looktxt').css('display','block');
$('.looktxt').text('請填寫正確的email');
return false;
}
if(!ValidEmail($('#_email2').val())){
alert("請填寫正確電子信箱!!");
$('.looktxt').css('display','block');
$('.looktxt').text('請填寫正確的email');
return false;
}
if($('#_shop2').length && $('#_shop2').val() == ""){
alert("請選擇預約專櫃!!");
$('.looktxt').css('display','block');
$('.looktxt').text('請選擇預約專櫃');
return false;
}
if(!$("#agree").prop("checked"))
{
alert('您必須勾選同意個資法條款才能參加本活動!');
return false;
}
//alert('fb_uid='+getCookie('fb_uid'));
if(getCookie('fb_uid')=='' || getCookie('fb_uid')==null ){
FB.login(loginFirst2, {scope:'email'});
return false;
}else{
}
/*
if($('#subfile').val()==''){
alert("請上傳您與海洋拉娜的照片!! 謝謝!!");
return false;
}
if($('#_txt').val()==''){
alert("請填寫您與海洋拉娜的故事!! 謝謝!!");
return false;
}
if ($('#ad1').val()=="") {
alert("請選擇您所在的縣市!!");
return false;
}
if ($('#ad2').val()=="") {
alert("請選擇您所在的市區鄉鎮!!");
return false;
}
if ($('#address').val()=="") {
alert("請填寫您的地址!!");
$('#address').focus();
return false;
}
if(!$('#address').val() == "")
{
if($('#address').val().length < 5)
{
alert("請填寫詳細地址!!");
$('#address').focus();
return false;
}
}
if($('#address').val().length < 5)
{
alert("請填寫詳細地址!!");
$('#address').focus();
return false;
}
if($('#_shop').length && $('#_shop').val() == ""){
alert("請選擇預約專櫃!!");
$('.looktxt').css('display','block');
$('.looktxt').text('請選擇預約專櫃');
return false;
}
if($("#agree").prop("checked") && $("#agree1").prop("checked"))
{
alert('快速眉妝訂製服務 與 精緻眉妝訂製服務 僅能二擇一喔!');
return false;
}
if(!$("#agree").prop("checked") && !$("#agree1").prop("checked")){
alert('請勾選您要預約的眉妝訂製服務 (二擇一)!');
return false;
}
if($('input[name=agree]:checked').val()!='1' && $('input[name=agree]:checked').val()!='2')
{
alert("請勾選您要預約的眉妝訂製服務 (二擇一)");
$('.looktxt').css('display','block');
$('.looktxt').text('請勾選您要預約的眉妝訂製服務 (二擇一)');
return false;
}
*/
return true;
}
// 立即預約-夢幻精選禮讚-20151023_add
function checkField3() {
if($('#_name3').val() == ''){
alert("請填寫您的姓名!!");
return false;
}
if($('#_tel3').val()==''){
alert("請填寫您的行動電話!!");
return false;
}
if (($('#_tel3').val()!="") && (IsNumber($('#_tel3').val())==false)) {
alert("手機電話需全為數字!!(請勿以符號或全形數字輸入)");
return false;
}
if (($('#_tel3').val()!="") && ($('#_tel3').val().length != 10)) {
alert("手機電話號碼有問題請檢查!! 謝謝!!(請勿以符號或全形數字輸入)");
return false;
}
if ($('#_tel3').val().substring(2,0)!='09') {
alert("請填寫正確的手機號碼!! 謝謝!!");
return false;
}
if ((!$('#_email3').val() == "" && $('#_email3').val().indexOf('@',0) == -1) || (!$('#_email3').val() == "" && $('#_email3').val().indexOf('.',0) == -1)){
alert("請填寫正確的email。");
return false;
}
if(!ValidEmail($('#_email3').val())){
alert("請填寫正確電子信箱!!");
return false;
}
if(!$("#agree3").prop("checked"))
{
alert('您必須勾選同意個資法條款才能參加本活動!');
return false;
}
return true;
}
// 立即預約-快閃活動11/18~11/23僅限五天限時搶購-20151112_add
function checkField4() {
if($('#_name3').val() == '' || $('#_name3').val() == '姓名'){
alert("請填寫您的姓名!!");
return false;
}
if($('#_tel3').val()=='' || $('#_tel3').val() == '手機號碼'){
alert("請填寫您的行動電話!!");
return false;
}
if (($('#_tel3').val()!="") && (IsNumber($('#_tel3').val())==false)) {
alert("手機電話需全為數字!!(請勿以符號或全形數字輸入)");
return false;
}
if (($('#_tel3').val()!="") && ($('#_tel3').val().length != 10)) {
alert("手機電話號碼有問題請檢查!! 謝謝!!(請勿以符號或全形數字輸入)");
return false;
}
if ($('#_tel3').val().substring(2,0)!='09') {
alert("請填寫正確的手機號碼!! 謝謝!!");
return false;
}
if (((!$('#_email3').val() == '' || $('#_email3').val() == '電子郵件信箱') && $('#_email3').val().indexOf('@',0) == -1) || ((!$('#_email3').val() == '' || $('#_email3').val() == '電子郵件信箱') && $('#_email3').val().indexOf('.',0) == -1)){
alert("請填寫正確的email。");
return false;
}
if(!ValidEmail($('#_email3').val())){
alert("請填寫正確電子信箱!!");
return false;
}
if(!$("#agree3").prop("checked"))
{
alert('您必須勾選同意個資法條款才能參加本活動!');
return false;
}
return true;
}
// 預約體驗-即日起至-20160430登記預約_add_20160307
function checkField5() {
if($('#_name').val() == '' || $('#_name').val() == '姓名'){
alert("請填寫您的姓名!!");
return false;
}
// alert("姓名長度==>"+$('#_name').val().length);
if(($('#_name').val() != '' || $('#_name').val() == '姓名') && ($('#_name').val().length == 1) ){
alert("請填寫您完整的姓名!!");
return false;
}
// 檢查填寫的身份証是否為空值
if($("#_id").val() == '' || $("#_id").val()=='身分證字號'){
alert("請填寫您的身份証!!");
return false;
}
// 檢查填寫的身份証是否正確
if(checkID($("#_id").val().toUpperCase()) == false ){
alert("請填寫正確身份証!!");
return false;
}
if($('#_tel').val()=='' || $('#_tel').val() == '手機號碼'){
alert("請填寫您的行動電話!!");
return false;
}
if (($('#_tel').val()!="") && (IsNumber($('#_tel').val())==false)) {
alert("手機電話需全為數字!!(請勿以符號或全形數字輸入)");
return false;
}
if (($('#_tel').val()!="") && ($('#_tel').val().length != 10)) {
alert("手機電話號碼有問題請檢查!! 謝謝!!(請勿以符號或全形數字輸入)");
return false;
}
if ($('#_tel').val().substring(2,0)!='09') {
alert("請填寫正確的手機號碼!! 謝謝!!");
return false;
}
if($('#_shop').length && $('#_shop').val() == ""){
alert("請選櫃點!! 謝謝!!");
return false;
}
if(!$("#agree").prop("checked"))
{
alert('您必須勾選同意個資法條款才能參加本活動!');
return false;
}
return true;
}
// 緊緻彈力眼部精萃_預約體驗-即日起至-20160430登記預約_add_20160325
function checkField6() {
if($('#_name').val() == '' || $('#_name').val() == '姓名'){
alert("請填寫您的姓名!!");
return false;
}
// alert("姓名長度==>"+$('#_name').val().length);
if(($('#_name').val() != '' || $('#_name').val() == '姓名') && ($('#_name').val().length == 1) ){
alert("請填寫您完整的姓名!!");
return false;
}
// 檢查填寫的身份証是否為空值
if($("#_id").val() == '' || $("#_id").val()=='身分證字號'){
alert("請填寫您的身份証!!");
return false;
}
// 檢查填寫的身份証是否正確
if(checkID($("#_id").val().toUpperCase()) == false ){
alert("請填寫正確身份証!!");
return false;
}
if($('#_tel').val()=='' || $('#_tel').val() == '手機號碼'){
alert("請填寫您的行動電話!!");
return false;
}
if (($('#_tel').val()!="") && (IsNumber($('#_tel').val())==false)) {
alert("手機電話需全為數字!!(請勿以符號或全形數字輸入)");
return false;
}
if (($('#_tel').val()!="") && ($('#_tel').val().length != 10)) {
alert("手機電話號碼有問題請檢查!! 謝謝!!(請勿以符號或全形數字輸入)");
return false;
}
if ($('#_tel').val().substring(2,0)!='09') {
alert("請填寫正確的手機號碼!! 謝謝!!");
return false;
}
if($('#_shop').length && $('#_shop').val() == ""){
alert("請選櫃點!! 謝謝!!");
return false;
}
if(!$("#agree").prop("checked"))
{
alert('您必須勾選同意個資法條款才能參加本活動!');
return false;
}
return true;
}
var user_time = '';
$().ready(function(){
if(window.console) console.log("活動新測試"); // 20151112-add
//var userAgent = navigator.userAgent;
if (getQueryString_kuei('la')==1){
if(isMobileWeb ==1){
close_new_pup();
if(window.console) console.log("new_pup_close");
}
else{
new_pop_close();
if(window.console) console.log("pop_close");
}
}
//upload camera image first
$("#file-input").change(function (){
var fileName = $(this).val();
if(window.console) console.log(fileName);
if(fileName!=''){
$("#storyForm").submit();
/*
setTimeout(function(){
$("#storyForm").submit();
}, 1000);
*/
}
});
//把 相機欄位的資料 post 出去 , 取得圖片網址
if(isMobileWeb==1) var url = '../index.php';
else var url = 'index.php';
$("#storyForm").submit(function(e){
$('.looktxt').text('檔案上傳中....');
$('.looktxt').css('display','block');
if(window.console) console.log('storyForm submit');
var formData = new FormData(this);
$.ajax({
type:'POST',
url: url,
data:formData,
cache:false,
contentType: false,
processData: false,
success:function(data){
if(window.console)console.log('camara file = '+data);
if(data=='系統忙碌') alert('系統忙碌');
else if(data=='檔案格式錯誤!支援格式:jpg,gif,png ') alert('檔案格式錯誤!支援格式:jpg,gif,png ');
else if(data=='') alert('未知的錯誤');
else $('#subfile').val(data);
$('.looktxt').text('檔案上傳成功!!');
//$('.looktxt').css('display','block');
},
error: function(data){
alert(data);
if(window.console){
console.log("error");
console.log(data);
}
}
});
e.preventDefault(); //Prevent Default action.
//e.unbind();
});
//add facebook input
$( "body" ).append("");
$('.looktxt').hide();
if(isMobileWeb==1 && getQueryString_kuei('post_id')!=undefined && getQueryString_kuei('post_id')!='' ){
alert('分享完成');
//location.replace('http://event.artstudio.com.tw/MyLaMerStory/m/');
$('#fb_post_id').val(getQueryString_kuei('post_id'));
if(getCookie('fb_name')!='') $('#_fb_name').val(getCookie('fb_name'));
if(getCookie('fb_email')!='') $('#_fb_email').val(getCookie('fb_email'));
if(getCookie('fb_uid')!='') $('#_fb_uid').val(getCookie('fb_uid'));
if(getCookie('fb_gender')!='') $('#_fb_gender').val(getCookie('fb_gender'));
if(getCookie('fb_link')!='') $('#_fb_link').val(getCookie('fb_link'));
}
var json_callback = function(msg){
//alert(msg);
if(window.console) console.log(msg);
$('.looktxt').text('');
$('.looktxt').css('display','block');
var json = [msg];
var s = msg.Statuss;
if(s=='success') {
user_time = msg.insert_time;
if (typeof clickga == 'function') { clickga('確認送出'); } //資料確認送出按鈕
//yahoo()
alert('您的資料已經送出');
//Submit()
$('#subfile').val('');
if(isMobileWeb=='1'){
$("#sendbtn").css("display","none")
$("#fbbtn").css("display","block")
}
else{
$("#sendbtn").css("display","none")
$("#fbbtn").css("display","block")
}
$('.looktxt').text('您的資料已經送出');
}
else if(s=='already') {
alert('您已經參加過了!'+$('#_fb_uid').val());
$('#_name').val('');
$('#_tel').val('');
$('#_email').val('');
$('#_txt').val('');
$('#subfile').val('');
$('.looktxt').text('您已經參加過了!');
}
else if(s=='shareSuccess') alert('分享成功');
else alert(s);
}
var json_callback2 = function(msg){
//alert(msg);
if(window.console) console.log(msg);
$('.looktxt').text('');
$('.looktxt').css('display','block');
var json = [msg];
var s = msg.Statuss;
if(s=='success') {
if (typeof clickga == 'function') { clickga('兌換確認送出'); } //資料確認送出按鈕
//yahoo()
alert('您的資料已經送出');
//Submit()
$('#subfile').val('');
if(isMobileWeb=='1'){}
else{
$("#sendbtn").css("display","none")
$("#fbbtn").css("display","block")
}
$('.looktxt').text('您的資料已經送出');
$('#_name2').val('');
$('#_tel2').val('');
$('#_email2').val('');
}else if(s=='block'){
alert('很抱歉,您已於系統內累計多次活動兌換紀錄,恕無法完成此動作。詳請洽lamer@tw.estee.com');
$('#_name2').val('');
$('#_tel2').val('');
$('#_email2').val('');
}
else if(s=='already') {
alert('您已經參加過了!!');
$('#_name2').val('');
$('#_tel2').val('');
$('#_email2').val('');
$('.looktxt').text('您已經參加過了');
}
else if(s=='shareSuccess') alert('分享成功');
else alert(s);
}
var json_callback3 = function(msg){ // 立即預約-夢幻精選禮讚-20151023_add
if(window.console) console.log(msg);
var json = [msg];
var s = msg.Statuss;
if(s=='success') {
if (typeof clickga == 'function') { clickga('登記預購確認送出'); }
alert('感謝您登記預購,提醒您於10/29-31 期間至台北新光三越信義A4 / A8 館選購領取!');
location.href="index.php?la=1";
}else if(s=='block'){
alert('您已預購夢幻精選組,無法再預購!!');
$('#_name3').val('');
$('#_tel3').val('');
$('#_email3').val('');
}
else if(s=='already') {
alert('您已經預購夢幻精選組!!');
$('#_name3').val('');
$('#_tel3').val('');
$('#_email3').val('');
}
else alert(s);
}
var json_callback4 = function(msg){ // 立即預約-快閃活動12/03~12/06僅限四天限時搶購-20151203_add
if(window.console) console.log(msg);
var json = [msg];
var s = msg.Statuss;
if(s=='success') {
if (typeof clickga == 'function') { clickga('登記預購確認送出'); }
alert('感謝您登記預購,提醒您於12/3-6 期間至高雄漢神百貨或新光三越台南新天地選購領取!');
location.href="index.php?la=1";
}else if(s=='block'){
alert('您已預購夢幻精選組,無法再預購!!');
$('#_name3').val('');
$('#_tel3').val('');
$('#_email3').val('');
}
else if(s=='already') {
alert('您已經預購夢幻精選組!!');
$('#_name3').val('');
$('#_tel3').val('');
$('#_email3').val('');
}
else alert(s);
}
// 預約體驗-即日起至-20160430登記預約_add_20160304
var json_callback5 = function(msg){
if(window.console) console.log(msg);
var json = [msg];
var s = msg.Statuss;
if(s=='success') {
// if (typeof clickga == 'function') { clickga('登記預購確認送出'); }
alert('感謝您登記完美無瑕精華凝霜體驗禮!即可憑手機簡訊至櫃上領取完美無瑕精華凝霜體驗禮」乙份');
$('#_name').val('');
$('#_tel').val('');
$('#_id').val('');
$('#_shop').val('');
$("input[type='checkbox']").attr("checked", false);
if(isMobileWeb!=1){
// scrollMove(5);
location.href="index.php?=coupon&la_out=1";
}else{
location.href="index.php?=coupon&la_out=1";
}
// location.href="index.php?la_out=1";
// window.location.reload();
}else if(s=='block'){
alert('您已預約完美無瑕精華凝霜體驗禮,無法再預約!!');
$('#_name').val('');
$('#_tel').val('');
$('#_id').val('');
$('#_shop').val('');
// $("#agree").attr("checked",false);
$("input[type='checkbox']").attr("checked", false);
}
else if(s=='already') {
alert('每人限兌領乙次,您已預約過完美無瑕精華凝霜體驗禮!!');
$('#_name').val('');
$('#_tel').val('');
$('#_id').val('');
$('#_shop').val('');
// $("#agree").attr("checked",false);
$("input[type='checkbox']").attr("checked", false);
}
else alert(s);
}
// 緊緻彈力眼部精萃_預約體驗-即日起至-20160430登記預約_add_20160325
var json_callback6 = function(msg){
if(window.console) console.log(msg);
var json = [msg];
var s = msg.Statuss;
if(s=='success') {
clickga('send_success');
alert('感謝您登記緊緻彈力眼部精萃體驗禮!即可憑手機簡訊至櫃上領取緊緻彈力眼部精萃體驗禮」乙份');
$('#_name').val('');
$('#_tel').val('');
$('#_id').val('');
$('#_shop').val('');
$("input[type='checkbox']").attr("checked", false);
if(isMobileWeb!=1){
// scrollMove(5);
// location.href="index.php?#/cupon&laeye_out=1";
location.href="index.php?laeye_out=1/cupon";
}else{
// location.href="index.php?#/cupon&laeye_out=1";
location.href="index.php?laeye_out=1/cupon";
}
// location.href="index.php?la_out=1";
// window.location.reload();
}else if(s=='block'){
alert('您已預約緊緻彈力眼部精萃體驗禮,無法再預約!!');
$('#_name').val('');
$('#_tel').val('');
$('#_id').val('');
$('#_shop').val('');
// $("#agree").attr("checked",false);
$("input[type='checkbox']").attr("checked", false);
}
else if(s=='already') {
alert('每人限兌領乙次,您已預約過緊緻彈力眼部精萃體驗禮!!');
$('#_name').val('');
$('#_tel').val('');
$('#_id').val('');
$('#_shop').val('');
// $("#agree").attr("checked",false);
$("input[type='checkbox']").attr("checked", false);
}else if (s =='over_total'){
alert('本日預約名額已滿,請明日中午過後重新登錄!!');
$('#_name').val('');
$('#_tel').val('');
$('#_id').val('');
$('#_shop').val('');
$("input[type='checkbox']").attr("checked", false);
if(isMobileWeb!=1){
// location.href="index.php?#/cupon&laeye_out=1";
location.href="index.php?day_end=1/cupon";
}else{
// location.href="index.php?#/cupon&laeye_out=1";
location.href="index.php?day_end=1/cupon";
}
}else if (s =='count_over_total'){
alert('預約名額已滿!!感謝大家熱情的參與!!');
$('#_name').val('');
$('#_tel').val('');
$('#_id').val('');
$('#_shop').val('');
$("input[type='checkbox']").attr("checked", false);
if(isMobileWeb!=1){
// location.href="index.php?#/cupon&laeye_out=1";
location.href="index.php?total_end=1/cupon";
}else{
// location.href="index.php?#/cupon&laeye_out=1";
location.href="index.php?total_end=1/cupon";
}
}else alert(s);
}
var ad1 = '';
var ad2 = '';
var area = '';
var shop = '';
var user_date = '';
if(window.console) console.log('actCode = '+actCode);
//send
$('#sendbtn').click(function() {
if(window.console) {console.log('確認送出 click');}
if(getCookie('fb_name')!='' && getCookie('fb_name')!=null ) $('#_fb_name').val(getCookie('fb_name'));
if(getCookie('fb_email')!='' && getCookie('fb_email')!=null ) $('#_fb_email').val(getCookie('fb_email'));
if(getCookie('fb_uid')!='' && getCookie('fb_uid')!=null ) $('#_fb_uid').val(getCookie('fb_uid'));
if(getCookie('fb_gender')!='' && getCookie('fb_gender')!=null ) $('#_fb_gender').val(getCookie('fb_gender'));
if(getCookie('fb_link')!='' && getCookie('fb_link')!=null ) $('#_fb_link').val(getCookie('fb_link'));
var a = checkField();
if(a){
$.ajax({
//url: 'https://event.artstudio.com.tw/_ccp/reg.php',
url: 'https://sp.artstudio.com.tw/reg2017_artstudio.php',
crossDomain: true,
dataType: 'jsonp',
contentType: "application/json",
jsonpCallback: 'json_callback',
data: {
actCode: actCode,
uname: $('#_name').val(),
phone: $('#_tel').val(),
email: $('#_email').val(),
note: $('#_txt').val(),
//uploadimg: $('#subfile').val(),
//ad1: $('#ad1').val(),
//ad2: $('#ad2').val(),
//address: $('#address').val(),
//area: $('#vote_value').val(),
//fb_post_id: $('#fb_post_id').val(),
//shop: $('#_shop').val(),
//agree: $('input[name=agree]:checked').val(),
utm_campaign:utm_campaign,
utm_medium:utm_medium,
utm_term:utm_term,
utm_source:utm_source,
utm_content:utm_content,
isMobileWeb:isMobileWeb,
//muc2015:muc2015_var,
fb_name:$('#_fb_name').val(),
fb_email:$('#_fb_email').val(),
fb_uid:$('#_fb_uid').val(),
fb_gender:$('#_fb_gender').val(),
fb_link:$('#_fb_link').val()
},
success:json_callback
//error: json_callback3
}).done(function(data){
//dddone();
});
}
});
/*
$('#_name2').click(function() {
if(window.console) console.log('_name2 click'+getCookie('fb_uid')+'===');
if(getCookie('fb_uid')=='' || getCookie('fb_uid')==null ){
FB.login(loginFirst, {scope:'email'});
}
});
$('#_tel2').click(function() {
if(window.console) console.log('_tel2 click'+getCookie('fb_uid')+'===');
if(getCookie('fb_uid')=='' || getCookie('fb_uid')==null ){
FB.login(loginFirst, {scope:'email'});
}
});
$('#_email2').click(function() {
if(window.console) console.log('_email2 click'+getCookie('fb_uid')+'===');
if(getCookie('fb_uid')=='' || getCookie('fb_uid')==null ){
FB.login(loginFirst, {scope:'email'});
}
});
*/
//立即體驗
$('.reserve_btn').click(function() {
if(window.console) {console.log('立即體驗 click');}
if(getCookie('fb_name')!='' && getCookie('fb_name')!=null ) $('#_fb_name').val(getCookie('fb_name'));
if(getCookie('fb_email')!='' && getCookie('fb_email')!=null ) $('#_fb_email').val(getCookie('fb_email'));
if(getCookie('fb_uid')!='' && getCookie('fb_uid')!=null ) $('#_fb_uid').val(getCookie('fb_uid'));
if(getCookie('fb_gender')!='' && getCookie('fb_gender')!=null ) $('#_fb_gender').val(getCookie('fb_gender'));
if(getCookie('fb_link')!='' && getCookie('fb_link')!=null ) $('#_fb_link').val(getCookie('fb_link'));
var a = checkField2();
if(a){
$.ajax({
url: 'https://event.artstudio.com.tw/_ccp/reg.php',
crossDomain: true,
dataType: 'jsonp',
contentType: "application/json",
jsonpCallback: 'json_callback',
data: {
actCode: actCode,
uname: $('#_name2').val(),
phone: $('#_tel2').val(),
email: $('#_email2').val(),
shop: $('#_shop2').val(),
//uploadimg: $('#subfile').val(),
agree: $('input[name=agree]:checked').val(),
utm_campaign:utm_campaign,
utm_medium:utm_medium,
utm_term:utm_term,
utm_source:utm_source,
utm_content:utm_content,
isMobileWeb:isMobileWeb,
//muc2015:muc2015_var,
fb_name:$('#_fb_name').val(),
fb_email:$('#_fb_email').val(),
fb_uid:$('#_fb_uid').val(),
fb_gender:$('#_fb_gender').val(),
fb_link:$('#_fb_link').val()
},
success:json_callback2
//error: json_callback3
}).done(function(data){
//dddone();
});
}
});
//立即體驗-夢幻精選禮讚-20151023_add
$('.new_btn').click(function() {
if(window.console) {console.log('立即體驗-夢絓精選禮讚 click');}
if(getCookie('fb_name')!='' && getCookie('fb_name')!=null ) $('#_fb_name').val(getCookie('fb_name'));
if(getCookie('fb_email')!='' && getCookie('fb_email')!=null ) $('#_fb_email').val(getCookie('fb_email'));
if(getCookie('fb_uid')!='' && getCookie('fb_uid')!=null ) $('#_fb_uid').val(getCookie('fb_uid'));
if(getCookie('fb_gender')!='' && getCookie('fb_gender')!=null ) $('#_fb_gender').val(getCookie('fb_gender'));
if(getCookie('fb_link')!='' && getCookie('fb_link')!=null ) $('#_fb_link').val(getCookie('fb_link'));
var a = checkField3();
if(a){
$.ajax({
url: 'https://event.artstudio.com.tw/_ccp/reg.php',
crossDomain: true,
dataType: 'jsonp',
contentType: "application/json",
jsonpCallback: 'json_callback',
data: {
actCode: actCode,
uname: $('#_name3').val(),
phone: $('#_tel3').val(),
email: $('#_email3').val(),
note: 'only_La', // 新增加判斷-預約夢幻精選禮讚-20151023_add
uploadimg: 'only_La', // 判斷不傳送簡訊用的
agree: $('input[name=agree3]:checked').val(),
utm_campaign:utm_campaign,
utm_medium:utm_medium,
utm_term:utm_term,
utm_source:utm_source,
utm_content:utm_content,
isMobileWeb:isMobileWeb,
//muc2015:muc2015_var,
fb_name:$('#_fb_name').val(),
fb_email:$('#_fb_email').val(),
fb_uid:$('#_fb_uid').val(),
fb_gender:$('#_fb_gender').val(),
fb_link:$('#_fb_link').val()
},
success:json_callback3
//error: json_callback3
}).done(function(data){
//dddone();
});
}
});
// 立即預約-快閃活動12/03早上00:00~12/6僅限四天限時搶購-20151202_add
$('#sendbtn_new').click(function() {
// if(window.console) {console.log('立即預約-快閃活動12/03~12/06僅限四天限時搶購 click');}
if(getCookie('fb_name')!='' && getCookie('fb_name')!=null ) $('#_fb_name').val(getCookie('fb_name'));
if(getCookie('fb_email')!='' && getCookie('fb_email')!=null ) $('#_fb_email').val(getCookie('fb_email'));
if(getCookie('fb_uid')!='' && getCookie('fb_uid')!=null ) $('#_fb_uid').val(getCookie('fb_uid'));
if(getCookie('fb_gender')!='' && getCookie('fb_gender')!=null ) $('#_fb_gender').val(getCookie('fb_gender'));
if(getCookie('fb_link')!='' && getCookie('fb_link')!=null ) $('#_fb_link').val(getCookie('fb_link'));
var a = checkField4();
if(a){
$.ajax({
url: 'https://event.artstudio.com.tw/_ccp/reg.php',
crossDomain: true,
dataType: 'jsonp',
contentType: "application/json",
jsonpCallback: 'json_callback',
data: {
actCode: actCode,
uname: $('#_name3').val(),
phone: $('#_tel3').val(),
email: $('#_email3').val(),
note: 'only_La_new', // 新增加判斷立即預約-快閃活動12/03早上00:00~12/6僅限四天限時搶購-20151202_add
uploadimg: 'only_La_new_4', // 判斷不傳送簡訊用的
agree: $('input[name=agree3]:checked').val(),
utm_campaign:utm_campaign,
utm_medium:utm_medium,
utm_term:utm_term,
utm_source:utm_source,
utm_content:utm_content,
isMobileWeb:isMobileWeb,
//muc2015:muc2015_var,
fb_name:$('#_fb_name').val(),
fb_email:$('#_fb_email').val(),
fb_uid:$('#_fb_uid').val(),
fb_gender:$('#_fb_gender').val(),
fb_link:$('#_fb_link').val()
},
success:json_callback4
//error: json_callback3
}).done(function(data){
//dddone();
});
}
});
// 預約體驗-即日起至-20160430登記預約_add_20160304
$('#sendbtn_res').click(function() {
// if(window.console) {console.log('立即預約-快閃活動12/03~12/06僅限四天限時搶購 click');}
if(getCookie('fb_name')!='' && getCookie('fb_name')!=null ) $('#_fb_name').val(getCookie('fb_name'));
if(getCookie('fb_email')!='' && getCookie('fb_email')!=null ) $('#_fb_email').val(getCookie('fb_email'));
if(getCookie('fb_uid')!='' && getCookie('fb_uid')!=null ) $('#_fb_uid').val(getCookie('fb_uid'));
if(getCookie('fb_gender')!='' && getCookie('fb_gender')!=null ) $('#_fb_gender').val(getCookie('fb_gender'));
if(getCookie('fb_link')!='' && getCookie('fb_link')!=null ) $('#_fb_link').val(getCookie('fb_link'));
var a = checkField5();
if(a){
$.ajax({
url: 'https://event.artstudio.com.tw/_ccp/reg_MyLa.php',
crossDomain: true,
dataType: 'jsonp',
contentType: "application/json",
jsonpCallback: 'json_callback5',
data: {
actCode: actCode,
uname: $('#_name').val(),
phone: $('#_tel').val(),
id: $('#_id').val(), // 身份証
shop: $('#_shop').val(), // 櫃點
note: 'only_La_new_5', // 新增加判斷立即預約-快閃活動12/03早上00:00~12/6僅限四天限時搶購-20151202_add
uploadimg: 'only_La_new_5', // 要傳送簡訊
Ex_Code: Ex_Code, // 亂數五碼
user_message: '0', // 是否兌換,未兌換0 已兌換1
utm_campaign:utm_campaign,
utm_medium:utm_medium,
utm_term:utm_term,
utm_source:utm_source,
utm_content:utm_content,
isMobileWeb:isMobileWeb,
fb_name:$('#_fb_name').val(),
fb_email:$('#_fb_email').val(),
fb_uid:$('#_fb_uid').val(),
fb_gender:$('#_fb_gender').val(),
fb_link:$('#_fb_link').val()
},
success:json_callback5
//error: json_callback3
}).done(function(data){
//dddone();
});
}
});
// 緊緻彈力眼部精萃_預約體驗-即日起至-20160430登記預約_add_20160325
$('#sendbtn_eye').click(function() {
// if(window.console) {console.log('立即預約-快閃活動12/03~12/06僅限四天限時搶購 click');}
if(getCookie('fb_name')!='' && getCookie('fb_name')!=null ) $('#_fb_name').val(getCookie('fb_name'));
if(getCookie('fb_email')!='' && getCookie('fb_email')!=null ) $('#_fb_email').val(getCookie('fb_email'));
if(getCookie('fb_uid')!='' && getCookie('fb_uid')!=null ) $('#_fb_uid').val(getCookie('fb_uid'));
if(getCookie('fb_gender')!='' && getCookie('fb_gender')!=null ) $('#_fb_gender').val(getCookie('fb_gender'));
if(getCookie('fb_link')!='' && getCookie('fb_link')!=null ) $('#_fb_link').val(getCookie('fb_link'));
var a = checkField6();
if(a){
$.ajax({
url: 'https://event.artstudio.com.tw/_ccp/reg_MyLa.php',
crossDomain: true,
dataType: 'jsonp',
contentType: "application/json",
jsonpCallback: 'json_callback6',
data: {
actCode: actCode,
uname: $('#_name').val(),
phone: $('#_tel').val(),
id: $('#_id').val(), // 身份証
shop: $('#_shop').val(), // 櫃點
note: 'LiftingEyeSerum', // 新增加判斷立即預約-快閃活動12/03早上00:00~12/6僅限四天限時搶購-20151202_add
uploadimg: 'LiftingEyeSerum', // 要傳送簡訊
Ex_Code: Ex_Code_eye, // 亂數六碼,不要和上一波活動相同
user_message: '0', // 是否兌換,未兌換0 已兌換1
utm_campaign:utm_campaign,
utm_medium:utm_medium,
utm_term:utm_term,
utm_source:utm_source,
utm_content:utm_content,
isMobileWeb:isMobileWeb,
fb_name:$('#_fb_name').val(),
fb_email:$('#_fb_email').val(),
fb_uid:$('#_fb_uid').val(),
fb_gender:$('#_fb_gender').val(),
fb_link:$('#_fb_link').val()
},
success:json_callback6
//error: json_callback3
}).done(function(data){
//dddone();
});
}
});
//if(window.console){console.log('muc2015 = '+muc2015);}
//$('#total_member').html('');
});
$( window ).load(function() {
if(window.console){console.log(window.location.host);}
});