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

no message

parent f2148618
......@@ -74,9 +74,9 @@
"androidStyle" : "default",
"iosStyle" : "common",
"android" : {
"xhdpi" : "unpackage/status/720 × 1242.png",
"hdpi" : "unpackage/status/480 × 762.png",
"xxhdpi" : "unpackage/status/1080 × 1882.png"
"xhdpi" : "unpackage/status/泽宏启动页/728.1242.png",
"hdpi" : "unpackage/status/泽宏启动页/480.762.png",
"xxhdpi" : "unpackage/status/泽宏启动页/1080.1882.png"
}
},
"icons" : {
......
......@@ -40,6 +40,11 @@
"style": {
"navigationBarTitleText": "经纬度"
}
}, {
"path": "pages/wifiisin/home",
"style": {
"navigationBarTitleText": "无网络状态"
}
}, {
"path": "pages/adddevice/mpnaddlink",
"style": {}
......
......@@ -182,23 +182,36 @@
devicemonad: this.danweiid,
uid: this.addUserDeviceid,
}
if (this.isdatadevice(data)) {
let opts = {
url: 'devices/adddevice',
method: 'post'
};
http.httpRequest(opts, data).then(res => {
console.log(res);
if (res.data.code === 200) {
uni.removeStorageSync('longitislongir');
uni.navigateTo({
url: '/pages/main/main',
uni.showLoading({
title: '加载中'
});
// if (this.isdatadevice(data)) {
let opts = {
url: 'devices/adddevice',
method: 'post'
};
http.httpRequest(opts, data).then(res => {
if (res.data.code === 200) {
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) {
......@@ -301,19 +314,45 @@
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) {
uni.showToast({
title: data,
duration: 2000
});
}
},
//将手机竖屏回来
starye(){
plus.screen.lockOrientation('portrait-primary');
},
},
created() {
this.issetinfo();
this.devicetypes();
this.addUserDevices();
plus.screen.lockOrientation('portrait-primary');
this.addUserDevices();
},
}
</script>
......
......@@ -17,9 +17,18 @@
},
methods: {},
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>
......
......@@ -76,7 +76,7 @@
timestatus: false,
isvcodes: '', //验证码
infutdisabled: false, //禁用验证码
reset: false, // 重置操作
reset: false, // 重置操作
infutvalue: '',
}
},
......@@ -189,7 +189,7 @@
// this.topassword = false;
this.ispassword = false;
this.iscode = true;
this.infutdisabled = true;
this.infutdisabled = true;
this.reset = true;
this.oktoletue = '邮箱认证成功';
} else {
......@@ -304,27 +304,42 @@
}
},
//重置操作
isreset() {
this.isok = false;
this.oktoletue = '';
this.ispassword = false;
this.topassword = true;
this.oktoletuetype = 1; // 1 邮箱验证 2 更改密码提交 // 3代表不可用状态 //4 验证验证码操作
this.emails = '';
this.lkemails = ''; //原始邮箱
this.password = ''; //确认密码
this.password1 = ''; //输入密码
this.infutdisabled = false; //是否禁用input
this.infutvalue = ''; //使用input为空
this.iscode = false;
this.reset = false;
isreset() {
this.isok = false;
this.oktoletue = '';
this.ispassword = false;
this.topassword = true;
this.oktoletuetype = 1; // 1 邮箱验证 2 更改密码提交 // 3代表不可用状态 //4 验证验证码操作
this.emails = '';
this.lkemails = ''; //原始邮箱
this.password = ''; //确认密码
this.password1 = ''; //输入密码
this.infutdisabled = false; //是否禁用input
this.infutvalue = ''; //使用input为空
this.iscode = 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() {},
onLoad() {
let that = this;
// 监测登入
that.showislogin();
that.ifwifi();
}
}
</script>
......
<template>
<view>
<basics v-if="PageCur=='basics'"></basics>
<components v-if="PageCur=='component'"></components>
<adddevice v-if="PageCur=='adddevice'"></adddevice>
<userme v-if="PageCur=='userme'"></userme>
<components v-if="PageCur=='component'"></components>
<adddevice v-if="PageCur=='adddevice'"></adddevice>
<userme v-if="PageCur=='userme'"></userme>
<search v-if="PageCur=='search'"></search>
<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>
</view>
<view :class="PageCur=='component'?'action text-green':'action text-gray'" @click="NavChange" data-cur="component">
<view class="cuIcon-similar"></view> 设备状态
</view>
......@@ -39,7 +39,22 @@
},
methods: {
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 @@
<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" @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>
</navigator>
</view>
<view class="cu-item arrow">
<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>
</navigator>
</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