diff --git a/common/style/layout.styl b/common/style/layout.styl index 01662da..8e70efb 100644 --- a/common/style/layout.styl +++ b/common/style/layout.styl @@ -13,39 +13,39 @@ uni-button:after { border: none; } -@font-face { - font-family: "YouSheBiaoTiHei"; - src: url('./common/style/font/YouSheBiaoTiHei.ttf') format('truetype'); -} -@font-face { - font-family: "SourceHanSansCN-Bold"; - src: url('./common/style/font/SourceHanSansCN-Bold.otf') format('truetype'); -} -@font-face { - font-family: "SourceHanSansCN-Regular"; - src: url('./common/style/font/SourceHanSansCN-Regular.otf') format('truetype'); -} -@font-face { - font-family: "SourceHanSansCN-Medium"; - src: url('./common/style/font/SourceHanSansCN-Medium.otf') format('truetype'); -} -@font-face { - font-family: "iconfont"; - src: url('./common/style/iconfont/iconfont.woff2') format('woff2'), - url('./common/style/iconfont/iconfont.woff') format('woff'), - url('./common/style/iconfont/iconfont.ttf') format('truetype'); -} -.iconfont { - font-family: "iconfont" !important; - font-size: 16px; - font-style: normal; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} +// @font-face { +// font-family: "YouSheBiaoTiHei"; +// src: url('./common/style/font/YouSheBiaoTiHei.ttf') format('truetype'); +// } +// @font-face { +// font-family: "SourceHanSansCN-Bold"; +// src: url('./common/style/font/SourceHanSansCN-Bold.otf') format('truetype'); +// } +// @font-face { +// font-family: "SourceHanSansCN-Regular"; +// src: url('./common/style/font/SourceHanSansCN-Regular.otf') format('truetype'); +// } +// @font-face { +// font-family: "SourceHanSansCN-Medium"; +// src: url('./common/style/font/SourceHanSansCN-Medium.otf') format('truetype'); +// } +// @font-face { +// font-family: "iconfont"; +// src: url('./common/style/iconfont/iconfont.woff2') format('woff2'), +// url('./common/style/iconfont/iconfont.woff') format('woff'), +// url('./common/style/iconfont/iconfont.ttf') format('truetype'); +// } +// .iconfont { +// font-family: "iconfont" !important; +// font-size: 16px; +// font-style: normal; +// -webkit-font-smoothing: antialiased; +// -moz-osx-font-smoothing: grayscale; +// } -/** 内容 */ -.container { - width: 100%; - height: 100%; - overflow: hidden; -} \ No newline at end of file +// /** 内容 */ +// .container { +// width: 100%; +// height: 100%; +// overflow: hidden; +// } \ No newline at end of file diff --git a/common/style/reset.css b/common/style/reset.css index eb043ea..77b268f 100644 --- a/common/style/reset.css +++ b/common/style/reset.css @@ -41,7 +41,7 @@ input[type="button"], input[type="submit"], input[type="search"], input[type="re text-overflow: ellipsis; white-space: nowrap; } -.flexcol { +/* .flexcol { flex-direction: column; } .flexstart { @@ -152,4 +152,4 @@ input[type="button"], input[type="submit"], input[type="search"], input[type="re } .pdt0 { padding-top: 0 !important -} \ No newline at end of file +} */ \ No newline at end of file diff --git a/components/MyHeader.vue b/components/MyHeader.vue index 8336edc..f32ade9 100644 --- a/components/MyHeader.vue +++ b/components/MyHeader.vue @@ -1,6 +1,13 @@ @@ -10,15 +17,43 @@ name:"MyHeader", data() { return { - + timer: null, + time: '', + year: '', + date: '', + week: '' }; }, + mounted () { + this.timer = window.setInterval(this.updateTime, 1000) + }, methods: { + updateTime () { + let cd = new Date() + let year = cd.getFullYear() + let month = cd.getMonth() + 1 < 10 ? '0' + (cd.getMonth() + 1) : cd.getMonth() + 1 + let date = cd.getDate() < 10 ? '0' + cd.getDate() : cd.getDate() + let hh = cd.getHours() < 10 ? '0' + cd.getHours() : cd.getHours() + let mm = cd.getMinutes() < 10 ? '0' + cd.getMinutes() : cd.getMinutes() + let ss = cd.getSeconds() < 10 ? '0' + cd.getSeconds() : cd.getSeconds() + var weekday = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'] + let myddy = new Date().getDay() + let week = weekday[myddy] + this.time = `${hh}:${mm}:${ss}` + this.year = `${year}` + this.date = `${month}.${date}` + this.week = `${week}` + }, toBack () { uni.redirectTo({ url: '/pages/setup' }) } + }, + beforeDestroy () { + this.$once('hook:beforeDestroy', () => { + clearInterval(this.timer) + }) } } @@ -29,19 +64,19 @@ left 0 top 0 width 100% - height 181px + height 96px background center / 100% url('../static/image/header_bg.png') no-repeat .header-title width: 50%; height: 100%; - padding-top 26px - font-size: 60px; + padding-top: 14px; + font-size: 30px; font-family: 'YouSheBiaoTiHei'; font-weight: 400; color: transparent; - line-height: 44px; + line-height: 24px; opacity: 0.89; - letter-spacing 10px + letter-spacing 5px background: linear-gradient(0deg, #AAD0F6 0%, #D7E7F5 53.3154296875%, #E0EAF6 100%); filter: drop-shadow(#092F6D 1px 4px 1px); -webkit-background-clip: text; @@ -50,8 +85,8 @@ margin: 0 auto; .exit_btn position absolute - left 15px - top 29px + left 10px + top 10px height 28px width 28px line-height 28px @@ -59,4 +94,25 @@ color #aecaf5 text-align: center; cursor: pointer; +.data_box + position absolute + right 10px + top 10px + display: flex + justify-content: flex-end +.time + font-size: 28px; + line-height: 28px; + font-family: 'YouSheBiaoTiHei'; + color: #AECAF5; +.date_item + margin-left 5px +.year + font-size: 12px; + font-family: 'YouSheBiaoTiHei'; + color: #AECAF5; + line-height: 21px; + opacity: 0.7; + &:last-child + line-height: 0px \ No newline at end of file diff --git a/manifest.json b/manifest.json index 1bd8250..9ae4591 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { - "name" : "车间物流监控", + "name" : "看板大屏", "appid" : "__UNI__86DFCBB", - "description" : "上电科车间物流监控看板", + "description" : "看板大屏", "versionName" : "1.0.0", "versionCode" : 100, "transformPx" : false, @@ -22,7 +22,8 @@ /* 模块配置 */ "modules" : { "Barcode" : {}, - "Camera" : {} + "Camera" : {}, + "Webview-x5" : {} }, /* 应用发布信息 */ "distribute" : { diff --git a/pages.json b/pages.json index 1cbd1dc..ad9cfb5 100644 --- a/pages.json +++ b/pages.json @@ -1,12 +1,30 @@ { "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages + // { + // "path" : "pages/setup", + // "style" : + // { + // "navigationStyle": "custom" + // } + + // } + // ,{ + // "path" : "pages/screen", + // "style" : + // { + // "navigationStyle": "custom" + // } + + // }, { - "path" : "pages/setup", - "style": { - "navigationStyle": "custom" + "path" : "pages/index", + "style" : + { + "navigationStyle": "custom" } - } - ,{ + + } + ,{ "path" : "pages/home", "style" : { diff --git a/pages/home.vue b/pages/home.vue index 8090e70..fc31846 100644 --- a/pages/home.vue +++ b/pages/home.vue @@ -1,19 +1,18 @@ diff --git a/pages/index.vue b/pages/index.vue new file mode 100644 index 0000000..05b753b --- /dev/null +++ b/pages/index.vue @@ -0,0 +1,64 @@ + + + + + diff --git a/pages/screen.vue b/pages/screen.vue new file mode 100644 index 0000000..5a04950 --- /dev/null +++ b/pages/screen.vue @@ -0,0 +1,209 @@ + + + + + diff --git a/pages/setup.vue b/pages/setup.vue index ffd73e4..bb59606 100644 --- a/pages/setup.vue +++ b/pages/setup.vue @@ -39,7 +39,7 @@ } this.$store.dispatch('setConfig', obj) uni.redirectTo({ - url: '/pages/home' + url: '/pages/screen' }) } } diff --git a/static/image/bg-button.png b/static/image/bg-button.png new file mode 100644 index 0000000..359b9cf Binary files /dev/null and b/static/image/bg-button.png differ diff --git a/static/image/bg-center.png b/static/image/bg-center.png new file mode 100644 index 0000000..0f80223 Binary files /dev/null and b/static/image/bg-center.png differ diff --git a/static/image/bg-left.png b/static/image/bg-left.png new file mode 100644 index 0000000..5547540 Binary files /dev/null and b/static/image/bg-left.png differ diff --git a/static/image/bg-right.png b/static/image/bg-right.png new file mode 100644 index 0000000..63f83c7 Binary files /dev/null and b/static/image/bg-right.png differ diff --git a/vuex/modules/user.js b/vuex/modules/user.js index 62e3d89..114ea88 100644 --- a/vuex/modules/user.js +++ b/vuex/modules/user.js @@ -1,9 +1,9 @@ import * as types from '../types' -const baseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.81.162:8011' : 'http://192.168.81.162:8011' +const baseUrl = process.env.NODE_ENV === 'development' ? 'http://10.44.101.112:8081/#/setup' : 'http://10.44.101.112:8081/#/setup' const state = { baseUrl: uni.getStorageSync('baseUrl') || baseUrl, - setTime: uni.getStorageSync('setTime') || 5000, + setTime: uni.getStorageSync('setTime') || 50000, loginName: uni.getStorageSync('loginName') ? uni.getStorageSync('loginName') : '', userInfo: uni.getStorageSync('userInfo') ? uni.getStorageSync('userInfo') : '', saveToken: uni.getStorageSync('saveToken') || ''