123 lines
2.3 KiB
Vue
123 lines
2.3 KiB
Vue
<template>
|
|
<view>
|
|
<view class="index-container" style="background-color: white;padding-bottom: 10upx;">
|
|
<view class="banner">
|
|
<image src="../../static/imgs/banner-f.png"></image>
|
|
</view>
|
|
|
|
<view class="itemWrap" v-for="(item, index) in companyList" :key="index">
|
|
<view class="leftContent">
|
|
<image class="iconClass" src="../../static/icons/gongsi.png"></image>
|
|
</view>
|
|
<view class="companyName">
|
|
{{ item.name }}
|
|
</view>
|
|
<view class="rightContent">
|
|
<image class="iconClass" src="../../static/icons/arrowright.png"></image>
|
|
</view>
|
|
|
|
</view>
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
import { getEnterpriseNames } from '@/common/api.js';
|
|
import { callbackRequest, setStorage, getStorage, sureAlterTip, devEnv, alertTip } from '@/common/util.js';
|
|
export default {
|
|
|
|
data() {
|
|
return {
|
|
title: 'Hello',
|
|
companyList:[
|
|
{"name":"国家电网公司总部"},
|
|
{"name":"国网山西省电力公司"},
|
|
{"name":"国网福建省电力公司"},
|
|
{"name":"国网华中分部"},
|
|
{"name":"国网西安党校"},
|
|
{"name":"信产集团继远软件园"}
|
|
|
|
]
|
|
}
|
|
},
|
|
onLoad() {
|
|
this.getEnterpriseNames();
|
|
},
|
|
methods: {
|
|
getEnterpriseNames() {
|
|
let that = this;
|
|
let data = {
|
|
method: getEnterpriseNames,
|
|
data:{}
|
|
};
|
|
callbackRequest(data).then(res => {
|
|
console.log('res:', res);
|
|
if (res.data.returnCode == 1) {
|
|
that.companyList = res.data.returnData.enterpriseNames;
|
|
console.log('权限:', that.permissions);
|
|
} else {
|
|
console.log('获取权限失败');
|
|
}
|
|
});
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
|
|
|
|
.index-container {
|
|
overflow: hidden;
|
|
|
|
.banner {
|
|
margin: 30rpx;
|
|
box-shadow: 0 0 20rpx 10rpx #e4e3e3;
|
|
border-radius: 10rpx;
|
|
|
|
image {
|
|
width: 100%;
|
|
height: 300rpx;
|
|
border-radius: 10rpx;
|
|
vertical-align: top;
|
|
}
|
|
}
|
|
|
|
.itemWrap{
|
|
display: flex;
|
|
flex-direction: row;
|
|
text-align: left;
|
|
margin: 50upx 0;
|
|
width: 100%;
|
|
font-size: 32upx;
|
|
}
|
|
|
|
.iconClass{
|
|
width:25upx;
|
|
height:25upx;
|
|
}
|
|
|
|
.leftContent{
|
|
text-align: left;
|
|
margin-left: 50upx;
|
|
}
|
|
|
|
.rightContent{
|
|
flex:1;
|
|
text-align: right;
|
|
align-self: center;
|
|
margin-right: 50upx;
|
|
}
|
|
|
|
.companyName{
|
|
margin:0 0upx;
|
|
margin-left: 20upx;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
</style>
|