刷新方法测试

This commit is contained in:
na.guo
2020-08-07 11:21:25 +08:00
parent 52f563bd0c
commit df5ded59c8
3 changed files with 43 additions and 20 deletions

BIN
public/images/refresh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 496 B

View File

@@ -0,0 +1,22 @@
export default {
refreshImg() {
if (window.WebViewJavascriptBridge) {
EWebBridge.webCallAppInJs('webview_right_button', {
btns: [
{
img: 'images/refresh.png',
route: {
flag: '',
extra: {}
}
}
]
})
}
},
refreshCallBack(data) {
if (data.trigger == 'right_button_click') {
location.reload()
}
}
}

View File

@@ -56,7 +56,7 @@
import Selectors from '@/views/ebiz/institutionalPerform/InstitutionalManpower/components/Selectors'
import util from '@/views/ebiz/institutionalPerform/InstitutionalManpower/components/js/util'
import { branchOfficeApi } from '@/api/ebiz/branchOffice/branchOffice'
import refreshLogo from '@/assets/images/ebiz/refresh.png'
import refresh from '@/assets/js/utils/refresh'
import { Tabs, Tab } from 'vant'
export default {
name: 'InstitutionalManpower',
@@ -74,8 +74,6 @@ export default {
items: [],
bzbfTotol: 0,
queryColumns: ['活动人力', '合格人力', '桂冠人力', '新增人力'],
refreshLogo,
active: 1,
// 当前的机构编码
curCode: '',
@@ -92,7 +90,7 @@ export default {
this.items=[]
this.queryColumns.forEach(() => {
this.items.push('0.00')
this.items.push('0')
})
} else {
let sum1 = 0
@@ -214,22 +212,25 @@ export default {
},
created() {
if (process.env.NODE_ENV != 'development') {
setTimeout(() => {
// eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('webview_right_button', {
btns: [
{
img: this.$assetsUrl + 'images/ebiz/refresh.png',
route: {
flag: '',
extra: {
url: location.origin + '/#/institutionalPerform/BranchOffice'
}
}
}
]
})
}, 1000)
refresh.refreshImg()
window.appCallBack=refresh.refreshCallBack()
// setTimeout(() => {
// // eslint-disable-next-line no-undef
// EWebBridge.webCallAppInJs('webview_right_button', {
// btns: [
// {
// img: 'images/refresh.png',
// route: {
// flag: '',
// extra: {
// url: location.origin + '/#/institutionalPerform/BranchOffice'
// }
// }
// }
// ]
// })
// }, 1000)
}
},
mounted() {