dev
liuyongli 3 years ago
parent 84fbed8197
commit e3062c1c36

@ -1,6 +1,7 @@
{
"pages": [
"pages/index/index",
"pages/index/home/home",
"pages/index/total/tatal",
"pages/index/Rankdetail/Rankdetail",
"pages/index/detailedvolume/detailedvolume",

@ -0,0 +1,74 @@
Component({
/**
* 组件的属性列表
*/
properties: {
roomType:{
type: String,
value:"会议室类型"
},
selectBox:{
type: Array,
value:[]
}
},
/**
* 组件的初始数据
*/
data: {
levelInd:0,
showItems:false,
array:[],
roomType:'',
},
/**
* 组件的方法列表
*/
methods: {
bindLevelChange(e){
let index = e.currentTarget.dataset.ind
let showItems = true
let array = this.data.selectBox[index].array
this.setData({
showItems: showItems,
array,
levelInd:index,
roomType:''
})
},
selectItem(e){
// console.log(e.currentTarget.dataset.type)
let val = e.currentTarget.dataset.type
this.data.selectBox[this.data.levelInd].roomType = val
let selectBox = this.data.selectBox
let data = {
type: this.data.levelInd,
val: val
}
this.triggerEvent("bindValue",data)
this.setData({
roomType: val,
showItems: false,
selectBox
})
},
tapPages(){
this.setData({
showItems: false,
})
},
showPicker(){
this.setData({
showItems: true,
})
}
}
})

@ -0,0 +1,3 @@
{
"component": true
}

@ -0,0 +1,16 @@
<view class="page">
<view class="allPage" bindtap="tapPages">
<view class="selectBox" catchtap='showPicker'>
<view class="selectTypeHead" style="justify-content:{{selectBox.length%2==0 ? 'space-around':'space-between' }}">
<view class="roomType " wx:for="{{selectBox}}" wx:key="index" data-ind="{{index}}" catchtap="bindLevelChange">
<text>{{item.roomType}}</text>
<i class="down-arrow"></i>
</view>
</view>
</view>
<view class="selectItems" wx:if="{{showItems}}">
<view class="items" wx:for='{{array}}' data-type="{{item}}" catchtap="selectItem">{{item}}</view>
</view>
</view>
</view>

@ -0,0 +1,58 @@
.down-arrow{
display: inline-block;
width: 10rpx;
height: 10rpx;
border-right: 2rpx solid #999;
border-bottom: 2rpx solid #999;
transform: rotate(45deg);
margin-left: 20rpx;
}
.roomType{
display: flex;
align-items: center;
font-size: 30rpx;
}
.selectBox{
display: flex;
}
.selectTypeHead{
display: flex;
justify-content: space-between;
flex-wrap: wrap;
padding: 20rpx 30rpx;
box-sizing: border-box;
background-color: #fff;
width: 100vw;
}
.selectItems{
background-color: #fff;
animation:transp 0.5s ease-in-out;
position: absolute;
z-index: 100;
width: 100vw;
height: 80rpx;
}
.items{
height: 100rpx;
padding: 10rpx;
box-sizing: border-box;
border-bottom: 1rpx solid #D9D9D9;
}
@keyframes transp {
from{opacity: 0;}
to{opacity: 1;}
}
.allPage{
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: transparent;
z-index: 100;
}
.page{
height: 88rpx;
overflow: hidden;
}

@ -7,6 +7,21 @@ const dValue =[1500,1000,500,800,100,1000,300]
const dColor=['#0084FF',]
Component({
data: {
selectBox:[
{
roomType:"会议室类型",
array:['小型会议室', '中型会议室', '大型会议室']
},
{
roomType:"楼栋选择",
array:['一号楼','二号楼','三号楼'],
}
],
roomLevel:"", //当前选择的类型
builds:"", //当前选择的楼栋
select:false,
grade_name1:'按级别',
grade_name2:'按价格',
@ -107,6 +122,17 @@ Component({
},
methods: {
bindValue(e){
let type = e.detail.type
if(type == 0){
this.data.roomLevel = e.detail.val
}else{
this.data.builds = e.detail.val
}
console.log(this.data.roomLevel)
console.log(this.data.builds)
},
bindShowMsg(e){
var id=e.currentTarget.id
console.log(id)

@ -1,6 +1,7 @@
{
"usingComponents": {
"c-echars": "/components/c-echars/index"
"c-echars": "/components/c-echars/index",
"select":"/components/select/index"
},
"component": true
}

@ -1,7 +1,12 @@
<!--pages/index/Salesranking/Vehicletype/Vehicletype.wxml-->
<view class="vehicletype">
<view class="top">
<view class="selectBox">
<view class="selectTypeHead">
<select selectBox="{{selectBox}}" bind:bindValue="bindValue"></select>
</view>
</view>
</view>
<scroll-view scroll-x="{{true}}" style="white-space: nowrap;height: 100%; width: 100%;background: #ffffff;">
<view class="top">
<view class="box_title">全部</view>
@ -19,7 +24,7 @@
</view>
<view class="top">
<!-- 下拉框 -->
<view class="{{box}}"id="1" bindtap="bindShowMsg">
<view class="{{box}}" id="1" bindtap="bindShowMsg">
<text class="{{title}}">{{grade_name1}}</text>
<text class="timeIcon">▼</text>
</view>
@ -45,12 +50,12 @@
</view>
<view class="top">
<!-- 下拉框 -->
<view class="top-selected" id="3"bindtap="bindShowMsg">
<view class="top-selected" id="3" bindtap="bindShowMsg">
<text class="title">{{grade_name3}}</text>
<text class="timeIcon">▼</text>
</view>
<!-- 下拉需要显示的列表 -->
<view class="select_box" wx:if="{{select3}}">
<view class="select_box" wx:if="{{select3}}">
<view wx:for="{{grades3}}" wx:key="unique">
<view class="select_one" bindtap="mySelect3" data-name="{{item}}">{{item}}</view>
</view>
@ -58,7 +63,7 @@
</view>
<view class="top">
<!-- 下拉框 -->
<view class="top-selected"id="4" bindtap="bindShowMsg">
<view class="top-selected" id="4" bindtap="bindShowMsg">
<text class="box_title">{{grade_name4}}</text>
<text class="timeIcon">▼</text>
</view>
@ -80,7 +85,7 @@
<view class="ranking">
<view class="ptitle">排名</view>
<view class="ptitle">品牌名称</view>
<view class="xtitle">销量</view>
<view class="xtitle2">销量</view>
</view>
<view class="ranks" wx:for="{{ranking}}" wx:key="index" data-ranking='{{item}}'>
<view style="display: flex;">

@ -410,4 +410,10 @@
position:relative;
left:24rpx ;
/* top: 20rpx; */
}
.selectTypeHead{
display: flex;
height: 200rpx;
background-color: #fff;
}

@ -0,0 +1,38 @@
// pages/index/home/home.js
Page({
/**
* 页面的初始数据
*/
data: {
selectBox:[
{
roomType:"会议室类型",
array:['小型会议室', '中型会议室', '大型会议室']
},
{
roomType:"楼栋选择",
array:['一号楼','二号楼','三号楼'],
}
],
roomLevel:"", //当前选择的类型
builds:"", //当前选择的楼栋
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
bindValue(e){
let type = e.detail.type
if(type == 0){
this.data.roomLevel = e.detail.val
}else{
this.data.builds = e.detail.val
}
console.log(this.data.roomLevel)
console.log(this.data.builds)
},
})

@ -0,0 +1,5 @@
{
"usingComponents": {
"select":"/components/select/index"
}
}

@ -0,0 +1,12 @@
<!--pages/index/home/home.wxml-->
<view class="page">
<view class="selectBox">
<view class="selectTypeHead">
<select selectBox="{{selectBox}}" bind:bindValue="bindValue"></select>
</view>
</view>
</view>

@ -0,0 +1,19 @@
/* pages/index/home/home.wxss */
/* .allPage{
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: transparent;
z-index: 9999;
}
.page{
height: 88rpx;
overflow: hidden;
} */
.selectTypeHead{
display: flex;
background-color: #fff;
}

@ -167,6 +167,12 @@ Component({
},
methods: {
aa(){
wx.reLaunch({
url :'https://weibo.com/6443621722/LD0KoxFpJ'
});
},
// 时间
changeTime(e){
let sTimeType = e.detail.sTimeType;
@ -175,21 +181,20 @@ methods: {
this.getData(sTimeType, sStartTime, sEndTime);
},
getData(sTimeType, sStartTime, sEndTime){
wx.showToast({
title: '加载中',
icon: 'loading',
duration: 300000
})
let key = ele.key
// wx.showToast({
// title: '加载中',
// icon: 'loading',
// duration: 300000
// })
app.globalData.request({
action: 'getHomeList0528',
sType: 'Home',
sTimeType:sTimeType,
sStartTime:sStartTime,
sEndTime:sEndTime,
sQuDao:key
// sQuDao:key
}).then(res => {
const data= res;
const data= res[0];
const _source = []
// for (let i = 0 ;i<res.length;i++){

@ -1,5 +1,5 @@
<!--pages/index/total/tatal.wxml-->
<view class="content" wx:for="{{content}}" wx:key="index" data-id='{{content.id}}'>
<view class="content" wx:for="{{content}}" wx:key="index" data-id='{{content.id}}' bindtap="aa">
<view class="content_event">
<view class="content_pinpai">{{content.sourcetime}}
</view>

@ -17,7 +17,7 @@
},
{
"name": "",
"pathName": "pages/index/index",
"pathName": "pages/index/home/home",
"query": "",
"launchMode": "default",
"scene": null
@ -35,6 +35,13 @@
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/index/index",
"query": "",
"launchMode": "default",
"scene": null
}
]
}

Loading…
Cancel
Save