![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/f2c78d453de67516e29b61eeadc5a8fb.png)
<view class="colonn">
<view :class="is_tap == 1?'gerenyonghu22 center_center roww':'gerenyonghu11 center_center roww'" @click="tap(1)">
<view class="colonn">
<view class="font_size7_r" style="margin-bottom: 15rpx;">个人用户</view>
<view>适合个人法律咨询和个人法律服务的人员</view>
</view>
<view class="allline"></view>
</view>
<view :class="is_tap == 1?'gerenyonghu11 center_center roww':'gerenyonghu22 center_center roww'" @click="tap(2)">
<view class="colonn">
<view class="font_size7_r" style="margin-bottom: 15rpx;">个人用户</view>
<view>适合个人法律咨询和个人法律服务的人员</view>
</view>
<view class="allline"></view>
</view>
</view>
data() {
return {
is_tap:2,
}
},
methods: {
tap(index){
console.log(index,"选中的类型")
switch(index){
case 1:
this.is_tap=2
break;
case 2:
this.is_tap=1
break;
}
}
}
.gerenyonghu11 {
width: 670rpx;
border: 1px solid #007AFF;
padding: 30rpx 0rpx;
margin: 25rpx;
border-radius: 15rpx;
padding: 30rpx 15rpx;
}
.gerenyonghu22 {
width: 670rpx;
padding: 30rpx 0rpx;
margin: 25rpx;
border-radius: 15rpx;
padding: 30rpx 15rpx;
}