Commit cd869aa3 by 张杰

项目初始化

0 parents
Showing 162 changed files with 5942 additions and 0 deletions
//app.js
const wxrequest = require('./utils/wxrequest.js');
App({
onLaunch: function (options) {
wx.setStorageSync('scene', options.scene)
// 展示本地存储能力
var logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
var that = this;
// 获取用户信息
/*wx.getSetting({
success: res => {
if (res.authSetting['scope.userInfo']) {
// 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框
wx.getUserInfo({
success: res => {console.log(res)
// 可以将 res 发送给后台解码出 unionId
this.globalData.userInfo = res.userInfo
// 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
// 所以此处加入 callback 以防止这种情况
if (this.userInfoReadyCallback) {
this.userInfoReadyCallback(res)
}
}
})
}
}
})*/
},
onShow(options){
wx.setStorageSync('scene', options.scene)
/*wx.switchTab({
url: '../../pages/loading/loading'
});*/
/*wx.showModal({
content: String(options.scene),
showCancel: false
});*/
},
globalData: {
userInfo: null,
serverUrl: 'http://localhost:8080/otmini/',
loginPromise: null
}
})
\ No newline at end of file
{
"pages": [
"pages/wxPublicPage/wxPublicPage",
"pages/loading/loading",
"pages/home/home",
"pages/authorize/authorize",
"pages/resident/resident",
"pages/freq/freq",
"pages/findCar/findCar",
"pages/findCarSearch/findCarSearch",
"pages/trace/trace",
"pages/monitor/monitor",
"pages/mine/mine",
"pages/deviceActiveChart/deviceActiveChart",
"pages/deviceOffChart/deviceOffChart",
"pages/logs/logs",
"pages/replay/replay",
"pages/fence/fence",
"pages/login/login",
"pages/collectCarSearch/collectCarSearch",
"pages/collectCarDetail/collectCarDetail",
"pages/collectCarLog/collectCarLog",
"pages/freqLogSearch/freqLogSearch",
"pages/freqLogDetail/freqLogDetail",
"pages/freqLogUserDetail/freqLogUserDetail",
"pages/map/findCar",
"pages/test/test"
],
"window": {
"backgroundColor": "#efeff4",
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "虎哥e盾",
"navigationBarTextStyle": "black"
},
"tabBar": {
"color": "#666",
"selectedColor": "#37c060",
"backgroundColor": "#fff",
"list": [
{
"pagePath": "pages/home/home",
"text": "首页",
"iconPath": "images/tab-home.png",
"selectedIconPath": "images/tab-home-active.png"
},
{
"pagePath": "pages/findCar/findCar",
"text": "找车",
"iconPath": "images/tab-findcar.png",
"selectedIconPath": "images/tab-findcar-active.png"
},
{
"pagePath": "pages/mine/mine",
"text": "我的",
"iconPath": "images/tab-mine.png",
"selectedIconPath": "images/tab-mine-active.png"
}
]
},
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于定位效果展示"
}
},
"sitemapLocation": "sitemap.json"
}
\ No newline at end of file
/**app.wxss**/
@import "weui.wxss";
.container {
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: 200rpx 0;
box-sizing: border-box;
}
page{
background-color: #efeff4;
font-size: 16px;
font-family: -apple-system-font,Helvetica Neue,Helvetica,sans-serif;
}
.page__hd {
padding: 40px;
}
.page__bd {
padding-bottom: 40px;
background-color: #fff;
}
.page__bd_spacing {
padding-left: 15px;
padding-right: 15px;
}
.page__ft{
padding-bottom: 10px;
text-align: center;
}
.page__title {
text-align: left;
font-size: 20px;
font-weight: 400;
}
.page__desc {
margin-top: 5px;
color: #888888;
text-align: left;
font-size: 14px;
}
.weui-mask {
position: fixed;
z-index: 1000;
top: 0;
right: 0;
left: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.6);
}
.weui-dialog {
position: fixed;
z-index: 5000;
width: 80%;
max-width: 300px;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
background-color: #FFFFFF;
text-align: center;
border-radius: 3px;
overflow: hidden;
}
.weui-dialog__bd {
padding: 0 1.6em 0.8em;
min-height: 40px;
font-size: 15px;
line-height: 1.3;
word-wrap: break-word;
word-break: break-all;
color: #808080;
}
.weui-dialog__bd:first-child {
padding: 2.7em 20px 1.7em;
color: #353535;
}
.weui-dialog__ft {
position: relative;
line-height: 48px;
font-size: 18px;
display: -webkit-box;
display: -webkit-flex;
display: flex;
}
.weui-dialog__btn {
display: block;
-webkit-box-flex: 1;
-webkit-flex: 1;
flex: 1;
color: #09BB07;
text-decoration: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
position: relative;
}
.weui-dialog__btn_primary {
color: #09BB07;
}
images/u.png

1.76 KB

// pages/authorize/authorize.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
onGotUserInfo(e) {
console.log(e.detail.errMsg)
console.log(e.detail.userInfo)
console.log(e.detail.rawData)
}
})
\ No newline at end of file
{}
\ No newline at end of file
<button open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="onGotUserInfo">获取用户信息</button>
/* pages/authorize/authorize.wxss */
\ No newline at end of file
const WXRequest = require('../../utils/wxrequest.js');
const moment = require('./../../utils/moment.min.js');
Page({
/**
* 页面的初始数据
*/
data: {
infoModalHidden: true,
isDisabled: true,
startDate: '',
startTime: '',
endDate: '',
endTime: '',
todayDate: moment().format('YYYY-MM-DD'),
todayAfterTenYearsDate: moment().add(10, 'years').format('YYYY-MM-DD'),
list: [],
name: '',
standno: '',
sqbh: '',
wiredSn: '',
wiredlessSn: '',
vehicleId: '',
loginUserId: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {console.log(options)
const vehicleId = options.vehicleid;
const loginUserId = wx.getStorageSync('loginUserId');
var that = this;
that.setData({
name: options.name || '',
standno: options.standno || '',
sqbh: options.sqbh || '',
wiredSn: options.wiredSn || '',
wiredlessSn: options.wiredlessSn || '',
vehicleId,
loginUserId
})
WXRequest.get('vehicleshare/getvehicleshare',{
vehicleId,
loginUserId
}).then((res)=>{
if(res.returnCode == '0'){
const data = res.data;
const startTime = data.startTime;
const endTime = data.endTime;
that.setData({
startDate: moment(startTime).format('YYYY-MM-DD'),
startTime: moment(startTime).format('HH:mm'),
endDate: moment(endTime).format('YYYY-MM-DD'),
endTime: moment(endTime).format('HH:mm'),
isDisabled: data.status === 0 ? false: true
});
}
});
WXRequest.get('vehiclecollection/byVehicleId',{
vehicleId
}).then((res)=>{
console.log(res.data)
that.setData({
list: res.data
})
});
},
alertInfoModal(e){
this.setData({
infoModalHidden: false
});
},
closeInfoModal(e){
this.setData({
infoModalHidden: true
});
},
toggleStatus(e){
const _isDisabled = e.currentTarget.dataset.type === 'enable'?false:true;
if(_isDisabled === this.data.isDisabled) return;
this.setData({
isDisabled: _isDisabled
});
this.updateVehicleStatus()
},
redirectDetail(e){
const dataset = e.currentTarget.dataset;
wx.navigateTo({
url: `../../pages/collectCarLog/collectCarLog?id=${dataset.id}&nickname=${dataset.nickname}&avatarurl=${dataset.avatarurl}`
});
},
bindDateChange(e){
const oldEndDate = this.data.endDate;
if(moment(`${this.data.startDate} ${this.data.startTime}`).isAfter(moment(`${e.detail.value} ${this.data.endTime}`))){
wx.showModal({
content: '结束时间不能小于开始时间',
showCancel: false
});
this.setData({
endDate: oldEndDate
});
}else{
this.setData({
endDate: e.detail.value
});
this.updateVehicleStatus();
}
},
bindTimeChange(e){
const oldEndTime = this.data.endTime;
if(moment(`${this.data.startDate} ${this.data.startTime}`).isAfter(moment(`${this.data.endDate} ${e.detail.value}`))){
wx.showModal({
content: '结束时间不能小于开始时间',
showCancel: false
});
this.setData({
endTime: oldEndTime
});
}else{
this.setData({
endTime: e.detail.value
});
this.updateVehicleStatus()
}
},
updateVehicleStatus(){
const that = this;
if(that._timeoutId){
clearTimeout(that._timeoutId);
}
that._timeoutId = setTimeout(function(){
const data = that.data;
WXRequest.get('vehicleshare/savevehicleshare',{
vehicleId: data.vehicleId,
loginUserId: data.loginUserId,
startTime: moment(`${data.startDate} ${data.startTime}`).format('YYYY-MM-DD HH:mm:ss'),
endTime: moment(`${data.endDate} ${data.endTime}`).format('YYYY-MM-DD HH:mm:ss'),
status: data.isDisabled?1:0,
source: 1
}).then((res)=>{
});
},500)
},
redirectFreqDetail(){
const data = this.data;
const deviceinfo = [];
if(data.wiredSn){
deviceinfo.push({
sn: data.wiredSn,
type: '有线设备'
});
}
if(data.wiredlessSn){
deviceinfo.push({
sn: data.wiredlessSn,
type: '无线设备'
});
}
wx.navigateTo({
url: `../../pages/freqLogDetail/freqLogDetail?vehicleid=${data.vehicleId}&name=${data.name}&standno=${data.standno}&deviceinfo=${JSON.stringify(deviceinfo)}&sqbh=${data.sqbh}`
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
}
})
\ No newline at end of file
{
"navigationBarTitleText": "收车管理"
}
\ No newline at end of file
<!--pages/collectCarDetail/collectCarDetail.wxml-->
<view class="cc-box">
<view class="">
<view class="title"><text class="name">{{name}}</text> {{standno}}</view>
<view class="sub-title"><text class="label">申请单号:</text> {{sqbh}}</view>
<view class="sub-list" hidden="{{!wiredlessSn}}">
<text class="label">无线设备:</text>
<view class="sub-item">
<view>{{wiredlessSn}}</view>
</view>
</view>
<view class="sub-list" hidden="{{!wiredSn}}">
<text class="label">有线设备:</text>
<view class="sub-item">
<view>{{wiredSn}}</view>
</view>
</view>
<image class="info-icon" src="../../images/info.png" bindtap="alertInfoModal" data-type="week"></image>
</view>
</view>
<view class="cc-box">
<view class="freq-link" bindtap="redirectFreqDetail">调频记录</view>
<view class="form-item">
<view class="weui-flex">
<view class="weui-flex__item label-item">
<text>操作</text>
</view>
<view class="weui-flex__item">
<label bindtap="toggleStatus" data-type="enable" class="radio-wrap">
<image class="radio" src="../../images/radio-lg.png" hidden="{{!isDisabled}}"></image>
<image class="radio" src="../../images/radio-lg-checked.png" hidden="{{isDisabled}}"></image>
启用
</label>
</view>
<view class="weui-flex__item">
<label bindtap="toggleStatus" data-type="disable" class="radio-wrap">
<image class="radio" src="../../images/radio-lg.png" hidden="{{isDisabled}}"></image>
<image class="radio" src="../../images/radio-lg-checked.png" hidden="{{!isDisabled}}"></image>
禁用
</label>
</view>
</view>
</view>
<view class="form-item">
<view class="weui-flex">
<view class="weui-flex__item label-item">
<text>时效选择</text>
</view>
<view class="weui-flex__item">
<view class="lb">开始时间</view>
<view class="disabled-time">
<view class="picker">{{startDate}}</view>
</view>
<view class="disabled-time">
<view class="picker">{{startTime}}</view>
</view>
</view>
<view class="weui-flex__item" hidden="{{!isDisabled}}">
<view class="lb">结束时间</view>
<view class="disabled-time">
<view class="picker">{{endDate}}</view>
</view>
<view class="disabled-time">
<view class="picker">{{endTime}}</view>
</view>
</view>
<view class="weui-flex__item" hidden="{{isDisabled}}">
<view class="lb">结束时间</view>
<view class="enabled-time">
<picker
mode="date"
value="{{endDate}}"
bindchange="bindDateChange"
>
<view class="picker">{{endDate}}</view>
</picker>
</view>
<view class="enabled-time">
<picker
mode="time"
value="{{endTime}}"
bindchange="bindTimeChange"
>
<view class="picker">{{endTime}}</view>
</picker>
</view>
</view>
</view>
</view>
</view>
<view class="find-title">已分享找车</view>
<view class="cc-box" hidden="{{!list.length}}">
<view class="weui-cell" wx:for="{{list}}" wx:key="{{item.wxId}}" data-id="{{item.wxId}}" data-nickname="{{item.nickName}}" data-avatarurl="{{item.avatarUrl}}" bindtap="redirectDetail">
<view class="weui-cell__bd list-item">
<image class="user-image" src="{{item.avatarUrl}}" mode="aspectFit"></image>
<text>分享时间:{{item.shareTime}}</text>
</view>
<view class="weui-cell__ft weui-cell__ft_in-access"></view>
</view>
</view>
<view class="info-modal" hidden="{{infoModalHidden}}" bindtap="closeInfoModal">
<view class="info-text">分享找车有效时长默认3天,可在下方操作修改时长</view>
</view>
\ No newline at end of file
/* pages/collectCarDetail/collectCarDetail.wxss */
.cc-box{
background-color: #fff;
border: 1px solid #d9d9d9;
margin: 20rpx;
font-size: 28rpx;
color: #666;
padding: 20rpx;
}
.title{
color: #000;
}
.name{
margin-right: 20rpx;
}
.label{
margin-right: 20rpx;
float: left;
}
.sub-list{
overflow: hidden;
}
.sub-item{
float: left;
}
.sub-title{
overflow: hidden;
}
.info-icon{
width: 34rpx;
height: 34rpx;
position: absolute;
top: 40rpx;
right: 40rpx;
}
.info-modal{
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
}
.info-modal .info-text{
position: absolute;
top: 50%;
left: 50%;
width: 80%;
padding: 10px;
color: #fff;
border-radius: 6px;
transform: translate(-50%, -50%);
-webkit-transform: translate(-50%, -50%);
background-color: rgba(0,0,0,0.7);
}
.radio{
width: 42rpx;
height: 42rpx;
vertical-align: middle;
}
.form-item{
padding: 20rpx 0;
}
.form-item+.form-item{
border-top: 1px solid #eee;
}
.form-item:last-child{
/*margin-bottom: 0rpx;*/
}
.label-item{
flex: 0 0 160rpx;
color: #333;
display: flex;
align-items:center;
}
.enabled-time{
color: #37c060;
}
.enabled-time, .disabled-time{
margin-top: 20rpx;
}
.disabled-time{
color: #999;
}
.user-image{
width: 80rpx;
height: 80rpx;
border: 1px solid #ccc;
border-radius: 40rpx;
margin-right: 20rpx;
}
.list-item{
display: flex;
align-items: center;
}
.find-title{
margin-left: 20rpx;
}
.radio-wrap{
height:50rpx;
display:inline-block;
}
.freq-link{
float: right;
color: #37c060;
}
const WXRequest = require('../../utils/wxrequest.js');
Page({
/**
* 页面的初始数据
*/
data: {
list: [],
avatarurl: '',
nickname: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
const that = this;
that.setData({
avatarurl: options.avatarurl,
nickname: options.nickname
})
WXRequest.get('vehiclecollection/byWxId', {
wxId: options.id
}).then((res)=>{
that.setData({
list: res.data
})
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
}
})
\ No newline at end of file
{
"navigationBarTitleText": "收车管理"
}
\ No newline at end of file
<!--pages/collectCarLog/collectCarLog.wxml-->
<view class="cc-box">
<image class="user-image" src="{{avatarurl}}" mode="aspectFit"></image>
<text>{{nickname}}</text>
</view>
<view class="log-list">
<view class="weui-cell" wx:for="{{list}}" wx:key="{{item.wxId}}">
<view class="weui-cell__bd well-info" >
<view>{{item.name}} {{item.standno}}</view>
<view class="sn">申请单号: {{item.sqbh}}</view>
<view class="time" hidden="{{!item.wiredlessSn}}">无线设备: {{item.wiredlessSn}}</view>
<view class="time" hidden="{{!item.wiredSn}}">有线设备: {{item.wiredSn}}</view>
<view class="time">分享时间: {{item.shareTime}}</view>
</view>
</view>
</view>
\ No newline at end of file
/* pages/collectCarLog/collectCarLog.wxss */
.cc-box{
background-color: #fff;
border: 1px solid #d9d9d9;
margin: 20rpx;
font-size: 28rpx;
color: #666;
display:flex;
align-items:center;
padding: 20rpx;
}
.user-image{
width: 80rpx;
height: 80rpx;
border: 1px solid #ccc;
border-radius: 40rpx;
margin-right: 20rpx;
}
.log-list{
background-color: #fff;
font-size: 28rpx;
}
.well-info>view{
color: #666;
}
.well-info>view:first-child{
color: #333;
}
\ No newline at end of file
const WXRequest = require('../../utils/wxrequest.js');
Page({
data: {
inputVal: '',
searchTypes: [{
label: '申请单号',
value: 'sqbh'
},{
label: '车架号',
value: 'standno'
},{
label: '设备号',
value: 'sn'
},{
label: '姓名',
value: 'name'
}],
placeholders: [
'请输入完整的申请单号',
'请输入车架号后六位',
'请输入设备SN',
'请输入客户姓名'
],
searchTypesIndex: 0,
list: [],
scrollTop: 0,
scrollHeight: 300,
page: 1,
maxPage: 0,
ing: false,
initSearch: false,
userStatus: ''
},
onLoad() {
var that = this;
wx.getSystemInfo({
success: function(res) {
that.setData({
scrollHeight: res.windowHeight-50
})
}
});
that.setData({
userStatus: wx.getStorageSync('userStatus')
});
that.loadData(true);
},
clearInput: function () {
this.setData({
inputVal: ""
});
},
inputTyping: function (e) {
this.setData({
inputVal: e.detail.value
});
},
searchConfirm(e){
this.setData({
ing: false,
page: 1,
scrollTop: 0
});
this.loadData();
},
loadData(isInit, isPullDown){
var that = this;
if(!isInit && !that.validate()) return;
that.setData({
ing: true
});
let params = {};
if(isInit){
params = {
pageSize: 50,
currentPage: 1
}
that.setData({
page: 5
})
}else{
params = {
pageSize: 10,
currentPage: that.data.page
}
params[that.data.searchTypes[that.data.searchTypesIndex].value] = that.data.inputVal;
}
if(that.data.userStatus === 0){
WXRequest.get('vehiclecollection/getList',params).then((res)=>{
if(!that.data.ing) return;
const _list = res.data;
const maxPage = Math.ceil(res.recordsTotal/10);console.log(maxPage)
if(_list){
/*_list.forEach((item)=>{
const deviceObj = {}
item.device&&item.device.forEach((deviceItem)=>{
if(!deviceObj[deviceItem.type]){
deviceObj[deviceItem.type] = [];
}
deviceObj[deviceItem.type].push(deviceItem.sn);
});
item.deviceList = [];
for(let type in deviceObj){
item.deviceList.push({
type,
sns: deviceObj[type]
});
}
});*/
that.setData({
list: that.data.page===1?_list:that.data.list.concat(_list),
ing: false,
maxPage,
initSearch: true
});
}else{
that.setData({
list: [],
ing: false,
maxPage
});
}
if(isPullDown){
wx.hideNavigationBarLoading() //完成停止加载
wx.stopPullDownRefresh();
}
});
}else if(that.data.userStatus === 1){
WXRequest.get('vehiclecollection/getListNoRole',params).then((res)=>{
if(!that.data.ing) return;
const _list = res.data;
const maxPage = Math.ceil(res.recordsTotal/10);console.log(maxPage)
if(_list){
/*_list.forEach((item)=>{
const deviceObj = {}
item.device&&item.device.forEach((deviceItem)=>{
if(!deviceObj[deviceItem.type]){
deviceObj[deviceItem.type] = [];
}
deviceObj[deviceItem.type].push(deviceItem.sn);
});
item.deviceList = [];
for(let type in deviceObj){
item.deviceList.push({
type,
sns: deviceObj[type]
});
}
});*/
that.setData({
list: that.data.page===1?_list:that.data.list.concat(_list),
ing: false,
maxPage,
initSearch: true
});
}else{
that.setData({
list: [],
ing: false,
maxPage
});
}
if(isPullDown){
wx.hideNavigationBarLoading() //完成停止加载
wx.stopPullDownRefresh();
}
});
}
},
searchTypeChange(e){
this.setData({
searchTypesIndex: e.detail.value
});
if(!this.data.inputVal) return;
this.setData({
ing: false,
page: 1,
scrollTop: 0
});
this.loadData()
},
bindDownLoad(){
if(this.data.ing) return;
const nextPage = this.data.page+1;
if(nextPage>this.data.maxPage) return;
this.setData({
page: nextPage
});
this.loadData();
},
bindScroll(){
},
validate(){
const type = this.data.searchTypes[this.data.searchTypesIndex].value;
const inputVal = this.data.inputVal;
if(type === 'name'){//姓名
if(inputVal.length<2){
wx.showModal({
content: '请输入正确的姓名,至少2位数',
showCancel: false
});
return false;
}
}else if(inputVal.length<6){
wx.showModal({
content: '请输入至少6位数',
showCancel: false
});
return false;
}
return true;
},
redirectDetail(e){
if(this.data.userStatus !== 0) return;
if(e.target.dataset.type === 'user'){
const dataset = e.target.dataset;
wx.navigateTo({
url: `../../pages/collectCarLog/collectCarLog?id=${dataset.id}&nickname=${dataset.nickname}&avatarurl=${dataset.avatarurl}`
});
}else{
const dataset = e.currentTarget.dataset;
wx.navigateTo({
url: `../../pages/collectCarDetail/collectCarDetail?vehicleid=${dataset.vehicleid}&name=${dataset.name}&standno=${dataset.standno}&wiredSn=${dataset.wiredsn}&wiredlessSn=${dataset.wiredlesssn}&sqbh=${dataset.sqbh}`
});
}
},
redirectUserDetail(e){
const dataset = e.currentTarget.dataset;
//console.log(e.currentTarget)
},
onPullDownRefresh: function () {
this.setData({
ing: false,
page: 1,
scrollTop: 0,
list: []
});
this.loadData(true, true);
}
})
\ No newline at end of file
{
"navigationBarTitleText": "收车管理",
"enablePullDownRefresh": true
}
\ No newline at end of file
<view class="serach-box">
<view class="weui-search-bar__form">
<view class="weui-search-bar__box search-wrap">
<icon class="weui-icon-search_in-box" type="search" size="14"></icon>
<input
type="text"
class="weui-search-bar__input"
placeholder="{{placeholders[searchTypesIndex]}}"
value="{{inputVal}}"
focus="{{inputShowed}}"
bindinput="inputTyping"
bindconfirm="searchConfirm"/>
<view class="weui-icon-clear" wx:if="{{inputVal.length > 0}}" bindtap="clearInput">
<icon type="clear" size="14"></icon>
</view>
<picker
class="search-picker"
bindchange="searchTypeChange"
value="{{searchTypesIndex}}"
range="{{searchTypes}}"
range-key="label">
<text>{{searchTypes[searchTypesIndex].label}}</text>
<view class="select-dropdown-icon"></view>
</picker>
</view>
</view>
</view>
<view class="result-list" hidden="{{!list.length}}">
<scroll-view
scroll-top="{{scrollTop}}"
scroll-y="true"
style="height:{{scrollHeight}}px;"
bindscrolltolower="bindDownLoad"
bindscroll="bindScroll">
<view class="weui-cell {{item.weight===0?'':'disabled'}}"
wx:for="{{list}}"
wx:key="{{item.vehicleId}}"
bindtap="redirectDetail"
data-standno="{{item.standno}}"
data-sqbh="{{item.sqbh}}"
data-wiredsn="{{item.wiredSn||''}}"
data-wiredlesssn="{{item.wiredlessSn||''}}"
data-sns="{{item.sns}}"
data-name="{{item.name}}"
data-vehicleid="{{item.vehicleId}}">
<view class="weui-cell__bd">
<view class="title"><text class="name">{{item.name}}</text> {{item.standno}}</view>
<view class="user-info">
<view class="user-info-main">
<view class="sub-title"><text class="label">申请单号:</text> {{item.sqbh}}</view>
<view class="sub-list" hidden="{{!item.wiredSn}}">
<text class="label">有线设备:</text>
<view class="sub-item">
<view>{{item.wiredSn}}</view>
</view>
</view>
<view class="sub-list" hidden="{{!item.wiredlessSn}}">
<text class="label">无线设备:</text>
<view class="sub-item">
<view>{{item.wiredlessSn}}</view>
</view>
</view>
<view class="sub-title" hidden="{{userStatus===0}}"><text class="label">分享时间:</text> {{item.shareTime}}</view>
</view>
<view class="user-info-image" hidden="{{userStatus!==0}}">
<image
wx:for="{{item.customInfo}}"
wx:key="{{item.wxId}}"
src="{{item.avatarUrl}}"
mode="aspectFit"
data-type="user"
data-nickname="{{item.nickName}}"
data-avatarurl="{{item.avatarUrl}}"
data-id="{{item.wxId}}">
</image>
</view>
<view class="weui-cell__ft weui-cell__ft_in-access" hidden="{{userStatus!==0}}"></view>
</view>
</view>
</view>
<view class="end-tip" hidden="{{page!=maxPage}}">
没有更多数据了~
</view>
</scroll-view>
</view>
<view class="none" hidden="{{!initSearch || list.length}}">
<image src="../../images/none.png"/>
<view>没有搜索到匹配的车辆数据</view>
</view>
/* pages/collectCarSearch/collectCarSearch.wxss */
.serach-box{
padding: 20rpx;
background-color: #fff;
}
.search-wrap{
position: relative;
padding-right: 120px;
}
.search-wrap input{
}
.search-picker{
position: absolute;
top: 0;
right: 0;
font-size: 28rpx;
}
.search-picker text{
position: absolute;
width: 60px;
right: 20px;
height: 56rpx;
line-height: 56rpx;
padding-left: 10px;
border-left: 1px solid #eee;
}
.select-dropdown-icon{
content: '';
display: inline-block;
border: 5px solid transparent;
border-top-color: #c9c9c9;
position: absolute;
right: 10px;
top: 10px;
}
.search-wrap .weui-icon-clear{
right: 90px;
z-index: 100;
}
.result-list{
background-color: #fff;
color: #666;
font-size: 14px;
}
.result-list .title{
color: #000;
}
.result-list .name{
margin-right: 20rpx;
}
.result-list .label{
margin-right: 20rpx;
float: left;
}
.sub-list{
overflow: hidden;
}
.sub-item{
float: left;
}
.sub-title{
overflow: hidden;
}
.result-list .weui-cell:first-child{
border-top: 1px solid #d9d9d9;
}
.result-list .weui-cell:last-child{
border-bottom: 1px solid #d9d9d9;
}
.none{
padding: 200rpx 0;
text-align: center;
color: #999;
}
.none image{
width: 400rpx;
height: 400rpx;
margin-bottom: 20rpx;
}
.end-tip{
text-align: center;
}
.user-info{
display: flex;
}
.user-info .weui-cell__ft_in-access{
width: 10rpx;
}
.user-info-main{
flex: 1;
}
.user-info-image{
/*width: 280rpx;
display: flex;
align-items: center;
justify-content: space-around;*/
}
.user-info-image image{
width: 70rpx;
height: 70rpx;
border-radius: 65rpx;
position: relative;
border: 1px solid #ccc;
margin-left: 20rpx;
}
.weui-cell.disabled{
background-color: #f9f9f9;
}
/*.user-info-image image:first-child{
left: 0;
}
.user-info-image image:nth-child(n+2){
left: -20rpx;
}
.user-info-image image:nth-child(n+3){
left: -40rpx;
}
.user-info-image image:nth-child(n+4){
left: -60rpx;
}
.user-info-image image:nth-child(n+5){
left: -80rpx;
}*/
\ No newline at end of file
const wxCharts = require('./../../utils/wxcharts-min.js');
const moment = require('./../../utils/moment.min.js');
const WXRequest = require('../../utils/wxrequest.js');
let windowWidth = 320;
Page({
/**
* 页面的初始数据
*/
data: {
dateRange: [],
dateRangeIndex: 0
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getRecentFourWeek();
try {
let res = wx.getSystemInfoSync();
windowWidth = res.windowWidth;
} catch (e) {
// do something when get system info failed
}
this.loadData()
},
getRecentFourWeek(){
const recentWeekSTime = moment().startOf('week').add(1, 'day')//.format('YYYY-MM-DD');
const recentWeekETime = moment().endOf('week').add(1, 'day');
const dateRangeArr = [];
if(new Date().getDay() === 0){
const _sTime = recentWeekSTime.subtract(1, 'week');
const _eTime = recentWeekETime.subtract(1, 'week');
dateRangeArr.push({
label: `${_sTime.format('YYYY年M月D日')}~${_eTime.format('YYYY年M月D日')}`,
sTime: _sTime.format('YYYY-MM-DD'),
eTime: _eTime.format('YYYY-MM-DD')
});
}else{
dateRangeArr.push({
label: `${recentWeekSTime.format('YYYY年M月D日')}~${recentWeekETime.format('YYYY年M月D日')}`,
sTime: recentWeekSTime.format('YYYY-MM-DD'),
eTime: recentWeekETime.format('YYYY-MM-DD')
});
}
for(let i=0; i<3; i++){
const _sTime = recentWeekSTime.subtract(1, 'week');
const _eTime = recentWeekETime.subtract(1, 'week');
dateRangeArr.push({
label: `${_sTime.format('YYYY年M月D日')}~${_eTime.format('YYYY年M月D日')}`,
sTime: _sTime.format('YYYY-MM-DD'),
eTime: _eTime.format('YYYY-MM-DD')
});
}
this.setData({
dateRange: dateRangeArr
})
},
bindAccountChange: function(e) {
const index = e.detail.value;
this.setData({
dateRangeIndex: index
});
this.loadData();
},
loadData(){
var that = this;
var chosenDateRange = this.data.dateRange[this.data.dateRangeIndex];
WXRequest.get('report/getActiveDeviceWeekReport', {
sTime: chosenDateRange.sTime,
eTime: chosenDateRange.eTime
}).then((res)=>{
if(res.returnCode == '0'){
const arr = [];
res.data.forEach((item)=>{
arr.push(item.activeDeviceNumber)
});
that.drawChart(arr)
}
});
},
drawChart(dataArr){
const maxNum = Math.max.apply(Math, dataArr);
new wxCharts({
canvasId: 'areaCanvas',
type: 'column',
legend: false,
categories: ['一', '二', '三', '四', '五', '六', '日'],
series: [{
name: '激活量',
data: dataArr,
color: '#2fc2ff'
}],
xAxis: {
disableGrid: true
},
yAxis: {
format: function (val) {
return val + '个';
},
gridColor: '#eee',
min: 0,
max: maxNum<5?5:maxNum
},
dataItem: {
},
width: windowWidth-20, //减20为了最后一栏有部分被遮掉
height: windowWidth/2,
/*extra: {
column: {
width: '10'
}
}*/
});
}
})
\ No newline at end of file
{
"navigationBarTitleText": "设备激活周统计"
}
\ No newline at end of file
<view class="date-select">
<picker bindchange="bindAccountChange" value="{{dateRangeIndex}}" range-key="label" range="{{dateRange}}">
<button class="weui-btn" type="default" plain="true" size="mini">{{dateRange[dateRangeIndex].label}}</button>
<view class="select-dropdown-icon"></view>
</picker>
</view>
<view class="canvas-container">
<canvas class="canvas" canvas-id="areaCanvas"></canvas>
</view>
\ No newline at end of file
/* pages/home.wxss */
.canvas {
width: 100%;
height: 200px;
/*transform: scale(0.5)*/
}
.canvas-container{
background-color: #fff;
margin: 30rpx 15rpx 0rpx;
border-radius: 15rpx;
border: 2rpx solid #ddd;
padding: 30rpx 20rpx 0rpx 0rpx;
}
.date-select{
text-align: center;
background-color: #fff;
padding-bottom: 20rpx;
}
.date-select .weui-btn{
width: 260px;
border-color: #ddd !important;
vertical-align: middle;
}
.select-dropdown-icon{
content: '';
display: inline-block;
border: 10rpx solid transparent;
border-top-color: #c9c9c9;
position: relative;
left: -40rpx;
top: 10rpx;
}
picker{
font-size: 14px;
}
\ No newline at end of file
const wxCharts = require('./../../utils/wxcharts-min.js');
const moment = require('./../../utils/moment.min.js');
const WXRequest = require('../../utils/wxrequest.js');
let windowWidth = 320;
Page({
/**
* 页面的初始数据
*/
data: {
dateRange: [],
dateRangeIndex: 0
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getRecentFourWeek();
try {
let res = wx.getSystemInfoSync();
windowWidth = res.windowWidth;
} catch (e) {
// do something when get system info failed
}
this.loadData()
},
getRecentFourWeek(){
const recentWeekSTime = moment().startOf('week').add(1, 'day')//.format('YYYY-MM-DD');
const recentWeekETime = moment().endOf('week').add(1, 'day');
const dateRangeArr = [];
if(new Date().getDay() === 0){
const _sTime = recentWeekSTime.subtract(1, 'week');
const _eTime = recentWeekETime.subtract(1, 'week');
dateRangeArr.push({
label: `${_sTime.format('YYYY年M月D日')}~${_eTime.format('YYYY年M月D日')}`,
sTime: _sTime.format('YYYY-MM-DD'),
eTime: _eTime.format('YYYY-MM-DD')
});
}else{
dateRangeArr.push({
label: `${recentWeekSTime.format('YYYY年M月D日')}~${recentWeekETime.format('YYYY年M月D日')}`,
sTime: recentWeekSTime.format('YYYY-MM-DD'),
eTime: recentWeekETime.format('YYYY-MM-DD')
});
}
for(let i=0; i<3; i++){
const _sTime = recentWeekSTime.subtract(1, 'week');
const _eTime = recentWeekETime.subtract(1, 'week');
dateRangeArr.push({
label: `${_sTime.format('YYYY年M月D日')}~${_eTime.format('YYYY年M月D日')}`,
sTime: _sTime.format('YYYY-MM-DD'),
eTime: _eTime.format('YYYY-MM-DD')
});
}
this.setData({
dateRange: dateRangeArr
})
},
bindAccountChange: function(e) {
const index = e.detail.value;
this.setData({
dateRangeIndex: index
});
this.loadData();
},
loadData(){
var that = this;
var chosenDateRange = this.data.dateRange[this.data.dateRangeIndex];
WXRequest.get('report/getOfflineDevcieReport', {
sTime: chosenDateRange.sTime,
eTime: chosenDateRange.eTime
}).then((res)=>{
if(res.returnCode == '0'){
const arr = [];
res.data.deviceOfflineRatio.split(',').forEach((item)=>{
arr.push(item.replace('%', ''))
});
that.drawChart(arr);
}
});
},
drawChart(dataArr){
const maxNum = Math.max.apply(Math, dataArr);
new wxCharts({
canvasId: 'areaCanvas',
type: 'line',
legend: false,
categories: ['一', '二', '三', '四', '五', '六', '日'],
series: [{
name: '激活量',
data: dataArr,
color: '#ffae2f',
format: function (val) {
return `${val}%`;
}
}],
xAxis: {
disableGrid: true
},
yAxis: {
format: function (val) {
return `${val}%`;
},
gridColor: '#eee',
min: 0,
max: maxNum<5?5:maxNum
},
dataItem: {
},
width: windowWidth-20, //减20为了最后一栏有部分被遮掉
height: windowWidth/2,
/*extra: {
column: {
width: '10'
}
}*/
});
}
});
{
"navigationBarTitleText": "设备离线率周统计"
}
\ No newline at end of file
<view class="date-select">
<picker bindchange="bindAccountChange" value="{{dateRangeIndex}}" range-key="label" range="{{dateRange}}">
<button class="weui-btn" type="default" plain="true" size="mini">{{dateRange[dateRangeIndex].label}}</button>
<view class="select-dropdown-icon"></view>
</picker>
</view>
<view class="canvas-container">
<canvas class="canvas" canvas-id="areaCanvas"></canvas>
</view>
\ No newline at end of file
/* pages/home.wxss */
.canvas {
width: 100%;
height: 200px;
/*transform: scale(0.5)*/
}
.canvas-container{
background-color: #fff;
margin: 30rpx 15rpx 0rpx;
border-radius: 15rpx;
border: 2rpx solid #ddd;
padding: 30rpx 20rpx 0rpx 0rpx;
}
.date-select{
text-align: center;
background-color: #fff;
padding-bottom: 20rpx;
}
.date-select .weui-btn{
width: 260px;
border-color: #ddd !important;
vertical-align: middle;
}
.select-dropdown-icon{
content: '';
display: inline-block;
border: 10rpx solid transparent;
border-top-color: #c9c9c9;
position: relative;
left: -40rpx;
top: 10rpx;
}
\ No newline at end of file
// pages/fence/fence.js
const WXRequest = require('../../utils/wxrequest.js');
Page({
/**
* 页面的初始数据
*/
data: {
url: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
const sessionid = /^JSESSIONID=(.+);Path=\/otmini$/g.exec(wx.getStorageSync('sessionid'))[1];
this.setData({
url: `${WXRequest.domain}h5/dist/fence.html?sn=${options.sn}&sessionid=${sessionid}`
})
}
})
\ No newline at end of file
{
"navigationBarTitleText": "电子围栏"
}
\ No newline at end of file
<web-view src="{{url}}"></web-view>
\ No newline at end of file
/* pages/fence/fence.wxss */
\ No newline at end of file
const WXRequest = require('../../utils/wxrequest.js');
const moment = require('./../../utils/moment.min.js');
Page({
/**
* 页面的初始数据
*/
data: {
url: '',
carInfo: null,
loginUserId: '',
ifUpdate: false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log('test:'+options.test)
/* wx.showShareMenu({
withShareTicket: true
});*/
const sessionid = /^JSESSIONID=(.+);Path=\/otmini$/g.exec(wx.getStorageSync('sessionid'))[1];
this.setData({
url: encodeURI(`${WXRequest.domain}h5/dist/index.html?sessionid=${sessionid}`),
loginUserId: wx.getStorageSync('loginUserId'),
ifUpdate: true
});
},
onShow(options){
const carShareInfo = wx.getStorageSync('carShareInfo');
const carInfo = wx.getStorageSync('carInfo');
const sessionid = /^JSESSIONID=(.+);Path=\/otmini$/g.exec(wx.getStorageSync('sessionid'))[1];
/* this.setData({
ifUpdate: false
}) */
if(wx.getStorageSync('initFindCar')){
let _url = `${WXRequest.domain}h5/dist/index.html?sessionid=${sessionid}&sns=${carInfo.sns}&standno=${carInfo.standno}&name=${carInfo.name}&vehicleid=${carInfo.vehicleid}`;
if(carInfo.loginUserId){
_url += `&loginUserId=${carInfo.loginUserId}`;
this.setData({
loginUserId: carInfo.loginUserId
});
}
this.setData({
url: encodeURI(_url),
ifUpdate: true
});
wx.setStorageSync('initFindCar', false);
this.setData({
carInfo: carInfo
});
console.log(encodeURI(_url))
}else if(carShareInfo){
const _url = `${WXRequest.domain}h5/dist/index.html?sessionid=${sessionid}&sns=${carShareInfo.sns}&standno=${carShareInfo.standno}&name=${carShareInfo.name}&vehicleid=${carShareInfo.vehicleid}&loginUserId=${this.data.loginUserId}`;
this.setData({
url: encodeURI(_url),
ifUpdate: true
});
this.setData({
carShareInfo: null,
carInfo: carShareInfo
});
console.log(encodeURI(_url))
}
},
receiveMsg(){
wx.navigateBack()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function(options) {
var that = this;
var return_url = options.webViewUrl;
/*await new Promise((resolve, reject)=>{
setTimeout(()=>{
resolve()
},1000)
})*/
const startTime = moment().format('YYYY-MM-DD HH:mm:ss');
WXRequest.get('vehicleshare/savevehicleshare', {
loginUserId: that.data.loginUserId,
vehicleId: that.data.carInfo.vehicleid,
source: 0,
status: 0,
startTime: startTime,
endTime: moment(startTime).add(3, 'days').format('YYYY-MM-DD HH:mm:ss')
}).then((res)=>{
});
var opts = {
title: that.data.title,
path: '/pages/loading/loading',
success: function (res) {
console.log(arguments)
/*var shareTickets = res.shareTickets;
if (shareTickets.length == 0) {
return false;
}
wx.getShareInfo({
shareTicket: shareTickets[0],
success: function(res){
var encryptedData = res.encryptedData;
var iv = res.iv;
}
})*/
},
fail: function (res) {
// 转发失败
}
}
if(that.data.carInfo){
opts.path = opts.path + '?carShareInfo='+encodeURIComponent(JSON.stringify(that.data.carInfo))+'&loginUserId='+that.data.loginUserId;
}
return opts;
}
})
\ No newline at end of file
{
}
\ No newline at end of file
<web-view src="{{url}}" bindmessage="receiveMsg"></web-view>
\ No newline at end of file
.map-wrap{
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.icon-wrap{
position: fixed;
}
.icon-wrap cover-image{
display: inline-block;
width: 100%;
height: 100%;
}
.icon-wrap cover-image.active{
display: none;
}
.icon-wrap.hover cover-image{
display: none;
}
.icon-wrap.hover cover-image.active{
display: inline-block;
}
.findcar-icon-wrap{
left: 50%;
bottom: 20rpx;
margin-left: -66rpx;
width: 132rpx;
height: 132rpx;
}
.locate-icon-wrap{
left: 30rpx;
bottom: 40rpx;
width: 98rpx;
height: 98rpx;
}
.refresh-icon-wrap{
left: 30rpx;
bottom: 160rpx;
width: 98rpx;
height: 98rpx;
}
.car-info-modal{
position: fixed;
top: 150rpx;
left: 50%;
width: 580rpx;
margin-left: -290rpx;
background: #fff;
border-radius: 10rpx;
border: 2rpx solid #eee;
}
.car-info-modal .main{
padding: 30rpx 30rpx 0;
}
.car-info-modal .title{
font-size: 34rpx;
padding-bottom: 30rpx;
border-bottom: 2rpx solid #eee;
}
.car-info-modal .info{
display: flex;
color: #666;
margin: 10rpx 0rpx;
font-size: 28rpx;
}
.car-info-modal .info cover-image{
width: 42rpx;
height: 42rpx;
margin-right: 10rpx;
}
.car-info-modal .info .text{
word-break: break-all;
word-wrap: break-word;
white-space: pre-line;
flex: 1;
line-height: 46rpx;
}
.car-info-modal .info .label{
}
.car-info-modal .nav{
display: flex;
color: #333;
font-size: 28rpx;
border-top: 1rpx solid #eee;
}
.car-info-modal .nav cover-view{
flex: 1;
padding: 20rpx 0;
text-align: center;
border-right: 1rpx solid #eee;
}
.car-info-modal .nav cover-view:last-child{
border-right: none;
}
.battery-icon{
position: absolute;
top: 80rpx;
right: 20rpx;
}
.battery-icon-bar{
margin-top: 20px;
display: inline-block;
width: 70rpx;
height: 38rpx;
border: 2rpx solid #37c060;
border-radius: 8rpx;
padding: 2rpx;
overflow:visible;
position: relative;
background-color:#fff;
z-index:100;
}
.battery-icon-out{
content: '';
display: inline-block;
width: 5rpx;
height: 24rpx;
border: 2rpx solid #37c060;
border-radius: 6rpx;
position: relative;
left: -2rpx;
top: -4rpx;
}
.battery-icon-bar-inn{
content: '';
display: inline-block;
width: 10%;
height: 100%;
border-radius: 8rpx 0 0 8rpx;
background-color: #d4f1dc;
}
.battery-icon-bar-num{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
font-size: 24rpx;
text-align: center;
line-height: 42rpx;
color: #37c060;
}
.battery-icon.full .battery-icon-inn{
border-radius: 8rpx;
}
.battery-icon.not-enough{
border-color: #df2222;
}
.battery-icon.not-enough .battery-icon-out{
border: 2rpx solid #df2222;
}
.battery-icon.not-enough .battery-icon-inn{
background-color: #f0d0d0;
}
.radio{
display: flex;
margin-right: 10px;
}
.radio cover-image{
flex: 1;
}
.radio cover-view{
line-height: 42rpx;
}
.sidebar{
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.5);
animation: sidebarShow 1s;
-webkit-animation:sidebarShow 1s; /* Safari 和 Chrome */
}
.sidebar.hidden{
left: -100%;
background: none;
animation: sidebarHide 1s;
-webkit-animation:sidebarHide 1s; /* Safari 和 Chrome */
}
.sidebar-nav{
width: 70%;
height: 100%;
background-color:#fff;
padding: 0;
display: flex;
flex-direction: column;
}
.sidebar-nav .cell{
display: flex;
padding: 24rpx;
align-items:center;
}
.sidebar-nav .left{
flex: 1;
}
.sidebar-nav .left cover-image{
display: inline-block;
width: 30rpx;
height: 30rpx;
margin-right: 10rpx;
vertical-align: middle;
}
.sidebar-nav .left cover-view{
display: inline-block;
}
.sidebar-nav .weui-cell__ft_in-access{
overflow: visible;
}
.sidebar-nav .longline{
display: inline-block;
width: 100%;
height: 2rpx;
background-color: #eee;
line-height: 2rpx;
}
.sidebar-nav .line{
display: inline-block;
width: 100%;
margin-left: 24rpx;
height: 2rpx;
background-color: #eee;
line-height: 2rpx;
}
.arrow-right{
display: inline-block;
width: 16rpx;
height: 25rpx;
margin-right: 10rpx;
}
@keyframes sidebarHide
{
from {
left: 0;
}
to {
left: -100%;
}
}
@-webkit-keyframes sidebarHide /* Safari 与 Chrome */
{
from {
left: 0;
}
to {
left: -100%;
}
}
@keyframes sidebarShow
{
0% {
left: -100%;
background: none;
}
25% {
left: 0;
background: none;
}
100%{
background: rgba(0,0,0,0.5);
}
}
@-webkit-keyframes sidebarShow /* Safari 与 Chrome */
{
0% {
left: -100%;
background: none;
}
25% {
left: 0;
background: none;
}
100%{
background: rgba(0,0,0,0.5);
}
}
\ No newline at end of file
const WXRequest = require('../../utils/wxrequest.js');
Page({
data: {
inputVal: '',
searchTypes: [{
label: '申请单号',
value: '4'
},{
label: '车架号',
value: '2'
},{
label: '设备号',
value: '1'
},{
label: '姓名',
value: '3'
}],
placeholders: [
'请输入完整的申请单号',
'请输入车架号后六位',
'请输入设备SN',
'请输入客户姓名'
],
searchTypesIndex: 0,
list: [],
scrollTop: 0,
scrollHeight: 300,
page: 1,
maxPage: 0,
ing: false,
initSearch: false
},
onLoad() {
var that = this;
wx.getSystemInfo({
success: function(res) {
that.setData({
scrollHeight: res.windowHeight-50
})
}
});
that.loadData(true);
},
clearInput: function () {
this.setData({
inputVal: ""
});
},
inputTyping: function (e) {
this.setData({
inputVal: e.detail.value
});
},
searchConfirm(e){
this.setData({
ing: false,
page: 1,
scrollTop: 0
});
this.loadData();
},
loadData(isInit){
var that = this;
if(!isInit && !that.validate()) return;
that.setData({
ing: true
});
let params = {};
if(isInit){
params = {
pageSize: 50,
currentPage: 1
}
that.setData({
page: 5
})
}else{
params = {
index: that.data.searchTypes[that.data.searchTypesIndex].value,
params: that.data.inputVal,
pageSize: 10,
currentPage: that.data.page
}
}
WXRequest.get('search/searchVehicle',params).then((res)=>{
if(!that.data.ing) return;
const _list = res.data;
const maxPage = Math.ceil(res.recordsTotal/10);
if(_list){
_list.forEach((item)=>{
const deviceObj = {}
item.device&&item.device.forEach((deviceItem)=>{
if(!deviceObj[deviceItem.type]){
deviceObj[deviceItem.type] = [];
}
deviceObj[deviceItem.type].push(deviceItem.sn);
});
item.deviceList = [];
for(let type in deviceObj){
item.deviceList.push({
type,
sns: deviceObj[type]
});
}
});
that.setData({
list: that.data.page===1?_list:that.data.list.concat(_list),
ing: false,
maxPage,
initSearch: true
});
}else{
that.setData({
list: [],
ing: false,
maxPage
});
}
})
},
searchTypeChange(e){
this.setData({
searchTypesIndex: e.detail.value
});
if(!this.data.inputVal) return;
this.setData({
ing: false,
page: 1,
scrollTop: 0
});
this.loadData()
},
bindDownLoad(){
if(this.data.ing) return;
const nextPage = this.data.page+1;
if(nextPage>this.data.maxPage) return;
this.setData({
page: nextPage
});
this.loadData();
},
bindScroll(){
},
validate(){
const type = this.data.searchTypes[this.data.searchTypesIndex].value;
const inputVal = this.data.inputVal;
if(type === '3'){//姓名
if(inputVal.length<2){
wx.showModal({
content: '请输入正确的姓名,至少2位数',
showCancel: false
});
return false;
}
}else if(inputVal.length<6){
wx.showModal({
content: '请输入至少6位数',
showCancel: false
});
return false;
}
return true;
},
redirectDetail(e){
const dataset = e.currentTarget.dataset;
const obj = {
name: dataset.name,
standno: dataset.standno,
sns: dataset.sns,
vehicleid: dataset.vehicleid
}
if(dataset.loginuserid){
obj.loginUserId = dataset.loginuserid;
}
wx.setStorageSync('carInfo', obj);
wx.setStorageSync('initFindCar', true);
wx.switchTab({
url: '../../pages/findCar/findCar'
});
}
})
\ No newline at end of file
{}
\ No newline at end of file
<view class="serach-box">
<view class="weui-search-bar__form">
<view class="weui-search-bar__box search-wrap">
<icon class="weui-icon-search_in-box" type="search" size="14"></icon>
<input
type="text"
class="weui-search-bar__input"
placeholder="{{placeholders[searchTypesIndex]}}"
value="{{inputVal}}"
focus="{{inputShowed}}"
bindinput="inputTyping"
bindconfirm="searchConfirm"/>
<view class="weui-icon-clear" wx:if="{{inputVal.length > 0}}" bindtap="clearInput">
<icon type="clear" size="14"></icon>
</view>
<picker
class="search-picker"
bindchange="searchTypeChange"
value="{{searchTypesIndex}}"
range="{{searchTypes}}"
range-key="label">
<text>{{searchTypes[searchTypesIndex].label}}</text>
<view class="select-dropdown-icon"></view>
</picker>
</view>
</view>
</view>
<view class="result-list" hidden="{{!list.length}}">
<scroll-view
scroll-top="{{scrollTop}}"
scroll-y="true"
style="height:{{scrollHeight}}px;"
bindscrolltolower="bindDownLoad"
bindscroll="bindScroll">
<view class="weui-cell"
wx:for="{{list}}"
bindtap="redirectDetail"
data-standno="{{item.standno}}"
data-sns="{{item.sns}}"
data-loginuserid="{{item.loginUserId}}"
data-name="{{item.name}}"
data-vehicleid="{{item.vehicleId}}">
<view class="weui-cell__bd">
<view class="title"><text class="name">{{item.name}}</text> {{item.standno}}</view>
<view class="sub-title"><text class="label">申请单号:</text> {{item.sqbh||''}}</view>
<view wx:for="{{item.deviceList}}" class="sub-list">
<text class="label">{{item.type}}:</text>
<view class="sub-item">
<view wx:for="{{item.sns}}">{{item}}</view>
</view>
</view>
</view>
</view>
<view class="end-tip" hidden="{{page!=maxPage}}">
没有更多数据了~
</view>
</scroll-view>
</view>
<view class="none" hidden="{{!initSearch || list.length}}">
<image src="../../images/none.png"/>
<view>没有搜索到匹配的车辆数据</view>
</view>
.serach-box{
padding: 20rpx;
background-color: #fff;
}
.search-wrap{
position: relative;
padding-right: 120px;
}
.search-wrap input{
}
.search-picker{
position: absolute;
top: 0;
right: 0;
font-size: 28rpx;
}
.search-picker text{
position: absolute;
width: 60px;
right: 20px;
height: 56rpx;
line-height: 56rpx;
padding-left: 10px;
border-left: 1px solid #eee;
}
.select-dropdown-icon{
content: '';
display: inline-block;
border: 5px solid transparent;
border-top-color: #c9c9c9;
position: absolute;
right: 10px;
top: 10px;
}
.search-wrap .weui-icon-clear{
right: 90px;
z-index: 100;
}
.result-list{
background-color: #fff;
color: #666;
font-size: 14px;
}
.result-list .title{
color: #000;
}
.result-list .name{
margin-right: 20rpx;
}
.result-list .label{
margin-right: 20rpx;
float: left;
}
.sub-list{
overflow: hidden;
}
.sub-item{
float: left;
}
.sub-title{
overflow: hidden;
}
.result-list .weui-cell:first-child{
border-top: 1px solid #d9d9d9;
}
.result-list .weui-cell:last-child{
border-bottom: 1px solid #d9d9d9;
}
.none{
padding: 200rpx 0;
text-align: center;
color: #999;
}
.none image{
width: 400rpx;
height: 400rpx;
margin-bottom: 20rpx;
}
.end-tip{
text-align: center;
}
\ No newline at end of file
const WXRequest = require('../../utils/wxrequest.js');
Page({
/**
* 页面的初始数据
*/
data: {
modeType: 'catch', //catch: 追车, clock: 闹钟, week: 星期
catchTime: '',
clockCheckboxItems: [
{name: '第一组', value: 'group1', checked: true},
{name: '第二组', value: 'group2'},
{name: '第三组', value: 'group3'},
{name: '第四组', value: 'group4'}
],
weekCheckboxItems: [
{name: '周一', value: '1', checked: true},
{name: '周二', value: '2'},
{name: '周三', value: '3'},
{name: '周四', value: '4'},
{name: '周五', value: '5'},
{name: '周六', value: '6'},
{name: '周日', value: '7'}
],
times: [],
group1: [8,0],
group2: [12,0],
group3: [18,0],
group4: [22,0],
group5: [10,0],
chooseTimes: [0,0],
chooseType: null,
timePickerShow: false,
infoModalHidden: true,
infoModalText: '',
sn: '',
vehicleid: '',
batteryLevel: '',
switchHidden: true,
switchChecked: true,
snTypeHidden: true //汇通设备隐藏
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {console.log(options.vehicleid)
var that = this;
that.setData({
sn: options.sn,
vehicleid: options.vehicleid,
snTypeHidden: options.isFreq == 2 ? true: false,
batteryLevel: options.freqPower
});
WXRequest.get('adjFreq/getDeviceAdjFreq',{
sn: that.data.sn,
vehicleid: that.data.vehicleid,
isFreq: options.isFreq
}).then((res)=>{
if(res.returnCode == '0'){
const data = res.data;
if(data){
if(data.freqType === 0){
that.setData({
modeType: 'catch',
catchTime: data.catchingTimer,
batteryLevel: that.data.batteryLevel,
switchHidden: false
});
}else if(data.freqType === 1){
let cloneItems = [].concat(that.data.clockCheckboxItems);
data.timer.split(',').forEach((item, idx)=>{
let groupIdx = idx+1;
let h = item.split(':')[0];
let m = item.split(':')[1];
let mIdx = 0;
if(m === '00'){
mIdx = 0;
}else if(m === '15'){
mIdx = 1;
}else if(m === '30'){
mIdx = 2;
}else if(m === '45'){
mIdx = 3;
}
that.setData({
['group'+groupIdx]: [parseInt(h), mIdx]
});
cloneItems[idx].checked = true;
});
that.setData({
modeType: 'clock',
batteryLevel: that.data.batteryLevel,
switchHidden: false,
clockCheckboxItems: cloneItems
});
}else if(data.freqType === 2){
let cloneItems = [].concat(that.data.weekCheckboxItems);
data.week.split('').forEach((item, idx)=>{
cloneItems[item-1].checked = true;
});
let h = data.weekTimer.split(':')[0];
let m = data.weekTimer.split(':')[1];
let mIdx = 0;
if(m === '00'){
mIdx = 0;
}else if(m === '15'){
mIdx = 1;
}else if(m === '30'){
mIdx = 2;
}else if(m === '45'){
mIdx = 3;
}
that.setData({
modeType: 'week',
batteryLevel: that.data.batteryLevel,
switchHidden: false,
group5: [parseInt(h), mIdx],
weekCheckboxItems: cloneItems
});
}
}
}
});
let hourArr = [];
for(let i=0; i<24; i++){
if(i<10){
hourArr.push('0'+i)
}else{
hourArr.push(''+i)
}
}
this.setData({
times: [
hourArr,
['00','15','30','45']
]
})
},
modeChange(e){
var type = e.currentTarget.dataset.type;
this.setData({
modeType: type
});
},
timePickerChange: function(e) {
const val = e.detail.value
this.setData({
chooseTimes: val,
})
},
checkboxChange: function (e) {
//console.log('checkbox发生change事件,携带value值为:', e.detail.value);
var type = e.target.dataset.type;
if(type === 'clock'){
var checkboxItems = this.data.clockCheckboxItems
}else if(type === 'week'){
var checkboxItems = this.data.weekCheckboxItems
}
var values = e.detail.value;
for (var i = 0, lenI = checkboxItems.length; i < lenI; ++i) {
checkboxItems[i].checked = false;
for (var j = 0, lenJ = values.length; j < lenJ; ++j) {
if(checkboxItems[i].value == values[j]){
checkboxItems[i].checked = true;
break;
}
}
}
if(type === 'clock'){
this.setData({
clockCheckboxItems: checkboxItems
});
}else if(type === 'week'){
this.setData({
weekCheckboxItems: checkboxItems
});
}
},
changeClockTime(e){
var type = e.target.dataset.type;
this.setData({
timePickerShow: true,
chooseType: type,
chooseTimes: this.data[type]
});
},
closeTimePicker(){
this.setData({
timePickerShow: false
})
},
sureTimePicker(){
var _this = this;
_this.setData({
timePickerShow: false
});
setTimeout(function(){
_this.setData({
[_this.data.chooseType]: _this.data.chooseTimes
})
}, 500)
},
alertInfoModal(e){
var type = e.target.dataset.type;
var text = '';
switch(type){
case 'catch':
if(this.data.snTypeHidden){
text = '此款设备为老设备,仅支持1-5分钟内的追车调频';
}else{
text = '适用于收车场景,指定设备每隔几分钟更新定位信息。'
}
break;
case 'clock':
text = '适用于催款环节,增加设备每天的上点频率。防止人车失联。'
break;
case 'week':
text = '适用于日常场景,可按需设置每周的设备回传次数。'
break;
}
this.setData({
infoModalText: text,
infoModalHidden: false
});
},
closeInfoModal(e){
this.setData({
infoModalHidden: true
});
},
catchTimeInput(e){
this.setData({
catchTime: e.detail.value
});
},
getParams(){
var type = this.data.modeType;
var params = {};
if(this.data.snTypeHidden){
let catchTime = this.data.catchTime;
if(!/^\d$/.test(catchTime) || catchTime<1 || catchTime>5){
wx.showModal({
content: '请输入1~5之间的数字',
showCancel: false
});
return false;
}
params.interval = catchTime;
}else{
if(type === 'catch'){
let catchTime = this.data.catchTime;
if(!/^\d{1,3}$/.test(catchTime) || catchTime<1 || catchTime>999){
wx.showModal({
content: '请输入1~999之间的数字',
showCancel: false
});
return false;
}
params.type = '0';
params.catchingTimer = catchTime;
}else if(type === 'clock'){
const checkedItems = this.data.clockCheckboxItems.filter((item)=>item.checked);
if(!checkedItems.length){
wx.showModal({
content: '请至少选择一组模式',
showCancel: false
});
return false;
}
const timeArr = [];
checkedItems.forEach((item)=>{
const group = this.data[item.value];
const times = this.data.times;
timeArr.push(times[0][group[0]]+':'+times[1][group[1]]);
});
params.type = '1';
params.timer = timeArr.join(',');
}else if(type === 'week'){
const checkedItems = this.data.weekCheckboxItems.filter((item)=>item.checked);
if(!checkedItems.length){
wx.showModal({
content: '请至少选择一组模式',
showCancel: false
});
return false;
}
const timeArr = [];
checkedItems.forEach((item)=>{
timeArr.push(item.value);
});
params.type = '2';
params.week = timeArr.join('');
params.weekTimer = this.data.times[0][this.data.group5[0]]+':'+this.data.times[1][this.data.group5[1]]
}
params.batteryLevel = this.data.batteryLevel;
}
return params;
},
sure(){
var that = this;
var params = that.getParams();
if(!params) return;
if(that.data.snTypeHidden){
params.sn = that.data.sn;
WXRequest.get('adjFreq/workingInterval',params).then((res)=>{
if(res.returnCode == '0'){
wx.showModal({
content: res.message,
showCancel: false
});
}
});
}else{
WXRequest.get('adjFreq/adjFreqInfo',params).then((res)=>{
if(res.returnCode == '0'){
const data = res.data;
const TYPES = [
'追车模式',
'闹钟模式',
'星期模式'
];
wx.showModal({
content: `设备当前电量${that.data.batteryLevel}%,当前设置${TYPES[data.type]}下可工作${parseInt(data.workTime)}小时`,
success(res){
if(res.confirm){
params.buttonType = '1';
params.sn = that.data.sn;
params.vehicleId = that.data.vehicleid;
WXRequest.get('adjFreq/confirAdjFreq',params).then((res)=>{
if(res.returnCode == '0'){
wx.showModal({
content: res.message,
showCancel: false
});
}
});
}
}
});
}
});
}
},
switchChange(e){
if(e.detail.value === false){
this.setData({
switchHidden: true,
switchChecked: false
});
var params = {};
params.type = '1';
params.timer = '10:00';
params.buttonType = '2';
params.sn = this.data.sn;
params.vehicleId = this.data.vehicleid;
params.batteryLevel = this.data.batteryLevel;
WXRequest.get('adjFreq/confirAdjFreq', params).then((res)=>{
if(res.returnCode == '0'){
wx.showModal({
content: res.message,
showCancel: false
});
}else{
this.setData({
switchHidden: false,
switchChecked: true
});
}
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"navigationBarTitleText": "设备调频"
}
\ No newline at end of file
<view>
<label class="switch-label" hidden="{{switchHidden}}"><switch checked="{{switchChecked}}" color="#37c060" bindchange="switchChange"/>{{switchChecked?'开启':'关闭'}}</label>
<!-- 追车模式 -->
<view class="mode-title">
<label bindtap="modeChange" data-type="catch">
<image class="radio" src="../../images/radio-lg.png" hidden="{{modeType=='catch'}}"></image>
<image class="radio" src="../../images/radio-lg-checked.png" hidden="{{modeType!='catch'}}"></image>
追车模式
</label><image class="info" src="../../images/info.png" bindtap="alertInfoModal" data-type="catch"></image>
</view>
<view class="catch-mode mode-box">
<label><input type="number" placeholder="{{snTypeHidden?'1~5':'1~999'}}" maxlength="3" value="{{catchTime}}" bindinput="catchTimeInput"/>分钟</label>
</view>
<view class="{{snTypeHidden?'fade-hide':''}}">
<!-- 闹钟模式 -->
<view class="mode-title" >
<label bindtap="modeChange" data-type="clock">
<image class="radio" src="../../images/radio-lg.png" hidden="{{modeType=='clock'}}"></image>
<image class="radio" src="../../images/radio-lg-checked.png" hidden="{{modeType!='clock'}}"></image>
闹钟模式
</label><image class="info" src="../../images/info.png" bindtap="alertInfoModal" data-type="clock"></image>
</view>
<view class="clock-mode mode-box">
<checkbox-group class="checkbox-group" bindchange="checkboxChange" data-type="clock">
<label class="weui-cell weui-check__label" wx:for="{{clockCheckboxItems}}" wx:key="value">
<checkbox class="weui-check" value="{{item.value}}" checked="{{item.checked}}"/>
<view class="weui-cell__hd weui-check__hd_in-checkbox">
<image class="checkbox" src="../../images/checkbox-checked.png" wx:if="{{item.checked}}"></image>
<image class="checkbox" src="../../images/checkbox.png" wx:if="{{!item.checked}}"></image>
</view>
<view class="weui-cell__bd">{{item.name}}</view>
</label>
</checkbox-group>
<view class="input-group">
<view class="weui-cell">
<view class="time-text" data-type="group1" bindtap="changeClockTime">{{times[0][group1[0]]}}:{{times[1][group1[1]]}}</view>
<image src="../../images/clock.png" class="clock-icon"></image>
</view>
<view class="weui-cell">
<view class="time-text" data-type="group2" bindtap="changeClockTime">{{times[0][group2[0]]}}:{{times[1][group2[1]]}}</view>
<image src="../../images/clock.png" class="clock-icon"></image>
</view>
<view class="weui-cell">
<view class="time-text" data-type="group3" bindtap="changeClockTime">{{times[0][group3[0]]}}:{{times[1][group3[1]]}}</view>
<image src="../../images/clock.png" class="clock-icon"></image>
</view>
<view class="weui-cell">
<view class="time-text" data-type="group4" bindtap="changeClockTime">{{times[0][group4[0]]}}:{{times[1][group4[1]]}}</view>
<image src="../../images/clock.png" class="clock-icon"></image>
</view>
</view>
</view>
<!-- 星期模式 -->
<view class="mode-title">
<label bindtap="modeChange" data-type="week">
<image class="radio" src="../../images/radio-lg.png" hidden="{{modeType=='week'}}"></image>
<image class="radio" src="../../images/radio-lg-checked.png" hidden="{{modeType!='week'}}"></image>
星期模式
</label><image class="info" src="../../images/info.png" bindtap="alertInfoModal" data-type="week"></image>
</view>
<view class="week-mode mode-box">
<view class="weui-cell">
<label>上点时间<view class="time-text" data-type="group5" bindtap="changeClockTime">{{times[0][group5[0]]}}:{{times[1][group5[1]]}}</view></label>
<image src="../../images/clock.png" class="clock-icon"></image>
</view>
<checkbox-group bindchange="checkboxChange" data-type="week">
<label class="weui-cell weui-check__label" wx:for="{{weekCheckboxItems}}" wx:key="value">
<checkbox class="weui-check" value="{{item.value}}" checked="{{item.checked}}"/>
<view class="weui-cell__hd weui-check__hd_in-checkbox">
<image class="checkbox" src="../../images/checkbox-checked.png" wx:if="{{item.checked}}"></image>
<image class="checkbox" src="../../images/checkbox.png" wx:if="{{!item.checked}}"></image>
</view>
<view class="weui-cell__bd">{{item.name}}</view>
</label>
</checkbox-group>
</view>
</view>
<view class="footer">
<button type="primary" bindtap="sure">确定</button>
</view>
<view class="time-picker-wrap {{timePickerShow?'':'hidden'}}">
<view class="time-picker-main">
<view class="time-picker-controls">
<button type="default" size="mini" plain="true" bindtap="closeTimePicker"> 取消 </button>
<button type="primary" size="mini" plain="true" bindtap="sureTimePicker"> 确定 </button>
</view>
<picker-view indicator-style="height: 50px;" indicator-class="time-picker-indicator" style="width: 100%; height: 300px;" value="{{chooseTimes}}" bindchange="timePickerChange">
<picker-view-column>
<view wx:for="{{times[0]}}" wx:key="{{item}}" style="line-height: 50px">{{item}}</view>
</picker-view-column>
<picker-view-column>
<view wx:for="{{times[1]}}" wx:key="{{item}}" style="line-height: 50px">{{item}}</view>
</picker-view-column>
</picker-view>
</view>
</view>
<view class="info-modal" hidden="{{infoModalHidden}}" bindtap="closeInfoModal">
<view class="info-text">{{infoModalText}}</view>
</view>
</view>
.checkbox{
width: 38rpx;
height: 38rpx;
vertical-align: middle;
}
.mode-box{
background-color: #fff;
margin: 10px;
border-radius: 6px;
padding: 10px 15px;
overflow: hidden;
}
.mode-title{
margin: 10px 15px;
}
.mode-title .radio{
width: 42rpx;
height: 42rpx;
vertical-align: middle;
}
.info{
width: 34rpx;
height: 34rpx;
vertical-align: middle;
}
.catch-mode{
padding-left: 30px;
}
.catch-mode input{
display: inline-block;
vertical-align: middle;
width: 80px;
height: 30px;
line-height: 30px;
border:1px solid #ececec;
border-radius:4px;
background-color:#efefef;
padding-left: 10px;
margin-right: 5px;
}
.clock-mode{
display: flex;
flex-direction: row;
padding-top: 0px;
padding-bottom: 0px;
}
.clock-mode .input-group{
flex: 1;
}
.time-text{
display: inline-block;
width: 80px;
height: 30px;
line-height: 30px;
border:1px solid #ececec;
border-radius:4px;
background-color:#efefef;
text-indent: 10px;
}
.weui-cell:before{
display: none;
}
.time-picker{
border:1px solid #ececec;
border-radius:4px;
background-color:#efefef;
width:80px;
text-indent:10px;
height:30px;
line-height:30px;
}
.clock-mode .checkbox-group .weui-cell{
padding: 13px 5px 14px 15px;
}
.clock-icon{
width: 46rpx;
height: 46rpx;
margin-left: 15px;
}
.time-picker-wrap{
position: fixed;
width: 100%;
height: 100%;
bottom: 0;
left: 0;
z-index: 1000;
background-color: rgba(0,0,0,0.3);
animation: pickershow 1s;
-webkit-animation: pickershow .5s; /* Safari 和 Chrome */
}
.time-picker-main{
position: absolute;
width: 100%;
background-color: #fff;
bottom: 0;
left: 0;
}
.time-picker-wrap.hidden{
background-color: transparent;
}
.time-picker-wrap.hidden{
bottom: -100%;
animation: pickerhide 1s;
-webkit-animation: pickerhide .5s; /* Safari 和 Chrome */
}
.time-picker-wrap picker-view{
display:flex;
justify-content:center;
}
.time-picker-wrap picker-view-column{
width: 100px;
flex: none;
}
.time-picker-wrap picker-view-column view{
text-align: center;
}
.time-picker-controls button{
border: none !important;
font-size: 16px;
}
.time-picker-controls{
border-bottom: 1px solid #eee;
overflow: hidden;
}
.time-picker-controls button:nth-child(1){
float: left;
}
.time-picker-controls button:nth-child(2){
float: right;
}
.time-picker-wrap picker-view-column:nth-child(2):before{
content: ':';
font-size: 18px;
color: #000;
vertical-align: middle;
line-height: 300px;
}
.week-mode{
padding-top: 0px;
}
.week-mode>checkbox-group>label{
float: left;
border: none;
padding: 10px 0px 0px 15px;
}
.week-mode .time-text{
margin-left: 5px;
}
.footer{
margin: 20px 10px 10px;
}
.info-modal{
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
}
.info-modal .info-text{
position: absolute;
top: 50%;
left: 50%;
width: 80%;
padding: 10px;
color: #fff;
border-radius: 6px;
transform: translate(-50%, -50%);
-webkit-transform: translate(-50%, -50%);
background-color: rgba(0,0,0,0.7);
}
.switch-label{
float: right;
margin: -5px 10px;
}
@keyframes pickerhide
{
from {
bottom: 0;
background-color: transparent;
}
to {
bottom: -100%;
}
}
@-webkit-keyframes pickerhide /* Safari 与 Chrome */
{
from {
bottom: 0;
background-color: transparent;
}
to {
bottom: -100%;
}
}
@keyframes pickershow
{
from {
background-color: transparent;
bottom: -100%;
}
90%{
background-color: transparent;
}
to {
bottom: 0;
background-color: rgba(0,0,0,0.3);
}
}
@-webkit-keyframes pickershow /* Safari 与 Chrome */
{
from {
background-color: transparent;
bottom: -100%;
}
90%{
background-color: transparent;
}
to {
bottom: 0;
background-color: rgba(0,0,0,0.3);
}
}
.fade-hide{
position: relative;
}
.fade-hide:after{
content: '';
position: absolute;
background-color: rgba(255,255,255,0.3);
width: 100%;
height: 100%;
top: 0;
left: 0;
}
\ No newline at end of file
const WXRequest = require('../../utils/wxrequest.js');
Page({
/**
* 页面的初始数据
*/
data: {
infoModalHidden: true,
isDisabled: true,
date: '2016-09-01',
time: '08:00',
sqbh: '',
standno: '',
name: '',
deviceList: [],
vehicleid: '',
list: [],
sourceTypes: {
'1': 'APP',
'2': '虎哥E盾',
'3': 'FRMS',
'4': '小程序'
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
const deviceinfo = JSON.parse(options.deviceinfo);
const name = options.name;
const standno = options.standno;
const sqbh = options.sqbh;
const vehicleid= options.vehicleid;
const deviceObj = {}
deviceinfo&&deviceinfo.forEach((deviceItem)=>{
if(!deviceObj[deviceItem.type]){
deviceObj[deviceItem.type] = [];
}
deviceObj[deviceItem.type].push(deviceItem.sn);
});
const deviceList = [];
for(let type in deviceObj){
deviceList.push({
type,
sns: deviceObj[type]
});
}
this.setData({
name,
sqbh,
standno,
deviceList,
vehicleid
});
this.loadList()
},
loadList(){
const that = this;
WXRequest.get('adjFreq/adjFreqDetails',{vehicleId: that.data.vehicleid}).then((res)=>{
that.setData({
list: res.data
})
});
},
redirectDetail(e){
const dataset = e.currentTarget.dataset;
wx.navigateTo({
url: `../../pages/freqLogUserDetail/freqLogUserDetail?id=${dataset.id}&nickname=${dataset.nickname}&avatarurl=${dataset.avatarurl}`
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
}
})
\ No newline at end of file
{
"navigationBarTitleText": "调频记录"
}
\ No newline at end of file
<!--pages/collectCarDetail/collectCarDetail.wxml-->
<view class="cc-box">
<view class="">
<view class="title"><text class="name">{{name}}</text> {{standno}}</view>
<view class="sub-title"><text class="label">申请单号:</text> {{sqbh}}</view>
<view wx:for="{{deviceList}}" class="sub-list">
<text class="label">{{item.type}}:</text>
<view class="sub-item">
<view wx:for="{{item.sns}}">{{item}}</view>
</view>
</view>
</view>
</view>
<view class="cc-box fld-cc-box">
<view class="fld-title">详情</view>
<view>
<view wx:for="{{list}}" wx:key="{{item.id}}" class="weui-cell fld-cell">
<view class="fld-cell-lt">
<view class="freq-time">调频时间:{{item.adjFreqDate}}</view>
<view>调频记录:{{item.adjFreqRecord}}</view>
<view><text>上点个数:{{item.count}}</text><text class="sub">SN:{{item.sn}}</text></view>
</view>
<view class="fld-cell-rt">
<text>来自:{{sourceTypes[item.channel]}}</text>
<view class="fld-center" hidden="{{item.channel!==4 || (item.channel===4&&item.operation)}}" bindtap="redirectDetail" data-avatarurl="{{item.url}}" data-nickname="{{item.nickName}}" data-id="{{item.id}}">
<image class="user-image" src="{{item.url}}" ></image>
</view>
<view class="fld-center" hidden="{{item.channel===4&&!item.operation}}">{{item.operation}}</view>
</view>
</view>
<view hidden="{{list.length}}" class="none">暂无数据</view>
</view>
</view>
/* pages/collectCarDetail/collectCarDetail.wxss */
.cc-box{
background-color: #fff;
border: 1px solid #d9d9d9;
margin: 20rpx;
font-size: 28rpx;
color: #666;
padding: 20rpx;
}
.title{
color: #000;
}
.name{
margin-right: 20rpx;
}
.label{
margin-right: 20rpx;
float: left;
}
.sub-list{
overflow: hidden;
}
.sub-item{
float: left;
}
.sub-title{
overflow: hidden;
}
.info-icon{
width: 34rpx;
height: 34rpx;
position: absolute;
top: 40rpx;
right: 40rpx;
}
.info-modal{
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
}
.info-modal .info-text{
position: absolute;
top: 50%;
left: 50%;
width: 80%;
padding: 10px;
color: #fff;
border-radius: 6px;
transform: translate(-50%, -50%);
-webkit-transform: translate(-50%, -50%);
background-color: rgba(0,0,0,0.7);
}
.radio{
width: 42rpx;
height: 42rpx;
vertical-align: middle;
}
.form-item{
margin-bottom: 40rpx;
}
.form-item:last-child{
margin-bottom: 0rpx;
}
.label-item{
flex: 0 0 160rpx;
color: #333;
display: flex;
align-items:center;
}
.enabled-time{
color: #37c060;
}
.disabled-time{
color: #999;
}
.user-image{
width: 80rpx;
height: 80rpx;
border: 1px solid #eee;
border-radius: 40rpx;
}
.fld-cc-box{
padding: 0;
}
.fld-cell{
-webkit-box-align: stretch;
-webkit-align-items: stretch;
align-items: stretch;
}
.fld-cell-rt{
flex: 0 0 180rpx;
font-size: 24rpx;
text-align: center;
border-left: 1px solid #f2f2f2;
display:-webkit-box;
display:-webkit-flex;
display:flex;
flex-direction: column;
}
.fld-cell-lt{
flex: 1;
}
.fld-title{
font-size: 30rpx;
color: #333;
padding: 30rpx 30rpx 0 30rpx;
}
.fld-center{
flex: 1;
align-self: center;
display:-webkit-box;
display:-webkit-flex;
display:flex;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
}
.freq-time{
color: #333;
}
.sub{
margin-left: 30rpx;
}
.none{
text-align: center;
color: #ccc;
margin-bottom: 10px;
}
\ No newline at end of file
const WXRequest = require('../../utils/wxrequest.js');
Page({
data: {
inputVal: '',
searchTypes: [{
label: '申请单号',
value: '4'
},{
label: '车架号',
value: '1'
},{
label: '设备号',
value: '3'
},{
label: '姓名',
value: '2'
}],
placeholders: [
'请输入完整的申请单号',
'请输入车架号后六位',
'请输入设备SN',
'请输入客户姓名'
],
searchTypesIndex: 0,
list: [],
scrollTop: 0,
scrollHeight: 300,
page: 1,
maxPage: 0,
ing: false,
initSearch: false
},
onLoad() {
var that = this;
wx.getSystemInfo({
success: function(res) {
that.setData({
scrollHeight: res.windowHeight-50
})
}
});
that.loadData(true);
},
clearInput: function () {
this.setData({
inputVal: ""
});
},
inputTyping: function (e) {
this.setData({
inputVal: e.detail.value
});
},
searchConfirm(e){
this.setData({
ing: false,
page: 1,
scrollTop: 0
});
this.loadData();
},
loadData(isInit){
var that = this;
if(!isInit && !that.validate()) return;
that.setData({
ing: true
});
let params = {};
if(isInit){
params = {
pageSize: 50,
currentPage: 1
}
that.setData({
page: 5
})
}else{
params = {
queryType: that.data.searchTypes[that.data.searchTypesIndex].value,
params: that.data.inputVal,
pageSize: 10,
currentPage: that.data.page
}
}
WXRequest.get('adjFreq/adjFreqList',params).then((res)=>{
if(!that.data.ing) return;
const _list = res.data;
const maxPage = Math.ceil(res.recordsTotal/10);
if(_list){
_list.forEach((item)=>{
const deviceObj = {}
item.deviceInfo&&item.deviceInfo.forEach((deviceItem)=>{
if(!deviceObj[deviceItem.type]){
deviceObj[deviceItem.type] = [];
}
deviceObj[deviceItem.type].push(deviceItem.sn);
});
item.deviceList = [];
for(let type in deviceObj){
item.deviceList.push({
type,
sns: deviceObj[type]
});
}
});
that.setData({
list: that.data.page===1?_list:that.data.list.concat(_list),
ing: false,
maxPage,
initSearch: true
});
}else{
that.setData({
list: [],
ing: false,
maxPage
});
}
})
},
searchTypeChange(e){
this.setData({
searchTypesIndex: e.detail.value
});
if(!this.data.inputVal) return;
this.setData({
ing: false,
page: 1,
scrollTop: 0
});
this.loadData()
},
bindDownLoad(){
if(this.data.ing) return;
const nextPage = this.data.page+1;
if(nextPage>this.data.maxPage) return;
this.setData({
page: nextPage
});
this.loadData();
},
bindScroll(){
},
validate(){
const type = this.data.searchTypes[this.data.searchTypesIndex].value;
const inputVal = this.data.inputVal;
if(type === '3'){//姓名
if(inputVal.length<2){
wx.showModal({
content: '请输入正确的姓名,至少2位数',
showCancel: false
});
return false;
}
}else if(inputVal.length<6){
wx.showModal({
content: '请输入至少6位数',
showCancel: false
});
return false;
}
return true;
},
redirectDetail(e){
const dataset = e.currentTarget.dataset;
wx.navigateTo({
url: `../../pages/freqLogDetail/freqLogDetail?vehicleid=${dataset.vehicleid}&name=${dataset.name}&standno=${dataset.standno}&deviceinfo=${JSON.stringify(dataset.deviceinfo)}&sqbh=${dataset.sqbh}`
});
}
})
\ No newline at end of file
{
"navigationBarTitleText": "调频记录"
}
\ No newline at end of file
<view class="serach-box">
<view class="weui-search-bar__form">
<view class="weui-search-bar__box search-wrap">
<icon class="weui-icon-search_in-box" type="search" size="14"></icon>
<input
type="text"
class="weui-search-bar__input"
placeholder="{{placeholders[searchTypesIndex]}}"
value="{{inputVal}}"
focus="{{inputShowed}}"
bindinput="inputTyping"
bindconfirm="searchConfirm"/>
<view class="weui-icon-clear" wx:if="{{inputVal.length > 0}}" bindtap="clearInput">
<icon type="clear" size="14"></icon>
</view>
<picker
class="search-picker"
bindchange="searchTypeChange"
value="{{searchTypesIndex}}"
range="{{searchTypes}}"
range-key="label">
<text>{{searchTypes[searchTypesIndex].label}}</text>
<view class="select-dropdown-icon"></view>
</picker>
</view>
</view>
</view>
<view class="result-list" hidden="{{!list.length}}">
<scroll-view
scroll-top="{{scrollTop}}"
scroll-y="true"
style="height:{{scrollHeight}}px;"
bindscrolltolower="bindDownLoad"
bindscroll="bindScroll">
<view class="weui-cell"
wx:for="{{list}}"
wx:key="{{item.vehicleId}}"
bindtap="redirectDetail"
data-standno="{{item.standno||''}}"
data-sns="{{item.sns}}"
data-name="{{item.name||''}}"
data-sqbh="{{item.workOrderNo||''}}"
data-deviceinfo="{{item.deviceInfo}}"
data-vehicleid="{{item.vehicleId}}">
<view class="weui-cell__bd">
<view class="title"><text class="name">{{item.name}}</text> {{item.standno}}</view>
<view class="sub-title"><text class="label">申请单号:</text> {{item.workOrderNo}}</view>
<view wx:for="{{item.deviceList}}" wx:key="{{item.type}}" class="sub-list">
<text class="label">{{item.type}}:</text>
<view class="sub-item">
<view wx:for="{{item.sns}}">{{item}}</view>
</view>
</view>
</view>
<view class="weui-cell__ft weui-cell__ft_in-access" bindtap="redirectDetail"></view>
</view>
<view class="end-tip" hidden="{{page!=maxPage}}">
没有更多数据了~
</view>
</scroll-view>
</view>
<view class="none" hidden="{{!initSearch || list.length}}">
<image src="../../images/none.png"/>
<view>没有搜索到匹配的车辆数据</view>
</view>
.serach-box{
padding: 20rpx;
background-color: #fff;
}
.search-wrap{
position: relative;
padding-right: 120px;
}
.search-wrap input{
}
.search-picker{
position: absolute;
top: 0;
right: 0;
font-size: 28rpx;
}
.search-picker text{
position: absolute;
width: 60px;
right: 20px;
height: 56rpx;
line-height: 56rpx;
padding-left: 10px;
border-left: 1px solid #eee;
}
.select-dropdown-icon{
content: '';
display: inline-block;
border: 5px solid transparent;
border-top-color: #c9c9c9;
position: absolute;
right: 10px;
top: 10px;
}
.search-wrap .weui-icon-clear{
right: 90px;
z-index: 100;
}
.result-list{
background-color: #fff;
color: #666;
font-size: 14px;
}
.result-list .title{
color: #000;
}
.result-list .name{
margin-right: 20rpx;
}
.result-list .label{
margin-right: 20rpx;
float: left;
}
.sub-list{
overflow: hidden;
}
.sub-item{
float: left;
}
.sub-title{
overflow: hidden;
}
.result-list .weui-cell:first-child{
border-top: 1px solid #d9d9d9;
}
.result-list .weui-cell:last-child{
border-bottom: 1px solid #d9d9d9;
}
.none{
padding: 200rpx 0;
text-align: center;
color: #999;
}
.none image{
width: 400rpx;
height: 400rpx;
margin-bottom: 20rpx;
}
.end-tip{
text-align: center;
}
\ No newline at end of file
const WXRequest = require('../../utils/wxrequest.js');
Page({
/**
* 页面的初始数据
*/
data: {
nickname: '',
avatarurl: '',
list: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
const that = this;
that.setData({
nickname: options.nickname,
avatarurl: options.avatarurl
});
WXRequest.get('adjFreq/adjFreqDetailsSharedUser',{
wxId: options.id
}).then((res)=>{
const _list = res.data;
_list.forEach((item)=>{
const deviceObj = {}
item.deviceInfo&&item.deviceInfo.forEach((deviceItem)=>{
if(!deviceObj[deviceItem.type]){
deviceObj[deviceItem.type] = [];
}
deviceObj[deviceItem.type].push(deviceItem.sn);
});
item.deviceList = [];
for(let type in deviceObj){
item.deviceList.push({
type,
sns: deviceObj[type]
});
}
});
that.setData({
list: _list
});
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
}
})
\ No newline at end of file
{
"navigationBarTitleText": "调频记录"
}
\ No newline at end of file
<view class="cc-box cc-box-center">
<image class="user-image" src="{{avatarurl}}" mode="aspectFit"></image>
<text>{{nickname}}</text>
</view>
<view class="cc-box flud-cc-box">
<view class="fld-title">详情</view>
<view class="user-box" wx:for="{{list}}" wx:key="{{item.vehicleId}}">
<view class="info-box">
<view class="title"><text class="name">{{item.name}}</text> {{item.standno}}</view>
<view class="sub-title"><text class="label">申请单号:</text> {{item.workOrderNo}}</view>
<view class="sub-list" wx:for="{{item.deviceList}}" wx:key="{{item.type}}">
<text class="label">{{item.type}}:</text>
<view class="sub-item">
<view wx:for="{{item.sns}}" wx:key="{{item}}">{{item}}</view>
</view>
</view>
</view>
<view>
<view class="weui-cell fld-cell" wx:for="{{item.adjFreqDetails}}">
<view>
<view class="freq-time">调频时间:{{item.adjFreqDate}}</view>
<view>调频记录:{{item.adjFreqRecord}}</view>
<view><text>上点个数:{{item.count}}</text><text class="sub">SN:{{item.sn}}</text></view>
</view>
</view>
</view>
</view>
<view hidden="{{list.length}}" class="none">暂无数据</view>
</view>
\ No newline at end of file
.cc-box{
background-color: #fff;
border: 1px solid #d9d9d9;
margin: 20rpx;
font-size: 28rpx;
color: #666;
padding: 20rpx;
}
.cc-box-center{
display:flex;
align-items:center;
}
.flud-cc-box{
margin-left: 0;
margin-right: 0;
}
.user-image{
width: 80rpx;
height: 80rpx;
border-radius: 40rpx;
border: 1px solid #eee;
margin-right: 20rpx;
}
.fld-title{
margin-bottom: 20rpx;
font-size: 30rpx;
}
.title{
color: #000;
}
.name{
margin-right: 20rpx;
}
.label{
margin-right: 20rpx;
float: left;
}
.sub-list{
overflow: hidden;
}
.sub-item{
float: left;
}
.sub-title{
overflow: hidden;
}
.info-box{
padding:10px 15px;
}
.user-box{
background-color: #f9f9f9;
}
.user-box+.user-box{
margin-top: 30rpx;
}
.sub{
margin-left: 30rpx;
}
.freq-time{
color: #333;
}
.none{
text-align: center;
color: #ccc;
margin-bottom: 10px;
}
\ No newline at end of file
const sliderWidth = 96; // 需要设置slider的宽度,用于计算中间位置
const WXRequest = require('../../utils/wxrequest.js');
const moment = require('./../../utils/moment.min.js');
Page({
data: {
tabs: ["报表统计", "防拆报警", "围栏报警", "离线设备", "低电量"],
activeIndex: 0,
sliderOffset: 0,
sliderLeft: 0,
activeWeekTime: moment().format('YYYY-MM-DD 00:00'),
offlineWeekTime: moment().format('YYYY-MM-DD 00:00'),
deviceCount: '',
vehicleCount: '',
activeToday: '',
onlineRateToday: '',
powerOffAlarm: '',
fenceAlarm: '',
lightAlarm: '',
timeoutId: undefined,
scrollHeight: 0,
scrollTop: 0,
preventAlarmList: [],//防拆报警
preventAlarmListInit: false,
preventAlarmPage: 1,
preventAlarmTotalPage: 1,
fenceAlarmList: [],//围栏报警
fenceAlarmListInit: false,
fenceAlarmPage: 1,
fenceAlarmTotalPage: 1,
offlineList: [],//离线
offlineListInit: false,
offlinePage: 1,
offlineTotalPage: 1,
lowBatteryList: [],//低电量
lowBatteryListInit: false,
lowBatteryPage: 1,
lowBatteryTotalPage: 1,
blankHidden: true
},
onLoad: function () {
var that = this;
wx.getSystemInfo({
success: function(res) {
that.setData({
sliderLeft: (res.windowWidth / that.data.tabs.length - sliderWidth) / 2,
sliderOffset: res.windowWidth / that.data.tabs.length * that.data.activeIndex
});
console.log()
wx.createSelectorQuery().select('#pageTop').boundingClientRect((rect)=>{
that.setData({
scrollHeight: res.windowHeight-rect.height-52-15
})
}).exec();
}
});
that.isLoading = true;
//WXRequest.login().then(()=>{
that.loadData()
//});
//that.loadData()
},
onShow(){
if(this.data.deviceCount === '' && !this.isLoading){
this.loadData()
}
},
loadData(){
var that = this;
const userStatus = wx.getStorageSync('userStatus');
if(userStatus == 0){
that.setData({
blankHidden: true
});
WXRequest.get('home/getDeviceCount').then((res)=>{
if(res.returnCode == '0'){
that.setData({
...res.data
});
that.isLoading = false;
}
});
}else{
that.setData({
blankHidden: false
});
that.isLoading = false;
}
},
tabClick: function (e) {
const id = e.currentTarget.id;
this.setData({
sliderOffset: e.currentTarget.offsetLeft,
activeIndex: id
});
if(id === '1' && !this.data.preventAlarmListInit){
this.loadPreventAlarmList();
this.setData({
preventAlarmListInit: true
});
}else if(id === '2' && !this.data.fenceAlarmListInit){
this.loadFenceAlarmList();
this.setData({
fenceAlarmListInit: true
});
}else if(id === '3' && !this.data.offlineListInit){
this.loadOfflineList();
this.setData({
offlineListInit: true
});
}else if(id === '4' && !this.data.lowBatteryListInit){
this.loadLowBatteryList();
this.setData({
lowBatteryListInit: true
});
}
},
loadPreventAlarmList(){
var that = this;
if(that.data.preventAlarmPage>that.data.preventAlarmTotalPage) return;
WXRequest.get('alarm/getTodayAlarmDevice', {
currentPage: that.data.preventAlarmPage,
pageSize: 5
}).then((res)=>{
that.setData({
preventAlarmTotalPage: Math.ceil(res.recordsTotal/5),
preventAlarmList: that.data.preventAlarmList.concat(res.data)
});
});
},
loadFenceAlarmList(){
var that = this;
if(that.data.fenceAlarmPage>that.data.fenceAlarmTotalPage) return;
WXRequest.get('report/getFenceAlarmList', {
currentPage: that.data.fenceAlarmPage,
pageSize: 5
}).then((res)=>{
that.setData({
fenceAlarmTotalPage: Math.ceil(res.recordsTotal/5),
fenceAlarmList: that.data.fenceAlarmList.concat(res.data)
});
});
},
loadLowBatteryList(){
var that = this;
if(that.data.lowBatteryPage>that.data.lowBatteryTotalPage) return;
WXRequest.get('report/getLowBatteryList', {
currentPage: that.data.lowBatteryPage,
pageSize: 5
}).then((res)=>{
that.setData({
lowBatteryTotalPage: Math.ceil(res.recordsTotal/5),
lowBatteryList: that.data.lowBatteryList.concat(res.data)
});
});
},
loadOfflineList(){
var that = this;
if(that.data.offlinePage>that.data.offlineTotalPage) return;
WXRequest.get('report/getDeviceLineList', {
currentPage: that.data.offlinePage,
pageSize: 5
}).then((res)=>{
that.setData({
offlineTotalPage: Math.ceil(res.recordsTotal/5),
offlineList: that.data.offlineList.concat(res.data)
});
});
},
bindPreventAlarmDownLoad:function(){
this.setData({
preventAlarmPage: this.data.preventAlarmPage+1
})
this.loadPreventAlarmList()
},
bindfenceAlarmDownLoad:function(){
this.setData({
fenceAlarmPage: this.data.fenceAlarmPage+1
})
this.loadFenceAlarmList()
},
bindOfflineDownLoad:function(){
this.setData({
offlinePage: this.data.offlinePage+1
})
this.loadOfflineList()
},
bindLowBatteryDownLoad:function(){
this.setData({
lowBatteryPage: this.data.lowBatteryPage+1
})
this.loadLowBatteryList()
},
redirectToFindcarTap(e){
const dataset = e.currentTarget.dataset;
wx.setStorageSync('carInfo', {
name: dataset.name,
standno: dataset.standno,
sns: dataset.sns,
vehicleid: dataset.vehicleid
});
wx.setStorageSync('initFindCar', true);
wx.switchTab({
url: '../../pages/findCar/findCar'
});
}
});
\ No newline at end of file
{}
\ No newline at end of file
<view class="page_home_top" id="pageTop">
<view class="weui-flex home_group_report_main">
<view class="weui-flex__item home_span_3">
<image src="../../images/home-icon-1.png" background-size="contain"></image>
<view class="num">{{deviceCount}}</view>
<view class="title">设备总数</view>
</view>
<view class="weui-flex__item home_span_3">
<image src="../../images/home-icon-2.png" background-size="contain"></image>
<view class="num">{{vehicleCount}}</view>
<view class="title">车辆总数</view>
</view>
<view class="weui-flex__item home_span_3">
<image src="../../images/home-icon-3.png" background-size="contain"></image>
<view class="num">{{activeToday}}</view>
<view class="title">今日激活</view>
</view>
</view>
<view class="weui-flex home_group_report">
<view class="weui-flex__item">
<view class="num">{{powerOffAlarm}}</view>
<view>断电报警</view>
</view>
<view class="weui-flex__item">
<view class="num">{{fenceAlarm}}</view>
<view>围栏报警</view>
</view>
<view class="weui-flex__item">
<view class="num">{{lightAlarm}}</view>
<view>光感报警</view>
</view>
<view class="weui-flex__item">
<view class="num">{{onlineRateToday}}%</view>
<view>在线率</view>
</view>
</view>
</view>
<view class="page_home_content">
<view class="weui-tab">
<view class="weui-navbar">
<block wx:for="{{tabs}}" wx:key="*this">
<view id="{{index}}" class="weui-navbar__item {{activeIndex == index ? 'weui-bar__item_on' : ''}}" bindtap="tabClick">
<view class="weui-navbar__title">{{item}}</view>
</view>
</block>
</view>
<view class="weui-tab__panel">
<view class="weui-tab__content" hidden="{{activeIndex != 0}}">
<view class="panel_content panel_content_report">
<navigator url="../../pages/deviceActiveChart/deviceActiveChart" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/home-device-online.png"/>
</view>
<view class="weui-cell__bd weui-cell_primary">
<view>设备激活周统计</view>
<view class="time">时间:<text>{{activeWeekTime}}</text></view>
</view>
<view class="weui-cell__ft weui-cell__ft_in-access"></view>
</navigator>
<!-- <navigator url="../../pages/deviceOffChart/deviceOffChart" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/home-device-offline.png"/>
</view>
<view class="weui-cell__bd weui-cell_primary">
<view>设备离线率周统计</view>
<view class="time">时间:<text>{{offlineWeekTime}}</text></view>
</view>
<view class="weui-cell__ft weui-cell__ft_in-access"></view>
</navigator> -->
</view>
</view>
<!-- 防拆报警 -->
<view class="weui-tab__content" hidden="{{activeIndex != 1}}">
<view class="panel_content panel_content_defend">
<view hidden="{{preventAlarmList.length}}" class="list-none-tip">暂无数据</view>
<scroll-view scroll-top="{{scrollTop}}" scroll-y="true" style="height:{{scrollHeight}}px;"
class="list" bindscrolltolower="bindPreventAlarmDownLoad">
<view class="main-box" wx:for="{{preventAlarmList}}" >
<view class="weui-cell box">
<view class="weui-cell__bd">
<view>{{item.name}}:{{item.standno}}</view>
<view class="sn">设备号: {{item.sn}}</view>
<view class="time">时间: {{item.beginTime}}</view>
</view>
<!-- <view>
<button class="weui-btn focused" type="primary" size="mini" disabled="true">已关注</button>
</view> -->
<image src="../../images/home-icon-poweroff.png" hidden="{{item.alarmType!=='1'}}"/>
<image src="../../images/home-icon-lamp.png" hidden="{{item.alarmType!=='99'}}"/>
</view>
<view class="weui-cell weui-cell_access weui-cell_link"
bindtap="redirectToFindcarTap" data-sns="{{item.sn}}" data-name="{{item.name}}" data-standno="{{item.standno}}" data-vehicleid="{{item.vehicleId}}">
<view class="weui-cell__bd detail_link">查看详情</view>
<view class=" weui-cell__ft_in-access"></view>
</view>
</view>
</scroll-view>
</view>
</view>
<!-- 防拆报警 END-->
<!-- 围栏报警 -->
<view class="weui-tab__content" hidden="{{activeIndex != 2}}">
<view class="panel_content panel_content_defend">
<view hidden="{{fenceAlarmList.length}}" class="list-none-tip">暂无数据</view>
<scroll-view scroll-top="{{scrollTop}}" scroll-y="true" style="height:{{scrollHeight}}px;"
class="list" bindscrolltolower="bindfenceAlarmDownLoad">
<view class="main-box" wx:for="{{fenceAlarmList}}">
<view class="weui-cell box">
<view class="weui-cell__bd">
<view>{{item.name}}:{{item.standno}}</view>
<view class="sn">设备号: {{item.sn}}</view>
<view class="time">时间: {{item.timeFlag}}</view>
</view>
</view>
<view class="weui-cell weui-cell_access weui-cell_link"
bindtap="redirectToFindcarTap" data-sns="{{item.sn}}" data-name="{{item.name}}" data-standno="{{item.standno}}" data-vehicleid="{{item.vehicleId}}">
<view class="weui-cell__bd detail_link">查看详情</view>
<view class=" weui-cell__ft_in-access"></view>
</view>
</view>
</scroll-view>
</view>
</view>
<!-- 围栏报警 END-->
<!-- 离线设备 -->
<view class="weui-tab__content" hidden="{{activeIndex != 3}}">
<view class="panel_content panel_content_defend">
<view hidden="{{offlineList.length}}" class="list-none-tip">暂无数据</view>
<scroll-view scroll-top="{{scrollTop}}" scroll-y="true" style="height:{{scrollHeight}}px;"
class="list" bindscrolltolower="bindOfflineDownLoad">
<view class="main-box" wx:for="{{offlineList}}">
<view class="weui-cell box">
<view class="weui-cell__bd">
<view>{{item.name}}:{{item.standno}}</view>
<view class="sn">设备号: {{item.sn}}</view>
<view class="time">时间: {{item.timeFlag}}</view>
</view>
</view>
<view class="weui-cell weui-cell_access weui-cell_link"
bindtap="redirectToFindcarTap" data-sns="{{item.sn}}" data-name="{{item.name}}" data-standno="{{item.standno}}" data-vehicleid="{{item.vehicleId}}">
<view class="weui-cell__bd detail_link">查看详情</view>
<view class=" weui-cell__ft_in-access"></view>
</view>
</view>
</scroll-view>
</view>
</view>
<!-- 离线设备 END-->
<!-- 低电量 -->
<view class="weui-tab__content" hidden="{{activeIndex != 4}}">
<view class="panel_content panel_content_defend">
<view hidden="{{lowBatteryList.length}}" class="list-none-tip">暂无数据</view>
<scroll-view scroll-top="{{scrollTop}}" scroll-y="true" style="height:{{scrollHeight}}px;"
class="list" bindscrolltolower="bindLowBatteryDownLoad">
<view class="main-box" wx:for="{{lowBatteryList}}">
<view class="weui-cell box">
<view class="weui-cell__bd">
<view>{{item.name}}:{{item.standno}}</view>
<view class="sn">设备号: {{item.sn}}</view>
<view class="time">时间: {{item.timeFlag}}</view>
</view>
</view>
<view class="weui-cell weui-cell_access weui-cell_link"
bindtap="redirectToFindcarTap" data-sns="{{item.sn}}" data-name="{{item.name}}" data-standno="{{item.standno}}" data-vehicleid="{{item.vehicleId}}">
<view class="weui-cell__bd detail_link">查看详情</view>
<view class=" weui-cell__ft_in-access"></view>
</view>
</view>
</scroll-view>
</view>
</view>
<!-- 低电量 END-->
</view>
</view>
</view>
<view class="modal" hidden="{{blankHidden}}">抱歉,您无该功能权限</view>
/**index.wxss**/
.userinfo {
display: flex;
flex-direction: column;
align-items: center;
}
.userinfo-avatar {
width: 128rpx;
height: 128rpx;
margin: 20rpx;
border-radius: 50%;
}
.userinfo-nickname {
color: #aaa;
}
.usermotto {
margin-top: 200px;
}
.page_home_top{
background-color: #fff;
}
.home_group_report_main{
padding: 20rpx 0;
}
.home_group_report_main>view{
display: inline-block;
width: 100%;
height: 100%;
text-align: center;
position: relative;
}
.home_group_report_main>view .num{
position:absolute;
top:46rpx;
width:100%;
color:#fff;
font-size:40rpx;
}
.home_group_report_main>view .title{
font-size: 34rpx;
}
.home_group_report_main>view image{
width: 160rpx;
height: 175rpx;
}
.home_group_report{
padding: 20rpx 0;
border-top: 1rpx solid #ddd;
border-bottom: 2rpx solid #ddd;
}
.home_group_report>view{
position: relative;
text-align: center;
font-size: 26rpx;
}
.home_group_report>view:after{
content: '';
position: absolute;
top: 30rpx;
right: 0;
width: 2rpx;
height: 40rpx;
background-color: #e6e6e6;
}
.home_group_report .num{
font-size: 34rpx;
font-weight: bold;
}
.home_group_report>view:last-child:after{
display: none;
}
.page_home_content{
background-color: #fff;
margin-top: 15px;
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
}
.page_home_content .weui-navbar{
border-bottom-color: #ddd;
}
.page_home_content .weui-navbar__item{
color: #666;
}
.page_home_content .weui-bar__item_on{
color: #37c060;
border-bottom: 2rpx solid #37c060;
}
.panel_content_report image{
width: 120rpx;
height: 120rpx;
vertical-align:middle;
margin-right: 30rpx;
}
.panel_content_report .time{
color: #999;
font-size: 28rpx;
}
.panel_content_report .time text{
margin-left: 10rpx;
}
button.focused{
background-color: #f87d10 !important;
color: #fff;
}
.panel_content_defend{
background-color: #efeff4;
}
.panel_content_defend image{
width: 30rpx;
height: 30rpx;
position: absolute;
right: 15px;
bottom: 10px;
}
.panel_content_defend .main-box{
background-color: #fff;
margin-top: 10rpx;
}
.panel_content_defend .main-box:first-child{
margin-top: 0;
}
.panel_content_defend .box{
position: relative;
align-items: stretch;
}
.panel_content_defend .sn, .panel_content_defend .time{
font-size: 28rpx;
color: #666;
}
.detail_link{
color: #259bff;
}
.list-none-tip{
text-align: center;
color: #999;
padding-top: 10px;
}
.modal{
position: fixed;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.5);
left: 0;
top: 0;
z-index: 10000;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
}
\ No newline at end of file
const WXRequest = require('../../utils/wxrequest.js');
Page({
/**
* 页面的初始数据
*/
data: {
modalHidden: true,
userInfoAuth: true
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
if (options.code) {
wx.setStorageSync('publicCode', options.code);
/*wx.showModal({
content: options.code,
showCancel: false
});*/
}
if(options.carShareInfo){
wx.setStorageSync('carShareInfo', JSON.parse(decodeURIComponent(options.carShareInfo)));
wx.setStorageSync('loginUserId', options.loginUserId);
}else{
wx.setStorageSync('carShareInfo', null)
}
/* wx.showModal({
content: String(options.test),
showCancel: false
});*/
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function (options) {
var that = this;
WXRequest.login().then(()=>{
const userStatus = wx.getStorageSync("userStatus");
const scene = wx.getStorageSync('scene');
if(scene == '1007' || scene =='1008' || scene == '1044' ){//转发场景
if(userStatus === 2){//转发新用户
that.setData({
modalHidden: false,
userInfoAuth: false
});
return;
wx.getSetting({
success(res) {console.log(res)
if (!res.authSetting['scope.userInfo']) {
that.setData({
modalHidden: false,
userInfoAuth: false
});
}else{
wx.switchTab({
url: '../../pages/findCar/findCar'
});
}
}
});
}else if(userStatus === 1){
wx.switchTab({
url: '../../pages/findCar/findCar'
});
}else if(userStatus === 0){
wx.setStorageSync('carShareInfo', null);
wx.switchTab({
url: '../../pages/home/home'
});
}
}else{
if(userStatus === 2){
wx.redirectTo({
url: '../../pages/login/login'
});
}else{
wx.switchTab({
url: '../../pages/home/home'
});
/*wx.redirectTo({
url: '../../pages/collectCarDetail/collectCarDetail'
});*/
}
}
})
/*setTimeout(()=>{
wx.switchTab({
url: '../../pages/findCar/findCar'
});
},5000)*/
/*console.log(wx.getStorageSync('scene'))
if(wx.getStorageSync('scene') == '1044'){
wx.switchTab({
url: '../../pages/mine/mine'
});
}else{
wx.switchTab({
url: '../../pages/findCar/findCar'
});
}*/
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
onGotUserInfo(e) {
if(e.detail.errMsg === 'getUserInfo:ok'){
this.setData({
modalHidden: true,
userInfoAuth: true
});
wx.login({
success: res => {
wx.request({
url: `${WXRequest.domain}loginWxUser`,
data: {
...e.detail.userInfo,
code: res.code
},
success: function(res) {
const data = res.data;
if(res.statusCode === 200){
const data = res.data;
if(data.returnCode === '0'){
wx.setStorageSync("sessionid", res.header["Set-Cookie"]);
wx.setStorageSync("userStatus", 1);
wx.setStorageSync("userinfo", data.data);
wx.switchTab({
url: '../../pages/findCar/findCar'
});
}else{
wx.showModal({
content: data.message,
showCancel: false
});
}
}else if(res.statusCode === 401){
wx.redirectTo({
url: '../../pages/login/login'
});
}
},
fail(){
console.log('fail')
}
});
}
});
}
wx.setStorageSync('wxUserInfo', e.detail.userInfo)
console.log(e.detail.userInfo)
console.log(e.detail.rawData)
}
})
\ No newline at end of file
{}
\ No newline at end of file
<view class="loading-wrap">
<image src="../../images/loading.gif" class="loading-img"></image>
<view class="loading-text">加载中...</view>
</view>
<view hidden="{{modalHidden}}">
<view class="weui-mask"></view>
<view class="weui-dialog">
<view class="weui-dialog__bd">
<view>使用虎哥e盾小程序</view>
<view>请点击按钮允许获取个人信息</view>
</view>
<view class="weui-dialog__ft">
<button open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="onGotUserInfo" class="weui-dialog__btn weui-dialog__btn_primary">允许获取个人信息</button>
</view>
</view>
</view>
\ No newline at end of file
/* pages/loading/loading.wxss */
page{
background: #fff;
text-align: center;
}
.loading-img{
width: 200rpx;
height: 200rpx;
margin-top: 100rpx;
}
const WXRequest = require('../../utils/wxrequest.js');
Page({
/**
* 页面的初始数据
*/
data: {
username: '',
password: '',
handleDone: true
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
formSubmit(e){console.log(e)
var that = this;
if(!that.data.handleDone) return;
if(!that.data.username){
wx.showModal({
content: '请输入账号',
showCancel: false
});
return;
}
if(!that.data.password){
wx.showModal({
content: '请输入密码',
showCancel: false
});
return;
}
that.setData({
handleDone: false
});
WXRequest.login({
username: that.data.username,
password: that.data.password
}).then(()=>{
wx.switchTab({
url: '../../pages/home/home'
});
}).catch(()=>{
that.setData({
handleDone: true
});
})
},
usernameChange(e){
this.setData({
username: e.detail.value
});
},
passwordChange(e){
this.setData({
password: e.detail.value
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{}
\ No newline at end of file
<view class="login">
<view class="logo"><image src="../../images/logo.png" /></view>
<form bindsubmit="formSubmit">
<label>
<image class="username-icon" src="../../images/username.png" />
<input type="text" name="username" bindinput="usernameChange" placeholder="请输入账号" />
</label>
<label>
<image class="password-icon" src="../../images/password.png" />
<input type="password" name="password" bindinput="passwordChange" placeholder="请输入密码" />
</label>
<button formType="submit" bindtap="formSubmit" type="primary" class="submit-btn">登录<view class="weui-loading" hidden="{{handleDone}}"></view></button>
</form>
</view>
page{
background-color: #fff;
}
.logo{
text-align: center;
margin: 100rpx 0;
}
.logo image{
width: 486rpx;
height: 154rpx;
}
form{
display: block;
margin: 0 30rpx;
}
label{
display: block;
border-bottom: 1px solid #ececec;
padding: 10rpx 0;
margin: 20rpx 0;
}
input{
display: inline-block;
vertical-align: middle;
width: 200px;
}
.username-icon, .password-icon{
width: 42rpx;
height: 42rpx;
margin-right: 20rpx;
vertical-align: middle;
}
button.submit-btn{
margin-top: 40rpx;
background-color: #37c060;
}
\ No newline at end of file
//logs.js
const util = require('../../utils/util.js')
Page({
data: {
logs: []
},
onLoad: function () {
this.setData({
logs: (wx.getStorageSync('logs') || []).map(log => {
return util.formatTime(new Date(log))
})
})
}
})
{
"navigationBarTitleText": "查看启动日志"
}
\ No newline at end of file
<!--logs.wxml-->
<view class="container log-list">
<block wx:for="{{logs}}" wx:for-item="log">
<text class="log-item">{{index + 1}}. {{log}}</text>
</block>
</view>
.log-list {
display: flex;
flex-direction: column;
padding: 40rpx;
}
.log-item {
margin: 10rpx;
}
var amapFile = require('../../utils/amap-wx.js');
Page({
data: {
key: 'a73a63f8fb5ae0c9fe7d6303624c2e8c',
show: false,
currentLo: null,
currentLa: null,
newCurrentLo: null,
newCurrentLa: null,
distance: 0,
duration: 0,
markers: null,
scale: 16,
polyline: null,
statusType: 'car',
includePoints: []
},
onLoad() {
var _this = this;
wx.getLocation({
success(res) {
_this.setData({
currentLo: res.longitude,
currentLa: res.latitude,
includePoints: [{
longitude: res.longitude,
latitude: res.latitude
}],
markers: [{
id: 0,
longitude: res.longitude,
latitude: res.latitude,
title: res.address,
iconPath: '../../src/images/navi_s.png',
width: 32,
height: 32
}]
});
}
})
},
getAddress(e) {
var _this = this;
wx.chooseLocation({
success(res) {
var markers = _this.data.markers;
markers.push({
id: 0,
longitude: res.longitude,
latitude: res.latitude,
title: res.address,
iconPath: '../../src/images/navi_e.png',
width: 32,
height: 32
});
var points = _this.data.includePoints;
points.push({
longitude: res.longitude,
latitude: res.latitude
});
_this.setData({
newCurrentLo: res.longitude,
newCurrentLa: res.latitude,
includePoints: points,
markers: markers,
show: true
});
_this.getPolyline(_this.data.statusType);
}
});
},
drawPolyline(self, color) {
return {
origin: this.data.currentLo + ',' + this.data.currentLa,
destination: this.data.newCurrentLo + ',' + this.data.newCurrentLa,
success(data) {
var points = [];
if (data.paths && data.paths[0] && data.paths[0].steps) {
var steps = data.paths[0].steps;
for (var i = 0; i < steps.length; i++) {
var poLen = steps[i].polyline.split(';');
for (var j = 0; j < poLen.length; j++) {
points.push({
longitude: parseFloat(poLen[j].split(',')[0]),
latitude: parseFloat(poLen[j].split(',')[1])
})
}
}
}
self.setData({
distance: data.paths[0].distance,
duration: parseInt(data.paths[0].duration / 60),
polyline: [{
points: points,
color: color,
width: 6,
arrowLine: true
}]
});
}
}
},
getPolyline(_type) {
var amap = new amapFile.AMapWX({ key: this.data.key });
var self = this;
switch (_type) {
case 'car':
amap.getDrivingRoute(this.drawPolyline(this, "#0091ff"));
break;
case 'walk':
amap.getWalkingRoute(this.drawPolyline(this, "#1afa29"));
break;
case 'ride':
amap.getRidingRoute(this.drawPolyline(this, "#1296db"));
break;
default:
return false;
}
},
goTo(e) {
var _type = e.currentTarget.dataset.type;
this.setData({ statusType: _type });
this.getPolyline(_type);
}
})
\ No newline at end of file
{
"tabBar": {
"list": []
}
}
\ No newline at end of file
<view class="tui-map">
<map id="map" longitude="{{currentLo}}" latitude="{{currentLa}}" scale="{{scale}}" markers="{{markers}}" polyline="{{polyline}}" include-points="{{includePoints}}" show-location style="width: 100%; height: 100%;"></map>
</view>
<view class="tui-map-search" bindtap="getAddress">
<icon size='20' type='search' class='tui-map-search-icon'></icon>
<input class="tui-map-input" placeholder="搜索" focus="{{focusStatus}}"></input>
</view>
<view class="tui-search-bottom {{show ? '' : 'tui-hide'}}">
<view class="page-group">
<view class="page-nav-list {{statusType == 'car' ? 'active' : ''}}" data-type="car" bindtap="goTo">驾车</view>
<view class="page-nav-list {{statusType == 'walk' ? 'active' : ''}}" data-type="walk" bindtap="goTo">步行</view>
<view class="page-nav-list {{statusType == 'ride' ? 'active' : ''}}" data-type="ride" bindtap="goTo">骑行</view>
</view>
<view class="tui-warn">
{{distance}}米
</view>
<view class="tui-warn">
{{duration}}分钟
</view>
</view>
.tui-map-search{
width: 100%;
height: 80rpx;
position: fixed;
top: 0;
left: 0;
z-index: 1000000;
box-sizing: border-box;
padding: 5rpx 10px;
background-color: #fff;
line-height: 70rpx;
}
.tui-map-input{
height: 70rpx;
line-height: 70rpx;
font-size: 30rpx;
margin-left: 25px;
}
.tui-map-search-icon{
position: absolute;
top: calc(50% - 10px);
left: 10px;
}
.tui-map{
width: 100%;
height: calc(100% - 80rpx);
position: fixed;
bottom: 0;
left: 0;
}
.tui-map-direction{
width: 32px;
height: 32px;
position: fixed;
right: 10px;
bottom: 80px;
z-index: 100000;
}
.page-group{
display: table;
width: 100%;
table-layout: fixed;
background-color: #fff;
}
.page-nav-list{
padding:20rpx 0 ;
font-size: 30rpx;
display: table-cell;
text-align: center;
width: 100%;
color: #222;
}
.page-nav-list.active{color:blue;}
.tui-warn{
height: 50px;
line-height: 50px;
padding-left: 10px;
color: lightseagreen;
font-size: 30rpx;
}
.tui-search-bottom{
height: 150px;
background: #fff;
width: 100%;
position: fixed;
bottom: 0;
left: 0;
z-index: 1000;
}
\ No newline at end of file
const WXRequest = require('../../utils/wxrequest.js');
Page({
/**
* 页面的初始数据
*/
data: {
username: '',
isLoginUser: true,
userImage: '../../images/userlogo.png',
avatarUrl: '',
logoutHidden: true
},
logout(){
wx.showModal({
content: '确定是否退出登录?',
success: function(res){
if(res.confirm){
wx.login({
success: res => {
WXRequest.get('logoutminipro',{
code: res.code
}).then((res)=>{
if(res.returnCode === '0'){
wx.setStorageSync("sessionid", '');
wx.setStorageSync("userinfo", '');
wx.redirectTo({
url: '../../pages/login/login'
});
}
});
}
});
}
}
});
},
tapUndoList(){
wx.showModal({
content: '正在努力开发中',
showCancel: false
});
},
redirectToCollectCar(){
wx.navigateTo({
url: '../../pages/collectCarSearch/collectCarSearch'
});
},
redirectToFreqLog(){
if(this.data.isLoginUser){
wx.navigateTo({
url: '../../pages/freqLogSearch/freqLogSearch'
});
}else{
wx.navigateTo({
url: `../../pages/freqLogUserDetail/freqLogUserDetail?nickname=${this.data.username}&avatarurl=${this.data.avatarUrl}&id=${wx.getStorageSync("userinfo").id}`
});
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var that = this;
const userStatus = wx.getStorageSync("userStatus");
const userInfo = wx.getStorageSync("userinfo");
if(userStatus === 0){
that.setData({
username: userInfo.username,
isLoginUser: true,
logoutHidden: false
});
}else if(userStatus === 1){
that.setData({
username: userInfo.nickName,
isLoginUser: false,
logoutHidden: true,
avatarUrl: userInfo.avatarUrl
});
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
}
})
\ No newline at end of file
{}
\ No newline at end of file
<view>
<view class="user-info">
<image class="logo" src="../../images/userlogo.png" hidden="{{!isLoginUser}}"/>
<image class="logo" src="{{avatarUrl}}" hidden="{{isLoginUser}}"/>
<text class="user">账号:{{username}}</text>
</view>
<view class="cmd-list">
<view class="weui-cell contact">
<button open-type="contact">
<image src="../../images/cmd-msg.png"/>客服信息
<view class="weui-cell__ft weui-cell__ft_in-access"></view>
</button>
</view>
</view>
<view class="cmd-list">
<view class="weui-cell active" bindtap="redirectToCollectCar">
<image src="../../images/cmd-collectcar.png"/>收车管理
<view class="weui-cell__ft weui-cell__ft_in-access"></view>
</view>
<view class="weui-cell" bindtap="tapUndoList">
<image src="../../images/cmd-search.png"/>风控查询
<view class="weui-cell__ft weui-cell__ft_in-access"></view>
</view>
<view class="weui-cell" bindtap="tapUndoList">
<image src="../../images/cmd-order.png"/>工单管理
<view class="weui-cell__ft weui-cell__ft_in-access"></view>
</view>
<view class="weui-cell" bindtap="tapUndoList">
<image src="../../images/cmd-insur.png"/>保险服务
<view class="weui-cell__ft weui-cell__ft_in-access"></view>
</view>
<view class="weui-cell active" bindtap="redirectToFreqLog">
<image src="../../images/cmd-freqlog.png"/>调频记录
<view class="weui-cell__ft weui-cell__ft_in-access"></view>
</view>
</view>
<view class="cmd-list logout" bindtap="logout" hidden="{{false}}">
退出登录
</view>
</view>
.user-info{
background-color: #fff;
padding: 20rpx 30rpx;
border-bottom: 1px solid #ececec;
}
.logo{
width: 100rpx;
height: 100rpx;
vertical-align: middle;
margin-right: 20rpx;
}
.cmd-list{
background-color: #f2f2f2;
border-top: 1px solid #d9d9d9;
border-bottom: 1px solid #d9d9d9;
margin: 20px 0;
}
.cmd-list image{
width: 30rpx;
height: 30rpx;
margin-right: 20rpx;
vertical-align: middle;
}
.cmd-list .weui-cell{
overflow: hidden;
padding: 10px 0px 10px 15px;
}
.cmd-list .weui-cell.contact{
padding: 0;
background-color: #fff;
}
.cmd-list .weui-cell.active{
background-color: #fff;
}
.cmd-list .weui-cell .inn{
}
.cmd-list .weui-cell__ft_in-access{
position: absolute;
top: 50%;
right: 15px;
}
.cmd-list .contact .weui-cell__ft_in-access{
right: 20px;
}
.cmd-list button{
box-sizing:content-box;
width: 100%;
text-align: left;
margin: -5px;
background-color: #fff;
padding: 10px 20px;
font-size: 16px;
}
.cmd-list button:hover{
background-color: #fff;
}
.logout{
text-align: center;
padding: 10px 0;
background-color: #fff;
}
\ No newline at end of file
const WXRequest = require('../../utils/wxrequest.js');
Page({
/**
* 页面的初始数据
*/
data: {
url: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
const sessionid = /^JSESSIONID=(.+);Path=\/otmini$/g.exec(wx.getStorageSync('sessionid'))[1];
this.setData({
url: `${WXRequest.domain}h5/dist/monitor.html?sn=${options.sn}&sessionid=${sessionid}`
})
}
})
\ No newline at end of file
{
"navigationBarTitleText": "实时监控"
}
\ No newline at end of file
<web-view src="{{url}}"></web-view>
.map-wrap{
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.toggle-bottom{
position: fixed;
width: 100%;
bottom: 0;
left: 0;
}
.list-wrap{
width: 100%;
background-color: #fff;
overflow: visible;
}
.list{
background-color: #fff;
max-height: 360rpx;
overflow-y: scroll;
}
.list-item{
flex-direction: column;
-webkit-align-items: left;
align-items: left;
}
.list-item-title{
font-size: 30rpx;
white-space: wrap-all;
}
.list-item-time{
font-size: 26rpx;
color: #666;
margin-top: 10rpx;
}
.toggle-btn{
width: 60rpx;
height: 60rpx;
position: relative;
top: 0;
left: 50%;
margin-left: -30rpx;
z-index: 1000;
}
.toggle-btn.down{
bottom: 10rpx;
}
.toggle-btn cover-image{
width: 100%;
height: 100%;
}
// pages/replay/replay.js
const WXRequest = require('../../utils/wxrequest.js');
Page({
/**
* 页面的初始数据
*/
data: {
url: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
const sessionid = /^JSESSIONID=(.+);Path=\/otmini$/g.exec(wx.getStorageSync('sessionid'))[1];
this.setData({
url: `${WXRequest.domain}h5/dist/replay.html?sn=${options.sn}&sessionid=${sessionid}`
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{}
\ No newline at end of file
<web-view src="{{url}}"></web-view>
/* pages/replay/replay.wxss */
\ No newline at end of file
const WXRequest = require('../../utils/wxrequest.js');
Page({
/**
* 页面的初始数据
*/
data: {
url: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
const sessionid = /^JSESSIONID=(.+);Path=\/otmini$/g.exec(wx.getStorageSync('sessionid'))[1];
this.setData({
url: `${WXRequest.domain}h5/dist/resident.html?sn=${options.sn}&sessionid=${sessionid}`
})
}
})
\ No newline at end of file
{
"navigationBarTitleText": "常驻地"
}
\ No newline at end of file
<web-view src="{{url}}"></web-view>
\ No newline at end of file
/* pages/resident/resident.wxss */
\ No newline at end of file
// pages/trace/trace.js
const WXRequest = require('../../utils/wxrequest.js');
Page({
/**
* 页面的初始数据
*/
data: {
url: '',
init: false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var that = this;
wx.getLocation({
success: function(res) {
/*that.setData({
url: `${WXRequest.domain}h5/dist/trace.html?originLat=${res.latitude}&originLng=${res.longitude}`
});*/
wx.openLocation({
latitude: Number(options.lat),
longitude: Number(options.lng)
});
},
fail(res){
console.log(res)
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
if(this.data.init){
wx.navigateBack()
}
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
this.setData({
init: true
});
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"navigationBarTitleText": "导航"
}
\ No newline at end of file
<!-- <web-view src="{{url}}"></web-view> -->
/* pages/trace/trace.wxss */
\ No newline at end of file
const WXRequest = require('../../utils/wxrequest.js');
Page({
/**
* 页面的初始数据
*/
data: {
jumpLink: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let domain = WXRequest.domain.split('//')[1]
let url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxcad686d44f4c8c4d&redirect_uri=https%3a%2f%2f${domain}%2fopenid.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect`
this.setData({
jumpLink: url
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<web-view src="{{jumpLink}}" bindmessage="onMessage"></web-view>
/* pages/wxPublicPage/wxPublicPage.wxss */
\ No newline at end of file
{
"description": "项目配置文件。",
"setting": {
"urlCheck": false,
"es6": true,
"postcss": true,
"minified": true,
"newFeature": true,
"coverView": true,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
"useMultiFrameRuntime": false,
"useApiHook": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"useIsolateContext": true,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true
},
"compileType": "miniprogram",
"libVersion": "1.9.91",
"appid": "wxdae8cf8710b62fee",
"projectname": "wx",
"isGameTourist": false,
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
"search": {
"list": []
},
"conversation": {
"list": []
},
"plugin": {
"list": []
},
"game": {
"currentL": -1,
"list": []
},
"miniprogram": {
"list": [
{
"id": 0,
"name": "pages/wxPublicPage/wxPublicPage",
"pathName": "pages/wxPublicPage/wxPublicPage",
"query": "",
"scene": 1043,
"referrerInfo": {}
}
]
}
}
}
\ No newline at end of file
{
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
"rules": [{
"action": "allow",
"page": "*"
}]
}
\ No newline at end of file
function AMapWX(a){this.key=a.key,this.requestConfig={key:a.key,s:"rsx",platform:"WXJS",appname:a.key,sdkversion:"1.2.0",logversion:"2.0"}}AMapWX.prototype.getWxLocation=function(a,b){wx.getLocation({type:"gcj02",success:function(a){var c=a.longitude+","+a.latitude;wx.setStorage({key:"userLocation",data:c}),b(c)},fail:function(c){wx.getStorage({key:"userLocation",success:function(a){a.data&&b(a.data)}}),a.fail({errCode:"0",errMsg:c.errMsg||""})}})},AMapWX.prototype.getRegeo=function(a){function c(c){var d=b.requestConfig;wx.request({url:"https://restapi.amap.com/v3/geocode/regeo",data:{key:b.key,location:c,extensions:"all",s:d.s,platform:d.platform,appname:b.key,sdkversion:d.sdkversion,logversion:d.logversion},method:"GET",header:{"content-type":"application/json"},success:function(b){var d,e,f,g,h,i,j,k,l;b.data.status&&"1"==b.data.status?(d=b.data.regeocode,e=d.addressComponent,f=[],g="",d&&d.roads[0]&&d.roads[0].name&&(g=d.roads[0].name+"附近"),h=c.split(",")[0],i=c.split(",")[1],d.pois&&d.pois[0]&&(g=d.pois[0].name+"附近",j=d.pois[0].location,j&&(h=parseFloat(j.split(",")[0]),i=parseFloat(j.split(",")[1]))),e.provice&&f.push(e.provice),e.city&&f.push(e.city),e.district&&f.push(e.district),e.streetNumber&&e.streetNumber.street&&e.streetNumber.number?(f.push(e.streetNumber.street),f.push(e.streetNumber.number)):(k="",d&&d.roads[0]&&d.roads[0].name&&(k=d.roads[0].name),f.push(k)),f=f.join(""),l=[{iconPath:a.iconPath,width:a.iconWidth,height:a.iconHeight,name:f,desc:g,longitude:h,latitude:i,id:0,regeocodeData:d}],a.success(l)):a.fail({errCode:b.data.infocode,errMsg:b.data.info})},fail:function(b){a.fail({errCode:"0",errMsg:b.errMsg||""})}})}var b=this;a.location?c(a.location):b.getWxLocation(a,function(a){c(a)})},AMapWX.prototype.getWeather=function(a){function d(d){var e="base";a.type&&"forecast"==a.type&&(e="all"),wx.request({url:"https://restapi.amap.com/v3/weather/weatherInfo",data:{key:b.key,city:d,extensions:e,s:c.s,platform:c.platform,appname:b.key,sdkversion:c.sdkversion,logversion:c.logversion},method:"GET",header:{"content-type":"application/json"},success:function(b){function c(a){var b={city:{text:"城市",data:a.city},weather:{text:"天气",data:a.weather},temperature:{text:"温度",data:a.temperature},winddirection:{text:"风向",data:a.winddirection+"风"},windpower:{text:"风力",data:a.windpower+"级"},humidity:{text:"湿度",data:a.humidity+"%"}};return b}var d,e;b.data.status&&"1"==b.data.status?b.data.lives?(d=b.data.lives,d&&d.length>0&&(d=d[0],e=c(d),e["liveData"]=d,a.success(e))):b.data.forecasts&&b.data.forecasts[0]&&a.success({forecast:b.data.forecasts[0]}):a.fail({errCode:b.data.infocode,errMsg:b.data.info})},fail:function(b){a.fail({errCode:"0",errMsg:b.errMsg||""})}})}function e(e){wx.request({url:"https://restapi.amap.com/v3/geocode/regeo",data:{key:b.key,location:e,extensions:"all",s:c.s,platform:c.platform,appname:b.key,sdkversion:c.sdkversion,logversion:c.logversion},method:"GET",header:{"content-type":"application/json"},success:function(b){var c,e;b.data.status&&"1"==b.data.status?(e=b.data.regeocode,e.addressComponent?c=e.addressComponent.adcode:e.aois&&e.aois.length>0&&(c=e.aois[0].adcode),d(c)):a.fail({errCode:b.data.infocode,errMsg:b.data.info})},fail:function(b){a.fail({errCode:"0",errMsg:b.errMsg||""})}})}var b=this,c=b.requestConfig;a.city?d(a.city):b.getWxLocation(a,function(a){e(a)})},AMapWX.prototype.getPoiAround=function(a){function d(d){var e={key:b.key,location:d,s:c.s,platform:c.platform,appname:b.key,sdkversion:c.sdkversion,logversion:c.logversion};a.querytypes&&(e["types"]=a.querytypes),a.querykeywords&&(e["keywords"]=a.querykeywords),wx.request({url:"https://restapi.amap.com/v3/place/around",data:e,method:"GET",header:{"content-type":"application/json"},success:function(b){var c,d,e,f;if(b.data.status&&"1"==b.data.status){if(b=b.data,b&&b.pois){for(c=[],d=0;d<b.pois.length;d++)e=0==d?a.iconPathSelected:a.iconPath,c.push({latitude:parseFloat(b.pois[d].location.split(",")[1]),longitude:parseFloat(b.pois[d].location.split(",")[0]),iconPath:e,width:22,height:32,id:d,name:b.pois[d].name,address:b.pois[d].address});f={markers:c,poisData:b.pois},a.success(f)}}else a.fail({errCode:b.data.infocode,errMsg:b.data.info})},fail:function(b){a.fail({errCode:"0",errMsg:b.errMsg||""})}})}var b=this,c=b.requestConfig;a.location?d(a.location):b.getWxLocation(a,function(a){d(a)})},AMapWX.prototype.getStaticmap=function(a){function f(b){c.push("location="+b),a.zoom&&c.push("zoom="+a.zoom),a.size&&c.push("size="+a.size),a.scale&&c.push("scale="+a.scale),a.markers&&c.push("markers="+a.markers),a.labels&&c.push("labels="+a.labels),a.paths&&c.push("paths="+a.paths),a.traffic&&c.push("traffic="+a.traffic);var e=d+c.join("&");a.success({url:e})}var e,b=this,c=[],d="https://restapi.amap.com/v3/staticmap?";c.push("key="+b.key),e=b.requestConfig,c.push("s="+e.s),c.push("platform="+e.platform),c.push("appname="+e.appname),c.push("sdkversion="+e.sdkversion),c.push("logversion="+e.logversion),a.location?f(a.location):b.getWxLocation(a,function(a){f(a)})},AMapWX.prototype.getInputtips=function(a){var b=this,c=b.requestConfig,d={key:b.key,s:c.s,platform:c.platform,appname:b.key,sdkversion:c.sdkversion,logversion:c.logversion};a.location&&(d["location"]=a.location),a.keywords&&(d["keywords"]=a.keywords),a.type&&(d["type"]=a.type),a.city&&(d["city"]=a.city),a.citylimit&&(d["citylimit"]=a.citylimit),wx.request({url:"https://restapi.amap.com/v3/assistant/inputtips",data:d,method:"GET",header:{"content-type":"application/json"},success:function(b){b&&b.data&&b.data.tips&&a.success({tips:b.data.tips})},fail:function(b){a.fail({errCode:"0",errMsg:b.errMsg||""})}})},AMapWX.prototype.getDrivingRoute=function(a){var b=this,c=b.requestConfig,d={key:b.key,s:c.s,platform:c.platform,appname:b.key,sdkversion:c.sdkversion,logversion:c.logversion};a.origin&&(d["origin"]=a.origin),a.destination&&(d["destination"]=a.destination),a.strategy&&(d["strategy"]=a.strategy),a.waypoints&&(d["waypoints"]=a.waypoints),a.avoidpolygons&&(d["avoidpolygons"]=a.avoidpolygons),a.avoidroad&&(d["avoidroad"]=a.avoidroad),wx.request({url:"https://restapi.amap.com/v3/direction/driving",data:d,method:"GET",header:{"content-type":"application/json"},success:function(b){b&&b.data&&b.data.route&&a.success({paths:b.data.route.paths,taxi_cost:b.data.route.taxi_cost||""})},fail:function(b){a.fail({errCode:"0",errMsg:b.errMsg||""})}})},AMapWX.prototype.getWalkingRoute=function(a){var b=this,c=b.requestConfig,d={key:b.key,s:c.s,platform:c.platform,appname:b.key,sdkversion:c.sdkversion,logversion:c.logversion};a.origin&&(d["origin"]=a.origin),a.destination&&(d["destination"]=a.destination),wx.request({url:"https://restapi.amap.com/v3/direction/walking",data:d,method:"GET",header:{"content-type":"application/json"},success:function(b){b&&b.data&&b.data.route&&a.success({paths:b.data.route.paths})},fail:function(b){a.fail({errCode:"0",errMsg:b.errMsg||""})}})},AMapWX.prototype.getTransitRoute=function(a){var b=this,c=b.requestConfig,d={key:b.key,s:c.s,platform:c.platform,appname:b.key,sdkversion:c.sdkversion,logversion:c.logversion};a.origin&&(d["origin"]=a.origin),a.destination&&(d["destination"]=a.destination),a.strategy&&(d["strategy"]=a.strategy),a.city&&(d["city"]=a.city),a.cityd&&(d["cityd"]=a.cityd),wx.request({url:"https://restapi.amap.com/v3/direction/transit/integrated",data:d,method:"GET",header:{"content-type":"application/json"},success:function(b){if(b&&b.data&&b.data.route){var c=b.data.route;a.success({distance:c.distance||"",taxi_cost:c.taxi_cost||"",transits:c.transits})}},fail:function(b){a.fail({errCode:"0",errMsg:b.errMsg||""})}})},AMapWX.prototype.getRidingRoute=function(a){var b=this,c=b.requestConfig,d={key:b.key,s:c.s,platform:c.platform,appname:b.key,sdkversion:c.sdkversion,logversion:c.logversion};a.origin&&(d["origin"]=a.origin),a.destination&&(d["destination"]=a.destination),wx.request({url:"https://restapi.amap.com/v4/direction/bicycling",data:d,method:"GET",header:{"content-type":"application/json"},success:function(b){b&&b.data&&b.data.data&&a.success({paths:b.data.data.paths})},fail:function(b){a.fail({errCode:"0",errMsg:b.errMsg||""})}})},module.exports.AMapWX=AMapWX;
\ No newline at end of file
//! moment.js
//! version : 2.8.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
(function(a){function b(a,b,c){switch(arguments.length){case 2:return null!=a?a:b;case 3:return null!=a?a:null!=b?b:c;default:throw new Error("Implement me")}}function c(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function d(a){rb.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+a)}function e(a,b){var c=!0;return l(function(){return c&&(d(a),c=!1),b.apply(this,arguments)},b)}function f(a,b){nc[a]||(d(b),nc[a]=!0)}function g(a,b){return function(c){return o(a.call(this,c),b)}}function h(a,b){return function(c){return this.localeData().ordinal(a.call(this,c),b)}}function i(){}function j(a,b){b!==!1&&E(a),m(this,a),this._d=new Date(+a._d)}function k(a){var b=x(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+1e3*j+6e4*i+36e5*h,this._days=+g+7*f,this._months=+e+3*d+12*c,this._data={},this._locale=rb.localeData(),this._bubble()}function l(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return b.hasOwnProperty("toString")&&(a.toString=b.toString),b.hasOwnProperty("valueOf")&&(a.valueOf=b.valueOf),a}function m(a,b){var c,d,e;if("undefined"!=typeof b._isAMomentObject&&(a._isAMomentObject=b._isAMomentObject),"undefined"!=typeof b._i&&(a._i=b._i),"undefined"!=typeof b._f&&(a._f=b._f),"undefined"!=typeof b._l&&(a._l=b._l),"undefined"!=typeof b._strict&&(a._strict=b._strict),"undefined"!=typeof b._tzm&&(a._tzm=b._tzm),"undefined"!=typeof b._isUTC&&(a._isUTC=b._isUTC),"undefined"!=typeof b._offset&&(a._offset=b._offset),"undefined"!=typeof b._pf&&(a._pf=b._pf),"undefined"!=typeof b._locale&&(a._locale=b._locale),Fb.length>0)for(c in Fb)d=Fb[c],e=b[d],"undefined"!=typeof e&&(a[d]=e);return a}function n(a){return 0>a?Math.ceil(a):Math.floor(a)}function o(a,b,c){for(var d=""+Math.abs(a),e=a>=0;d.length<b;)d="0"+d;return(e?c?"+":"":"-")+d}function p(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function q(a,b){var c;return b=J(b,a),a.isBefore(b)?c=p(a,b):(c=p(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c}function r(a,b){return function(c,d){var e,g;return null===d||isNaN(+d)||(f(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period)."),g=c,c=d,d=g),c="string"==typeof c?+c:c,e=rb.duration(c,d),s(this,e,a),this}}function s(a,b,c,d){var e=b._milliseconds,f=b._days,g=b._months;d=null==d?!0:d,e&&a._d.setTime(+a._d+e*c),f&&lb(a,"Date",kb(a,"Date")+f*c),g&&jb(a,kb(a,"Month")+g*c),d&&rb.updateOffset(a,f||g)}function t(a){return"[object Array]"===Object.prototype.toString.call(a)}function u(a){return"[object Date]"===Object.prototype.toString.call(a)||a instanceof Date}function v(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&z(a[d])!==z(b[d]))&&g++;return g+f}function w(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=gc[a]||hc[b]||b}return a}function x(a){var b,c,d={};for(c in a)a.hasOwnProperty(c)&&(b=w(c),b&&(d[b]=a[c]));return d}function y(b){var c,d;if(0===b.indexOf("week"))c=7,d="day";else{if(0!==b.indexOf("month"))return;c=12,d="month"}rb[b]=function(e,f){var g,h,i=rb._locale[b],j=[];if("number"==typeof e&&(f=e,e=a),h=function(a){var b=rb().utc().set(d,a);return i.call(rb._locale,b,e||"")},null!=f)return h(f);for(g=0;c>g;g++)j.push(h(g));return j}}function z(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function A(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function B(a,b,c){return fb(rb([a,11,31+b-c]),b,c).week}function C(a){return D(a)?366:365}function D(a){return a%4===0&&a%100!==0||a%400===0}function E(a){var b;a._a&&-2===a._pf.overflow&&(b=a._a[yb]<0||a._a[yb]>11?yb:a._a[zb]<1||a._a[zb]>A(a._a[xb],a._a[yb])?zb:a._a[Ab]<0||a._a[Ab]>23?Ab:a._a[Bb]<0||a._a[Bb]>59?Bb:a._a[Cb]<0||a._a[Cb]>59?Cb:a._a[Db]<0||a._a[Db]>999?Db:-1,a._pf._overflowDayOfYear&&(xb>b||b>zb)&&(b=zb),a._pf.overflow=b)}function F(a){return null==a._isValid&&(a._isValid=!isNaN(a._d.getTime())&&a._pf.overflow<0&&!a._pf.empty&&!a._pf.invalidMonth&&!a._pf.nullInput&&!a._pf.invalidFormat&&!a._pf.userInvalidated,a._strict&&(a._isValid=a._isValid&&0===a._pf.charsLeftOver&&0===a._pf.unusedTokens.length)),a._isValid}function G(a){return a?a.toLowerCase().replace("_","-"):a}function H(a){for(var b,c,d,e,f=0;f<a.length;){for(e=G(a[f]).split("-"),b=e.length,c=G(a[f+1]),c=c?c.split("-"):null;b>0;){if(d=I(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&v(e,c,!0)>=b-1)break;b--}f++}return null}function I(a){var b=null;if(!Eb[a]&&Gb)try{b=rb.locale(),require("./locale/"+a),rb.locale(b)}catch(c){}return Eb[a]}function J(a,b){return b._isUTC?rb(a).zone(b._offset||0):rb(a).local()}function K(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function L(a){var b,c,d=a.match(Kb);for(b=0,c=d.length;c>b;b++)d[b]=mc[d[b]]?mc[d[b]]:K(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function M(a,b){return a.isValid()?(b=N(b,a.localeData()),ic[b]||(ic[b]=L(b)),ic[b](a)):a.localeData().invalidDate()}function N(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Lb.lastIndex=0;d>=0&&Lb.test(a);)a=a.replace(Lb,c),Lb.lastIndex=0,d-=1;return a}function O(a,b){var c,d=b._strict;switch(a){case"Q":return Wb;case"DDDD":return Yb;case"YYYY":case"GGGG":case"gggg":return d?Zb:Ob;case"Y":case"G":case"g":return _b;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return d?$b:Pb;case"S":if(d)return Wb;case"SS":if(d)return Xb;case"SSS":if(d)return Yb;case"DDD":return Nb;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Rb;case"a":case"A":return b._locale._meridiemParse;case"X":return Ub;case"Z":case"ZZ":return Sb;case"T":return Tb;case"SSSS":return Qb;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return d?Xb:Mb;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Mb;case"Do":return Vb;default:return c=new RegExp(X(W(a.replace("\\","")),"i"))}}function P(a){a=a||"";var b=a.match(Sb)||[],c=b[b.length-1]||[],d=(c+"").match(ec)||["-",0,0],e=+(60*d[1])+z(d[2]);return"+"===d[0]?-e:e}function Q(a,b,c){var d,e=c._a;switch(a){case"Q":null!=b&&(e[yb]=3*(z(b)-1));break;case"M":case"MM":null!=b&&(e[yb]=z(b)-1);break;case"MMM":case"MMMM":d=c._locale.monthsParse(b),null!=d?e[yb]=d:c._pf.invalidMonth=b;break;case"D":case"DD":null!=b&&(e[zb]=z(b));break;case"Do":null!=b&&(e[zb]=z(parseInt(b,10)));break;case"DDD":case"DDDD":null!=b&&(c._dayOfYear=z(b));break;case"YY":e[xb]=rb.parseTwoDigitYear(b);break;case"YYYY":case"YYYYY":case"YYYYYY":e[xb]=z(b);break;case"a":case"A":c._isPm=c._locale.isPM(b);break;case"H":case"HH":case"h":case"hh":e[Ab]=z(b);break;case"m":case"mm":e[Bb]=z(b);break;case"s":case"ss":e[Cb]=z(b);break;case"S":case"SS":case"SSS":case"SSSS":e[Db]=z(1e3*("0."+b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=P(b);break;case"dd":case"ddd":case"dddd":d=c._locale.weekdaysParse(b),null!=d?(c._w=c._w||{},c._w.d=d):c._pf.invalidWeekday=b;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":a=a.substr(0,1);case"gggg":case"GGGG":case"GGGGG":a=a.substr(0,2),b&&(c._w=c._w||{},c._w[a]=z(b));break;case"gg":case"GG":c._w=c._w||{},c._w[a]=rb.parseTwoDigitYear(b)}}function R(a){var c,d,e,f,g,h,i;c=a._w,null!=c.GG||null!=c.W||null!=c.E?(g=1,h=4,d=b(c.GG,a._a[xb],fb(rb(),1,4).year),e=b(c.W,1),f=b(c.E,1)):(g=a._locale._week.dow,h=a._locale._week.doy,d=b(c.gg,a._a[xb],fb(rb(),g,h).year),e=b(c.w,1),null!=c.d?(f=c.d,g>f&&++e):f=null!=c.e?c.e+g:g),i=gb(d,e,f,h,g),a._a[xb]=i.year,a._dayOfYear=i.dayOfYear}function S(a){var c,d,e,f,g=[];if(!a._d){for(e=U(a),a._w&&null==a._a[zb]&&null==a._a[yb]&&R(a),a._dayOfYear&&(f=b(a._a[xb],e[xb]),a._dayOfYear>C(f)&&(a._pf._overflowDayOfYear=!0),d=bb(f,0,a._dayOfYear),a._a[yb]=d.getUTCMonth(),a._a[zb]=d.getUTCDate()),c=0;3>c&&null==a._a[c];++c)a._a[c]=g[c]=e[c];for(;7>c;c++)a._a[c]=g[c]=null==a._a[c]?2===c?1:0:a._a[c];a._d=(a._useUTC?bb:ab).apply(null,g),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()+a._tzm)}}function T(a){var b;a._d||(b=x(a._i),a._a=[b.year,b.month,b.day,b.hour,b.minute,b.second,b.millisecond],S(a))}function U(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function V(a){if(a._f===rb.ISO_8601)return void Z(a);a._a=[],a._pf.empty=!0;var b,c,d,e,f,g=""+a._i,h=g.length,i=0;for(d=N(a._f,a._locale).match(Kb)||[],b=0;b<d.length;b++)e=d[b],c=(g.match(O(e,a))||[])[0],c&&(f=g.substr(0,g.indexOf(c)),f.length>0&&a._pf.unusedInput.push(f),g=g.slice(g.indexOf(c)+c.length),i+=c.length),mc[e]?(c?a._pf.empty=!1:a._pf.unusedTokens.push(e),Q(e,c,a)):a._strict&&!c&&a._pf.unusedTokens.push(e);a._pf.charsLeftOver=h-i,g.length>0&&a._pf.unusedInput.push(g),a._isPm&&a._a[Ab]<12&&(a._a[Ab]+=12),a._isPm===!1&&12===a._a[Ab]&&(a._a[Ab]=0),S(a),E(a)}function W(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function X(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Y(a){var b,d,e,f,g;if(0===a._f.length)return a._pf.invalidFormat=!0,void(a._d=new Date(0/0));for(f=0;f<a._f.length;f++)g=0,b=m({},a),b._pf=c(),b._f=a._f[f],V(b),F(b)&&(g+=b._pf.charsLeftOver,g+=10*b._pf.unusedTokens.length,b._pf.score=g,(null==e||e>g)&&(e=g,d=b));l(a,d||b)}function Z(a){var b,c,d=a._i,e=ac.exec(d);if(e){for(a._pf.iso=!0,b=0,c=cc.length;c>b;b++)if(cc[b][1].exec(d)){a._f=cc[b][0]+(e[6]||" ");break}for(b=0,c=dc.length;c>b;b++)if(dc[b][1].exec(d)){a._f+=dc[b][0];break}d.match(Sb)&&(a._f+="Z"),V(a)}else a._isValid=!1}function $(a){Z(a),a._isValid===!1&&(delete a._isValid,rb.createFromInputFallback(a))}function _(b){var c,d=b._i;d===a?b._d=new Date:u(d)?b._d=new Date(+d):null!==(c=Hb.exec(d))?b._d=new Date(+c[1]):"string"==typeof d?$(b):t(d)?(b._a=d.slice(0),S(b)):"object"==typeof d?T(b):"number"==typeof d?b._d=new Date(d):rb.createFromInputFallback(b)}function ab(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 1970>a&&h.setFullYear(a),h}function bb(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function cb(a,b){if("string"==typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function db(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function eb(a,b,c){var d=rb.duration(a).abs(),e=wb(d.as("s")),f=wb(d.as("m")),g=wb(d.as("h")),h=wb(d.as("d")),i=wb(d.as("M")),j=wb(d.as("y")),k=e<jc.s&&["s",e]||1===f&&["m"]||f<jc.m&&["mm",f]||1===g&&["h"]||g<jc.h&&["hh",g]||1===h&&["d"]||h<jc.d&&["dd",h]||1===i&&["M"]||i<jc.M&&["MM",i]||1===j&&["y"]||["yy",j];return k[2]=b,k[3]=+a>0,k[4]=c,db.apply({},k)}function fb(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=rb(a).add(f,"d"),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function gb(a,b,c,d,e){var f,g,h=bb(a,0,1).getUTCDay();return h=0===h?7:h,c=null!=c?c:e,f=e-h+(h>d?7:0)-(e>h?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:C(a-1)+g}}function hb(b){var c=b._i,d=b._f;return b._locale=b._locale||rb.localeData(b._l),null===c||d===a&&""===c?rb.invalid({nullInput:!0}):("string"==typeof c&&(b._i=c=b._locale.preparse(c)),rb.isMoment(c)?new j(c,!0):(d?t(d)?Y(b):V(b):_(b),new j(b)))}function ib(a,b){var c,d;if(1===b.length&&t(b[0])&&(b=b[0]),!b.length)return rb();for(c=b[0],d=1;d<b.length;++d)b[d][a](c)&&(c=b[d]);return c}function jb(a,b){var c;return"string"==typeof b&&(b=a.localeData().monthsParse(b),"number"!=typeof b)?a:(c=Math.min(a.date(),A(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a)}function kb(a,b){return a._d["get"+(a._isUTC?"UTC":"")+b]()}function lb(a,b,c){return"Month"===b?jb(a,c):a._d["set"+(a._isUTC?"UTC":"")+b](c)}function mb(a,b){return function(c){return null!=c?(lb(this,a,c),rb.updateOffset(this,b),this):kb(this,a)}}function nb(a){return 400*a/146097}function ob(a){return 146097*a/400}function pb(a){rb.duration.fn[a]=function(){return this._data[a]}}function qb(a){"undefined"==typeof ender&&(sb=vb.moment,vb.moment=a?e("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.",rb):rb)}for(var rb,sb,tb,ub="2.8.1",vb="undefined"!=typeof global?global:this,wb=Math.round,xb=0,yb=1,zb=2,Ab=3,Bb=4,Cb=5,Db=6,Eb={},Fb=[],Gb="undefined"!=typeof module&&module.exports,Hb=/^\/?Date\((\-?\d+)/i,Ib=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Jb=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,Kb=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g,Lb=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,Mb=/\d\d?/,Nb=/\d{1,3}/,Ob=/\d{1,4}/,Pb=/[+\-]?\d{1,6}/,Qb=/\d+/,Rb=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Sb=/Z|[\+\-]\d\d:?\d\d/gi,Tb=/T/i,Ub=/[\+\-]?\d+(\.\d{1,3})?/,Vb=/\d{1,2}/,Wb=/\d/,Xb=/\d\d/,Yb=/\d{3}/,Zb=/\d{4}/,$b=/[+-]?\d{6}/,_b=/[+-]?\d+/,ac=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,bc="YYYY-MM-DDTHH:mm:ssZ",cc=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],dc=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],ec=/([\+\-]|\d\d)/gi,fc=("Date|Hours|Minutes|Seconds|Milliseconds".split("|"),{Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6}),gc={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",Q:"quarter",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},hc={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},ic={},jc={s:45,m:45,h:22,d:26,M:11},kc="DDD w W M D d".split(" "),lc="M D H h m s w W".split(" "),mc={M:function(){return this.month()+1},MMM:function(a){return this.localeData().monthsShort(this,a)},MMMM:function(a){return this.localeData().months(this,a)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(a){return this.localeData().weekdaysMin(this,a)},ddd:function(a){return this.localeData().weekdaysShort(this,a)},dddd:function(a){return this.localeData().weekdays(this,a)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return o(this.year()%100,2)},YYYY:function(){return o(this.year(),4)},YYYYY:function(){return o(this.year(),5)},YYYYYY:function(){var a=this.year(),b=a>=0?"+":"-";return b+o(Math.abs(a),6)},gg:function(){return o(this.weekYear()%100,2)},gggg:function(){return o(this.weekYear(),4)},ggggg:function(){return o(this.weekYear(),5)},GG:function(){return o(this.isoWeekYear()%100,2)},GGGG:function(){return o(this.isoWeekYear(),4)},GGGGG:function(){return o(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return z(this.milliseconds()/100)},SS:function(){return o(z(this.milliseconds()/10),2)},SSS:function(){return o(this.milliseconds(),3)},SSSS:function(){return o(this.milliseconds(),3)},Z:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+o(z(a/60),2)+":"+o(z(a)%60,2)},ZZ:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+o(z(a/60),2)+o(z(a)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()},Q:function(){return this.quarter()}},nc={},oc=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];kc.length;)tb=kc.pop(),mc[tb+"o"]=h(mc[tb],tb);for(;lc.length;)tb=lc.pop(),mc[tb+tb]=g(mc[tb],2);mc.DDDD=g(mc.DDD,3),l(i.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a){var b,c,d;for(this._monthsParse||(this._monthsParse=[]),b=0;12>b;b++)if(this._monthsParse[b]||(c=rb.utc([2e3,b]),d="^"+this.months(c,"")+"|^"+this.monthsShort(c,""),this._monthsParse[b]=new RegExp(d.replace(".",""),"i")),this._monthsParse[b].test(a))return b},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=rb([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b){var c=this._calendar[a];return"function"==typeof c?c.apply(b):c},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",preparse:function(a){return a},postformat:function(a){return a},week:function(a){return fb(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),rb=function(b,d,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._i=b,g._f=d,g._l=e,g._strict=f,g._isUTC=!1,g._pf=c(),hb(g)},rb.suppressDeprecationWarnings=!1,rb.createFromInputFallback=e("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i)}),rb.min=function(){var a=[].slice.call(arguments,0);return ib("isBefore",a)},rb.max=function(){var a=[].slice.call(arguments,0);return ib("isAfter",a)},rb.utc=function(b,d,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._useUTC=!0,g._isUTC=!0,g._l=e,g._i=b,g._f=d,g._strict=f,g._pf=c(),hb(g).utc()},rb.unix=function(a){return rb(1e3*a)},rb.duration=function(a,b){var c,d,e,f,g=a,h=null;return rb.isDuration(a)?g={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(g={},b?g[b]=a:g.milliseconds=a):(h=Ib.exec(a))?(c="-"===h[1]?-1:1,g={y:0,d:z(h[zb])*c,h:z(h[Ab])*c,m:z(h[Bb])*c,s:z(h[Cb])*c,ms:z(h[Db])*c}):(h=Jb.exec(a))?(c="-"===h[1]?-1:1,e=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*c},g={y:e(h[2]),M:e(h[3]),d:e(h[4]),h:e(h[5]),m:e(h[6]),s:e(h[7]),w:e(h[8])}):"object"==typeof g&&("from"in g||"to"in g)&&(f=q(rb(g.from),rb(g.to)),g={},g.ms=f.milliseconds,g.M=f.months),d=new k(g),rb.isDuration(a)&&a.hasOwnProperty("_locale")&&(d._locale=a._locale),d},rb.version=ub,rb.defaultFormat=bc,rb.ISO_8601=function(){},rb.momentProperties=Fb,rb.updateOffset=function(){},rb.relativeTimeThreshold=function(b,c){return jc[b]===a?!1:c===a?jc[b]:(jc[b]=c,!0)},rb.lang=e("moment.lang is deprecated. Use moment.locale instead.",function(a,b){return rb.locale(a,b)}),rb.locale=function(a,b){var c;return a&&(c="undefined"!=typeof b?rb.defineLocale(a,b):rb.localeData(a),c&&(rb.duration._locale=rb._locale=c)),rb._locale._abbr},rb.defineLocale=function(a,b){return null!==b?(b.abbr=a,Eb[a]||(Eb[a]=new i),Eb[a].set(b),rb.locale(a),Eb[a]):(delete Eb[a],null)},rb.langData=e("moment.langData is deprecated. Use moment.localeData instead.",function(a){return rb.localeData(a)}),rb.localeData=function(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return rb._locale;if(!t(a)){if(b=I(a))return b;a=[a]}return H(a)},rb.isMoment=function(a){return a instanceof j||null!=a&&a.hasOwnProperty("_isAMomentObject")},rb.isDuration=function(a){return a instanceof k};for(tb=oc.length-1;tb>=0;--tb)y(oc[tb]);rb.normalizeUnits=function(a){return w(a)},rb.invalid=function(a){var b=rb.utc(0/0);return null!=a?l(b._pf,a):b._pf.userInvalidated=!0,b},rb.parseZone=function(){return rb.apply(null,arguments).parseZone()},rb.parseTwoDigitYear=function(a){return z(a)+(z(a)>68?1900:2e3)},l(rb.fn=j.prototype,{clone:function(){return rb(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var a=rb(this).utc();return 0<a.year()&&a.year()<=9999?M(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):M(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var a=this;return[a.year(),a.month(),a.date(),a.hours(),a.minutes(),a.seconds(),a.milliseconds()]},isValid:function(){return F(this)},isDSTShifted:function(){return this._a?this.isValid()&&v(this._a,(this._isUTC?rb.utc(this._a):rb(this._a)).toArray())>0:!1},parsingFlags:function(){return l({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(a){return this.zone(0,a)},local:function(a){return this._isUTC&&(this.zone(0,a),this._isUTC=!1,a&&this.add(this._d.getTimezoneOffset(),"m")),this},format:function(a){var b=M(this,a||rb.defaultFormat);return this.localeData().postformat(b)},add:r(1,"add"),subtract:r(-1,"subtract"),diff:function(a,b,c){var d,e,f=J(a,this),g=6e4*(this.zone()-f.zone());return b=w(b),"year"===b||"month"===b?(d=432e5*(this.daysInMonth()+f.daysInMonth()),e=12*(this.year()-f.year())+(this.month()-f.month()),e+=(this-rb(this).startOf("month")-(f-rb(f).startOf("month")))/d,e-=6e4*(this.zone()-rb(this).startOf("month").zone()-(f.zone()-rb(f).startOf("month").zone()))/d,"year"===b&&(e/=12)):(d=this-f,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-g)/864e5:"week"===b?(d-g)/6048e5:d),c?e:n(e)},from:function(a,b){return rb.duration({to:this,from:a}).locale(this.locale()).humanize(!b)},fromNow:function(a){return this.from(rb(),a)},calendar:function(a){var b=a||rb(),c=J(b,this).startOf("day"),d=this.diff(c,"days",!0),e=-6>d?"sameElse":-1>d?"lastWeek":0>d?"lastDay":1>d?"sameDay":2>d?"nextDay":7>d?"nextWeek":"sameElse";return this.format(this.localeData().calendar(e,this))},isLeapYear:function(){return D(this.year())},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=cb(a,this.localeData()),this.add(a-b,"d")):b},month:mb("Month",!0),startOf:function(a){switch(a=w(a)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===a?this.weekday(0):"isoWeek"===a&&this.isoWeekday(1),"quarter"===a&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(a){return a=w(a),this.startOf(a).add(1,"isoWeek"===a?"week":a).subtract(1,"ms")},isAfter:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)>+rb(a).startOf(b)},isBefore:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)<+rb(a).startOf(b)},isSame:function(a,b){return b=b||"ms",+this.clone().startOf(b)===+J(a,this).startOf(b)},min:e("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(a){return a=rb.apply(null,arguments),this>a?this:a}),max:e("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(a){return a=rb.apply(null,arguments),a>this?this:a}),zone:function(a,b){var c,d=this._offset||0;return null==a?this._isUTC?d:this._d.getTimezoneOffset():("string"==typeof a&&(a=P(a)),Math.abs(a)<16&&(a=60*a),!this._isUTC&&b&&(c=this._d.getTimezoneOffset()),this._offset=a,this._isUTC=!0,null!=c&&this.subtract(c,"m"),d!==a&&(!b||this._changeInProgress?s(this,rb.duration(d-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,rb.updateOffset(this,!0),this._changeInProgress=null)),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.zone(this._tzm):"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(a){return a=a?rb(a).zone():0,(this.zone()-a)%60===0},daysInMonth:function(){return A(this.year(),this.month())},dayOfYear:function(a){var b=wb((rb(this).startOf("day")-rb(this).startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")},quarter:function(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)},weekYear:function(a){var b=fb(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==a?b:this.add(a-b,"y")},isoWeekYear:function(a){var b=fb(this,1,4).year;return null==a?b:this.add(a-b,"y")},week:function(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")},isoWeek:function(a){var b=fb(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")},weekday:function(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},isoWeeksInYear:function(){return B(this.year(),1,4)},weeksInYear:function(){var a=this.localeData()._week;return B(this.year(),a.dow,a.doy)},get:function(a){return a=w(a),this[a]()},set:function(a,b){return a=w(a),"function"==typeof this[a]&&this[a](b),this},locale:function(b){return b===a?this._locale._abbr:(this._locale=rb.localeData(b),this)},lang:e("moment().lang() is deprecated. Use moment().localeData() instead.",function(b){return b===a?this.localeData():(this._locale=rb.localeData(b),this)}),localeData:function(){return this._locale}}),rb.fn.millisecond=rb.fn.milliseconds=mb("Milliseconds",!1),rb.fn.second=rb.fn.seconds=mb("Seconds",!1),rb.fn.minute=rb.fn.minutes=mb("Minutes",!1),rb.fn.hour=rb.fn.hours=mb("Hours",!0),rb.fn.date=mb("Date",!0),rb.fn.dates=e("dates accessor is deprecated. Use date instead.",mb("Date",!0)),rb.fn.year=mb("FullYear",!0),rb.fn.years=e("years accessor is deprecated. Use year instead.",mb("FullYear",!0)),rb.fn.days=rb.fn.day,rb.fn.months=rb.fn.month,rb.fn.weeks=rb.fn.week,rb.fn.isoWeeks=rb.fn.isoWeek,rb.fn.quarters=rb.fn.quarter,rb.fn.toJSON=rb.fn.toISOString,l(rb.duration.fn=k.prototype,{_bubble:function(){var a,b,c,d=this._milliseconds,e=this._days,f=this._months,g=this._data,h=0;g.milliseconds=d%1e3,a=n(d/1e3),g.seconds=a%60,b=n(a/60),g.minutes=b%60,c=n(b/60),g.hours=c%24,e+=n(c/24),h=n(nb(e)),e-=n(ob(h)),f+=n(e/30),e%=30,h+=n(f/12),f%=12,g.days=e,g.months=f,g.years=h},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return n(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*z(this._months/12)},humanize:function(a){var b=eb(this,!a,this.localeData());return a&&(b=this.localeData().pastFuture(+this,b)),this.localeData().postformat(b)},add:function(a,b){var c=rb.duration(a,b);return this._milliseconds+=c._milliseconds,this._days+=c._days,this._months+=c._months,this._bubble(),this},subtract:function(a,b){var c=rb.duration(a,b);return this._milliseconds-=c._milliseconds,this._days-=c._days,this._months-=c._months,this._bubble(),this},get:function(a){return a=w(a),this[a.toLowerCase()+"s"]()},as:function(a){var b,c;if(a=w(a),b=this._days+this._milliseconds/864e5,"month"===a||"year"===a)return c=this._months+12*nb(b),"month"===a?c:c/12;switch(b+=ob(this._months/12),a){case"week":return b/7;case"day":return b;case"hour":return 24*b;case"minute":return 24*b*60;case"second":return 24*b*60*60;case"millisecond":return 24*b*60*60*1e3;default:throw new Error("Unknown unit "+a)}},lang:rb.fn.lang,locale:rb.fn.locale,toIsoString:e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"},localeData:function(){return this._locale}});for(tb in fc)fc.hasOwnProperty(tb)&&pb(tb.toLowerCase());rb.duration.fn.asMilliseconds=function(){return this.as("ms")},rb.duration.fn.asSeconds=function(){return this.as("s")},rb.duration.fn.asMinutes=function(){return this.as("m")},rb.duration.fn.asHours=function(){return this.as("h")},rb.duration.fn.asDays=function(){return this.as("d")},rb.duration.fn.asWeeks=function(){return this.as("weeks")},rb.duration.fn.asMonths=function(){return this.as("M")},rb.duration.fn.asYears=function(){return this.as("y")},rb.locale("en",{ordinal:function(a){var b=a%10,c=1===z(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),Gb?module.exports=rb:"function"==typeof define&&define.amd?(define("moment",function(a,b,c){return c.config&&c.config()&&c.config().noGlobal===!0&&(vb.moment=sb),rb}),qb(!0)):qb()}).call(this);
\ No newline at end of file
const formatTime = date => {
const year = date.getFullYear()
const month = date.getMonth() + 1
const day = date.getDate()
const hour = date.getHours()
const minute = date.getMinutes()
const second = date.getSeconds()
return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
}
const formatNumber = n => {
n = n.toString()
return n[1] ? n : '0' + n
}
module.exports = {
formatTime: formatTime
}
/*
* charts for WeChat small app v1.0
*
* https://github.com/xiaolin3303/wx-charts
* 2016-11-28
*
* Designed and built with all the love of Web
*/
"use strict";function assign(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(t),a=1;a<arguments.length;a++){var n=arguments[a];if(null!=n)for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])}return i}function findRange(t,e,i){if(isNaN(t))throw new Error("[wxCharts] unvalid series data!");i=i||10,e=e||"upper";for(var a=1;i<1;)i*=10,a*=10;for(t="upper"===e?Math.ceil(t*a):Math.floor(t*a);t%i!=0;)"upper"===e?t++:t--;return t/a}function calValidDistance(t,e,i,a){var n=a.width-i.padding-e.xAxisPoints[0],o=e.eachSpacing*a.categories.length,r=t;return t>=0?r=0:Math.abs(t)>=o-n&&(r=n-o),r}function isInAngleRange(t,e,i){function a(t){for(;t<0;)t+=2*Math.PI;for(;t>2*Math.PI;)t-=2*Math.PI;return t}return t=a(t),e=a(e),i=a(i),e>i&&(i+=2*Math.PI,t<e&&(t+=2*Math.PI)),t>=e&&t<=i}function calRotateTranslate(t,e,i){var a=t,n=i-e,o=a+(i-n-a)/Math.sqrt(2);return o*=-1,{transX:o,transY:(i-n)*(Math.sqrt(2)-1)-(i-n-a)/Math.sqrt(2)}}function createCurveControlPoints(t,e){function i(t,e){return!(!t[e-1]||!t[e+1])&&(t[e].y>=Math.max(t[e-1].y,t[e+1].y)||t[e].y<=Math.min(t[e-1].y,t[e+1].y))}var a=null,n=null,o=null,r=null;if(e<1?(a=t[0].x+.2*(t[1].x-t[0].x),n=t[0].y+.2*(t[1].y-t[0].y)):(a=t[e].x+.2*(t[e+1].x-t[e-1].x),n=t[e].y+.2*(t[e+1].y-t[e-1].y)),e>t.length-3){var s=t.length-1;o=t[s].x-.2*(t[s].x-t[s-1].x),r=t[s].y-.2*(t[s].y-t[s-1].y)}else o=t[e+1].x-.2*(t[e+2].x-t[e].x),r=t[e+1].y-.2*(t[e+2].y-t[e].y);return i(t,e+1)&&(r=t[e+1].y),i(t,e)&&(n=t[e].y),{ctrA:{x:a,y:n},ctrB:{x:o,y:r}}}function convertCoordinateOrigin(t,e,i){return{x:i.x+t,y:i.y-e}}function avoidCollision(t,e){if(e)for(;util.isCollision(t,e);)t.start.x>0?t.start.y--:t.start.x<0?t.start.y++:t.start.y>0?t.start.y++:t.start.y--;return t}function fillSeriesColor(t,e){var i=0;return t.map(function(t){return t.color||(t.color=e.colors[i],i=(i+1)%e.colors.length),t})}function getDataRange(t,e){var i=0,a=e-t;return i=a>=1e4?1e3:a>=1e3?100:a>=100?10:a>=10?5:a>=1?1:a>=.1?.1:.01,{minRange:findRange(t,"lower",i),maxRange:findRange(e,"upper",i)}}function measureText(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;t=String(t);var t=t.split(""),i=0;return t.forEach(function(t){/[a-zA-Z]/.test(t)?i+=7:/[0-9]/.test(t)?i+=5.5:/\./.test(t)?i+=2.7:/-/.test(t)?i+=3.25:/[\u4e00-\u9fa5]/.test(t)?i+=10:/\(|\)/.test(t)?i+=3.73:/\s/.test(t)?i+=2.5:/%/.test(t)?i+=8:i+=10}),i*e/10}function dataCombine(t){return t.reduce(function(t,e){return(t.data?t.data:t).concat(e.data)},[])}function getSeriesDataItem(t,e){var i=[];return t.forEach(function(t){if(null!==t.data[e]&&void 0!==t.data[e]){var a={};a.color=t.color,a.name=t.name,a.data=t.format?t.format(t.data[e]):t.data[e],i.push(a)}}),i}function getMaxTextListLength(t){var e=t.map(function(t){return measureText(t)});return Math.max.apply(null,e)}function getRadarCoordinateSeries(t){for(var e=2*Math.PI/t,i=[],a=0;a<t;a++)i.push(e*a);return i.map(function(t){return-1*t+Math.PI/2})}function getToolTipData(t,e,i,a){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=t.map(function(t){return{text:n.format?n.format(t,a[i]):t.name+": "+t.data,color:t.color}}),r=[],s={x:0,y:0};return e.forEach(function(t){void 0!==t[i]&&null!==t[i]&&r.push(t[i])}),r.forEach(function(t){s.x=Math.round(t.x),s.y+=t.y}),s.y/=r.length,{textList:o,offset:s}}function findCurrentIndex(t,e,i,a){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=-1;return isInExactChartArea(t,i,a)&&e.forEach(function(e,i){t.x+n>e&&(o=i)}),o}function isInExactChartArea(t,e,i){return t.x<e.width-i.padding&&t.x>i.padding+i.yAxisWidth+i.yAxisTitleWidth&&t.y>i.padding&&t.y<e.height-i.legendHeight-i.xAxisHeight-i.padding}function findRadarChartCurrentIndex(t,e,i){var a=2*Math.PI/i,n=-1;if(isInExactPieChartArea(t,e.center,e.radius)){var o=function(t){return t<0&&(t+=2*Math.PI),t>2*Math.PI&&(t-=2*Math.PI),t},r=Math.atan2(e.center.y-t.y,t.x-e.center.x);r*=-1,r<0&&(r+=2*Math.PI);e.angleList.map(function(t){return t=o(-1*t)}).forEach(function(t,e){var i=o(t-a/2),s=o(t+a/2);s<i&&(s+=2*Math.PI),(r>=i&&r<=s||r+2*Math.PI>=i&&r+2*Math.PI<=s)&&(n=e)})}return n}function findPieChartCurrentIndex(t,e){var i=-1;if(isInExactPieChartArea(t,e.center,e.radius)){var a=Math.atan2(e.center.y-t.y,t.x-e.center.x);a=-a;for(var n=0,o=e.series.length;n<o;n++){var r=e.series[n];if(isInAngleRange(a,r._start_,r._start_+2*r._proportion_*Math.PI)){i=n;break}}}return i}function isInExactPieChartArea(t,e,i){return Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)<=Math.pow(i,2)}function splitPoints(t){var e=[],i=[];return t.forEach(function(t,a){null!==t?i.push(t):(i.length&&e.push(i),i=[])}),i.length&&e.push(i),e}function calLegendData(t,e,i){if(!1===e.legend)return{legendList:[],legendHeight:0};var a=[],n=0,o=[];return t.forEach(function(t){var i=30+measureText(t.name||"undefined");n+i>e.width?(a.push(o),n=i,o=[t]):(n+=i,o.push(t))}),o.length&&a.push(o),{legendList:a,legendHeight:a.length*(i.fontSize+8)+5}}function calCategoriesData(t,e,i){var a={angle:0,xAxisHeight:i.xAxisHeight},n=getXAxisPoints(t,e,i),o=n.eachSpacing,r=t.map(function(t){return measureText(t)}),s=Math.max.apply(this,r);return s+2*i.xAxisTextPadding>o&&(a.angle=45*Math.PI/180,a.xAxisHeight=2*i.xAxisTextPadding+s*Math.sin(a.angle)),a}function getRadarDataPoints(t,e,i,a,n){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,r=n.extra.radar||{};r.max=r.max||0;var s=Math.max(r.max,Math.max.apply(null,dataCombine(a))),l=[];return a.forEach(function(a){var n={};n.color=a.color,n.data=[],a.data.forEach(function(a,r){var l={};l.angle=t[r],l.proportion=a/s,l.position=convertCoordinateOrigin(i*l.proportion*o*Math.cos(l.angle),i*l.proportion*o*Math.sin(l.angle),e),n.data.push(l)}),l.push(n)}),l}function getPieDataPoints(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=0,a=0;return t.forEach(function(t){t.data=null===t.data?0:t.data,i+=t.data}),t.forEach(function(t){t.data=null===t.data?0:t.data,t._proportion_=t.data/i*e}),t.forEach(function(t){t._start_=a,a+=2*t._proportion_*Math.PI}),t}function getPieTextMaxLength(t){t=getPieDataPoints(t);var e=0;return t.forEach(function(t){var i=t.format?t.format(+t._proportion_.toFixed(2)):util.toFixed(100*t._proportion_)+"%";e=Math.max(e,measureText(i))}),e}function fixColumeData(t,e,i,a,n,o){return t.map(function(t){return null===t?null:(t.width=(e-2*n.columePadding)/i,o.extra.column&&o.extra.column.width&&+o.extra.column.width>0?t.width=Math.min(t.width,+o.extra.column.width):t.width=Math.min(t.width,25),t.x+=(a+.5-i/2)*t.width,t)})}function getXAxisPoints(t,e,i){var a=i.yAxisWidth+i.yAxisTitleWidth,n=e.width-2*i.padding-a,o=e.enableScroll?Math.min(5,t.length):t.length,r=n/o,s=[],l=i.padding+a,h=e.width-i.padding;return t.forEach(function(t,e){s.push(l+e*r)}),!0===e.enableScroll?s.push(l+t.length*r):s.push(h),{xAxisPoints:s,startX:l,endX:h,eachSpacing:r}}function getDataPoints(t,e,i,a,n,o,r){var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:1,l=[],h=o.height-2*r.padding-r.xAxisHeight-r.legendHeight;return t.forEach(function(t,c){if(null===t)l.push(null);else{var d={};d.x=a[c]+Math.round(n/2);var x=h*(t-e)/(i-e);x*=s,d.y=o.height-r.xAxisHeight-r.legendHeight-Math.round(x)-r.padding,l.push(d)}}),l}function getYAxisTextList(t,e,i){var a=dataCombine(t);a=a.filter(function(t){return null!==t});var n=Math.min.apply(this,a),o=Math.max.apply(this,a);if("number"==typeof e.yAxis.min&&(n=Math.min(e.yAxis.min,n)),"number"==typeof e.yAxis.max&&(o=Math.max(e.yAxis.max,o)),n===o){var r=o||1;n-=r,o+=r}for(var s=getDataRange(n,o),l=s.minRange,h=s.maxRange,c=[],d=(h-l)/i.yAxisSplit,x=0;x<=i.yAxisSplit;x++)c.push(l+d*x);return c.reverse()}function calYAxisData(t,e,i){var a=getYAxisTextList(t,e,i),n=i.yAxisWidth,o=a.map(function(t){return t=util.toFixed(t,2),t=e.yAxis.format?e.yAxis.format(Number(t)):t,n=Math.max(n,measureText(t)+5),t});return!0===e.yAxis.disabled&&(n=0),{rangesFormat:o,ranges:a,yAxisWidth:n}}function drawPointShape(t,e,i,a){a.beginPath(),a.setStrokeStyle("#ffffff"),a.setLineWidth(1),a.setFillStyle(e),"diamond"===i?t.forEach(function(t,e){null!==t&&(a.moveTo(t.x,t.y-4.5),a.lineTo(t.x-4.5,t.y),a.lineTo(t.x,t.y+4.5),a.lineTo(t.x+4.5,t.y),a.lineTo(t.x,t.y-4.5))}):"circle"===i?t.forEach(function(t,e){null!==t&&(a.moveTo(t.x+3.5,t.y),a.arc(t.x,t.y,4,0,2*Math.PI,!1))}):"rect"===i?t.forEach(function(t,e){null!==t&&(a.moveTo(t.x-3.5,t.y-3.5),a.rect(t.x-3.5,t.y-3.5,7,7))}):"triangle"===i&&t.forEach(function(t,e){null!==t&&(a.moveTo(t.x,t.y-4.5),a.lineTo(t.x-4.5,t.y+4.5),a.lineTo(t.x+4.5,t.y+4.5),a.lineTo(t.x,t.y-4.5))}),a.closePath(),a.fill(),a.stroke()}function drawRingTitle(t,e,i){var a=t.title.fontSize||e.titleFontSize,n=t.subtitle.fontSize||e.subtitleFontSize,o=t.title.name||"",r=t.subtitle.name||"",s=t.title.color||e.titleColor,l=t.subtitle.color||e.subtitleColor,h=o?a:0,c=r?n:0;if(r){var d=measureText(r,n),x=(t.width-d)/2+(t.subtitle.offsetX||0),f=(t.height-e.legendHeight+n)/2;o&&(f-=(h+5)/2),i.beginPath(),i.setFontSize(n),i.setFillStyle(l),i.fillText(r,x,f),i.stroke(),i.closePath()}if(o){var u=measureText(o,a),g=(t.width-u)/2+(t.title.offsetX||0),p=(t.height-e.legendHeight+a)/2;r&&(p+=(c+5)/2),i.beginPath(),i.setFontSize(a),i.setFillStyle(s),i.fillText(o,g,p),i.stroke(),i.closePath()}}function drawPointText(t,e,i,a){var n=e.data;a.beginPath(),a.setFontSize(i.fontSize),a.setFillStyle("#666666"),t.forEach(function(t,i){if(null!==t){var o=e.format?e.format(n[i]):n[i];a.fillText(o,t.x-measureText(o)/2,t.y-2)}}),a.closePath(),a.stroke()}function drawRadarLabel(t,e,i,a,n,o){var r=a.extra.radar||{};e+=n.radarLabelTextMargin,o.beginPath(),o.setFontSize(n.fontSize),o.setFillStyle(r.labelColor||"#666666"),t.forEach(function(t,r){var s={x:e*Math.cos(t),y:e*Math.sin(t)},l=convertCoordinateOrigin(s.x,s.y,i),h=l.x,c=l.y;util.approximatelyEqual(s.x,0)?h-=measureText(a.categories[r]||"")/2:s.x<0&&(h-=measureText(a.categories[r]||"")),o.fillText(a.categories[r]||"",h,c+n.fontSize/2)}),o.stroke(),o.closePath()}function drawPieText(t,e,i,a,n,o){var r=n+i.pieChartLinePadding,s=[],l=null;t.map(function(t){return{arc:2*Math.PI-(t._start_+2*Math.PI*t._proportion_/2),text:t.format?t.format(+t._proportion_.toFixed(2)):util.toFixed(100*t._proportion_)+"%",color:t.color}}).forEach(function(t){var e=Math.cos(t.arc)*r,a=Math.sin(t.arc)*r,o=Math.cos(t.arc)*n,h=Math.sin(t.arc)*n,c=e>=0?e+i.pieChartTextPadding:e-i.pieChartTextPadding,d=a,x=measureText(t.text),f=d;l&&util.isSameXCoordinateArea(l.start,{x:c})&&(f=c>0?Math.min(d,l.start.y):e<0?Math.max(d,l.start.y):d>0?Math.max(d,l.start.y):Math.min(d,l.start.y)),c<0&&(c-=x);var u={lineStart:{x:o,y:h},lineEnd:{x:e,y:a},start:{x:c,y:f},width:x,height:i.fontSize,text:t.text,color:t.color};l=avoidCollision(u,l),s.push(l)}),s.forEach(function(t){var e=convertCoordinateOrigin(t.lineStart.x,t.lineStart.y,o),n=convertCoordinateOrigin(t.lineEnd.x,t.lineEnd.y,o),r=convertCoordinateOrigin(t.start.x,t.start.y,o);a.setLineWidth(1),a.setFontSize(i.fontSize),a.beginPath(),a.setStrokeStyle(t.color),a.setFillStyle(t.color),a.moveTo(e.x,e.y);var s=t.start.x<0?r.x+t.width:r.x,l=t.start.x<0?r.x-5:r.x+5;a.quadraticCurveTo(n.x,n.y,s,r.y),a.moveTo(e.x,e.y),a.stroke(),a.closePath(),a.beginPath(),a.moveTo(r.x+t.width,r.y),a.arc(s,r.y,2,0,2*Math.PI),a.closePath(),a.fill(),a.beginPath(),a.setFillStyle("#666666"),a.fillText(t.text,l,r.y+3),a.closePath(),a.stroke(),a.closePath()})}function drawToolTipSplitLine(t,e,i,a){var n=i.padding,o=e.height-i.padding-i.xAxisHeight-i.legendHeight;a.beginPath(),a.setStrokeStyle("#cccccc"),a.setLineWidth(1),a.moveTo(t,n),a.lineTo(t,o),a.stroke(),a.closePath()}function drawToolTip(t,e,i,a,n){var o=!1;e=assign({x:0,y:0},e),e.y-=8;var r=t.map(function(t){return measureText(t.text)}),s=9+4*a.toolTipPadding+Math.max.apply(null,r),l=2*a.toolTipPadding+t.length*a.toolTipLineHeight;e.x-Math.abs(i._scrollDistance_)+8+s>i.width&&(o=!0),n.beginPath(),n.setFillStyle(i.tooltip.option.background||a.toolTipBackground),n.setGlobalAlpha(a.toolTipOpacity),o?(n.moveTo(e.x,e.y+10),n.lineTo(e.x-8,e.y+10-5),n.lineTo(e.x-8,e.y+10+5),n.moveTo(e.x,e.y+10),n.fillRect(e.x-s-8,e.y,s,l)):(n.moveTo(e.x,e.y+10),n.lineTo(e.x+8,e.y+10-5),n.lineTo(e.x+8,e.y+10+5),n.moveTo(e.x,e.y+10),n.fillRect(e.x+8,e.y,s,l)),n.closePath(),n.fill(),n.setGlobalAlpha(1),t.forEach(function(t,i){n.beginPath(),n.setFillStyle(t.color);var r=e.x+8+2*a.toolTipPadding,l=e.y+(a.toolTipLineHeight-a.fontSize)/2+a.toolTipLineHeight*i+a.toolTipPadding;o&&(r=e.x-s-8+2*a.toolTipPadding),n.fillRect(r,l,4,a.fontSize),n.closePath()}),n.beginPath(),n.setFontSize(a.fontSize),n.setFillStyle("#ffffff"),t.forEach(function(t,i){var r=e.x+8+2*a.toolTipPadding+4+5;o&&(r=e.x-s-8+2*a.toolTipPadding+4+5);var l=e.y+(a.toolTipLineHeight-a.fontSize)/2+a.toolTipLineHeight*i+a.toolTipPadding;n.fillText(t.text,r,l+a.fontSize)}),n.stroke(),n.closePath()}function drawYAxisTitle(t,e,i,a){var n=i.xAxisHeight+(e.height-i.xAxisHeight-measureText(t))/2;a.save(),a.beginPath(),a.setFontSize(i.fontSize),a.setFillStyle(e.yAxis.titleFontColor||"#333333"),a.translate(0,e.height),a.rotate(-90*Math.PI/180),a.fillText(t,n,i.padding+.5*i.fontSize),a.stroke(),a.closePath(),a.restore()}function drawColumnDataPoints(t,e,i,a){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=calYAxisData(t,e,i),r=o.ranges,s=getXAxisPoints(e.categories,e,i),l=s.xAxisPoints,h=s.eachSpacing,c=r.pop(),d=r.shift();return a.save(),e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&a.translate(e._scrollDistance_,0),t.forEach(function(o,r){var s=o.data,x=getDataPoints(s,c,d,l,h,e,i,n);x=fixColumeData(x,h,t.length,r,i,e),a.beginPath(),a.setFillStyle(o.color),x.forEach(function(t,n){if(null!==t){var o=t.x-t.width/2+1,r=e.height-t.y-i.padding-i.xAxisHeight-i.legendHeight;a.moveTo(o,t.y),a.rect(o,t.y,t.width-2,r)}}),a.closePath(),a.fill()}),t.forEach(function(o,r){var s=o.data,x=getDataPoints(s,c,d,l,h,e,i,n);x=fixColumeData(x,h,t.length,r,i,e),!1!==e.dataLabel&&1===n&&drawPointText(x,o,i,a)}),a.restore(),{xAxisPoints:l,eachSpacing:h}}function drawAreaDataPoints(t,e,i,a){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=calYAxisData(t,e,i),r=o.ranges,s=getXAxisPoints(e.categories,e,i),l=s.xAxisPoints,h=s.eachSpacing,c=r.pop(),d=r.shift(),x=e.height-i.padding-i.xAxisHeight-i.legendHeight,f=[];return a.save(),e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&a.translate(e._scrollDistance_,0),e.tooltip&&e.tooltip.textList&&e.tooltip.textList.length&&1===n&&drawToolTipSplitLine(e.tooltip.offset.x,e,i,a),t.forEach(function(t,o){var r=t.data,s=getDataPoints(r,c,d,l,h,e,i,n);if(f.push(s),splitPoints(s).forEach(function(i){if(a.beginPath(),a.setStrokeStyle(t.color),a.setFillStyle(t.color),a.setGlobalAlpha(.6),a.setLineWidth(2),i.length>1){var n=i[0],o=i[i.length-1];a.moveTo(n.x,n.y),"curve"===e.extra.lineStyle?i.forEach(function(t,e){if(e>0){var n=createCurveControlPoints(i,e-1);a.bezierCurveTo(n.ctrA.x,n.ctrA.y,n.ctrB.x,n.ctrB.y,t.x,t.y)}}):i.forEach(function(t,e){e>0&&a.lineTo(t.x,t.y)}),a.lineTo(o.x,x),a.lineTo(n.x,x),a.lineTo(n.x,n.y)}else{var r=i[0];a.moveTo(r.x-h/2,r.y),a.lineTo(r.x+h/2,r.y),a.lineTo(r.x+h/2,x),a.lineTo(r.x-h/2,x),a.moveTo(r.x-h/2,r.y)}a.closePath(),a.fill(),a.setGlobalAlpha(1)}),!1!==e.dataPointShape){var u=i.dataPointShape[o%i.dataPointShape.length];drawPointShape(s,t.color,u,a)}}),!1!==e.dataLabel&&1===n&&t.forEach(function(t,o){drawPointText(getDataPoints(t.data,c,d,l,h,e,i,n),t,i,a)}),a.restore(),{xAxisPoints:l,calPoints:f,eachSpacing:h}}function drawLineDataPoints(t,e,i,a){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=calYAxisData(t,e,i),r=o.ranges,s=getXAxisPoints(e.categories,e,i),l=s.xAxisPoints,h=s.eachSpacing,c=r.pop(),d=r.shift(),x=[];return a.save(),e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&a.translate(e._scrollDistance_,0),e.tooltip&&e.tooltip.textList&&e.tooltip.textList.length&&1===n&&drawToolTipSplitLine(e.tooltip.offset.x,e,i,a),t.forEach(function(t,o){var r=t.data,s=getDataPoints(r,c,d,l,h,e,i,n);if(x.push(s),splitPoints(s).forEach(function(i,n){a.beginPath(),a.setStrokeStyle(t.color),a.setLineWidth(2),1===i.length?(a.moveTo(i[0].x,i[0].y),a.arc(i[0].x,i[0].y,1,0,2*Math.PI)):(a.moveTo(i[0].x,i[0].y),"curve"===e.extra.lineStyle?i.forEach(function(t,e){if(e>0){var n=createCurveControlPoints(i,e-1);a.bezierCurveTo(n.ctrA.x,n.ctrA.y,n.ctrB.x,n.ctrB.y,t.x,t.y)}}):i.forEach(function(t,e){e>0&&a.lineTo(t.x,t.y)}),a.moveTo(i[0].x,i[0].y)),a.closePath(),a.stroke()}),!1!==e.dataPointShape){var f=i.dataPointShape[o%i.dataPointShape.length];drawPointShape(s,t.color,f,a)}}),!1!==e.dataLabel&&1===n&&t.forEach(function(t,o){drawPointText(getDataPoints(t.data,c,d,l,h,e,i,n),t,i,a)}),a.restore(),{xAxisPoints:l,calPoints:x,eachSpacing:h}}function drawToolTipBridge(t,e,i,a){i.save(),t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&i.translate(t._scrollDistance_,0),t.tooltip&&t.tooltip.textList&&t.tooltip.textList.length&&1===a&&drawToolTip(t.tooltip.textList,t.tooltip.offset,t,e,i),i.restore()}function drawXAxis(t,e,i,a){var n=getXAxisPoints(t,e,i),o=n.xAxisPoints,r=(n.startX,n.endX,n.eachSpacing),s=e.height-i.padding-i.xAxisHeight-i.legendHeight,l=s+i.xAxisLineHeight;a.save(),e._scrollDistance_&&0!==e._scrollDistance_&&a.translate(e._scrollDistance_,0),a.beginPath(),a.setStrokeStyle(e.xAxis.gridColor||"#cccccc"),!0!==e.xAxis.disableGrid&&("calibration"===e.xAxis.type?o.forEach(function(t,e){e>0&&(a.moveTo(t-r/2,s),a.lineTo(t-r/2,s+4))}):o.forEach(function(t,e){a.moveTo(t,s),a.lineTo(t,l)})),a.closePath(),a.stroke();var h=e.width-2*i.padding-i.yAxisWidth-i.yAxisTitleWidth,c=Math.min(t.length,Math.ceil(h/i.fontSize/1.5)),d=Math.ceil(t.length/c);t=t.map(function(t,e){return e%d!=0?"":t}),0===i._xAxisTextAngle_?(a.beginPath(),a.setFontSize(i.fontSize),a.setFillStyle(e.xAxis.fontColor||"#666666"),t.forEach(function(t,e){var n=r/2-measureText(t)/2;a.fillText(t,o[e]+n,s+i.fontSize+5)}),a.closePath(),a.stroke()):t.forEach(function(t,n){a.save(),a.beginPath(),a.setFontSize(i.fontSize),a.setFillStyle(e.xAxis.fontColor||"#666666");var l=measureText(t),h=r/2-l,c=calRotateTranslate(o[n]+r/2,s+i.fontSize/2+5,e.height),d=c.transX,x=c.transY;a.rotate(-1*i._xAxisTextAngle_),a.translate(d,x),a.fillText(t,o[n]+h,s+i.fontSize+5),a.closePath(),a.stroke(),a.restore()}),a.restore()}function drawYAxisGrid(t,e,i){for(var a=t.height-2*e.padding-e.xAxisHeight-e.legendHeight,n=Math.floor(a/e.yAxisSplit),o=e.yAxisWidth+e.yAxisTitleWidth,r=e.padding+o,s=t.width-e.padding,l=[],h=0;h<e.yAxisSplit;h++)l.push(e.padding+n*h);l.push(e.padding+n*e.yAxisSplit+2),i.beginPath(),i.setStrokeStyle(t.yAxis.gridColor||"#cccccc"),i.setLineWidth(1),l.forEach(function(t,e){i.moveTo(r,t),i.lineTo(s,t)}),i.closePath(),i.stroke()}function drawYAxis(t,e,i,a){if(!0!==e.yAxis.disabled){var n=calYAxisData(t,e,i),o=n.rangesFormat,r=i.yAxisWidth+i.yAxisTitleWidth,s=e.height-2*i.padding-i.xAxisHeight-i.legendHeight,l=Math.floor(s/i.yAxisSplit),h=i.padding+r,c=e.width-i.padding,d=e.height-i.padding-i.xAxisHeight-i.legendHeight;a.setFillStyle(e.background||"#ffffff"),e._scrollDistance_<0&&a.fillRect(0,0,h,d+i.xAxisHeight+5),a.fillRect(c,0,e.width,d+i.xAxisHeight+5);for(var x=[],f=0;f<=i.yAxisSplit;f++)x.push(i.padding+l*f);a.stroke(),a.beginPath(),a.setFontSize(i.fontSize),a.setFillStyle(e.yAxis.fontColor||"#666666"),o.forEach(function(t,e){var n=x[e]?x[e]:d;a.fillText(t,i.padding+i.yAxisTitleWidth,n+i.fontSize/2)}),a.closePath(),a.stroke(),e.yAxis.title&&drawYAxisTitle(e.yAxis.title,e,i,a)}}function drawLegend(t,e,i,a){if(e.legend){var n=calLegendData(t,e,i),o=n.legendList;o.forEach(function(t,n){var o=0;t.forEach(function(t){t.name=t.name||"undefined",o+=15+measureText(t.name)+15});var r=(e.width-o)/2+5,s=e.height-i.padding-i.legendHeight+n*(i.fontSize+8)+5+8;a.setFontSize(i.fontSize),t.forEach(function(t){switch(e.type){case"line":a.beginPath(),a.setLineWidth(1),a.setStrokeStyle(t.color),a.moveTo(r-2,s+5),a.lineTo(r+17,s+5),a.stroke(),a.closePath(),a.beginPath(),a.setLineWidth(1),a.setStrokeStyle("#ffffff"),a.setFillStyle(t.color),a.moveTo(r+7.5,s+5),a.arc(r+7.5,s+5,4,0,2*Math.PI),a.fill(),a.stroke(),a.closePath();break;case"pie":case"ring":a.beginPath(),a.setFillStyle(t.color),a.moveTo(r+7.5,s+5),a.arc(r+7.5,s+5,7,0,2*Math.PI),a.closePath(),a.fill();break;default:a.beginPath(),a.setFillStyle(t.color),a.moveTo(r,s),a.rect(r,s,15,10),a.closePath(),a.fill()}r+=20,a.beginPath(),a.setFillStyle(e.extra.legendTextColor||"#333333"),a.fillText(t.name,r,s+9),a.closePath(),a.stroke(),r+=measureText(t.name)+10})})}}function drawPieDataPoints(t,e,i,a){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=e.extra.pie||{};t=getPieDataPoints(t,n);var r={x:e.width/2,y:(e.height-i.legendHeight)/2},s=Math.min(r.x-i.pieChartLinePadding-i.pieChartTextPadding-i._pieTextMaxLength_,r.y-i.pieChartLinePadding-i.pieChartTextPadding);if(e.dataLabel?s-=10:s-=2*i.padding,t=t.map(function(t){return t._start_+=(o.offsetAngle||0)*Math.PI/180,t}),t.forEach(function(t){a.beginPath(),a.setLineWidth(2),a.setStrokeStyle("#ffffff"),a.setFillStyle(t.color),a.moveTo(r.x,r.y),a.arc(r.x,r.y,s,t._start_,t._start_+2*t._proportion_*Math.PI),a.closePath(),a.fill(),!0!==e.disablePieStroke&&a.stroke()}),"ring"===e.type){var l=.6*s;"number"==typeof e.extra.ringWidth&&e.extra.ringWidth>0&&(l=Math.max(0,s-e.extra.ringWidth)),a.beginPath(),a.setFillStyle(e.background||"#ffffff"),a.moveTo(r.x,r.y),a.arc(r.x,r.y,l,0,2*Math.PI),a.closePath(),a.fill()}if(!1!==e.dataLabel&&1===n){for(var h=!1,c=0,d=t.length;c<d;c++)if(t[c].data>0){h=!0;break}h&&drawPieText(t,e,i,a,s,r)}return 1===n&&"ring"===e.type&&drawRingTitle(e,i,a),{center:r,radius:s,series:t}}function drawRadarDataPoints(t,e,i,a){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=e.extra.radar||{},r=getRadarCoordinateSeries(e.categories.length),s={x:e.width/2,y:(e.height-i.legendHeight)/2},l=Math.min(s.x-(getMaxTextListLength(e.categories)+i.radarLabelTextMargin),s.y-i.radarLabelTextMargin);l-=i.padding,a.beginPath(),a.setLineWidth(1),a.setStrokeStyle(o.gridColor||"#cccccc"),r.forEach(function(t){var e=convertCoordinateOrigin(l*Math.cos(t),l*Math.sin(t),s);a.moveTo(s.x,s.y),a.lineTo(e.x,e.y)}),a.stroke(),a.closePath();for(var h=1;h<=i.radarGridCount;h++)!function(t){var e={};a.beginPath(),a.setLineWidth(1),a.setStrokeStyle(o.gridColor||"#cccccc"),r.forEach(function(n,o){var r=convertCoordinateOrigin(l/i.radarGridCount*t*Math.cos(n),l/i.radarGridCount*t*Math.sin(n),s);0===o?(e=r,a.moveTo(r.x,r.y)):a.lineTo(r.x,r.y)}),a.lineTo(e.x,e.y),a.stroke(),a.closePath()}(h);return getRadarDataPoints(r,s,l,t,e,n).forEach(function(t,n){if(a.beginPath(),a.setFillStyle(t.color),a.setGlobalAlpha(.6),t.data.forEach(function(t,e){0===e?a.moveTo(t.position.x,t.position.y):a.lineTo(t.position.x,t.position.y)}),a.closePath(),a.fill(),a.setGlobalAlpha(1),!1!==e.dataPointShape){var o=i.dataPointShape[n%i.dataPointShape.length];drawPointShape(t.data.map(function(t){return t.position}),t.color,o,a)}}),drawRadarLabel(r,l,s,e,i,a),{center:s,radius:l,angleList:r}}function drawCanvas(t,e){e.draw()}function Animation(t){this.isStop=!1,t.duration=void 0===t.duration?1e3:t.duration,t.timing=t.timing||"linear";var e=function(){return"undefined"!=typeof requestAnimationFrame?requestAnimationFrame:"undefined"!=typeof setTimeout?function(t,e){setTimeout(function(){var e=+new Date;t(e)},e)}:function(t){t(null)}}(),i=null,a=function(n){if(null===n||!0===this.isStop)return t.onProcess&&t.onProcess(1),void(t.onAnimationFinish&&t.onAnimationFinish());if(null===i&&(i=n),n-i<t.duration){var o=(n-i)/t.duration;o=(0,Timing[t.timing])(o),t.onProcess&&t.onProcess(o),e(a,17)}else t.onProcess&&t.onProcess(1),t.onAnimationFinish&&t.onAnimationFinish()};a=a.bind(this),e(a,17)}function drawCharts(t,e,i,a){var n=this,o=e.series,r=e.categories;o=fillSeriesColor(o,i);var s=calLegendData(o,e,i),l=s.legendHeight;i.legendHeight=l;var h=calYAxisData(o,e,i),c=h.yAxisWidth;if(i.yAxisWidth=c,r&&r.length){var d=calCategoriesData(r,e,i),x=d.xAxisHeight,f=d.angle;i.xAxisHeight=x,i._xAxisTextAngle_=f}"pie"!==t&&"ring"!==t||(i._pieTextMaxLength_=!1===e.dataLabel?0:getPieTextMaxLength(o));var u=e.animation?1e3:0;switch(this.animationInstance&&this.animationInstance.stop(),t){case"line":this.animationInstance=new Animation({timing:"easeIn",duration:u,onProcess:function(t){drawYAxisGrid(e,i,a);var s=drawLineDataPoints(o,e,i,a,t),l=s.xAxisPoints,h=s.calPoints,c=s.eachSpacing;n.chartData.xAxisPoints=l,n.chartData.calPoints=h,n.chartData.eachSpacing=c,drawXAxis(r,e,i,a),drawLegend(e.series,e,i,a),drawYAxis(o,e,i,a),drawToolTipBridge(e,i,a,t),drawCanvas(e,a)},onAnimationFinish:function(){n.event.trigger("renderComplete")}});break;case"column":this.animationInstance=new Animation({timing:"easeIn",duration:u,onProcess:function(t){drawYAxisGrid(e,i,a);var s=drawColumnDataPoints(o,e,i,a,t),l=s.xAxisPoints,h=s.eachSpacing;n.chartData.xAxisPoints=l,n.chartData.eachSpacing=h,drawXAxis(r,e,i,a),drawLegend(e.series,e,i,a),drawYAxis(o,e,i,a),drawCanvas(e,a)},onAnimationFinish:function(){n.event.trigger("renderComplete")}});break;case"area":this.animationInstance=new Animation({timing:"easeIn",duration:u,onProcess:function(t){drawYAxisGrid(e,i,a);var s=drawAreaDataPoints(o,e,i,a,t),l=s.xAxisPoints,h=s.calPoints,c=s.eachSpacing;n.chartData.xAxisPoints=l,n.chartData.calPoints=h,n.chartData.eachSpacing=c,drawXAxis(r,e,i,a),drawLegend(e.series,e,i,a),drawYAxis(o,e,i,a),drawToolTipBridge(e,i,a,t),drawCanvas(e,a)},onAnimationFinish:function(){n.event.trigger("renderComplete")}});break;case"ring":case"pie":this.animationInstance=new Animation({timing:"easeInOut",duration:u,onProcess:function(t){n.chartData.pieData=drawPieDataPoints(o,e,i,a,t),drawLegend(e.series,e,i,a),drawCanvas(e,a)},onAnimationFinish:function(){n.event.trigger("renderComplete")}});break;case"radar":this.animationInstance=new Animation({timing:"easeInOut",duration:u,onProcess:function(t){n.chartData.radarData=drawRadarDataPoints(o,e,i,a,t),drawLegend(e.series,e,i,a),drawCanvas(e,a)},onAnimationFinish:function(){n.event.trigger("renderComplete")}})}}function Event(){this.events={}}var config={yAxisWidth:15,yAxisSplit:5,xAxisHeight:15,xAxisLineHeight:15,legendHeight:15,yAxisTitleWidth:15,padding:12,columePadding:3,fontSize:10,dataPointShape:["diamond","circle","triangle","rect"],colors:["#7cb5ec","#f7a35c","#434348","#90ed7d","#f15c80","#8085e9"],pieChartLinePadding:25,pieChartTextPadding:15,xAxisTextPadding:3,titleColor:"#333333",titleFontSize:20,subtitleColor:"#999999",subtitleFontSize:15,toolTipPadding:3,toolTipBackground:"#000000",toolTipOpacity:.7,toolTipLineHeight:14,radarGridCount:3,radarLabelTextMargin:15},util={toFixed:function(t,e){return e=e||2,this.isFloat(t)&&(t=t.toFixed(e)),t},isFloat:function(t){return t%1!=0},approximatelyEqual:function(t,e){return Math.abs(t-e)<1e-10},isSameSign:function(t,e){return Math.abs(t)===t&&Math.abs(e)===e||Math.abs(t)!==t&&Math.abs(e)!==e},isSameXCoordinateArea:function(t,e){return this.isSameSign(t.x,e.x)},isCollision:function(t,e){return t.end={},t.end.x=t.start.x+t.width,t.end.y=t.start.y-t.height,e.end={},e.end.x=e.start.x+e.width,e.end.y=e.start.y-e.height,!(e.start.x>t.end.x||e.end.x<t.start.x||e.end.y>t.start.y||e.start.y<t.end.y)}},Timing={easeIn:function(t){return Math.pow(t,3)},easeOut:function(t){return Math.pow(t-1,3)+1},easeInOut:function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},linear:function(t){return t}};Animation.prototype.stop=function(){this.isStop=!0},Event.prototype.addEventListener=function(t,e){this.events[t]=this.events[t]||[],this.events[t].push(e)},Event.prototype.trigger=function(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];var a=e[0],n=e.slice(1);this.events[a]&&this.events[a].forEach(function(t){try{t.apply(null,n)}catch(t){console.error(t)}})};var Charts=function(t){t.title=t.title||{},t.subtitle=t.subtitle||{},t.yAxis=t.yAxis||{},t.xAxis=t.xAxis||{},t.extra=t.extra||{},t.legend=!1!==t.legend,t.animation=!1!==t.animation;var e=assign({},config);e.yAxisTitleWidth=!0!==t.yAxis.disabled&&t.yAxis.title?e.yAxisTitleWidth:0,e.pieChartLinePadding=!1===t.dataLabel?0:e.pieChartLinePadding,e.pieChartTextPadding=!1===t.dataLabel?0:e.pieChartTextPadding,this.opts=t,this.config=e,this.context=wx.createCanvasContext(t.canvasId),this.chartData={},this.event=new Event,this.scrollOption={currentOffset:0,startTouchX:0,distance:0},drawCharts.call(this,t.type,t,e,this.context)};Charts.prototype.updateData=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opts.series=t.series||this.opts.series,this.opts.categories=t.categories||this.opts.categories,this.opts.title=assign({},this.opts.title,t.title||{}),this.opts.subtitle=assign({},this.opts.subtitle,t.subtitle||{}),drawCharts.call(this,this.opts.type,this.opts,this.config,this.context)},Charts.prototype.stopAnimation=function(){this.animationInstance&&this.animationInstance.stop()},Charts.prototype.addEventListener=function(t,e){this.event.addEventListener(t,e)},Charts.prototype.getCurrentDataIndex=function(t){var e=t.touches&&t.touches.length?t.touches:t.changedTouches;if(e&&e.length){var i=e[0],a=i.x,n=i.y;return"pie"===this.opts.type||"ring"===this.opts.type?findPieChartCurrentIndex({x:a,y:n},this.chartData.pieData):"radar"===this.opts.type?findRadarChartCurrentIndex({x:a,y:n},this.chartData.radarData,this.opts.categories.length):findCurrentIndex({x:a,y:n},this.chartData.xAxisPoints,this.opts,this.config,Math.abs(this.scrollOption.currentOffset))}return-1},Charts.prototype.showToolTip=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("line"===this.opts.type||"area"===this.opts.type){var i=this.getCurrentDataIndex(t),a=this.scrollOption.currentOffset,n=assign({},this.opts,{_scrollDistance_:a,animation:!1});if(i>-1){var o=getSeriesDataItem(this.opts.series,i);if(0!==o.length){var r=getToolTipData(o,this.chartData.calPoints,i,this.opts.categories,e),s=r.textList,l=r.offset;n.tooltip={textList:s,offset:l,option:e}}}drawCharts.call(this,n.type,n,this.config,this.context)}},Charts.prototype.scrollStart=function(t){t.touches[0]&&!0===this.opts.enableScroll&&(this.scrollOption.startTouchX=t.touches[0].x)},Charts.prototype.scroll=function(t){if(t.touches[0]&&!0===this.opts.enableScroll){var e=t.touches[0].x-this.scrollOption.startTouchX,i=this.scrollOption.currentOffset,a=calValidDistance(i+e,this.chartData,this.config,this.opts);this.scrollOption.distance=e=a-i;var n=assign({},this.opts,{_scrollDistance_:i+e,animation:!1});drawCharts.call(this,n.type,n,this.config,this.context)}},Charts.prototype.scrollEnd=function(t){if(!0===this.opts.enableScroll){var e=this.scrollOption,i=e.currentOffset,a=e.distance;this.scrollOption.currentOffset=i+a,this.scrollOption.distance=0}},module.exports=Charts;
//const domain = 'https://e-shield.didihu.com.cn/otmini/'; //正式环境
const domain = 'https://devwx.glsx.com.cn/otmini/'; //开发环境
function redirectToLogin(){console.log('redirectToLogin')
wx.redirectTo({
url: '../../pages/login/login'
});
}
module.exports = {
domain,
login(data){
return new Promise(function(resolve, reject){
wx.showLoading();
wx.login({
success: res => {
wx.setStorageSync("code", res.code);
const postData = {
...data,
code: res.code
}
if(wx.getStorageSync("publicCode")){
postData.publicCode = wx.getStorageSync("publicCode");
}
const params = {
url: `${domain}loginByCode`, //loginminipro
data: postData,
success: function(res) {
wx.hideLoading();
if(res.statusCode === 200){
const result = res.data;
if(result.returnCode === '0'){
const status = result.data.status;
wx.setStorageSync("sessionid", res.header["Set-Cookie"]);
wx.setStorageSync("userStatus", status);
if(status === 0){//分享者
wx.setStorageSync("userinfo", result.data.user);
wx.setStorageSync('loginUserId', result.data.user.id);
}else if(status === 1){//被分享者
wx.setStorageSync("userinfo", result.data.wxuser);
}
resolve();
}else{
const pages = getCurrentPages();
const currentPage = pages[pages.length-1];
const url = currentPage.route;
if(url !== 'pages/login/login'){
redirectToLogin();
}else{
wx.showModal({
content: result.message,
showCancel: false
});
reject()
}
}
}else{
redirectToLogin();
}
},
fail(){
console.log('fail')
},
complete(){
console.log('complete')
}
};
/*if(data){
data.code = res.code;
params.data = data;
}*/
wx.request(params);
}
});
})
},
get(url, data){
return new Promise(function(resolve, reject){
wx.showLoading();
//wx.setStorageSync('sessionid', 'JSESSIONID=node03r5y0xa3w4fh1jdk4e2q4oz860.node0;Path=/otmini')
const params = {
header: {
'cookie': wx.getStorageSync("sessionid")
},
url: `${domain}${url}`,
success: function(res) {
wx.hideLoading();
if(res.statusCode === 200){
const data = res.data;
if('returnCode' in data && data.returnCode !== '0'){
wx.showModal({
content: data.message,
showCancel: false
});
}
resolve(data);
}else if(res.statusCode === 401){
redirectToLogin();
}
},
fail(){
console.log('fail')
}
};
data && (params.data = data);
wx.request(params);
});
}
}
/*function(){
const testBaseUrl = 'http://localhost:8080/otmini/';
const baseUrl = '';
let args = [].slice.call(arguments, 0)
console.log(args)
}*/
\ No newline at end of file
/*!
* WeUI v1.1.1 (https://github.com/weui/weui-wxss)
* Copyright 2017 Tencent, Inc.
* Licensed under the MIT license
*/
page{line-height:1.6;font-family:-apple-system-font,Helvetica Neue,sans-serif}icon{vertical-align:middle}.weui-cells{position:relative;margin-top:1.17647059em;background-color:#fff;line-height:1.41176471;font-size:17px}.weui-cells:before{top:0;border-top:1rpx solid #d9d9d9}.weui-cells:after,.weui-cells:before{content:" ";position:absolute;left:0;right:0;height:1px;color:#d9d9d9}.weui-cells:after{bottom:0;border-bottom:1rpx solid #d9d9d9}.weui-cells__title{margin-top:.77em;margin-bottom:.3em;padding-left:15px;padding-right:15px;color:#999;font-size:14px}.weui-cells_after-title{margin-top:0}.weui-cells__tips{margin-top:.3em;color:#999;padding-left:15px;padding-right:15px;font-size:14px}.weui-cell{padding:10px 15px;position:relative;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-cell:before{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid #d9d9d9;color:#d9d9d9;left:15px}.weui-cell:first-child:before{display:none}.weui-cell_active{background-color:#ececec}.weui-cell_primary{-webkit-box-align:start;-webkit-align-items:flex-start;align-items:flex-start}.weui-cell__bd{-webkit-box-flex:1;-webkit-flex:1;flex:1}.weui-cell__ft{text-align:right;color:#999}.weui-cell_access{color:inherit}.weui-cell__ft_in-access{padding-right:13px;position:relative}.weui-cell__ft_in-access:after{content:" ";display:inline-block;height:6px;width:6px;border-width:2px 2px 0 0;border-color:#c8c8cd;border-style:solid;-webkit-transform:matrix(.71,.71,-.71,.71,0,0);transform:matrix(.71,.71,-.71,.71,0,0);position:relative;top:-2px;position:absolute;top:50%;margin-top:-4px;right:2px}.weui-cell_link{color:#586c94;font-size:14px}.weui-cell_link:active{background-color:#ececec}.weui-cell_link:first-child:before{display:block}.weui-icon-radio{margin-left:3.2px;margin-right:3.2px}.weui-icon-checkbox_circle,.weui-icon-checkbox_success{margin-left:4.6px;margin-right:4.6px}.weui-check__label:active{background-color:#ececec}.weui-check{position:absolute;left:-9999px}.weui-check__hd_in-checkbox{padding-right:.35em}.weui-cell__ft_in-radio{padding-left:.35em}.weui-cell_input{padding-top:0;padding-bottom:0}.weui-label{width:105px;word-wrap:break-word;word-break:break-all}.weui-input{height:2.58823529em;min-height:2.58823529em;line-height:2.58823529em}.weui-toptips{position:fixed;-webkit-transform:translateZ(0);transform:translateZ(0);top:0;left:0;right:0;padding:5px;font-size:14px;text-align:center;color:#fff;z-index:5000;word-wrap:break-word;word-break:break-all}.weui-toptips_warn{background-color:#e64340}.weui-textarea{display:block;width:100%}.weui-textarea-counter{color:#b2b2b2;text-align:right}.weui-cell_warn,.weui-textarea-counter_warn{color:#e64340}.weui-form-preview{position:relative;background-color:#fff}.weui-form-preview:before{top:0;border-top:1rpx solid #d9d9d9}.weui-form-preview:after,.weui-form-preview:before{content:" ";position:absolute;left:0;right:0;height:1px;color:#d9d9d9}.weui-form-preview:after{bottom:0;border-bottom:1rpx solid #d9d9d9}.weui-form-preview__value{font-size:14px}.weui-form-preview__value_in-hd{font-size:26px}.weui-form-preview__hd{position:relative;padding:10px 15px;text-align:right;line-height:2.5em}.weui-form-preview__hd:after{content:" ";position:absolute;left:0;bottom:0;right:0;height:1px;border-bottom:1rpx solid #d9d9d9;color:#d9d9d9;left:15px}.weui-form-preview__bd{padding:10px 15px;font-size:.9em;text-align:right;color:#999;line-height:2}.weui-form-preview__ft{position:relative;line-height:50px;display:-webkit-box;display:-webkit-flex;display:flex}.weui-form-preview__ft:after{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid #d5d5d6;color:#d5d5d6}.weui-form-preview__item{overflow:hidden}.weui-form-preview__label{float:left;margin-right:1em;min-width:4em;color:#999;text-align:justify;text-align-last:justify}.weui-form-preview__value{display:block;overflow:hidden;word-break:normal;word-wrap:break-word}.weui-form-preview__btn{position:relative;display:block;-webkit-box-flex:1;-webkit-flex:1;flex:1;color:#3cc51f;text-align:center}.weui-form-preview__btn:after{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1rpx solid #d5d5d6;color:#d5d5d6}.weui-form-preview__btn:first-child:after{display:none}.weui-form-preview__btn_active{background-color:#eee}.weui-form-preview__btn_default{color:#999}.weui-form-preview__btn_primary{color:#0bb20c}.weui-cell_select{padding:0}.weui-select{position:relative;padding-left:15px;padding-right:30px;height:2.58823529em;min-height:2.58823529em;line-height:2.58823529em;border-right:1rpx solid #d9d9d9}.weui-select:before{content:" ";display:inline-block;height:6px;width:6px;border-width:2px 2px 0 0;border-color:#c8c8cd;border-style:solid;-webkit-transform:matrix(.71,.71,-.71,.71,0,0);transform:matrix(.71,.71,-.71,.71,0,0);position:relative;top:-2px;position:absolute;top:50%;right:15px;margin-top:-4px}.weui-select_in-select-after{padding-left:0}.weui-cell__bd_in-select-before,.weui-cell__hd_in-select-after{padding-left:15px}.weui-cell_vcode{padding-right:0}.weui-vcode-btn,.weui-vcode-img{margin-left:5px;height:2.58823529em;vertical-align:middle}.weui-vcode-btn{display:inline-block;padding:0 .6em 0 .7em;border-left:1px solid #e5e5e5;line-height:2.58823529em;font-size:17px;color:#3cc51f;white-space:nowrap}.weui-vcode-btn:active{color:#52a341}.weui-cell_switch{padding-top:6px;padding-bottom:6px}.weui-uploader__hd{display:-webkit-box;display:-webkit-flex;display:flex;padding-bottom:10px;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-uploader__title{-webkit-box-flex:1;-webkit-flex:1;flex:1}.weui-uploader__info{color:#b2b2b2}.weui-uploader__bd{margin-bottom:-4px;margin-right:-9px;overflow:hidden}.weui-uploader__file{float:left;margin-right:9px;margin-bottom:9px}.weui-uploader__img{display:block;width:79px;height:79px}.weui-uploader__file_status{position:relative}.weui-uploader__file_status:before{content:" ";position:absolute;top:0;right:0;bottom:0;left:0;background-color:rgba(0,0,0,.5)}.weui-uploader__file-content{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);color:#fff}.weui-uploader__input-box{float:left;position:relative;margin-right:9px;margin-bottom:9px;width:77px;height:77px;border:1px solid #d9d9d9}.weui-uploader__input-box:after,.weui-uploader__input-box:before{content:" ";position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);background-color:#d9d9d9}.weui-uploader__input-box:before{width:2px;height:39.5px}.weui-uploader__input-box:after{width:39.5px;height:2px}.weui-uploader__input-box:active{border-color:#999}.weui-uploader__input-box:active:after,.weui-uploader__input-box:active:before{background-color:#999}.weui-uploader__input{position:absolute;z-index:1;top:0;left:0;width:100%;height:100%;opacity:0}.weui-article{padding:20px 15px;font-size:15px}.weui-article__section{margin-bottom:1.5em}.weui-article__h1{font-size:18px;font-weight:400;margin-bottom:.9em}.weui-article__h2{font-size:16px;font-weight:400;margin-bottom:.34em}.weui-article__h3{font-weight:400;font-size:15px;margin-bottom:.34em}.weui-article__p{margin:0 0 .8em}.weui-msg{padding-top:36px;text-align:center}.weui-msg__link{display:inline;color:#586c94}.weui-msg__icon-area{margin-bottom:30px}.weui-msg__text-area{margin-bottom:25px;padding:0 20px}.weui-msg__title{margin-bottom:5px;font-weight:400;font-size:20px}.weui-msg__desc{font-size:14px;color:#999}.weui-msg__opr-area{margin-bottom:25px}.weui-msg__extra-area{margin-bottom:15px;font-size:14px;color:#999}@media screen and (min-height:438px){.weui-msg__extra-area{position:fixed;left:0;bottom:0;width:100%;text-align:center}}.weui-flex{display:-webkit-box;display:-webkit-flex;display:flex}.weui-flex__item{-webkit-box-flex:1;-webkit-flex:1;flex:1}.weui-btn{margin-top:15px}.weui-btn:first-child{margin-top:0}.weui-btn-area{margin:1.17647059em 15px .3em}.weui-agree{display:block;padding:.5em 15px;font-size:13px}.weui-agree__text{color:#999}.weui-agree__link{display:inline;color:#586c94}.weui-agree__checkbox{position:absolute;left:-9999px}.weui-agree__checkbox-icon{position:relative;top:2px;display:inline-block;border:1px solid #d1d1d1;background-color:#fff;border-radius:3px;width:11px;height:11px}.weui-agree__checkbox-icon-check{position:absolute;top:1px;left:1px}.weui-footer{color:#999;font-size:14px;text-align:center}.weui-footer_fixed-bottom{position:fixed;bottom:.52em;left:0;right:0}.weui-footer__links{font-size:0}.weui-footer__link{display:inline-block;vertical-align:top;margin:0 .62em;position:relative;font-size:14px;color:#586c94}.weui-footer__link:before{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1rpx solid #c7c7c7;color:#c7c7c7;left:-.65em;top:.36em;bottom:.36em}.weui-footer__link:first-child:before{display:none}.weui-footer__text{padding:0 .34em;font-size:12px}.weui-grids{border-top:1rpx solid #d9d9d9;border-left:1rpx solid #d9d9d9;overflow:hidden}.weui-grid{position:relative;float:left;padding:20px 10px;width:33.33333333%;box-sizing:border-box;border-right:1rpx solid #d9d9d9;border-bottom:1rpx solid #d9d9d9}.weui-grid_active{background-color:#ececec}.weui-grid__icon{display:block;width:28px;height:28px;margin:0 auto}.weui-grid__label{margin-top:5px;display:block;text-align:center;color:#000;font-size:14px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.weui-loading{margin:0 5px;width:20px;height:20px;display:inline-block;vertical-align:middle;-webkit-animation:a 1s steps(12) infinite;animation:a 1s steps(12) infinite;background:transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2NSA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNBQkE5QUEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDU4LjY2IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0IyQjJCMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=) no-repeat;background-size:100%}.weui-loading.weui-loading_transparent{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 100 100'%3E%3Cpath fill='none' d='M0 0h100v100H0z'/%3E%3Crect xmlns='http://www.w3.org/2000/svg' width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.56)' rx='5' ry='5' transform='translate(0 -30)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.5)' rx='5' ry='5' transform='rotate(30 105.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.43)' rx='5' ry='5' transform='rotate(60 75.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.38)' rx='5' ry='5' transform='rotate(90 65 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.32)' rx='5' ry='5' transform='rotate(120 58.66 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.28)' rx='5' ry='5' transform='rotate(150 54.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.25)' rx='5' ry='5' transform='rotate(180 50 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.2)' rx='5' ry='5' transform='rotate(-150 45.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.17)' rx='5' ry='5' transform='rotate(-120 41.34 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.14)' rx='5' ry='5' transform='rotate(-90 35 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.1)' rx='5' ry='5' transform='rotate(-60 24.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.03)' rx='5' ry='5' transform='rotate(-30 -5.98 65)'/%3E%3C/svg%3E")}@-webkit-keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.weui-badge{display:inline-block;padding:.15em .4em;min-width:8px;border-radius:18px;background-color:#e64340;color:#fff;line-height:1.2;text-align:center;font-size:12px;vertical-align:middle}.weui-badge_dot{padding:.4em;min-width:0}.weui-loadmore{width:65%;margin:1.5em auto;line-height:1.6em;font-size:14px;text-align:center}.weui-loadmore__tips{display:inline-block;vertical-align:middle}.weui-loadmore_line{border-top:1px solid #e5e5e5;margin-top:2.4em}.weui-loadmore__tips_in-line{position:relative;top:-.9em;padding:0 .55em;background-color:#fff;color:#999}.weui-loadmore__tips_in-dot{position:relative;padding:0 .16em;width:4px;height:1.6em}.weui-loadmore__tips_in-dot:before{content:" ";position:absolute;top:50%;left:50%;margin-top:-1px;margin-left:-2px;width:4px;height:4px;border-radius:50%;background-color:#e5e5e5}.weui-panel{background-color:#fff;margin-top:10px;position:relative;overflow:hidden}.weui-panel:first-child{margin-top:0}.weui-panel:before{top:0;border-top:1rpx solid #e5e5e5}.weui-panel:after,.weui-panel:before{content:" ";position:absolute;left:0;right:0;height:1px;color:#e5e5e5}.weui-panel:after{bottom:0;border-bottom:1rpx solid #e5e5e5}.weui-panel__hd{padding:14px 15px 10px;color:#999;font-size:13px;position:relative}.weui-panel__hd:after{content:" ";position:absolute;left:0;bottom:0;right:0;height:1px;border-bottom:1rpx solid #e5e5e5;color:#e5e5e5;left:15px}.weui-media-box{padding:15px;position:relative}.weui-media-box:before{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid #e5e5e5;color:#e5e5e5;left:15px}.weui-media-box:first-child:before{display:none}.weui-media-box__title{font-weight:400;font-size:17px;width:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:normal;word-wrap:break-word;word-break:break-all}.weui-media-box__desc{color:#999;font-size:13px;line-height:1.2;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.weui-media-box__info{margin-top:15px;padding-bottom:5px;font-size:13px;color:#cecece;line-height:1em;list-style:none;overflow:hidden}.weui-media-box__info__meta{float:left;padding-right:1em}.weui-media-box__info__meta_extra{padding-left:1em;border-left:1px solid #cecece}.weui-media-box__title_in-text{margin-bottom:8px}.weui-media-box_appmsg{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-media-box__thumb{width:100%;height:100%;vertical-align:top}.weui-media-box__hd_in-appmsg{margin-right:.8em;width:60px;height:60px;line-height:60px;text-align:center}.weui-media-box__bd_in-appmsg{-webkit-box-flex:1;-webkit-flex:1;flex:1;min-width:0}.weui-media-box_small-appmsg{padding:0}.weui-cells_in-small-appmsg{margin-top:0}.weui-cells_in-small-appmsg:before{display:none}.weui-progress{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-progress__bar{-webkit-box-flex:1;-webkit-flex:1;flex:1}.weui-progress__opr{margin-left:15px;font-size:0}.weui-navbar{display:-webkit-box;display:-webkit-flex;display:flex;position:absolute;z-index:500;top:0;width:100%;border-bottom:1rpx solid #ccc}.weui-navbar__item{position:relative;display:block;-webkit-box-flex:1;-webkit-flex:1;flex:1;padding:13px 0;text-align:center;font-size:0}.weui-navbar__item.weui-bar__item_on{color:#1aad19}.weui-navbar__slider{position:absolute;content:" ";left:0;bottom:0;width:6em;height:3px;background-color:#1aad19;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}.weui-navbar__title{display:inline-block;font-size:15px;max-width:8em;width:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:normal}.weui-tab{position:relative;height:100%}.weui-tab__panel{box-sizing:border-box;height:100%;padding-top:50px;overflow:auto;-webkit-overflow-scrolling:touch}.weui-search-bar{position:relative;padding:8px 10px;display:-webkit-box;display:-webkit-flex;display:flex;box-sizing:border-box;background-color:#efeff4;border-top:1rpx solid #d7d6dc;border-bottom:1rpx solid #d7d6dc}.weui-icon-search{margin-right:8px;font-size:inherit}.weui-icon-search_in-box{position:absolute;left:10px;top:7px}.weui-search-bar__text{display:inline-block;font-size:14px;vertical-align:middle}.weui-search-bar__form{position:relative;-webkit-box-flex:1;-webkit-flex:auto;flex:auto;border-radius:5px;background:#fff;border:1rpx solid #e6e6ea}.weui-search-bar__box{position:relative;padding-left:30px;padding-right:30px;width:100%;box-sizing:border-box;z-index:1}.weui-search-bar__input{height:28px;line-height:28px;font-size:14px}.weui-icon-clear{position:absolute;top:0;right:0;padding:7px 8px;font-size:0}.weui-search-bar__label{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;border-radius:3px;text-align:center;color:#9b9b9b;background:#fff;line-height:28px}.weui-search-bar__cancel-btn{margin-left:10px;line-height:28px;color:#09bb07;white-space:nowrap}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!