diff --git a/App.vue b/App.vue
index 415eb00..ff6cd74 100644
--- a/App.vue
+++ b/App.vue
@@ -10,14 +10,14 @@
if(!configList || configList.length == 0){
let configList = [{
id:this.$u.guid(32),
- protocol:'https://',
- address:'cloud.iot-fast.com',
+ protocol:'http://',
+ address:'192.168.1.17:8848',
}]
// #ifdef APP-PLUS
configList.push({
id:this.$u.guid(32),
protocol:'http://',
- address:'192.168.21.22',
+ address:'192.168.1.17:8848',
})
// #endif
uni.setStorageSync('configList',configList)
diff --git a/manifest.json b/manifest.json
index 8fa087c..6613ec4 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,9 +1,9 @@
{
- "name" : "物联网可视化",
- "appid" : "__UNI__604B8F1",
+ "name" : "德润物联网",
+ "appid" : "__UNI__B7FE99B",
"description" : "",
- "versionName" : "1.0.34",
- "versionCode" : 1034,
+ "versionName" : "1.0.0",
+ "versionCode" : 100,
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
@@ -135,7 +135,7 @@
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
- "appid" : "wx27c271b0cb420015",
+ "appid" : "wxc1dd0068f0f85026",
"setting" : {
"urlCheck" : false,
"postcss" : true,
diff --git a/network/api/index.js b/network/api/index.js
index a11a67c..4266822 100644
--- a/network/api/index.js
+++ b/network/api/index.js
@@ -14,7 +14,7 @@ export default {
getAppConfig(data){
return new Promise((resolve, reject) => {
request.customRequest({
- url: '/admin/admin/site/config',
+ url: '/system/config/front',
method: 'GET',
},data)
.then((res) =>{
@@ -58,7 +58,7 @@ export default {
passwordLogin(data){
return new Promise((resolve, reject) => {
request.customRequest({
- url: '/user/admin/site/accountLogin',
+ url: '/authorize/login',
method: 'POST',
},data)
.then((res) =>{
@@ -68,6 +68,20 @@ export default {
})
})
},
+ // 获取用户信息
+ userLogout(data){
+ return new Promise((resolve, reject) => {
+ request.TokenRequest({
+ url: '/user-token/reset',
+ method: 'GET',
+ },data)
+ .then((res) =>{
+ resolve(res);
+ }).catch(err =>{
+ reject(err);
+ })
+ })
+ },
// 发送短信验证码
sendSms(data){
@@ -103,7 +117,7 @@ export default {
getUserInfo(data){
return new Promise((resolve, reject) => {
request.TokenRequest({
- url: '/user/admin/member/info',
+ url: '/user/detail',
method: 'GET',
},data)
.then((res) =>{
@@ -134,7 +148,22 @@ export default {
updatePwd(data){
return new Promise((resolve, reject) => {
request.TokenRequest({
- url: '/user/admin/member/updatePwd',
+ url: '/user/passwd',
+ method: 'PUT',
+ },data)
+ .then((res) =>{
+ resolve(res);
+ }).catch(err =>{
+ reject(err);
+ })
+ })
+ },
+
+ // 看板统计查询
+ getDashboardSelect(data){
+ return new Promise((resolve, reject) => {
+ request.TokenRequest({
+ url: '/dashboard/_multi',
method: 'POST',
},data)
.then((res) =>{
diff --git a/network/api/iots/index.js b/network/api/iots/index.js
index e93e05a..20e09b1 100644
--- a/network/api/iots/index.js
+++ b/network/api/iots/index.js
@@ -1,6 +1,21 @@
import request from "../../request.js"
export default {
+ // 获取设备数
+ getDeviceInstanceCount(data){
+ return new Promise((resolve, reject) => {
+ request.TokenRequest({
+ url: '/device/instance/_count',
+ method: 'GET',
+ },data)
+ .then((res) =>{
+ resolve(res);
+ }).catch(err =>{
+ reject(err);
+ })
+ })
+ },
+
// 获取设备统计数量
getDeviceCount(data){
return new Promise((resolve, reject) => {
@@ -20,8 +35,8 @@ export default {
getProductList(data){
return new Promise((resolve, reject) => {
request.TokenRequest({
- url: '/iot/admin/product/list',
- method: 'GET',
+ url: '/device-product/_query/no-paging',
+ method: 'POST',
},data)
.then((res) =>{
resolve(res);
@@ -35,7 +50,7 @@ export default {
getDeviceList(data){
return new Promise((resolve, reject) => {
request.TokenRequest({
- url: '/iot/admin/device/list',
+ url: '/device-instance/_query',
method: 'POST',
},data)
.then((res) =>{
@@ -136,12 +151,25 @@ export default {
})
})
},
-
- // 告警级别列表
+ // 获取告警记录列表
+ getAlarmList(data){
+ return new Promise((resolve, reject) => {
+ request.TokenRequest({
+ url: '/alarm/record/_query',
+ method: 'POST',
+ },data)
+ .then((res) =>{
+ resolve(res);
+ }).catch(err =>{
+ reject(err);
+ })
+ })
+ },
+ // 获取默认告警级别
getAlarmLevelList(data){
return new Promise((resolve, reject) => {
request.TokenRequest({
- url: '/iot/admin/alarm/level/list',
+ url: '/alarm/config/default/level',
method: 'GET',
},data)
.then((res) =>{
@@ -151,6 +179,20 @@ export default {
})
})
},
+ // // 告警级别列表
+ // getAlarmLevelList(data){
+ // return new Promise((resolve, reject) => {
+ // request.TokenRequest({
+ // url: '/iot/admin/alarm/level/list',
+ // method: 'GET',
+ // },data)
+ // .then((res) =>{
+ // resolve(res);
+ // }).catch(err =>{
+ // reject(err);
+ // })
+ // })
+ // },
// 概览页统计(图表)
getAlarmRecordStat(data){
diff --git a/network/config.js b/network/config.js
index 95b9535..be6a0ec 100644
--- a/network/config.js
+++ b/network/config.js
@@ -14,8 +14,8 @@ if(process.env.NODE_ENV === 'development'){
// wsUrl = "ws://iotos-ui-dev.iotos.192.168.10.243.nip.io:32764"
// configurationUrl = "http://192.168.18.139:8855"
// configurationhtmlUrl = "http://hceditor-2d-dev.hceditor.192.168.10.243.nip.io:30405"
- url = 'https://miot.gkiiot.com'
- wsUrl = 'wss://miot.gkiiot.com'
+ url = 'http://192.168.1.17:8848'
+ wsUrl = 'ws://192.168.1.17:8848'
configurationUrl = 'https://2d.gkiiot.com/prod-api'
configurationhtmlUrl = 'https://2d.gkiiot.com'
}else{
diff --git a/network/request.js b/network/request.js
index 499d0d4..6ce21f6 100644
--- a/network/request.js
+++ b/network/request.js
@@ -94,7 +94,7 @@ const TokenRequest = (opts, data) => {
data: data,
method: opts.method,
header: {
- 'Authorization': tokenKey,
+ 'x-access-token': tokenKey,
},
}
let promise = new Promise(function(resolve, reject) {
@@ -102,7 +102,7 @@ const TokenRequest = (opts, data) => {
(res) => {
// console.log("请求返回",res)
// 令牌过期关闭所有页面跳转登录页
- if(res[1].data.code==61){
+ if(res[1].data.status==401){
uni.showToast({
title: '登录已过期,请重新登录',
icon: 'none',
@@ -114,7 +114,7 @@ const TokenRequest = (opts, data) => {
setTimeout(()=>{
uni.reLaunch({url:'/pages/tabbar/login'});
},1500)
- }else if(res[1].data.code>0){
+ }else if(res[1].data.status!=200){
uni.showToast({
title: res[1].data.message,
icon: 'none',
diff --git a/pages.json b/pages.json
index cf199e8..fd1705a 100644
--- a/pages.json
+++ b/pages.json
@@ -29,6 +29,20 @@
// "navigationStyle":"custom"
// }
// },
+ {
+ "path": "pages/tabbar/dashboard",
+ "style": {
+ "navigationBarTitleText": "统计看板",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/tabbar/device",
+ "style": {
+ "navigationBarTitleText": "设备",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
{
"path": "pages/tabbar/new",
"style": {
@@ -343,15 +357,15 @@
},
// #endif
"list": [{
- "pagePath": "pages/tabbar/home",
- "iconPath": "static/image/tabbar/home.png",
- "selectedIconPath": "static/image/tabbar/home-active.png",
- "text": "首页"
+ "pagePath": "pages/tabbar/dashboard",
+ "iconPath": "static/image/tabbar/dashboard.png",
+ "selectedIconPath": "static/image/tabbar/dashboard-active.png",
+ "text": "统计"
},{
- "pagePath": "pages/tabbar/workbench",
- "iconPath": "static/image/tabbar/workbench.png",
- "selectedIconPath": "static/image/tabbar/workbench-active.png",
- "text": "工作台"
+ "pagePath": "pages/tabbar/device",
+ "iconPath": "static/image/tabbar/iot.png",
+ "selectedIconPath": "static/image/tabbar/iot-active.png",
+ "text": "设备"
},
// #ifdef MP-WEIXIN
{
diff --git a/pages/my/reset-password.vue b/pages/my/reset-password.vue
index a4feb49..3f66a84 100644
--- a/pages/my/reset-password.vue
+++ b/pages/my/reset-password.vue
@@ -56,13 +56,13 @@
submit(){
if(this.verification()){
let params={
- id:this.infoData.id,
+ // id:this.infoData.id,
newPassword:this.newPassword,
oldPassword:this.oldPassword,
}
this.$api.updatePwd(params).then(res => {
console.log("submit",res);
- if(res.code==0){
+ if(res.status == 200){
this.$u.toast(res.message);
this.$store.commit('setTokenKey', '');
uni.$u.toast('退出登录成功');
diff --git a/pages/tabbar/config.vue b/pages/tabbar/config.vue
index 34016f9..e20b859 100644
--- a/pages/tabbar/config.vue
+++ b/pages/tabbar/config.vue
@@ -1,46 +1,91 @@
-
-
-
-
-
- 已选择
-
-
- {{item.protocol+item.address}}
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.protocol.includes('https') ? 'HTTPS' : 'HTTP' }}
+
+
+
+
+ {{ item.address }}
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+ + 添加域名
-
+
+
+
+
- 网络协议:
+ 网络协议
- {{form.protocol?form.protocol:'请选择'}}
-
+ {{ form.protocol ? form.protocol : '请选择' }}
+
+
+
+
+
- 域名或ip:
+ 域名
-
+
+
+
+
+
@@ -49,122 +94,122 @@
export default {
data() {
return {
- configIndex:0,
- configList:[],
- form:{
- id:'',
- protocol:'',
- address:'',
+ configIndex: 0,
+ configList: [],
+ form: {
+ id: '',
+ protocol: '',
+ address: '',
},
- protocolShow:false,
- protocolList:[
- {
- value: 'http://',
- label: 'http://'
- },
+ protocolShow: false,
+ protocolList: [
{
value: 'https://',
- label: 'https://'
+ label: 'HTTPS'
+ },
+ {
+ value: 'http://',
+ label: 'HTTP'
}
],
- show:false,
+ show: false,
};
},
onLoad() {
// 小程序只使用https
// #ifdef MP-WEIXIN
- this.protocolList = [
- {
- value: 'https://',
- label: 'https://'
- }
- ]
+ // this.protocolList = [
+ // {
+ // value: 'https://',
+ // label: 'HTTPS'
+ // }
+ // ]
// #endif
this.getConfigList();
},
- methods:{
- getConfigList(){
+ methods: {
+ getConfigList() {
uni.getStorage({
- key:'configList',
+ key: 'configList',
}).then(res => {
// 如果返回数组为两位就是正确
- if(res.length==2){
+ if (res.length == 2) {
this.configList = res[1].data;
}
return uni.getStorage({
- key:'configIndex',
+ key: 'configIndex',
})
}).then(res => {
- console.log("configIndex",res)
- if(res.length==2){
+ console.log("configIndex", res)
+ if (res.length == 2) {
this.configIndex = res[1].data;
}
})
},
- changeConfig(i){
- console.log("index",i)
- if(i !== this.configIndex){
+ changeConfig(i) {
+ console.log("index", i)
+ if (i !== this.configIndex) {
this.configIndex = i;
uni.setStorage({
- key:'configIndex',
+ key: 'configIndex',
data: i,
}).then(res => {
console.log("修改索引")
})
}
},
- verification(){
- if(!this.form.protocol){
+ verification() {
+ if (!this.form.protocol) {
this.$refs.uToast.show({
title: '请先选择协议!',
type: 'error'
})
return false;
- }else if(!this.form.address){
+ } else if (!this.form.address) {
this.$refs.uToast.show({
title: '请先输入地址',
type: 'error',
})
return false;
- }else if(!this.$u.test.url(this.form.protocol+this.form.address)){
+ } else if (!this.$u.test.url(this.form.protocol + this.form.address)) {
this.$refs.uToast.show({
title: '请确认输入地址正确',
type: 'error',
})
return false;
- }else{
+ } else {
return true;
}
},
- openAdd(){
- if(this.configList.length == 0){
+ openAdd() {
+ if (this.configList.length == 0) {
this.form = {
- id:'',
- protocol:'https://',
- address:'cloud.iot-fast.com',
+ id: '',
+ protocol: 'http://',
+ address: '192.168.1.17:8848',
}
- }else{
+ } else {
this.form = {
- id:'',
- protocol:'',
- address:'',
+ id: '',
+ protocol: '',
+ address: '',
}
}
-
+
this.show = true;
},
- addConfig(){
- console.log("添加页面",this.form)
- if(this.verification()){
- if(this.form.id===''){
+ addConfig() {
+ console.log("添加页面", this.form)
+ if (this.verification()) {
+ if (this.form.id === '') {
// 新增
this.configList.push({
- id:this.$u.guid(32),
- protocol:this.form.protocol,
- address:this.form.address,
+ id: this.$u.guid(32),
+ protocol: this.form.protocol,
+ address: this.form.address,
})
uni.setStorage({
- key:'configList',
+ key: 'configList',
data: this.configList,
}).then(res => {
this.$refs.uToast.show({
@@ -172,9 +217,9 @@
type: 'success',
})
})
- if(this.configList.length==1){
+ if (this.configList.length == 1) {
uni.setStorage({
- key:'configIndex',
+ key: 'configIndex',
data: 0,
}).then(res => {
console.log("添加第一个域名索引为0")
@@ -182,18 +227,18 @@
}
this.show = false;
this.getConfigList()
- console.log("configList",this.configList)
- }else{
+ console.log("configList", this.configList)
+ } else {
// 编辑
- this.configList.map(item=>{
- if(item.id == this.form.id){
- item.protocol=this.form.protocol;
- item.address=this.form.address;
+ this.configList.map(item => {
+ if (item.id == this.form.id) {
+ item.protocol = this.form.protocol;
+ item.address = this.form.address;
}
return item;
})
uni.setStorage({
- key:'configList',
+ key: 'configList',
data: this.configList,
}).then(res => {
this.$refs.uToast.show({
@@ -204,28 +249,29 @@
this.show = false;
this.getConfigList()
}
- }else{
+ } else {
this.$refs.uModal.clearLoading();
}
},
- confirmProtocol(e){
+ confirmProtocol(e) {
this.form.protocol = e[0].value;
},
- openEdit(index){
- this.form = this.configList[index];
+ openEdit(index) {
+ console.log("编辑",index)
+ this.form = JSON.parse(JSON.stringify(this.configList[index]));
this.show = true;
},
- delConfig(index){
+ delConfig(index) {
uni.showModal({
title: '提示',
content: '确认要删除域名吗?',
- success: (res)=>{
+ success: (res) => {
if (res.confirm) {
console.log('用户点击确定');
-
+
this.configList.splice(index, 1);
uni.setStorage({
- key:'configList',
+ key: 'configList',
data: this.configList,
}).then(res => {
this.$refs.uToast.show({
@@ -233,19 +279,19 @@
type: 'success',
})
})
- if(this.configIndexindex){
+ if (this.configIndex < index) {
+ } else {
+ if (this.configIndex > index) {
this.configIndex = this.configIndex - 1;
- }else if(this.configIndex==index){
- if(this.configList.length==0){
+ } else if (this.configIndex == index) {
+ if (this.configList.length == 0) {
this.configIndex = -1;
- }else{
+ } else {
this.configIndex = 0;
}
}
uni.setStorage({
- key:'configIndex',
+ key: 'configIndex',
data: this.configIndex,
}).then(res => {
console.log("修改索引")
@@ -261,129 +307,130 @@
}
}
-
+
+ .add-button-wrapper {
+ padding: 30rpx 20rpx;
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ background-color: #fff;
+ box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
+ }
+
+ .slot-content {
+ padding: 20rpx 30rpx;
+ }
+
+ .form-item {
+ margin-bottom: 30rpx;
+
+ .form-label {
+ font-size: 28rpx;
+ color: #666;
+ margin-bottom: 20rpx;
+ }
+
+ .form-value {
+ background-color: #f5f5f5;
+ border-radius: 8rpx;
+ height: 80rpx;
+ display: flex;
+ align-items: center;
+ padding: 0 20rpx;
+ position: relative;
+
+ input {
+ width: 100%;
+ height: 100%;
+ }
+
+ .arrow-icon {
+ position: absolute;
+ right: 20rpx;
+ }
+ }
+ }
+
\ No newline at end of file
diff --git a/pages/tabbar/dashboard.vue b/pages/tabbar/dashboard.vue
new file mode 100644
index 0000000..bb68d60
--- /dev/null
+++ b/pages/tabbar/dashboard.vue
@@ -0,0 +1,458 @@
+
+
+
+
+
+
+
+
+
+ {{deviceInfo.deviceNum || 0}}
+ 设备数量
+
+
+ {{deviceInfo.deviceOnlineNum || 0}}
+ 在线数
+
+
+ {{deviceInfo.deviceOfflineNum || 0}}
+ 离线数
+
+
+
+
+
+
+ {{deviceInfo.todayMessageNum || 0}}
+ 今日设备消息量
+
+
+ {{deviceInfo.thisMonthMessageNum || 0}}
+ 当月设备消息量
+
+
+
+
+
+
+
+
+
+
+
+ {{alarmInfo.todayMessageNum || 0}}
+ 今日告警数
+
+
+ {{alarmInfo.thisMonthMessageNum || 0}}
+ 当月告警数
+
+
+
+
+
+ 最新告警列表
+
+
+
+
+
+ {{ item.alarmName }}
+ {{ item.state.text }}
+
+
+ {{ getAlarmName(item.level) }}
+ {{$u.timeFormat(item.time, 'yyyy-mm-dd hh:MM:ss')}}
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/tabbar/device.vue b/pages/tabbar/device.vue
new file mode 100644
index 0000000..7c4bb7b
--- /dev/null
+++ b/pages/tabbar/device.vue
@@ -0,0 +1,405 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 设备总数: {{total}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.state.text }}
+
+
+
+ {{ item.deviceType.text }}
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/tabbar/login.vue b/pages/tabbar/login.vue
index 2f6566d..12ac0c4 100644
--- a/pages/tabbar/login.vue
+++ b/pages/tabbar/login.vue
@@ -1,12 +1,15 @@
-
-
-
-
- {{appName}}
-
-
+
+
+ 配置
+
+
+
+ {{appName}}
+
+
+
@@ -37,12 +40,17 @@
-
-
+
+
+
+ {{recordNumber?'备案号:' + recordNumber :''}}
+
+
@@ -69,8 +77,8 @@
],
tabCurrent:0,
ipAddress: null,
- username:'',
- password:'',
+ username:'admin',
+ password:'admin',
passwordIsShow: true,
passImgCode:'',
codeShow:false,
@@ -79,9 +87,10 @@
imgCodeTxt:'',
phone:null,
code:'',
- appName: '物联网可视化',
- isImgCode:true,
- logoPath:'https://hcwl-cdn.cdn.bcebos.com/hcapp/hc-work/img/logo.png',
+ appName: '物联网平台',
+ recordNumber: '',
+ isImgCode:false,
+ logoPath:'http://static.drgyen.com/app/iot-ui-app/image/icon-192x192.png',
}
},
components:{
@@ -91,10 +100,10 @@
onLoad() {
let configList = uni.getStorageSync('configList');
let configIndex = uni.getStorageSync('configIndex');
- this.logoPath = configList[configIndex].protocol + configList[configIndex].address + '/admin/static/image/logo.png';
+ // this.logoPath = configList[configIndex].protocol + configList[configIndex].address + '/admin/static/image/logo.png';
},
onShow() {
- this.getLoginConfig();
+ // this.getLoginConfig();
// 获取应用名称
this.getAppConfig();
if(this.isImgCode){
@@ -140,8 +149,8 @@
// 验证token是否有效
verifyToken(){
this.$api.getUserInfo({}).then(res => {
- if(res.code == 0){
- uni.switchTab({url:'/pages/tabbar/workbench'})
+ if(res.status == 200){
+ uni.switchTab({url:'/pages/tabbar/device'})
}
}, error => {
})
@@ -244,12 +253,15 @@
},
getAppConfig(){
this.$api.getAppConfig({}).then(res => {
- if(res.code == 0){
- if(res.data.basicName && res.data.basicName!==this.appName){
- this.appName = res.data.basicName;
+ if(res.status == 200){
+ if(res.result.title && res.result.title!==this.appName){
+ this.appName = res.result.title;
+ if(res.result && res.result.logo){
+ this.logoPath = res.result.logo;
+ }
uni.setStorage({
key:'appName',
- data: res.data.basicName,
+ data: res.result.title,
})
}
@@ -276,23 +288,27 @@
if(this.verification()){
let params = {
username: this.username,
- password: encrypt(this.password),
+ password: this.password,
+ remember: false,
+ expires: 3600000,
+ verifyCode: this.imgCodeTxt,
+ verifyKey: this.imgCodeKey,
// grant_type: 'password'
- autoLogin:true,
- code:this.imgCodeTxt,
- cid:this.imgCodeKey
+ // autoLogin:true,
+ // code:this.imgCodeTxt,
+ // cid:this.imgCodeKey
}
this.$api.passwordLogin(params).then(res => {
- if (res.code == 0) {
+ if (res.status == 200) {
// 保存数据到vuex
- this.$store.commit('setTokenKey', res.data.token);
+ this.$store.commit('setTokenKey', res.result.token);
// this.$store.commit('setHtpUrl', this.$htoProtocol + this.ipAddress);
// token过期时间
- let expire = res.data.expires*1000 + new Date().getTime();
+ let expire = res.result.expires + new Date().getTime();
// 缓存信息
uni.setStorage({
key:'token',
- data: res.data.token,
+ data: res.result.token,
}).then(res => {
return uni.setStorage({
key:'expire',
@@ -312,7 +328,7 @@
this.$refs.uToast.show({
title: '登录成功',
type: 'success',
- url: '/pages/tabbar/workbench',
+ url: '/pages/tabbar/device',
isTab:true,
duration:1000
})
@@ -361,7 +377,7 @@
this.$refs.uToast.show({
title: '登录成功',
type: 'success',
- url: '/pages/tabbar/workbench',
+ url: '/pages/tabbar/device',
isTab:true,
duration:1000
})
@@ -431,66 +447,116 @@
diff --git a/pages/tabbar/my.vue b/pages/tabbar/my.vue
index ffc1022..680db4f 100644
--- a/pages/tabbar/my.vue
+++ b/pages/tabbar/my.vue
@@ -46,7 +46,7 @@
-
+
@@ -172,12 +172,13 @@
},
onShow() {
let userInfo = uni.getStorageSync('userInfo');
+ console.log("userInfo",userInfo)
if(userInfo){
this.userInfo = {
- name:userInfo.username,
- company:userInfo.realName,
+ name:userInfo.name,
+ company:userInfo.realName || '物联网平台',
imgPath:userInfo.avatar,
- phone:phoneHide(userInfo.mobile)
+ // phone:phoneHide(userInfo.telephone)
}
}
},
@@ -238,16 +239,32 @@
if (res.confirm) {
console.log('用户点击确定');
// this.$store.commit('logout');
- this.$store.commit('setTokenKey', '');
- uni.$u.toast('退出登录成功');
- uni.removeStorageSync('token')
- uni.removeStorageSync('expire')
- setTimeout(()=>{
- uni.reLaunch({
- url:"../tabbar/login"
- })
- return;
- },200)
+ this.$api.userLogout({}).then(res => {
+ if(res.status == 200){
+ this.$store.commit('setTokenKey', '');
+ uni.$u.toast('退出登录成功');
+ uni.removeStorageSync('token')
+ uni.removeStorageSync('expire')
+ setTimeout(()=>{
+ uni.reLaunch({
+ url:"../tabbar/login"
+ })
+ return;
+ },200)
+ }
+ }, error => {
+ this.$store.commit('setTokenKey', '');
+ uni.$u.toast('退出登录成功');
+ uni.removeStorageSync('token')
+ uni.removeStorageSync('expire')
+ setTimeout(()=>{
+ uni.reLaunch({
+ url:"../tabbar/login"
+ })
+ return;
+ },200)
+ })
+
} else if (res.cancel) {
console.log('用户点击取消');
}
diff --git a/static/app-plus/image/device/device-card.png b/static/app-plus/image/device/device-card.png
new file mode 100644
index 0000000..2eedfa2
Binary files /dev/null and b/static/app-plus/image/device/device-card.png differ
diff --git a/static/image/tabbar/app-scan.png b/static/image/tabbar/app-scan.png
index 976cb44..43b2e78 100644
Binary files a/static/image/tabbar/app-scan.png and b/static/image/tabbar/app-scan.png differ
diff --git a/static/image/tabbar/dashboard-active.png b/static/image/tabbar/dashboard-active.png
new file mode 100644
index 0000000..87e6fb2
Binary files /dev/null and b/static/image/tabbar/dashboard-active.png differ
diff --git a/static/image/tabbar/dashboard.png b/static/image/tabbar/dashboard.png
new file mode 100644
index 0000000..4ad56c8
Binary files /dev/null and b/static/image/tabbar/dashboard.png differ
diff --git a/static/image/tabbar/iot-active.png b/static/image/tabbar/iot-active.png
new file mode 100644
index 0000000..248821a
Binary files /dev/null and b/static/image/tabbar/iot-active.png differ
diff --git a/static/image/tabbar/iot.png b/static/image/tabbar/iot.png
new file mode 100644
index 0000000..b767f3f
Binary files /dev/null and b/static/image/tabbar/iot.png differ
diff --git a/static/image/tabbar/my-active.png b/static/image/tabbar/my-active.png
index 51f3b3b..bd77d86 100644
Binary files a/static/image/tabbar/my-active.png and b/static/image/tabbar/my-active.png differ
diff --git a/static/image/tabbar/my.png b/static/image/tabbar/my.png
index 30c1f94..f06c96d 100644
Binary files a/static/image/tabbar/my.png and b/static/image/tabbar/my.png differ
diff --git a/static/image/tabbar/new-active.png b/static/image/tabbar/new-active.png
index e6a8366..791013e 100644
Binary files a/static/image/tabbar/new-active.png and b/static/image/tabbar/new-active.png differ
diff --git a/static/image/tabbar/new.png b/static/image/tabbar/new.png
index e722b1f..c9735d0 100644
Binary files a/static/image/tabbar/new.png and b/static/image/tabbar/new.png differ
diff --git a/static/image/tabbar/scan-active.png b/static/image/tabbar/scan-active.png
index e76517e..c726c46 100644
Binary files a/static/image/tabbar/scan-active.png and b/static/image/tabbar/scan-active.png differ
diff --git a/static/image/tabbar/scan.png b/static/image/tabbar/scan.png
index 48d7f8e..f9e05df 100644
Binary files a/static/image/tabbar/scan.png and b/static/image/tabbar/scan.png differ