Commit 03d31774 authored by linxin's avatar linxin

add

parent e79b6e54
......@@ -8,9 +8,9 @@ module.exports = merge(prodEnv, {
debug: true,
isMobilePlatform: false,
loginPath: '"http://180.104.121.66:8088/oauth/token?client_id=client2&client_secret=secret&grant_type=password&username=appadmin&password=" ',
basePath: '"http://180.104.121.66:8088/r/api/interface?sysName=XCMG_UAT&apiName="',
basePath: '"http://180.104.121.66:8088/r/api/interface?sysName=XCMG_DEV&apiName="',
rootPath: '"http://180.104.121.66:8088/r/api"',
filePath: '"http://180.104.121.66:8088/r/api/app/fileViewSvc?sysName=XCMG_UAT&apiName=file_view&"',
filePath: '"http://180.104.121.66:8088/r/api/app/fileViewSvc?sysName=XCMG_DEV&apiName=file_view&"',
ocrPath: '"http://180.104.121.66:8088/r/api"',
appId: '"com.xcmg.app.dev"',
currentVersion: '"1.9.0"',
......
......@@ -95,24 +95,28 @@ export default {
let value = event.target.value
event.target.value = ''
event.target.value = value
setTimeout(function () {
const u = navigator.userAgent
if (u.indexOf('Android') > -1 || u.indexOf('Linux') > -1) { // 安卓手机
window.addEventListener('resize', function () {
// Document 对象的activeElement 属性返回文档中当前获得焦点的元素。
if (document.activeElement.tagName === 'INPUT' || document.activeElement.tagName === 'TEXTAREA') {
console.log('安卓触发', document.activeElement.tagName)
window.setTimeout(function () {
document.activeElement.scrollIntoView(true)
}, 50)
}
})
} else { // ios
setTimeout(() => {
document.getElementsByTagName('body')[0].style.height = '400px'
this.$refs.ttextarea.scrollIntoView(false)
}, 50)
let dom = document.querySelector('.content')
let veiwHeight = vm.getClientHeight()
let eleHeight = vm.getOffsetTop(event.target)
let scrollTop = Math.floor(dom.scrollTop)
let result = Math.floor(veiwHeight - (eleHeight - scrollTop))
// vm.$nextTick(function () {
// let r = document.querySelector('.keyboard-backdrop').childNodes
// })
if (result >= 256) {
} else {
let ele = document.createElement('div')
ele.setAttribute('class', 'add-height')
ele.style.height = (256 - result) + 'px'
ele.style.background = '#fff'
// setTimeout(() => {
dom.appendChild(ele)
// }, 100)
dom.scrollTo(dom.scrollLeft, scrollTop + (256 - result))
}
console.log(veiwHeight, eleHeight, scrollTop, result)
event.target.type = 'text'
event.target.focus()
}, 0)
......@@ -125,6 +129,9 @@ export default {
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
......
......@@ -1001,7 +1001,8 @@ export default {
const u = navigator.userAgent
const isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)
if (isiOS) {
cordova.InAppBrowser.open(authUrl, '_blank', 'location=yes')
let ref = cordova.InAppBrowser.open(authUrl, '_blank', 'location=yes')
ref.addEventListener('exit', vm.userQuery())
console.log('ios')
} else {
vm.$router.push({
......
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