第一张图图,我勾的是有疑问的地方,为什么代码是一样的,第一张图像就多了一个灰色的框,我想呈现出第二张图的效果,求助各位大神,真的很紧急!!!
js文件下的
import Taro, { Component } from '@tarojs/taro'
import { View, Image, Text, Button, OpenData } from '@tarojs/components'
import { get } from '../../utils/storage'
import { toast } from '../../utils/utils'
import { feedBack } from '../../api/api'
import './index.css'
import { AtGrid, AtTextarea, AtTabs, AtTabsPane } from "taro-ui"
import countryinfo_picture1 from '../../images/countryinfo/countryinfo-picture1.png'
export default class Index extends Component {
config = {
navigationBarTitleText: ''
};
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内转发按钮
console.log(res.target);
}
return {
title: '村',
path: '/pages/index/index'
};
}
/*
constructor(props) {
super(props);
this.state = {
photo: '',
name:'',
vip:true,
opinion:'',
};
}
*/
itemClick2(item, index) {
switch(index){
case 0://
this.goBaiKe()
break;
}
console.log(item, index)
}
constructor () {
super(...arguments)
this.state = {
current: 0,
}
}
handleClick (value) {
this.setState({
current: value
})
}
render() {
return (
<View className='wrap-flex'>
<View className='user-box'>
<Text className='at-tabs__header-country-info'>村</Text>
</View>
<View className='at-tabs__content-country-info'>
全村160户,657人,
</View>
<View className='atGrid'>
<AtGrid hasBorder={false} columnNum={4} onClick={this.itemClick2.bind(this)} data={
[
{
image: countryinfo_picture1,
value: '张无忌 '
},
{
image: countryinfo_picture1,
value: '张翠山'
},
{
image: countryinfo_picture1,
value: '张三丰 '
},
{
image: countryinfo_picture1,
value: '谢逊 '
},
]
} />
</View>
<View className='user-box'>
<AtTabs
current={this.state.current}
scroll
tabList={[
{ title: '议集' },
{ title: '会' },
{ title: '执' },
{ title: '监' }
]}
onClick={this.handleClick.bind(this)}>
<AtTabsPane current={this.state.current} index={0}>
<View style='font-size:18px;text-align:center;height:200px;'>标签页一的内容</View>
</AtTabsPane>
<AtTabsPane current={this.state.current} index={1}>
<View style='font-size:18px;text-align:center;height:100px;'>标签页二的内容</View>
</AtTabsPane>
<AtTabsPane current={this.state.current} index={2}>
<View style='font-size:18px;text-align:center;height:100px;'>标签页三的内容</View>
</AtTabsPane>
<AtTabsPane current={this.state.current} index={3}>
<View style='font-size:18px;text-align:center;height:100px;'>标签页四的内容</View>
</AtTabsPane>
</AtTabs>
</View>
</View>
);
}
}
CSS文件下
.wrap-flex {
background: #F5F5F5;
min-height: 100vh;
padding-bottom: 40px;
}
.bg-img{
padding-top:0px;
width: 100%;
position:static;
display:block;
height: 300rpx;
}
.user-box {
display: flex;
align-items: center;
margin-top: -10px;
padding: 30px 20px 30px 30px;
background: #ffffff;
}
.user-img {
display: block;
width: 90px;
height: 90px;
margin-right: 20px;
border-radius: 50%;
}
.user-img1 {
display: block;
width: 120px;
height: 120px;
border-radius: 50%;
position: absolute;
top:240px;
right: 60px;
overflow: hidden;
}
.user-msg {
color: rgb(27, 26, 26);
font-size: 30px;
font-weight: 400;
}
.u-address {
font-size: 22px;
margin-top: 10px;
color: rgb(189, 185, 185);
font-weight: normal;
}
.atGrid{
margin-top: 30px;
background-color:#ffffff;
}
.user-menu {
margin-top: 10px;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
background: #fff;
}
.menu-item {
width: 180px;
display: flex;
justify-content: center;
align-items: center;
height: 180px;
flex-direction: column;
font-size: 30px;
color: #666;
}
.menu-img {
display: block;
width: 60px;
height: 60px;
margin-bottom: 20px;
}
.kefu::after {
border: none;
}
.kefu {
background: none;
}
.kefu-text {
line-height: 1.5;
display: block;
}
.list-title {
padding: 20px 30px 0px 30px;
font-size: 35px;
color: #666;
font-weight: 700;
}
.goods-item{
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 20px;
min-height: 100px;
background: #fff;
margin: 20px;
border-radius: 10px;
box-shadow: 6px 6px 20px rgba(0, 0, 0, .1);
}
.goods-img {
display: block;
width: 90px;
height: 90px;
margin-right: 30px;
}
.goods-desc {
flex: 1;
font-size: 32px;
}
.goods-desc_info{
display: flex;
align-items: baseline;
flex-direction: row;
}
.mar-top{
margin-top: 20px;
}
.mar-left{
margin-left: 37px;
}
.goods-price {
display: inline-block;
font-size: 50px;
color: red;
}
.goods-type {
display: inline-block;
color:red;
font-size: 30px;
}
.goods-modified-time{
display: inline-block;
color:rgb(209, 199, 199);
font-size: 25px;
}
.edit-goods {
margin-left: 10px;
font-size: 26px;
border-radius: 30px;
background: rgb(247, 203, 7);
color: #333;
padding: 10px 30px;
line-height: 1;
}
.stock {
margin-left: 20px;
color: #999;
font-size: 26px;
}
.nav-search{
display: flex;
align-items: center;
justify-content: center;
flex-direction: row;
width: 96%;
margin-top: 10px;
background: #f7d347;
}
.swiperitem-img{
width: 100%;
height: 260px;
}
.nav-images{
display: flex;
align-items: center;
justify-content: center;
flex-direction: row;
width: 92%;
height: 260px;
margin-top: 5px;
background: #f7d347;
}
.butcollection{
display: flex;
align-self: center;
align-items: center;
justify-content: center;
flex-direction: column;
width: 36px;
height: 36px;
padding: 5px;
border-radius: 45px;
margin-left: 15px;
background-color: rgb(255, 255, 255);
}
.imageswiper{
width: 100%;
height: 260px;
}
.tabs{
width: 100%;
margin-top: 30px;
display: flex;
align-items: center;
justify-content: center;
}
.at-tabs {
width: 700px;
height: 100%;
overflow: hidden;
margin-left: 0px;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.at-tabs__header {
position: relative;
display: flex;
width: 51%;
text-align: center;
white-space: nowrap;
background-color: #F5F5F5;
box-sizing: border-box;
overflow: -moz-scrollbars-none;
}
.at-tabs__item {
position: relative;
flex: 1;
padding: 5px 10px;
color: #b1acac;
font-size: 30px;
font-weight: 500;
text-overflow: ellipsis;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.at-tabs__item--active {
color: #333;
}
.at-tabs__underline {
display: block;
position: absolute;
top: 0;
left: 0;
bottom: auto;
right: auto;
width: 600%;
height: 0PX;
background-color: #F5F5F5;
}
.at-tabs__item-underline {
display: block;
position: relative;
left: 0;
right: 0;
bottom: 0;
background-color: #6190E8;
-webkit-transform: scaleX(0);
transform: scaleX(0);
transition: all 0.15s;
background-color: #f7cb07;
width: 70%;
height: 2PX;
margin-top: 5px;
}
.at-grid__flex .content-inner__img{
width: 60rpx;
height: 60rpx;
}
.at-grid__flex .content-inner__text{
font-size: 26px;
}
.at-grid__flex-item{
height: 150px;
}
.contact-btn {
width: 105rpx;
height: 150rpx;
margin-top: -140rpx;
margin-left: 230rpx;
opacity: 0;
}
.at-tabs__header-country-info {
font-size: 36px;
font-family:SimHei;
color: #FE5E3D;
}
.at-tabs__content-country-info {
font-size: 30px;
display: flex;
align-items: center;
margin-top: -10px;
padding: 30px 20px 30px 30px;
background: #ffffff;
}