问题件详情页面分享按钮测试

This commit is contained in:
mengxiaolong
2020-08-03 10:05:39 +08:00
parent 771deea551
commit 889edfe289
2 changed files with 39 additions and 35 deletions

View File

@@ -105,7 +105,6 @@ import { getBankList, uploadImg } from '@/api/ebiz/sale/sale'
import { getQuestionDetail } from '@/api/ebiz/questions' import { getQuestionDetail } from '@/api/ebiz/questions'
import BankCardScan from '@/components/ebiz/sale/BankCardScan' import BankCardScan from '@/components/ebiz/sale/BankCardScan'
import ShortMessage from '@/components/ebiz/question/ShortMessage.vue' import ShortMessage from '@/components/ebiz/question/ShortMessage.vue'
import shareIcon from '@/assets/images/share@3x.png'
export default { export default {
name: 'QuestionsDetail', name: 'QuestionsDetail',
components: { components: {
@@ -166,11 +165,11 @@ export default {
async autograph() { async autograph() {
// eslint-disable-next-line // eslint-disable-next-line
const result = await EWebBridge.webCallAppInJs('ca_sign', { const result = await EWebBridge.webCallAppInJs('ca_sign', {
name: 'likai', name: '李凯',
type: '1', type: '1',
number: '142727199301063550', number: '142727199301063550',
keyword: '签字签字', keyword: '签字签字',
pageNo: '4', pageNo: '1',
index: 1, index: 1,
offset: 20, offset: 20,
pos: 3 pos: 3
@@ -194,27 +193,19 @@ export default {
}) })
).content ).content
}, },
async setTopRightBtn() { appCallBack(data) {
// eslint-disable-next-line if (data.trigger == 'right_button_click') {
await EWebBridge.webCallAppInJs('webview_right_button', { let token = window.localStorage.getItem('token')
btns: [{ img: shareIcon }] // eslint-disable-next-line no-undef
}).catch(() => {}) EWebBridge.webCallAppInJs('bridge', {
console.log(123123123) flag: 'share',
}, extra: {
shareConfig() { title: '国富人寿欢迎您!',
window.appCallBack = async ({ trigger }) => { content: this.shareContent,
if (trigger === 'right_button_click') url: `${location.origin}/#/manpower/increaseStaffTools/PdfShare?&token=${token}`,
// eslint-disable-next-line img: this.$assetsUrl + 'images/logo.png'
await EWebBridge.webCallAppInJs('bridge', { }
flag: 'share', })
extra: {
title: '测测试试',
content: '测试测试',
shareType: 0,
img: '',
url: window.location.href
}
})
} }
}, },
modeChange(mode) { modeChange(mode) {
@@ -242,12 +233,6 @@ export default {
console.log(type, data) console.log(type, data)
}, },
async getQuestionDetail() { async getQuestionDetail() {
// if (!this.$route.query.id)
// // eslint-disable-next-line
// return EWebBridge.webCallAppInJs('goBack',{
// refresh: '0',
// index: '-1'
// })
const rs = await getQuestionDetail({ const rs = await getQuestionDetail({
id: this.$route.query.id id: this.$route.query.id
}) })
@@ -256,10 +241,18 @@ export default {
}, },
async created() { async created() {
this.issueType = this.$route.query.type this.issueType = this.$route.query.type
this.setTopRightBtn()
this.shareConfig()
this.getBankList() this.getBankList()
this.getQuestionDetail() this.getQuestionDetail()
},
mounted() {
window.EWebBridge.webCallAppInJs('webview_right_button', {
btns: [
{
img: this.$assetsUrl + 'images/share@3x.png'
}
]
})
window['appCallBack'] = this.appCallBack
} }
} }
</script> </script>

View File

@@ -3,7 +3,7 @@
<div class="header"> <div class="header">
<van-search show-action @cancel="searchCancel" v-model="searchValue" placeholder="请输入投保人/被保人/险种名称/问题件类型关键字"> <van-search show-action @cancel="searchCancel" v-model="searchValue" placeholder="请输入投保人/被保人/险种名称/问题件类型关键字">
<template #action> <template #action>
<div>搜索</div> <div @click="searchProblems">搜索</div>
</template> </template>
</van-search> </van-search>
<van-tabs v-model="active" @change="changeProblemList"> <van-tabs v-model="active" @change="changeProblemList">
@@ -127,7 +127,8 @@ export default {
processedList: [], processedList: [],
searchValue: '', searchValue: '',
currentPage: 1, currentPage: 1,
pageSize: 10 pageSize: 10,
searchCurrentPage: 1
} }
}, },
methods: { methods: {
@@ -150,7 +151,8 @@ export default {
type: this.active, type: this.active,
pageInfo: { pageInfo: {
pageNum: this.currentPage, pageNum: this.currentPage,
pageSize: this.pageSize pageSize: this.pageSize,
keyword: this.searchValue ? this.searchValue : ''
} }
}) })
if (rs && rs.result === '0') { if (rs && rs.result === '0') {
@@ -186,6 +188,15 @@ export default {
this.processedListLoading = true this.processedListLoading = true
} }
this.loadMore() this.loadMore()
},
async searchProblems() {
this.currentPage = 1
if (this.active === 0) {
this.pendingList.splice(0)
} else {
this.processedList.splice(0)
}
this.loadMore()
} }
}, },
created() { created() {