wylyl22 3 years ago
parent f0d4ad660d
commit c01a92c43f

@ -1,12 +1,6 @@
import pieOption from '../../option/pieOption'
import pictographicOption from '../../option/pictographicOption'
const color=['#0084FF','#20CC62','#FFBF00']
const dataList=[
{ name: "女性",color:'#0084FF'},
{ name: "未知" ,color:'#20CC62'},
{ name: "男性" ,color:'#FFBF00'},
]
const app = getApp()
Component({
data: {
@ -54,24 +48,25 @@ Component({
let pd=res.sex.length==1
// res.forEach(ele => {
// })
for(let i=0;i<res.region.length;i++){
if(!pd){
for(let i=0;i<res.region.length;i++){
regionSum+=res.region[i].value
console.log(regionSum)
}
for(let i=0;i<res.region.length/2;i++){
rName1.push(res.region[i].key)
rValue1.push(res.region[i].value)
rName1.push(res.region[i].key ||'')
rValue1.push(res.region[i].value || '')
}
for(let i=res.region.length/2;i<res.region.length;i++){
rName2.push(res.region[i].key)
rValue2.push(res.region[i].value)
}
}
for(let i=0;i<3;i++){
if(!pd){
sexSum+=sex[i].value
attestationSum+=attestation[i].value
}
}
for(let i=0;i<3;i++){
if(!pd){
@ -80,7 +75,6 @@ Component({
sexList.push({name:sex[i].key,value:sex[i].value,color:color[i],accounted:sexAccounted[i]})
attestationList.push({name:attestation[i].key,value:attestation[i].value,color:color[i],accounted:attestationAccounted[i]})
}
}
this.setData({
sexList:pd?[]:sexList,

@ -7,8 +7,6 @@ const dValue =[1500,1000,500,800,100,1000,300]
const dColor=['#0084FF',]
Component({
data: {
roomLevel:"", //当前选择的类型
builds:"", //当前选择的楼栋
select:false,
grade_name1:'按级别',
grade_name2:'按价格',

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

@ -1,38 +1,66 @@
// 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)
},
})
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

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

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

@ -1,19 +0,0 @@
/* 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;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

Loading…
Cancel
Save