油站小程序

This commit is contained in:
@QQNZX 2023-12-15 14:00:09 +08:00
parent 407af8365e
commit c90136e79b
3 changed files with 340 additions and 294 deletions

View File

@ -25,7 +25,7 @@
<view class=""> <text style="font-weight: bold;font-size: 26px;">{{cardBalance}}</text> <view class=""> <text style="font-weight: bold;font-size: 26px;">{{cardBalance}}</text>
</view> </view>
</view> </view>
<view class="anniu-cz" @click="gocard()"> <view class="anniu-cz" @click="gocard(0)">
<text>立即充值</text> <text>立即充值</text>
</view> </view>
</view> </view>
@ -34,10 +34,6 @@
<!-- 囤油卡 --> <!-- 囤油卡 -->
<view class="xyihang"> <view class="xyihang">
<view class="title-hei">囤油卡</view> <view class="title-hei">囤油卡</view>
<view class="d_dis"> <view class="d_dis">
<view class="" @click="s_()"> <view class="" @click="s_()">
<text>上一张</text> <text>上一张</text>
@ -48,11 +44,6 @@
<uni-icons type="refreshempty" color="#2979ff" size="20"></uni-icons> <uni-icons type="refreshempty" color="#2979ff" size="20"></uni-icons>
</view> </view>
</view> </view>
</view> </view>
<view class="card-ty"> <view class="card-ty">
<view class="card-top"> <view class="card-top">
@ -73,10 +64,13 @@
style="margin-right: 15px;"></uni-icons> style="margin-right: 15px;"></uni-icons>
</view> </view>
</view> </view>
<view class="anniu-cz" @click="gocard()"> <view class="z_yw">
<view class="anniu-cz" @click="gocard(1)">
<text>立即充值</text> <text>立即充值</text>
</view> </view>
</view> </view>
</view>
<!-- 礼品卡 --> <!-- 礼品卡 -->
<view class="xyihang"> <view class="xyihang">
<view class="title-hei">礼品卡</view> <view class="title-hei">礼品卡</view>
@ -104,10 +98,12 @@
style="margin-right: 15px;"></uni-icons> style="margin-right: 15px;"></uni-icons>
</view> </view>
</view> </view>
<view class="anniu-cz" @click="gocard()"> <view class="z_yw">
<view class="anniu-cz" @click="gocard(2)">
<text>立即兑换</text> <text>立即兑换</text>
</view> </view>
</view> </view>
</view>
</view> </view>
@ -134,9 +130,9 @@
this.getUserBalance() this.getUserBalance()
}, },
methods: { methods: {
gocard() { gocard(id) {
uni.navigateTo({ uni.navigateTo({
url: '/pagesHome/oilRecharge/oilRecharge' url: '/pagesHome/oilRecharge/oilRecharge?id=' + id
}) })
}, },
s_() { s_() {
@ -342,4 +338,12 @@
font-weight: bold; font-weight: bold;
color: #000; color: #000;
} }
.z_yw {
width: 100%;
margin: 5px auto;
display: flex;
align-items: center;
justify-content: flex-end;
}
</style> </style>

View File

@ -193,6 +193,9 @@
}, },
components: { components: {
},
onLoad(option) {
this.actinput = option.id
}, },
onShow() { onShow() {
this.getValueCars(); this.getValueCars();

View File

@ -7,10 +7,15 @@
<view class="my-icons"></view> <view class="my-icons"></view>
</view> </view>
<!-- 顶部区域 --> <!-- 顶部区域 -->
<uni-swiper-dot class="uni-swiper-dot-box" @clickItem=clickItem :info="info" :current="current" :mode="mode"
:dots-styles="dotsStyles" field="content">
<swiper class="swiper-box" @change="change" :current="swiperDotIndex">
<swiper-item v-for="(item, index) in 20" :key="index">
<view class="top-box"> <view class="top-box">
<view class="b-top"> <view class="b-top">
<view style="width: 70%;"> <view style="width: 70%;">
<view class="title-size">V2会员</view> <view class="title-size">V{{index}}会员</view>
<view class="min-size" style="margin-bottom: 20px;">升级会员享更多特权</view> <view class="min-size" style="margin-bottom: 20px;">升级会员享更多特权</view>
<view class="min-size" style="margin-bottom: 10px;">在获得358可升级至钻石会员</view> <view class="min-size" style="margin-bottom: 10px;">在获得358可升级至钻石会员</view>
<u-line-progress :percentage="30" activeColor="#2F72F7"></u-line-progress> <u-line-progress :percentage="30" activeColor="#2F72F7"></u-line-progress>
@ -20,6 +25,7 @@
</view> </view>
</view> </view>
</view> </view>
<!-- qy -->
<view class="c-box"> <view class="c-box">
<view class="title-bai">会员权益</view> <view class="title-bai">会员权益</view>
<view class="wrap-box"> <view class="wrap-box">
@ -73,6 +79,11 @@
</view> </view>
</view> </view>
</view> </view>
</swiper-item>
</swiper>
</uni-swiper-dot>
<view style="height: 340px; width: 100%;"></view> <view style="height: 340px; width: 100%;"></view>
<view class="bottom-box"> <view class="bottom-box">
@ -116,11 +127,32 @@
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
title: '', title: '',
info: [{
colorClass: 'uni-bg-red',
url: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/shuijiao.jpg',
content: '内容 A'
},
{
colorClass: 'uni-bg-green',
url: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/shuijiao.jpg',
content: '内容 B'
},
{
colorClass: 'uni-bg-blue',
url: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/shuijiao.jpg',
content: '内容 C'
}
],
modeIndex: -1,
styleIndex: -1,
current: 0,
mode: 'default',
dotsStyles: {},
swiperDotIndex: 0
} }
}, },
@ -129,27 +161,34 @@ export default {
}, },
methods: { methods: {
change(e) {
this.current = e.detail.current
},
goback() { goback() {
uni.navigateBack() uni.navigateBack()
} }
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.content { .swiper-box {
height: 500px;
}
.content {
background: #2F3648; background: #2F3648;
height: 100vh; height: 100vh;
} }
.container { .container {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
padding-top: 88px; padding-top: 88px;
} }
.my-header { .my-header {
width: 100%; width: 100%;
height: 88px; height: 88px;
background: #ffffff; background: #ffffff;
@ -168,24 +207,24 @@ export default {
position: fixed; position: fixed;
top: 0px; top: 0px;
} }
.top-box { .top-box {
width: 90%; width: 90%;
border-radius: 8px; border-radius: 8px;
box-sizing: border-box; box-sizing: border-box;
padding: 20px; padding: 20px;
background: linear-gradient(90deg, #EEF4FF 0%, #AEC9FF 100%); background: linear-gradient(90deg, #EEF4FF 0%, #AEC9FF 100%);
margin: 10px auto; margin: 10px auto;
} }
.b-top { .b-top {
color: #2F72F7; color: #2F72F7;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.right-img { .right-img {
width: 80px; width: 80px;
height: 80px; height: 80px;
@ -193,18 +232,18 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.title-size { .title-size {
font-weight: bold; font-weight: bold;
font-size: 18px; font-size: 18px;
} }
.min-size { .min-size {
font-size: 12px; font-size: 12px;
} }
.c-box { .c-box {
width: 90%; width: 90%;
box-sizing: border-box; box-sizing: border-box;
padding: 15px; padding: 15px;
@ -212,30 +251,30 @@ export default {
height: 188px; height: 188px;
background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%); background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
border-radius: 8px; border-radius: 8px;
} }
.title-bai { .title-bai {
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
color: #ffffff; color: #ffffff;
} }
.wrap-box { .wrap-box {
width: 100%; width: 100%;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.box-ba { .box-ba {
width: 25%; width: 25%;
text-align: center; text-align: center;
margin: 10px auto; margin: 10px auto;
color: #ffffff; color: #ffffff;
font-size: 12px; font-size: 12px;
} }
.min-box { .min-box {
width: 30px; width: 30px;
height: 30px; height: 30px;
margin: 5px auto; margin: 5px auto;
@ -244,9 +283,9 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.bottom-box { .bottom-box {
background: #F3F5F9; background: #F3F5F9;
width: 100%; width: 100%;
border-radius: 16px 16px 0px 0px; border-radius: 16px 16px 0px 0px;
@ -256,9 +295,9 @@ export default {
bottom: 0px; bottom: 0px;
height: 340px; height: 340px;
} }
.bottom-bai-box { .bottom-bai-box {
width: 100%; width: 100%;
border-radius: 8px; border-radius: 8px;
background: #ffffff; background: #ffffff;
@ -267,36 +306,36 @@ export default {
} }
.b-top-bt { .b-top-bt {
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.title { .title {
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;
color: #333333; color: #333333;
} }
.times { .times {
font-size: 12px; font-size: 12px;
color: #999999; color: #999999;
} }
.btimg { .btimg {
image { image {
width: 44px; width: 44px;
height: 44px; height: 44px;
} }
} }
.anniu { .anniu {
width: 70px; width: 70px;
height: 30px; height: 30px;
background: #EB3E67; background: #EB3E67;
@ -308,18 +347,18 @@ export default {
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
} }
.disa { .disa {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.an-title { .an-title {
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;
color: #333333; color: #333333;
margin-left: 5px; margin-left: 5px;
} }
</style> </style>