From b5f084460e9e639358fbf91056a86be8d0a5c4b2 Mon Sep 17 00:00:00 2001
From: yaolonglong <yaolonglong15@163.com>
Date: 星期四, 09 十月 2025 20:18:57 +0800
Subject: [PATCH] 获取验证码功能
---
policy/components/index.vue | 153 +++++++++++++++++++++++++++++++++++++++------------
1 files changed, 117 insertions(+), 36 deletions(-)
diff --git a/policy/components/index.vue b/policy/components/index.vue
index cf7193e..381a0ca 100644
--- a/policy/components/index.vue
+++ b/policy/components/index.vue
@@ -1,17 +1,18 @@
<template>
<view class="page-content">
-
+
<view class="banner">
- <image src="https://picsum.photos/200/200" mode=""></image>
+ <image src="/static/head.png" mode=""></image>
</view>
<view class="main-page-box">
- <view class="second-box">
- <image src="/static/index.png" class="icon"></image>
+ <view class="second-box" @click="goPolicyList">
+ <image src="/static/hqzc.png" class="icon"></image>
<view class="driver"></view>
- <view class="right-box">
- <view>
- <view class="u-line-1 margin-bottom">娴峰叧鎬荤讲璐告槗鎸佺画鍙戝睍2024骞寸珛娉曞眬...</view>
- <view class="u-line-1">鍥藉鍖荤枟淇濋殰灞�鍔炲叕瀹ゅ叧浜庡彂甯冪鐞�... </view>
+ <view class="right-box" >
+ <view class="article-list">
+ <view class="u-line-1 margin-bottom" v-for="(item, index) in policyList" :key="index">
+ {{item.docTitle}}</view>
+ <!-- <view class="u-line-1">鍥藉鍖荤枟淇濋殰灞�鍔炲叕瀹ゅ叧浜庡彂甯冪鐞�... </view> -->
</view>
<view class="icon-box">
<u-icon name="arrow-right" size="14" color="#868C98FF"></u-icon>
@@ -19,38 +20,59 @@
</view>
</view>
<view class="policy-list">
- <u-button @click="applyPulicy">鎵ф硶鐢宠</u-button>
- <u-button v-if="isJudge">鎵ф硶瀹℃壒</u-button>
- <u-button @click="report">鎵ф硶缁撴灉涓婃姤</u-button>
- <u-button>璁板綍鏌ヨ</u-button>
- <u-button @click="goDataLook">鏁版嵁鐪嬫澘</u-button>
+ <image src="/static/policy/zhi1.png" v-if="userAuth" @click="applyPulicy" mode="widthFix"></image>
+ <image src="/static/policy/zhi2.png" v-if="isJudge" @click="recordZhifa" mode="widthFix"></image>
+ <image src="/static/policy/zhi3.png" v-if="userAuth" @click="report" mode="widthFix"></image>
+ <image src="/static/policy/zhi4.png" v-if="userAuth" @click="applyRecord" mode="widthFix"></image>
+ <image src="/static/policy/zhi5.png" @click="goDataLook" v-if="userType == '00'" mode="widthFix">
+ </image>
</view>
</view>
</view>
</template>
<script>
- import { getInfo } from '@/api/auth.js'
+ import {
+ getInfo,
+ docList
+ } from '@/api/auth.js'
import tabsCom from '@/policy/components/tabs.vue'
export default {
+ props: {
+ isJudge: {
+ type: Boolean,
+ default: false
+ },
+ userType: {
+ type: String,
+ default: ""
+ },
+ userAuth: {
+ type: Boolean,
+ default: false
+ }
+ },
components: {
tabsCom
},
data() {
return {
- isJudge: false
+ // isJudge: false,
+ policyList: []
}
},
- onShow() {
- this.getInfo()
+ mounted() {
+ // this.getInfo()
+ this.docList()
},
methods: {
- getInfo() {
- getInfo().then(val =>{
- // console.log()
- this.isJudge = val.data.roles.some(item => item.includes('check_enforce'))
- })
- },
+ // getInfo() {
+ // getInfo().then(val =>{
+ // if(val.data.data.roles) {
+ // this.isJudge = val.data.data.roles.some(item => item.includes('check_enforce'))
+ // }
+ // })
+ // },
applyPulicy() {
uni.navigateTo({
url: '/policy/policyApply/policyApply'
@@ -65,26 +87,61 @@
uni.navigateTo({
url: '/policy/reportPage/reportPage'
})
+ },
+ applyRecord() {
+ console.log(this.userAuth)
+ if(this.userAuth) {
+ uni.navigateTo({
+ url: '/policy/applyLook/applyLook'
+ })
+ } else {
+ uni.navigateTo({
+ url: '/policy/applyRecord/applyRecord'
+ })
+ }
+
+ },
+ recordZhifa() {
+ uni.navigateTo({
+ url: '/policy/translate/translate'
+ })
+ },
+ // 鍘诲線鎯犱紒鏀跨瓥
+ goPolicyList() {
+ uni.navigateTo({
+ url: `/pages/hqzc/list`
+ })
+ },
+ docList() {
+ docList({
+ pageSize: 2,
+ pageNum: 1
+ }).then(val => {
+ this.policyList = val.data.rows
+ })
}
}
}
</script>
<style lang="scss" scoped>
- .page-content{
- .banner{
+ .page-content {
+ .banner {
width: 100%;
- height: 400rpx;
- image{
+ height: 520rpx;
+
+ image {
width: 100%;
height: 100%;
}
}
- .main-page-box{
+
+ .main-page-box {
position: relative;
top: -60rpx;
}
- .second-box{
+
+ .second-box {
margin: 0 32rpx;
background-color: white;
border-radius: 20rpx;
@@ -92,36 +149,60 @@
display: flex;
justify-content: space-between;
align-items: center;
- .icon{
+
+ .icon {
width: 76rpx;
height: 76rpx;
-
+
}
- .driver{
+
+ .driver {
height: 50rpx;
width: 2rpx;
background-color: #F1F1F1;
margin: 0 24rpx;
}
- .right-box{
+
+ .right-box {
display: flex;
justify-content: space-between;
align-items: center;
width: calc(100% - 76rpx - 50rpx);
font-size: 26rpx;
color: #4A4E60FF;
- .icon-box{
+
+ .article-list {
+ width: 80%;
+ }
+
+ .icon-box {
background-color: #F1F1F1;
border-radius: 50%;
padding: 10rpx;
}
- .margin-bottom{
+
+ .margin-bottom {
margin-bottom: 10rpx;
+ }
+
+ .margin-bottom:last-child {
+ margin-bottom: 0;
}
}
}
- .policy-list{
+
+ .policy-list {
margin: 22rpx 32rpx;
+
+ image {
+ width: 100%;
+ height: 160rpx;
+ margin-bottom: 20rpx;
+ }
+
+ image::last-child {
+ margin-bottom: 0;
+ }
}
}
</style>
\ No newline at end of file
--
Gitblit v1.9.1