mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-24 18:23:10 +08:00
[NEW] 微信分享功能
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
const getComponent = filename => () => import(`@/views/ebiz/questions/${filename}.vue`)
|
||||
const g = filename => () => import(`@/views/ebiz/questions/${filename}.vue`)
|
||||
|
||||
export default [
|
||||
{
|
||||
path: '/questions/list',
|
||||
name: 'QuestionsList',
|
||||
component: getComponent('QuestionsList'),
|
||||
component: g('QuestionsList'),
|
||||
meta: {
|
||||
title: '电投问题件',
|
||||
index: 1
|
||||
@@ -13,7 +13,7 @@ export default [
|
||||
{
|
||||
path: '/questions/detail',
|
||||
name: 'QuestionsDetail',
|
||||
component: getComponent('QuestionsDetail'),
|
||||
component: g('QuestionsDetail'),
|
||||
meta: {
|
||||
title: '问题处理',
|
||||
index: 1
|
||||
@@ -22,7 +22,7 @@ export default [
|
||||
{
|
||||
path: '/questions/result',
|
||||
name: 'result',
|
||||
component: getComponent('Result'),
|
||||
component: g('Result'),
|
||||
meta: {
|
||||
title: '提交结果',
|
||||
index: 1
|
||||
|
||||
@@ -82,6 +82,7 @@
|
||||
<script>
|
||||
import { Uploader, Checkbox, Field, Radio, RadioGroup } from 'vant'
|
||||
import ShortMessage from '@/components/ebiz/question/ShortMessage.vue'
|
||||
import shareIcon from '@/assets/images/share@3x.png'
|
||||
export default {
|
||||
name: 'QuestionsDetail',
|
||||
components: {
|
||||
@@ -115,6 +116,40 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async setTopRightBtn() {
|
||||
console.log('000')
|
||||
// eslint-disable-next-line
|
||||
await EWebBridge.webCallAppInJs('webview_right_button', {
|
||||
btns: [
|
||||
{
|
||||
img: shareIcon,
|
||||
title: '按钮文案'
|
||||
}
|
||||
]
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
this.shareConfig()
|
||||
},
|
||||
shareConfig() {
|
||||
console.log(11111)
|
||||
window.appCallBack = async data => {
|
||||
console.log(222)
|
||||
if (data === 'right_button_click') {
|
||||
console.log(3333)
|
||||
// eslint-disable-next-line
|
||||
await EWebBridge.webCallAppInJs('bridge',{
|
||||
flag: 'share',
|
||||
extra: {
|
||||
title: '测测试试',
|
||||
content: '测试测试',
|
||||
img: '',
|
||||
url: window.location.href
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
modeChange(mode) {
|
||||
if (mode > 1) {
|
||||
this.$dialog.alert({
|
||||
@@ -132,6 +167,9 @@ export default {
|
||||
this.showMessage = true
|
||||
},
|
||||
getMessage() {}
|
||||
},
|
||||
async created() {
|
||||
await this.setTopRightBtn()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user