Commit 5e439375 authored by 王建文's avatar 王建文

首页图片替换

parent fc15b8e6
......@@ -2,8 +2,8 @@
module.exports = {
NODE_ENV: '"production"',
CONFIG_ENV: JSON.stringify(process.env.CONFIG_ENV),
debug: true,
isMobilePlatform: true,
debug: false,
isMobilePlatform: false,
loginPath: '"http://210.12.156.64:9090/oauth/token?client_id=client2&client_secret=secret&grant_type=password&username=appadmin&password=" ',
basePath: '"http://210.12.156.64:9090/r/api/interface?sysName=XCMG_UAT&apiName="',
rootPath: '"http://210.12.156.64:9090/r/api"',
......
......@@ -11,5 +11,5 @@ module.exports = {
ocrPath:'"http://210.12.156.64:9090/r/api"',
fileUploadSvcPath:'"http://210.12.156.64:9090/r/api/app/fileUploadSvc?sysName=XCMG_UAT&apiName="',
appId: '"com.xcmg.app.dev"',
currentVersion: '"3.6.2"'
currentVersion: '"3.6.6"'
}
......@@ -5,7 +5,7 @@
<template>
<input
:value="formatValue" :readonly="disable" type="text"
@blur="onBlur" @click="keyboradShow();onFocus($event)">
@focus="onFocus" @blur="onBlur" @click="keyboradShow">
</template>
<script>
......@@ -15,10 +15,20 @@ export default {
value: {
default: '',
},
check: {
default: '',
},
allCheck: {
default: '',
},
// disable: {
// type: Boolean,
// default: true,
// },
readonly: {
type: Boolean,
default: false,
},
content: {
type: String,
default: '',
......@@ -34,8 +44,8 @@ export default {
},
filter: {
uncurrency (val) {
if (!val) return ''
return Number((val).replace(/,|%/gi, ''))
if (!val) return null
return (Number((val).replace(/,/gi, ''))) === 0 ? 0 : Number((val).replace(/,/gi, ''))
},
},
computed: {
......@@ -43,7 +53,7 @@ export default {
let currency = this.$options.filters['rate']
if (!this.focused) {
if (this.value !== '' && this.value !== null) {
return `${currency(this.value*100)}%`
return `${currency(this.value)}%`
}
} else {
return this.value
......@@ -53,31 +63,35 @@ export default {
methods: {
keyboradShow () {
let vm = this
hlsPopup.showNumberKeyborad({
title: '数字键盘',
keyDown: (text) => {
vm.onInput(text)
},
keyDelete: () => {
vm.onDelete()
},
})
if (!vm.readonly) {
hlsPopup.showNumberKeyborad({
title: '数字键盘',
keyDown: (text) => {
vm.onInput(text)
},
keyDelete: () => {
vm.onDelete()
},
})
}
},
onInput (value) {
// if (this.disable) return
// let uncurrency = this.$options.filter['uncurrency']
// this.newVal = uncurrency(this.value)
this.newVal = this.value
if (this.newVal !=''&&this.newVal.includes('.') && value === '.') {
} else {
if (this.value === '0' || this.value === '0.00') {
this.newVal = ''
this.newVal += ('' + value)
} else {
this.newVal = this.value
if (this.newVal.includes('.') && value === '.') {
} else {
this.newVal += ('' + value)
}
}
this.$emit('input', this.newVal/100)
this.$emit('input', this.newVal)
},
onDelete () {
this.newVal = ''
this.$emit('input', this.newVal/100)
this.$emit('input', this.newVal)
},
// onInput: function (value) {
// if (this.disable) return
......@@ -87,13 +101,12 @@ export default {
// },
onFocus (event) {
// if (this.disable) return
debugger
let vm = this
this.focused = true
let value = (event.target.value).trim()
let uncurrency = this.$options.filter['uncurrency']
let newVal = uncurrency(value)
event.target.value = newVal
let value = event.target.value
event.target.value = ''
event.target.value = value
setTimeout(function () {
let dom = document.querySelector('.content')
let veiwHeight = vm.getClientHeight()
......@@ -108,26 +121,37 @@ export default {
ele.setAttribute('class', 'add-height')
ele.style.height = (fontS - result + 44) + 'px'
ele.style.background = '#fff'
// setTimeout(() => {
dom.appendChild(ele)
// }, 100)
dom.scrollTop = scrollTop + (fontS - result + 44)
// dom.scrollTo(dom.scrollLeft, scrollTop + (256 - result))
}
console.log(veiwHeight, eleHeight, scrollTop, result)
console.log(veiwHeight, eleHeight, scrollTop, result, fontS)
event.target.type = 'text'
event.target.value = newVal
// event.target.focus()
event.target.focus()
}, 0)
},
onBlur (event) {
// if (this.disable) return
if (this.check && this.check < 1000) {
hlsPopup.showLongCenter('设备单价不能小于1000元!')
}
if (this.allCheck && this.allCheck < 1000) {
hlsPopup.showLongCenter('设备总价不能小于1000元!')
}
if (document.querySelector('.add-height')) {
document.querySelector('.content').removeChild(document.querySelector('.add-height'))
}
event.target.type = 'text'
event.target.blur()
this.focused = false
setTimeout(function () {
document.getElementsByTagName('body')[0].style.height = window.innerHeight + 'px'
}, 50)
},
// 取窗口可视范围的高度
getClientHeight () {
var clientHeight = 0
......@@ -138,7 +162,6 @@ export default {
}
return clientHeight
},
// 取窗口滚动条高度
getOffsetTop (obj) {
var tmp = obj.offsetTop
var node = obj.offsetParent
......
This diff is collapsed.
......@@ -228,7 +228,7 @@ export default {
padding: 0 6px;
.card {
background: url("../../assets/homePage/home-card@2x.png") no-repeat;
background: url("../../assets/homePage/home-card1@2x.png") no-repeat;
background-size: 100% 100%;
height: 160px;
......
......@@ -313,7 +313,7 @@ export default {
opacity: 0;
}
#login {
background: url("../assets/login/background@3x.png") no-repeat;
background: url("../assets/login/background1@3x.png") no-repeat;
background-size: 100% 100%;
background-position-x: 0px;
color: #ffffff;
......
......@@ -261,7 +261,7 @@ export default {
#register {
.content {
background: url("../assets/login/register-back@3x.png") no-repeat;
background: url("../assets/login/register-back1@3x.png") no-repeat;
background-size: 100% 100%;
}
......@@ -395,7 +395,6 @@ export default {
}
}
.return {
opacity: 1;
background: #fff;
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment