|
|
@@ -38,15 +38,119 @@
|
|
|
@save="save"
|
|
|
@choose-episode="onChooseEpisode"
|
|
|
@ended="next"
|
|
|
+ @pay="showPayModal = true"
|
|
|
/>
|
|
|
</swiper-slide>
|
|
|
</VueSwiper>
|
|
|
</div>
|
|
|
+
|
|
|
+ <ion-modal
|
|
|
+ ref="modal"
|
|
|
+ class="pay-modal"
|
|
|
+ :is-open="showPayModal"
|
|
|
+ :initial-breakpoint="1"
|
|
|
+ :breakpoints="[0, 1]"
|
|
|
+ @ionModalDidDismiss="showPayModal = false"
|
|
|
+ >
|
|
|
+ <ion-content>
|
|
|
+ <div class="divide-y divide-neutral-600 text-white">
|
|
|
+ <div class="mb-6">
|
|
|
+ <div
|
|
|
+ class="mt-6 text-center text-sm text-prim text-opacity-80"
|
|
|
+ >
|
|
|
+ You haven't unlocked this episode yet
|
|
|
+ </div>
|
|
|
+ <div class="text-center text-xl mt-2 font-bold">
|
|
|
+ Join the Membership
|
|
|
+ </div>
|
|
|
+ <div class="text-center text-sm mt-1 px-4">
|
|
|
+ unlock and watch all our videos without any
|
|
|
+ limit
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="flex space-x-4 pt-6 px-4">
|
|
|
+ <div
|
|
|
+ v-for="(item, n) in plans"
|
|
|
+ :key="n"
|
|
|
+ class="h-44 bg-neutral-700 flex-1 rounded-lg flex flex-col items-center border-neutral-500 border-2 overflow-hidden relative"
|
|
|
+ :class="{ '!border-prim': selectedPlan === n }"
|
|
|
+ @click="selectedPlan = n"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ class="absolute top-0 left-0 bg-prim rounded-br-lg text-xs px-2 py-1"
|
|
|
+ v-if="n === 0"
|
|
|
+ >
|
|
|
+ Exclusive
|
|
|
+ </div>
|
|
|
+ <div class="mt-8 text-xl font-bold flex-1">
|
|
|
+ {{ item.title }}
|
|
|
+ </div>
|
|
|
+ <div class="flex-1">
|
|
|
+ <div
|
|
|
+ class="bg-prim bg-opacity-30 rounded-full px-3 py-1 text-opacity-50 text-sm"
|
|
|
+ >
|
|
|
+ {{ item.desc }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="h-8 bg-neutral-500 self-stretch text-base font-bold flex items-center justify-center"
|
|
|
+ :class="{ 'bg-prim': selectedPlan === n }"
|
|
|
+ >
|
|
|
+ <ion-label color="">
|
|
|
+ ${{ item.price }}
|
|
|
+ </ion-label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <IonButton
|
|
|
+ color="tertiary"
|
|
|
+ expand="block"
|
|
|
+ class="mx-4 mt-8 font-bold"
|
|
|
+ >
|
|
|
+ ${{ plans[selectedPlan].price }} Pay Now
|
|
|
+ </IonButton>
|
|
|
+ </ion-content>
|
|
|
+ </ion-modal>
|
|
|
+
|
|
|
+ <IonModal :isOpen="showCheckoutModal">
|
|
|
+ <IonHeader>
|
|
|
+ <IonToolbar>
|
|
|
+ <IonButtons slot="secondary">
|
|
|
+ <IonButton @click="showCheckoutModal = false">
|
|
|
+ <IonIcon :icon="chevronBack" />
|
|
|
+ </IonButton>
|
|
|
+ </IonButtons>
|
|
|
+ <IonTitle>
|
|
|
+ <IonLabel>Checkout</IonLabel>
|
|
|
+ </IonTitle>
|
|
|
+ </IonToolbar>
|
|
|
+ </IonHeader>
|
|
|
+ <IonContent>
|
|
|
+ <iframe
|
|
|
+ class="h-full w-full border-none"
|
|
|
+ src="https://shorts.izouma.com/stripe-checkout"
|
|
|
+ ></iframe>
|
|
|
+ </IonContent>
|
|
|
+ </IonModal>
|
|
|
</ion-content>
|
|
|
</ion-page>
|
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
|
-import { IonPage, IonContent, useIonRouter, IonModal } from "@ionic/vue";
|
|
|
+import {
|
|
|
+ IonPage,
|
|
|
+ IonContent,
|
|
|
+ useIonRouter,
|
|
|
+ IonModal,
|
|
|
+ IonHeader,
|
|
|
+ IonButtons,
|
|
|
+ IonButton,
|
|
|
+ IonToolbar,
|
|
|
+ IonLabel,
|
|
|
+ IonBackButton,
|
|
|
+ IonTitle,
|
|
|
+ IonIcon,
|
|
|
+} from "@ionic/vue";
|
|
|
import { Swiper as VueSwiper, SwiperSlide } from "swiper/vue";
|
|
|
import { Swiper } from "swiper";
|
|
|
import {
|
|
|
@@ -61,6 +165,7 @@ import { nextTick, onMounted, reactive, ref } from "vue";
|
|
|
import { useElementBounding } from "@vueuse/core";
|
|
|
import { useRoute } from "vue-router";
|
|
|
import http from "@/plugins/http";
|
|
|
+import { close, chevronBack } from "ionicons/icons";
|
|
|
|
|
|
const el = ref<HTMLElement | null>(null);
|
|
|
const { x, y, top, right, bottom, left, width, height } =
|
|
|
@@ -127,5 +232,25 @@ function next() {
|
|
|
swiper.value?.slideTo(activeSlide.value + 1);
|
|
|
}
|
|
|
}
|
|
|
+const showPayModal = ref(false);
|
|
|
+const plans = [
|
|
|
+ {
|
|
|
+ title: "7 Days",
|
|
|
+ desc: "Unlimited",
|
|
|
+ price: 0.99,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "1 Month",
|
|
|
+ desc: "Unlimited",
|
|
|
+ price: 19.99,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "3 Months",
|
|
|
+ desc: "Unlimited",
|
|
|
+ price: 49.99,
|
|
|
+ },
|
|
|
+];
|
|
|
+const selectedPlan = ref(0);
|
|
|
+const showCheckoutModal = ref(true);
|
|
|
</script>
|
|
|
<style lang="less" scoped></style>
|