Commit f2148618 authored by 冯超鹏's avatar 冯超鹏

新模块

parent 98d11b03
This diff is collapsed.
/* css 滤镜 控制黑白底色gif的 */ /* css 滤镜 控制黑白底色gif的 */
/* ==================
此组件自主开发,如适用请联系开发猪
WX:A1431670879
==================== */
.gif-black{ .gif-black{
mix-blend-mode: screen; mix-blend-mode: screen;
} }
......
/* ==================
此组件自主开发,如适用请联系开发猪
WX:A1431670879
==================== */
@keyframes cuIcon-spin { @keyframes cuIcon-spin {
0% { 0% {
-webkit-transform: rotate(0); -webkit-transform: rotate(0);
......
/* ================== /* ==================
初始化 初始化
==================== */ ==================== */
/* ==================
此组件自主开发,如适用请联系开发猪
WX:A1431670879
==================== */
body { body {
background-color: #f1f1f1; background-color: #f1f1f1;
font-size: 28upx; font-size: 28upx;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
:controls='controls' @regionchange='mapChange'> :controls='controls' @regionchange='mapChange'>
</map> </map>
<view class="map-tools"> <view class="map-tools">
<button style="top:-800upx;left: 300upx;" class="cu-btn round bg-grey shadow" @click="onnone">取消</button> <button style="top:-780upx;left: 300upx;" class="cu-btn round bg-grey shadow" @click="onnone">取消</button>
<!-- 点击这个取消怎么触发引用的方法 --> <!-- 点击这个取消怎么触发引用的方法 -->
<view class="my-location" @tap="toMyLocation"> <view class="my-location" @tap="toMyLocation">
<image class="left" src="../../static/jjdd.png" mode=""></image> <image class="left" src="../../static/jjdd.png" mode=""></image>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
const app = getApp() const app = getApp()
var QQMapWX = require('./qqmap-wx-jssdk.min.js') var QQMapWX = require('./qqmap-wx-jssdk.min.js')
var qqmapsdk = new QQMapWX({ var qqmapsdk = new QQMapWX({
key: 'LXCBZ-NNIKD-UZ64F-H6AFI-UNJLH-OCFGE' key: 'SJBBZ-LNVKU-5IUVR-2FGDI-CB7ZS-U7FFV'
}) })
export default { export default {
props: { props: {
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
// #ifndef APP-PLUS // #ifndef APP-PLUS
// ======================== jsonp跨域 ======================== // ======================== jsonp跨域 ========================
const KEY = 'LXCBZ-NNIKD-UZ64F-H6AFI-UNJLH-OCFGE' const KEY = 'SJBBZ-LNVKU-5IUVR-2FGDI-CB7ZS-U7FFV'
let locationObj = addressObj.latitude + ',' + addressObj.longitude let locationObj = addressObj.latitude + ',' + addressObj.longitude
let url = let url =
'https://apis.map.qq.com/ws/geocoder/v1?coord_type=5&get_poi=1&output=jsonp&poi_options=page_size=1;page_index=1'; 'https://apis.map.qq.com/ws/geocoder/v1?coord_type=5&get_poi=1&output=jsonp&poi_options=page_size=1;page_index=1';
......
const baseUrl = 'http://36.148.1.58:81/api/'; const baseUrl = 'https://iot.zhkjgf.com:81/api/';
const httpRequest = (opts, data) => { const httpRequest = (opts, data) => {
let httpDefaultOpts = { let httpDefaultOpts = {
url: baseUrl + opts.url, url: baseUrl + opts.url,
......
//校验邮箱格式
function checkEmail(email) {
return RegExp(/^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/).test(
email);
}
//校验手机格式
function checkMobile(mobile) {
return RegExp(/^1[34578]\d{9}$/).test(mobile);
}
module.exports = {
checkEmail: checkEmail,
checkMobile: checkMobile
}
...@@ -11,7 +11,13 @@ ...@@ -11,7 +11,13 @@
"compilerVersion" : 3, "compilerVersion" : 3,
/* 模块配置 */ /* 模块配置 */
"modules" : { "modules" : {
"Speech" : {} "Speech" : {},
"Share" : {},
"Bluetooth" : {},
"Push" : {},
"LivePusher" : {},
"Maps" : {},
"FaceID" : {}
}, },
/* 应用发布信息 */ /* 应用发布信息 */
"distribute" : { "distribute" : {
...@@ -45,14 +51,72 @@ ...@@ -45,14 +51,72 @@
] ]
}, },
/* ios打包配置 */ /* ios打包配置 */
"ios" : {}, "ios" : {
"UIUserInterfaceStyle" : "Automatic"
},
/* SDK配置 */ /* SDK配置 */
"sdkConfigs" : { "sdkConfigs" : {
"ad" : {}, "ad" : {},
"speech" : { "speech" : {
"ifly" : {} "ifly" : {}
},
"push" : {},
"share" : {},
"maps" : {
"amap" : {
"appkey_ios" : "6b52a403d18d64dae41c7a3e05c99fe0",
"appkey_android" : "287d0bf3b0e436e435747c9f62dc806d"
}
},
"geolocation" : {}
},
"splashscreen" : {
"androidStyle" : "default",
"iosStyle" : "common",
"android" : {
"xhdpi" : "unpackage/status/720 × 1242.png",
"hdpi" : "unpackage/status/480 × 762.png",
"xxhdpi" : "unpackage/status/1080 × 1882.png"
}
},
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
} }
} }
},
"splashscreen" : {
"alwaysShowBeforeRender" : false,
"waiting" : false,
"delay" : 0,
"autoclose" : false
} }
}, },
/* 快应用特有相关 */ /* 快应用特有相关 */
...@@ -65,7 +129,18 @@ ...@@ -65,7 +129,18 @@
"postcss" : false, "postcss" : false,
"minified" : true "minified" : true
}, },
"usingComponents" : true "usingComponents" : true,
"permission" : {
"scope.userLocation" : {
"desc" : "获取您的个人位位置和信息"
}
},
"plugins" : {
"chooseLocation" : {
"version" : "1.0.3",
"provider" : "wx3fb24f5d2f0956d6"
}
}
}, },
"mp-alipay" : { "mp-alipay" : {
"usingComponents" : true "usingComponents" : true
......
...@@ -30,9 +30,19 @@ ...@@ -30,9 +30,19 @@
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}, { }, {
"path": "pages/adddevice/mpnaddlink", "path": "pages/userme/setup",
"style": {}
}, {
"path": "pages/userme/infozehong",
"style": {}
}, {
"path": "pages/adddevice/latitude",
"style": { "style": {
"navigationBarTitleText": "经纬度"
} }
}, {
"path": "pages/adddevice/mpnaddlink",
"style": {}
} }
], ],
// "tabBar": { // "tabBar": {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<block slot="content">添加设备</block> <block slot="content">添加设备</block>
</cu-custom> </cu-custom>
<!-- 表单开始 --> <!-- 表单开始 -->
<view style="z-index: 9999999999;overflow:scroll;height: 100%;margin-bottom: 140upx;"> <view style="z-index: 9999;overflow:scroll;height: 100%;margin-bottom: 140upx;">
<form @submit="formSubmit"> <form @submit="formSubmit">
<view class="cu-form-group margin-top"> <view class="cu-form-group margin-top">
<view class="title">设备名称</view> <view class="title">设备名称</view>
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
</view> </view>
<button form-type="submit" class="cu-btn bg-grey lg" style="width: 90%;height: 80upx;margin-left: 40upx;margin-top: 20upx;z-index: 999;">提交</button> <button form-type="submit" class="cu-btn bg-grey lg" style="width: 90%;height: 80upx;margin-left: 40upx;margin-top: 20upx;z-index: 999;">提交</button>
</form> </form>
<view class="cu-modal bottom-modal" :class="modalName=='bottomModal'?'show':''"> <view v-if="isnpms" class="cu-modal bottom-modal" :class="modalName=='bottomModal'?'show':''">
<view class="cu-dialog" style="border-radius: 1;height: 92%;"> <view class="cu-dialog" style="border-radius: 1;height: 92%;">
<view class="cu-bar bg-white"> <view class="cu-bar bg-white">
<view class="action text-green">确定</view> <view class="action text-green">确定</view>
...@@ -126,6 +126,7 @@ ...@@ -126,6 +126,7 @@
gasid: '', gasid: '',
mapShow: true, mapShow: true,
positionObj: {}, positionObj: {},
isnpms: false,
}; };
}, },
methods: { methods: {
...@@ -208,11 +209,19 @@ ...@@ -208,11 +209,19 @@
this.textareaBValue = e.detail.value this.textareaBValue = e.detail.value
}, },
showModal(e) { showModal(e) {
this.modalName = e.currentTarget.dataset.target if (uni.getSystemInfoSync().platform === 'android') {
uni.navigateTo({
url: '../adddevice/latitude'
});
} else {
this.modalName = e.currentTarget.dataset.target;
this.isnpms = true;
}
}, },
//点击组件的触发这个方法 //点击组件的触发这个方法
hideModal(e) { hideModal(e) {
this.modalName = null this.modalName = null;
this.isnpms = false;
}, },
larces(e) { larces(e) {
console.log(e); console.log(e);
...@@ -260,7 +269,6 @@ ...@@ -260,7 +269,6 @@
}, },
//验证用户提交表单内容 //验证用户提交表单内容
isdatadevice(data) { isdatadevice(data) {
console.log(data);
if (data.devicecoord === '') { if (data.devicecoord === '') {
this.onshowToast('设备坐标不能为空'); this.onshowToast('设备坐标不能为空');
} else if (data.deviceinfo === '') { } else if (data.deviceinfo === '') {
...@@ -304,7 +312,8 @@ ...@@ -304,7 +312,8 @@
created() { created() {
this.issetinfo(); this.issetinfo();
this.devicetypes(); this.devicetypes();
this.addUserDevices(); this.addUserDevices();
plus.screen.lockOrientation('portrait-primary');
}, },
} }
</script> </script>
......
<template>
<view>
<cu-custom bgColor="bg-gradual-blue" :isBack="true">
<block slot="backText">返回</block>
<block slot="content">拾取坐标</block>
</cu-custom>
<web-view :src="url"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
url: "http://api.map.baidu.com/lbsapi/getpoint/",
}
},
methods: {},
mounted() {
plus.screen.lockOrientation('landscape-secondary');
plus.screen.lockOrientation('landscape-primary');
}
}
</script>
<style>
</style>
<template name="basics"> <template name="basics">
<view style="overflow:scroll;height: auto;"> <view style="overflow:scroll;height: auto;">
<!-- 顶部操作条 --> <!-- 顶部操作条 -->
<view class="cu-bar bg-white cu-bar fixed nav fixed"> <view class="cu-bar bg-white cu-bar fixed nav fixed" :style="tophome">
<!-- 加载 --> <!-- 加载 -->
<view class="action" v-if="isshowLoad"> <view class="action" v-if="isshowLoad">
<view class="cu-load load-cuIcon" :class="!isLoad?'loading':'over'"></view> <view class="cu-load load-cuIcon" :class="!isLoad?'loading':'over'"></view>
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
</view> </view>
<!-- 设备列表开始 --> <!-- 设备列表开始 -->
<view class="cu-list menu-avatar" style="margin-bottom: 130upx;"> <view class="cu-list menu-avatar" :style="isbottom">
<view class="cu-item" :class="modalName=='move-box-'+ index?'move-cur':''" v-for="(item,index) in deviceList" <view class="cu-item" :class="modalName=='move-box-'+ index?'move-cur':''" v-for="(item,index) in deviceList"
:key="index" @touchstart="ListTouchStart" @touchmove="ListTouchMove" @touchend="ListTouchEnd" :data-target="'move-box-' + index"> :key="index" @touchstart="ListTouchStart" @touchmove="ListTouchMove" @touchend="ListTouchEnd" :data-target="'move-box-' + index">
<view class="cu-avatar round lg" :style="item.status_name === '正常' ? icon_device_li_green : icon_device_li "></view> <view class="cu-avatar round lg" :style="item.status_name === '正常' ? icon_device_li_green : icon_device_li "></view>
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
</view> </view>
</view> </view>
<view class="padding-xl"> <view class="padding-xl">
设备标号:{{devicenum}} 设备标号:{{cpdevicenum}}
</view> </view>
<view class="cu-bar bg-white justify-end"> <view class="cu-bar bg-white justify-end">
<view class="action"> <view class="action">
...@@ -155,19 +155,24 @@ ...@@ -155,19 +155,24 @@
devicetype: [], // 设备类型 devicetype: [], // 设备类型
deviceList: [], //设备列表 deviceList: [], //设备列表
countdevice: 0, countdevice: 0,
devicenum: '', //复制设备编号 cpdevicenum: '', //复制设备编号
tid: '', tid: '',
// 统计图 // 统计图
cWidth: '', cWidth: '',
cHeight: '', cHeight: '',
pixelRatio: 1, pixelRatio: 1,
serverData: '' serverData: '',
isbottom: 'margin-bottom: 130upx;',
tophome: '',
}; };
}, },
methods: { methods: {
// ListTouch触摸开始 // ListTouch触摸开始
ListTouchStart(e) { ListTouchStart(e) {
this.listTouchStart = e.touches[0].pageX - 120 //#ifdef APP-PLUS
this.listTouchStart = e.touches[0].pageX;
//#endif
this.listTouchStart = e.touches[0].pageX -120;
}, },
// ListTouch计算方向 // ListTouch计算方向
ListTouchMove(e) { ListTouchMove(e) {
...@@ -208,7 +213,7 @@ ...@@ -208,7 +213,7 @@
//打开模拟框 //打开模拟框
showModal(e) { showModal(e) {
this.modalName = e.currentTarget.dataset.target; this.modalName = e.currentTarget.dataset.target;
this.devicenum = e.currentTarget.dataset.devicenum; this.cpdevicenum = e.currentTarget.dataset.devicenum;
}, },
touchColumn(e) { touchColumn(e) {
canvaColumn.touchLegend(e); canvaColumn.touchLegend(e);
...@@ -292,7 +297,7 @@ ...@@ -292,7 +297,7 @@
}); });
} else { } else {
uni.setClipboardData({ uni.setClipboardData({
data: this.devicenum, data: that.cpdevicenum,
success: () => { success: () => {
that.hideModal(); that.hideModal();
uni.showToast({ uni.showToast({
...@@ -319,15 +324,12 @@ ...@@ -319,15 +324,12 @@
}) })
}, },
islogin() { islogin() {
uni.getStorage({ var loginis = uni.getStorageSync('islogin');
key: 'islogin', if (loginis === '') {
success: function(res) {}, uni.redirectTo({
fail: function(re) { url: '../login/login',
uni.redirectTo({ });
url: '../login/login', }
});
}
});
}, },
// 分页加载 // 分页加载
adddevivelist() { adddevivelist() {
...@@ -377,6 +379,11 @@ ...@@ -377,6 +379,11 @@
this.cWidth = uni.upx2px(750); this.cWidth = uni.upx2px(750);
this.cHeight = uni.upx2px(500); this.cHeight = uni.upx2px(500);
this.getServerData(); this.getServerData();
let platform = uni.getSystemInfoSync().platform;
if (platform == 'ios') {
this.isbottom = 'margin-bottom: 180upx;';
// this.tophome = "margin-top:30upx";
}
}, },
//获取设备详情信息 //获取设备详情信息
devicetypes() { devicetypes() {
...@@ -431,8 +438,8 @@ ...@@ -431,8 +438,8 @@
width: _self.cWidth * _self.pixelRatio, width: _self.cWidth * _self.pixelRatio,
height: _self.cHeight * _self.pixelRatio, height: _self.cHeight * _self.pixelRatio,
extra: { extra: {
column: { column: {
type:'group', type: 'group',
width: _self.cWidth * _self.pixelRatio * 0.45 / chartData.categories.length width: _self.cWidth * _self.pixelRatio * 0.45 / chartData.categories.length
} }
} }
...@@ -501,7 +508,7 @@ ...@@ -501,7 +508,7 @@
width: 1, width: 1,
}, },
}, },
data:res.data.data.policedata data: res.data.data.policedata
}, { }, {
name: '报警数量', name: '报警数量',
type: 'column', type: 'column',
...@@ -534,6 +541,8 @@ ...@@ -534,6 +541,8 @@
this.devicetypes(); this.devicetypes();
this.devicelist(); this.devicelist();
this.isapp(); this.isapp();
var info = plus.push.getClientInfo();
console.log(JSON.stringify(info));
}, },
onLaunch() { onLaunch() {
console.log("success") console.log("success")
......
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
{{item.name}} {{item.name}}
</view> </view>
</scroll-view> </scroll-view>
<view class="cu-list menu-avatar" style="margin-top: 12upx;margin-bottom: 120upx;"> <view class="cu-list menu-avatar" style="margin-top: 12upx;" :style="bottom">
<view class="cu-item" v-for="(item,index) in devicelist" :key="index" @click="devicceinfo(item.id)"> <view class="cu-item" v-for="(item,index) in devicelist" :key="index" @click="devicceinfo(item.id)">
<view class="cu-avatar round lg" :style="item.status_name === '正常' ? icon_device_li_green : icon_device_li "></view> <view class="cu-avatar round lg" :style="item.status_name === '正常' ? icon_device_li_green : icon_device_li "></view>
<view class="content"> <view class="content">
<view class="text-grey">{{item.usernickname}}</view> <view class="text-grey">{{item.username}}</view>
<view class="text-gray text-sm">设备编号:{{item.devicenum}}</view> <view class="text-gray text-sm">设备编号:{{item.devicenum}}</view>
</view> </view>
<view class="action" :style="item.status_name.length === 5 ? 'margin-right:60upx;' : (item.status_name.length === 4 ? 'margin-right:30upx;' : '')" <view class="action" :style="item.status_name.length === 5 ? 'margin-right:60upx;' : (item.status_name.length === 4 ? 'margin-right:30upx;' : '')"
...@@ -26,10 +26,10 @@ ...@@ -26,10 +26,10 @@
<view :class="item.status_name === '正常'? 'cu-tag bg-green' : 'cu-tag bg-red' ">{{item.status_name}}</view> <view :class="item.status_name === '正常'? 'cu-tag bg-green' : 'cu-tag bg-red' ">{{item.status_name}}</view>
</view> </view>
</view> </view>
<view class="loadingjiazai" v-if="loadingjiazai || count > 10"> <view class="loadingjiazai" v-if="loadingjiazai || count > 10">
<view class="cu-load bg-grey" v-if="overs" :class="!isLoad?'loading':'over'"></view> <view class="cu-load bg-grey" style="border-radius: 35upx;" v-if="overs" :class="!isLoad?'loading':'over'"></view>
<view class="cu-load bg-grey" v-if="isover" @click="adddevivelist">点击加载</view> <view class="cu-load bg-grey" style="border-radius: 35upx;" v-if="isover" @click="adddevivelist">点击加载<text v-if="isloading" class="cuIcon-loading2 cuIconfont-spin"></text></view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
...@@ -54,21 +54,23 @@ ...@@ -54,21 +54,23 @@
page: 1, page: 1,
limit: 10, limit: 10,
devicelist: [], devicelist: [],
count: '', count: '',
loadingjiazai: false, loadingjiazai: false,
isover: true, isover: true,
overs: false, overs: false,
type: '', type: '',
isLoad: false, isLoad: false,
bottom: 'margin-bottom:120upx',
isloading: false,
}; };
}, },
methods: { methods: {
tabSelect(e) { tabSelect(e) {
this.page = 1; this.page = 1;
this.isover = true; this.isover = true;
this.overs = false; this.overs = false;
this.TabCur = e.currentTarget.dataset.id; this.TabCur = e.currentTarget.dataset.id;
this.tagname = e.currentTarget.dataset.tagname; this.tagname = e.currentTarget.dataset.tagname;
this.type = e.currentTarget.dataset.type; this.type = e.currentTarget.dataset.type;
this.control(e.currentTarget.dataset.type) this.control(e.currentTarget.dataset.type)
}, },
...@@ -95,6 +97,9 @@ ...@@ -95,6 +97,9 @@
}, },
//跳转设备详情 //跳转设备详情
devicceinfo(id) { devicceinfo(id) {
uni.showLoading({
title: '加载中...'
});
let opts = { let opts = {
url: 'huinapphome/devicedatainfo/' + id, url: 'huinapphome/devicedatainfo/' + id,
method: 'get' method: 'get'
...@@ -104,39 +109,42 @@ ...@@ -104,39 +109,42 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/basics/deviceinfo?data=' + JSON.stringify(res.data.data), url: '/pages/basics/deviceinfo?data=' + JSON.stringify(res.data.data),
}); });
uni.hideLoading();
} }
}, error => { }, error => {
console.log(error); console.log(error);
}) })
}, },
adddevivelist() { adddevivelist() {
++this.page; ++this.page;
let data = { let data = {
page: this.page, page: this.page,
limit: this.limit, limit: this.limit,
type: this.type, type: this.type,
}; };
let opts = { let opts = {
url: 'devices/control', url: 'devices/control',
method: 'get' method: 'get'
}; };
http.httpRequest(opts, data).then(res => { this.isloading = true;
var isLoadding = res.data.data.devicelist.length >= 1 ? true : false; http.httpRequest(opts, data).then(res => {
let arr = res.data.data.devicelist var isLoadding = res.data.data.devicelist.length >= 1 ? true : false;
arr.map((val, index, arr) => { let arr = res.data.data.devicelist
this.devicelist.push(val); arr.map((val, index, arr) => {
}) this.devicelist.push(val);
if (res.data.data.devicelist.length != 0) { })
this.isover = true; //点击加载 if (res.data.data.devicelist.length != 0) {
this.overs = false; this.isover = true; //点击加载
} else { this.overs = false;
this.isover = false; //点击加载 } else {
this.overs = true; this.isover = false; //点击加载
this.isLoad = true; this.overs = true;
this.isLoad = true;
} }
}, error => { this.isloading = false;
console.log(error); }, error => {
}) console.log(error);
})
}, },
}, },
created() { created() {
...@@ -145,11 +153,16 @@ ...@@ -145,11 +153,16 @@
} }
</script> </script>
<style> <style>
.loadingjiazai { .loadingjiazai {
margin-top: 20rpx; /* margin-top: 20rpx;
filter: alpha(Opacity=60); filter: alpha(Opacity=60);
-moz-opacity: 0.6; -moz-opacity: 0.6;
opacity: 0.6; opacity: 0.6; */
width: 30%;
position:fixed;
z-index: 99999;
bottom: 200upx;
right: 12upx;
} }
</style> </style>
This diff is collapsed.
...@@ -16,19 +16,19 @@ ...@@ -16,19 +16,19 @@
<view class="search-form round"> <view class="search-form round">
<text class="cuIcon-search"></text> <text class="cuIcon-search"></text>
<text class="cuIcon-close" v-if="cuIconde" style="position: absolute;left:500upx;z-index: 99999;" @click="nonecuIconde"></text> <text class="cuIcon-close" v-if="cuIconde" style="position: absolute;left:500upx;z-index: 99999;" @click="nonecuIconde"></text>
<input @focus="InputFocus" :value="searchdata" @blur="InputBlur" @input="devicedata" :adjust-position="false" type="text" <input @focus="InputFocus" :value="searchdata" @blur="InputBlur" @input="devicedata" :adjust-position="false"
:placeholder="devicedatasetshow === '' ? '搜索设备号、名称 ' : devicedatasetshow " confirm-type="search"></input> type="text" :placeholder="devicedatasetshow === '' ? '搜索设备号、名称 ' : devicedatasetshow " confirm-type="search"></input>
</view> </view>
<!-- 搜索设备号、名称 --> <!-- 搜索设备号、名称 -->
<view class="action"> <view class="action">
<button class="cu-btn bg-green shadow-blur round" @click="postseachdata">搜索</button> <button class="cu-btn bg-green shadow-blur round" @click="postseachdata">搜索</button>
</view> </view>
</view> </view>
<view class="cu-list menu-avatar" style="margin-top: 12upx;margin-bottom: 120upx;"> <view class="cu-list menu-avatar" style="margin-top: 12upx;" :style="bottom">
<view class="cu-item" v-for="(item,index) in seardevicedata" :key="index" @click="devicceinfo(item.id)"> <view class="cu-item" v-for="(item,index) in seardevicedata" :key="index" @click="devicceinfo(item.id)">
<view class="cu-avatar round lg" :style="item.status_name === '正常' ? icon_device_li_green : icon_device_li "></view> <view class="cu-avatar round lg" :style="item.status_name === '正常' ? icon_device_li_green : icon_device_li "></view>
<view class="content"> <view class="content">
<view class="text-grey">{{item.usernickname}}</view> <view class="text-grey">{{item.username}}</view>
<view class="text-gray text-sm">设备编号:{{item.devicenum}}</view> <view class="text-gray text-sm">设备编号:{{item.devicenum}}</view>
</view> </view>
<view class="action" :style="item.status_name.length === 5 ? 'margin-right:60upx;' : (item.status_name.length === 4 ? 'margin-right:30upx;' : '')" <view class="action" :style="item.status_name.length === 5 ? 'margin-right:60upx;' : (item.status_name.length === 4 ? 'margin-right:30upx;' : '')"
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
showdevicedata: '', showdevicedata: '',
icon_device_li_green: 'background-image: url(../../static/img/icon_device_li_green.png)', icon_device_li_green: 'background-image: url(../../static/img/icon_device_li_green.png)',
icon_device_li: 'background-image:url(../../static/img/icon_device_li.png)', icon_device_li: 'background-image:url(../../static/img/icon_device_li.png)',
bottom: 'margin-bottom:120upx',
}; };
}, },
methods: { methods: {
...@@ -100,7 +101,7 @@ ...@@ -100,7 +101,7 @@
that.searchdata = ''; that.searchdata = '';
}, 2000) }, 2000)
} }
this.setseachdata(); this.setseachdata();
this.chatshowsetdevice(); this.chatshowsetdevice();
}, error => { }, error => {
console.log(error); console.log(error);
...@@ -121,6 +122,18 @@ ...@@ -121,6 +122,18 @@
} }
} }
}, },
//判断是否安卓或者ios
judgePlatForm() {
let platform = uni.getSystemInfoSync().platform;
console.log(platform);
if (platform == 'ios') {
this.bottom = 'margin-bottom:180upx';
} else {
// #ifdef MP
this.bottom = 'margin-bottom:180upx';
// #endIf
}
},
//获取缓存搜索 //获取缓存搜索
chatshowsetdevice() { chatshowsetdevice() {
this.showdevicedata = uni.getStorageSync('setseachdata'); this.showdevicedata = uni.getStorageSync('setseachdata');
...@@ -225,6 +238,7 @@ ...@@ -225,6 +238,7 @@
created() { created() {
this.seardevicedata = []; this.seardevicedata = [];
this.chatshowsetdevice(); this.chatshowsetdevice();
this.judgePlatForm();
if (uni.getStorageSync('setseachdata').length > 0) { if (uni.getStorageSync('setseachdata').length > 0) {
this.shownoew(); this.shownoew();
} }
......
<template>
<view>
<cu-custom bgColor="bg-gradual-blue" :isBack="true">
<block slot="backText">返回</block>
<block slot="content">{{ strname }}</block>
</cu-custom>
<!-- 主体开始 -->
<!-- 问题反馈开始 -->
<view v-if="showtype == 1">
<view class="cu-form-group">
<view class="title">问题和意见</view>
</view>
<view class="cu-form-group">
<textarea maxlength="-1" :disabled="modalName!=null" @input="textareaAInput" placeholder="请详细描述你的问题和意见"></textarea>
</view>
<view class="cu-form-group">
<view class="title">邮箱</view>
</view>
<view class="cu-form-group">
<input placeholder="方便我们联系到你" name="input"></input>
</view>
<view class="padding flex flex-direction">
<button class="cu-btn bg-grey lg">提交</button>
</view>
</view>
</view>
</template>
<script>
import http from '@/components/utils/http.js';
export default {
data() {
return {
strname: '',
showtype: '', // 显示控制
modalName: null,
textareaAValue: '',
};
},
methods: {
textareaAInput(e) {
this.textareaAValue = e.detail.value
},
},
onLoad(e) {
var type = e.type;
this.showtype = type;
if (type == 1) {
this.strname = "问题反馈";
} else if (type == 2) {
this.strname = "关于泽宏";
}
}
}
</script>
<style>
</style>
<template>
<view>
<cu-custom bgColor="bg-gradual-blue" :isBack="true">
<block slot="backText">返回</block>
<block slot="content">系统设置</block>
</cu-custom>
<!-- 名称 -->
<view class="cu-list menu card-menu margin-top-xl shadow-lg radius">
<view class="cu-item arrow">
<navigator class="content" hover-class="none">
<text class="cuIcon-my text-grey"></text>
<text class="text-grey">名称:</text><text style="float:right">{{ my.name }}</text>
</navigator>
</view>
</view>
<!-- 报警通知设置 -->
<view class="cu-list menu card-menu margin-top-xl shadow-lg radius">
<view class="cu-item arrow">
<navigator class="content" hover-class="none">
<text class="cuIcon-settings text-grey"></text>
<text class="text-grey">报警通知设置</text>
</navigator>
</view>
</view>
<!-- 系统版本 -->
<view class="cu-list menu card-menu margin-top-xl shadow-lg radius">
<view class="cu-item arrow">
<navigator class="content" hover-class="none">
<text class="cuIcon-info text-grey"></text>
<text class="text-grey">系统版本:</text><text style="float:right">1.0</text>
</navigator>
</view>
</view>
<!-- 问题反馈 -->
<view class="cu-list menu card-menu margin-top-xl shadow-lg radius">
<view class="cu-item arrow">
<navigator class="content" hover-class="none" url="../userme/infozehong?type=1">
<text class="cuIcon-question text-grey"></text>
<text class="text-grey">问题反馈</text>
</navigator>
</view>
</view>
<!-- 关于泽宏 -->
<view class="cu-list menu card-menu margin-top-xl shadow-lg radius">
<view class="cu-item arrow">
<navigator class="content" hover-class="none" url="../userme/infozehong?type=2">
<text class="cuIcon-like text-grey"></text>
<text class="text-grey">关于泽宏</text>
</navigator>
</view>
</view>
<!-- 退出 -->
<view class="cu-list menu card-menu margin-bottom-xl shadow-lg radius">
<view class="cu-item arrow">
<navigator class="content" hover-class="none" @click="ligoin">
<text class="cuIcon-lock text-grey"></text>
<text class="text-grey">退出</text>
</navigator>
</view>
</view>
<!-- -->
</view>
</template>
<script>
import http from '@/components/utils/http.js';
export default {
data() {
return {
my: uni.getStorageSync('islogin'),
}
},
methods: {
//退出
ligoin() {
//清楚缓存
uni.removeStorageSync('islogin');
uni.removeStorageSync('Authorization');
uni.redirectTo({
url: '../login/login',
});
},
//监听设备的变化
onUIStyle() {
uni.onUIStyleChange(function(res) {});
},
},
created() {
this.onUIStyle();
},
}
</script>
<style>
</style>
...@@ -101,12 +101,12 @@ ...@@ -101,12 +101,12 @@
}, },
value(e) { value(e) {
this.userpront = e.detail.value this.userpront = e.detail.value
}, },
//跳转到用户设备列表 //跳转到用户设备列表
userdevicelist(id,name){ userdevicelist(id, name) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/userme/userdevicelist?id=' + id + '&name=' + name, url: '/pages/userme/userdevicelist?id=' + id + '&name=' + name,
}); });
} }
}, },
computed: {}, computed: {},
......
...@@ -37,36 +37,29 @@ ...@@ -37,36 +37,29 @@
<!-- 设置详细 --> <!-- 设置详细 -->
<view class="cu-list menu card-menu margin-top-xl margin-bottom-xl shadow-lg radius"> <view class="cu-list menu card-menu margin-top-xl margin-bottom-xl shadow-lg radius">
<view class="cu-item arrow"> <view class="cu-item arrow">
<navigator class="content" hover-class="none" url='/pages/userme/userpolice'> <navigator class="content" hover-class="none" @click="ligoin" url='/pages/userme/userpolice'>
<text class="cuIcon-moneybagfill text-red"></text> <text class="cuIcon-moneybagfill text-red"></text>
<text class="text-grey">报警记录</text> <text class="text-grey">报警记录</text>
<!-- <text class='num'>19</text> -->
</navigator> </navigator>
</view> </view>
<!-- <view class="cu-item arrow">
<navigator class="content" hover-class="none" url='/pages/my/my_sale/my_sale'>
<text class="cuIcon-titles text-green"></text>
<text class="text-grey">我的设备</text>
</navigator>
</view>
<view class="cu-item arrow">
<navigator class="content" hover-class="none" url="/pages/my/my_buy/my_buy">
<text class="cuIcon-formfill text-green"></text>
<text class="text-grey">用户设备</text>
</navigator>
</view> -->
<view class="cu-item arrow"> <view class="cu-item arrow">
<navigator class="content" hover-class="none" url="/pages/userme/userlist"> <navigator class="content" hover-class="none" @click="ligoin" :url="isurl? '': url">
<text class="cuIcon-locationfill text-grey"></text> <text class="cuIcon-locationfill text-grey"></text>
<text class="text-grey">用户列表</text> <text class="text-grey">用户列表</text>
</navigator> </navigator>
</view> </view>
<view class="cu-item"> <!-- 设置 -->
<view class="content" bindtap="toCollect" @click="service"> <view class="cu-item arrow">
<text class="cuIcon-appreciatefill text-red"></text> <navigator class="content" hover-class="none" @click="ligoin" url="/pages/userme/setup">
<text class="text-grey">客服</text> <text class="cuIcon-settingsfill text-grey"></text>
</view> <text class="text-grey">设置</text>
</navigator>
</view>
<view class="cu-item">
<view class="content" bindtap="toCollect" @click="service">
<text class="cuIcon-appreciatefill text-red"></text>
<text class="text-grey">客服</text>
</view>
</view> </view>
</view> </view>
<view class="cu-tabbar-height"></view> <view class="cu-tabbar-height"></view>
...@@ -82,6 +75,8 @@ ...@@ -82,6 +75,8 @@
username: uni.getStorageSync('islogin').name, username: uni.getStorageSync('islogin').name,
userdata: [], userdata: [],
devicetype: '', devicetype: '',
url: '/pages/userme/userlist',
isurl: false,
} }
}, },
methods: { methods: {
...@@ -109,7 +104,19 @@ ...@@ -109,7 +104,19 @@
return devicecount <= 0 ? "0" : (Math.round(devicepolice / devicecount * 10000) / 100.00); return devicecount <= 0 ? "0" : (Math.round(devicepolice / devicecount * 10000) / 100.00);
}, },
//客服 //客服
service() {} service() {
},
//处理加载
ligoin() {
uni.showLoading({
title: '加载中'
});
setTimeout(function() {
uni.hideLoading();
this.isurl = true;
}, 500);
},
}, },
created() { created() {
// 获取信息 // 获取信息
......
page {
background: linear-gradient(to bottom, #f06c7a 0%, #f06c7a 100%);
height: 100%;
}
.icon {
color:#ffffff;
}
.logo {
width: 100%;
height: 45vw;
display: flex;
justify-content: center;
align-items: center;
.img {
width: 25%;
height: 25vw;
image {
width: 100%;
border-radius: 100%;
}
}
}
.form {
width: 86%;
padding: 0 7%;
font-size: 30upx;
.username,
.password,
.code {
width: calc(100% - 90upx);
height: 90upx;
display: flex;
align-items: center;
border-radius: 45upx;
background-color: rgba($color: #ffffff, $alpha: 0.1);
padding: 0 45upx;
margin-bottom: 26upx;
input {
width: 100%;
height: 50upx;
color: rgba($color: #ffffff, $alpha: 0.8);
font-weight: 200;
}
}
.btn {
color: #f06c7a;
width: 100%;
height: 90upx;
display: flex;
justify-content: center;
align-items: center;
border-radius: 45upx;
background-color: #fff;
font-size: 40upx;
}
}
.re {
.username{
position: relative;
.get-code{
position: absolute;
height: 90upx;
display: flex;
align-items: center;
justify-content: center;
right: 0;
padding: 0 40upx;
z-index: 3;
&:after {
content: " ";
width: 1upx;
height: 50upx;
background-color: #fff;
position: absolute;
z-index: 3;
margin-right: 100%;
left: 0;
top: 20upx;
}
}
}
.res {
display: flex;
justify-content: center;
align-items: center;
height: 100upx;
color: rgba($color: #ffffff, $alpha: 0.8);
}
}
forceInstall
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment