油站小程序

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,9 +64,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">
<text>立即充值</text> <view class="anniu-cz" @click="gocard(1)">
<text>立即充值</text>
</view>
</view> </view>
</view> </view>
<!-- 礼品卡 --> <!-- 礼品卡 -->
<view class="xyihang"> <view class="xyihang">
@ -104,8 +98,10 @@
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">
<text>立即兑换</text> <view class="anniu-cz" @click="gocard(2)">
<text>立即兑换</text>
</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

@ -1,325 +1,364 @@
<template> <template>
<view class="content"> <view class="content">
<view class="container"> <view class="container">
<view class="my-header"> <view class="my-header">
<view class="my-icons" @click="goback"> <uni-icons type="left" size="16"></uni-icons> </view> <view class="my-icons" @click="goback"> <uni-icons type="left" size="16"></uni-icons> </view>
<view class="my-text">会员</view> <view class="my-text">会员</view>
<view class="my-icons"></view> <view class="my-icons"></view>
</view> </view>
<!-- 顶部区域 --> <!-- 顶部区域 -->
<view class="top-box"> <uni-swiper-dot class="uni-swiper-dot-box" @clickItem=clickItem :info="info" :current="current" :mode="mode"
<view class="b-top"> :dots-styles="dotsStyles" field="content">
<view style="width: 70%;"> <swiper class="swiper-box" @change="change" :current="swiperDotIndex">
<view class="title-size">V2会员</view> <swiper-item v-for="(item, index) in 20" :key="index">
<view class="min-size" style="margin-bottom: 20px;">升级会员享更多特权</view> <view class="top-box">
<view class="min-size" style="margin-bottom: 10px;">在获得358可升级至钻石会员</view>
<u-line-progress :percentage="30" activeColor="#2F72F7"></u-line-progress>
</view>
<view class="right-img">
<image src="../../static/imgs/vipxz.png" mode=""></image>
</view>
</view>
</view>
<view class="c-box">
<view class="title-bai">会员权益</view>
<view class="wrap-box">
<view class="box-ba">
<view class="min-box">
<image src="../../static/imgs/vipxz.png" mode=""></image>
</view>
<view class="">会员特权</view>
</view>
<view class="box-ba">
<view class="min-box">
<image src="../../static/imgs/vipxz.png" mode=""></image>
</view>
<view class="">会员特权</view>
</view>
<view class="box-ba">
<view class="min-box">
<image src="../../static/imgs/vipxz.png" mode=""></image>
</view>
<view class="">会员特权</view>
</view>
<view class="box-ba">
<view class="min-box">
<image src="../../static/imgs/vipxz.png" mode=""></image>
</view>
<view class="">会员特权</view>
</view>
<view class="box-ba">
<view class="min-box">
<image src="../../static/imgs/vipxz.png" mode=""></image>
</view>
<view class="">会员特权</view>
</view>
<view class="box-ba">
<view class="min-box">
<image src="../../static/imgs/vipxz.png" mode=""></image>
</view>
<view class="">会员特权</view>
</view>
<view class="box-ba">
<view class="min-box">
<image src="../../static/imgs/vipxz.png" mode=""></image>
</view>
<view class="">会员特权</view>
</view>
<view class="box-ba">
<view class="min-box">
<image src="../../static/imgs/vipxz.png" mode=""></image>
</view>
<view class="">会员特权</view>
</view>
</view>
</view>
<view style="height: 340px; width: 100%;"></view> <view class="b-top">
<view class="bottom-box"> <view style="width: 70%;">
<view class="bottom-bai-box"> <view class="title-size">V{{index}}会员</view>
<view class="b-top-bt"> <view class="min-size" style="margin-bottom: 20px;">升级会员享更多特权</view>
<view class="title">每日任务</view> <view class="min-size" style="margin-bottom: 10px;">在获得358可升级至钻石会员</view>
<view class="times">每天04:00更新</view> <u-line-progress :percentage="30" activeColor="#2F72F7"></u-line-progress>
</view> </view>
<view class="b-top-bt" style="margin: 10px auto; "> <view class="right-img">
<view class="disa"> <image src="../../static/imgs/vipxz.png" mode=""></image>
<view class="btimg"> </view>
<image src="../../static/imgs/dljf.png" mode=""></image> </view>
</view> </view>
<view class="an-title">每日登录</view> <!-- qy -->
</view> <view class="c-box">
<view class="anniu"> 去完成 </view> <view class="title-bai">会员权益</view>
</view> <view class="wrap-box">
<view class="b-top-bt" style="margin: 10px auto; "> <view class="box-ba">
<view class="disa"> <view class="min-box">
<view class="btimg"> <image src="../../static/imgs/vipxz.png" mode=""></image>
<image src="../../static/imgs/dljf.png" mode=""></image> </view>
</view> <view class="">会员特权</view>
</view>
<view class="box-ba">
<view class="min-box">
<image src="../../static/imgs/vipxz.png" mode=""></image>
</view>
<view class="">会员特权</view>
</view>
<view class="box-ba">
<view class="min-box">
<image src="../../static/imgs/vipxz.png" mode=""></image>
</view>
<view class="">会员特权</view>
</view>
<view class="box-ba">
<view class="min-box">
<image src="../../static/imgs/vipxz.png" mode=""></image>
</view>
<view class="">会员特权</view>
</view>
<view class="box-ba">
<view class="min-box">
<image src="../../static/imgs/vipxz.png" mode=""></image>
</view>
<view class="">会员特权</view>
</view>
<view class="box-ba">
<view class="min-box">
<image src="../../static/imgs/vipxz.png" mode=""></image>
</view>
<view class="">会员特权</view>
</view>
<view class="box-ba">
<view class="min-box">
<image src="../../static/imgs/vipxz.png" mode=""></image>
</view>
<view class="">会员特权</view>
</view>
<view class="box-ba">
<view class="min-box">
<image src="../../static/imgs/vipxz.png" mode=""></image>
</view>
<view class="">会员特权</view>
</view>
</view>
</view>
</swiper-item>
</swiper>
</uni-swiper-dot>
<view class="an-title">每日登录</view>
</view>
<view class="anniu"> 去完成 </view> <view style="height: 340px; width: 100%;"></view>
</view> <view class="bottom-box">
<view class="b-top-bt" style="margin: 10px auto; "> <view class="bottom-bai-box">
<view class="disa"> <view class="b-top-bt">
<view class="btimg"> <view class="title">每日任务</view>
<image src="../../static/imgs/dljf.png" mode=""></image> <view class="times">每天04:00更新</view>
</view> </view>
<view class="an-title">每日登录</view> <view class="b-top-bt" style="margin: 10px auto; ">
</view> <view class="disa">
<view class="anniu"> 去完成 </view> <view class="btimg">
</view> <image src="../../static/imgs/dljf.png" mode=""></image>
</view> </view>
</view> <view class="an-title">每日登录</view>
</view> </view>
</view> <view class="anniu"> 去完成 </view>
</view>
<view class="b-top-bt" style="margin: 10px auto; ">
<view class="disa">
<view class="btimg">
<image src="../../static/imgs/dljf.png" mode=""></image>
</view>
<view class="an-title">每日登录</view>
</view>
<view class="anniu"> 去完成 </view>
</view>
<view class="b-top-bt" style="margin: 10px auto; ">
<view class="disa">
<view class="btimg">
<image src="../../static/imgs/dljf.png" mode=""></image>
</view>
<view class="an-title">每日登录</view>
</view>
<view class="anniu"> 去完成 </view>
</view>
</view>
</view>
</view>
</view>
</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
}
},
} components: {
},
components: { },
methods: {
}, change(e) {
methods: { this.current = e.detail.current
goback() { },
uni.navigateBack() goback() {
} uni.navigateBack()
} }
} }
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.content { .swiper-box {
background: #2F3648; height: 500px;
height: 100vh; }
}
.container { .content {
width: 100%; background: #2F3648;
height: 100vh;
}
box-sizing: border-box; .container {
padding-top: 88px; width: 100%;
}
.my-header { box-sizing: border-box;
width: 100%; padding-top: 88px;
height: 88px; }
background: #ffffff;
display: flex;
align-items: center;
justify-content: space-between;
color: #000;
box-sizing: border-box;
padding: 0px 15px;
padding-top: 40px;
.my-icons { .my-header {
width: 20px; width: 100%;
height: 88px;
background: #ffffff;
display: flex;
align-items: center;
justify-content: space-between;
color: #000;
box-sizing: border-box;
padding: 0px 15px;
padding-top: 40px;
} .my-icons {
width: 20px;
position: fixed; }
top: 0px;
}
.top-box { position: fixed;
width: 90%; top: 0px;
border-radius: 8px; }
box-sizing: border-box;
padding: 20px;
background: linear-gradient(90deg, #EEF4FF 0%, #AEC9FF 100%);
margin: 10px auto;
}
.b-top { .top-box {
color: #2F72F7; width: 90%;
display: flex; border-radius: 8px;
justify-content: space-between; box-sizing: border-box;
} padding: 20px;
background: linear-gradient(90deg, #EEF4FF 0%, #AEC9FF 100%);
margin: 10px auto;
}
.right-img { .b-top {
width: 80px; color: #2F72F7;
height: 80px; display: flex;
justify-content: space-between;
}
image { .right-img {
width: 100%; width: 80px;
height: 100%; height: 80px;
}
}
.title-size { image {
font-weight: bold; width: 100%;
font-size: 18px; height: 100%;
} }
}
.min-size { .title-size {
font-size: 12px; font-weight: bold;
} font-size: 18px;
}
.c-box { .min-size {
width: 90%; font-size: 12px;
box-sizing: border-box; }
padding: 15px;
margin: 20px auto;
height: 188px;
background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
border-radius: 8px;
}
.title-bai { .c-box {
font-size: 18px; width: 90%;
font-weight: bold; box-sizing: border-box;
color: #ffffff; padding: 15px;
} margin: 20px auto;
height: 188px;
background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
border-radius: 8px;
}
.wrap-box { .title-bai {
width: 100%; font-size: 18px;
display: flex; font-weight: bold;
flex-wrap: wrap; color: #ffffff;
}
} .wrap-box {
width: 100%;
display: flex;
flex-wrap: wrap;
.box-ba { }
width: 25%;
text-align: center;
margin: 10px auto;
color: #ffffff;
font-size: 12px;
}
.min-box { .box-ba {
width: 30px; width: 25%;
height: 30px; text-align: center;
margin: 5px auto; margin: 10px auto;
color: #ffffff;
font-size: 12px;
}
image { .min-box {
width: 100%; width: 30px;
height: 100%; height: 30px;
} margin: 5px auto;
}
.bottom-box { image {
background: #F3F5F9; width: 100%;
width: 100%; height: 100%;
border-radius: 16px 16px 0px 0px; }
box-sizing: border-box; }
padding: 15px;
position: fixed;
bottom: 0px;
height: 340px;
} .bottom-box {
background: #F3F5F9;
width: 100%;
border-radius: 16px 16px 0px 0px;
box-sizing: border-box;
padding: 15px;
position: fixed;
bottom: 0px;
height: 340px;
.bottom-bai-box { }
width: 100%;
border-radius: 8px; .bottom-bai-box {
background: #ffffff; width: 100%;
box-sizing: border-box; border-radius: 8px;
padding: 10px; background: #ffffff;
box-sizing: border-box;
padding: 10px;
} }
.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;
border-radius: 15px; border-radius: 15px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
color: white; color: white;
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>