|
|
@@ -278,12 +278,29 @@ export default {
|
|
|
isFullScreen: false
|
|
|
}
|
|
|
},
|
|
|
+ mounted() {
|
|
|
+ // 开启转发功能
|
|
|
+ uni.showShareMenu({
|
|
|
+ withShareTicket: true,
|
|
|
+ menus: ['shareAppMessage', 'shareTimeline']
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onShow() {
|
|
|
+ let flag = uni.getStorageSync('openid')
|
|
|
+ let tokenId = uni.getStorageSync('tokenId')
|
|
|
+ if (tokenId && flag) {
|
|
|
+ this.userId = uni.getStorageSync('userInfo').id
|
|
|
+ this.getTweetInfo()
|
|
|
+ this.getBindTweet()
|
|
|
+ } else {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/login/login'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
onLoad(options) {
|
|
|
- this.userId = uni.getStorageSync('userInfo').id
|
|
|
this.tweetId = options.id
|
|
|
this.townId = options.townId
|
|
|
- this.getTweetInfo()
|
|
|
- this.getBindTweet()
|
|
|
uni.$on('getReset', this.getReset)
|
|
|
},
|
|
|
onReachBottom() {
|