浏览代码

Merge branch 'master' of http://git.cc-lotus.info/shuiTou/web

zs 2 周之前
父节点
当前提交
67b6f93df1

+ 2 - 2
src/api/api.ts

@@ -97,8 +97,8 @@ const jtxw = {
  * 企业生产经营情况:qyscjyqk
  * 企业与相对人的争议解决方式:qyyxdrdzyjjfs
  */
-const xxgk = async (type: string) => {
-  const res = await axios.$get(`/xxgk/${type}`)
+const xxgk = async (type: string, query = {}) => {
+  const res = await axios.$get(`/xxgk/${type}`, query)
   return res;
 }
 const xxgkDetail = async (content_id: string) => {

+ 6 - 3
src/views/win/introduceParts/combriefIndex.vue

@@ -35,11 +35,11 @@
 import { ref, onMounted } from 'vue'
 import dividerIndex from '../../../components/windows/dividerIndex.vue'
 import { jtjs } from '@/api/api'
-import { get } from 'lodash-es'
+import { get, head } from 'lodash-es'
 // eslint-disable-next-line @typescript-eslint/no-explicit-any
 const list = ref<any[]>([])
 const active = ref('1')
-const info = ref({ id: '', title: '', txt: '' })
+const info: any = ref({ id: '1', title: '', txt: '' })
 
 /* 选择 */
 const toChange = (event: { id: string; title: string; txt: string }) => {
@@ -81,10 +81,13 @@ const init = async () => {
   const result = await jtjs.gsjs()
   if (result.errcode == 0) {
     list.value = get(result, 'data', [])
+    const first = head(get(result, 'data', []))
+    active.value = get(first, 'id', '1') as string
+    info.value = first
   }
 }
 const toOpen = () => {
-  const channel_id = get(info, 'channel_id', get(info, 'id'))
+  const channel_id = get(info, 'value.channel_id', get(info, 'id'))
   if (!channel_id) return
   window.open(
     `/${import.meta.env.VITE_BASE_URL}/introduceDetail?channel_id=${channel_id}&type=gsjs`,

+ 6 - 3
src/views/win/introduceParts/gsjsDetail.vue

@@ -48,8 +48,11 @@ const viewChannel = ref(197)
 const tabActive = ref('1')
 /* 选择 */
 const tabChange = (event: { id: string }) => {
-  tabActive.value = event.id
-  dealNowTag(event.id)
+  const tab = tabList.value.find((f) => `${f.channel_id}` == event.id)
+  if (!tab) return
+  const id = get(tab, 'id')
+  tabActive.value = id
+  dealNowTag(id)
 }
 /**根据标签页id,处理显示内容 */
 const dealNowTag = (id: string) => {
@@ -90,7 +93,7 @@ const route = useRoute()
 /* 初始化 */
 onMounted(() => {
   const id: any = get(route, 'query.channel_id')
-  if (id) dealNowTag(id)
+  if (id) tabChange({ id })
 })
 </script>
 

+ 6 - 3
src/views/win/introduceParts/scfmDetail.vue

@@ -48,8 +48,11 @@ const viewChannel = ref(197)
 const tabActive = ref('1')
 /* 选择 */
 const tabChange = (event: { id: string }) => {
-  tabActive.value = event.id
-  dealNowTag(event.id)
+  const tab = tabList.value.find((f) => `${f.channel_id}` == event.id)
+  if (!tab) return
+  const id = get(tab, 'id')
+  tabActive.value = id
+  dealNowTag(id)
 }
 /**根据标签页id,处理显示内容 */
 const dealNowTag = (id: string) => {
@@ -86,7 +89,7 @@ const route = useRoute()
 /* 初始化 */
 onMounted(() => {
   const id: any = get(route, 'query.channel_id')
-  if (id) dealNowTag(id)
+  if (id) tabChange({ id })
 })
 </script>
 

+ 4 - 4
src/views/win/messParts/detail/list.vue

@@ -55,18 +55,18 @@ const list = ref<any[]>([
     date: '2024-12-24',
   },
 ])
-const total = ref(40)
+const total = ref(0)
 
 import { xxgk } from '@/api/api'
 /* 查询 */
 const toSearch = async ({ skip = 0, limit = 10, ...info } = {}) => {
   const type = props.code as string
-  const result = await xxgk(type)
+  const result = await xxgk(type, { skip, limit })
   if (result.errcode == 0) {
     const data = get(result, 'data.data', [])
-    const total = get(result, 'data.total', 0)
+    const t = get(result, 'data.total', 0)
     list.value = data
-    total.value = total
+    total.value = t
   }
 }
 import { useRoute } from 'vue-router'

+ 2 - 2
src/views/win/newsParts/listIndex.vue

@@ -35,7 +35,7 @@
             <el-col :span="24" class="brief" v-html="item.brief"> </el-col>
           </el-col>
           <el-col :span="6" class="imgs">
-            <el-image class="images" :src="item.url"></el-image>
+            <el-image class="images" :src="item.url || defUrl"></el-image>
           </el-col>
         </el-col>
       </el-col>
@@ -53,7 +53,7 @@ import dayjs from 'dayjs'
 /* 分页 */
 import pagesIndex from '../../../components/windows/pagesIndex.vue'
 import { get } from 'lodash-es'
-
+const defUrl = 'zxzx.jpg'
 const tabList = ref([
   {
     id: '1',

+ 1 - 0
src/views/win/watersupplyParts/listIndex.vue

@@ -132,6 +132,7 @@ const dealNowTag = (id: string) => {
   if (!tab) return
   const type = get(tab, 'type')
   if (!type) return
+  tabActive.value = get(tab, 'id')
   if (type == 'toLogin') {
     // TODO:跳转至登录
     ElMessageBox.alert('请登录', '提示', {