<template>
|
<PageLayoutWithBg class="phoneBillRecharge-page-wrapper" :title="current != 'step2' ? title : ''">
|
<template #navigationBar v-if="current === 'step2'">
|
<TranslateNavigationBar :title="title" :rangeValue="rangeValue"> </TranslateNavigationBar>
|
</template>
|
<template #bg>
|
<div
|
class="phoneBillRecharge-page-bg"
|
:style="
|
current === 'step2' && {
|
backgroundImage: `url(${OssAssets.common.PhoneBillRechargePageBg})`,
|
opacity: 1 - rangeValue,
|
}
|
"
|
></div>
|
</template>
|
<ContentScrollView hasPaddingTop style="background-color: transparent" @scroll="scroll">
|
<InnerPage @currentChange="handleCurrentChange" />
|
</ContentScrollView>
|
</PageLayoutWithBg>
|
</template>
|
|
<script setup lang="ts">
|
import { useScrollRange } from '@/hooks';
|
import InnerPage from './InnerPage.vue';
|
import { OssAssets } from '@/constants';
|
|
defineOptions({
|
name: 'phoneBillRecharge',
|
});
|
|
type Current = 'step1' | 'step2';
|
|
const title = '话费充值';
|
|
const current = ref<Current>();
|
|
function handleCurrentChange(val: Current) {
|
current.value = val;
|
}
|
|
const { rangeValue, scroll } = useScrollRange();
|
</script>
|
|
<style lang="scss">
|
@import '@/styles/common.scss';
|
|
.phoneBillRecharge-page-wrapper {
|
background-color: $body-background-color;
|
|
.phoneBillRecharge-page-bg {
|
position: absolute;
|
z-index: 1;
|
top: 0;
|
left: 0;
|
right: 0;
|
bottom: 0;
|
background-size: 100% 452px;
|
background-repeat: no-repeat;
|
}
|
}
|
</style>
|