first commit

This commit is contained in:
2025-05-22 10:33:32 +08:00
commit f2ef63d910
581 changed files with 53162 additions and 0 deletions
+134
View File
@@ -0,0 +1,134 @@
<template>
<view class="min-height bg-main-light">
<HeaderItem title="我要反馈"/>
<view class="rounded-top p-30">
<TitleItem title="基础信息"/>
<view class="my-20 card p-30">
<u-form label-width="140rpx">
<u-form-item label="活动名称" border-bottom>
<u-input v-model="formData.title" border="none" placeholder="请输入活动名称">
</u-input>
</u-form-item>
<u-form-item label="活动单位" border-bottom>
<u-input v-model="formData.company" border="none" placeholder="请输入活动单位"/>
</u-form-item>
<u-form-item label="活动地点" border-bottom>
<u-input v-model="formData.address" border="none" placeholder="请输入活动地点"/>
</u-form-item>
<u-form-item label="活动日期" border-bottom @click="showDate = true">
<u-input v-model="formData.date" border="none" placeholder="请选择活动日期" readonly>
</u-input>
</u-form-item>
<u-form-item label="上传图片" border-bottom>
<view class="flex justify-start items-start flex-wrap">
<view class="album-item pos-r" style="border: 1px dashed #ECECEC" v-for="(item, index) in pics"
:key="index">
<u-image :src="item" width="190rpx" height="190rpx" mode="aspectFill"/>
<view class="del-wrap" @click="delImage(index)">
<u-icon name="trash" color="white" size="40rpx"/>
</view>
</view>
<view class="album-item" style="border: 1px dashed #ECECEC" @click="chooseImage">
<u-icon name="plus"/>
</view>
</view>
</u-form-item>
<u-form-item label="上传视频" border-bottom>
<view class="album-item" style="border: 1px dashed #ECECEC">
<u-icon name="play-circle" v-if="!formData.video" @click="chooseVideo" size="40rpx"/>
<template v-else>
<video :src="formData.video" style="width: 190rpx; height: 190rpx" :controls="false"/>
</template>
</view>
<view class="ml-15" v-if="formData.video">
<u-button @click="chooseVideo" size="mini" type="primary">更换</u-button>
</view>
</u-form-item>
<u-form-item label="活动概览">
<u-textarea maxlength="-1" v-model="formData.content" border="none" placeholder="请输入活动概览"/>
</u-form-item>
</u-form>
</view>
<view class="mt-30">
<u-button type="primary" shape="circle" @click="save">保存</u-button>
</view>
</view>
<u-datetime-picker
:show="showDate"
v-model="checkDate"
mode="date"
@confirm="selectDate"
@cancel="showDate = false"
/>
</view>
</template>
<script>
import HeaderItem from "@/components/HeaderItem.vue";
import TitleItem from "@/components/TitleItem.vue";
import dayjs from "dayjs";
import {chooseImg, chooseVideo} from "@/util";
import {feedbackReq} from "@/api/common";
import {userInfoReq} from "@/api/user";
export default {
name: "feedback",
components: {TitleItem, HeaderItem},
data() {
return {
formData: {
title: '',
company: '',
address: '',
date: '',
pics: '',
video: '',
content: '',
},
pics: [],
showDate: false,
checkDate: Number(new Date()),
userInfo: null
}
},
methods: {
selectDate({value}) {
this.showDate = false
this.formData.date = dayjs(value).format("YYYY-MM-DD")
},
async chooseImage() {
const res = await chooseImg(9 - this.pics.length)
res.map(item => {
this.pics.push(item.path)
})
},
delImage(index) {
this.pics.splice(index, 1)
},
async chooseVideo() {
const res = await chooseVideo()
this.formData.video = res.path
},
async save() {
if (this.pics) this.formData.pics = JSON.stringify(this.pics)
if (!this.formData.title) return this.$toast('请输入活动名称')
if (!this.formData.company) return this.$toast('请输入活动单位')
if (!this.formData.address) return this.$toast('请输入活动地点')
if (!this.formData.date) return this.$toast('请选择活动日期')
await feedbackReq(this.formData)
this.$toast('提交成功')
uni.navigateBack()
},
async getUserData() {
const res = await userInfoReq()
if (res) {
this.userInfo = res.data
this.formData.company = res.data.companyName
}
}
},
onLoad() {
this.getUserData()
},
}
</script>
+47
View File
@@ -0,0 +1,47 @@
<template>
<view class="min-height bg-main-light">
<HeaderItem title="详情"/>
<template v-if="info">
<view class="bg-white p-30">
<view class="font-bold text-25">{{ info.title }}</view>
<view class="text-25 text-gray mt-20">{{ info.createTime }}</view>
</view>
<view class="card m-25">
<u-parse :content="info.content"/>
</view>
</template>
<view class="footer bg-linear text-white text-center" v-if="showFeedback" @click="$jump('/articlePages/pages/feedback')">
<view class="p-30">我要反馈</view>
</view>
</view>
</template>
<script>
import {articleInfoReq} from "@/api/common";
import HeaderItem from "@/components/HeaderItem.vue";
export default {
name: "info",
components: {HeaderItem},
data() {
return {
info: null,
showFeedback: false,
}
},
methods: {
async getInfo(articleId) {
const {data} = await articleInfoReq({
articleId
})
this.info = data
}
},
onLoad({id, showFeedback}) {
this.getInfo(id)
if (showFeedback) {
this.showFeedback = parseInt(showFeedback) === 1
}
}
}
</script>
+45
View File
@@ -0,0 +1,45 @@
<template>
<view class="min-height bg-main-light">
<HeaderItem :title="title"/>
<template v-if="list.length">
<view class="card m-20" v-for="(item, index) in list" :key="index"
@click="$jump(`/articlePages/pages/info?id=${item.articleId}`)">
<view class="flex-1 flex justify-between items-center w-100p">
<text class="text-25 font-bold">{{ item.title }}</text>
<text class="text-20 text-gray">{{ item.createTime }}</text>
</view>
</view>
</template>
<u-empty v-else icon="/lawOrgPages/static/empty.png"/>
</view>
</template>
<script>
import HeaderItem from "@/components/HeaderItem.vue";
import {listArticleReq} from "@/api/common";
export default {
name: "list",
components: {HeaderItem},
data() {
return {
title: '',
cateId: '',
list: []
}
},
methods: {
async getList() {
const {data} = await listArticleReq({
categoryId: this.cateId
})
this.list = data
}
},
onLoad({title, cateId}) {
this.title = title
this.cateId = cateId
this.getList()
}
}
</script>
+91
View File
@@ -0,0 +1,91 @@
<template>
<view class="min-height bg-white">
<HeaderItem title="法治宣传"/>
<view class="p-20 pos-r bg-linear" style="padding-bottom: 80rpx">
<u-input v-model="keyword" shape="circle" :custom-style="{background: 'white', height: '65rpx'}"
placeholder="请输入您要查找的内容"/>
<view class="pos-a" style="right: 30rpx; top: 30rpx">
<u-button shape="circle" type="primary" :custom-style="{width: '200rpx', zIndex: 9999}" @click="getList">
搜索
</u-button>
</view>
<view class="p-20 text-25 flex justify-start items-center overflow-x pos-a"
style="background-color: #E1F3FE; border-radius: 10rpx; width: 90%; bottom: -40rpx">
<text v-for="(item, index) in cateList" :key="index" class="tag"
@click="changeType(index)"
:class="[item.categoryId === activeId ? 'selected-tag' : '']">{{ item.title }}
</text>
</view>
</view>
<u-gap height="40rpx"></u-gap>
<template v-if="list.length">
<view class="card m-20 flex flex-col justify-center items-center" v-for="(item, index) in list" :key="index">
<view class="circle w-100p mb-20"
style="box-shadow: 0 2px 6px rgba(144, 144, 144, 0.4);"
@click="$jump(`/articlePages/pages/info?id=${item.articleId}&showFeedback=1`)"
:style="{backgroundImage: `url(${API()}/file${item.image})`, backgroundSize: 'cover',
height: '240rpx'}"></view>
<view class="text-25 mt-20">{{ item.title }}</view>
</view>
</template>
<u-empty v-else icon="/lawOrgPages/static/empty.png"/>
</view>
</template>
<script>
import HeaderItem from "@/components/HeaderItem.vue";
import {articleCateReq, listArticleReq} from "@/api/common";
import {API} from "@/config";
export default {
name: "publicity",
components: {HeaderItem},
data() {
return {
keyword: '',
cateList: [],
list: [],
activeId: 0
}
},
methods: {
API() {
return API
},
async getCateList() {
const {data} = await articleCateReq({
parentId: 60
})
this.cateList = data
this.changeType(0)
},
changeType(index) {
this.activeId = this.cateList[index].categoryId
this.getList()
},
async getList() {
const {data} = await listArticleReq({
categoryId: this.activeId,
title: this.keyword
})
this.list = data
}
},
onLoad() {
this.getCateList()
}
}
</script>
<style scoped lang="scss">
.tag {
padding: 10rpx 25rpx;
margin-right: 25rpx;
flex-shrink: 0;
}
.selected-tag {
background-color: #FFCA68;
border-radius: 100rpx;
}
</style>
+96
View File
@@ -0,0 +1,96 @@
<template>
<view class="min-height bg-white">
<HeaderItem title="自助查询"/>
<view class="p-20 pos-r bg-linear" style="padding-bottom: 70rpx">
<u-input v-model="keyword" shape="circle" :custom-style="{background: 'white', height: '65rpx'}"
placeholder="请输入您要查找的内容"/>
<view class="pos-a" style="right: 30rpx; top: 30rpx">
<u-button shape="circle" type="primary" :custom-style="{width: '200rpx', zIndex: 9999}" @click="getList">
搜索
</u-button>
</view>
<view class="pos-a" style="width: 100%; left: 0; bottom: -70rpx">
<view class="bg-main-light p-20 text-25 flex justify-start items-center overflow-x m-25 rounded-sm">
<text v-for="(item, index) in cateList" :key="index" class="tag"
@click="changeCate(index)"
:class="[item.id === cateId ? 'selected-tag' : '']">{{ item.title }}
</text>
</view>
</view>
</view>
<u-gap height="50rpx"></u-gap>
<template v-if="list.length">
<view class="py-15 border-bottom m-25" v-for="(item, index) in list" :key="index"
@click="$jump(`/articlePages/pages/info?id=${item.articleId}`)">
<view class="flex-1 flex justify-between items-center w-100p">
<text class="text-25 font-bold">{{ item.title }}</text>
<text class="text-20 text-gray">{{ item.createTime }}</text>
</view>
</view>
</template>
<u-empty v-else icon="/lawOrgPages/static/empty.png"/>
</view>
</template>
<script>
import HeaderItem from "@/components/HeaderItem.vue";
import {listArticleReq} from "@/api/common";
export default {
name: "list",
components: {HeaderItem},
data() {
return {
keyword: '',
cateId: 55,
cateList: [
{
title: '法律法规',
id: 55
},
{
title: '案例查询',
id: 56
},
{
title: '文书模板',
id: 67
},
],
list: [],
}
},
methods: {
changeCate(index) {
this.cateId = this.cateList[index].id
this.getList()
},
async getList() {
const {data} = await listArticleReq({
categoryId: this.cateId,
title: this.keyword
})
this.list = data
}
},
onLoad() {
this.getList()
}
}
</script>
<style scoped lang="scss">
.tag {
padding: 10rpx 25rpx;
margin-right: 25rpx;
flex-shrink: 0;
}
.selected-tag {
background-color: #FFCA68;
border-radius: 100rpx;
}
</style>