mirror of
https://gitee.com/java110/PropertyApp.git
synced 2026-02-24 05:46:09 +08:00
优化代码
This commit is contained in:
parent
a6999b0c6e
commit
bca3339e5c
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="header flex justify-around">
|
<view class="header flex justify-around align-center">
|
||||||
<view class="header-item " v-for="(item,index) in headerMenus" :key="index" @click="_toPage(item)">
|
<view class="header-item " v-for="(item,index) in headerMenus" :key="index" @click="_toPage(item)">
|
||||||
<view style="position: relative;">
|
<view style="position: relative;">
|
||||||
<image :src="item.icon"></image>
|
<image :src="item.icon"></image>
|
||||||
@ -69,12 +69,17 @@
|
|||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.header {
|
.header {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
/** #ifndef H5 **/
|
||||||
height: 220upx;
|
height: 220upx;
|
||||||
|
/** #endif **/
|
||||||
|
/** #ifdef H5 **/
|
||||||
|
height: 300upx;
|
||||||
|
/** #endif **/
|
||||||
background-color: #368CFE;
|
background-color: #368CFE;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
|
|
||||||
.header-item {
|
.header-item {
|
||||||
margin-top: 50upx;
|
//margin-top: 50upx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
|
|||||||
@ -150,9 +150,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
image {
|
image {
|
||||||
height: 44upx;
|
height: 68upx;
|
||||||
width: 44upx;
|
width: 68upx;
|
||||||
margin-bottom: 10upx;
|
margin-bottom: 8upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
|
|||||||
@ -40,6 +40,10 @@ export function login(userName, passwd) {
|
|||||||
success: function(res) {
|
success: function(res) {
|
||||||
let data = res.data;
|
let data = res.data;
|
||||||
if (data.code != 0) {
|
if (data.code != 0) {
|
||||||
|
uni.showToast({
|
||||||
|
icon:'none',
|
||||||
|
title:data.msg
|
||||||
|
})
|
||||||
reject(data.msg);
|
reject(data.msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -47,12 +47,13 @@
|
|||||||
listStaffPrivileges
|
listStaffPrivileges
|
||||||
} from '../../api/index/index.js'
|
} from '../../api/index/index.js'
|
||||||
import mapping from '../../constant/mapping.js'
|
import mapping from '../../constant/mapping.js'
|
||||||
|
import { rejects } from 'assert';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
logoUrl: '',
|
logoUrl: '',
|
||||||
username: '18909711443',
|
username: '',
|
||||||
password: '18909711443'
|
password: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@ -94,12 +95,8 @@
|
|||||||
login(this.username, this.password)
|
login(this.username, this.password)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
}, err => {
|
}, err => {
|
||||||
uni.showToast({
|
rejects(err);
|
||||||
icon: 'none',
|
|
||||||
title: err
|
|
||||||
});
|
|
||||||
}).then((_data) => {
|
}).then((_data) => {
|
||||||
listStaffPrivileges(_that);
|
listStaffPrivileges(_that);
|
||||||
return getCommunity(true);
|
return getCommunity(true);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user