1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135 |
- <template>
- <view>
- <!-- 头部图片 -->
- <view class="banner">
- <img src="/static/img/banner1.jpg" alt="">
- </view>
- <!-- 选项列表 -->
- <view class="option-list">
- <view class="list-item" @click="scanCode">
- <view class="icon iconfont" style="background-color:#59d96e;">
- 
- </view>
- <view class="text">
- 扫码充电
- </view>
- </view>
- <view class="list-item">
- <view class="icon iconfont" style="background-color:#4BD2C0;">
- 
- </view>
- <view class="text">
- 快速充值
- </view>
- </view>
- <view class="list-item">
- <view class="icon iconfont" style="background-color: #6FA5FF;">
- 
- </view>
- <view class="text">
- 充电记录
- </view>
- </view>
- <view class="list-item">
- <view class="icon iconfont" style="background-color: #9D9FFF;">
- 
- </view>
- <view class="text">
- 附近站点
- </view>
- </view>
- </view>
- <!-- 站点 -->
- <!-- <view class="station">
- <view class="img-box">
- <img src="/static/img/Frame 198 (1).png" alt="">
- </view>
- <view class="text"> -->
- <!-- 站点头部 -->
- <!-- <view class="station-title">
- <text class="title-left">快充</text>
- <text class="title-right">荆沙大道救助站充电站</text>
- </view> -->
- <!-- 价格 -->
- <!-- <view class="station-price">
- <view class="price-left">1.25</view>
- <view class="price-right">
- 起 元/度
- </view>
- </view> -->
- <!-- park -->
- <!-- <view class="park">
- <text class="park-p">p</text>
- <text class="park-text">2小时免费停车</text>
- </view>
- <view class="count">
- <view class="count-left">空闲10/总数10</view>
- <view class="count-right"><text class="iconfont"></text>10公里</view>
- </view>
- </view>
- </view> -->
- <!-- 定位 -->
- <view class="location-box">
- <view class="location">
- <view class="location-text">
- <view class="text-1">
- 定位中...
- </view>
- <view class="text-2">
- 授权定位后可查询附近充电站
- </view>
- <view class="text-3">
- 重新定位
- </view>
- </view>
- <view class="img-box">
- <img src="/static/img/暂无网络信号-缺省页 1.png">
- </view>
- </view>
-
- </view>
- <!-- 充值活动 -->
- <view class=" top-up">
- <view class="top-up-title"><text class="line"></text>充值活动</view>
- <view class="img-box">
- <view class="img-1">
- <img src="/static/img/瓷片区1.png" alt="">
- <view class="img-text">
- 充100送20
- <view class="img-text2">即充即赠 立享优惠</view>
- </view>
- </view>
- <view class="img-1">
- <img src="/static/img/瓷片区2.png" alt="">
- <view class="img-text" style="color: #FF7C00;">
- 邀请有礼
- <view class="img-text2 color">最高可得500元</view>
- </view>
- </view>
- </view>
- </view>
- <!-- 新闻 -->
- <view class="news-title">
- <view class="news-title-left">
- <view class="line" style="margin-top:4px;"></view>新闻公告
- </view>
- <view class="more" @click="toNewsNotice">更多<view class="more-icon iconfont"> </view>
- </view>
- </view>
- <view class="news">
- <view class="news-content">
- <view class="content-text">
- 日印计划联手开发低成本充电桩 推动新兴市场电动车发展
- <view class="news-time">05-01 09:00</view>
- </view>
- <view class="content-img">
- <img src="/static/img/11091323191.jpg" alt="">
- </view>
- </view>
- <view class="news-content">
- <view class="content-text">
- 我国新能源汽车市场腾飞在即,充换电何时能够不再“拖后腿”?
- <view class="news-time">05-01 09:00</view>
- </view>
- <view class="content-img">
- <img src="/static/img/103613441.jpg" alt="">
- </view>
- </view>
- <view class="news-content">
- <view class="content-text">
- 新疆建成首个充电桩实验室
- <view class="news-time">05-01 09:00</view>
- </view>
- <view class="content-img">
- <img src="/static/img/180023631.jpg" alt="">
- </view>
- </view>
- </view>
- <view class="bottom" v-if="newsList.length ==recordsTotal">
- <view class="bot">
- <view class="bot-line"></view>
- <view class="bot-text">已经到底了</view>
- <view class="bot-line"></view>
- </view>
- </view>
- <!-- 导航栏 -->
- <view class="navigation">
- <!-- <view class="nav-items">
- <view class="nav-icon iconfont ">
- 
- </view>
- <view class="nav-text">主页</view>
- </view>
- <view class="nav-items">
- <view class="nav-icon iconfont"></view>
- <view class="nav-text">找桩</view>
- </view>
- <view class="nav-items">
- <view class="nav-icon iconfont"></view>
- <view class="nav-text">我的</view>
- </view> -->
- <view class="login-prompt">
- 登录显示更多会员服务
- <text class="button" >登录/注册</text>
- </view>
- <u-tabbar v-model="current" :list="tabbarList" active-color="#009143"></u-tabbar>
- </view>
- <!-- 登录提示 -->
-
- </view>
- </template>
- <script>
- import * as WxJsApi from '@/utils/wxJsApi.js'
- import MapLoader from '@/utils/AMap'
-
- export default {
- data() {
- return {
- newsList: [],
- pageIndex: 1,
- recordsTotal: 0,
- longitude: '',
- latitude: '',
- message: '',
- tabbarList: [{
- iconPath: "home-3-line",
- selectedIconPath: "home-3-fill",
- text: '主页 ',
- count: 0,
- isDot: true,
- customIcon: true,
- },
- {
- iconPath: "road-map-line",
- selectedIconPath: "road-map-fill",
- text: '找桩',
- midButton: true,
- customIcon: true,
- },
- {
- iconPath: "user-5-line",
- selectedIconPath: "user-5-fill",
- text: '我的',
- count: 0,
- isDot: false,
- customIcon: true,
- }
- ],
- current: 0
- }
- },
- onReachBottom() {
- if (this.newsList.length < this.recordsTotal) {
- this.myLoadmore();
- }
- },
- onReady() {
- WxJsApi.getWxConfig(['getLocation','addEventListener','scanQRCode']).then((res)=>{
- // console.log(res)
- }).catch(error => {
- console.log(res)
- })
-
- this.getPoint();
- this.getNewsList();
- },
- methods: {
- toNewsNotice() {
- uni.navigateTo({
- url: '/pages/article/newsNotice'
- })
- },
- //微信扫二维码
- scanCode() {
- WxJsApi.scanQRCode(1).then(res => {
-
- }).catch(error => {
-
- })
- },
- getPoint() {
- WxJsApi.getLocation().then((res) => {
- this.latitude = parseFloat(res.latitude);
- this.longitude = parseFloat(res.longitude);
- this.message = res.errMsg;
-
- if(res.errMsg != 'getLocation:ok') {
- uni.showToast({
- title:JSON.stringify(res)
- })
- }
- }).catch(error => {
- uni.showToast({
- title:JSON.stringify(error)
- })
- })
- },
- getNewsList(bl) {
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- if (bl) {
- this.newsList = [];
- this.pageIndex = 1;
- }
-
- uni.hideLoading();
- },
- myLoadmore() {
- this.pageIndex += 1;
- this.getNewsList()
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- // 头部图片
- img {
- width: 100%;
- height: 100%;
- }
- .banner {
- width: 100%;
- height: 300px;
- }
- // 选项列表
- .option-list {
- padding-top: 18px;
- width: 343px;
- height: 100px;
- line-height: 20px;
- border-radius: 8px;
- text-align: center;
- background-color: #fff;
- position: absolute;
- top: 260px;
- left: 0;
- right: 0;
- margin: auto;
- display: flex;
- justify-content: space-around;
- .list-item {
- // 图标
- .icon {
- width: 40px;
- height: 40px;
- border-radius: 99px;
- line-height: 40px;
- font-size: 24px;
- text-align: center;
- margin: auto;
- color: #ffffff;
- }
- }
- }
- // 站点
- .station {
- // width: 343px;
- height: 120px;
- margin-top: 70px;
- padding-top: 20px;
- padding: 0 12px;
- position: relative;
- .img-box {
- width: 100%;
- height: 100%;
- border-radius: 8px;
- overflow: hidden;
- }
- img {
- width: 100%;
- height: 100%;
- }
- .text {
- position: absolute;
- top: 0;
- left: 20px;
- // 头部
- .station-title {
- display: flex;
- margin-top: 12px;
- .title-left {
- display: inline-block;
- height: 20px;
- width: 44px;
- // margin-left: 12px;
- line-height: 20px;
- border-radius: 50px;
- background-color: rgba(133, 140, 255, 100);
- color: rgba(255, 255, 255, 100);
- font-size: 12px;
- text-align: center;
- font-family: Arial;
- }
- .title-right {
- display: inline-block;
- margin-left: 4px;
- margin-top: 2px;
- width: 271px;
- height: 16px;
- line-height: 16px;
- color: rgba(16, 16, 16, 100);
- font-size: 16px;
- text-align: left;
- font-family: AlibabaPuHui-regular;
- }
- }
- // 价格
- .station-price {
- margin-top: 4px;
- display: flex;
- .price-left {
- width: 40px;
- height: 20px;
- color: rgba(255, 98, 0, 100);
- font-size: 20px;
- text-align: left;
- font-family: Roboto-medium;
- }
- .price-right {
- height: 20px;
- line-height: 20px;
- margin-left: 2px;
- margin-top: 3px;
- color: rgba(102, 102, 102, 100);
- font-size: 14px;
- text-align: left;
- font-family: AlibabaPuHui-regular;
- }
- }
- // park
- .park {
- margin-top: 4px;
- display: flex;
- .park-p {
- display: inline-block;
- width: 20px;
- height: 18px;
- line-height: 12px;
- text-align: center;
- background-color: rgba(125, 177, 255, 100);
- color: #fff;
- }
- .park-text {
- display: inline-block;
- width: 300px;
- height: 17px;
- color: rgba(102, 102, 102, 100);
- font-size: 12px;
- text-align: left;
- margin-left: 2px;
- margin-top: 2px;
- }
- }
- // 数量
- .count {
- margin-top: 8px;
- width: 96%;
- display: flex;
- justify-content: space-between;
- }
- }
- }
- //定位
- .location {
- width: 343px;
- background-color: #ffffff;
- height: 120px;
- display: flex;
- margin: 70px auto 0;
- border-radius: 8px;
- border: #F2F4F4 1px;
- .location-text {
- padding: 24px 28px;
- .text-1 {
- height: 16px;
- line-height: 16px;
- color: rgba(16, 16, 16, 100);
- font-size: 16px;
- text-align: left;
- }
- .text-2 {
- height: 17px;
- line-height: 17px;
- color: rgba(102, 102, 102, 100);
- font-size: 12px;
- text-align: left;
- margin-top: 4px;
- }
- .text-3 {
- width: 80px;
- height: 24px;
- border-radius: 50px;
- color: rgba(0, 185, 98, 100);
- font-size: 12px;
- text-align: center;
- font-family: Microsoft Yahei;
- border: 1px solid rgba(0, 185, 98, 100);
- margin-top: 11px;
- }
- }
- .img-box {
- width: 120px;
- height: 120px;
- float: right;
- }
- }
- //充值
- .top-up {
- margin-left: 16px;
- margin-top: 17px;
- .top-up-title {
- color: rgba(16, 16, 16, 100);
- font-size: 16px;
- }
- .img-box {
- margin-top: 12px;
- width: 345px;
- height: 146px;
- display: flex;
- justify-content: space-between;
- .img-1 {
- width: 166px;
- height: 146px;
- position: relative;
- .img-text {
- position: absolute;
- top: 12px;
- left: 12px;
- height: 33px;
- color: #ff4444;
- font-size: 24px;
- text-align: left;
- margin-left: 12px;
- .img-text2 {
- font-size: 14px
- }
- }
- }
- img {
- width: 100%;
- height: 100%;
- }
- }
- }
- // 小竖线
- .line {
- display: inline-block;
- width: 3px;
- height: 12px;
- margin-right: 7px;
- background-color: rgba(0, 145, 67, 100);
- }
- // 新闻公告
- .news-title {
- padding: 0 16px;
- margin-top: 12px;
- color: rgba(16, 16, 16, 100);
- font-size: 16px;
- display: flex;
- justify-content: space-between;
- background-color: #F2F4F4;
- .news-title-left {
- display: flex;
- }
- .more {
- font-size: 14px;
- color: #777777;
- display: flex;
- line-height: 20px;
- .more-icon {
- font-size: 24px
- }
- }
- }
- .news {
- background-color: #fff;
- margin: 12px 16px 20px;
- border-radius: 8px;
- .news-content {
- display: flex;
- justify-content: space-between;
- padding: 12px;
- .content-text {
- width: 211px;
- height: 42px;
- line-height: 21px;
- color: #101010;
- text-align: left;
- font-size: 14px
- }
- ;
- .content-img {
- width: 100px;
- height: 80px;
- background-color: #777777;
- border-radius: 4px;
- overflow: hidden;
- img {
- width: 100%;
- height: 100%;
- }
- }
- .news-time {
- margin-top: 12px;
- color: #999999;
- width: 80px;
- height: 20px;
- font-size: 14px;
- }
- }
- }
- .bottom {
- width: 100%;
- height: 150px;
- .bot {
- width: 100%;
- padding-left: 66px;
- display: flex;
- .bot-line {
- margin-top: 20px;
- width: 80px;
- height: 0px;
- border: 1px solid rgba(207, 210, 213, 100);
- }
- .bot-text {
- width: 60px;
- height: 17px;
- margin-top: 13px;
- margin-left: 12px;
- margin-right: 12px;
- font-size: 12px;
- text-align: center;
- color: rgba(182, 189, 195, 100);
- }
- }
- }
- // 导航栏
- .navigation {
- width: 100%;
- // height: 40px;
- padding: 10px 0;
- background-color: #fff;
- position: fixed;
- bottom: 0;
- left: 0;
- display: flex;
- justify-content: space-around;
- text-align: center;
- color: #999999;
- .nav-icon {
- width: 54px;
- font-size: 24px
- }
- .nav-text {
- font-size: 14px;
- }
- }
-
- img {
- width: 100%;
- height: 100%;
- }
- .banner {
- width: 100%;
- height: 300px;
- }
- // 选项列表
- .option-list {
- padding-top: 18px;
- width: 343px;
- height: 100px;
- line-height: 20px;
- border-radius: 8px;
- text-align: center;
- background-color: #fff;
- position: absolute;
- top: 260px;
- left: 0;
- right: 0;
- margin: auto;
- display: flex;
- justify-content: space-around;
- .list-item {
- // 图标
- .icon {
- width: 40px;
- height: 40px;
- border-radius: 99px;
- line-height: 40px;
- font-size: 24px;
- text-align: center;
- margin: auto;
- color: #ffffff;
- }
- }
- }
- // 站点
- .station {
- // width: 343px;
- height: 120px;
- margin-top: 70px;
- padding-top: 20px;
- padding: 0 12px;
- position: relative;
- .img-box {
- width: 100%;
- height: 100%;
- border-radius: 8px;
- overflow: hidden;
- }
- img {
- width: 100%;
- height: 100%;
- }
- .text {
- position: absolute;
- top: 0;
- left: 20px;
- // 头部
- .station-title {
- display: flex;
- margin-top: 12px;
- .title-left {
- display: inline-block;
- height: 20px;
- width: 44px;
- // margin-left: 12px;
- line-height: 20px;
- border-radius: 50px;
- background-color: rgba(133, 140, 255, 100);
- color: rgba(255, 255, 255, 100);
- font-size: 12px;
- text-align: center;
- font-family: Arial;
- }
- .title-right {
- display: inline-block;
- margin-left: 4px;
- margin-top: 2px;
- width: 271px;
- height: 16px;
- line-height: 16px;
- color: rgba(16, 16, 16, 100);
- font-size: 16px;
- text-align: left;
- font-family: AlibabaPuHui-regular;
- }
- }
- // 价格
- .station-price {
- margin-top: 4px;
- display: flex;
- .price-left {
- width: 40px;
- height: 20px;
- color: rgba(255, 98, 0, 100);
- font-size: 20px;
- text-align: left;
- font-family: Roboto-medium;
- }
- .price-right {
- height: 20px;
- line-height: 20px;
- margin-left: 2px;
- margin-top: 3px;
- color: rgba(102, 102, 102, 100);
- font-size: 14px;
- text-align: left;
- font-family: AlibabaPuHui-regular;
- }
- }
- // park
- .park {
- margin-top: 4px;
- display: flex;
- .park-p {
- display: inline-block;
- width: 20px;
- height: 18px;
- line-height: 12px;
- text-align: center;
- background-color: rgba(125, 177, 255, 100);
- color: #fff;
- }
- .park-text {
- display: inline-block;
- width: 300px;
- height: 17px;
- color: rgba(102, 102, 102, 100);
- font-size: 12px;
- text-align: left;
- margin-left: 2px;
- margin-top: 2px;
- }
- }
- // 数量
- .count {
- margin-top: 8px;
- width: 96%;
- display: flex;
- justify-content: space-between;
- }
- }
- }
- //定位
- .location {
- width: 343px;
- background-color: #ffffff;
- height: 120px;
- display: flex;
- margin: 70px auto 0;
- border-radius: 8px;
- border: #F2F4F4 1px;
- .location-text {
- padding: 24px 28px;
- .text-1 {
- height: 16px;
- color: rgba(16, 16, 16, 100);
- font-size: 16px;
- text-align: left;
- }
- .text-2 {
- height: 17px;
- color: rgba(102, 102, 102, 100);
- font-size: 12px;
- text-align: left;
- margin-top: 4px;
- }
- .text-3 {
- width: 80px;
- height: 24px;
- border-radius: 50px;
- color: rgba(0, 185, 98, 100);
- font-size: 12px;
- text-align: center;
- font-family: Microsoft Yahei;
- border: 1px solid rgba(0, 185, 98, 100);
- margin-top: 11px;
- }
- }
- .img-box {
- width: 120px;
- height: 120px;
- float: right;
- }
- }
- //充值
- .top-up {
- margin-left: 16px;
- margin-top: 17px;
- .top-up-title {
- color: rgba(16, 16, 16, 100);
- font-size: 16px;
- }
- .img-box {
- margin-top: 12px;
- width: 345px;
- height: 146px;
- display: flex;
- justify-content: space-between;
- .img-1 {
- width: 166px;
- height: 146px;
- position: relative;
- .img-text {
- position: absolute;
- top: 0;
- left: 0;
- height: 33px;
- color: #ff4444;
- font-size: 24px;
- text-align: left;
- margin-left: 12px;
- .img-text2 {
- font-size: 12px
- }
- }
- }
- img {
- width: 100%;
- height: 100%;
- }
- }
- }
- // 小竖线
- .line {
- display: inline-block;
- width: 3px;
- height: 12px;
- margin-right: 7px;
- background-color: rgba(0, 145, 67, 100);
- }
- // 新闻公告
- .news-title {
- padding: 0 16px;
- margin-top: 12px;
- color: rgba(16, 16, 16, 100);
- font-size: 16px;
- display: flex;
- justify-content: space-between;
- background-color: #F2F4F4;
- .news-title-left {
- display: flex;
- }
- .more {
- font-size: 14px;
- color: #777777;
- display: flex;
- line-height: 20px;
- .more-icon {
- font-size: 24px
- }
- }
- }
- .news {
- background-color: #fff;
- margin: 17px 16px 0;
- .news-content {
- display: flex;
- justify-content: space-between;
- padding: 12px;
- .content-text {
- width: 211px;
- height: 42px;
- line-height: 21px;
- color: #101010;
- text-align: left;
- font-size: 14px
- }
- ;
- .content-img {
- width: 100px;
- height: 80px;
- border-radius: 4px;
- img {
- width: 100%;
- height: 100%;
- }
- }
- .news-time {
- margin-top: 12px;
- color: #999999;
- width: 80px;
- height: 20px;
- font-size: 14px;
- }
- }
- }
- .bottom {
- width: 100%;
- height: 150px;
- .bot {
- width: 100%;
- padding-left: 66px;
- display: flex;
- .bot-line {
- margin-top: 20px;
- width: 80px;
- height: 0px;
- border: 1px solid rgba(207, 210, 213, 100);
- }
- .bot-text {
- width: 60px;
- height: 17px;
- margin-top: 13px;
- margin-left: 12px;
- margin-right: 12px;
- font-size: 12px;
- text-align: center;
- }
- }
- }
- // 导航栏
- .navigation {
- width: 100%;
- height: 60px;
- padding: 10px 0;
- background-color: #fff;
- position: fixed;
- bottom: 0;
- left: 0;
- display: flex;
- justify-content: space-around;
- text-align: center;
- color: #999999;
- .nav-icon {
- width: 54px;
- font-size: 24px
- }
- .nav-text {
- font-size: 14px;
- }
- }
- // 登录提示
- .login-prompt{
- width: 91.4%;
- height: 40px;
- line-height: 40px;
- border-radius: 50px;
- text-align: left;
- padding-left: 16px;
- padding-right: 4px;
- background-color: rgba(0, 0, 0, 0.6);
- position: fixed;
- bottom: 75px;
- color: #ffffff;
- .button{
- width: 88px;
- height: 32px;
- line-height: 32px;
- border-radius: 50px;
- background-color: rgba(0, 185, 98, 100);
- text-align: center;
- float: right;
- margin-top: 4px;
- }
- }
- </style>
|