Parcourir la source

add contact page

fengchang il y a 1 an
Parent
commit
40581ebd82

+ 7 - 0
hichina-main-back/src/main/java/com/hichina/main/back/hichinamainback/utils/HttpUtils.java

@@ -30,6 +30,13 @@ import java.net.*;
 public class HttpUtils {
     private static final Logger LOG = LoggerFactory.getLogger(HttpUtils.class);
 
+    /**
+     * this is the tricky code with socks 5 proxy, can use as a template
+     * @param url
+     * @param proxyHost
+     * @param proxyPort
+     * @return
+     */
     public static JsonObject sendToWithProxyV2(String url, String proxyHost, Integer proxyPort){
         InetSocketAddress proxyAddr = new InetSocketAddress(proxyHost, proxyPort);
         Proxy proxy = new Proxy(Proxy.Type.SOCKS, proxyAddr);

+ 5 - 0
hichina-main-front/src/router/index.js

@@ -46,6 +46,11 @@ const constantRoutes = [
         name: 'product',
         component: () => import('@/views/product')
       },
+      {
+        path: '/contact',
+        name: 'contact',
+        component: () => import('@/views/contact')
+      },
       {
         path: '/finishpay',
         name: 'finishpay',

+ 87 - 0
hichina-main-front/src/views/contact/index.vue

@@ -0,0 +1,87 @@
+<template>
+  <div class="contact-container">
+    <h2 class="center-text">You need help from our customer serivce?</h2>
+    <h3 class="center-text subtitle">Please send your demands to</h3>
+    <div class="center-text mailcontact" >
+      <a href="mailto:customerservice@hichinatrip.com">customerservice@hichinatrip.com</a>
+    </div>
+    <div class="center-text subtitle">our co-workers will will response ASAP</div>
+    <h2 class="center-text contact-us">Also, add us on Wechat/WhatsAPP!</h2>
+    <div class="center-text">
+      <v-lazy-image src="https://photoprism.hichinatravel.com/api/v1/t/f62b1535514a0ce49a5ddb32d3d98edf93094606/32mcf2k4/fit_1280" alt="" />
+    </div>
+
+  </div>
+  
+</template>
+
+<script setup>
+import VLazyImage from "v-lazy-image";
+import router from "../../router";
+import {AXIOS} from '@/common/http-commons'
+import { ElNotification } from 'element-plus'  
+
+const peopleform = reactive([]);
+const uniform = ref([]);
+const contactform = ref({});
+const route = useRoute();
+
+const coupon = ref("");
+const country = ref("");
+const productName = ref("");
+const productTypeId = ref("");
+const productSkuId = ref("")
+const packageCategory = ref("");
+const selectedDate = ref(new Date());
+const adultCount = ref(0);
+const childCount = ref(0);
+const infantCount = ref(0);
+const buyCount = ref(1)
+const totalPrice = ref(0);
+
+const LOCALSPECIALTYPRODUCTTYPE = "fd264cab-ee8d-4571-a477-03d7e7c090b3";
+
+const genderOptions = [
+  {
+    value: "1",
+    label: "Male",
+  },
+  {
+    value: "0",
+    label: "Female",
+  },
+];
+
+function checkEmpty(val) {
+  if (val == null || val.length < 1) {
+    return true;
+  } else {
+    return false;
+  }
+}
+
+
+onMounted(() => {
+  console.log("mounted contact")
+});
+</script>
+
+<style scoped lang="scss">
+.contact-container{
+  margin: 0 auto;
+  width: 70%;
+  min-width: 500px;
+}
+.center-text{
+  text-align: center;
+}
+.subtitle{
+  color: #90908b;
+}
+.mailcontact{
+  margin: 0 auto;
+}
+.contact-us{
+  color: #90908b;
+}
+</style>

+ 6 - 2
hichina-main-front/src/views/product/detail.vue

@@ -67,7 +67,7 @@
         <p>CNY</p>
         <p v-if="productTypeId!=LOCALSPECIALTYPRODUCTTYPE && productTypeId!= HOTELPRODUCTTYPE" class="price flex-item">{{ adultCount*adultUnitPrice+childCount*childUnitPrice+infantCount*infantUnitPrice }}</p>
         <p v-if="productTypeId==LOCALSPECIALTYPRODUCTTYPE || productTypeId== HOTELPRODUCTTYPE" class="price flex-item">{{ generalPrice*buyCount }}</p>
-        <button class="pre-book">Pre-Book Consult</button>
+        <button class="pre-book" @click="goPage('/contact')">Pre-Book Consult</button>
         <button class="book" @click="collectConfigAndGoPage('book')">Book Now</button>
       </div>
     </div>
@@ -93,6 +93,7 @@
 </template>
 
 <script setup>
+  import router from "../../router";
   import VLazyImage from "v-lazy-image";
   import {AXIOS} from '@/common/http-commons'
   import { useRouter } from 'vue-router';
@@ -119,7 +120,9 @@
     return text;
   }
 
-  const router = useRouter()
+  function goPage(val){
+    router.push({path: val})
+  }
   const activeCategory = ref("")
   const adultCount = ref(1)
   const childCount = ref(0)
@@ -635,6 +638,7 @@
     }
 
     .pre-book {
+      cursor: pointer;
       width: 151px;
       height: 100%;
       color: rgba(250, 250, 250, 1);