Browse Source

删除再次购买逻辑

ifcheng 2 years ago
parent
commit
b3da419ffa
2 changed files with 7 additions and 15 deletions
  1. 3 11
      src/pages/benefits/index.vue
  2. 4 4
      src/pages/fill-order/index.vue

+ 3 - 11
src/pages/benefits/index.vue

@@ -20,20 +20,12 @@
             Renewal management >
           </router-link>
         </p>
-        <p v-else class="l4">
+        <p v-else-if="subscribe_type == 3 && info.status == 1" class="l4">
           <button
             class="ptc-button ptc-button--stroke"
-            @click="
-              $router.push(
-                `/fill-order?id=${info.id}&renewal=${
-                  info.subscribe_type == 3 && info.status == 1
-                }`
-              )
-            "
+            @click="$router.push(`/fill-order?renewal=${info.id}`)"
           >
-            {{
-              info.subscribe_type == 3 && info.status == 1 ? 'Renewal' : 'Rebuy'
-            }}
+            Renewal
           </button>
         </p>
       </div>

+ 4 - 4
src/pages/fill-order/index.vue

@@ -28,13 +28,13 @@ import { state as rootState, getCurrentOrder } from '@/store'
 
 const step = ref(0)
 const Component = computed(() => [StepOne, StepTwo, StepThree][step.value])
-const { from, invitee, id, renewal } = useRoute().query as any
+const { from, invitee, renewal } = useRoute().query as any
 
 state.form.from = from || ''
 state.form.invitor = invitee || ''
-if (id) {
-  renewal === 'true' && (state.form.renewal = +id)
-  getCurrentOrder(id).then(() => {
+if (renewal) {
+  state.form.renewal = +renewal
+  getCurrentOrder(renewal).then(() => {
     const order = rootState.currentOrder
     if (state.productList.some(item => item.id === +order.product_id)) {
       state.form.product_id = +order.product_id