|
@@ -12,7 +12,11 @@ function handleNavLeftClick() {
|
|
|
|
|
|
const router = useRouter()
|
|
|
function handleClickCard(row) {
|
|
|
- router.push(`/qzzx/qzzxxq/${row.id}`)
|
|
|
+ if (row.type === '1') {
|
|
|
+ window.open(row.brief)
|
|
|
+ } else {
|
|
|
+ router.push(`/qzzx/qzzxxq/${row.id}`)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
@@ -35,6 +39,7 @@ const overlayForm = reactive({
|
|
|
ni_title: '',
|
|
|
ni_content: '',
|
|
|
ni_img: '',
|
|
|
+ ni_type: '1',
|
|
|
})
|
|
|
|
|
|
function handleNavRightClick() {
|
|
@@ -44,6 +49,7 @@ function handleNavRightClick() {
|
|
|
overlayForm.ni_title = ''
|
|
|
overlayForm.ni_content = ''
|
|
|
overlayForm.ni_img = ''
|
|
|
+ overlayForm.ni_type = '1'
|
|
|
|
|
|
overlayShow = true
|
|
|
}
|
|
@@ -88,10 +94,10 @@ function onFinish(val) {
|
|
|
<template #default="{ row: item }">
|
|
|
<van-card :title="item.name" :thumb="(item.img)" @click="handleClickCard(item)">
|
|
|
<template #price>
|
|
|
- <van-tag plain type="primary">{{ item.nic_name }}</van-tag>
|
|
|
+ <van-tag plain type="primary">{{ item.nic_name }}</van-tag>
|
|
|
</template>
|
|
|
<template #num>
|
|
|
- {{ item.datetime }}
|
|
|
+ {{ item.datetime }}
|
|
|
</template>
|
|
|
</van-card>
|
|
|
</template>
|
|
@@ -104,7 +110,7 @@ function onFinish(val) {
|
|
|
<div class="bg-white w-9/10 p-4 rounded-md dark:bg-black" @click.stop>
|
|
|
<div class="font-bold text-lg mb-4 pre">新建求真在线</div>
|
|
|
|
|
|
- <van-form @submit="handleOverlaySubmit">
|
|
|
+ <van-form @submit="handleOverlaySubmit" label-width="5em">
|
|
|
<van-field name="nic_id" label="新闻类型" is-link readonly @click="showPicker = true" v-model="pickerVal"
|
|
|
:rules="[{ required: true, message: '新闻类型不能为空' }]"> </van-field>
|
|
|
|
|
@@ -120,9 +126,20 @@ function onFinish(val) {
|
|
|
<van-field name="ni_title" v-model="overlayForm.ni_title" placeholder="请输入新闻标题..." label="新闻标题"
|
|
|
:rules="[{ required: true, message: '新闻标题不能为空' }]"></van-field>
|
|
|
|
|
|
- <van-field v-model="overlayForm.ni_content" name="ni_content" placeholder="请输入美篇链接或新闻内容..." maxlength="500"
|
|
|
- show-word-limit rows="6" type="textarea" autosize :rules="[{ required: true, message: '新闻内容不能为空' }]"
|
|
|
- label="新闻内容" />
|
|
|
+ <van-field name="radio" label="内容类型">
|
|
|
+ <template #input>
|
|
|
+ <van-radio-group v-model="overlayForm.ni_type" direction="horizontal">
|
|
|
+ <van-radio name="1">美篇链接</van-radio>
|
|
|
+ <van-radio name="0">普通新闻</van-radio>
|
|
|
+ </van-radio-group>
|
|
|
+ </template>
|
|
|
+ </van-field>
|
|
|
+
|
|
|
+ <van-field v-model="overlayForm.ni_content" name="ni_content"
|
|
|
+ :placeholder="`请输入${overlayForm.ni_type === '1' ? '美篇链接' : '新闻内容'}...`" maxlength="500" show-word-limit rows="6"
|
|
|
+ type="textarea" autosize
|
|
|
+ :rules="[{ required: true, message: overlayForm.ni_type === '1' ? '美篇链接不能为空' : '新闻内容不能为空' }]"
|
|
|
+ :label="overlayForm.ni_type === '1' ? '美篇链接' : '新闻内容'" />
|
|
|
|
|
|
<van-field name="ni_img" label="封面图片" :rules="[{ required: true, message: '封面图片不能为空' }]">
|
|
|
<template #input>
|