Commit 66f4eec8 by 张立顺

chore: migrate legacy master snapshot

Source: git@192.168.3.233:micro-customization-system/e-shield-applet.git
Source-Commit: 487523cfd43c4ec26ab07cc5ceb4922c7665ff93
1 parent 8293d285
Showing 135 changed files with 4670 additions and 0 deletions
/*
* Eslint config file
* Documentation: https://eslint.org/docs/user-guide/configuring/
* Install the Eslint extension before using this feature.
*/
module.exports = {
env: {
es6: true,
browser: true,
node: true,
},
ecmaFeatures: {
modules: true,
},
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
globals: {
wx: true,
App: true,
Page: true,
getCurrentPages: true,
getApp: true,
Component: true,
requirePlugin: true,
requireMiniProgram: true,
},
// extends: 'eslint:recommended',
rules: {},
}
# Windows
[Dd]esktop.ini
Thumbs.db
$RECYCLE.BIN/
# macOS
.DS_Store
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
# Node.js
node_modules/
miniprogram_npm/
File mode changed
// app.js
App({
onLaunch() {
const that = this;
// 展示本地存储能力
// const logs = wx.getStorageSync('logs') || []
// logs.unshift(Date.now())
// wx.setStorageSync('logs', logs)
// 获取系统信息
const systemInfo = wx.getSystemInfoSync();
that.globalData.navBarHeight = systemInfo.statusBarHeight + 44;
that.globalData.statusBarHeight = systemInfo.statusBarHeight;
that.globalData.system = systemInfo.platform;
that.globalData.shared = wx.getStorageSync('shared')
// 检测小程序是否有更新
const updateManager = wx.getUpdateManager()
updateManager.onCheckForUpdate(function (res) {
// 请求完新版本信息的回调
//console.log(res.hasUpdate)
})
updateManager.onUpdateReady(function () {
wx.showModal({
title: '更新提示',
content: '新版本已经准备好,是否重启应用?',
success: function (res) {
if (res.confirm) {
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager.applyUpdate()
}
}
})
})
//引入公共的js
//const Interfaces = require('http/interfaces.js');
//const request = require('http/request.js');
//this.globalData.Interfaces = Interfaces;
//this.globalData.request = request;
// 登录
// wx.login({
// success: res => {
// // 发送 res.code 到后台换取 openId, sessionKey, unionId
// console.log(res)
// let oParams = {}
// oParams.code = res.code;
// }
// })
},
globalData: {
userInfo: {},
shared: false, // 是否分享
shareId: '', // 分享ID
navBarHeight: 0,
statusBarHeight: 0,
platform: '', // 机型
alarmInfo: ''
}
})
\ No newline at end of file \ No newline at end of file
{
"pages": [
"pages/login/index",
"pages/tabbar/index",
"pages/tabbar/board",
"pages/tabbar/my",
"pages/loading/index"
],
"subpackages": [{
"root": "myPackage",
"pages": [
"pages/service",
"pages/collect",
"pages/risk",
"pages/order",
"pages/insurance",
"pages/fm",
"pages/collect_handle",
"pages/collect_detail",
"pages/fm_detail",
"pages/fm_shared"
]
},
{
"root": "mapPackage",
"pages": [
"pages/findCar",
"pages/tracking"
]
},
{
"root": "webPackage",
"pages": [
"pages/webview"
]
}
],
"preloadRule": {
"pages/tabbar/my": {
"network": "all",
"packages": [
"myPackage"
]
},
"pages/tabbar/index": {
"network": "all",
"packages": [
"mapPackage"
]
}
},
"tabBar": {
"custom": false,
"color": "#111",
"selectedColor": "#0077FF",
"backgroundColor": "#FAFBFC",
"list": [{
"pagePath": "pages/tabbar/board",
"iconPath": "images/tab-home.png",
"selectedIconPath": "images/tab-home-active.png",
"text": "看板"
},
{
"pagePath": "pages/tabbar/index",
"iconPath": "images/tab-findcar.png",
"selectedIconPath": "images/tab-findcar-active.png",
"text": "找车"
},
{
"pagePath": "pages/tabbar/my",
"iconPath": "images/tab-mine.png",
"selectedIconPath": "images/tab-mine-active.png",
"text": "我的"
}
]
},
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "Weixin",
"navigationBarTextStyle": "black"
},
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于小程序位置接口的效果展示"
}
},
"usingComponents": {
"van-icon": "@vant/weapp/icon/index",
"van-button": "@vant/weapp/button/index",
"glsx-image": "/components/image/index",
"glsx-nodata": "/components/nodata/index",
"glsx-privacy": "glsx-applet-component/GlsxPrivacy/index"
},
"initialRenderingCache": "dynamic",
"lazyCodeLoading": "requiredComponents",
"style": "v2",
"sitemapLocation": "sitemap.json",
"__usePrivacyCheck__": true
}
\ No newline at end of file \ No newline at end of file
/**app.wxss**/
page {
font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica,
Segoe UI, Arial, Roboto, 'PingFang SC', 'miui', 'Hiragino Sans GB', 'Microsoft Yahei',
sans-serif;
}
.page_grey {
background: #F5F6F7;
min-height: 100vh;
box-sizing: border-box;
border-top: 1rpx solid transparent;
padding-bottom: 10rpx;
}
.van-ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap
}
.van-multi-ellipsis--l2 {
-webkit-line-clamp: 2
}
.van-multi-ellipsis--l2,
.van-multi-ellipsis--l3 {
-webkit-box-orient: vertical;
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis
}
.van-multi-ellipsis--l3 {
-webkit-line-clamp: 3
}
.van-clearfix:after {
clear: both;
content: "";
display: table
}
.van-hairline,
.van-hairline--bottom,
.van-hairline--left,
.van-hairline--right,
.van-hairline--surround,
.van-hairline--top,
.van-hairline--top-bottom {
position: relative
}
.van-hairline--bottom:after,
.van-hairline--left:after,
.van-hairline--right:after,
.van-hairline--surround:after,
.van-hairline--top-bottom:after,
.van-hairline--top:after,
.van-hairline:after {
border: 0 solid #ebedf0;
bottom: -50%;
box-sizing: border-box;
content: " ";
left: -50%;
pointer-events: none;
position: absolute;
right: -50%;
top: -50%;
transform: scale(.5);
transform-origin: center
}
.van-hairline--top:after {
border-top-width: 1px
}
.van-hairline--left:after {
border-left-width: 1px
}
.van-hairline--right:after {
border-right-width: 1px
}
.van-hairline--bottom:after {
border-bottom-width: 1px
}
.van-hairline--top-bottom:after {
border-width: 1px 0
}
.van-hairline--surround:after {
border-width: 1px
}
.c_orange {
color: #FF6600;
}
.c_red {
color: #f00;
}
.c_green {
color: #008000;
}
.ec-canvas {
width: 100%;
height: 600px;
}
\ No newline at end of file \ No newline at end of file
// components/board/report.js
var app = getApp()
Component({
/**
* 组件的属性列表
*/
properties: {
data: {
type: Object,
value: {}
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
// 页面跳转
linkEvent() {
let options = this.data.data;
app.globalData.alarmInfo = options
wx.switchTab({
url: '/pages/tabbar/index',
})
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<!--components/board/report.wxml-->
<view class="report_row">
<view class="title">
<view class="name">{{data.ownerName||'--'}}</view>
<view class="status">
<!-- <glsx-image src="icon_01.png" custom-class="img"></glsx-image> -->
</view>
</view>
<view class="report_content" bindtap="linkEvent">
<view class="report_detail">
<view class="cell">
<view class="label">围栏名称</view>
<view class="txt">{{data.fenceName||'--'}}</view>
</view>
<view class="cell">
<view class="label">车架号</view>
<view class="txt">{{data.vin||'--'}}</view>
</view>
<view class="cell">
<view class="label">设备号</view>
<view class="txt">{{data.sn||'--'}}</view>
</view>
<view class="cell">
<view class="label">时间</view>
<view class="txt">{{data.alarmTime||'--'}}</view>
</view>
</view>
<view class="report_icon">
<van-icon name="arrow" />
</view>
</view>
<!-- <view class="detail">
<view class="">查看详情</view>
<van-icon name="arrow" />
</view> -->
</view>
\ No newline at end of file \ No newline at end of file
/* components/board/report.wxss */
.report_row {
background: #fff;
padding: 0 40rpx;
margin: 0 0 20rpx 0;
}
.report_row .title {
position: relative;
display: flex;
justify-content: space-between;
font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #111111;
padding: 20rpx 0;
}
.report_row .title:after {
display: block;
content: "";
height: 1rpx;
background: #F5F6F7;
position: absolute;
left: 0;
right: 0;
bottom: 0;
}
.report_row .title .status {
width: 32rpx;
height: 32rpx;
}
.report_row .title .status .img {
width: 100%;
height: 100%;
}
.report_content {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx 0;
}
.report_detail .cell {
display: flex;
align-items: center;
font-size: 28rpx;
/* padding: 0 20rpx; */
margin: 16rpx 0;
}
.report_detail .cell:last-child {
margin-bottom: 0;
}
.report_detail .cell .label {
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #9CA4AD;
width: 120rpx;
}
.report_detail .cell .txt {
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #111111;
}
.report_icon {
color: #9CA4AD;
}
\ No newline at end of file \ No newline at end of file
// components/board/report.js
var app = getApp()
Component({
/**
* 组件的属性列表
*/
properties: {
data: {
type: Object,
value: {}
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
// 页面跳转
linkEvent() {
let options = this.data.data;
app.globalData.alarmInfo = options
wx.switchTab({
url: '/pages/tabbar/index',
})
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<!--components/board/report.wxml-->
<view class="report_row">
<view class="title">
<view class="name">{{data.ownerName||'--'}}</view>
<view class="status">
<!-- <glsx-image src="icon_01.png" custom-class="img"></glsx-image> -->
</view>
</view>
<view class="report_content" bindtap="linkEvent">
<view class="report_detail">
<view class="cell">
<view class="label">车架号</view>
<view class="txt">{{data.vin||'--'}}</view>
</view>
<view class="cell">
<view class="label">设备号</view>
<view class="txt">{{data.sn||'--'}}</view>
</view>
<view class="cell">
<view class="label">时间</view>
<view class="txt">{{data.lastGpsTime||'--'}}</view>
</view>
</view>
<view class="report_icon">
<van-icon name="arrow" />
</view>
</view>
<!-- <view class="detail">
<view class="">查看详情</view>
<van-icon name="arrow" />
</view> -->
</view>
\ No newline at end of file \ No newline at end of file
/* components/board/report.wxss */
.report_row {
background: #fff;
padding: 0 40rpx;
margin: 0 0 20rpx 0;
}
.report_row .title {
position: relative;
display: flex;
justify-content: space-between;
font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #111111;
padding: 20rpx 0;
}
.report_row .title:after {
display: block;
content: "";
height: 1rpx;
background: #F5F6F7;
position: absolute;
left: 0;
right: 0;
bottom: 0;
}
.report_row .title .status {
width: 32rpx;
height: 32rpx;
}
.report_row .title .status .img {
width: 100%;
height: 100%;
}
.report_content {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx 0;
}
.report_detail .cell {
display: flex;
align-items: center;
font-size: 28rpx;
/* padding: 0 20rpx; */
margin: 16rpx 0;
}
.report_detail .cell:last-child {
margin-bottom: 0;
}
.report_detail .cell .label {
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #9CA4AD;
width: 120rpx;
}
.report_detail .cell .txt {
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #111111;
}
.report_icon {
color: #9CA4AD;
}
\ No newline at end of file \ No newline at end of file
// 低电量
var app = getApp()
Component({
/**
* 组件的属性列表
*/
properties: {
data: {
type: Object,
value: {}
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
// 页面跳转
linkEvent() {
let options = this.data.data;
app.globalData.alarmInfo = options
wx.switchTab({
url: '/pages/tabbar/index',
})
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<!--components/board/report.wxml-->
<view class="report_row">
<view class="title">
<view class="name">{{data.ownerName||'--'}}</view>
<view class="status">
<!-- <glsx-image src="icon_01.png" custom-class="img"></glsx-image> -->
</view>
</view>
<view class="report_content" bindtap="linkEvent">
<view class="report_detail">
<view class="cell">
<view class="label">车架号</view>
<view class="txt">{{data.vin||'--'}}</view>
</view>
<view class="cell">
<view class="label">设备号</view>
<view class="txt">{{data.sn||'--'}}</view>
</view>
<view class="cell">
<view class="label">时间</view>
<view class="txt">{{data.alarmTime||'--'}}</view>
</view>
</view>
<view class="report_icon">
<van-icon name="arrow" />
</view>
</view>
<!-- <view class="detail">
<view class="">查看详情</view>
<van-icon name="arrow" />
</view> -->
</view>
\ No newline at end of file \ No newline at end of file
/* components/board/report.wxss */
.report_row {
background: #fff;
padding: 0 40rpx;
margin: 0 0 20rpx 0;
}
.report_row .title {
position: relative;
display: flex;
justify-content: space-between;
font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #111111;
padding: 20rpx 0;
}
.report_row .title:after {
display: block;
content: "";
height: 1rpx;
background: #F5F6F7;
position: absolute;
left: 0;
right: 0;
bottom: 0;
}
.report_row .title .status {
width: 32rpx;
height: 32rpx;
}
.report_row .title .status .img {
width: 100%;
height: 100%;
}
.report_content {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx 0;
}
.report_detail .cell {
display: flex;
align-items: center;
font-size: 28rpx;
/* padding: 0 20rpx; */
margin: 16rpx 0;
}
.report_detail .cell:last-child {
margin-bottom: 0;
}
.report_detail .cell .label {
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #9CA4AD;
width: 120rpx;
}
.report_detail .cell .txt {
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #111111;
}
.report_icon {
color: #9CA4AD;
}
\ No newline at end of file \ No newline at end of file
// components/board/report.js
var app = getApp()
Component({
/**
* 组件的属性列表
*/
properties: {
data: {
type: Object,
value: {}
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
// 页面跳转
linkEvent() {
let options = this.data.data;
app.globalData.alarmInfo = options
wx.switchTab({
url: '/pages/tabbar/index',
})
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<!--components/board/report.wxml-->
<view class="report_row">
<view class="title">
<view class="name">{{data.ownerName||'--'}}</view>
<view class="status">
<glsx-image src="icon_01.png" custom-class="img" wx:if="{{data.alarmType == 99}}"></glsx-image>
<glsx-image src="icon_02.png" custom-class="img" wx:if="{{data.alarmType == 1}}"></glsx-image>
</view>
</view>
<view class="report_content" bindtap="linkEvent">
<view class="report_detail">
<view class="cell">
<view class="label">车架号</view>
<view class="txt">{{data.vin||'--'}}</view>
</view>
<view class="cell">
<view class="label">设备号</view>
<view class="txt">{{data.sn||'--'}}</view>
</view>
<view class="cell">
<view class="label">时间</view>
<view class="txt">{{data.beginTime||'--'}}</view>
</view>
</view>
<view class="report_icon">
<van-icon name="arrow" />
</view>
</view>
<!-- <view class="detail">
<view class="">查看详情</view>
<van-icon name="arrow" />
</view> -->
</view>
\ No newline at end of file \ No newline at end of file
/* components/board/report.wxss */
.report_row {
background: #fff;
padding: 0 40rpx;
margin: 0 0 20rpx 0;
}
.report_row .title {
position: relative;
display: flex;
justify-content: space-between;
font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #111111;
padding: 20rpx 0;
}
.report_row .title:after {
display: block;
content: "";
height: 1rpx;
background: #F5F6F7;
position: absolute;
left: 0;
right: 0;
bottom: 0;
}
.report_row .title .status {
width: 32rpx;
height: 32rpx;
}
.report_row .title .status .img {
width: 100%;
height: 100%;
}
.report_content {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx 0;
}
.report_detail .cell {
display: flex;
align-items: center;
font-size: 28rpx;
/* padding: 0 20rpx; */
margin: 16rpx 0;
}
.report_detail .cell:last-child {
margin-bottom: 0;
}
.report_detail .cell .label {
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #9CA4AD;
width: 120rpx;
}
.report_detail .cell .txt {
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #111111;
}
.report_icon {
color: #9CA4AD;
}
\ No newline at end of file \ No newline at end of file
import WxCanvas from './wx-canvas';
import * as echarts from './echarts';
let ctx;
function compareVersion(v1, v2) {
v1 = v1.split('.')
v2 = v2.split('.')
const len = Math.max(v1.length, v2.length)
while (v1.length < len) {
v1.push('0')
}
while (v2.length < len) {
v2.push('0')
}
for (let i = 0; i < len; i++) {
const num1 = parseInt(v1[i])
const num2 = parseInt(v2[i])
if (num1 > num2) {
return 1
} else if (num1 < num2) {
return -1
}
}
return 0
}
Component({
properties: {
canvasId: {
type: String,
value: 'ec-canvas'
},
ec: {
type: Object
},
forceUseOldCanvas: {
type: Boolean,
value: false
}
},
data: {
isUseNewCanvas: false
},
ready: function () {
// Disable prograssive because drawImage doesn't support DOM as parameter
// See https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.drawImage.html
echarts.registerPreprocessor(option => {
if (option && option.series) {
if (option.series.length > 0) {
option.series.forEach(series => {
series.progressive = 0;
});
}
else if (typeof option.series === 'object') {
option.series.progressive = 0;
}
}
});
if (!this.data.ec) {
console.warn('组件需绑定 ec 变量,例:<ec-canvas id="mychart-dom-bar" '
+ 'canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>');
return;
}
if (!this.data.ec.lazyLoad) {
this.init();
}
},
methods: {
init: function (callback) {
const version = wx.getSystemInfoSync().SDKVersion
const canUseNewCanvas = compareVersion(version, '2.9.0') >= 0;
const forceUseOldCanvas = this.data.forceUseOldCanvas;
const isUseNewCanvas = canUseNewCanvas && !forceUseOldCanvas;
this.setData({ isUseNewCanvas });
if (forceUseOldCanvas && canUseNewCanvas) {
console.warn('开发者强制使用旧canvas,建议关闭');
}
if (isUseNewCanvas) {
// console.log('微信基础库版本大于2.9.0,开始使用<canvas type="2d"/>');
// 2.9.0 可以使用 <canvas type="2d"></canvas>
this.initByNewWay(callback);
} else {
const isValid = compareVersion(version, '1.9.91') >= 0
if (!isValid) {
console.error('微信基础库版本过低,需大于等于 1.9.91。'
+ '参见:https://github.com/ecomfe/echarts-for-weixin'
+ '#%E5%BE%AE%E4%BF%A1%E7%89%88%E6%9C%AC%E8%A6%81%E6%B1%82');
return;
} else {
console.warn('建议将微信基础库调整大于等于2.9.0版本。升级后绘图将有更好性能');
this.initByOldWay(callback);
}
}
},
initByOldWay(callback) {
// 1.9.91 <= version < 2.9.0:原来的方式初始化
ctx = wx.createCanvasContext(this.data.canvasId, this);
const canvas = new WxCanvas(ctx, this.data.canvasId, false);
echarts.setCanvasCreator(() => {
return canvas;
});
// const canvasDpr = wx.getSystemInfoSync().pixelRatio // 微信旧的canvas不能传入dpr
const canvasDpr = 1
var query = wx.createSelectorQuery().in(this);
query.select('.ec-canvas').boundingClientRect(res => {
if (typeof callback === 'function') {
this.chart = callback(canvas, res.width, res.height, canvasDpr);
}
else if (this.data.ec && typeof this.data.ec.onInit === 'function') {
this.chart = this.data.ec.onInit(canvas, res.width, res.height, canvasDpr);
}
else {
this.triggerEvent('init', {
canvas: canvas,
width: res.width,
height: res.height,
canvasDpr: canvasDpr // 增加了dpr,可方便外面echarts.init
});
}
}).exec();
},
initByNewWay(callback) {
// version >= 2.9.0:使用新的方式初始化
const query = wx.createSelectorQuery().in(this)
query
.select('.ec-canvas')
.fields({ node: true, size: true })
.exec(res => {
const canvasNode = res[0].node
this.canvasNode = canvasNode
const canvasDpr = wx.getSystemInfoSync().pixelRatio
const canvasWidth = res[0].width
const canvasHeight = res[0].height
const ctx = canvasNode.getContext('2d')
const canvas = new WxCanvas(ctx, this.data.canvasId, true, canvasNode)
echarts.setCanvasCreator(() => {
return canvas
})
if (typeof callback === 'function') {
this.chart = callback(canvas, canvasWidth, canvasHeight, canvasDpr)
} else if (this.data.ec && typeof this.data.ec.onInit === 'function') {
this.chart = this.data.ec.onInit(canvas, canvasWidth, canvasHeight, canvasDpr)
} else {
this.triggerEvent('init', {
canvas: canvas,
width: canvasWidth,
height: canvasHeight,
dpr: canvasDpr
})
}
})
},
canvasToTempFilePath(opt) {
if (this.data.isUseNewCanvas) {
// 新版
const query = wx.createSelectorQuery().in(this)
query
.select('.ec-canvas')
.fields({ node: true, size: true })
.exec(res => {
const canvasNode = res[0].node
opt.canvas = canvasNode
wx.canvasToTempFilePath(opt)
})
} else {
// 旧的
if (!opt.canvasId) {
opt.canvasId = this.data.canvasId;
}
ctx.draw(true, () => {
wx.canvasToTempFilePath(opt, this);
});
}
},
touchStart(e) {
if (this.chart && e.touches.length > 0) {
var touch = e.touches[0];
var handler = this.chart.getZr().handler;
handler.dispatch('mousedown', {
zrX: touch.x,
zrY: touch.y,
preventDefault: () => {},
stopImmediatePropagation: () => {},
stopPropagation: () => {}
});
handler.dispatch('mousemove', {
zrX: touch.x,
zrY: touch.y,
preventDefault: () => {},
stopImmediatePropagation: () => {},
stopPropagation: () => {}
});
handler.processGesture(wrapTouch(e), 'start');
}
},
touchMove(e) {
if (this.chart && e.touches.length > 0) {
var touch = e.touches[0];
var handler = this.chart.getZr().handler;
handler.dispatch('mousemove', {
zrX: touch.x,
zrY: touch.y,
preventDefault: () => {},
stopImmediatePropagation: () => {},
stopPropagation: () => {}
});
handler.processGesture(wrapTouch(e), 'change');
}
},
touchEnd(e) {
if (this.chart) {
const touch = e.changedTouches ? e.changedTouches[0] : {};
var handler = this.chart.getZr().handler;
handler.dispatch('mouseup', {
zrX: touch.x,
zrY: touch.y,
preventDefault: () => {},
stopImmediatePropagation: () => {},
stopPropagation: () => {}
});
handler.dispatch('click', {
zrX: touch.x,
zrY: touch.y,
preventDefault: () => {},
stopImmediatePropagation: () => {},
stopPropagation: () => {}
});
handler.processGesture(wrapTouch(e), 'end');
}
}
}
});
function wrapTouch(event) {
for (let i = 0; i < event.touches.length; ++i) {
const touch = event.touches[i];
touch.offsetX = touch.x;
touch.offsetY = touch.y;
}
return event;
}
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<!-- 新的:接口对其了H5 -->
<canvas wx:if="{{isUseNewCanvas}}" type="2d" class="ec-canvas" canvas-id="{{ canvasId }}" bindinit="init" bindtouchstart="{{ ec.disableTouch ? '' : 'touchStart' }}" bindtouchmove="{{ ec.disableTouch ? '' : 'touchMove' }}" bindtouchend="{{ ec.disableTouch ? '' : 'touchEnd' }}"></canvas>
<!-- 旧的 -->
<canvas wx:else class="ec-canvas" canvas-id="{{ canvasId }}" bindinit="init" bindtouchstart="{{ ec.disableTouch ? '' : 'touchStart' }}" bindtouchmove="{{ ec.disableTouch ? '' : 'touchMove' }}" bindtouchend="{{ ec.disableTouch ? '' : 'touchEnd' }}"></canvas>
.ec-canvas {
width: 100%;
height: 100%;
}
This diff could not be displayed because it is too large.
export default class WxCanvas {
constructor(ctx, canvasId, isNew, canvasNode) {
this.ctx = ctx;
this.canvasId = canvasId;
this.chart = null;
this.isNew = isNew
if (isNew) {
this.canvasNode = canvasNode;
}
else {
this._initStyle(ctx);
}
// this._initCanvas(zrender, ctx);
this._initEvent();
}
getContext(contextType) {
if (contextType === '2d') {
return this.ctx;
}
}
// canvasToTempFilePath(opt) {
// if (!opt.canvasId) {
// opt.canvasId = this.canvasId;
// }
// return wx.canvasToTempFilePath(opt, this);
// }
setChart(chart) {
this.chart = chart;
}
addEventListener() {
// noop
}
attachEvent() {
// noop
}
detachEvent() {
// noop
}
_initCanvas(zrender, ctx) {
zrender.util.getContext = function () {
return ctx;
};
zrender.util.$override('measureText', function (text, font) {
ctx.font = font || '12px sans-serif';
return ctx.measureText(text);
});
}
_initStyle(ctx) {
ctx.createRadialGradient = () => {
return ctx.createCircularGradient(arguments);
};
}
_initEvent() {
this.event = {};
const eventNames = [{
wxName: 'touchStart',
ecName: 'mousedown'
}, {
wxName: 'touchMove',
ecName: 'mousemove'
}, {
wxName: 'touchEnd',
ecName: 'mouseup'
}, {
wxName: 'touchEnd',
ecName: 'click'
}];
eventNames.forEach(name => {
this.event[name.wxName] = e => {
const touch = e.touches[0];
this.chart.getZr().handler.dispatch(name.ecName, {
zrX: name.wxName === 'tap' ? touch.clientX : touch.x,
zrY: name.wxName === 'tap' ? touch.clientY : touch.y,
preventDefault: () => {},
stopImmediatePropagation: () => {},
stopPropagation: () => {}
});
};
});
}
set width(w) {
if (this.canvasNode) this.canvasNode.width = w
}
set height(h) {
if (this.canvasNode) this.canvasNode.height = h
}
get width() {
if (this.canvasNode)
return this.canvasNode.width
return 0
}
get height() {
if (this.canvasNode)
return this.canvasNode.height
return 0
}
}
// components/image/index.js
Component({
externalClasses: ['custom-class','class'],
/**
* 组件的属性列表
*/
properties: {
src: {
type: String,
value: ''
},
mode: {
type: String,
value: 'scaleToFill'
}
},
/**
* 组件的初始数据
*/
data: {
imagePath: ''
},
// 组件生命周期
lifetimes: {
// 在组件实例进入页面节点树时执行
attached: function () {
let src = this.data.src
let prefix = 'https://img02.glsx.com.cn/weapp/resource/e-shield-applet/'
this.setData({
imagePath: `${prefix}${src}`
})
},
// 在组件实例被从页面节点树移除时执行
detached: function () {
}
},
/**
* 组件的方法列表
*/
methods: {
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<!--components/image/index.wxml-->
<image src="{{imagePath}}" mode="{{mode}}" lazy-load class="custom-class class"></image>
\ No newline at end of file \ No newline at end of file
/* components/image/index.wxss */
\ No newline at end of file \ No newline at end of file
// components/nodata/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
tips: '暂无数据'
},
/**
* 组件的方法列表
*/
methods: {
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<!--components/nodata/index.wxml-->
<view class="glsx_nodata">
<glsx-image src="nodata.png" custom-class="img"></glsx-image>
<view class="tips">{{tips}}</view>
</view>
\ No newline at end of file \ No newline at end of file
/* components/nodata/index.wxss */
.glsx_nodata {
text-align: center;
}
.glsx_nodata .img {
width: 368rpx;
height: 192rpx;
margin-bottom: 32rpx;
}
.glsx_nodata .tips {
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #9FA6AD;
}
\ No newline at end of file \ No newline at end of file
// components/search/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
term: ''
},
/**
* 组件的方法列表
*/
methods: {
// 监听输入方法
onInput(e) {
this.triggerEvent('input', e.detail.value)
},
//监听输入完点击完成
onComfirm(e) {
let txt = e.detail.value
if (!txt) {
return false;
}
if (txt.length < 2) {
wx.showToast({
title: '最少输入两个字符',
icon: 'none'
})
return false;
}
this.triggerEvent('confirm', txt)
},
// 监听输入框失去焦点
onBlur(e) {
this.triggerEvent('blur', e.detail.value)
},
// 清除搜索输入
clearSearch() {
this.setData({
term: ''
})
this.triggerEvent('clear', '')
},
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {
"van-icon": "@vant/weapp/icon/index"
}
}
\ No newline at end of file \ No newline at end of file
<!--components/search/index.wxml-->
<!-- 顶部搜索 开始 -->
<view class="top_search">
<view class="search_box">
<view class="icon_box">
<glsx-image src="search@2x.png" custom-class="img"></glsx-image>
</view>
<view class="input_box">
<input type="text" model:value="{{ term }}" confirm-type="search" class="a_input" bind:confirm="onComfirm" bind:input="onInput" bind:blur="onBlur" placeholder="输入两位以上关键字搜索" />
</view>
<view class="close_box">
<van-icon name="clear" wx:if="{{term}}" bindtap="clearSearch" />
</view>
</view>
</view>
<!-- 顶部搜索 end -->
\ No newline at end of file \ No newline at end of file
/* components/search/index.wxss */
.top_search {
background: #fff;
padding: 12rpx 24rpx;
}
.top_search .search_box {
display: flex;
align-items: center;
height: 88rpx;
background: #F5F6F7;
border-radius: 12rpx;
padding: 0 24rpx;
box-sizing: border-box;
}
.top_search .search_box .input_box {
flex: 1;
}
.top_search .search_box .input_box .a_input {
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
padding: 0 8rpx;
}
.top_search .search_box .input_box .input-placeholder {
color: #C4C8CC;
}
.top_search .search_box .icon_box {
display: flex;
align-items: center;
}
.top_search .search_box .icon_box .img {
width: 40rpx;
height: 40rpx;
margin-top: 6rpx;
}
.top_search .search_box .close_box .van-icon {
color: #c8c9cc;
font-size: 36rpx;
}
\ No newline at end of file \ No newline at end of file
Component({
data: {
selected: 1,
color: "#7A7E83",
selectedColor: "#0077FF",
list: [{
pagePath: "/pages/tabbar/board",
iconPath: "/images/tab-home.png",
selectedIconPath: "/images/tab-home-active.png",
text: "看板",
customClass: ''
}, {
pagePath: "/pages/tabbar/index",
iconPath: "/images/tab-findcar.png",
selectedIconPath: "/images/tab-findcar-active.png",
text: "找车",
customClass: 'custom_select_bar',
isSpecial: true
}, {
pagePath: "/pages/tabbar/my",
iconPath: "/images/tab-mine.png",
selectedIconPath: "/images/tab-mine-active.png",
text: "我的",
customClass: ''
}]
},
attached() {},
methods: {
switchTab(e) {
console.log(e)
const data = e.currentTarget.dataset
const url = data.path
this.setData({
selected: data.index
})
wx.switchTab({
url: url
})
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<cover-view class="tab-bar">
<cover-view class="tab-bar-border"></cover-view>
<!-- <cover-view class="tab-bar-inner"> -->
<cover-view wx:for="{{list}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="switchTab">
<cover-view class="custom_img">
<cover-image src="{{selected === index ? item.selectedIconPath : item.iconPath}}" class="img"></cover-image>
<cover-view class="cover_text" style="color: {{selected === index ? selectedColor : color}}">{{item.text}}</cover-view>
</cover-view>
</cover-view>
<!-- </cover-view> -->
</cover-view>
\ No newline at end of file \ No newline at end of file
/* cover-view {
overflow: inherit !important;
} */
.tab-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 96rpx;
padding-bottom: env(safe-area-inset-bottom);
/* background: #f00; */
/* background:rgba(256, 256, 256, 0.8); */
/* padding-top: 20rpx; */
box-shadow: 0px -2rpx 4rpx 0px rgba(0, 0, 0, 0.0600);
display: flex;
align-items: flex-end;
background: white;
}
/* .tab-bar-inner {
position: absolute;
bottom:0;
left:0;
right:0;
height: 96rpx;
box-shadow: 0px -2rpx 4rpx 0px rgba(0, 0, 0, 0.0600);
display: flex;
align-items: flex-end;
background: white;
} */
.tab-bar-border {
background-color: #F0F2F5;
position: fixed;
left: 0;
bottom: 96rpx;
width: 100%;
height: 1rpx;
transform: scaleY(0.5);
z-index: 2;
opacity: 0.4
}
/*
.tab-bar:after {
position: absolute;
display: block;
content: "";
height: 1rpx;
background: #f00;
left: 0;
right: 0;
bottom: 99rpx;
transform: scaleY(0.5);
z-index: 9999;
} */
.tab-bar-item {
position: relative;
flex: 1;
flex-shrink: 0;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
border: 0;
top: 0;
font-size: 20rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #111111;
}
.tab-bar-item cover-image {
width: 64rpx;
height: 64rpx;
}
.tab-bar-item cover-view {
font-size: 12px;
}
.cover_text {
margin-bottom: 4rpx;
}
\ No newline at end of file \ No newline at end of file
// 首页看板接口
import request from './request'
const prefix = 'miniappserver'
// 查询看板统计信息
export const GET_ACTIVE_STATICINFO = params => {
return request({
url: `${prefix}/dashboard/statisticalInfo`,
data: params
})
}
// 查询设备激活趋势
export const GET_ACTIVE_DEVICEINFO = params => {
return request({
url: `${prefix}/dashboard/getActiveDeviceWeekReport`,
data: params
})
}
// 查询围栏报警
export const GET_FENCE_ALARMINFO = params => {
return request({
url: `${prefix}/dashboard/getFenceAlarmInfo`,
data: params
})
}
// 查询离线报警
export const GET_OFFLINE_ALARMINFO = params => {
return request({
url: `${prefix}/dashboard/getOfflineAlarmInfo`,
data: params
})
}
// 查询拆防报警
export const GET_TRACK_ALARMINFO = params => {
return request({
url: `${prefix}/dashboard/getTrackAlarmInfo`,
data: params
})
}
// 查询低电量统计
export const GET_POWER_ALARMINFO = params => {
return request({
url: `${prefix}/dashboard/pageLowPower`,
data: params
})
}
// 是否配置假性离线数据展示
export const GET_PSEUDO_OFFLINE = params => {
return request({
url: `${prefix}/menu/getPermissionMenuByTag`,
data: params
})
}
\ No newline at end of file \ No newline at end of file
/**
* 接口环
* development:开发环境
* test:测试环境
* production:生产环境
*/
const environment = 'production'
// 请求接口地址列表
const POST_URL_LIST = {
'development': 'https://eshield.dev.glsx.com.cn/',
'test': 'https://eshield.test.glsx.com.cn/',
'production': 'https://eshield.didihu.com.cn/'
}
// 内嵌网页路径
const WEB_PATH_LIST = {
'development': 'https://eshield.dev.glsx.com.cn/miniapp/#/',
'test': 'https://eshield.test.glsx.com.cn/miniapp/#/',
//'production': 'https://eshield.didihu.com.cn/miniapp/#/'
'production':'https://eshield.hhxtechnology.com/miniapp/#/'
}
// 请求接口地址
export const BASE_URL = POST_URL_LIST[environment]
// 图片路径
export const IMAGE_PATH = BASE_URL + 'business'
// 内嵌网页路径(开发环境)
export const WEB_VIEW_PATH = WEB_PATH_LIST[environment];
// 错误提示语
export const ERRTIPMSG = '出错了,请联系管理员'
\ No newline at end of file \ No newline at end of file
import request from './request'
const prefix = 'miniappserver'
// 登录(通过密码登录)
export const LOGIN_BY_PASSWORD = params => {
return request({
url: `${prefix}/login`,
data: params,
method: 'POST'
})
}
// 退出登录
export const LOGOUT_BY_PASSWORD = params => {
return request({
url: `${prefix}/logout`,
data: params,
})
}
// 微信授权登录
export const LOGIN_BY_AUTH = params => {
return request({
url: `${prefix}/wechatAuth`,
data: params,
})
}
// 更新微信资料
export const SAVE_WEIXIN_INFO = params => {
return request({
url: `${prefix}/individual/updateWxUserInfo`,
data: params,
method:'POST'
})
}
// 分享车辆
export const SHARED_VEHICLE_INFO = params => {
return request({
url: `${prefix}/share/vehicle`,
data: params,
})
}
// 点击分享车辆
export const SHARED_VEHICLE_CLICK = params => {
return request({
url: `${prefix}/share/click`,
data: params,
})
}
\ No newline at end of file \ No newline at end of file
import {
ERRTIPMSG,
BASE_URL
} from './config'
console.log(ERRTIPMSG)
const setHeader = header => {
// 本地获取存储的sessionId
var sessionId = wx.getStorageSync('JSESSIONID');
var cookies = header['Set-Cookie'];
if (cookies) {
var n = cookies ? cookies.split(';') : [];
sessionId = n[0];
if (sessionId) {
// 从cookie中获取sessionId存储到本地
wx.setStorageSync('JSESSIONID', sessionId);
}
}
if (sessionId) {
header['Cookie'] = sessionId;
}
return header;
}
const request = options => {
let code = 200
let header = {};
let token = wx.getStorageSync('token');
if (options.code) {
code = options.code
}
if (token) {
header['Authorization'] = token;
};
if (options.loading !== false) {
wx.showLoading({
title: '加载中...',
mask: true
});
}
return new Promise((resolve, reject) => {
wx.request({
url: BASE_URL + options.url,
data: options.data,
header: header,
method: options.method || 'GET',
success: function (res) {
//收到开发者服务成功返回的回调函数
var obj = res.data;
setHeader(res.header);
setTimeout(function () {
//增加setTimeout,防止wx.hideLoading 关闭掉wx.showToast
if (obj.code != code) {
if (obj.code == "603" || obj.code == "604") {
wx.showModal({
title: '提示',
content: obj.message || ERRTIPMSG,
showCancel: false,
success () {
wx.reLaunch({
url: '/pages/login/index',
});
wx.clearStorageSync();
}
})
} else {
// wx.showToast({
// title: obj.message || ERRTIPMSG,
// icon: 'none'
// })
console.log(obj.message)
wx.showModal({
title: '提示',
content: obj.message || ERRTIPMSG,
showCancel: false
})
}
} else {
resolve(res.data)
}
}, 2);
},
fail: function (res) {
//接口调用失败的回调函数
setTimeout(function () {
//增加setTimeout,防止wx.hideLoading 关闭掉wx.showToast
reject(res.data)
}, 2)
},
complete: function (res) {
//接口调用结束的回调函数(调用成功、失败都会执行)
if (options.loading !== false) {
wx.hideLoading();
}
}
});
})
}
module.exports = request
\ No newline at end of file \ No newline at end of file
// mapPackage/pages/findCar.js
import {
WEB_VIEW_PATH
} from '../../http/config'
import {
SHARED_VEHICLE_INFO
} from '../../http/interfaces'
var app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
webPath: '',
sharedInfo: {},
options: {}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
options: options
})
///sn=${options.sn}&tabItem=${options.tabItem}&source=${options.source}&locationType=${options.locationType}
// let path = `${WEB_VIEW_PATH}info?sn=${options.sn}&tabItem=${options.tabItem}&source=${options.source}&locationType=${options.locationType}`
// console.log(path)
// this.setData({
// webPath: `${WEB_VIEW_PATH}info?sn=${options.sn}&tabItem=${options.tabItem}&source=${options.source}&locationType=${options.locationType}`
// })
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
let options = this.data.options
let path = `${WEB_VIEW_PATH}info?`
for (let i in options) {
path += `&${i}=${options[i]}`
}
path.replace(/&/, "?")
if (app.globalData.shared) {
wx.hideShareMenu({
menus: ['shareAppMessage']
})
}
this.setData({
webPath: path
})
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
let _this = this;
let o = _this.data.sharedInfo
console.log(o)
let oParams = {
vehicleId: o.id
}
let path = `/pages/loading/index?shared=true&sn=${o.sns}&vin=${o.vin}&ownerName=${o.ownerName}&licensePlate=${o.licensePlate}`
let promise = new Promise((resolve, reject) => {
if (!o.id) {
wx.showToast({
title: '请选择分享车辆',
})
return false;
}
SHARED_VEHICLE_INFO(oParams).then(res => {
if (res.code == 200) {
resolve({
title: '找车',
path: `/pages/loading/index?shared=true&sn=${o.sns}&vin=${o.vin}&ownerName=${o.ownerName}&shareId=${res.data}&licensePlate=${o.licensePlate}`,
})
}
})
})
return {
title: '找车',
path: path,
promise
}
// return {
// title: '找车',
// path: `/pages/loading/index?shared=true&sn=${o.sns}&vin=${o.vin}&ownerName=${o.ownerName}&shareId=${o.shareId}`,
// }
},
// 从H5
getMessage(e) {
console.log(e)
let list = e.detail.data || []
let o = list[list.length - 1] || {}
let carInfo = o ? o.carInfo : {}
this.setData({
sharedInfo: carInfo
})
//wx.setStorageSync('sharedInfo', JSON.stringify(carInfo))
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "找车"
}
\ No newline at end of file \ No newline at end of file
<!--mapPackage/pages/findCar.wxml-->
<view class="page_grey">
<web-view src="{{webPath}}"></web-view>
</view>
/* mapPackage/pages/findCar.wxss */
\ No newline at end of file \ No newline at end of file
// mapPackage/pages/tracking.js
Page({
/**
* 页面的初始数据
*/
data: {
webPath: '',
init: false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
wx.openLocation({
latitude: Number(options.lat),
longitude: Number(options.lng),
address: options.address
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
if (this.data.init) {
wx.navigateBack()
}
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
this.setData({
init: true
});
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "找车"
}
\ No newline at end of file \ No newline at end of file
<!--mapPackage/pages/tracking.wxml-->
<view class="page_grey">
</view>
/* mapPackage/pages/tracking.wxss */
\ No newline at end of file \ No newline at end of file
// 收车管理
import request from '../../http/request'
const prefix = 'miniappserver'
// 收车管理-获取列表
export const GET_VEHICLE_SEARCH = params => {
return request({
url: `${prefix}/vehicle/search`,
data: params
})
}
// 收车管理-分享详情
export const GET_VEHICLE_SHAREDDETAILS = params => {
return request({
url: `${prefix}/vehicle/sharedDetails`,
data: params
})
}
// 收车管理-被分享记录
export const GET_VEHICLE_SHAREDRECORDS = params => {
return request({
url: `${prefix}/vehicle/sharedRecords`,
data: params
})
}
// 设置分享配置
export const SHARED_VEHICLE_SETTING = params => {
return request({
url: `${prefix}/share/setting`,
data: params,
method: 'POST'
})
}
\ No newline at end of file \ No newline at end of file
// 调频记录接口
import request from '../../http/request'
const prefix = 'miniappserver'
// 获取设备调频-车辆设备列表
export const GET_DEVICEFREG_LIST = params => {
return request({
url: `${prefix}/deviceFreq/adjFreqList`,
data: params
})
}
// 获取调频操作详情
export const GET_DEVICEFREG_DETAIL = params => {
return request({
url: `${prefix}/deviceFreq/getAdjFreqDetails`,
data: params
})
}
// 获取被分享者调频详情
export const GET_DEVICEFREG_SHAREDDETAIL = params => {
return request({
url: `${prefix}/deviceFreq/getAdjFreqDetailsForShared`,
data: params
})
}
\ No newline at end of file \ No newline at end of file
// myPackage/pages/collect.js
import {
GET_VEHICLE_SEARCH
} from '../http/collect'
var app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
pageNumber: 1,
pageSize: 10,
term: '',
list: [],
totalPages: 0,
shared: app.globalData.shared
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
shared: app.globalData.shared
})
this.getList()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
// 生命周期函数-监听页面触底
onReachBottom() {
let total = this.data.totalPages;
let pageSize = this.data.pageSize;
let num = this.data.pageNumber;
// 判断是否有下一页
if (total > num) {
this.setData({
pageNumber: num + 1
});
this.getList()
}
},
// 进入收车管理-操作页面
goHandle(e) {
console.log(e)
let id = e.currentTarget.dataset.id
let status = e.currentTarget.dataset.status
let shared = this.data.shared
if (shared) {
return false;
}
// 分享失效
// if (status == 2) {
// return false;
// }
wx.navigateTo({
url: `/myPackage/pages/collect_handle?shareId=${id}`,
})
},
// 搜索
onSearch(e) {
console.log(e)
this.setData({
pageNumber: 1,
list: [],
term: e.detail
})
this.getList()
},
// 清空搜素
onClear(e) {
console.log(e)
this.setData({
list: [],
pageNumber: 1,
pageSize: 10,
term: ''
})
this.getList()
},
// 获取列表
getList() {
let _this = this
let oParams = {}
oParams.pageNumber = _this.data.pageNumber
oParams.pageSize = _this.data.pageSize
if (_this.data.term) {
oParams.term = _this.data.term
}
GET_VEHICLE_SEARCH(oParams).then(res => {
if (res.code != 200) {
return false;
}
let obj = res.data || {}
let nlist = obj.list || []
let list = _this.data.list;
nlist.map(k => {
let wired = []
let wireless = []
let sns = k.sns ? k.sns.split(',') : [];
let source = k.sources ? k.sources.split(',') : []
source.forEach((j, i) => {
// 有线
if (j == 1) {
wired.push(sns[i])
}
// 无线
if (j == 0) {
wireless.push(sns[i])
}
})
k.wired = wired;
k.wireless = wireless;
return k;
})
let n = list.concat(nlist)
_this.setData({
list: n,
totalPages: obj.totalPages
})
wx.stopPullDownRefresh()
})
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {
"glsx-search": "../../components/search/index"
},
"onReachBottomDistance": 50,
"navigationBarTitleText": "收车管理"
}
\ No newline at end of file \ No newline at end of file
<!--myPackage/pages/collect.wxml-->
<view class="page_grey">
<!-- 顶部搜索 开始 -->
<glsx-search bind:confirm="onSearch" bind:clear="onClear"></glsx-search>
<!-- 顶部搜索 end -->
<!-- 内容区域 开始 -->
<view class="list_box">
<block wx:if="{{list && list.length>0}}">
<view class="cell_box {{shared && item.sharedStatus == 2?'failure_box':''}}" wx:for="{{list}}" wx:key="index" data-id="{{item.shareId}}" data-status="{{item.sharedStatus}}" bindtap="goHandle">
<view class="head">{{item.ownerName||'--'}}</view>
<view class="content">
<view class="left">
<view class="cell">
<view class="label">车架号:</view>
<view class="txt">{{item.vin||'--'}}</view>
</view>
<view class="cell">
<view class="label">申请单号:</view>
<view class="txt">{{item.workOrderNo||'--'}}</view>
</view>
<view class="cell" wx:if="{{item.wired && item.wired.length>0}}">
<view class="label">有线设备:</view>
<view class="txt">{{item.wired||'--'}}</view>
</view>
<view class="cell" wx:if="{{item.wireless && item.wireless.length>0}}">
<view class="label">无线设备:</view>
<view class="txt">{{item.wireless||'--'}}</view>
</view>
<view class="cell" wx:if="{{item.sharedUsers && item.sharedUsers.length>0}}">
<view class="label">找车分享:</view>
<view class="txt ">
<view class="avatar_list" wx:if="{{item.sharedUsers.length<=3}}">
<block wx:for="{{item.sharedUsers}}" wx:for-item="aitem" wx:for-index="idx">
<image src="{{aitem.avatar}}" class="img" wx:if="{{aitem.avatar}}" wx:key="idx"></image>
<glsx-image src="avatar.png" custom-class="img" wx:else wx:key="idx"></glsx-image>
</block>
<!-- <glsx-image src="avatar.png" custom-class="img" wx:for="{{item.sharedUsers}}" wx:for-item="aitem" wx:for-index="idx" wx:key="idx"></glsx-image> -->
</view>
<view class="avatar_list avatar_box" wx:if="{{item.sharedUsers.length>3}}">
<block wx:for="{{item.sharedUsers}}" wx:for-item="aitem" wx:for-index="idx" wx:if="{{idx < 3}}">
<image src="{{aitem.avatar}}" class="img" wx:if="{{aitem.avatar}}" wx:key="idx"></image>
<glsx-image src="avatar.png" custom-class="img" wx:else wx:key="idx"></glsx-image>
</block>
<!-- <glsx-image src="avatar.png" custom-class="img" wx:for="{{3}}" wx:for-item="aitem" wx:for-index="idx" wx:key="idx"></glsx-image> -->
<view>已分享{{item.sharedUsers.length}}人</view>
</view>
</view>
</view>
</view>
<view class="right" wx:if="{{!shared}}">
<van-icon name="arrow" class="van_icon" />
</view>
</view>
<view class="failure_img" wx:if="{{shared && item.sharedStatus == 2}}">
<glsx-image src="failure.png" custom-class="img"></glsx-image>
</view>
</view>
</block>
<block wx:else>
<glsx-nodata></glsx-nodata>
</block>
</view>
<!-- 内容区域 end -->
</view>
\ No newline at end of file \ No newline at end of file
/* myPackage/pages/collect.wxss */
.cell_box {
position: relative;
background: #fff;
margin: 0 0 20rpx 0;
padding: 0 40rpx;
}
.cell_box .head {
position: relative;
padding: 20rpx 0;
font-size: 28rpx;
font-weight: bold;
font-family: PingFangSC-Medium, PingFang SC;
color: #111111;
}
.cell_box .head:after {
display: block;
content: "";
height: 1rpx;
background: #F5F6F7;
position: absolute;
left: 0;
right: 0;
bottom: 0;
}
.content {
display: flex;
align-items: center;
justify-content: space-between;
padding: 4rpx 0 20rpx 0;
}
.content .cell {
display: flex;
align-items: center;
margin: 16rpx 0;
}
.content .cell:last-child {
margin-bottom: 0;
}
.content .left {
flex: 2;
font-size: 14px;
color: #666;
}
.content .left .label {
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #9CA4AD;
width: 120rpx;
}
.content .left .txt {
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #111111;
}
.content .right {
flex: 1;
display: flex;
justify-content: flex-end;
}
.content .right .van_icon {
font-size: 32rpx;
color: #9CA4AD;
}
.avatar_list {
position: relative;
display: flex;
align-items: center;
}
.avatar_list .img {
display: block;
width: 32rpx;
height: 32rpx;
margin-right: 8rpx;
border-radius: 100%;
}
.avatar_box {
display: flex;
align-items: center;
border: 1rpx solid #DFE2E6;
border-radius: 50rpx;
font-size: 20rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #6C737A;
padding: 4rpx 16rpx;
}
.avatar_box .img {
display: block;
width: 24rpx;
height: 24rpx;
margin: 0 4rpx 0 0;
}
/*
.content .right .avatar {
position: relative;
width: 40px;
height: 40px;
background: #f7f8fa;
border-radius: 100%;
margin-left: -20px;
}
.content .right .avatar:after {
border-radius: 100%;
} */
.failure_img {
position: absolute;
top: 50%;
right: 80rpx;
transform: translateY(-50%);
}
.failure_img .img {
width: 128rpx;
height: 88rpx;
}
.failure_box .head,
.failure_box .content .cell .txt {
color: #9FA6AD;
}
.failure_box .content .cell .label {
color: #B8BDC2;
}
\ No newline at end of file \ No newline at end of file
// myPackage/pages/collect_detail.js
import {
GET_VEHICLE_SHAREDRECORDS
} from '../http/collect'
Page({
/**
* 页面的初始数据
*/
data: {
userInfo: {},
list: [],
avatar:'',
username:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log(options)
this.setData({
avatar: options.avatar,
username: options.username
})
this.getList(options.userId)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
// 获取用户头像
getUser() {
wx.getUserProfile({
desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (res) => {
console.log(res)
this.setData({
userInfo: res.userInfo
})
}
})
},
// 获取详情
getList(userId) {
let _this = this;
GET_VEHICLE_SHAREDRECORDS({
userId: userId
}).then(res => {
if (res.code != 200) {
return false;
}
let list = res.data || []
list.map(k => {
let wired = []
let wireless = []
let sns = k.sns ? k.sns.split(',') : [];
let source = k.sources ? k.sources.split(',') : []
source.forEach((j, i) => {
// 有线
if (j == 1) {
wired.push(sns[i])
}
// 无线
if (j == 0) {
wireless.push(sns[i])
}
})
k.wired = wired;
k.wireless = wireless;
return k;
})
_this.setData({
list: list
})
})
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "收车管理"
}
\ No newline at end of file \ No newline at end of file
<!--收车管理-分享记录详情-->
<view class="page_grey">
<!-- 顶部信息 开始 -->
<view class="top_info">
<view class="avatar van-hairline--surround">
<image src="{{avatar}}" class="img" wx:if="{{avatar}}"></image>
<glsx-image src="avatar.png" custom-class="img" wx:else></glsx-image>
</view>
<view class="nick_name" bindtap="getUser">{{username||'微信用户'}}</view>
</view>
<!-- 顶部信息 end -->
<!-- 列表 开始 -->
<view class="list_box">
<view class="row_box" wx:for="{{list}}" wx:key="index">
<view class="head">{{item.ownerName||'--'}}</view>
<view class="cell">
<view class="label">车架号:</view>
<view class="txt">{{item.vin||'--'}}</view>
</view>
<view class="cell">
<view class="label">申请单号:</view>
<view class="txt">{{item.workOrderNo||'--'}}</view>
</view>
<view class="cell" wx:if="{{item.wireless && item.wireless.length>0}}">
<view class="label">无线设备:</view>
<view class="txt">{{item.wireless||'--'}}</view>
</view>
<view class="cell" wx:if="{{item.wired && item.wired.length>0}}">
<view class="label">有线设备:</view>
<view class="txt">{{item.wired||'--'}}</view>
</view>
<view class="cell">
<view class="label">分享时间:</view>
<view class="txt">{{item.date}}</view>
</view>
</view>
</view>
<!-- 列表 end -->
</view>
<!-- 新增隐私协议弹框 开始 -->
<glsx-privacy appletName="e盾+"></glsx-privacy>
<!-- 新增隐私协议弹框 end -->
\ No newline at end of file \ No newline at end of file
/* myPackage/pages/collect_detail.wxss */
.top_info {
display: flex;
align-items: center;
height: 144rpx;
background: #FFFFFF;
border-radius: 16rpx;
margin: 20rpx 24rpx;
padding: 32rpx 0;
box-sizing: border-box;
}
.top_info .avatar {
width: 80rpx;
height: 80rpx;
background: #f2f2f2;
border-radius: 100%;
font-size: 20rpx;
/* display: flex;
align-items: center;
text-align: center; */
margin: 0 24rpx 0 48rpx;
}
.top_info .avatar:after {
border-radius: 100%;
}
.top_info .avatar .img {
width: 100%;
height: 100%;
border-radius: 100%;
}
.nick_name {
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #111111;
}
.row_box {
background: #fff;
margin: 0 24rpx 16rpx 24rpx;
padding: 20rpx 0;
border-radius: 16rpx;
}
.row_box .head {
position: relative;
font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #111111;
padding: 0 32rpx 20rpx 32rpx;
margin-bottom: 20rpx;
}
.row_box .head:after {
display: block;
content: "";
height: 1rpx;
background: #F5F6F7;
position: absolute;
left: 32rpx;
right: 32rpx;
bottom: 0;
}
.row_box .cell {
display: flex;
font-size: 24rpx;
color: #111;
margin: 16rpx 0;
padding: 0 32rpx;
}
.row_box .cell:last-child {
margin-bottom: 0rpx;
}
.row_box .cell .label {
flex-shrink: 0;
color: #9CA4AD;
width: 130rpx;
}
/* .row_box .cell .txt {
flex: 1;
} */
\ No newline at end of file \ No newline at end of file
// myPackage/pages/collect_opa.js
import {
GET_VEHICLE_SHAREDDETAILS,
SHARED_VEHICLE_SETTING
} from '../http/collect'
import moment from 'moment'
Page({
/**
* 页面的初始数据
*/
data: {
shareId: '',
shareStatus: false,
showPopup: false,
currentId: '',
startTime: {},
endTime: {},
maxDate: '',
minDate: '',
currentDate: new Date().getTime(),
formatter: (type, value) => {
if (type === 'year') {
return `${value}年`;
}
if (type === 'month') {
return `${value}月`;
}
if (type === 'day') {
return `${value}日`;
}
if (type === 'hour') {
return `${value}时`;
}
if (type === 'minute') {
return `${value}分`;
}
return value;
},
vehicleDevice: {},
records: [],
setting: {}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
// let startTime = this.getDate('2022-07-05 14:22')
// let endTime = this.getDate('2022-07-07 15:30')
this.setData({
shareId: options.shareId
})
this.getInfo(options.shareId)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
this.getInfo()
},
// 分享找车详情
goDetail(e) {
let id = e.currentTarget.dataset.id
let info = e.currentTarget.dataset.info
console.log(info)
wx.navigateTo({
url: `/myPackage/pages/collect_detail?userId=${id}&username=${info.username}&avatar=${info.avatar}`,
})
},
// 更改分享状态
onChange(e) {
this.setData({
shareStatus: e.detail
})
this.saveInfo()
},
// 关闭弹框
onClose() {
this.setData({
showPopup: false
})
},
// 保存时间
onConfirm(e) {
console.log(e)
// let _types = {
// 'startTime': 'minDate',
// 'endTime': 'maxDate'
// }
let id = this.data.currentId;
let obj = this.getDate(e.detail)
let options = {
[id]: obj,
showPopup: false
}
//options[_types[id]] = e.detail;
this.setData(options)
this.saveInfo()
},
// 打开弹框
openDialog(e) {
console.log(e)
this.setData({
showPopup: true,
currentId: e.currentTarget.dataset.id
})
},
// 处理时间
getDate(str) {
let obj = {}
if (!str) {
return obj;
}
var t = moment(str);
var year = t.year();
var month = (t.month() + 1).toString().padStart(2, "0");
var day = t.date().toString().padStart(2, "0");
var h = t.hour().toString().padStart(2, "0");
var m = t.minute().toString().padStart(2, "0");
obj.date = `${year}-${month}-${day}`;
obj.time = `${h}:${m}`
return obj;
},
// 获取详情
getInfo() {
let _this = this;
let oParams = {}
oParams.shareId = _this.data.shareId
GET_VEHICLE_SHAREDDETAILS(oParams).then(res => {
if (res.code != 200) {
return false;
}
let obj = res.data || {}
let vehicleDevice = obj.vehicleDevice || {}
let setting = obj.setting || {}
let wired = []
let wireless = []
let sns = vehicleDevice.sns ? vehicleDevice.sns.split(',') : [];
let source = vehicleDevice.sources ? vehicleDevice.sources.split(',') : []
source.forEach((j, i) => {
// 有线
if (j == 1) {
wired.push(sns[i])
}
// 无线
if (j == 0) {
wireless.push(sns[i])
}
})
vehicleDevice.wired = wired;
vehicleDevice.wireless = wireless;
let startTime = this.getDate(setting.effectiveDate)
let endTime = this.getDate(setting.expirationDate)
_this.setData({
records: obj.records || [],
setting: setting,
vehicleDevice: vehicleDevice,
startTime: startTime,
endTime: endTime,
shareStatus: setting.enableStatus == 1 ? true : false,
maxDate: moment(setting.expirationDate).format('x'),
minDate: moment(setting.effectiveDate).format('x')
})
wx.stopPullDownRefresh()
})
},
// 保存数据
saveInfo() {
let oParams = {}
let startTime = this.data.startTime
let endTime = this.data.endTime
let effectiveDate = `${startTime.date} ${startTime.time}:00`
let expirationDate = `${endTime.date} ${endTime.time}:00`
if ((new Date(effectiveDate).getTime()) > (new Date(expirationDate).getTime())) {
wx.showModal({
content: '生效时间不能大于失效时间',
title: '提示',
})
return false;
}
oParams.shareId = this.data.shareId
oParams.effectiveDate = effectiveDate;
oParams.expirationDate = expirationDate
oParams.enableStatus = this.data.shareStatus ? 1 : 2
SHARED_VEHICLE_SETTING(oParams).then(res => {
if (res.code == 200) {
wx.showToast({
title: '保存成功',
})
}
})
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {
"van-switch": "@vant/weapp/switch/index",
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
"van-popup": "@vant/weapp/popup/index"
},
"navigationBarTitleText": "收车管理",
"enablePullDownRefresh": true
}
\ No newline at end of file \ No newline at end of file
<!--myPackage/pages/collect_opa.wxml-->
<view class="page_grey">
<!-- 顶部信息 开始 -->
<view class="top_info">
<view class="head">{{vehicleDevice.ownerName||'--'}}</view>
<view class="cell">
<view class="label">车架号:</view>
<view class="txt">{{vehicleDevice.vin||'--'}}</view>
</view>
<view class="cell">
<view class="label">申请单号:</view>
<view class="txt">{{vehicleDevice.workOrderNo||'--'}}</view>
</view>
<view class="cell" wx:if="{{vehicleDevice.wireless && vehicleDevice.wireless.length>0}}">
<view class="label">无线设备:</view>
<view class="txt">{{vehicleDevice.wireless||'--'}}</view>
</view>
<view class="cell" wx:if="{{vehicleDevice.wired && vehicleDevice.wired.length>0}}">
<view class="label">有线设备:</view>
<view class="txt">{{vehicleDevice.wired||'--'}}</view>
</view>
</view>
<!-- 顶部信息 end -->
<!-- 操作区域 开始 -->
<view class="handle_box">
<view class="cell">
<view class="label">分享时效</view>
<view class="txt">
<view class="time_range">
<view class="start_time disabled_time" data-id="startTime">
<view class="v_data">{{startTime.date}}</view>
<view class="v_time">{{startTime.time}}</view>
</view>
<view class="time_arrow">
<glsx-image src="arrow.png" custom-class="img"></glsx-image>
</view>
<view class="start_time" data-id="endTime" bindtap="openDialog">
<view class="v_data">{{endTime.date}}</view>
<view class="v_time">{{endTime.time}}</view>
</view>
</view>
</view>
</view>
<view class="cell">
<view class="label">分享状态</view>
<view class="txt">
<van-switch checked="{{ shareStatus }}" custom-class="van_switch" size="48rpx" bind:change="onChange" />
</view>
</view>
</view>
<!-- 操作区域 end -->
<!-- 已分享找车列表 开始 -->
<view class="share_list" wx:if="{{records && records.length>0}}">
<view class="title">已分享找车</view>
<view class="list_box">
<view class="cell" wx:for="{{records}}" wx:key="index" data-info="{{item.sharedUser}}" data-id="{{item.sharedUser.userId}}" bindtap="goDetail">
<view class="avatar">
<image src="{{item.sharedUser.avatar}}" wx:if="{{item.sharedUser.avatar}}" class="img"></image>
<glsx-image src="avatar.png" custom-class="img" wx:else></glsx-image>
</view>
<view class="info">
<view class="name">分享找车</view>
<view class="time">{{item.sharedDate}}</view>
</view>
</view>
</view>
</view>
<!-- 已分享找车列表 end -->
<!-- 时间控件弹框 开始 -->
<van-popup show="{{ showPopup }}" position="bottom" custom-style="height: 50%" round bind:close="onClose">
<van-datetime-picker type="datetime" toolbar-class="van_tool_bar" value="{{ currentDate }}" min-date="{{minDate}}" formatter="{{ formatter }}" bind:cancel="onClose" bind:confirm="onConfirm" />
</van-popup>
<!-- 时间控件弹框 end -->
</view>
\ No newline at end of file \ No newline at end of file
/* 收车管理-操作页面 */
.page_grey {
border-top: 1rpx solid transparent;
padding-bottom: 20rpx;
}
.top_info {
background: #fff;
margin: 24rpx;
border-radius: 16rpx;
padding: 20rpx 32rpx;
}
.top_info .head {
position: relative;
padding: 0 0 20rpx 0;
font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: bold;
color: #111111;
}
.top_info .head:after {
display: block;
content: "";
height: 1rpx;
position: absolute;
left: 0;
right: 0;
bottom: 0;
background: #F5F6F7;
}
.top_info .cell {
display: flex;
align-items: center;
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #9CA4AD;
margin: 16rpx 0;
}
.top_info .cell:last-child {
margin-bottom: 0;
}
.top_info .cell .label {
width: 120rpx;
}
.top_info .cell .txt {
color: #111111;
}
.handle_box {
margin: 20rpx 24rpx;
border-radius: 16rpx;
overflow: hidden;
background: #fff;
}
.handle_box .cell {
position: relative;
display: flex;
align-items: center;
justify-content: space-between;
padding: 32rpx;
height: 104rpx;
box-sizing: border-box;
}
.handle_box .cell:after {
display: block;
content: "";
height: 1rpx;
background: rgba(0, 0, 0, 0.1);
position: absolute;
left: 32rpx;
right: 32rpx;
bottom: 0;
}
.handle_box .cell:last-child:after {
display: none;
}
.handle_box .cell .label {
flex-shrink: 0;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #111111;
}
.handle_box .cell .txt {
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
}
.share_list {
background: #fff;
margin: 20rpx 24rpx;
border-radius: 16rpx;
padding: 20rpx 32rpx 0 32rpx;
}
.share_list .title {
position: relative;
padding: 0 0 20rpx 0;
}
.share_list .title:after {
display: block;
content: "";
height: 1rpx;
position: absolute;
left: -32rpx;
right: -32rpx;
bottom: 0;
background: #F5F6F7;
}
/* .list_box {
background: #fff;
} */
.list_box .cell {
display: flex;
align-items: center;
/* line-height: 2; */
font-size: 14px;
/* padding: 10px; */
color: #3399FF;
padding: 32rpx 0;
height: 144rpx;
box-sizing: border-box;
}
.list_box .cell .info {
flex: 1;
position: relative;
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 32rpx 24rpx;
}
.list_box .cell .info:after {
display: block;
content: "";
height: 1rpx;
background: #F5F6F7;
position: absolute;
left: 24rpx;
right: -24rpx;
bottom: 0;
}
.list_box .cell:last-child .info:after {
display: none;
}
.list_box .cell .info .name {
font-size: 28rpx;
font-weight: 400;
color: #111111;
margin-bottom: 8rpx;
}
.list_box .cell .info .time {
font-size: 24rpx;
font-weight: 400;
color: #9CA4AD;
margin-top: 4rpx;
}
.list_box .cell .avatar {
width: 80rpx;
height: 80rpx;
background: #f2f2f2;
border-radius: 100%;
margin: 0 4px 0 0;
}
.list_box .cell .avatar .img {
width: 100%;
height: 100%;
border-radius: 100%;
}
.time_range {
display: flex;
align-items: center;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
}
.time_range .img {
width: 24rpx;
height: 56rpx;
margin: 0 32rpx;
}
.time_range .start_time .v_data {
color: #111111;
}
.time_range .start_time .v_time {
color: #6C737A;
}
.time_range .disabled_time .v_data,
.time_range .disabled_time .v_time {
color: #9FA6AD;
}
.van_switch {
padding: 3rpx 1rpx;
}
.van_switch .van-switch__node {
top: 3rpx;
left: 3rpx;
}
.van_tool_bar .van-picker__confirm {
color: #0077FF;
}
\ No newline at end of file \ No newline at end of file
// 调频记录
import {
GET_DEVICEFREG_LIST
} from '../http/fm'
Page({
/**
* 页面的初始数据
*/
data: {
pageNumber: 1,
pageSize: 10,
keywords: '',
list: [],
totalPages: 0
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getList()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
let total = this.data.totalPages;
let num = this.data.pageNumber;
// 判断是否有下一页
if (total > num) {
this.setData({
pageNumber: num + 1
});
this.getList()
}
},
// 进入收车管理-操作页面
goHandle(e) {
console.log(e)
let info = e.currentTarget.dataset.info;
let wired = []
let wireless = []
if (info.wired && info.wired.length > 0) {
info.wired.map(k => {
wired.push(k.sn)
})
}
if (info.wireless && info.wireless.length > 0) {
info.wireless.map(k => {
wireless.push(k.sn)
})
}
let path = `/myPackage/pages/fm_detail?vehicleId=${info.vehicleId||''}&name=${info.ownerName||''}&vin=${info.vin||''}&workOrderNo=${info.workOrderNo||''}&wired=${wired.toString()}&wireless=${wireless.toString()}&accorderId=${info.accorderId}`
wx.navigateTo({
url: path,
})
},
// 获取列表
getList() {
let _this = this
let oParams = {}
oParams.pageNumber = _this.data.pageNumber
oParams.pageSize = _this.data.pageSize
if (_this.data.keywords) {
oParams.keywords = _this.data.keywords
}
GET_DEVICEFREG_LIST(oParams).then(res => {
if (res.code != 200) {
return false;
}
let obj = res.data || {}
let list = _this.data.list;
let nList = obj.list || []
// todo 处理有线无线数据
nList.map(k => {
let clist = k.deviceInfo || [];
k.wired = clist.filter(j => j.source == 1)
k.wireless = clist.filter(j => j.source == 0)
return k;
})
let n = list.concat(nList || [])
_this.setData({
list: n,
totalPages: obj.totalPages
})
wx.stopPullDownRefresh()
})
},
// 搜素
onSearch(e) {
console.log(e)
this.setData({
list: [],
pageNumber: 1,
pageSize: 10,
keywords: e.detail
})
this.getList()
},
// 清空搜素
onClear(e) {
console.log(e)
this.setData({
list: [],
pageNumber: 1,
pageSize: 10,
keywords: ''
})
this.getList()
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {
"glsx-search": "../../components/search/index"
},
"onReachBottomDistance": 50,
"navigationBarTitleText": "调频记录"
}
\ No newline at end of file \ No newline at end of file
<!--调频记录-->
<view class="page_grey">
<!-- 搜索区域 开始 -->
<glsx-search bind:confirm="onSearch" bind:clear="onClear"></glsx-search>
<!-- 搜索区域 end -->
<!-- 内容区域 开始 -->
<view class="list_box">
<block wx:if="{{list && list.length>0}}">
<view class="cell_box" wx:for="{{list}}" wx:key="index" data-info="{{item}}" bindtap="goHandle">
<view class="head">{{item.ownerName||'--'}}</view>
<view class="content">
<view class="left">
<view class="cell">
<view class="label">车架号:</view>
<view class="txt">{{item.vin||'--'}}</view>
</view>
<view class="cell">
<view class="label">申请单号:</view>
<view class="txt">{{item.workOrderNo||'--'}}</view>
</view>
<view class="cell" wx:if="{{item.wireless && item.wireless.length>0}}">
<view class="label">无线设备:</view>
<view class="txt">
<text class="t1" wx:for="{{item.wireless}}" wx:for-item="citem" wx:for-index="cindex" wx:key="cindex">{{citem.sn||''}}</text>
</view>
</view>
<view class="cell" wx:if="{{item.wired && item.wired.length>0}}">
<view class="label">有线设备:</view>
<view class="txt">
<text class="t1" wx:for="{{item.wired}}" wx:for-item="citem" wx:for-index="cindex" wx:key="cindex">{{citem.sn||''}}</text>
</view>
</view>
</view>
<view class="right">
<van-icon name="arrow" class="van_icon" />
</view>
</view>
</view>
</block>
<block wx:else>
<glsx-nodata></glsx-nodata>
</block>
</view>
<!-- 内容区域 end -->
</view>
\ No newline at end of file \ No newline at end of file
/* 调频记录 */
.cell_box {
background: #fff;
margin: 0 0 20rpx 0;
padding: 0 40rpx;
}
.cell_box .head {
position: relative;
padding: 20rpx 0;
font-size: 28rpx;
font-weight: bold;
font-family: PingFangSC-Medium, PingFang SC;
color: #111111;
}
.cell_box .head:after {
display: block;
content: "";
height: 1rpx;
background: #F5F6F7;
position: absolute;
left: 0;
right: 0;
bottom: 0;
}
.content {
display: flex;
align-items: center;
justify-content: space-between;
padding: 4rpx 0 20rpx 0;
}
.content .cell {
display: flex;
align-items: center;
margin: 16rpx 0;
}
.content .cell:last-child {
margin-bottom: 0;
}
.content .left {
flex: 2;
font-size: 14px;
color: #666;
}
.content .left .label {
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #9CA4AD;
width: 120rpx;
flex-shrink: 0;
}
.content .left .txt {
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #111111;
}
.content .left .txt .t1 {
position: relative;
padding: 0 16rpx;
color: #111;
}
.content .left .txt .t1:last-child {
padding: 0 0 0 16rpx;
}
.content .left .txt .t1:first-child {
padding: 0 16rpx 0 0;
}
.content .left .txt .t1:after {
display: block;
content: "";
width: 1rpx;
height: 26rpx;
background: #111;
position: absolute;
right: 0;
top: 50%;
bottom: 0;
transform: translateY(-50%);
opacity: 0.5;
}
.content .left .txt .t1:last-child:after {
display: none;
}
.content .right {
flex-shrink: 0;
display: flex;
justify-content: flex-end;
}
.content .right .van_icon {
font-size: 32rpx;
color: #9CA4AD;
}
\ No newline at end of file \ No newline at end of file
// myPackage/pages/fm_detail.js
import {
GET_DEVICEFREG_DETAIL
} from '../http/fm'
var app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
info: {},
pageNumber: 1,
pageSize: 10,
list: [],
totalPages: 0,
accorderId: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log(options)
let info = {
...options
}
if (options.wired) {
info.wired = options.wired.split(',')
}
if (options.wireless) {
info.wireless = options.wireless.split(',')
}
this.setData({
info: info,
accorderId: options.accorderId
})
this.getList()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
let total = this.data.totalPages;
let num = this.data.pageNumber;
// 判断是否有下一页
if (total > num) {
this.setData({
pageNumber: num + 1
});
this.getList()
}
},
// 获取调频记录列表
getList() {
let _this = this
let oParams = {}
oParams.pageNumber = _this.data.pageNumber
oParams.pageSize = _this.data.pageSize
oParams.vehicleId = _this.data.info.vehicleId
GET_DEVICEFREG_DETAIL(oParams).then(res => {
if (res.code != 200) {
return false;
}
let obj = res.data || {}
let list = _this.data.list;
let nList = obj.list || []
let n = list.concat(nList || [])
_this.setData({
list: n,
totalPages: obj.totalPages
})
wx.stopPullDownRefresh()
})
},
// 查看详情
goDetail(e) {
console.log(e)
let id = e.currentTarget.dataset.id;
let channel = e.currentTarget.dataset.channel;
let info = e.currentTarget.dataset.info
let accorderId = this.data.accorderId
if (channel != 5 || !id) {
return false;
}
wx.navigateTo({
url: `/myPackage/pages/fm_shared?receiverId=${id}&accorderId=${accorderId}&avatar=${info.avatar||''}&operation=${info.operation||''}`,
})
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {},
"onReachBottomDistance": 50,
"navigationBarTitleText": "调频记录"
}
\ No newline at end of file \ No newline at end of file
<!--调频记录详情-->
<view class="page_grey">
<!-- 被分享者信息 开始 -->
<!-- <view class="shared_info" wx:if="{{beShared}}">
<view class="avatar van-hairline--surround">
<image src="{{userInfo.avatarUrl}}" class="img" wx:if="{{userInfo.avatarUrl}}"></image>
<glsx-image src="avatar.png" custom-class="img" wx:else></glsx-image>
</view>
<view class="nick_name">{{userInfo.nickName||'微信用户'}}</view>
</view> -->
<!-- 被分享者信息 end -->
<!-- 顶部信息 开始 -->
<view class="top_info">
<view class="head">{{info.name||'--'}}</view>
<view class="cell">
<view class="label">车架号:</view>
<view class="txt">{{info.vin||'--'}}</view>
</view>
<view class="cell">
<view class="label">申请单号:</view>
<view class="txt">{{info.workOrderNo||'--'}}</view>
</view>
<view class="cell" wx:if="{{info.wireless && info.wireless.length>0}}">
<view class="label">无线设备:</view>
<view class="txt">
<text class="t1" wx:for="{{info.wireless}}" wx:key="index">{{item}}</text>
</view>
</view>
<view class="cell" wx:if="{{info.wired && info.wired.length>0}}">
<view class="label">有线设备:</view>
<view class="txt">
<text class="t1" wx:for="{{info.wired}}" wx:key="index">{{item}}</text>
</view>
</view>
</view>
<!-- 顶部信息 end -->
<!-- 调频详情 开始 -->
<view class="detail_box">
<view class="title">调频记录</view>
<view class="process_list">
<view class="process" wx:for="{{list}}" wx:key="index">
<view class="head">
<view class="time">{{item.createTime}}</view>
<view class="icon" data-id="{{item.receiverId}}" data-info="{{item}}" data-channel="{{item.channelInt}}" bindtap="goDetail">
<glsx-image src="source_pc.png" custom-class="img" wx:if="{{item.channelInt == 2 || item.channelInt == 3 || item.channelInt == 4}}"></glsx-image>
<glsx-image src="source_applet.png" custom-class="img" wx:if="{{item.channelInt == 5}}"></glsx-image>
<glsx-image src="source_phone.png" custom-class="img" wx:if="{{item.channelInt == 1}}"></glsx-image>
<view class="name">{{item.operation||'--'}}</view>
</view>
</view>
<view class="cell">
<view class="label">调频记录</view>
<view class="txt">{{item.freqTypeStr}} {{item.frequency}}</view>
</view>
<view class="cell">
<view class="label">上点个数</view>
<view class="txt">{{item.freTotal}}</view>
</view>
<view class="cell">
<view class="label">设备SN</view>
<view class="txt">{{item.sn}}</view>
</view>
</view>
</view>
</view>
<!-- 调频详情 end -->
</view>
\ No newline at end of file \ No newline at end of file
/* myPackage/pages/fm_detail.wxss */
.shared_info {
display: flex;
align-items: center;
height: 144rpx;
background: #FFFFFF;
border-radius: 16rpx;
margin: 20rpx 24rpx;
padding: 32rpx 0;
box-sizing: border-box;
}
.shared_info .avatar {
width: 80rpx;
height: 80rpx;
background: #f2f2f2;
border-radius: 100%;
font-size: 20rpx;
margin: 0 24rpx 0 48rpx;
}
.shared_info .avatar:after {
border-radius: 100%;
}
.shared_info .avatar .img {
width: 100%;
height: 100%;
border-radius: 100%;
}
.shared_info .nick_name {
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #111111;
}
.top_info {
/* height: 296rpx; */
background: #FFFFFF;
border-radius: 16rpx;
margin: 24rpx;
padding: 20rpx 32rpx;
box-sizing: border-box;
}
.top_info .head {
position: relative;
padding-bottom: 20rpx;
font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: bold;
color: #111111;
}
.top_info .head:after {
display: block;
content: "";
height: 1rpx;
background: #F5F6F7;
position: absolute;
left: 0;
right: 0;
bottom: 0;
}
.top_info .cell {
display: flex;
align-items: center;
margin: 16rpx 0;
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #111111;
}
.top_info .cell:last-child {
margin-bottom: 0;
}
.top_info .cell .label {
font-weight: 400;
color: #9CA4AD;
width: 120rpx;
flex-shrink: 0;
}
.top_info .cell .txt {
flex: 1;
}
.top_info .cell .txt .t1 {
position: relative;
padding: 0 16rpx;
color: #111;
}
.top_info .cell .txt .t1:last-child {
padding: 0 0 0 16rpx;
}
.top_info .cell .txt .t1:first-child {
padding: 0 16rpx 0 0;
}
.top_info .cell .txt .t1:after {
display: block;
content: "";
width: 1rpx;
height: 26rpx;
background: #111;
position: absolute;
right: 0;
top: 50%;
bottom: 0;
transform: translateY(-50%);
opacity: 0.5;
}
.top_info .cell .txt .t1:last-child:after {
display: none;
}
.detail_box .title {
font-size: 32rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #111111;
padding: 0 24rpx;
}
.process_list {
position: relative;
padding: 0 24rpx 0 72rpx;
}
.process_list:after {
position: absolute;
display: block;
content: "";
background: rgba(0, 0, 0, 0.1);
width: 1rpx;
left: 36rpx;
top: 42rpx;
bottom: 176rpx;
z-index: 1;
}
.process_list .process {
position: relative;
min-height: 208rpx;
background: #FFFFFF;
border-radius: 16rpx;
margin: 24rpx 0;
padding: 20rpx 32rpx;
box-sizing: border-box;
}
.process_list .process:after {
position: absolute;
display: block;
content: "";
width: 24rpx;
height: 24rpx;
background: #F5F6F7;
border: 3px solid #0077FF;
box-sizing: border-box;
border-radius: 100%;
left: -48rpx;
top: 28rpx;
z-index: 2;
}
.process_list .process .head {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #111111;
margin-bottom: 20rpx;
}
.process .head .icon {
display: flex;
align-items: center;
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #6C737A;
}
.process .head .icon .img {
width: 32rpx;
height: 32rpx;
vertical-align: middle;
}
.process .head .icon .name {
font-size: 24rpx;
font-weight: 400;
color: #6C737A;
margin-left: 8rpx;
}
.process_list .process .cell {
display: flex;
align-items: flex-start;
font-size: 24rpx;
font-weight: 400;
font-family: PingFangSC-Regular, PingFang SC;
margin: 8rpx 0;
}
.process_list .process .cell:last-child {
margin-bottom: 0;
}
.process_list .process .cell .label {
color: #9CA4AD;
width: 120rpx;
}
.process_list .process .cell .txt {
color: #111111;
}
\ No newline at end of file \ No newline at end of file
// myPackage/pages/fm_shared.js
import {
GET_DEVICEFREG_SHAREDDETAIL
} from '../http/fm'
import {getStorageSync} from '../../utils/util'
var app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
userInfo: {},
receiverId: '',
accorderId: '',
list: [],
avatar: '',
operation: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let user = getStorageSync('user')
console.log(user)
this.setData({
receiverId: options.receiverId,
accorderId: options.accorderId,
avatar: options.avatar || user.avatar,
operation: options.operation || user.nickName
})
this.getList()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
// 获取列表
getList() {
let _this = this;
let oParams = {}
if (this.data.receiverId) {
oParams.receiverId = this.data.receiverId
}
if (this.data.accorderId) {
oParams.accorderId = this.data.accorderId
}
GET_DEVICEFREG_SHAREDDETAIL(oParams).then(res => {
if (res.code != 200) {
return false;
}
_this.setData({
list: res.data || []
})
})
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {
},
"navigationBarTitleText": "调频记录"
}
\ No newline at end of file \ No newline at end of file
<!--myPackage/pages/fm_shared.wxml-->
<view class="page_grey">
<!-- 被分享者信息 开始 -->
<view class="shared_info">
<view class="avatar van-hairline--surround">
<image src="{{avatar}}" class="img" wx:if="{{avatar}}"></image>
<glsx-image src="avatar.png" custom-class="img" wx:else></glsx-image>
</view>
<view class="nick_name">{{operation||'微信用户'}}</view>
</view>
<!-- 被分享者信息 end -->
<!-- 调频详情 开始 -->
<view class="detail_box">
<view class="title">详情</view>
<block wx:if="{{list && list.length>0}}">
<view class="top_info" wx:for="{{list}}" wx:key="index">
<view class="head">{{item.ownerName||'--'}}</view>
<view class="cell">
<view class="label">车架号:</view>
<view class="txt">{{item.vin||'--'}}</view>
</view>
<view class="cell">
<view class="label">申请单号:</view>
<view class="txt">{{item.workOrderNo||'--'}}</view>
</view>
<view class="cell" wx:if="{{info.wireless && info.wireless.length>0}}">
<view class="label">无线设备:</view>
<view class="txt">
<text class="t1" wx:for="{{info.wireless}}" wx:key="index">{{item}}</text>
</view>
</view>
<view class="cell" wx:if="{{info.wired && info.wired.length>0}}">
<view class="label">有线设备:</view>
<view class="txt">
<text class="t1" wx:for="{{info.wired}}" wx:key="index">{{item}}</text>
</view>
</view>
<view class="title fm_title">调频记录</view>
<view class="process_list">
<view class="process" wx:for="{{item.deviceFreqList}}" wx:for-item="citem" wx:for-index="idx" wx:key="idx">
<view class="head">
<view class="time">{{citem.createTime}}</view>
<view class="icon">
<glsx-image src="source_pc.png" custom-class="img" wx:if="{{citem.channelInt == 2 || citem.channelInt == 3 || item.channelInt == 4}}"></glsx-image>
<glsx-image src="source_applet.png" custom-class="img" wx:if="{{citem.channelInt == 5}}"></glsx-image>
<glsx-image src="source_phone.png" custom-class="img" wx:if="{{citem.channelInt == 1}}"></glsx-image>
<view class="name">{{citem.operation}}</view>
</view>
</view>
<view class="cell">
<view class="label">调频记录</view>
<view class="txt">{{citem.freqTypeStr}} {{citem.frequency}}</view>
</view>
<view class="cell">
<view class="label">上点个数</view>
<view class="txt">{{citem.freTotal}}</view>
</view>
<view class="cell">
<view class="label">设备SN</view>
<view class="txt">{{citem.sn}}</view>
</view>
</view>
</view>
</view>
</block>
<block wx:else>
<view class="top_info shared_nodata">
<glsx-nodata></glsx-nodata>
</view>
</block>
</view>
<!-- 调频详情 end -->
</view>
\ No newline at end of file \ No newline at end of file
/* myPackage/pages/fm_shared.wxss */
.shared_info {
display: flex;
align-items: center;
height: 144rpx;
background: #FFFFFF;
border-radius: 16rpx;
margin: 20rpx 24rpx;
padding: 32rpx 0;
box-sizing: border-box;
}
.shared_info .avatar {
width: 80rpx;
height: 80rpx;
background: #f2f2f2;
border-radius: 100%;
font-size: 20rpx;
margin: 0 24rpx 0 48rpx;
}
.shared_info .avatar:after {
border-radius: 100%;
}
.shared_info .avatar .img {
width: 100%;
height: 100%;
border-radius: 100%;
}
.shared_info .nick_name {
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #111111;
}
.detail_box .title {
font-size: 32rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #111111;
padding: 0 24rpx;
}
.top_info {
/* height: 296rpx; */
background: #FFFFFF;
border-radius: 16rpx;
margin: 24rpx;
padding: 20rpx 32rpx;
box-sizing: border-box;
}
.top_info .head {
position: relative;
padding-bottom: 20rpx;
}
.top_info .head:after {
display: block;
content: "";
height: 1rpx;
background: #F5F6F7;
position: absolute;
left: 0;
right: 0;
bottom: 0;
}
.top_info .cell {
display: flex;
align-items: center;
margin: 16rpx 0;
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #111111;
}
.top_info .cell .label {
font-weight: 400;
color: #9CA4AD;
width: 120rpx;
flex-shrink: 0;
}
.top_info .cell .txt {
flex: 1;
}
.top_info .cell .txt .t1 {
position: relative;
padding: 0 16rpx;
color: #111;
}
.top_info .cell .txt .t1:after {
display: block;
content: "";
width: 1rpx;
height: 26rpx;
background: #111;
position: absolute;
right: 0;
top: 50%;
bottom: 0;
transform: translateY(-50%);
}
.top_info .cell .txt .t1:last-child:after {
display: none;
}
.process_list {
position: relative;
padding: 0 24rpx 0 24rpx;
}
.process_list:after {
position: absolute;
display: block;
content: "";
background: rgba(0, 0, 0, 0.1);
width: 1rpx;
left: 14rpx;
top: 42rpx;
bottom: 176rpx;
z-index: 1;
}
.process_list .process {
position: relative;
/* min-height: 208rpx; */
background: #FFFFFF;
border-radius: 16rpx;
/* margin: 24rpx 0; */
padding: 20rpx 0 20rpx 20rpx;
box-sizing: border-box;
}
.process_list .process:after {
position: absolute;
display: block;
content: "";
width: 24rpx;
height: 24rpx;
background: #F5F6F7;
border: 3px solid #0077FF;
box-sizing: border-box;
border-radius: 100%;
left: -22rpx;
top: 28rpx;
z-index: 2;
}
.process_list .process .head {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #111111;
/* margin-bottom: 20rpx; */
padding-bottom: 0rpx;
}
.process_list .process .head:after {
display: none;
}
.process .head .icon {
display: flex;
align-items: center;
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #6C737A;
}
.process .head .icon .img {
width: 32rpx;
height: 32rpx;
vertical-align: middle;
}
.process .head .icon .name {
font-size: 24rpx;
font-weight: 400;
color: #6C737A;
margin-left: 8rpx;
}
.process_list .process .cell {
display: flex;
align-items: flex-start;
font-size: 24rpx;
font-weight: 400;
font-family: PingFangSC-Regular, PingFang SC;
margin: 8rpx 0;
}
.process_list .process .cell .label {
color: #9CA4AD;
width: 120rpx;
}
.process_list .process .cell .txt {
color: #111111;
}
.detail_box .fm_title {
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #6C737A;
padding: 0;
margin-top: 32rpx;
}
.shared_nodata {
padding: 100rpx 0;
}
\ No newline at end of file \ No newline at end of file
// myPackage/pages/insurance.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "保险服务"
}
\ No newline at end of file \ No newline at end of file
<!--myPackage/pages/insurance.wxml-->
<text>myPackage/pages/insurance.wxml</text>
/* myPackage/pages/insurance.wxss */
\ No newline at end of file \ No newline at end of file
// myPackage/pages/order.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "工单管理"
}
\ No newline at end of file \ No newline at end of file
<!--myPackage/pages/order.wxml-->
<text>myPackage/pages/order.wxml</text>
/* myPackage/pages/order.wxss */
\ No newline at end of file \ No newline at end of file
// myPackage/pages/risk.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
}
})
\ No newline at end of file \ No newline at end of file
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!