0000
This commit is contained in:
149
pages/wangdian/wangdian.js
Normal file
149
pages/wangdian/wangdian.js
Normal file
@@ -0,0 +1,149 @@
|
||||
// pages/wangdian/wangdian.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
banner: [{
|
||||
"subject": "安全",
|
||||
"url": "",
|
||||
"aid": 81,
|
||||
"image": "https:\/\/jmqf.v0750.com\/attachment\/Zvt57TuJSUvkyhw-xGrY2l-d__Y-fiaMucgip5B4ELaVVGL3d_RgQwUIEt40NDI5"
|
||||
}, {
|
||||
"subject": "网约车",
|
||||
"url": null,
|
||||
"aid": 89,
|
||||
"image": "https:\/\/jmqf.v0750.com\/attachment\/Zvt57TuJSUvkyhw-xGrY2l-d9_Y-fiaMucgip5B4ELbDBWWicKZgQwUIEt40NDI5"
|
||||
}, {
|
||||
"subject": "肇康店",
|
||||
"url": "pages\/map\/map",
|
||||
"aid": 88,
|
||||
"image": "https:\/\/jmqf.v0750.com\/attachment\/Zvt57TuJSUvkyhw-xGrY2l-d9vY-fiaMucgip5B4ELaZUm6jcvdgQwUIEt40NDI5"
|
||||
}],
|
||||
info: {
|
||||
name:"三和大道店",
|
||||
liangdian: [
|
||||
{"name":"券","ys":"#FF6600"},
|
||||
{"name":"PA壶","ys":"#37CE05"},
|
||||
{"name":"人工帮洗","ys":"#0056A3"},
|
||||
{"name":"轮胎打气","ys":"#08AFDE"},
|
||||
],
|
||||
tag:"冲水|泡沫|吸尘|吹气|洗手",
|
||||
ads:"会城帝临南路18号",
|
||||
yingye:"24小时",
|
||||
juli:"12.68KM",
|
||||
bili: "83%",
|
||||
jiqi_zs: 12,
|
||||
jiqi_kx: 10
|
||||
},
|
||||
jiqilist: [
|
||||
{
|
||||
"id": "1840001",
|
||||
"state": 1, //0:离线,1:空间,2:使用中,3:禁用
|
||||
"isPA": 1, //用接PA壶,0:不要,1:可接
|
||||
},{
|
||||
"id": "1840002",
|
||||
"state": 2,
|
||||
"isPA": 1,
|
||||
},{
|
||||
"id": "1840003",
|
||||
"state": 0,
|
||||
"isPA": 1,
|
||||
},{
|
||||
"id": "1840004",
|
||||
"state": 3,
|
||||
"isPA": 1,
|
||||
},{
|
||||
"id": "1840005",
|
||||
"state": 1,
|
||||
"isPA": 0,
|
||||
},{
|
||||
"id": "1840006",
|
||||
"state": 2,
|
||||
"isPA": 0,
|
||||
},{
|
||||
"id": "1840007",
|
||||
"state": 0,
|
||||
"isPA": 1,
|
||||
},{
|
||||
"id": "1840008",
|
||||
"state": 1,
|
||||
"isPA": 0,
|
||||
},{
|
||||
"id": "1840009",
|
||||
"state": 1,
|
||||
"isPA": 0,
|
||||
},{
|
||||
"id": "1840010",
|
||||
"state": 2,
|
||||
"isPA": 1,
|
||||
},{
|
||||
"id": "1840011",
|
||||
"state": 0,
|
||||
"isPA": 0,
|
||||
},{
|
||||
"id": "1840012",
|
||||
"state": 1,
|
||||
"isPA": 1,
|
||||
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
8
pages/wangdian/wangdian.json
Normal file
8
pages/wangdian/wangdian.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"service-tel": "../../template/serviceTel/serviceTel",
|
||||
"my-money": "../../template/myMoney/myMoney",
|
||||
"head-swiper": "../../template/headSwiper/headSwiper",
|
||||
"page-loding": "../../template/pageLoding/pageLoding"
|
||||
}
|
||||
}
|
||||
53
pages/wangdian/wangdian.wxml
Normal file
53
pages/wangdian/wangdian.wxml
Normal file
@@ -0,0 +1,53 @@
|
||||
<view class="container">
|
||||
<page-loding wx:if="{{showLoding}}"></page-loding>
|
||||
<head-swiper banner="{{banner}}"></head-swiper>
|
||||
<view class="content info">
|
||||
<view class="info">
|
||||
<view class="title">
|
||||
<view class="title_c">{{info.name}}</view>
|
||||
<view class="ld" wx:for="{{info.liangdian}}" wx:key="index_i" wx:for-item="item_l" style="background-color: {{item_l.ys}};">{{item_l.name}}</view>
|
||||
</view>
|
||||
<view class="tag">{{info.tag}}</view>
|
||||
<view class="ads"><text class="iconfont icon-dingwei"></text>{{info.ads}}</view>
|
||||
<view class="ads yingye"><text class="iconfont icon-shijian"></text>{{info.yingye}}</view>
|
||||
<view class="dw">
|
||||
<text class="ico iconfont icon-daohangdaohang"></text>
|
||||
<view class="jl">{{info.juli}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="content">
|
||||
<view class="index-wangdian-title">
|
||||
<view class="more">空闲 {{info.jiqi_kx}}/{{info.jiqi_zs}}台</view>
|
||||
<view class="title_c">洗车机<view class="line"></view></view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="jiqi" wx:for="{{jiqilist}}" wx:key="index" wx:for-item="i">
|
||||
<view wx:if="{{i.state > 2}}" class="j"> <!-- 禁用 -->
|
||||
<view class="mac_state"><text>禁</text></view>
|
||||
<text class="mac_id">{{i.id}}</text>
|
||||
<view class="pa" wx:if="{{i.isPA}}">PA壶</view>
|
||||
</view>
|
||||
<view wx:elif="{{i.state > 1}}" class="w"> <!-- 使用中 -->
|
||||
<view class="mac_state"><text>洗</text></view>
|
||||
<text class="mac_id">{{i.id}}</text>
|
||||
<view class="pa" wx:if="{{i.isPA}}">PA壶</view>
|
||||
</view>
|
||||
<view wx:elif="{{i.state > 0}}" class="x"> <!-- 空间 -->
|
||||
<view class="mac_state"><text>闲</text></view>
|
||||
<text class="mac_id">{{i.id}}</text>
|
||||
<view class="pa" wx:if="{{i.isPA}}">PA壶</view>
|
||||
</view>
|
||||
<view wx:else class="d"> <!-- 离线 -->
|
||||
<view class="mac_state"><text>离</text></view>
|
||||
<text class="mac_id">{{i.id}}</text>
|
||||
<view class="pa" wx:if="{{i.isPA}}">PA壶</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<service-tel></service-tel>
|
||||
|
||||
|
||||
</view>
|
||||
173
pages/wangdian/wangdian.wxss
Normal file
173
pages/wangdian/wangdian.wxss
Normal file
@@ -0,0 +1,173 @@
|
||||
.content {
|
||||
padding: 0 30rpx 30rpx;
|
||||
margin-bottom: 40rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, .2);
|
||||
}
|
||||
|
||||
.index-wangdian-title {
|
||||
line-height: 70rpx;
|
||||
padding: 10rpx 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.index-wangdian-title .title_c {
|
||||
font-size: 36rpx;
|
||||
color: #0056A3;
|
||||
}
|
||||
|
||||
.index-wangdian-title .title_c .line {
|
||||
position: absolute;
|
||||
bottom: 12rpx;
|
||||
left: 14rpx;
|
||||
height: 10rpx;
|
||||
width: 10%;
|
||||
border-radius: 20rpx;
|
||||
background-color: #0056A3;
|
||||
}
|
||||
|
||||
.index-wangdian-title .more {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
font-size: 28rpx;
|
||||
color: #37CE05;
|
||||
}
|
||||
|
||||
.info {
|
||||
position: relative;
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
|
||||
.info .title_c {
|
||||
display: inline-block;
|
||||
font-size: 36rpx;
|
||||
line-height: 48rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.info .title .ld {
|
||||
display: inline-block;
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
height: 32rpx;
|
||||
color: #fff;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 6rpx;
|
||||
margin-left: 6rpx;
|
||||
}
|
||||
|
||||
.info .tag, .info .ads {
|
||||
font-size: 28rpx;
|
||||
line-height: 2;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.info .jiqi {
|
||||
font-size: 24rpx;
|
||||
line-height: 2;
|
||||
color: #37CE05;
|
||||
}
|
||||
|
||||
.info .yingye {
|
||||
|
||||
}
|
||||
|
||||
.info .dw {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 35rpx;
|
||||
height: 120rpx;
|
||||
width: 120rpx;
|
||||
font-size: 24rpx;
|
||||
color: #0056A3;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.info .dw .ico {
|
||||
font-size: 80rpx;
|
||||
}
|
||||
|
||||
|
||||
.list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
padding: 20rpx 0 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.list .jiqi {
|
||||
flex-direction: column;
|
||||
width: 22%;
|
||||
margin: 20rpx 4% 20rpx 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.list .jiqi:nth-child(4n+4) {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.mac_state {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50rpx;
|
||||
margin: 0 auto;
|
||||
font-size: 40rpx;
|
||||
border: 10rpx solid #aaa;
|
||||
box-sizing: border-box;
|
||||
line-height: 80rpx;
|
||||
|
||||
}
|
||||
|
||||
.mac_state text {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.mac_id {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.jiqi .pa {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
margin-left: -34rpx;
|
||||
top: -15rpx;
|
||||
padding: 2rpx 10rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
|
||||
.list .jiqi .x, .x .mac_state text {
|
||||
color: #30b504;
|
||||
}
|
||||
|
||||
.x .mac_state {
|
||||
border-color: #30b504;
|
||||
}
|
||||
|
||||
.list .jiqi .j, .j .mac_state text {
|
||||
color: #C13700;
|
||||
}
|
||||
|
||||
.j .mac_state {
|
||||
border-color: #C13700;
|
||||
}
|
||||
|
||||
.list .jiqi .w, .w .mac_state text {
|
||||
color: #08AFDE;
|
||||
}
|
||||
|
||||
.w .mac_state {
|
||||
border-color: #08AFDE;
|
||||
}
|
||||
|
||||
.list .jiqi .d, .d .mac_state text {
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
|
||||
.list .jiqi .pa {
|
||||
font-size: 20rpx;
|
||||
color: #fff;
|
||||
background-color: #f60;
|
||||
}
|
||||
Reference in New Issue
Block a user