Commit 15294bea authored by chenqikuai's avatar chenqikuai

富文本编辑器样式修改、账号删除按钮修复

parent 90d83f7b
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<!-- <script src="//at.alicdn.com/t/font_2711356_k19r0hh1f4.js"></script> --> <!-- <script src="//at.alicdn.com/t/font_2711356_k19r0hh1f4.js"></script> -->
<script src="//at.alicdn.com/t/font_2711356_53bl5jmwu2e.js"></script> <script src="//at.alicdn.com/t/font_2711356_53bl5jmwu2e.js"></script>
<script> <script>
console.log('v.0.1.14'); console.log('v.0.1.15');
</script> </script>
</body> </body>
......
...@@ -201,4 +201,24 @@ export default defineComponent({ ...@@ -201,4 +201,24 @@ export default defineComponent({
display: flex; display: flex;
flex-direction: row; flex-direction: row;
} }
.vhtml {
h1 {
font-size: 1.4rem !important;
font-weight: 300 !important;
line-height: 1.5rem !important;
letter-spacing: -0.01562em !important;
}
h2 {
font-size: 1.2rem !important;
font-weight: 300 !important;
line-height: 1.5rem !important;
letter-spacing: -0.01562em !important;
}
h3 {
font-size: 1rem !important;
font-weight: 300 !important;
line-height: 1.5rem !important;
letter-spacing: -0.01562em !important;
}
}
</style> </style>
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
<div class="box1 flex-col flex-grow justify-between overflow-hidden"> <div class="box1 flex-col flex-grow justify-between overflow-hidden">
<span class="info8">{{ info?.title }}</span> <span class="info8">{{ info?.title }}</span>
<span class="info10">{{ info?.desc }}</span> <span class="info10">{{ info?.desc }}</span>
<div class="layer4 flex pr-20"> <div class="layer4 flex pr-12">
<span class="info9">{{ info?.writer }}</span> <span class="info9 mr-2">{{ info?.writer }}</span>
<span class="word24">{{ $format(info?.created_at, 'YYYY-MM-DD') }}</span> <span class="word24 flex-shrink-0">{{ $format(info?.created_at, 'YYYY-MM-DD') }}</span>
</div> </div>
</div> </div>
<div class="box2 ml-4 flex-shrink-0"> <div class="box2 ml-4 flex-shrink-0">
...@@ -96,6 +96,7 @@ export default defineComponent({ ...@@ -96,6 +96,7 @@ export default defineComponent({
text-align: left; text-align: left;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap
} }
.word24 { .word24 {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<div class=" text-sm text-gray-800 text-justify pt-3 news-info">{{ info.desc }}</div> <div class=" text-sm text-gray-800 text-justify pt-3 news-info">{{ info.desc }}</div>
<div <div
v-if="showImg" v-if="showImg"
class=" h-32 bg-app-blue mt-2 bg-cover bg-center bg-no-repeat" class=" h-32 bg-gray-200 mt-2 bg-cover bg-center bg-no-repeat"
:style="{'background-image': `url('${url}')`}"></div> :style="{'background-image': `url('${url}')`}"></div>
<div class=" text-xs text-gray-400 py-5 border-b border-red border-solid">发布时间:{{ $format(info.update_at, 'YYYY-MM-DD') }} &nbsp;&nbsp;&nbsp;作者: {{ info.writer }}</div> <div class=" text-xs text-gray-400 py-5 border-b border-red border-solid">发布时间:{{ $format(info.update_at, 'YYYY-MM-DD') }} &nbsp;&nbsp;&nbsp;作者: {{ info.writer }}</div>
</div> </div>
......
export interface ActivityItem{ export interface ActivityItem{
created_at:number, created_at:number,
file_name:string, file_name:string,
uuid:string uuid:string,
update_at:string
} }
import router from '@/router' import router from '@/router'
import { getUserMsg } from '@/utils/userMsg' import { deleteUserMsg, getUserMsg } from '@/utils/userMsg'
import axios, { AxiosRequestConfig, AxiosResponse } from 'axios' import axios, { AxiosRequestConfig, AxiosResponse } from 'axios'
import { Toast } from 'vant' import { Toast } from 'vant'
...@@ -12,7 +12,7 @@ baseAxios.interceptors.response.use( ...@@ -12,7 +12,7 @@ baseAxios.interceptors.response.use(
const ret = baseRet.data as iRet const ret = baseRet.data as iRet
if ([504, 503].includes(ret.code)) { if ([504, 503].includes(ret.code)) {
Toast.fail(ret.msg) Toast.fail(ret.msg)
localStorage.clear() deleteUserMsg()
router.push({ router.push({
name: 'Login', name: 'Login',
}) })
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
<nav-bar title="精彩活动" /> <nav-bar title="精彩活动" />
<div class="px-5 py-8"> <div class="px-5 py-8">
<p class="text-base text-gray-800 font-semibold">{{ title }}</p> <p class="text-base text-gray-800 font-semibold">{{ title }}</p>
<p class="text-xs text-gray-400 mt-5">发布时间 {{ timestampFormat(created_at) }}</p> <p class="text-xs text-gray-400 mt-5">发布时间 {{ timestampFormat(update_at) }}</p>
<img :src="src" class="text-center" /> <img :src="src" class="text-center" />
<p class="text-sm text-gray-800 text-justify mt-5" v-html="content"></p> <p class="text-sm text-gray-800 text-justify mt-5 vhtml" v-html="content"></p>
</div> </div>
</template> </template>
...@@ -19,7 +19,7 @@ import { timestampFormat } from "@/utils/time" ...@@ -19,7 +19,7 @@ import { timestampFormat } from "@/utils/time"
const uuid = useRoute().params.uuid as string; const uuid = useRoute().params.uuid as string;
const title = ref(""); const title = ref("");
const created_at = ref(0); const update_at = ref(0);
const content = ref(""); const content = ref("");
const file_name = ref(""); const file_name = ref("");
const src = ref(""); const src = ref("");
...@@ -28,7 +28,7 @@ onMounted(() => { ...@@ -28,7 +28,7 @@ onMounted(() => {
queryActivityInfo({ uuid: uuid }).then((ret) => { queryActivityInfo({ uuid: uuid }).then((ret) => {
if (ret.code === 200) { if (ret.code === 200) {
title.value = ret.data.title; title.value = ret.data.title;
created_at.value = ret.data.created_at; update_at.value = ret.data.update_at;
content.value = ret.data.content; content.value = ret.data.content;
file_name.value = ret.data.file_name; file_name.value = ret.data.file_name;
src.value = getImageSrcFromFileHash(file_name.value); src.value = getImageSrcFromFileHash(file_name.value);
......
<template> <template>
<div> <div>
<div class="text-xs text-gray-400 text-center mt-5 "> <div class="text-xs text-gray-400 text-center mt-5 ">
{{ timestampFormat(created_at) }} {{ timestampFormat(update_at) }}
</div> </div>
<div class="text-center mt-2"> <div class="text-center mt-2">
<img :src="src" class="w-83 h-22 object-cover object-center inline-block" /> <img :src="src" class="w-83 h-22 object-cover object-center inline-block" />
...@@ -15,7 +15,7 @@ import { timestampFormat } from "@/utils/time"; ...@@ -15,7 +15,7 @@ import { timestampFormat } from "@/utils/time";
import { getImageSrcFromFileHash } from "@/service/FileService"; import { getImageSrcFromFileHash } from "@/service/FileService";
import { ref } from "vue" import { ref } from "vue"
const props = defineProps({ const props = defineProps({
created_at: Number, update_at: Number,
file_name: String, file_name: String,
}); });
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<Skeleton :loading="skeLoading" :row="3" class="mt-2"> <Skeleton :loading="skeLoading" :row="3" class="mt-2">
<card <card
v-for="activity in activityList" v-for="activity in activityList"
:created_at="activity.created_at" :update_at="activity.update_at"
:file_name="activity.file_name" :file_name="activity.file_name"
:key="activity.id" :key="activity.id"
@click=" @click="
......
...@@ -30,9 +30,8 @@ ...@@ -30,9 +30,8 @@
v-for="(item, index) in phonePwdList" v-for="(item, index) in phonePwdList"
:key="index" :key="index"
class="h-8 flex items-center justify-between bg-font-light-black hover:bg-font-black text-gray-700" class="h-8 flex items-center justify-between bg-font-light-black hover:bg-font-black text-gray-700"
@click="handleClickPhoneItem(item)"
> >
<div class="ml-4">{{ item.phone }}</div> <div class="ml-4" @click="handleClickPhoneItem(item)">{{ item.phone }}</div>
<img <img
src="@/assets/icons/close.png" src="@/assets/icons/close.png"
@click="handleClickDelete(item.phone)" @click="handleClickDelete(item.phone)"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class=" text-xs text-gray-800 pt-3 news-info">{{ info.desc }}</div> <div class=" text-xs text-gray-800 pt-3 news-info">{{ info.desc }}</div>
<div <div
v-if="showImg" v-if="showImg"
class=" h-32 bg-app-blue mt-2 bg-cover bg-center bg-no-repeat" class=" h-32 bg-gray-200 mt-2 bg-cover bg-center bg-no-repeat"
:style="{'background-image': `url('${url}')`}"></div> :style="{'background-image': `url('${url}')`}"></div>
<div class=" text-xs text-gray-400 pt-4 tracking-wide">发布时间:{{ $format(info.update_at, 'YYYY-MM-DD') }}</div> <div class=" text-xs text-gray-400 pt-4 tracking-wide">发布时间:{{ $format(info.update_at, 'YYYY-MM-DD') }}</div>
</div> </div>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div> <div>
<nav-bar title="新闻动态" :style="{ 'background-color':'#F7F7FA'}" :showSearchIcon="true" :path="{path: '/Search', query: { type: 'news' }}"/> <nav-bar title="新闻动态" :style="{ 'background-color':'#F7F7FA'}" :showSearchIcon="true" :path="{path: '/Search', query: { type: 'news' }}"/>
<div class=" mx-5 pt-3"> <div class=" mx-5 pt-3">
<van-pull-refresh v-model="loading" @refresh="onRefresh"> <van-pull-refresh class="divide-y" v-model="refreshing" @refresh="onRefresh">
<van-list <van-list
v-model:loading="loading" v-model:loading="loading"
:finished="finished" :finished="finished"
...@@ -87,5 +87,7 @@ export default defineComponent({ ...@@ -87,5 +87,7 @@ export default defineComponent({
</script> </script>
<style scoped> <style scoped>
.divide-y {
min-height: calc(100vh - 46px);
}
</style> </style>
\ No newline at end of file
<template> <template>
<nav-bar :title="title" :style="{ 'background-color':'#F7F7FA'}" /> <nav-bar :title="title" :style="{ 'background-color': '#F7F7FA' }" />
<div class=" px-5 py-8 overflow-hidden break-all"> <div class="px-5 py-8 overflow-hidden break-all">
<p class=" text-base text-gray-800 font-semibold">{{ info.title }}</p> <p class="text-base text-gray-800 font-semibold">{{ info.title }}</p>
<p class=" text-xs text-gray-400 mt-5 ">发布时间:{{ $format(info.created_at, 'YYYY-MM-DD') }} <span v-if="title === '政策详情'" class="inline-block ml-8">作者:{{ info.writer }}</span> </p> <p class="text-xs text-gray-400 mt-5">
<div class=" text-sm text-gray-800 text-justify mt-5" v-html="info.content"></div> 发布时间:{{ $format(info.update_at, 'YYYY-MM-DD') }}
<span
v-if="title === '政策详情'"
class="inline-block ml-8"
>作者:{{ info.writer }}</span>
</p>
<div class="text-sm text-gray-800 text-justify mt-5 vhtml" v-html="info.content"></div>
</div> </div>
</template> </template>
...@@ -14,8 +20,8 @@ import NavBar from "@/components/NavBar/index.vue" ...@@ -14,8 +20,8 @@ import NavBar from "@/components/NavBar/index.vue"
import { getDetails, getPolicyDetails } from '@/service/NewsService/index' import { getDetails, getPolicyDetails } from '@/service/NewsService/index'
export default defineComponent({ export default defineComponent({
components:{ NavBar }, components: { NavBar },
setup () { setup() {
let info = ref({}) let info = ref({})
let title = ref('') let title = ref('')
const route = useRoute() const route = useRoute()
...@@ -36,6 +42,6 @@ export default defineComponent({ ...@@ -36,6 +42,6 @@ export default defineComponent({
}) })
</script> </script>
<style scoped> <style lang="less">
</style> </style>
\ No newline at end of file
<template> <template>
<div> <div>
<nav-bar title="政策支持" :style="{ 'background-color':'#F7F7FA'}" :showSearchIcon="true" :path="{path: '/Search', query: {type: 'policy'}}" /> <nav-bar title="政策支持" :style="{ 'background-color':'#F7F7FA'}" :showSearchIcon="true" :path="{path: '/Search', query: {type: 'policy'}}" />
<div class=" mx-5 pt-3 divide-y"> <div class=" mx-5 pt-3">
<van-pull-refresh v-model="loading" @refresh="onRefresh"> <van-pull-refresh class="divide-y" v-model="refreshing" @refresh="onRefresh">
<van-list <van-list
v-model:loading="loading" v-model:loading="loading"
:finished="finished" :finished="finished"
...@@ -89,4 +89,7 @@ export default defineComponent({ ...@@ -89,4 +89,7 @@ export default defineComponent({
<style scoped> <style scoped>
.divide-y {
min-height: calc(100vh - 46px);
}
</style> </style>
\ No newline at end of file
...@@ -32,6 +32,7 @@ export default defineComponent({ ...@@ -32,6 +32,7 @@ export default defineComponent({
showResult.value = visible showResult.value = visible
request(val).then(res => { request(val).then(res => {
lists.value = res.data.items lists.value = res.data.items
lists.value.sort((a: {update_at: number}, b: {update_at: number}) => b.update_at - a.update_at)
if (lists.value.length > 0) { if (lists.value.length > 0) {
isEmpty.value = false isEmpty.value = false
} }
......
...@@ -144,8 +144,12 @@ export default defineComponent({ ...@@ -144,8 +144,12 @@ export default defineComponent({
features: "", features: "",
inst_name: "", inst_name: "",
hotLoanUuid: "", hotLoanUuid: "",
intervalId: NaN,
}; };
}, },
beforeUnmount(){
clearInterval(this.intervalId)
},
mounted() { mounted() {
this.getHotNews(); this.getHotNews();
this.fetchBannerList(); this.fetchBannerList();
...@@ -153,6 +157,7 @@ export default defineComponent({ ...@@ -153,6 +157,7 @@ export default defineComponent({
this.fetchActivityList(); this.fetchActivityList();
this.fetchLoanProductList(); this.fetchLoanProductList();
this.initLiveRoomCard(); this.initLiveRoomCard();
this.intervalId = window.setInterval(this.initLiveRoomCard, 1000)
}, },
methods: { methods: {
handleSeeMoreLive() { handleSeeMoreLive() {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class=" text-center"> <div class=" text-center">
<nav-bar title="消息" :style="{ 'background-color':'#F7F7FA'}"/> <nav-bar title="消息" :style="{ 'background-color':'#F7F7FA'}"/>
<p class=" text-gray-800 text-sm font-semibold mt-7">{{ info.title }}</p> <p class=" text-gray-800 text-sm font-semibold mt-7">{{ info.title }}</p>
<p class=" text-gray-400 text-xs mt-3">{{ $format(info.created_at, 'YYYY-MM-DD HH:mm:ss') }}</p> <p class=" text-gray-400 text-xs mt-3">{{ $format(info.update_at, 'YYYY-MM-DD HH:mm:ss') }}</p>
<p class=" text-gray-800 text-sm text-justify mx-5 mt-6 overflow-hidden break-all">{{ info.content }}</p> <p class=" text-gray-800 text-sm text-justify mx-5 mt-6 overflow-hidden break-all">{{ info.content }}</p>
</div> </div>
</template> </template>
...@@ -19,7 +19,6 @@ export default defineComponent({ ...@@ -19,7 +19,6 @@ export default defineComponent({
const info = ref({} as any) const info = ref({} as any)
info.value = JSON.parse(route.query.info as string) info.value = JSON.parse(route.query.info as string)
return { return {
info info
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment