中建四大屏(首页):时间处理

This commit is contained in:
骆乐 2022-10-26 10:56:31 +08:00
parent 4456edbaca
commit 7f77e3c196
5 changed files with 40 additions and 8 deletions

BIN
dist.zip

Binary file not shown.

View File

@ -40,7 +40,7 @@ if (process.env.NODE_ENV == 'development') {
// axios.defaults.baseURL = 'http://124.71.178.44:100/' // 河南
// tag: 本地
// 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://139.9.66.234:6324/' // 河南春笋
// axios.defaults.baseURL ='http://124.71.67.160:8088/' //中建四局线上

View File

@ -45,8 +45,8 @@ export default new Vuex.Store({
// UPLOADURL:'http://10.0.1.43:6023/upload/image',//测试
// FILEURL:'http://10.0.1.43:6023/image/',//测试
BASEURL: baseUrl ? baseUrl : window.location.protocol + '//' + window.location.host + '/', //
UPLOADURL: window.location.protocol + '//' + window.location.host + '/upload/image', //
FILEURL: window.location.protocol + '//' + window.location.host + '/image/', //测试 // tag: 本地测试接口
// UPLOADURL: window.location.protocol + '//' + window.location.host + '/upload/image', //
// FILEURL: window.location.protocol + '//' + window.location.host + '/image/', //测试 // tag: 本地测试接口
/* 2022-05-16 */
// tag: 部署河南项目时,需要打开这两行代码
// 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',
// FILEURL: 'http://182.90.224.237:7000/image/',
// 邱平毅的
// UPLOADURL: 'http://192.168.34.216:6023/upload/image',
// FILEURL: 'http://192.168.34.216:6023/image/',
UPLOADURL: 'http://192.168.34.116:6023/upload/image',
FILEURL: 'http://192.168.34.116:6023/image/',
// UPLOADURL: 'http://124.71.67.160:8088/upload/image',
// FILEURL: 'http://124.71.67.160:8088/image/',

View File

@ -5,12 +5,12 @@
<div class="between">
<div class="project">中建科创大厦项目</div>
<div class="time-week">
<div class="time">15:32:39</div>
<div class="week">星期二</div>
<div class="time">{{currentTime}}</div>
<div class="week">{{weekday}}</div>
</div>
<div class="weather-date">
<div class="weather">多云 32</div>
<div class="date">2022-09-09</div>
<div class="date">{{monthAndDay}}</div>
</div>
</div>
<div class="title">中建四局数字建造平台</div>
@ -38,10 +38,41 @@
</template>
<script>
import moment from "moment";
export default {
data(){
return{
currentTime:"",
monthAndDay:"",
weekday:"",
}
},
created(){
this.getCurrentDate()
this.getCurrentTime()
this.getweekday()
},
methods: {
handleMenu(path) {
this.$router.push(path)
},
getCurrentTime() {
const timer = setInterval(() => {
this.currentTime = moment().format("HH:mm:ss");
}, 500);
// $oncebeforeDestroy
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: {

View File

@ -15,6 +15,7 @@ function addStyleResource (rule) {
module.exports = {
publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
devServer:{
// host: 'localhost',
proxy:{
'/china' : {
target: "http://122.112.239.62:9000",