冯诚 vor 2 Jahren
Ursprung
Commit
7700e741f3

+ 1 - 23
src/App.vue

@@ -4,11 +4,7 @@
     :show-nav-icons="!/^\/password/.test($route.path)"
     :fixed="true"
   />
-  <div
-    class="main-container"
-    :class="{ 'white-down-md': state.bgWhite }"
-    :style="$route.path === '/' ? 'min-height: auto; padding-bottom: 0;' : ''"
-  >
+  <div class="main-container" :class="{ 'white-down-md': state.bgWhite }">
     <router-view
       :class="[
         'main-wrapper',
@@ -17,24 +13,6 @@
     />
   </div>
   <PageFooter v-if="$route.path !== '/'" />
-
-  <ul v-else class="contents">
-    <li><router-link to="/login">登录</router-link></li>
-    <li><router-link to="/account">账号信息</router-link></li>
-    <li><router-link to="/password/reset">密码找回</router-link></li>
-    <li><router-link to="/order">我的订单</router-link></li>
-    <li><router-link to="/gift-card">我的礼品卡</router-link></li>
-    <li><router-link to="/order/1">会员权益</router-link></li>
-    <li><router-link to="/renewal">续费管理</router-link></li>
-    <li><router-link to="/mailing">邮寄商品</router-link></li>
-    <li><router-link to="/fill-order">购买下单</router-link></li>
-    <li><router-link to="/pay-result/success">支付成功</router-link></li>
-    <li><router-link to="/pay-result/fail">支付失败</router-link></li>
-    <li><router-link to="/imei/bind">绑定IMEI</router-link></li>
-    <li><router-link to="/repair/appointment">维修预约</router-link></li>
-    <li><router-link to="/repair/history">维修记录</router-link></li>
-    <li><router-link to="/invite">邀请好友</router-link></li>
-  </ul>
 </template>
 
 <script setup lang="ts">

+ 2 - 9
src/components/footer/index.vue

@@ -69,10 +69,10 @@
         <p class="item-name">PTC Care Plus</p>
         <ul class="item-links">
           <li class="item-link">
-            <a :href="buildUrl('feature')">Feature</a>
+            <a href="/feature/">Feature</a>
           </li>
           <li class="item-link">
-            <a :href="buildUrl('why')">Why PTC Care plus</a>
+            <a href="/why/">Why PTC Care plus</a>
           </li>
           <li class="item-link">
             <a href="https://www.ptc.net.au/terms-and-conditions/"
@@ -93,13 +93,6 @@
   </div>
 </template>
 
-<script setup lang="ts">
-function buildUrl(path: string) {
-  // return import.meta.env.BASE_URL + path
-  return '#'
-}
-</script>
-
 <style lang="scss">
 .page-footer {
   display: none;

+ 4 - 2
src/components/nav-bar/index.vue

@@ -3,7 +3,7 @@
     <div class="nav-bar-left">
       <div class="nav-icons">
         <i v-if="showNavIcons" class="icon-menu" @click="showMenu = true"></i>
-        <router-link class="icon-logo" to="/"></router-link>
+        <a class="icon-logo" href="/care/"></a>
         <i v-if="showNavIcons" class="icon-mine" @click.stop="onClickMine"></i>
       </div>
       <transition
@@ -92,7 +92,9 @@
             <div v-else class="p3">
               <div class="txt">
                 ${{ state.rebuyDiscount }} off for additional services |
-                <strong class="primary" @click="handleBuy">Buy now ></strong>
+                <strong class="primary pointer" @click="handleBuy"
+                  >Buy now ></strong
+                >
               </div>
               <div class="swiper">
                 <div class="swiper-wrapper">

+ 18 - 5
src/pages/dashboard/index.vue

@@ -12,13 +12,21 @@
           </p>
         </div>
         <div v-if="!state.userInfo.orders.length" class="p2">
-          <p class="txt">You have not purchased a member</p>
+          <p class="txt">
+            You have not purchased a member{{
+              state.userInfo.num_order_expired > 0
+                ? `, $${state.rebuyDiscount} off for additional services`
+                : ''
+            }}
+          </p>
           <button class="btn" @click="$router.push('/fill-order')">BUY</button>
         </div>
         <div v-else class="p3">
           <div class="txt">
-            $10 off for additional services |
-            <strong class="primary">Buy now ></strong>
+            ${{ state.rebuyDiscount }} off for additional services |
+            <strong class="primary pointer" @click="$router.push('/fill-order')"
+              >Buy now ></strong
+            >
           </div>
           <div class="swiper">
             <div
@@ -62,7 +70,7 @@
         </div>
       </div>
       <ul class="dropdown-list">
-        <template v-if="state.userInfo.orders.length">
+        <template v-if="state.userInfo.num_order > 0">
           <li class="dropdown-item i1">
             <router-link to="/repair/history">MY REPAIR REQUEST</router-link>
           </li>
@@ -76,7 +84,12 @@
         <li class="dropdown-item i4">
           <router-link to="/invite"
             >INVITE FRIENDS
-            <span class="ptc-tag">Get a $10 coupon</span></router-link
+            <span v-if="state.coupon.coupon_amount" class="ptc-tag"
+              >Get ${{
+                state.coupon.coupon_amount * state.coupon.coupon_num
+              }}
+              coupon</span
+            ></router-link
           >
         </li>
         <li class="dropdown-item i5">

+ 2 - 1
src/pages/fill-order/index.vue

@@ -29,10 +29,11 @@ import { getDiscountInfo } from '@/service/order'
 
 const step = ref(0)
 const Component = computed(() => [StepOne, StepTwo, StepThree][step.value])
-const { from, invitee, renewal } = useRoute().query as any
+const { from, invitee, renewal, pid } = useRoute().query as any
 
 state.form.from = from || (renewal ? 'renew' : '')
 state.form.invitor = invitee || ''
+if (pid) state.form.product_id = +pid
 if (renewal) {
   state.form.renewal = +renewal
   getCurrentOrder(renewal).then(() => {

+ 7 - 3
src/pages/login/index.vue

@@ -1,8 +1,8 @@
 <template>
   <div ref="root" class="p-login">
-    <router-link class="nav-home" to="/">
+    <a class="nav-home" href="/care/">
       <i class="icon"></i><span class="text">HOME</span>
-    </router-link>
+    </a>
     <div class="logo"></div>
     <div class="container">
       <div class="ptc-form">
@@ -112,7 +112,11 @@ async function handleLogin() {
   const { message } = await login(values as any)
   Toast(message)
   const { need_change } = await getUserInfo()
-  ;+need_change ? router.push('/password/change') : router.replace(from || '/')
+  ;+need_change
+    ? router.push('/password/change')
+    : from
+    ? router.replace(from)
+    : location.replace('/care/')
 }
 </script>
 

+ 1 - 1
src/pages/pay-result/index.vue

@@ -119,7 +119,7 @@ export default defineComponent({
   },
   methods: {
     toHomePage() {
-      location.href = '/ptc/'
+      location.href = '/care/'
     },
     customerService() {
       Beacon('open')

+ 2 - 2
src/pages/register/index.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="p-register">
-    <router-link class="nav-home" to="/">
+    <a class="nav-home" href="/care/">
       <i class="icon"></i><span class="text">HOME</span>
-    </router-link>
+    </a>
     <div class="logo"></div>
     <div class="container">
       <div class="ptc-form">

+ 7 - 3
src/pages/repair/steps/StepFive.vue

@@ -9,10 +9,14 @@
         <i class="icon-calendar"></i><strong>Add to calendar ></strong>
       </div> -->
       <div class="note">
-        <p class="note-title">Preparations:</p>
         <ul class="note-list">
-          <li class="note-item">· You need to back up the data in advance</li>
-          <li class="note-item">· You need to back up the data in advance</li>
+          <li class="note-item">
+            Thank you for booking your mobile phone repair with us!
+          </li>
+          <li class="note-item">
+            Our booking agent will be contacting you shortly to confirm your
+            booking.
+          </li>
         </ul>
       </div>
       <div class="detail">

+ 1 - 1
src/pages/repair/steps/StepOne.vue

@@ -40,7 +40,7 @@
             <li
               v-for="(item, index) of list"
               :key="index"
-              class="shop-item border-bottom"
+              class="shop-item border-bottom pointer"
               @click="selectShop(item)"
             >
               <div class="shop-name">