Commit 855e55d7 authored by Zhang Xiaojie's avatar Zhang Xiaojie

Merge branch 'dev' of gitlab.33.cn:chenqikuai/fns_front_2 into dev

parents 93b04b06 0a1f15e3
...@@ -20,6 +20,15 @@ ...@@ -20,6 +20,15 @@
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
<!-- <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>
(function () {
var script = document.createElement('script');
script.src = "//cdn.jsdelivr.net/npm/eruda";
document.body.appendChild(script);
script.onload = function () { eruda.init() }
})();
</script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -11,7 +11,7 @@ import { ref } from "@vue/reactivity"; ...@@ -11,7 +11,7 @@ import { ref } from "@vue/reactivity";
import { connectionState } from "./store/connectionStore"; import { connectionState } from "./store/connectionStore";
import FzmMessageProtocol from "@/utils/fzm-message-protocol"; import FzmMessageProtocol from "@/utils/fzm-message-protocol";
import { generateToken } from "./utils/generateToken/generate-token"; import { generateToken } from "./utils/generateToken/generate-token";
import { defineComponent, onBeforeUnmount, onMounted, watch } from "vue"; import { defineComponent, onBeforeMount, onBeforeUnmount, onMounted, watch } from "vue";
import decodeChatMessage from "./utils/fzm-message-protocol-chat/decodeChatMessage"; import decodeChatMessage from "./utils/fzm-message-protocol-chat/decodeChatMessage";
import ChatDBService from "@/db/ChatDBService" import ChatDBService from "@/db/ChatDBService"
import { getMasterIdFromDisplayMsg, getTargetIdFromDisplayMsg } from "./utils/chatutils"; import { getMasterIdFromDisplayMsg, getTargetIdFromDisplayMsg } from "./utils/chatutils";
...@@ -25,11 +25,19 @@ import router from "./router"; ...@@ -25,11 +25,19 @@ import router from "./router";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import Bridge from '@/utils/jsBridge2' import Bridge from '@/utils/jsBridge2'
import { chatAuthCheck } from "./utils/authCheck"; import { chatAuthCheck } from "./utils/authCheck";
import { notchHeight } from "./store/AppStore";
export default defineComponent({ export default defineComponent({
setup() { setup() {
onBeforeMount(() => {
new Bridge().getNotchHeight(null, (height: any) => {
height = Number(height)
notchHeight.value = height;
})
})
const route = useRoute(); const route = useRoute();
const initError = ref(false); const initError = ref(false);
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class=" flex justify-between py-5 border-b border-gray-200" <div class=" flex justify-between py-5 border-b border-gray-200"
@click="$router.push({path: 'msgDetail', query: { info: JSON.stringify(info) }})"> @click="$router.push({path: 'msgDetail', query: { info: JSON.stringify(info) }})">
<span class=" text-sm text-left font-semibold" :class="isRead?'text-gray-400':'text-gray-800'">{{ info.title }}</span> <span class=" text-sm text-left font-semibold" :class="isRead?'text-gray-400':'text-gray-800'">{{ info.title }}</span>
<span class=" text-sm text-right text-gray-400">{{ $format(info.created_at, 'YYYY-MM-DD HH:mm:ss') }}</span> <span class=" text-sm text-right text-gray-400">{{ $format(info.update_at, 'YYYY-MM-DD HH:mm:ss') }}</span>
</div> </div>
</div> </div>
</template> </template>
......
<template> <template>
<div class="navbar w-full" style="z-index: 300"> <div class="navbar w-full" style="z-index: 300" v-if="!bangsBlock">
<div <div
class="h-full theBar flex items-end px-5 justify-center relative" class="h-full theBar flex items-end px-5 justify-center relative h46"
style="background:#F7F7FA; padding-bottom: 8px;" style="background:#F7F7FA; padding-bottom: 8px;"
:class="isBangs ? 'h72' : 'h46'" :style="[isBangs ? 'height:' + `${46 + heightOfNotch}px` : '']"
:style="[(isBangs && bangsBlock) ? 'height: calc(72px - 24px - 8px)' : '']"
v-bind="$attrs" v-bind="$attrs"
v-if="(!isBangs && !bangsBlock || isBangs)"
>
<div
class="relative w-full flex items-center justify-center"
v-if="(!isBangs && !bangsBlock) || (isBangs)"
> >
<div class="relative w-full flex items-center justify-center">
<icon <icon
v-if="!bangsBlock && showBackIcon" v-if="showBackIcon"
@click="$router.go(-1)" @click="$router.go(-1)"
name="icon-fanhui" name="icon-fanhui"
class="absolute left-0" class="absolute left-0"
...@@ -40,13 +35,19 @@ ...@@ -40,13 +35,19 @@
</div> </div>
</div> </div>
<div <div
:class="isBangs ? 'h72' : 'h46'" class="h46"
v-if="!isBangs && !bangsBlock && occupyPosition || (isBangs && !bangsBlock)" :style="[isBangs ? 'height:' + `${46 + heightOfNotch}px` : '']"
v-if="occupyPosition"
></div> ></div>
<div style="height: calc(72px - 24px - 8px)" v-if="isBangs && bangsBlock"></div> </div>
<div v-else>
<div :style="{
'height': heightOfNotch + 'px'
}" v-if="isBangs"></div>
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import { notchHeight } from "@/store/AppStore";
import { defineComponent } from "vue"; import { defineComponent } from "vue";
import Icon from "../common/Icon.vue"; import Icon from "../common/Icon.vue";
export default defineComponent({ export default defineComponent({
...@@ -91,15 +92,15 @@ export default defineComponent({ ...@@ -91,15 +92,15 @@ export default defineComponent({
computed: { computed: {
isBangs() { isBangs() {
return true return true
},
heightOfNotch() { // 刘海屏的刘海高度 单位px
return notchHeight.value;
} }
} }
}); });
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.navbar { .navbar {
.h72 {
height: 72px;
}
.h46 { .h46 {
height: 46px; height: 46px;
} }
...@@ -109,11 +110,8 @@ export default defineComponent({ ...@@ -109,11 +110,8 @@ export default defineComponent({
left: 0; left: 0;
right: 0; right: 0;
z-index: 300; z-index: 300;
// height: 72px;
}
.some-block {
// height: 72px;
} }
.title { .title {
font-size: 16px; font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class=" text-base text-gray-800 font-semibold pt-5 news-title">{{ info.title }}</div> <div class=" text-base text-gray-800 font-semibold pt-5 news-title">{{ info.title }}</div>
<!-- <p class=" text-xs text-gray-400 pt-5">{{ info.desc }}</p> --> <!-- <p class=" text-xs text-gray-400 pt-5">{{ info.desc }}</p> -->
<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 class=" text-xs text-gray-400 py-5 border-b border-red border-solid">发布时间:{{ $format(info.created_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>
</template> </template>
......
import { ref } from '@vue/runtime-dom'
export const notchHeight = ref(0)
...@@ -541,5 +541,14 @@ jsBridge.prototype.bridge_live = function (params, success) { ...@@ -541,5 +541,14 @@ jsBridge.prototype.bridge_live = function (params, success) {
} }
} }
/* 获取刘海高度 */
jsBridge.prototype.getNotchHeight = function (params, success) {
if (this.curApp == ANDROID) {
dsBridge.call('getNotchHeight', params, success)
}
else if (this.curApp == IOS) {
this.callHandler('getNotchHeight', params, success)
}
}
export default jsBridge; export default jsBridge;
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
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-app-blue 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.created_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>
</template> </template>
......
...@@ -160,6 +160,7 @@ export default defineComponent({ ...@@ -160,6 +160,7 @@ export default defineComponent({
const ret = await queryNotifyList({ notify_type: "1" }); const ret = await queryNotifyList({ notify_type: "1" });
if (ret.code === 200) { if (ret.code === 200) {
const list = ret.data.items; const list = ret.data.items;
list.sort((a, b) => b.update_at - a.update_at)
this.notifyList = list; this.notifyList = list;
} }
}, },
......
...@@ -22,6 +22,7 @@ export default defineComponent({ ...@@ -22,6 +22,7 @@ export default defineComponent({
const notifyList = () => { const notifyList = () => {
getNotifyList(type).then(res => { getNotifyList(type).then(res => {
list.value = res.data.items list.value = res.data.items
list.value.sort((a: {update_at: number}, b: {update_at: number}) => b.update_at - a.update_at)
}) })
} }
notifyList() notifyList()
......
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