123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <meta name="robots" content="noindex , follow">
- <meta name="description" content="幸福空間 - 裝修計算機">
- <title>幸福空間 - 裝修計算機</title>
- <link rel="icon" href="assets/images/favicon.ico">
- <link rel="stylesheet" href="assets/font-awesome-4.7.0/css/font-awesome.min.css">
- <link rel="stylesheet" href="assets/css/{css}?v={timestamp}">
- <link rel="stylesheet" href="assets/css/main.css">
- <script src="assets/js/jquery-3.4.1.min.js"></script>
- <script src="assets/js/vue.min.js"></script>
- <script src="assets/js/moment.min.js"></script>
- <script src="assets/js/sweetalert2.all.min.js"></script>
- <script src="assets/js/popper.min.js"></script>
- <script src="assets/js/bootstrap.min.js"></script>
- <script src="https://cdn.jsdelivr.net/npm/promise-polyfill@7.1.0/dist/promise.min.js"></script>
- <script src="https://apis.google.com/js/api:client.js" defer></script>
- <meta name="google-signin-client_id" content="{ci_google_client_id}">
- <style>
- .btn:focus,
- .btn.focus {
- box-shadow: none;
- }
- .form-control:focus {
- border-color: #ced4da;
- }
- .dropdown-item:hover {
- color: #FFF !important;
- background-color: #3facff;
- }
- .form-control:disabled {
- background-color: transparent;
- }
- input:-webkit-autofill,
- input:-webkit-autofill:hover,
- input:-webkit-autofill:focus,
- input:-webkit-autofill:active {
- -webkit-transition-delay: 99999s;
- -webkit-transition: background-color 99999s ease-out;
- }
- </style>
- <!-- Google Tag Manager -->
- <script>(function (w, d, s, l, i) {
- w[l] = w[l] || []; w[l].push({
- 'gtm.start':
- new Date().getTime(), event: 'gtm.js'
- }); var f = d.getElementsByTagName(s)[0],
- j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src =
- 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f);
- })(window, document, 'script', 'dataLayer', 'GTM-W3RJHTZ');</script>
- <!-- End Google Tag Manager -->
- </head>
- <body ontouchstart="" style="background-color: {background-color};">
- <!-- Google Tag Manager (noscript) -->
- <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-W3RJHTZ" height="0" width="0"
- style="display:none;visibility:hidden"></iframe></noscript>
- <!-- End Google Tag Manager (noscript) -->
- <div id="app" v-cloak>
- <!-- login layout -->
- <div class="formWrapper container mt-md-4 pt-md-3" v-if="!dataSent">
- <div class="row justify-content-center">
- <nav class="navbar navbar-light d-flex justify-content-center">
- <a class="navbar-brand d-flex justify-content-center" href="/">
- <img class="d-inline-block" src="/assets/images/hhh-logo2.svg" width="145" height="40"
- alt="hhh-logo" {logo_hidden}>
- </a>
- </nav>
- <div class="col-md-12 px-4Up px-md-0">
- <div class="row justify-content-center">
- <h2 class="font-weight-bold mt-3 justify-content-center">裝修計算機
- </h2>
- </div>
- <div class="row justify-content-center">
- <h6 class="font-weight-normal text-muted my-2">
- 已提供
- <span class="font-weight-bold" style="color: #4099d0!important;">{{ peopleCount }}</span>
- 人進行裝修報價
- </h6>
- </div>
- <div class="row justify-content-center">
- <a class="tag-item" href="https://hhh.com.tw/deco/" target="_blank">
- <h5 class="font-weight-normal text-primary">第一次裝修嗎?請點我!<img
- src="/assets/images/calculator/tap.svg" alt="手指" />
- </h5>
- </a>
- </div>
- </div>
- <div class="col-md-10 px-4Up px-md-0 mt-md-4">
- <!-- <form action="/about/calculator_result" method="POST">-->
- <!-- <form class="calulator-form" action=""> -->
- <div class="row">
- <div class="col-md-4">
- <div class="formTheme formTheme--style mt-3 mb-2 my-md-0">
- <div class="line line--lf"></div>
- <div class="formTheme__title">聯絡方式</div>
- <div class="line line--rt"></div>
- </div>
- <div class="formAside" {login_hidden}>
- <button type="button" class="login-media-wrapper btn no-padding mt-3"
- @click="thirdSubmit('facebook')">
- <div class="d-flex login-media-content py-2">
- <div class="login-media-img">
- <img class="login-media-img-item before"
- src="/assets/images/section/icon/login/f.svg" width="30" height="30"
- alt="幸福空間臉書">
- <img class="login-media-img-item after"
- src="/assets/images/section/icon/login/f_w.svg" width="30"
- height="30" alt="幸福空間臉書">
- </div>
- <div class="login-media-context">
- FACEBOOK 快速登入
- </div>
- </div>
- </button>
- <button type="button" class="login-media-wrapper btn no-padding mt-3"
- id="google-login">
- <!-- <button type="button" class="login-media-wrapper btn no-padding mt-3" @click="thirdSubmit('google')">-->
- <!-- <button class="login-media-wrapper btn no-padding mb-3" id="google-login">-->
- <div class="d-flex login-media-content py-2">
- <div class="login-media-img">
- <img class="login-media-img-item before"
- src="/assets/images/section/icon/login/g.svg" width="30" height="30"
- alt="幸福空間GOOGLE">
- <img class="login-media-img-item after"
- src="/assets/images/section/icon/login/g_w.svg" width="30"
- height="30" alt="幸福空間GOOGLE">
- </div>
- <div class="login-media-context">
- GOOGLE 快速登入
- </div>
- </div>
- </button>
- </div>
- <!-- 電子郵件 Start -->
- <div class="formAside mt-3">
- <input type="text" class="form-control form-text-height" placeholder="請輸入信箱"
- v-model="formData.email">
- </div>
- <!-- 電子郵件 End -->
- <!-- 姓名 Start -->
- <div class="formAside mt-3">
- <input type="text" class="form-control form-text-height" placeholder="請輸入姓名"
- v-model="formData.name">
- </div>
- <!-- 姓名 End -->
- <div class="formAside mt-3">
- <input type="tel" class="form-control form-text-height" placeholder="請輸入電話"
- v-model="formData.phone">
- </div>
- <div class="text-right small text-danger" id="phone-error"></div>
- <!-- <div class="formAside mt-3">-->
- <!-- <input type="text" class="form-control form-text-height" placeholder="意見回饋 我想要著重採光及動線規劃..."-->
- <!-- v-model="formData.message">-->
- <!-- </div>-->
- </div>
- <div class="col-md-8">
- <div class="formTheme formTheme--style">
- <div class="line line--lf"></div>
- <div class="formTheme__title"> 我的裝修資訊</div>
- <div class="line line--rt"></div>
- </div>
- <div class="row">
- <div class="col-md-6 pr-md-2">
- <div class="dropdown mt-3">
- <button class="btn btn-block formDropdown formDropdown--style" type="button"
- data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- <span>{{display.house_type}}</span>
- <i class="fa fa-angle-down" aria-hidden="true"></i>
- </button>
- <div class="dropdown-menu dropdown-menus">
- <a class="dropdown-item" @click="set_value('house_type','中古屋')">中古屋</a>
- <a class="dropdown-item" @click="set_value('house_type','新成屋')">新成屋</a>
- <a class="dropdown-item" @click="set_value('house_type','毛胚屋')">毛胚屋</a>
- </div>
- </div>
- <div class="text-right small text-danger" id="house_type-error"></div>
- <div class="dropdown mt-3">
- <button class="btn btn-block formDropdown formDropdown--style" type="button"
- data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- <span>{{display.location}}</span>
- <i class="fa fa-angle-down" aria-hidden="true"></i>
- </button>
- <div class="dropdown-menu dropdown-menus">
- <a class="dropdown-item" @click="set_value('location','基隆市')">基隆市</a>
- <a class="dropdown-item" @click="set_value('location','台北市')">台北市</a>
- <a class="dropdown-item" @click="set_value('location','新北市')">新北市</a>
- <a class="dropdown-item" @click="set_value('location','桃園市')">桃園市</a>
- <a class="dropdown-item" @click="set_value('location','新竹縣')">新竹縣</a>
- <a class="dropdown-item" @click="set_value('location','新竹市')">新竹市</a>
- <a class="dropdown-item" @click="set_value('location','苗栗縣')">苗栗縣</a>
- <a class="dropdown-item" @click="set_value('location','台中市')">台中市</a>
- <a class="dropdown-item" @click="set_value('location','彰化縣')">彰化縣</a>
- <a class="dropdown-item" @click="set_value('location','南投縣')">南投縣</a>
- <a class="dropdown-item" @click="set_value('location','雲林縣')">雲林縣</a>
- <a class="dropdown-item" @click="set_value('location','嘉義縣')">嘉義縣</a>
- <a class="dropdown-item" @click="set_value('location','嘉義市')">嘉義市</a>
- <a class="dropdown-item" @click="set_value('location','台南市')">台南市</a>
- <a class="dropdown-item" @click="set_value('location','高雄市')">高雄市</a>
- <a class="dropdown-item" @click="set_value('location','屏東縣')">屏東縣</a>
- <a class="dropdown-item" @click="set_value('location','宜蘭縣')">宜蘭縣</a>
- <a class="dropdown-item" @click="set_value('location','花蓮縣')">花蓮縣</a>
- <a class="dropdown-item" @click="set_value('location','台東縣')">台東縣</a>
- <a class="dropdown-item" @click="set_value('location','澎湖縣')">澎湖縣</a>
- </div>
- </div>
- <div class="text-right small text-danger" id="location-error"></div>
- <div class="dropdown mt-3">
- <button class="btn btn-block formDropdown formDropdown--style" type="button"
- data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- <span>{{display.house_year}}</span>
- <i class="fa fa-angle-down" aria-hidden="true"></i>
- </button>
- <div class="dropdown-menu dropdown-menus">
- <a class="dropdown-item" @click="set_value('house_year','0 ~ 5年')">0 ~
- 5年</a>
- <a class="dropdown-item" @click="set_value('house_year','6 ~ 10年')">6 ~
- 10年</a>
- <a class="dropdown-item" @click="set_value('house_year','11 ~ 15年')">11
- ~
- 15年</a>
- <a class="dropdown-item" @click="set_value('house_year','16 ~ 20年')">16
- ~
- 20年</a>
- <a class="dropdown-item" @click="set_value('house_year','21 ~ 30年')">21
- ~
- 30年</a>
- <a class="dropdown-item" @click="set_value('house_year','31 ~ 40年')">31
- ~
- 40年</a>
- <a class="dropdown-item"
- @click="set_value('house_year','40年以上')">40年以上</a>
- </div>
- </div>
- <div class="text-right small text-danger" id="house_year-error"></div>
- <div class="mt-3">
- <input type="text" class="form-control form-text-height" id="pin"
- placeholder="請輸入坪數" v-model="formData.pin">
- </div>
- <div class="text-right small text-danger" id="pin-error"></div>
- <div class="dropdown mt-3">
- <button class="btn btn-block formDropdown formDropdown--style" type="button"
- data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- <span>{{display.change_area}}</span>
- <i class="fa fa-angle-down" aria-hidden="true"></i>
- </button>
- <div class="dropdown-menu dropdown-menus">
- <a class="dropdown-item"
- @click="set_value('change_area','全室裝修')">全室裝修</a>
- <a class="dropdown-item"
- @click="set_value('change_area','局部裝修')">局部裝修</a>
- </div>
- </div>
- <div class="text-right small text-danger" id="change_area-error"></div>
- <div class="mt-3">
- <div class="custom-control custom-checkbox">
- <input type="checkbox" class="custom-control-input" id="readPolicy"
- v-model="formData.termRead">
- <label class="custom-control-label" for="readPolicy">同意 <a
- href="/about/privacy_policy" target="_blank"
- style="{href_color}">免責聲明與隱私使用政策</a></label>
- </div>
- <div class="custom-control custom-checkbox">
- <input type="checkbox" class="custom-control-input" id="credit"
- value="1">
- <label class="custom-control-label"
- for="credit"><span>裝潢貸款享超長7年還款期,最低利率2.59%起。</span></label>
- </div>
- <div class="formAside my-3">
- <button class="btn btn-primary btn-block formSubmit"
- onclick="aa();">
- 完成送出
- </button>
- </div>
- </div>
- </div>
- <div class="col-md-6 pl-md-2">
- <div class="formInfo">
- <div class="formInfoIcon mx-md-1">
- <a href="https://hhh.com.tw/column-post.php?id=2071" target="_blank">
- <i class="fa fa-info-circle" aria-hidden="true"></i>
- </a>
- </div>
- <div class="dropdown mt-3">
- <button class="btn btn-block formDropdown formDropdown--style"
- type="button" data-toggle="dropdown" aria-haspopup="true"
- aria-expanded="false">
- <span>{{display.floor}}</span>
- <i class="fa fa-angle-down" aria-hidden="true"></i>
- </button>
- <div class="dropdown-menu dropdown-menus">
- <a class="dropdown-item"
- @click="set_value('floor','不列入計算')">不列入計算</a>
- <a class="dropdown-item" @click="set_value('floor','實木地板')">實木地板</a>
- <a class="dropdown-item"
- @click="set_value('floor','海島型木地板')">海島型木地板</a>
- <a class="dropdown-item"
- @click="set_value('floor','超耐磨木地板')">超耐磨木地板</a>
- <a class="dropdown-item" @click="set_value('floor','塑膠地板')">塑膠地板</a>
- <a class="dropdown-item" @click="set_value('floor','磁磚地板')">磁磚地板</a>
- </div>
- <div class="text-right small text-danger" id="floor-error"></div>
- </div>
- </div>
- <div class="formInfo">
- <div class="formInfoIcon mx-md-1">
- <a href="https://hhh.com.tw/column-post.php?id=2419" target="_blank">
- <i class="fa fa-info-circle" aria-hidden="true"></i>
- </a>
- </div>
- <div class="dropdown mt-3">
- <button class="btn btn-block formDropdown formDropdown--style"
- type="button" data-toggle="dropdown" aria-haspopup="true"
- aria-expanded="false">
- <span>{{display.compartment}}</span>
- <i class="fa fa-angle-down" aria-hidden="true"></i>
- </button>
- <div class="dropdown-menu dropdown-menus">
- <a class="dropdown-item"
- @click="set_value('compartment','不列入計算')">不列入計算</a>
- <a class="dropdown-item"
- @click="set_value('compartment','鋼製輕隔間')">鋼製輕隔間</a>
- <a class="dropdown-item"
- @click="set_value('compartment','白磚牆輕隔間')">白磚牆輕隔間</a>
- <a class="dropdown-item"
- @click="set_value('compartment','陶粒牆輕隔間')">陶粒牆輕隔間</a>
- <a class="dropdown-item"
- @click="set_value('compartment','木作輕隔間')">木作輕隔間</a>
- <a class="dropdown-item"
- @click="set_value('compartment','紅磚牆隔間')">紅磚牆隔間</a>
- <a class="dropdown-item"
- @click="set_value('compartment','RC 牆隔間')">RC
- 牆隔間</a>
- </div>
- </div>
- <div class="text-right small text-danger" id="compartment-error"></div>
- </div>
- <div class="formInfo">
- <div class="formInfoIcon mx-md-1">
- <a href="https://hhh.com.tw/column-post.php?id=3117" target="_blank">
- <i class="fa fa-info-circle" aria-hidden="true"></i>
- </a>
- </div>
- <div class="dropdown mt-3">
- <button class="btn btn-block formDropdown formDropdown--style"
- type="button" data-toggle="dropdown" aria-haspopup="true"
- aria-expanded="false">
- <span>{{display.ceiling}}</span>
- <i class="fa fa-angle-down" aria-hidden="true"></i>
- </button>
- <div class="dropdown-menu dropdown-menus">
- <a class="dropdown-item"
- @click="set_value('ceiling','不列入計算')">不列入計算</a>
- <a class="dropdown-item"
- @click="set_value('ceiling','平頂天花板')">平頂天花板</a>
- <a class="dropdown-item"
- @click="set_value('ceiling','造型天花板')">造型天花板</a>
- <a class="dropdown-item"
- @click="set_value('ceiling','間接天花板')">間接天花板</a>
- <a class="dropdown-item"
- @click="set_value('ceiling','木格柵天花板')">木格柵天花板</a>
- </div>
- </div>
- <div class="text-right small text-danger" id="ceiling-error"></div>
- </div>
- <div class="row">
- <div class="col-md-4">
- <div class="dropdown mt-3">
- <button class="btn btn-block formDropdown formDropdown--style"
- type="button" data-toggle="dropdown" aria-haspopup="true"
- aria-expanded="false">
- <span>{{display.room}}</span>
- <i class="fa fa-angle-down" aria-hidden="true"></i>
- </button>
- <div class="dropdown-menu dropdown-menus">
- <a class="dropdown-item" @click="set_value('room','一房')">一房</a>
- <a class="dropdown-item" @click="set_value('room','二房')">二房</a>
- <a class="dropdown-item" @click="set_value('room','三房')">三房</a>
- <a class="dropdown-item" @click="set_value('room','四房')">四房</a>
- <a class="dropdown-item" @click="set_value('room','五房')">五房</a>
- <a class="dropdown-item" @click="set_value('room','六房')">六房</a>
- <a class="dropdown-item" @click="set_value('room','七房')">七房</a>
- </div>
- </div>
- </div>
- <div class="col-md-4">
- <div class="dropdown mt-3">
- <button class="btn btn-block formDropdown formDropdown--style"
- type="button" data-toggle="dropdown" aria-haspopup="true"
- aria-expanded="false">
- <span>{{display.liveroom}}</span>
- <i class="fa fa-angle-down" aria-hidden="true"></i>
- </button>
- <div class="dropdown-menu dropdown-menus">
- <a class="dropdown-item"
- @click="set_value('liveroom','一廳')">一廳</a>
- <a class="dropdown-item"
- @click="set_value('liveroom','二廳')">二廳</a>
- </div>
- </div>
- </div>
- <div class="col-md-4">
- <div class="dropdown mt-3">
- <button class="btn btn-block formDropdown formDropdown--style"
- type="button" data-toggle="dropdown" aria-haspopup="true"
- aria-expanded="false">
- <span>{{display.bathroom}}</span>
- <i class="fa fa-angle-down" aria-hidden="true"></i>
- </button>
- <div class="dropdown-menu dropdown-menus">
- <a class="dropdown-item"
- @click="set_value('bathroom','一衛')">一衛</a>
- <a class="dropdown-item"
- @click="set_value('bathroom','二衛')">二衛</a>
- <a class="dropdown-item"
- @click="set_value('bathroom','三衛')">三衛</a>
- <a class="dropdown-item"
- @click="set_value('bathroom','四衛')">四衛</a>
- <a class="dropdown-item"
- @click="set_value('bathroom','五衛')">五衛</a>
- <a class="dropdown-item"
- @click="set_value('bathroom','六衛')">六衛</a>
- <a class="dropdown-item"
- @click="set_value('bathroom','七衛')">七衛</a>
- <a class="dropdown-item"
- @click="set_value('bathroom','八衛')">八衛</a>
- </div>
- </div>
- </div>
- </div>
- <!-- <div class="custom-control custom-checkbox">
- <input type="checkbox" class="custom-control-input" id="readPolicy"
- v-model="formData.termRead">
- <label class="custom-control-label" for="readPolicy">同意 <a
- href="/about/privacy_policy" target="_blank" style="{href_color}">免責聲明與隱私使用政策</a></label>
- </div>
- <div class="custom-control custom-checkbox">
- <input type="checkbox" class="custom-control-input" id="credit" value="1">
- <label class="custom-control-label" for="credit"><span>裝潢貸款享超長7年還款期,最低利率2.59%起。</span></label>
- </div>
- <div class="formAside my-3">
- <button type="submit" class="btn btn-primary btn-block formSubmit"
- @click="submit()">
- 完成送出
- </button>
- </div> -->
- </div>
- </div>
- </div>
- </div>
- <!-- </form>-->
-
- </div>
- </div>
- </div>
- </div>
- <script>
- function aa() {
- bodyFormData = new FormData();
- dataBeSent1 = '';
- dataBeSent1 = '{ "request[0][email]": "yukyo@choozmo.com" ,';
- dataBeSent1 += ' "request[0][name]": "name" ,';
- dataBeSent1 += ' "request[0][phone]": "0933461392" ,';
- dataBeSent1 += ' "request[0][contact_status]": "N" ,';
- dataBeSent1 += ' "request[0][house_type]": "新成屋" ,';
- dataBeSent1 += ' "request[0][location]": "新北市" ,';
- dataBeSent1 += ' "request[0][house_year]": "11 ~ 15年" ,';
- dataBeSent1 += ' "request[0][floor]": "超耐磨木地板" ,';
- dataBeSent1 += ' "request[0][compartment]": "白磚牆輕隔間" ,';
- dataBeSent1 += ' "request[0][ceiling]": "平頂天花板" ,';
- dataBeSent1 += ' "request[0][change_area]": "全室裝修" ,';
- dataBeSent1 += ' "request[0][pin]": "123" ,';
- dataBeSent1 += ' "request[0][room]": "五房" ,';
- dataBeSent1 += ' "request[0][liveroom]": "二廳" ,';
- dataBeSent1 += ' "request[0][bathroom]": "一衛" ,';
- dataBeSent1 += ' "request[0][is_edm]": "N" ,';
- dataBeSent1 += ' "request[0][storage_status]": "N" ,';
- dataBeSent1 += ' "request[0][warehousing_status]": "N" ,';
- dataBeSent1 += ' "request[0][rent_house_status]": "N" ,';
- dataBeSent1 += ' "request[0][loan_status]": "1" ,';
- dataBeSent1 += ' "request[0][message]": "message" }';
- bodyFormData.append('data', dataBeSent1);
- //console.log(JSON.stringify(bodyFormData));
- // 儲存本此送出的資料到 session
- $.ajax({
- type: "POST",
- url: "https://stage.hhh.com.tw/about/calculator_save_to_session/",
- datatype: "json",
- data: bodyFormData,
- processData: false,
- contentType: false,
- success: function (res) {
- //alert('s');
- console.log(res);
- //location.href = 'https://www.hhh.com.tw/about/calculator_result'
- },
- error: function (error) {
- //alert('e');
- console.error('e:' + error)
- }
- });
- var calculatorResult = '';
- /* $.ajax({
- type: "POST",
- url: "https://www.hhh.com.tw/Adapter/index?api_url=third/v1/Calculator/contact&http_method=PUT",
- datatype: "json",
- data: bodyFormData,
- processData: false,
- contentType: false,
- success: function (res) {
- console.log(res);
- },
- error: function (error) {
- console.error(error)
- }
- }); */
- /* $.ajax({
- type: "POST",
- url: "https://www.hhh.com.tw/Adapter/index?api_url=third/v1/Calculator/index&http_method=POST",
- datatype: "json",
- contentType: false,
- async: false
- }); */
- console.log(JSON.stringify(bodyFormData));
- $.ajax({
- type: "POST",
- url: "https://stage.hhh.com.tw/Adapter/index?api_url=third/v1/Calculator/index&http_method=POST",
- datatype: "json",
- data: bodyFormData,
- processData: false,
- contentType: false,
- //async: false,
- success: function (res) {
- console.log(res);
- if (res.status == "Success") {
- //alert('s2');
- /* let dataBeSent2 = '';
- dataBeSent2 = '{ "email": "' + data.email + '" ,'
- dataBeSent2 += ' "name": "' + data.name + '" ,'
- dataBeSent2 += ' "phone": "' + data.phone + '" ,'
- dataBeSent2 += ' "house_type": "' + data.house_type + '" ,'
- dataBeSent2 += ' "location": "' + data.location + '" ,'
- dataBeSent2 += ' "house_year": "' + data.house_year + '" ,'
- dataBeSent2 += ' "pin": "' + data.pin + '" ,'
- dataBeSent2 += ' "change_area": "' + data.change_area + '" ,'
- dataBeSent2 += ' "floor": "' + data.floor + '" ,'
- dataBeSent2 += ' "compartment": "' + data.compartment + '" ,'
- dataBeSent2 += ' "ceiling": "' + data.ceiling + '" ,'
- dataBeSent2 += ' "room": "' + data.room + '" ,'
- dataBeSent2 += ' "liveroom": "' + data.liveroom + '" ,'
- dataBeSent2 += ' "bathroom": "' + data.bathroom + '" }';
- console.log(dataBeSent2);
- if ($('#credit').prop("checked")) {
- console.log('1111');
- $.ajax({
- type: 'POST',
- url: 'https://api.ptt.cx:9998/hhh/mail/deco/v3',
- data: dataBeSent2,
- dataType: 'json',
- contentType: 'application/json; charset=utf-8',
- success: function (res1) {
- // alert('送出成功');
- console.log('成功');
- },
- error: function (error) {
- console.error(error);
- // alert('送出失敗');
- }
- });
- }
- console.log('s');
- console.log(res.data.guid);
- console.log(bodyFormData));
- // calculatorlink='/about/calculator_result/' + res.data.guid + '/';
- calculatorResult = res.data.guid; */
- // console.log(calculatorlink);
- } else {
- Swal.fire({
- title: '似乎出了什麼問題 請稍後再試',
- showConfirmButton: false,
- });
- }
- },
- error: function (error) {
- //alert('e2');
- console.error('e2:' + error);
- },
- complete: function () {
- //alert('c2');
- //location.href = '/about/calculator_result/' + calculatorResult + '/';
- // location.href = '/about/calculator_result/' + calculatorResult + '/';
- },
- });
- bodyFormData = new FormData();
- dataBeSent1 = '{ "email": "yukyo@choozmo.com" ,';
- dataBeSent1 += ' "name": "name" ,';
- dataBeSent1 += ' "phone": "0912345678" ,';
- dataBeSent1 += ' "hasRequest": "N" ,';
- dataBeSent1 += ' "house_type": "新成屋" ,';
- dataBeSent1 += ' "location": "新北市" ,';
- dataBeSent1 += ' "house_year": "11 ~ 15年" ,';
- dataBeSent1 += ' "floor": "超耐磨木地板" ,';
- dataBeSent1 += ' "compartment": "白磚牆輕隔間" ,';
- dataBeSent1 += ' "ceiling": "平頂天花板" ,';
- dataBeSent1 += ' "change_area": "全室裝修" ,';
- dataBeSent1 += ' "contact_status": "N" ,';
- dataBeSent1 += ' "pin": "123" ,';
- dataBeSent1 += ' "room": "五房" ,';
- dataBeSent1 += ' "liveroom": "二廳" ,';
- dataBeSent1 += ' "bathroom": "一衛" ,';
- dataBeSent1 += ' "is_edm": "N" ,';
- dataBeSent1 += ' "message": "--" }';
- bodyFormData.append('data', dataBeSent1);
- //console.log(JSON.stringify(bodyFormData));
- /* $.ajax({
- type: "POST",
- url: "https://stage.hhh.com.tw/login/forms_save?type=calculator",
- // 要處理
- data: bodyFormData,
- processData: false,
- contentType: false,
- success: function (res) {
- //window.location.href = '/login/facebook_process?r={ci_login_return_url}&redirect=/about/calculator';
- // 要處理
- },
- error: function (error) {
- console.error(error)
- }
- }); */
- }
- </script>
- <script>
- $(document).ready(function () {
- /* $('#freeConsult-y').on('click', function () {
- // 呼叫 ajax
- $.ajax({
- type: "POST",
- url: "https://www.hhh.com.tw/Adapter/index?api_url=third/v1/Calculator/contact&http_method=PUT",
- datatype: "json",
- data: bodyFormData,
- processData: false,
- contentType: false,
- success: function (res) {
- },
- error: function (error) {
- console.error(error)
- }
- })
-
- $('#freeConsult').modal('hide')
- $('#contactSend').modal('show').delay(5000)
- }) */
- });
- </script>
- <script>
- $(document).ready(function () {
- /* $(".contact-form1").submit(function (e) {
- //alert('aa');
-
- }); */
- });
- </script>
- </body>
- </html>
|