|
@@ -91,6 +91,11 @@
|
|
|
<img src="@/assets/icon_kefu.png" class="w-[24px] h-[24px] mr-[10px]" alt="" />
|
|
<img src="@/assets/icon_kefu.png" class="w-[24px] h-[24px] mr-[10px]" alt="" />
|
|
|
</template>
|
|
</template>
|
|
|
</van-cell>
|
|
</van-cell>
|
|
|
|
|
+ <van-cell title="登出" @click="logoutCom" is-link>
|
|
|
|
|
+ <template #icon>
|
|
|
|
|
+ <img src="@/assets/icon_tuichu.png" class="w-[24px] h-[24px] mr-[10px]" alt="" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </van-cell>
|
|
|
</van-cell-group>
|
|
</van-cell-group>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -99,12 +104,13 @@
|
|
|
|
|
|
|
|
<connect-page ref="connectPageRef"></connect-page>
|
|
<connect-page ref="connectPageRef"></connect-page>
|
|
|
|
|
|
|
|
- <poster-page ref="posterRef"></poster-page>
|
|
|
|
|
|
|
+ <poster-page ref="posterRef" pageType="mine"></poster-page>
|
|
|
</ion-content>
|
|
</ion-content>
|
|
|
</ion-page>
|
|
</ion-page>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
|
|
+import { ConfigProvider as VantConfigProvider, showConfirmDialog } from 'vant'
|
|
|
import defaultImg from '@/assets/png-touxiang.png'
|
|
import defaultImg from '@/assets/png-touxiang.png'
|
|
|
import SignInfo from '@/components/SignInfo.vue'
|
|
import SignInfo from '@/components/SignInfo.vue'
|
|
|
import BuyPage from '@/components/BuyPage.vue'
|
|
import BuyPage from '@/components/BuyPage.vue'
|
|
@@ -118,6 +124,7 @@ import { useI18n } from 'vue-i18n'
|
|
|
import { isSameDay } from 'date-fns'
|
|
import { isSameDay } from 'date-fns'
|
|
|
import toast from '@/utils/toast'
|
|
import toast from '@/utils/toast'
|
|
|
import { onIonViewWillEnter } from '@ionic/vue'
|
|
import { onIonViewWillEnter } from '@ionic/vue'
|
|
|
|
|
+import { useIonRouter } from '@ionic/vue'
|
|
|
|
|
|
|
|
const buyPageRef = ref(null)
|
|
const buyPageRef = ref(null)
|
|
|
function buy() {
|
|
function buy() {
|
|
@@ -130,7 +137,7 @@ function connect() {
|
|
|
connectPageRef.value.changeShow(true)
|
|
connectPageRef.value.changeShow(true)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const { user, get: getUser } = useUserStore()
|
|
|
|
|
|
|
+const { user, get: getUser, logout } = useUserStore()
|
|
|
|
|
|
|
|
// onMounted(async () => {
|
|
// onMounted(async () => {
|
|
|
// if (user) {
|
|
// if (user) {
|
|
@@ -191,6 +198,19 @@ const posterRef = ref(null)
|
|
|
function share() {
|
|
function share() {
|
|
|
posterRef.value.onOpenInviteModal()
|
|
posterRef.value.onOpenInviteModal()
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+const ionRouter = useIonRouter()
|
|
|
|
|
+async function logoutCom() {
|
|
|
|
|
+ const confirm = await showConfirmDialog({
|
|
|
|
|
+ title: '登出',
|
|
|
|
|
+ message: '您当前确认要登出吗?'
|
|
|
|
|
+ }).catch(() => {})
|
|
|
|
|
+ if (confirm) {
|
|
|
|
|
+ logout()
|
|
|
|
|
+ toast.success('登出成功')
|
|
|
|
|
+ ionRouter.push({ name: 'home' })
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|