返乡登记
This commit is contained in:
@@ -54,15 +54,15 @@
|
||||
<u-popup v-model="show" mode="bottom" border-radius="14">
|
||||
<div class="line-bg"></div>
|
||||
<div class="flex">
|
||||
<div class="item">
|
||||
<div class="item" @click="share">
|
||||
<img src="./components/img/zf.png" alt="">
|
||||
<p>转发</p>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="item" @click="shareWechat">
|
||||
<img src="./components/img/wx.png" alt="">
|
||||
<p>分享到微信</p>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="item" @click="copy">
|
||||
<img src="./components/img/lj.png" alt="">
|
||||
<p>获取链接</p>
|
||||
</div>
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
import qs from "query-string"
|
||||
export default {
|
||||
appName: '返乡登记',
|
||||
data() {
|
||||
@@ -97,7 +97,12 @@ export default {
|
||||
showSelect: false
|
||||
}
|
||||
},
|
||||
computed: { ...mapState(['user']) },
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
params() {
|
||||
return qs.parse(decodeURIComponent(location.search))
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
document.title = '返乡登记'
|
||||
this.isGirdUser()
|
||||
@@ -178,9 +183,37 @@ export default {
|
||||
this.show = false
|
||||
},
|
||||
open() {
|
||||
console.log(123)
|
||||
this.show = true
|
||||
}
|
||||
},
|
||||
copy() {
|
||||
let oInput = document.createElement('input')
|
||||
oInput.value = this.params.linkUrl
|
||||
document.body.appendChild(oInput)
|
||||
oInput.select()
|
||||
document.execCommand('Copy')
|
||||
this.$u.toast('已复制')
|
||||
oInput.remove()
|
||||
},
|
||||
share() {
|
||||
this.injectJWeixin(['shareAppMessage', 'shareWechatMessage']).then(() => {
|
||||
this.wxInvoke(['shareAppMessage', {
|
||||
title: this.params.title,
|
||||
desc: this.params.tableExplain,
|
||||
link: this.params.linkUrl,
|
||||
imgUrl: this.params.headPicture
|
||||
}])
|
||||
})
|
||||
},
|
||||
shareWechat() {
|
||||
this.injectJWeixin(['shareAppMessage', 'shareWechatMessage']).then(() => {
|
||||
this.wxInvoke(['shareWechatMessage', {
|
||||
title: this.params.title,
|
||||
desc: this.params.tableExplain,
|
||||
link: this.params.linkUrl,
|
||||
imgUrl: this.params.headPicture
|
||||
}])
|
||||
})
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current ++
|
||||
|
||||
Reference in New Issue
Block a user