cal.html 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7. <meta name="robots" content="noindex , follow">
  8. <meta name="description" content="幸福空間 - 裝修計算機">
  9. <title>幸福空間 - 裝修計算機</title>
  10. <link rel="icon" href="assets/images/favicon.ico">
  11. <link rel="stylesheet" href="assets/font-awesome-4.7.0/css/font-awesome.min.css">
  12. <link rel="stylesheet" href="assets/css/{css}?v={timestamp}">
  13. <link rel="stylesheet" href="assets/css/main.css">
  14. <script src="assets/js/jquery-3.4.1.min.js"></script>
  15. <script src="assets/js/vue.min.js"></script>
  16. <script src="assets/js/moment.min.js"></script>
  17. <script src="assets/js/sweetalert2.all.min.js"></script>
  18. <script src="assets/js/popper.min.js"></script>
  19. <script src="assets/js/bootstrap.min.js"></script>
  20. <script src="https://cdn.jsdelivr.net/npm/promise-polyfill@7.1.0/dist/promise.min.js"></script>
  21. <script src="https://apis.google.com/js/api:client.js" defer></script>
  22. <meta name="google-signin-client_id" content="{ci_google_client_id}">
  23. <style>
  24. .btn:focus,
  25. .btn.focus {
  26. box-shadow: none;
  27. }
  28. .form-control:focus {
  29. border-color: #ced4da;
  30. }
  31. .dropdown-item:hover {
  32. color: #FFF !important;
  33. background-color: #3facff;
  34. }
  35. .form-control:disabled {
  36. background-color: transparent;
  37. }
  38. input:-webkit-autofill,
  39. input:-webkit-autofill:hover,
  40. input:-webkit-autofill:focus,
  41. input:-webkit-autofill:active {
  42. -webkit-transition-delay: 99999s;
  43. -webkit-transition: background-color 99999s ease-out;
  44. }
  45. </style>
  46. <!-- Google Tag Manager -->
  47. <script>(function (w, d, s, l, i) {
  48. w[l] = w[l] || []; w[l].push({
  49. 'gtm.start':
  50. new Date().getTime(), event: 'gtm.js'
  51. }); var f = d.getElementsByTagName(s)[0],
  52. j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src =
  53. 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f);
  54. })(window, document, 'script', 'dataLayer', 'GTM-W3RJHTZ');</script>
  55. <!-- End Google Tag Manager -->
  56. </head>
  57. <body ontouchstart="" style="background-color: {background-color};">
  58. <!-- Google Tag Manager (noscript) -->
  59. <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-W3RJHTZ" height="0" width="0"
  60. style="display:none;visibility:hidden"></iframe></noscript>
  61. <!-- End Google Tag Manager (noscript) -->
  62. <div id="app" v-cloak>
  63. <!-- login layout -->
  64. <div class="formWrapper container mt-md-4 pt-md-3" v-if="!dataSent">
  65. <div class="row justify-content-center">
  66. <nav class="navbar navbar-light d-flex justify-content-center">
  67. <a class="navbar-brand d-flex justify-content-center" href="/">
  68. <img class="d-inline-block" src="/assets/images/hhh-logo2.svg" width="145" height="40"
  69. alt="hhh-logo" {logo_hidden}>
  70. </a>
  71. </nav>
  72. <div class="col-md-12 px-4Up px-md-0">
  73. <div class="row justify-content-center">
  74. <h2 class="font-weight-bold mt-3 justify-content-center">裝修計算機
  75. </h2>
  76. </div>
  77. <div class="row justify-content-center">
  78. <h6 class="font-weight-normal text-muted my-2">
  79. 已提供
  80. <span class="font-weight-bold" style="color: #4099d0!important;">{{ peopleCount }}</span>
  81. 人進行裝修報價
  82. </h6>
  83. </div>
  84. <div class="row justify-content-center">
  85. <a class="tag-item" href="https://hhh.com.tw/deco/" target="_blank">
  86. <h5 class="font-weight-normal text-primary">第一次裝修嗎?請點我!<img
  87. src="/assets/images/calculator/tap.svg" alt="手指" />
  88. </h5>
  89. </a>
  90. </div>
  91. </div>
  92. <div class="col-md-10 px-4Up px-md-0 mt-md-4">
  93. <!-- <form action="/about/calculator_result" method="POST">-->
  94. <!-- <form class="calulator-form" action=""> -->
  95. <div class="row">
  96. <div class="col-md-4">
  97. <div class="formTheme formTheme--style mt-3 mb-2 my-md-0">
  98. <div class="line line--lf"></div>
  99. <div class="formTheme__title">聯絡方式</div>
  100. <div class="line line--rt"></div>
  101. </div>
  102. <div class="formAside" {login_hidden}>
  103. <button type="button" class="login-media-wrapper btn no-padding mt-3"
  104. @click="thirdSubmit('facebook')">
  105. <div class="d-flex login-media-content py-2">
  106. <div class="login-media-img">
  107. <img class="login-media-img-item before"
  108. src="/assets/images/section/icon/login/f.svg" width="30" height="30"
  109. alt="幸福空間臉書">
  110. <img class="login-media-img-item after"
  111. src="/assets/images/section/icon/login/f_w.svg" width="30"
  112. height="30" alt="幸福空間臉書">
  113. </div>
  114. <div class="login-media-context">
  115. FACEBOOK 快速登入
  116. </div>
  117. </div>
  118. </button>
  119. <button type="button" class="login-media-wrapper btn no-padding mt-3"
  120. id="google-login">
  121. <!-- <button type="button" class="login-media-wrapper btn no-padding mt-3" @click="thirdSubmit('google')">-->
  122. <!-- <button class="login-media-wrapper btn no-padding mb-3" id="google-login">-->
  123. <div class="d-flex login-media-content py-2">
  124. <div class="login-media-img">
  125. <img class="login-media-img-item before"
  126. src="/assets/images/section/icon/login/g.svg" width="30" height="30"
  127. alt="幸福空間GOOGLE">
  128. <img class="login-media-img-item after"
  129. src="/assets/images/section/icon/login/g_w.svg" width="30"
  130. height="30" alt="幸福空間GOOGLE">
  131. </div>
  132. <div class="login-media-context">
  133. GOOGLE 快速登入
  134. </div>
  135. </div>
  136. </button>
  137. </div>
  138. <!-- 電子郵件 Start -->
  139. <div class="formAside mt-3">
  140. <input type="text" class="form-control form-text-height" placeholder="請輸入信箱"
  141. v-model="formData.email">
  142. </div>
  143. <!-- 電子郵件 End -->
  144. <!-- 姓名 Start -->
  145. <div class="formAside mt-3">
  146. <input type="text" class="form-control form-text-height" placeholder="請輸入姓名"
  147. v-model="formData.name">
  148. </div>
  149. <!-- 姓名 End -->
  150. <div class="formAside mt-3">
  151. <input type="tel" class="form-control form-text-height" placeholder="請輸入電話"
  152. v-model="formData.phone">
  153. </div>
  154. <div class="text-right small text-danger" id="phone-error"></div>
  155. <!-- <div class="formAside mt-3">-->
  156. <!-- <input type="text" class="form-control form-text-height" placeholder="意見回饋 我想要著重採光及動線規劃..."-->
  157. <!-- v-model="formData.message">-->
  158. <!-- </div>-->
  159. </div>
  160. <div class="col-md-8">
  161. <div class="formTheme formTheme--style">
  162. <div class="line line--lf"></div>
  163. <div class="formTheme__title"> 我的裝修資訊</div>
  164. <div class="line line--rt"></div>
  165. </div>
  166. <div class="row">
  167. <div class="col-md-6 pr-md-2">
  168. <div class="dropdown mt-3">
  169. <button class="btn btn-block formDropdown formDropdown--style" type="button"
  170. data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  171. <span>{{display.house_type}}</span>
  172. <i class="fa fa-angle-down" aria-hidden="true"></i>
  173. </button>
  174. <div class="dropdown-menu dropdown-menus">
  175. <a class="dropdown-item" @click="set_value('house_type','中古屋')">中古屋</a>
  176. <a class="dropdown-item" @click="set_value('house_type','新成屋')">新成屋</a>
  177. <a class="dropdown-item" @click="set_value('house_type','毛胚屋')">毛胚屋</a>
  178. </div>
  179. </div>
  180. <div class="text-right small text-danger" id="house_type-error"></div>
  181. <div class="dropdown mt-3">
  182. <button class="btn btn-block formDropdown formDropdown--style" type="button"
  183. data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  184. <span>{{display.location}}</span>
  185. <i class="fa fa-angle-down" aria-hidden="true"></i>
  186. </button>
  187. <div class="dropdown-menu dropdown-menus">
  188. <a class="dropdown-item" @click="set_value('location','基隆市')">基隆市</a>
  189. <a class="dropdown-item" @click="set_value('location','台北市')">台北市</a>
  190. <a class="dropdown-item" @click="set_value('location','新北市')">新北市</a>
  191. <a class="dropdown-item" @click="set_value('location','桃園市')">桃園市</a>
  192. <a class="dropdown-item" @click="set_value('location','新竹縣')">新竹縣</a>
  193. <a class="dropdown-item" @click="set_value('location','新竹市')">新竹市</a>
  194. <a class="dropdown-item" @click="set_value('location','苗栗縣')">苗栗縣</a>
  195. <a class="dropdown-item" @click="set_value('location','台中市')">台中市</a>
  196. <a class="dropdown-item" @click="set_value('location','彰化縣')">彰化縣</a>
  197. <a class="dropdown-item" @click="set_value('location','南投縣')">南投縣</a>
  198. <a class="dropdown-item" @click="set_value('location','雲林縣')">雲林縣</a>
  199. <a class="dropdown-item" @click="set_value('location','嘉義縣')">嘉義縣</a>
  200. <a class="dropdown-item" @click="set_value('location','嘉義市')">嘉義市</a>
  201. <a class="dropdown-item" @click="set_value('location','台南市')">台南市</a>
  202. <a class="dropdown-item" @click="set_value('location','高雄市')">高雄市</a>
  203. <a class="dropdown-item" @click="set_value('location','屏東縣')">屏東縣</a>
  204. <a class="dropdown-item" @click="set_value('location','宜蘭縣')">宜蘭縣</a>
  205. <a class="dropdown-item" @click="set_value('location','花蓮縣')">花蓮縣</a>
  206. <a class="dropdown-item" @click="set_value('location','台東縣')">台東縣</a>
  207. <a class="dropdown-item" @click="set_value('location','澎湖縣')">澎湖縣</a>
  208. </div>
  209. </div>
  210. <div class="text-right small text-danger" id="location-error"></div>
  211. <div class="dropdown mt-3">
  212. <button class="btn btn-block formDropdown formDropdown--style" type="button"
  213. data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  214. <span>{{display.house_year}}</span>
  215. <i class="fa fa-angle-down" aria-hidden="true"></i>
  216. </button>
  217. <div class="dropdown-menu dropdown-menus">
  218. <a class="dropdown-item" @click="set_value('house_year','0 ~ 5年')">0 ~
  219. 5年</a>
  220. <a class="dropdown-item" @click="set_value('house_year','6 ~ 10年')">6 ~
  221. 10年</a>
  222. <a class="dropdown-item" @click="set_value('house_year','11 ~ 15年')">11
  223. ~
  224. 15年</a>
  225. <a class="dropdown-item" @click="set_value('house_year','16 ~ 20年')">16
  226. ~
  227. 20年</a>
  228. <a class="dropdown-item" @click="set_value('house_year','21 ~ 30年')">21
  229. ~
  230. 30年</a>
  231. <a class="dropdown-item" @click="set_value('house_year','31 ~ 40年')">31
  232. ~
  233. 40年</a>
  234. <a class="dropdown-item"
  235. @click="set_value('house_year','40年以上')">40年以上</a>
  236. </div>
  237. </div>
  238. <div class="text-right small text-danger" id="house_year-error"></div>
  239. <div class="mt-3">
  240. <input type="text" class="form-control form-text-height" id="pin"
  241. placeholder="請輸入坪數" v-model="formData.pin">
  242. </div>
  243. <div class="text-right small text-danger" id="pin-error"></div>
  244. <div class="dropdown mt-3">
  245. <button class="btn btn-block formDropdown formDropdown--style" type="button"
  246. data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  247. <span>{{display.change_area}}</span>
  248. <i class="fa fa-angle-down" aria-hidden="true"></i>
  249. </button>
  250. <div class="dropdown-menu dropdown-menus">
  251. <a class="dropdown-item"
  252. @click="set_value('change_area','全室裝修')">全室裝修</a>
  253. <a class="dropdown-item"
  254. @click="set_value('change_area','局部裝修')">局部裝修</a>
  255. </div>
  256. </div>
  257. <div class="text-right small text-danger" id="change_area-error"></div>
  258. <div class="mt-3">
  259. <div class="custom-control custom-checkbox">
  260. <input type="checkbox" class="custom-control-input" id="readPolicy"
  261. v-model="formData.termRead">
  262. <label class="custom-control-label" for="readPolicy">同意 <a
  263. href="/about/privacy_policy" target="_blank"
  264. style="{href_color}">免責聲明與隱私使用政策</a></label>
  265. </div>
  266. <div class="custom-control custom-checkbox">
  267. <input type="checkbox" class="custom-control-input" id="credit"
  268. value="1">
  269. <label class="custom-control-label"
  270. for="credit"><span>裝潢貸款享超長7年還款期,最低利率2.59%起。</span></label>
  271. </div>
  272. <div class="formAside my-3">
  273. <button class="btn btn-primary btn-block formSubmit"
  274. onclick="aa();">
  275. 完成送出
  276. </button>
  277. </div>
  278. </div>
  279. </div>
  280. <div class="col-md-6 pl-md-2">
  281. <div class="formInfo">
  282. <div class="formInfoIcon mx-md-1">
  283. <a href="https://hhh.com.tw/column-post.php?id=2071" target="_blank">
  284. <i class="fa fa-info-circle" aria-hidden="true"></i>
  285. </a>
  286. </div>
  287. <div class="dropdown mt-3">
  288. <button class="btn btn-block formDropdown formDropdown--style"
  289. type="button" data-toggle="dropdown" aria-haspopup="true"
  290. aria-expanded="false">
  291. <span>{{display.floor}}</span>
  292. <i class="fa fa-angle-down" aria-hidden="true"></i>
  293. </button>
  294. <div class="dropdown-menu dropdown-menus">
  295. <a class="dropdown-item"
  296. @click="set_value('floor','不列入計算')">不列入計算</a>
  297. <a class="dropdown-item" @click="set_value('floor','實木地板')">實木地板</a>
  298. <a class="dropdown-item"
  299. @click="set_value('floor','海島型木地板')">海島型木地板</a>
  300. <a class="dropdown-item"
  301. @click="set_value('floor','超耐磨木地板')">超耐磨木地板</a>
  302. <a class="dropdown-item" @click="set_value('floor','塑膠地板')">塑膠地板</a>
  303. <a class="dropdown-item" @click="set_value('floor','磁磚地板')">磁磚地板</a>
  304. </div>
  305. <div class="text-right small text-danger" id="floor-error"></div>
  306. </div>
  307. </div>
  308. <div class="formInfo">
  309. <div class="formInfoIcon mx-md-1">
  310. <a href="https://hhh.com.tw/column-post.php?id=2419" target="_blank">
  311. <i class="fa fa-info-circle" aria-hidden="true"></i>
  312. </a>
  313. </div>
  314. <div class="dropdown mt-3">
  315. <button class="btn btn-block formDropdown formDropdown--style"
  316. type="button" data-toggle="dropdown" aria-haspopup="true"
  317. aria-expanded="false">
  318. <span>{{display.compartment}}</span>
  319. <i class="fa fa-angle-down" aria-hidden="true"></i>
  320. </button>
  321. <div class="dropdown-menu dropdown-menus">
  322. <a class="dropdown-item"
  323. @click="set_value('compartment','不列入計算')">不列入計算</a>
  324. <a class="dropdown-item"
  325. @click="set_value('compartment','鋼製輕隔間')">鋼製輕隔間</a>
  326. <a class="dropdown-item"
  327. @click="set_value('compartment','白磚牆輕隔間')">白磚牆輕隔間</a>
  328. <a class="dropdown-item"
  329. @click="set_value('compartment','陶粒牆輕隔間')">陶粒牆輕隔間</a>
  330. <a class="dropdown-item"
  331. @click="set_value('compartment','木作輕隔間')">木作輕隔間</a>
  332. <a class="dropdown-item"
  333. @click="set_value('compartment','紅磚牆隔間')">紅磚牆隔間</a>
  334. <a class="dropdown-item"
  335. @click="set_value('compartment','RC 牆隔間')">RC
  336. 牆隔間</a>
  337. </div>
  338. </div>
  339. <div class="text-right small text-danger" id="compartment-error"></div>
  340. </div>
  341. <div class="formInfo">
  342. <div class="formInfoIcon mx-md-1">
  343. <a href="https://hhh.com.tw/column-post.php?id=3117" target="_blank">
  344. <i class="fa fa-info-circle" aria-hidden="true"></i>
  345. </a>
  346. </div>
  347. <div class="dropdown mt-3">
  348. <button class="btn btn-block formDropdown formDropdown--style"
  349. type="button" data-toggle="dropdown" aria-haspopup="true"
  350. aria-expanded="false">
  351. <span>{{display.ceiling}}</span>
  352. <i class="fa fa-angle-down" aria-hidden="true"></i>
  353. </button>
  354. <div class="dropdown-menu dropdown-menus">
  355. <a class="dropdown-item"
  356. @click="set_value('ceiling','不列入計算')">不列入計算</a>
  357. <a class="dropdown-item"
  358. @click="set_value('ceiling','平頂天花板')">平頂天花板</a>
  359. <a class="dropdown-item"
  360. @click="set_value('ceiling','造型天花板')">造型天花板</a>
  361. <a class="dropdown-item"
  362. @click="set_value('ceiling','間接天花板')">間接天花板</a>
  363. <a class="dropdown-item"
  364. @click="set_value('ceiling','木格柵天花板')">木格柵天花板</a>
  365. </div>
  366. </div>
  367. <div class="text-right small text-danger" id="ceiling-error"></div>
  368. </div>
  369. <div class="row">
  370. <div class="col-md-4">
  371. <div class="dropdown mt-3">
  372. <button class="btn btn-block formDropdown formDropdown--style"
  373. type="button" data-toggle="dropdown" aria-haspopup="true"
  374. aria-expanded="false">
  375. <span>{{display.room}}</span>
  376. <i class="fa fa-angle-down" aria-hidden="true"></i>
  377. </button>
  378. <div class="dropdown-menu dropdown-menus">
  379. <a class="dropdown-item" @click="set_value('room','一房')">一房</a>
  380. <a class="dropdown-item" @click="set_value('room','二房')">二房</a>
  381. <a class="dropdown-item" @click="set_value('room','三房')">三房</a>
  382. <a class="dropdown-item" @click="set_value('room','四房')">四房</a>
  383. <a class="dropdown-item" @click="set_value('room','五房')">五房</a>
  384. <a class="dropdown-item" @click="set_value('room','六房')">六房</a>
  385. <a class="dropdown-item" @click="set_value('room','七房')">七房</a>
  386. </div>
  387. </div>
  388. </div>
  389. <div class="col-md-4">
  390. <div class="dropdown mt-3">
  391. <button class="btn btn-block formDropdown formDropdown--style"
  392. type="button" data-toggle="dropdown" aria-haspopup="true"
  393. aria-expanded="false">
  394. <span>{{display.liveroom}}</span>
  395. <i class="fa fa-angle-down" aria-hidden="true"></i>
  396. </button>
  397. <div class="dropdown-menu dropdown-menus">
  398. <a class="dropdown-item"
  399. @click="set_value('liveroom','一廳')">一廳</a>
  400. <a class="dropdown-item"
  401. @click="set_value('liveroom','二廳')">二廳</a>
  402. </div>
  403. </div>
  404. </div>
  405. <div class="col-md-4">
  406. <div class="dropdown mt-3">
  407. <button class="btn btn-block formDropdown formDropdown--style"
  408. type="button" data-toggle="dropdown" aria-haspopup="true"
  409. aria-expanded="false">
  410. <span>{{display.bathroom}}</span>
  411. <i class="fa fa-angle-down" aria-hidden="true"></i>
  412. </button>
  413. <div class="dropdown-menu dropdown-menus">
  414. <a class="dropdown-item"
  415. @click="set_value('bathroom','一衛')">一衛</a>
  416. <a class="dropdown-item"
  417. @click="set_value('bathroom','二衛')">二衛</a>
  418. <a class="dropdown-item"
  419. @click="set_value('bathroom','三衛')">三衛</a>
  420. <a class="dropdown-item"
  421. @click="set_value('bathroom','四衛')">四衛</a>
  422. <a class="dropdown-item"
  423. @click="set_value('bathroom','五衛')">五衛</a>
  424. <a class="dropdown-item"
  425. @click="set_value('bathroom','六衛')">六衛</a>
  426. <a class="dropdown-item"
  427. @click="set_value('bathroom','七衛')">七衛</a>
  428. <a class="dropdown-item"
  429. @click="set_value('bathroom','八衛')">八衛</a>
  430. </div>
  431. </div>
  432. </div>
  433. </div>
  434. <!-- <div class="custom-control custom-checkbox">
  435. <input type="checkbox" class="custom-control-input" id="readPolicy"
  436. v-model="formData.termRead">
  437. <label class="custom-control-label" for="readPolicy">同意 <a
  438. href="/about/privacy_policy" target="_blank" style="{href_color}">免責聲明與隱私使用政策</a></label>
  439. </div>
  440. <div class="custom-control custom-checkbox">
  441. <input type="checkbox" class="custom-control-input" id="credit" value="1">
  442. <label class="custom-control-label" for="credit"><span>裝潢貸款享超長7年還款期,最低利率2.59%起。</span></label>
  443. </div>
  444. <div class="formAside my-3">
  445. <button type="submit" class="btn btn-primary btn-block formSubmit"
  446. @click="submit()">
  447. 完成送出
  448. </button>
  449. </div> -->
  450. </div>
  451. </div>
  452. </div>
  453. </div>
  454. <!-- </form>-->
  455. </div>
  456. </div>
  457. </div>
  458. </div>
  459. <script>
  460. function aa() {
  461. bodyFormData = new FormData();
  462. dataBeSent1 = '';
  463. dataBeSent1 = '{ "request[0][email]": "yukyo@choozmo.com" ,';
  464. dataBeSent1 += ' "request[0][name]": "name" ,';
  465. dataBeSent1 += ' "request[0][phone]": "0933461392" ,';
  466. dataBeSent1 += ' "request[0][contact_status]": "N" ,';
  467. dataBeSent1 += ' "request[0][house_type]": "新成屋" ,';
  468. dataBeSent1 += ' "request[0][location]": "新北市" ,';
  469. dataBeSent1 += ' "request[0][house_year]": "11 ~ 15年" ,';
  470. dataBeSent1 += ' "request[0][floor]": "超耐磨木地板" ,';
  471. dataBeSent1 += ' "request[0][compartment]": "白磚牆輕隔間" ,';
  472. dataBeSent1 += ' "request[0][ceiling]": "平頂天花板" ,';
  473. dataBeSent1 += ' "request[0][change_area]": "全室裝修" ,';
  474. dataBeSent1 += ' "request[0][pin]": "123" ,';
  475. dataBeSent1 += ' "request[0][room]": "五房" ,';
  476. dataBeSent1 += ' "request[0][liveroom]": "二廳" ,';
  477. dataBeSent1 += ' "request[0][bathroom]": "一衛" ,';
  478. dataBeSent1 += ' "request[0][is_edm]": "N" ,';
  479. dataBeSent1 += ' "request[0][storage_status]": "N" ,';
  480. dataBeSent1 += ' "request[0][warehousing_status]": "N" ,';
  481. dataBeSent1 += ' "request[0][rent_house_status]": "N" ,';
  482. dataBeSent1 += ' "request[0][loan_status]": "1" ,';
  483. dataBeSent1 += ' "request[0][message]": "message" }';
  484. bodyFormData.append('data', dataBeSent1);
  485. //console.log(JSON.stringify(bodyFormData));
  486. // 儲存本此送出的資料到 session
  487. $.ajax({
  488. type: "POST",
  489. url: "https://stage.hhh.com.tw/about/calculator_save_to_session/",
  490. datatype: "json",
  491. data: bodyFormData,
  492. processData: false,
  493. contentType: false,
  494. success: function (res) {
  495. //alert('s');
  496. console.log(res);
  497. //location.href = 'https://www.hhh.com.tw/about/calculator_result'
  498. },
  499. error: function (error) {
  500. //alert('e');
  501. console.error('e:' + error)
  502. }
  503. });
  504. var calculatorResult = '';
  505. /* $.ajax({
  506. type: "POST",
  507. url: "https://www.hhh.com.tw/Adapter/index?api_url=third/v1/Calculator/contact&http_method=PUT",
  508. datatype: "json",
  509. data: bodyFormData,
  510. processData: false,
  511. contentType: false,
  512. success: function (res) {
  513. console.log(res);
  514. },
  515. error: function (error) {
  516. console.error(error)
  517. }
  518. }); */
  519. /* $.ajax({
  520. type: "POST",
  521. url: "https://www.hhh.com.tw/Adapter/index?api_url=third/v1/Calculator/index&http_method=POST",
  522. datatype: "json",
  523. contentType: false,
  524. async: false
  525. }); */
  526. console.log(JSON.stringify(bodyFormData));
  527. $.ajax({
  528. type: "POST",
  529. url: "https://stage.hhh.com.tw/Adapter/index?api_url=third/v1/Calculator/index&http_method=POST",
  530. datatype: "json",
  531. data: bodyFormData,
  532. processData: false,
  533. contentType: false,
  534. //async: false,
  535. success: function (res) {
  536. console.log(res);
  537. if (res.status == "Success") {
  538. //alert('s2');
  539. /* let dataBeSent2 = '';
  540. dataBeSent2 = '{ "email": "' + data.email + '" ,'
  541. dataBeSent2 += ' "name": "' + data.name + '" ,'
  542. dataBeSent2 += ' "phone": "' + data.phone + '" ,'
  543. dataBeSent2 += ' "house_type": "' + data.house_type + '" ,'
  544. dataBeSent2 += ' "location": "' + data.location + '" ,'
  545. dataBeSent2 += ' "house_year": "' + data.house_year + '" ,'
  546. dataBeSent2 += ' "pin": "' + data.pin + '" ,'
  547. dataBeSent2 += ' "change_area": "' + data.change_area + '" ,'
  548. dataBeSent2 += ' "floor": "' + data.floor + '" ,'
  549. dataBeSent2 += ' "compartment": "' + data.compartment + '" ,'
  550. dataBeSent2 += ' "ceiling": "' + data.ceiling + '" ,'
  551. dataBeSent2 += ' "room": "' + data.room + '" ,'
  552. dataBeSent2 += ' "liveroom": "' + data.liveroom + '" ,'
  553. dataBeSent2 += ' "bathroom": "' + data.bathroom + '" }';
  554. console.log(dataBeSent2);
  555. if ($('#credit').prop("checked")) {
  556. console.log('1111');
  557. $.ajax({
  558. type: 'POST',
  559. url: 'https://api.ptt.cx:9998/hhh/mail/deco/v3',
  560. data: dataBeSent2,
  561. dataType: 'json',
  562. contentType: 'application/json; charset=utf-8',
  563. success: function (res1) {
  564. // alert('送出成功');
  565. console.log('成功');
  566. },
  567. error: function (error) {
  568. console.error(error);
  569. // alert('送出失敗');
  570. }
  571. });
  572. }
  573. console.log('s');
  574. console.log(res.data.guid);
  575. console.log(bodyFormData));
  576. // calculatorlink='/about/calculator_result/' + res.data.guid + '/';
  577. calculatorResult = res.data.guid; */
  578. // console.log(calculatorlink);
  579. } else {
  580. Swal.fire({
  581. title: '似乎出了什麼問題 請稍後再試',
  582. showConfirmButton: false,
  583. });
  584. }
  585. },
  586. error: function (error) {
  587. //alert('e2');
  588. console.error('e2:' + error);
  589. },
  590. complete: function () {
  591. //alert('c2');
  592. //location.href = '/about/calculator_result/' + calculatorResult + '/';
  593. // location.href = '/about/calculator_result/' + calculatorResult + '/';
  594. },
  595. });
  596. bodyFormData = new FormData();
  597. dataBeSent1 = '{ "email": "yukyo@choozmo.com" ,';
  598. dataBeSent1 += ' "name": "name" ,';
  599. dataBeSent1 += ' "phone": "0912345678" ,';
  600. dataBeSent1 += ' "hasRequest": "N" ,';
  601. dataBeSent1 += ' "house_type": "新成屋" ,';
  602. dataBeSent1 += ' "location": "新北市" ,';
  603. dataBeSent1 += ' "house_year": "11 ~ 15年" ,';
  604. dataBeSent1 += ' "floor": "超耐磨木地板" ,';
  605. dataBeSent1 += ' "compartment": "白磚牆輕隔間" ,';
  606. dataBeSent1 += ' "ceiling": "平頂天花板" ,';
  607. dataBeSent1 += ' "change_area": "全室裝修" ,';
  608. dataBeSent1 += ' "contact_status": "N" ,';
  609. dataBeSent1 += ' "pin": "123" ,';
  610. dataBeSent1 += ' "room": "五房" ,';
  611. dataBeSent1 += ' "liveroom": "二廳" ,';
  612. dataBeSent1 += ' "bathroom": "一衛" ,';
  613. dataBeSent1 += ' "is_edm": "N" ,';
  614. dataBeSent1 += ' "message": "--" }';
  615. bodyFormData.append('data', dataBeSent1);
  616. //console.log(JSON.stringify(bodyFormData));
  617. /* $.ajax({
  618. type: "POST",
  619. url: "https://stage.hhh.com.tw/login/forms_save?type=calculator",
  620. // 要處理
  621. data: bodyFormData,
  622. processData: false,
  623. contentType: false,
  624. success: function (res) {
  625. //window.location.href = '/login/facebook_process?r={ci_login_return_url}&redirect=/about/calculator';
  626. // 要處理
  627. },
  628. error: function (error) {
  629. console.error(error)
  630. }
  631. }); */
  632. }
  633. </script>
  634. <script>
  635. $(document).ready(function () {
  636. /* $('#freeConsult-y').on('click', function () {
  637. // 呼叫 ajax
  638. $.ajax({
  639. type: "POST",
  640. url: "https://www.hhh.com.tw/Adapter/index?api_url=third/v1/Calculator/contact&http_method=PUT",
  641. datatype: "json",
  642. data: bodyFormData,
  643. processData: false,
  644. contentType: false,
  645. success: function (res) {
  646. },
  647. error: function (error) {
  648. console.error(error)
  649. }
  650. })
  651. $('#freeConsult').modal('hide')
  652. $('#contactSend').modal('show').delay(5000)
  653. }) */
  654. });
  655. </script>
  656. <script>
  657. $(document).ready(function () {
  658. /* $(".contact-form1").submit(function (e) {
  659. //alert('aa');
  660. }); */
  661. });
  662. </script>
  663. </body>
  664. </html>