优化页面
This commit is contained in:
10
components/DifferenceArray.js
Normal file
10
components/DifferenceArray.js
Normal file
@@ -0,0 +1,10 @@
|
||||
function DifferenceArray(targetTimestamp) {
|
||||
const now = Date.now() / 1000; // 获取当前时间戳(秒)
|
||||
|
||||
// 计算时间差(秒)并转换为小时
|
||||
const diffHours = Math.ceil((targetTimestamp - now) / 3600);
|
||||
|
||||
// 生成包含小时数的数组
|
||||
return Array.from({ length: diffHours }, (_, i) => String(i + 1));
|
||||
}
|
||||
export default DifferenceArray;
|
||||
@@ -7,6 +7,6 @@ function formatDate(timestamp) {
|
||||
const minute = String(date.getMinutes()).padStart(2, '0');
|
||||
const second = String(date.getSeconds()).padStart(2, '0');
|
||||
|
||||
return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
|
||||
return `${year}-${month}-${day} ${hour}:${minute}`;
|
||||
}
|
||||
export default formatDate;
|
||||
@@ -3,8 +3,8 @@ export default function request(urldata) {
|
||||
const { url, data, method, header, userInfo } = urldata;
|
||||
// const baseUrl = "http://49.235.115.212:8086/"+ url;
|
||||
// const baseUrl = "https://pk.zhukeping.com/"+ url;
|
||||
const baseUrl = "http://120.26.251.180:8086/"+ url;
|
||||
// const baseUrl = "http://192.168.0.218:8086/"+ url;
|
||||
// const baseUrl = "http://120.26.251.180:8086/"+ url;
|
||||
const baseUrl = "http://192.168.0.218:8086/"+ url;
|
||||
if (userInfo) {
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.getStorage({
|
||||
|
||||
@@ -31,9 +31,25 @@
|
||||
<script setup>
|
||||
import NewAddedPk from "../../pages/NewAddedPk/NewAddedPk.vue";
|
||||
import VerifyLogin from "../VerifyLogin.js";
|
||||
import { getCurrentInstance, defineProps, onMounted, reactive, ref } from "vue";
|
||||
import { getCurrentInstance, defineProps, onMounted,onUnmounted,reactive, ref } from "vue";
|
||||
import { TUIStore,StoreName } from '@tencentcloud/chat-uikit-engine';
|
||||
let showMiddleButton = ref(false);
|
||||
|
||||
const conversationList = ref([]);
|
||||
onMounted(() => {
|
||||
TUIStore.watch(StoreName.CONV, {
|
||||
conversationList: onConversationListUpdated,
|
||||
});
|
||||
});
|
||||
//conversationList[0].unreadCount
|
||||
onUnmounted(() => {
|
||||
TUIStore.unwatch(StoreName.CONV, {
|
||||
conversationList: onConversationListUpdated,
|
||||
});
|
||||
});
|
||||
function onConversationListUpdated(list) {
|
||||
conversationList.value = list;
|
||||
console.log("conversationList", list);
|
||||
}
|
||||
const props = defineProps({
|
||||
tabIndex: Number,
|
||||
});
|
||||
|
||||
@@ -73,7 +73,7 @@ export default {
|
||||
margin: 0 39rpx 0 41rpx;
|
||||
}
|
||||
.MakeAppointment {
|
||||
margin-right: 280rpx;
|
||||
margin-right: 270rpx;
|
||||
}
|
||||
.Screening {
|
||||
margin-right: 20rpx;
|
||||
|
||||
Reference in New Issue
Block a user