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

新模块

parent 98d11b03
This diff is collapsed.
/* css 滤镜 控制黑白底色gif的 */
/* ==================
此组件自主开发,如适用请联系开发猪
WX:A1431670879
==================== */
.gif-black{
mix-blend-mode: screen;
}
......
/* ==================
此组件自主开发,如适用请联系开发猪
WX:A1431670879
==================== */
@keyframes cuIcon-spin {
0% {
-webkit-transform: rotate(0);
......
/* ==================
初始化
==================== */
/* ==================
此组件自主开发,如适用请联系开发猪
WX:A1431670879
==================== */
body {
background-color: #f1f1f1;
font-size: 28upx;
......
......@@ -4,7 +4,7 @@
:controls='controls' @regionchange='mapChange'>
</map>
<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">
<image class="left" src="../../static/jjdd.png" mode=""></image>
......@@ -31,7 +31,7 @@
const app = getApp()
var QQMapWX = require('./qqmap-wx-jssdk.min.js')
var qqmapsdk = new QQMapWX({
key: 'LXCBZ-NNIKD-UZ64F-H6AFI-UNJLH-OCFGE'
key: 'SJBBZ-LNVKU-5IUVR-2FGDI-CB7ZS-U7FFV'
})
export default {
props: {
......@@ -158,7 +158,7 @@
// #ifndef APP-PLUS
// ======================== jsonp跨域 ========================
const KEY = 'LXCBZ-NNIKD-UZ64F-H6AFI-UNJLH-OCFGE'
const KEY = 'SJBBZ-LNVKU-5IUVR-2FGDI-CB7ZS-U7FFV'
let locationObj = addressObj.latitude + ',' + addressObj.longitude
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';
......
const baseUrl = 'http://36.148.1.58:81/api/';
const baseUrl = 'https://iot.zhkjgf.com:81/api/';
const httpRequest = (opts, data) => {
let httpDefaultOpts = {
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 @@
"compilerVersion" : 3,
/* 模块配置 */
"modules" : {
"Speech" : {}
"Speech" : {},
"Share" : {},
"Bluetooth" : {},
"Push" : {},
"LivePusher" : {},
"Maps" : {},
"FaceID" : {}
},
/* 应用发布信息 */
"distribute" : {
......@@ -45,14 +51,72 @@
]
},
/* ios打包配置 */
"ios" : {},
"ios" : {
"UIUserInterfaceStyle" : "Automatic"
},
/* SDK配置 */
"sdkConfigs" : {
"ad" : {},
"speech" : {
"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 @@
"postcss" : false,
"minified" : true
},
"usingComponents" : true
"usingComponents" : true,
"permission" : {
"scope.userLocation" : {
"desc" : "获取您的个人位位置和信息"
}
},
"plugins" : {
"chooseLocation" : {
"version" : "1.0.3",
"provider" : "wx3fb24f5d2f0956d6"
}
}
},
"mp-alipay" : {
"usingComponents" : true
......
......@@ -30,9 +30,19 @@
"enablePullDownRefresh": true
}
}, {
"path": "pages/adddevice/mpnaddlink",
"path": "pages/userme/setup",
"style": {}
}, {
"path": "pages/userme/infozehong",
"style": {}
}, {
"path": "pages/adddevice/latitude",
"style": {
"navigationBarTitleText": "经纬度"
}
}, {
"path": "pages/adddevice/mpnaddlink",
"style": {}
}
],
// "tabBar": {
......
......@@ -4,7 +4,7 @@
<block slot="content">添加设备</block>
</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">
<view class="cu-form-group margin-top">
<view class="title">设备名称</view>
......@@ -79,7 +79,7 @@
</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>
</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-bar bg-white">
<view class="action text-green">确定</view>
......@@ -126,6 +126,7 @@
gasid: '',
mapShow: true,
positionObj: {},
isnpms: false,
};
},
methods: {
......@@ -208,11 +209,19 @@
this.textareaBValue = e.detail.value
},
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) {
this.modalName = null
this.modalName = null;
this.isnpms = false;
},
larces(e) {
console.log(e);
......@@ -260,7 +269,6 @@
},
//验证用户提交表单内容
isdatadevice(data) {
console.log(data);
if (data.devicecoord === '') {
this.onshowToast('设备坐标不能为空');
} else if (data.deviceinfo === '') {
......@@ -304,7 +312,8 @@
created() {
this.issetinfo();
this.devicetypes();
this.addUserDevices();
this.addUserDevices();
plus.screen.lockOrientation('portrait-primary');
},
}
</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">
<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="cu-load load-cuIcon" :class="!isLoad?'loading':'over'"></view>
......@@ -78,7 +78,7 @@
</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"
: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>
......@@ -110,7 +110,7 @@
</view>
</view>
<view class="padding-xl">
设备标号:{{devicenum}}
设备标号:{{cpdevicenum}}
</view>
<view class="cu-bar bg-white justify-end">
<view class="action">
......@@ -155,19 +155,24 @@
devicetype: [], // 设备类型
deviceList: [], //设备列表
countdevice: 0,
devicenum: '', //复制设备编号
cpdevicenum: '', //复制设备编号
tid: '',
// 统计图
cWidth: '',
cHeight: '',
pixelRatio: 1,
serverData: ''
serverData: '',
isbottom: 'margin-bottom: 130upx;',
tophome: '',
};
},
methods: {
// ListTouch触摸开始
ListTouchStart(e) {
this.listTouchStart = e.touches[0].pageX - 120
ListTouchStart(e) {
//#ifdef APP-PLUS
this.listTouchStart = e.touches[0].pageX;
//#endif
this.listTouchStart = e.touches[0].pageX -120;
},
// ListTouch计算方向
ListTouchMove(e) {
......@@ -208,7 +213,7 @@
//打开模拟框
showModal(e) {
this.modalName = e.currentTarget.dataset.target;
this.devicenum = e.currentTarget.dataset.devicenum;
this.cpdevicenum = e.currentTarget.dataset.devicenum;
},
touchColumn(e) {
canvaColumn.touchLegend(e);
......@@ -292,7 +297,7 @@
});
} else {
uni.setClipboardData({
data: this.devicenum,
data: that.cpdevicenum,
success: () => {
that.hideModal();
uni.showToast({
......@@ -319,15 +324,12 @@
})
},
islogin() {
uni.getStorage({
key: 'islogin',
success: function(res) {},
fail: function(re) {
uni.redirectTo({
url: '../login/login',
});
}
});
var loginis = uni.getStorageSync('islogin');
if (loginis === '') {
uni.redirectTo({
url: '../login/login',
});
}
},
// 分页加载
adddevivelist() {
......@@ -377,6 +379,11 @@
this.cWidth = uni.upx2px(750);
this.cHeight = uni.upx2px(500);
this.getServerData();
let platform = uni.getSystemInfoSync().platform;
if (platform == 'ios') {
this.isbottom = 'margin-bottom: 180upx;';
// this.tophome = "margin-top:30upx";
}
},
//获取设备详情信息
devicetypes() {
......@@ -431,8 +438,8 @@
width: _self.cWidth * _self.pixelRatio,
height: _self.cHeight * _self.pixelRatio,
extra: {
column: {
type:'group',
column: {
type: 'group',
width: _self.cWidth * _self.pixelRatio * 0.45 / chartData.categories.length
}
}
......@@ -501,7 +508,7 @@
width: 1,
},
},
data:res.data.data.policedata
data: res.data.data.policedata
}, {
name: '报警数量',
type: 'column',
......@@ -534,6 +541,8 @@
this.devicetypes();
this.devicelist();
this.isapp();
var info = plus.push.getClientInfo();
console.log(JSON.stringify(info));
},
onLaunch() {
console.log("success")
......
......@@ -14,11 +14,11 @@
{{item.name}}
</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-avatar round lg" :style="item.status_name === '正常' ? icon_device_li_green : icon_device_li "></view>
<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>
<view class="action" :style="item.status_name.length === 5 ? 'margin-right:60upx;' : (item.status_name.length === 4 ? 'margin-right:30upx;' : '')"
......@@ -26,10 +26,10 @@
<view :class="item.status_name === '正常'? 'cu-tag bg-green' : 'cu-tag bg-red' ">{{item.status_name}}</view>
</view>
</view>
<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" v-if="isover" @click="adddevivelist">点击加载</view>
</view>
<view class="loadingjiazai" v-if="loadingjiazai || count > 10">
<view class="cu-load bg-grey" style="border-radius: 35upx;" v-if="overs" :class="!isLoad?'loading':'over'"></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>
......@@ -54,21 +54,23 @@
page: 1,
limit: 10,
devicelist: [],
count: '',
loadingjiazai: false,
isover: true,
overs: false,
type: '',
count: '',
loadingjiazai: false,
isover: true,
overs: false,
type: '',
isLoad: false,
bottom: 'margin-bottom:120upx',
isloading: false,
};
},
methods: {
tabSelect(e) {
this.page = 1;
this.isover = true;
tabSelect(e) {
this.page = 1;
this.isover = true;
this.overs = false;
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.control(e.currentTarget.dataset.type)
},
......@@ -95,6 +97,9 @@
},
//跳转设备详情
devicceinfo(id) {
uni.showLoading({
title: '加载中...'
});
let opts = {
url: 'huinapphome/devicedatainfo/' + id,
method: 'get'
......@@ -104,39 +109,42 @@
uni.navigateTo({
url: '/pages/basics/deviceinfo?data=' + JSON.stringify(res.data.data),
});
uni.hideLoading();
}
}, error => {
console.log(error);
})
},
adddevivelist() {
++this.page;
let data = {
page: this.page,
limit: this.limit,
type: this.type,
};
let opts = {
url: 'devices/control',
method: 'get'
},
adddevivelist() {
++this.page;
let data = {
page: this.page,
limit: this.limit,
type: this.type,
};
let opts = {
url: 'devices/control',
method: 'get'
};
http.httpRequest(opts, data).then(res => {
var isLoadding = res.data.data.devicelist.length >= 1 ? true : false;
let arr = res.data.data.devicelist
arr.map((val, index, arr) => {
this.devicelist.push(val);
})
if (res.data.data.devicelist.length != 0) {
this.isover = true; //点击加载
this.overs = false;
} else {
this.isover = false; //点击加载
this.overs = true;
this.isLoad = true;
this.isloading = true;
http.httpRequest(opts, data).then(res => {
var isLoadding = res.data.data.devicelist.length >= 1 ? true : false;
let arr = res.data.data.devicelist
arr.map((val, index, arr) => {
this.devicelist.push(val);
})
if (res.data.data.devicelist.length != 0) {
this.isover = true; //点击加载
this.overs = false;
} else {
this.isover = false; //点击加载
this.overs = true;
this.isLoad = true;
}
}, error => {
console.log(error);
})
this.isloading = false;
}, error => {
console.log(error);
})
},
},
created() {
......@@ -145,11 +153,16 @@
}
</script>
<style>
.loadingjiazai {
margin-top: 20rpx;
filter: alpha(Opacity=60);
-moz-opacity: 0.6;
opacity: 0.6;
<style>
.loadingjiazai {
/* margin-top: 20rpx;
filter: alpha(Opacity=60);
-moz-opacity: 0.6;
opacity: 0.6; */
width: 30%;
position:fixed;
z-index: 99999;
bottom: 200upx;
right: 12upx;
}
</style>
This diff is collapsed.
......@@ -16,19 +16,19 @@
<view class="search-form round">
<text class="cuIcon-search"></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"
:placeholder="devicedatasetshow === '' ? '搜索设备号、名称 ' : devicedatasetshow " confirm-type="search"></input>
<input @focus="InputFocus" :value="searchdata" @blur="InputBlur" @input="devicedata" :adjust-position="false"
type="text" :placeholder="devicedatasetshow === '' ? '搜索设备号、名称 ' : devicedatasetshow " confirm-type="search"></input>
</view>
<!-- 搜索设备号、名称 -->
<view class="action">
<button class="cu-btn bg-green shadow-blur round" @click="postseachdata">搜索</button>
</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-avatar round lg" :style="item.status_name === '正常' ? icon_device_li_green : icon_device_li "></view>
<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>
<view class="action" :style="item.status_name.length === 5 ? 'margin-right:60upx;' : (item.status_name.length === 4 ? 'margin-right:30upx;' : '')"
......@@ -59,6 +59,7 @@
showdevicedata: '',
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)',
bottom: 'margin-bottom:120upx',
};
},
methods: {
......@@ -100,7 +101,7 @@
that.searchdata = '';
}, 2000)
}
this.setseachdata();
this.setseachdata();
this.chatshowsetdevice();
}, error => {
console.log(error);
......@@ -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() {
this.showdevicedata = uni.getStorageSync('setseachdata');
......@@ -225,6 +238,7 @@
created() {
this.seardevicedata = [];
this.chatshowsetdevice();
this.judgePlatForm();
if (uni.getStorageSync('setseachdata').length > 0) {
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 @@
},
value(e) {
this.userpront = e.detail.value
},
//跳转到用户设备列表
userdevicelist(id,name){
uni.navigateTo({
url: '/pages/userme/userdevicelist?id=' + id + '&name=' + name,
});
},
//跳转到用户设备列表
userdevicelist(id, name) {
uni.navigateTo({
url: '/pages/userme/userdevicelist?id=' + id + '&name=' + name,
});
}
},
computed: {},
......
......@@ -37,36 +37,29 @@
<!-- 设置详细 -->
<view class="cu-list menu card-menu margin-top-xl margin-bottom-xl shadow-lg radius">
<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="text-grey">报警记录</text>
<!-- <text class='num'>19</text> -->
</navigator>
</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">
<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="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 class="cu-item arrow">
<navigator class="content" hover-class="none" @click="ligoin" url="/pages/userme/setup">
<text class="cuIcon-settingsfill text-grey"></text>
<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 class="cu-tabbar-height"></view>
......@@ -82,6 +75,8 @@
username: uni.getStorageSync('islogin').name,
userdata: [],
devicetype: '',
url: '/pages/userme/userlist',
isurl: false,
}
},
methods: {
......@@ -109,7 +104,19 @@
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() {
// 获取信息
......
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