Skip to content

Commit

Permalink
增加微信小程序分享功能
Browse files Browse the repository at this point in the history
  • Loading branch information
jimbeamman7 committed Jun 18, 2022
1 parent 938fdc8 commit a85ce88
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pages/index/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@
util.loading('loading...')
this.loadData()
},
onShareAppMessage: function() {
uni.showShareMenu({
withShareTicket: true
})
},
onShow() {
if (this.categoryBooks.length == 0) {
this.loadData()
Expand Down
5 changes: 5 additions & 0 deletions pages/intro/intro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@
onShow() {
this.isLogin = util.getToken() != ""
},
onShareAppMessage: function() {
uni.showShareMenu({
withShareTicket: true
})
},
methods: {
adLoad() {
this.adLoaded = true
Expand Down
5 changes: 5 additions & 0 deletions pages/list/list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@
this.setTitle()
this.loadBooks()
},
onShareAppMessage: function() {
uni.showShareMenu({
withShareTicket: true
})
},
onReachBottom() {
this.loadBooks()
},
Expand Down
5 changes: 5 additions & 0 deletions pages/rank/rank.vue
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@
this.menuStyle = `top: ${top}px;`
this.loadData()
},
onShareAppMessage: function() {
uni.showShareMenu({
withShareTicket: true
})
},
methods: {
changeTab: function(e) {
this.loading = true
Expand Down
5 changes: 5 additions & 0 deletions pages/search/search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@
this.showTab = true
this.execSearch()
},
onShareAppMessage: function() {
uni.showShareMenu({
withShareTicket: true
})
},
onReachBottom() {
this.execSearch()
},
Expand Down

0 comments on commit a85ce88

Please sign in to comment.