Commit fe9c36a7 authored by Nature's avatar Nature

入口index调整

parent a2337824
This diff is collapsed.
This diff is collapsed.
...@@ -7,6 +7,9 @@ const CancelToken = axios.CancelToken ...@@ -7,6 +7,9 @@ const CancelToken = axios.CancelToken
// 请求拦截器 // 请求拦截器
axios.interceptors.request.use(config => { axios.interceptors.request.use(config => {
// 发起请求时,取消掉当前正在进行的相同请求 // 发起请求时,取消掉当前正在进行的相同请求
config.cancelToken = new CancelToken(c => {
cancel = c
})
if (promiseArr[config.url]) { if (promiseArr[config.url]) {
promiseArr[config.url]('操作取消') promiseArr[config.url]('操作取消')
promiseArr[config.url] = cancel promiseArr[config.url] = cancel
...@@ -104,9 +107,6 @@ export function get (url) { ...@@ -104,9 +107,6 @@ export function get (url) {
url, url,
headers: headers, headers: headers,
params: param, params: param,
cancelToken: new CancelToken(c => {
cancel = c
}),
}).then(res => { }).then(res => {
resolve(res) resolve(res)
}).catch(err => { }).catch(err => {
...@@ -141,9 +141,6 @@ export function post (url, param) { ...@@ -141,9 +141,6 @@ export function post (url, param) {
headers: headers, headers: headers,
url, url,
data: param, data: param,
cancelToken: new CancelToken(c => {
cancel = c
}),
}).then(res => { }).then(res => {
resolve(res) resolve(res)
}).catch(err => { }).catch(err => {
......
...@@ -93,11 +93,8 @@ export default { ...@@ -93,11 +93,8 @@ export default {
}, },
start (e) { start (e) {
if (e.target.readOnly) return if (e.target.readOnly) return
if (e.target.nodeName === 'INPUT' || e.target.nodeName === 'TEXTAREA' || e.target.nodeName === 'BUTTON') { if (e.target.nodeName === 'INPUT' || e.target.nodeName === 'TEXTAREA' || e.target.nodeName === 'BUTTON') return
e.target.focus()
} else {
this.showActivated = 'activated' this.showActivated = 'activated'
}
}, },
end (e) { end (e) {
// TODO: android4上貌似触发touchmove事件之后不会再触发touchend事件,暂未对该情况做兼容处理 // TODO: android4上貌似触发touchmove事件之后不会再触发touchend事件,暂未对该情况做兼容处理
......
...@@ -30,6 +30,12 @@ import componentInstall from './components/component' ...@@ -30,6 +30,12 @@ import componentInstall from './components/component'
import appStyle from '../packages/common/styles/app.core.less' import appStyle from '../packages/common/styles/app.core.less'
import hlsPopup from '../packages/common/scripts/hlsPopup'
import hlsUtil from '../packages/common/scripts/hlsUtil'
import { post, get } from '../packages/common/scripts/hlsHttp'
import directives from '../packages/common/scripts/directives'
import filter from '../packages/common/scripts/filter'
const version = '0.0.1' const version = '0.0.1'
export { export {
...@@ -62,4 +68,10 @@ export { ...@@ -62,4 +68,10 @@ export {
NumberKeyboardPlugin, NumberKeyboardPlugin,
version, version,
componentInstall, componentInstall,
hlsPopup,
hlsUtil,
post,
get,
directives,
filter,
} }
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