<!-- 举报中心 --> <template> <view class="tort"> <image src="http://111.198.10.15:11604/png/back_complete.png" style="position:absolute;top: -4rpx;left: 0;z-index: -999; width:100%;height: 300rpx;"></image> <view class="center-title">举报入口</view> <view class="content"> <view v-for="(item,index) in tabList" :key="item.id" class="content-main" @click="changePage(item.id, item.icon)"> <image :src="item.icon" :style="item.style" mode=""></image> <view class="text-area"> <text class="content-title">{{item.title}}</text> </view> </view> </view> <u-popup :show="show" @close="close" @open="open"> <view class="popup-title"> 请选择身份信息 </view> <view class="popup-button"> <button class="button" @click="clickPerson">个人用户</button> <button class="button" open-type="contact" session-from="sessionFrom" @click="show = false">企业用户</button> </view> </u-popup> </view> </template> <script> import { getLocationParams } from '../../common/utils.js'; export default { name: 'center', components: { }, data() { return { show: false, tabList: [ { id: 'report', title: '侵权举报', icon: '../../static/center/web.png', span: '6', style: 'width: 52px;height: 60px;' }, { id: 'guide', title: '侵权指引', icon: '../../static/center/special.png', span: '6', style: 'width: 52px;height: 60px;' }, { id: 'egersis', title: '案例警醒', icon: '../../static/center/other.png', span: '12', style: 'width: 53px;height: 60px;' }, ], columns: [ { id: 'person', label: '个人用户' }, { id: 'firm', label: '企业用户' }, ] } }, methods: { changePage(val, icon) { console.log(icon) if(val === 'report') { // 侵权举报 this.open() } else if(val === 'guide') { // 侵权指引 wx.navigateTo({ url: '/packageA/tortGuide/tortGuide' }) } else if(val === 'egersis') { wx.navigateTo({ url: '/packageA/egersis/egersis' }) } }, // 打开popup open() { this.show = true }, // 关闭popup close() { this.show = false }, // 点击个人用户 clickPerson() { this.close() const url = 'https://www.12377.cn' wx.navigateTo({ url: '/packageC/rumorWebView/rumorWebView?url=' + encodeURIComponent(url) }) }, } } </script> <style lang="scss" scoped> .tort { position: relative; width: 100%; height: 100%; padding: 40rpx; padding-top: 380rpx; box-sizing: border-box; .center-title { position: absolute; top: 40rpx; left: 40rpx; color: #fff; font-size: 48rpx; font-weight: 600; letter-spacing: 4rpx; } .content { display: flex; flex-direction: column; background-color: #fff; border-radius: 16rpx; padding: 20rpx; box-sizing: border-box; .content-main { display: flex; align-items: center; background: linear-gradient(to bottom, #4f8dfa 0%, #45a6fe 100%); margin-top: 40rpx; padding: 20rpx; padding-left: 60rpx; border-radius: 20rpx; color: #fff; .text-area { flex: 1; margin-left: 40rpx; text-align: center; font-weight: 600; font-size: 38rpx; &:last-child { margin-left: 32rpx; } .content-title { margin-right: 20rpx; } } } } .popup-title { font-size: 34rpx; font-weight: 600; margin: 32rpx 0; text-align: center; } .popup-button { display: flex; justify-content: space-around; padding: 40rpx 20rpx; .button { width: fit-content; font-weight: 600; color: #0043ac; border: 2rpx solid #0043ac; background-color: #fff; } } } </style> <style lang="scss"> .center { .u-icon__icon { margin-right: -20rpx; } } </style>