|
@@ -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`,
|