|
|
@ -286,10 +286,13 @@ |
|
|
<script> |
|
|
<script> |
|
|
import { ieHome, getIeUnreadCount, updateIeStatus, startIeMatch, matchIeProfile, getIeDailyQuestion, saveIeProfile } from '@/common/ieApi.js' |
|
|
import { ieHome, getIeUnreadCount, updateIeStatus, startIeMatch, matchIeProfile, getIeDailyQuestion, saveIeProfile } from '@/common/ieApi.js' |
|
|
import { ensureIeVerifiedBeforeAction } from '@/common/ieRealNameAuth.js' |
|
|
import { ensureIeVerifiedBeforeAction } from '@/common/ieRealNameAuth.js' |
|
|
|
|
|
import { buildHomeSharePath } from '@/utils/sharePath.js' |
|
|
import IeBottomTab from '@/package4/components/ie-bottom-tab/ie-bottom-tab.vue' |
|
|
import IeBottomTab from '@/package4/components/ie-bottom-tab/ie-bottom-tab.vue' |
|
|
import IeAuthDialog from '@/package4/components/ie-auth-dialog/ie-auth-dialog.vue' |
|
|
import IeAuthDialog from '@/package4/components/ie-auth-dialog/ie-auth-dialog.vue' |
|
|
import CommonLoading from '@/package4/components/common-loading/common-loading.vue' |
|
|
import CommonLoading from '@/package4/components/common-loading/common-loading.vue' |
|
|
|
|
|
|
|
|
|
|
|
const SHARE_TARGET_PATH = '/package4/ieBrowser/index' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
components: { IeBottomTab, IeAuthDialog, CommonLoading }, |
|
|
components: { IeBottomTab, IeAuthDialog, CommonLoading }, |
|
|
data() { |
|
|
data() { |
|
|
@ -448,6 +451,7 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onLoad() { |
|
|
onLoad() { |
|
|
|
|
|
this.enableShareMenu() |
|
|
if (uni.getMenuButtonBoundingClientRect) { |
|
|
if (uni.getMenuButtonBoundingClientRect) { |
|
|
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect() |
|
|
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect() |
|
|
} |
|
|
} |
|
|
@ -461,6 +465,7 @@ |
|
|
this.displayMoodCopy = this.activeMood.copy |
|
|
this.displayMoodCopy = this.activeMood.copy |
|
|
}, |
|
|
}, |
|
|
onShow() { |
|
|
onShow() { |
|
|
|
|
|
this.enableShareMenu() |
|
|
this.startPageTimers() |
|
|
this.startPageTimers() |
|
|
if (this.hasShownOnce) { |
|
|
if (this.hasShownOnce) { |
|
|
this.loadHome() |
|
|
this.loadHome() |
|
|
@ -484,7 +489,32 @@ |
|
|
onUnload() { |
|
|
onUnload() { |
|
|
this.stopPageTimers() |
|
|
this.stopPageTimers() |
|
|
}, |
|
|
}, |
|
|
|
|
|
onShareAppMessage() { |
|
|
|
|
|
return this.buildShareInfo() |
|
|
|
|
|
}, |
|
|
|
|
|
onShareTimeline() { |
|
|
|
|
|
const info = this.buildShareInfo() |
|
|
|
|
|
return { |
|
|
|
|
|
title: info.title, |
|
|
|
|
|
query: info.path.split('?')[1] || '', |
|
|
|
|
|
imageUrl: info.imageUrl |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
enableShareMenu() { |
|
|
|
|
|
if (!uni.showShareMenu) return |
|
|
|
|
|
uni.showShareMenu({ |
|
|
|
|
|
withShareTicket: true, |
|
|
|
|
|
menus: ['shareAppMessage', 'shareTimeline'] |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
buildShareInfo() { |
|
|
|
|
|
return { |
|
|
|
|
|
title: '此刻有人在等你,来半匿名漂流一下', |
|
|
|
|
|
path: buildHomeSharePath(SHARE_TARGET_PATH), |
|
|
|
|
|
imageUrl: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/f7227759d693497a8beab87ff437a875.png' |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
startPageTimers() { |
|
|
startPageTimers() { |
|
|
if (!this.liveTimer) { |
|
|
if (!this.liveTimer) { |
|
|
this.liveTimer = setInterval(() => { |
|
|
this.liveTimer = setInterval(() => { |
|
|
@ -989,7 +1019,14 @@ |
|
|
goFate() { uni.navigateTo({ url: '/package4/ieBrowser/fate' }) }, |
|
|
goFate() { uni.navigateTo({ url: '/package4/ieBrowser/fate' }) }, |
|
|
goMessages() { uni.navigateTo({ url: '/package4/ieBrowser/messages?unreadCount=' + encodeURIComponent(String(this.unreadCount || 0)) }) }, |
|
|
goMessages() { uni.navigateTo({ url: '/package4/ieBrowser/messages?unreadCount=' + encodeURIComponent(String(this.unreadCount || 0)) }) }, |
|
|
goUniverse() { uni.navigateTo({ url: '/package4/ieBrowser/universe?unreadCount=' + encodeURIComponent(String(this.unreadCount || 0)) }) }, |
|
|
goUniverse() { uni.navigateTo({ url: '/package4/ieBrowser/universe?unreadCount=' + encodeURIComponent(String(this.unreadCount || 0)) }) }, |
|
|
backHome() { uni.switchTab({ url: '/pages/index/index' }) } |
|
|
backHome() { |
|
|
|
|
|
uni.switchTab({ |
|
|
|
|
|
url: '/pages/index/index', |
|
|
|
|
|
fail: () => { |
|
|
|
|
|
uni.reLaunch({ url: '/pages/index/index' }) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|