中建四大屏(首页):时间处理
This commit is contained in:
parent
4456edbaca
commit
7f77e3c196
@ -40,7 +40,7 @@ if (process.env.NODE_ENV == 'development') {
|
|||||||
// axios.defaults.baseURL = 'http://124.71.178.44:100/' // 河南
|
// axios.defaults.baseURL = 'http://124.71.178.44:100/' // 河南
|
||||||
// tag: 本地
|
// tag: 本地
|
||||||
// axios.defaults.baseURL = 'http://192.168.34.174:6023/' // 老大本地
|
// axios.defaults.baseURL = 'http://192.168.34.174:6023/' // 老大本地
|
||||||
axios.defaults.baseURL = 'http://192.168.34.216:6023/' // 邱平毅本地
|
axios.defaults.baseURL = 'http://192.168.34.116:6023/' // 邱平毅本地
|
||||||
// axios.defaults.baseURL = 'http://ue6a4s.natappfree.cc' // 邱平毅vpn本地
|
// axios.defaults.baseURL = 'http://ue6a4s.natappfree.cc' // 邱平毅vpn本地
|
||||||
// axios.defaults.baseURL = 'http://139.9.66.234:6324/' // 河南春笋
|
// axios.defaults.baseURL = 'http://139.9.66.234:6324/' // 河南春笋
|
||||||
// axios.defaults.baseURL ='http://124.71.67.160:8088/' //中建四局线上
|
// axios.defaults.baseURL ='http://124.71.67.160:8088/' //中建四局线上
|
||||||
|
|||||||
@ -45,8 +45,8 @@ export default new Vuex.Store({
|
|||||||
// UPLOADURL:'http://10.0.1.43:6023/upload/image',//测试
|
// UPLOADURL:'http://10.0.1.43:6023/upload/image',//测试
|
||||||
// FILEURL:'http://10.0.1.43:6023/image/',//测试
|
// FILEURL:'http://10.0.1.43:6023/image/',//测试
|
||||||
BASEURL: baseUrl ? baseUrl : window.location.protocol + '//' + window.location.host + '/', //
|
BASEURL: baseUrl ? baseUrl : window.location.protocol + '//' + window.location.host + '/', //
|
||||||
UPLOADURL: window.location.protocol + '//' + window.location.host + '/upload/image', //
|
// UPLOADURL: window.location.protocol + '//' + window.location.host + '/upload/image', //
|
||||||
FILEURL: window.location.protocol + '//' + window.location.host + '/image/', //测试 // tag: 本地测试接口
|
// FILEURL: window.location.protocol + '//' + window.location.host + '/image/', //测试 // tag: 本地测试接口
|
||||||
/* 2022-05-16 */
|
/* 2022-05-16 */
|
||||||
// tag: 部署河南项目时,需要打开这两行代码
|
// tag: 部署河南项目时,需要打开这两行代码
|
||||||
// UPLOADURL: 'http://139.9.66.234:6324/upload/image',
|
// UPLOADURL: 'http://139.9.66.234:6324/upload/image',
|
||||||
@ -56,8 +56,8 @@ export default new Vuex.Store({
|
|||||||
// UPLOADURL: 'http://182.90.224.237:7000/upload/image',
|
// UPLOADURL: 'http://182.90.224.237:7000/upload/image',
|
||||||
// FILEURL: 'http://182.90.224.237:7000/image/',
|
// FILEURL: 'http://182.90.224.237:7000/image/',
|
||||||
// 邱平毅的
|
// 邱平毅的
|
||||||
// UPLOADURL: 'http://192.168.34.216:6023/upload/image',
|
UPLOADURL: 'http://192.168.34.116:6023/upload/image',
|
||||||
// FILEURL: 'http://192.168.34.216:6023/image/',
|
FILEURL: 'http://192.168.34.116:6023/image/',
|
||||||
// UPLOADURL: 'http://124.71.67.160:8088/upload/image',
|
// UPLOADURL: 'http://124.71.67.160:8088/upload/image',
|
||||||
// FILEURL: 'http://124.71.67.160:8088/image/',
|
// FILEURL: 'http://124.71.67.160:8088/image/',
|
||||||
|
|
||||||
|
|||||||
@ -5,12 +5,12 @@
|
|||||||
<div class="between">
|
<div class="between">
|
||||||
<div class="project">中建科创大厦项目</div>
|
<div class="project">中建科创大厦项目</div>
|
||||||
<div class="time-week">
|
<div class="time-week">
|
||||||
<div class="time">15:32:39</div>
|
<div class="time">{{currentTime}}</div>
|
||||||
<div class="week">星期二</div>
|
<div class="week">{{weekday}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="weather-date">
|
<div class="weather-date">
|
||||||
<div class="weather">多云 32℃</div>
|
<div class="weather">多云 32℃</div>
|
||||||
<div class="date">2022-09-09</div>
|
<div class="date">{{monthAndDay}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">中建四局数字建造平台</div>
|
<div class="title">中建四局数字建造平台</div>
|
||||||
@ -38,10 +38,41 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import moment from "moment";
|
||||||
export default {
|
export default {
|
||||||
|
data(){
|
||||||
|
return{
|
||||||
|
currentTime:"",
|
||||||
|
monthAndDay:"",
|
||||||
|
weekday:"",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created(){
|
||||||
|
this.getCurrentDate()
|
||||||
|
this.getCurrentTime()
|
||||||
|
this.getweekday()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleMenu(path) {
|
handleMenu(path) {
|
||||||
this.$router.push(path)
|
this.$router.push(path)
|
||||||
|
},
|
||||||
|
getCurrentTime() {
|
||||||
|
const timer = setInterval(() => {
|
||||||
|
this.currentTime = moment().format("HH:mm:ss");
|
||||||
|
}, 500);
|
||||||
|
// 通过$once来监听定时器,在beforeDestroy钩子可以被清除。
|
||||||
|
this.$once("hook:beforeDestroy", () => {
|
||||||
|
clearInterval(timer);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getCurrentDate() {
|
||||||
|
const currentDate = moment().format("YYYY-MM-DD");
|
||||||
|
this.monthAndDay = currentDate
|
||||||
|
},
|
||||||
|
getweekday(){
|
||||||
|
// date例如:'2022-03-05'
|
||||||
|
var weekArray = new Array("星期日","星期一", "星期二", "星期三", "星期四", "星期五", "星期六")
|
||||||
|
this.weekday = weekArray[new Date(this.monthAndDay).getDay()]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|||||||
@ -15,6 +15,7 @@ function addStyleResource (rule) {
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
|
publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
|
||||||
devServer:{
|
devServer:{
|
||||||
|
// host: 'localhost',
|
||||||
proxy:{
|
proxy:{
|
||||||
'/china' : {
|
'/china' : {
|
||||||
target: "http://122.112.239.62:9000",
|
target: "http://122.112.239.62:9000",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user