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

no message

parent f2148618
...@@ -74,9 +74,9 @@ ...@@ -74,9 +74,9 @@
"androidStyle" : "default", "androidStyle" : "default",
"iosStyle" : "common", "iosStyle" : "common",
"android" : { "android" : {
"xhdpi" : "unpackage/status/720 × 1242.png", "xhdpi" : "unpackage/status/泽宏启动页/728.1242.png",
"hdpi" : "unpackage/status/480 × 762.png", "hdpi" : "unpackage/status/泽宏启动页/480.762.png",
"xxhdpi" : "unpackage/status/1080 × 1882.png" "xxhdpi" : "unpackage/status/泽宏启动页/1080.1882.png"
} }
}, },
"icons" : { "icons" : {
......
...@@ -40,6 +40,11 @@ ...@@ -40,6 +40,11 @@
"style": { "style": {
"navigationBarTitleText": "经纬度" "navigationBarTitleText": "经纬度"
} }
}, {
"path": "pages/wifiisin/home",
"style": {
"navigationBarTitleText": "无网络状态"
}
}, { }, {
"path": "pages/adddevice/mpnaddlink", "path": "pages/adddevice/mpnaddlink",
"style": {} "style": {}
......
...@@ -182,23 +182,36 @@ ...@@ -182,23 +182,36 @@
devicemonad: this.danweiid, devicemonad: this.danweiid,
uid: this.addUserDeviceid, uid: this.addUserDeviceid,
} }
if (this.isdatadevice(data)) { uni.showLoading({
let opts = { title: '加载中'
url: 'devices/adddevice', });
method: 'post' // if (this.isdatadevice(data)) {
}; let opts = {
http.httpRequest(opts, data).then(res => { url: 'devices/adddevice',
console.log(res); method: 'post'
if (res.data.code === 200) { };
uni.removeStorageSync('longitislongir'); http.httpRequest(opts, data).then(res => {
uni.navigateTo({ if (res.data.code === 200) {
url: '/pages/main/main', uni.hideLoading();
uni.removeStorageSync('longitislongir');
uni.navigateTo({
url: '/pages/main/main',
});
} else {
uni.hideLoading();
if (uni.getSystemInfoSync().platform == "Android" || uni.getSystemInfoSync().platform == "iOS") {
plus.nativeUI.toast(this.errorsshow(res.data.errors));
} else {
uni.showToast({
title: this.errorsshow(res.data.errors),
duration: 2000
}); });
} }
}, error => { }
console.log(error); }, error => {
}) console.log(error);
} })
// }
}, },
// 更新地址并关闭地图 // 更新地址并关闭地图
updateAddress(addressObj) { updateAddress(addressObj) {
...@@ -301,19 +314,45 @@ ...@@ -301,19 +314,45 @@
return true; return true;
} }
}, },
errorsshow(value) {
if ('devicecoord' in value) {
return value["devicecoord"][0];
} else if ('deviceinfo' in value) {
return value["deviceinfo"][0];
} else if ('devicelinkman' in value) {
return value["devicelinkman"][0];
} else if ('devicemonad' in value) {
return value["devicemonad"][0];
} else if ('devicenum' in value) {
return value["devicenum"][0];
} else if ('devicephone' in value) {
return value["devicephone"][0];
} else if ('deviceremark' in value) {
return value["deviceremark"][0];
} else if ('dtype' in value) {
return value["dtype"][0];
} else if ('status' in value) {
return value["status"][0];
} else if ('username' in value) {
return value["username"][0];
}
},
//显示提示信息 //显示提示信息
onshowToast(data) { onshowToast(data) {
uni.showToast({ uni.showToast({
title: data, title: data,
duration: 2000 duration: 2000
}); });
} },
//将手机竖屏回来
starye(){
plus.screen.lockOrientation('portrait-primary');
},
}, },
created() { created() {
this.issetinfo(); this.issetinfo();
this.devicetypes(); this.devicetypes();
this.addUserDevices(); this.addUserDevices();
plus.screen.lockOrientation('portrait-primary');
}, },
} }
</script> </script>
......
...@@ -17,9 +17,18 @@ ...@@ -17,9 +17,18 @@
}, },
methods: {}, methods: {},
mounted() { mounted() {
plus.screen.lockOrientation('landscape-secondary'); plus.screen.lockOrientation('landscape-primary')
plus.screen.lockOrientation('landscape-primary'); },
} //监听安卓返回键
onBackPress() {
const that = this;
var pages = getCurrentPages(); //当前页面栈
if (pages.length > 1) {
var beforePage = pages[pages.length - 2]; //获取上一个页面实例对象
console.log(beforePage);
// beforePage.$vm.(); //触发父页面中的方法change()
}
},
} }
</script> </script>
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
timestatus: false, timestatus: false,
isvcodes: '', //验证码 isvcodes: '', //验证码
infutdisabled: false, //禁用验证码 infutdisabled: false, //禁用验证码
reset: false, // 重置操作 reset: false, // 重置操作
infutvalue: '', infutvalue: '',
} }
}, },
...@@ -189,7 +189,7 @@ ...@@ -189,7 +189,7 @@
// this.topassword = false; // this.topassword = false;
this.ispassword = false; this.ispassword = false;
this.iscode = true; this.iscode = true;
this.infutdisabled = true; this.infutdisabled = true;
this.reset = true; this.reset = true;
this.oktoletue = '邮箱认证成功'; this.oktoletue = '邮箱认证成功';
} else { } else {
...@@ -304,27 +304,42 @@ ...@@ -304,27 +304,42 @@
} }
}, },
//重置操作 //重置操作
isreset() { isreset() {
this.isok = false; this.isok = false;
this.oktoletue = ''; this.oktoletue = '';
this.ispassword = false; this.ispassword = false;
this.topassword = true; this.topassword = true;
this.oktoletuetype = 1; // 1 邮箱验证 2 更改密码提交 // 3代表不可用状态 //4 验证验证码操作 this.oktoletuetype = 1; // 1 邮箱验证 2 更改密码提交 // 3代表不可用状态 //4 验证验证码操作
this.emails = ''; this.emails = '';
this.lkemails = ''; //原始邮箱 this.lkemails = ''; //原始邮箱
this.password = ''; //确认密码 this.password = ''; //确认密码
this.password1 = ''; //输入密码 this.password1 = ''; //输入密码
this.infutdisabled = false; //是否禁用input this.infutdisabled = false; //是否禁用input
this.infutvalue = ''; //使用input为空 this.infutvalue = ''; //使用input为空
this.iscode = false; this.iscode = false;
this.reset = false; this.reset = false;
},
//监测网络状态
ifwifi() {
let that = this;
uni.getNetworkType({
success: function(res) {
if (res.networkType === "none") {
uni.navigateTo({
url: '../wifiisin/home'
});
}else{
// 监测登入
that.showislogin();
}
}
});
} }
}, },
mounted() {}, mounted() {},
onLoad() { onLoad() {
let that = this; let that = this;
// 监测登入 that.ifwifi();
that.showislogin();
} }
} }
</script> </script>
......
<template> <template>
<view> <view>
<basics v-if="PageCur=='basics'"></basics> <basics v-if="PageCur=='basics'"></basics>
<components v-if="PageCur=='component'"></components> <components v-if="PageCur=='component'"></components>
<adddevice v-if="PageCur=='adddevice'"></adddevice> <adddevice v-if="PageCur=='adddevice'"></adddevice>
<userme v-if="PageCur=='userme'"></userme> <userme v-if="PageCur=='userme'"></userme>
<search v-if="PageCur=='search'"></search> <search v-if="PageCur=='search'"></search>
<view class="cu-bar tabbar bg-black shadow foot"> <view class="cu-bar tabbar bg-black shadow foot">
<view :class="PageCur=='basics'?'action text-green':'action text-gray'" @click="NavChange" data-cur="basics"> <view :class="PageCur=='basics'?'action text-green':'action text-gray'" @click="NavChange" data-cur="basics">
<view class="cuIcon-homefill"></view> 首页 <view class="cuIcon-homefill"></view> 首页
</view> </view>
<view :class="PageCur=='component'?'action text-green':'action text-gray'" @click="NavChange" data-cur="component"> <view :class="PageCur=='component'?'action text-green':'action text-gray'" @click="NavChange" data-cur="component">
<view class="cuIcon-similar"></view> 设备状态 <view class="cuIcon-similar"></view> 设备状态
</view> </view>
...@@ -39,7 +39,22 @@ ...@@ -39,7 +39,22 @@
}, },
methods: { methods: {
NavChange: function(e) { NavChange: function(e) {
this.PageCur = e.currentTarget.dataset.cur this.iswifi(e);
},
//监测网络状态
iswifi(e) {
let that = this;
uni.getNetworkType({
success: function(res) {
if (res.networkType === "none") {
uni.navigateTo({
url: '../wifiisin/home'
});
} else {
that.PageCur = e.currentTarget.dataset.cur;
}
}
});
} }
} }
} }
......
...@@ -38,13 +38,13 @@ ...@@ -38,13 +38,13 @@
<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" @click="ligoin" 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-notice text-red"></text>
<text class="text-grey">报警记录</text> <text class="text-grey">报警记录</text>
</navigator> </navigator>
</view> </view>
<view class="cu-item arrow"> <view class="cu-item arrow">
<navigator class="content" hover-class="none" @click="ligoin" :url="isurl? '': url"> <navigator class="content" hover-class="none" @click="ligoin" :url="isurl? '': url">
<text class="cuIcon-locationfill text-grey"></text> <text class="cuIcon-sort text-grey"></text>
<text class="text-grey">用户列表</text> <text class="text-grey">用户列表</text>
</navigator> </navigator>
</view> </view>
......
<template>
<view style="margin-left: 10%;vertical-align: middle;position: absolute;top: 10%;">
<image src="/static/togif/iswifinone.gif"></image>
<view style="margin-top: 450upx;">
<button @click="iswifi" class="cu-btn block bg-blue margin-tb-sm lg">刷新</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {}
},
methods: {
//监测网络状态
iswifi() {
let that = this;
uni.getNetworkType({
success: function(res) {
if (res.networkType != "none") {
uni.navigateBack({
delta: 1,
});
}
}
});
}
}
}
</script>
<style>
page {
background-color: #FFFFFF;
}
.imgtogif {}
</style>
This diff is collapsed.
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