mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-21 11:59:37 +08:00
描述:页面
This commit is contained in:
parent
f2de81dfdb
commit
5cd3b51e41
@ -30,15 +30,7 @@ Page({
|
||||
"text": "我的"
|
||||
},
|
||||
],
|
||||
|
||||
IMG_NAME: app.IMG_NAME,
|
||||
indicatorDots: true,
|
||||
autoplay: true,
|
||||
interval: 3000,
|
||||
duration: 1000,
|
||||
bannerList: [{
|
||||
bannerImg: ''
|
||||
}],
|
||||
menuList: [
|
||||
// {
|
||||
// name: "创业活动",
|
||||
@ -143,12 +135,14 @@ Page({
|
||||
path: ""
|
||||
},
|
||||
],
|
||||
homelist: [],
|
||||
background: [{
|
||||
bg: '/profile/banner/1.jpg',
|
||||
bannerList: [{
|
||||
bg: '/profile/static/index/banner/1.jpg',
|
||||
url: ''
|
||||
}, {
|
||||
bg: '/profile/banner/2.jpg',
|
||||
bg: '/profile/static/index/banner/2.jpg',
|
||||
url: ''
|
||||
},{
|
||||
bg: '/profile/static/index/banner/3.jpg',
|
||||
url: ''
|
||||
}]
|
||||
},
|
||||
@ -175,7 +169,6 @@ Page({
|
||||
parkName: wx.getStorageSync('parkName')
|
||||
})
|
||||
wx.setStorageSync('MemberInfo', res.data)
|
||||
that.getHotList()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
@ -185,34 +178,6 @@ Page({
|
||||
}
|
||||
},
|
||||
|
||||
//轮播高度自适应——获取图片高度
|
||||
imgHeight: function (e) {
|
||||
var winWid = wx.getSystemInfoSync().windowWidth; //获取当前屏幕的宽度
|
||||
var imgh = e.detail.height; //图片高度
|
||||
var imgw = e.detail.width; //图片宽度
|
||||
var swiperH = winWid * imgh / imgw + "px"
|
||||
this.setData({
|
||||
Height: swiperH //设置高度
|
||||
})
|
||||
// this.setData({
|
||||
// Height: '300rpx' //设置高度
|
||||
// })
|
||||
},
|
||||
|
||||
getHotList() {
|
||||
let that = this
|
||||
app.AjaxRequest('get', {
|
||||
'content-type': 'application/json',
|
||||
'Authorization': 'Bearer ' + app.Getopenid()
|
||||
}, '/menu/bannerList', {
|
||||
isTop: true
|
||||
}, function (res) {
|
||||
that.setData({
|
||||
homelist: res.data
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
navapply(e) {
|
||||
if (wx.getStorageSync('token')) {
|
||||
if (e.currentTarget.dataset.path) {
|
||||
|
@ -1,18 +1,22 @@
|
||||
<view class="page">
|
||||
<scroll-view style="height:100%;" scroll-y="true">
|
||||
<!-- 园区 -->
|
||||
<view bindtap="navparkList" class="topList">
|
||||
<text style="font-size: 28rpx;">当前园区:{{parkName? parkName:'请先选择园区'}}</text>
|
||||
<text style="color: #939393;font-size: 36rpx;"> > </text>
|
||||
</view>
|
||||
<swiper class='swiper-box' indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" circular='true' style='height:{{Height}}' wx:if="{{background.length > 0}}">
|
||||
<block wx:for="{{background}}" wx:key="index">
|
||||
<swiper-item>
|
||||
<image src="{{IMG_NAME + item.bg}}" mode="widthFix" style="width:100%" bindload='imgHeight'></image>
|
||||
|
||||
<!-- 轮播图 -->
|
||||
<swiper class='swiper-box' indicator-dots autoplay interval="3000" duration="1000" circular='true'>
|
||||
<swiper-item wx:for="{{bannerList}}" wx:key="index">
|
||||
<image class="img" src="{{IMG_NAME + item.bg}}" mode="aspectFill"></image>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
|
||||
<view style="font-size: 12pt;background: white;padding: 20rpx 30rpx;">我的应用</view>
|
||||
<!-- 菜单模块 -->
|
||||
<view class="itemTitleView">
|
||||
<view class="title">我的应用</view>
|
||||
<image class="img" src="{{IMG_NAME + '/profile/static/index/scan.png'}}" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="fixed">
|
||||
<view class="fixedbox" wx:for='{{menuList}}' wx:key='index' data-path="{{item.path}}" data-name="{{item.name}}" bindtap="navapply">
|
||||
<image class="menuImg" src="{{IMG_NAME + item.img}}"></image>
|
||||
@ -20,9 +24,6 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</scroll-view>
|
||||
|
||||
<!-- tabBar -->
|
||||
<view class="tab-bar">
|
||||
<view wx:for="{{tabBarList}}" wx:key="index" class="tab-bar-item {{item.bulge?'bulge':''}}" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="switchTab">
|
||||
|
@ -1,12 +1,6 @@
|
||||
@import "../../app.wxss";
|
||||
@import "../../tabBar.wxss";
|
||||
|
||||
page {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.topList {
|
||||
display: none;
|
||||
width: 100%;
|
||||
@ -20,19 +14,14 @@ page {
|
||||
z-index: 9999999;
|
||||
}
|
||||
|
||||
.swiper-box {
|
||||
margin-top: 70rpx;
|
||||
}
|
||||
|
||||
.page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
color: black;
|
||||
overflow: auto;
|
||||
border-top: 1rpx solid #f4f4f4;
|
||||
background-color: #F5F5F5;
|
||||
/* padding: 0 26rpx; */
|
||||
background-color: #FFFFFF;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.activityList {
|
||||
@ -49,6 +38,27 @@ page {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.itemTitleView {
|
||||
border-left: 8rpx solid #2A6FFF;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 40rpx 50rpx 0;
|
||||
}
|
||||
|
||||
.itemTitleView .title {
|
||||
margin-left: 10rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #141414;
|
||||
}
|
||||
|
||||
.itemTitleView .img {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
}
|
||||
|
||||
|
||||
.fixed {
|
||||
background: white;
|
||||
padding: 0 30rpx 240rpx 30rpx;
|
||||
@ -93,6 +103,19 @@ page {
|
||||
filter: gray;
|
||||
}
|
||||
|
||||
.swiper-box {
|
||||
box-sizing: border-box;
|
||||
/* width: 100%; */
|
||||
height: 358rpx;
|
||||
margin: 0 22rpx;
|
||||
}
|
||||
|
||||
.swiper-box .img {
|
||||
border-radius: 14rpx;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* 轮播小点点 */
|
||||
.swiper-box .wx-swiper-dots.wx-swiper-dots-horizontal {
|
||||
margin-left: 36%;
|
||||
@ -127,13 +150,13 @@ page {
|
||||
}
|
||||
|
||||
|
||||
.menuImg{
|
||||
.menuImg {
|
||||
width: 132rpx;
|
||||
height: 134rpx;
|
||||
margin-left: 15rpx;
|
||||
}
|
||||
|
||||
.menuTitle{
|
||||
.menuTitle {
|
||||
font-size: 24rpx;
|
||||
color: #646466;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user