mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-21 15:29:37 +08:00
描述:页面
This commit is contained in:
parent
f2de81dfdb
commit
5cd3b51e41
@ -30,15 +30,7 @@ Page({
|
|||||||
"text": "我的"
|
"text": "我的"
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
IMG_NAME: app.IMG_NAME,
|
IMG_NAME: app.IMG_NAME,
|
||||||
indicatorDots: true,
|
|
||||||
autoplay: true,
|
|
||||||
interval: 3000,
|
|
||||||
duration: 1000,
|
|
||||||
bannerList: [{
|
|
||||||
bannerImg: ''
|
|
||||||
}],
|
|
||||||
menuList: [
|
menuList: [
|
||||||
// {
|
// {
|
||||||
// name: "创业活动",
|
// name: "创业活动",
|
||||||
@ -143,12 +135,14 @@ Page({
|
|||||||
path: ""
|
path: ""
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
homelist: [],
|
bannerList: [{
|
||||||
background: [{
|
bg: '/profile/static/index/banner/1.jpg',
|
||||||
bg: '/profile/banner/1.jpg',
|
|
||||||
url: ''
|
url: ''
|
||||||
}, {
|
}, {
|
||||||
bg: '/profile/banner/2.jpg',
|
bg: '/profile/static/index/banner/2.jpg',
|
||||||
|
url: ''
|
||||||
|
},{
|
||||||
|
bg: '/profile/static/index/banner/3.jpg',
|
||||||
url: ''
|
url: ''
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
@ -175,7 +169,6 @@ Page({
|
|||||||
parkName: wx.getStorageSync('parkName')
|
parkName: wx.getStorageSync('parkName')
|
||||||
})
|
})
|
||||||
wx.setStorageSync('MemberInfo', res.data)
|
wx.setStorageSync('MemberInfo', res.data)
|
||||||
that.getHotList()
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} 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) {
|
navapply(e) {
|
||||||
if (wx.getStorageSync('token')) {
|
if (wx.getStorageSync('token')) {
|
||||||
if (e.currentTarget.dataset.path) {
|
if (e.currentTarget.dataset.path) {
|
||||||
|
@ -1,27 +1,28 @@
|
|||||||
<view class="page">
|
<view class="page">
|
||||||
<scroll-view style="height:100%;" scroll-y="true">
|
<!-- 园区 -->
|
||||||
<view bindtap="navparkList" class="topList">
|
<view bindtap="navparkList" class="topList">
|
||||||
<text style="font-size: 28rpx;">当前园区:{{parkName? parkName:'请先选择园区'}}</text>
|
<text style="font-size: 28rpx;">当前园区:{{parkName? parkName:'请先选择园区'}}</text>
|
||||||
<text style="color: #939393;font-size: 36rpx;"> > </text>
|
<text style="color: #939393;font-size: 36rpx;"> > </text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 轮播图 -->
|
||||||
|
<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>
|
||||||
|
</swiper>
|
||||||
|
|
||||||
|
<!-- 菜单模块 -->
|
||||||
|
<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>
|
||||||
|
<view class="menuTitle">{{item.name}}</view>
|
||||||
</view>
|
</view>
|
||||||
<swiper class='swiper-box' indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" circular='true' style='height:{{Height}}' wx:if="{{background.length > 0}}">
|
</view>
|
||||||
<block wx:for="{{background}}" wx:key="index">
|
|
||||||
<swiper-item>
|
|
||||||
<image src="{{IMG_NAME + item.bg}}" mode="widthFix" style="width:100%" bindload='imgHeight'></image>
|
|
||||||
</swiper-item>
|
|
||||||
</block>
|
|
||||||
</swiper>
|
|
||||||
|
|
||||||
<view style="font-size: 12pt;background: white;padding: 20rpx 30rpx;">我的应用</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>
|
|
||||||
<view class="menuTitle">{{item.name}}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
|
||||||
</scroll-view>
|
|
||||||
|
|
||||||
<!-- tabBar -->
|
<!-- tabBar -->
|
||||||
<view class="tab-bar">
|
<view class="tab-bar">
|
||||||
|
@ -1,12 +1,6 @@
|
|||||||
@import "../../app.wxss";
|
@import "../../app.wxss";
|
||||||
@import "../../tabBar.wxss";
|
@import "../../tabBar.wxss";
|
||||||
|
|
||||||
page {
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.topList {
|
.topList {
|
||||||
display: none;
|
display: none;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -20,19 +14,14 @@ page {
|
|||||||
z-index: 9999999;
|
z-index: 9999999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.swiper-box {
|
|
||||||
margin-top: 70rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page {
|
.page {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
color: black;
|
color: black;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
border-top: 1rpx solid #f4f4f4;
|
background-color: #FFFFFF;
|
||||||
background-color: #F5F5F5;
|
padding-top: 20rpx;
|
||||||
/* padding: 0 26rpx; */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.activityList {
|
.activityList {
|
||||||
@ -49,6 +38,27 @@ page {
|
|||||||
position: relative;
|
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 {
|
.fixed {
|
||||||
background: white;
|
background: white;
|
||||||
padding: 0 30rpx 240rpx 30rpx;
|
padding: 0 30rpx 240rpx 30rpx;
|
||||||
@ -93,6 +103,19 @@ page {
|
|||||||
filter: gray;
|
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 {
|
.swiper-box .wx-swiper-dots.wx-swiper-dots-horizontal {
|
||||||
margin-left: 36%;
|
margin-left: 36%;
|
||||||
@ -127,13 +150,13 @@ page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.menuImg{
|
.menuImg {
|
||||||
width: 132rpx;
|
width: 132rpx;
|
||||||
height: 134rpx;
|
height: 134rpx;
|
||||||
margin-left: 15rpx;
|
margin-left: 15rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menuTitle{
|
.menuTitle {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #646466;
|
color: #646466;
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user