时区渲染
This commit is contained in:
@@ -259,7 +259,7 @@ export default defineComponent({
|
||||
setup() {
|
||||
const zhou = ref(0);
|
||||
const time: any = useRoute().query.time;
|
||||
const week = ref<any>(getweek(time));
|
||||
const week = ref<any>(getweek(time, store.state.userinfo.zoneValue));
|
||||
const userid = store.state.userinfo.memberid;
|
||||
console.log(week.value);
|
||||
function getdates(userid: number){
|
||||
@@ -291,7 +291,14 @@ export default defineComponent({
|
||||
const times = ref('');
|
||||
const xs = ref(0);
|
||||
setInterval(()=>{
|
||||
const now = dayjs();
|
||||
/* eslint-disable */
|
||||
const utc = require('dayjs/plugin/utc') // dependent on utc plugin
|
||||
/* eslint-disable */
|
||||
const timezone = require('dayjs/plugin/timezone')
|
||||
dayjs.extend(utc)
|
||||
dayjs.extend(timezone)
|
||||
const days: any = dayjs;
|
||||
const now = days().tz(store.state.userinfo.zoneValue)
|
||||
const xiaoshi = now.hour()
|
||||
const fenzhong = now.minute()
|
||||
top.value = (xiaoshi + (fenzhong / 60)) * 0.63;
|
||||
@@ -300,7 +307,7 @@ export default defineComponent({
|
||||
}, 2000)
|
||||
|
||||
watch(zhou, (value) => {
|
||||
week.value = getweek(time, value);
|
||||
week.value = getweek(time, store.state.userinfo.zoneValue, value);
|
||||
console.log(week.value);
|
||||
getdates(userid)
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user