<template>
  <official-account-publish 
    :path="`/pages/test/blank?userId=${authStore.userId}`" 
    @error="onError"
    @publishsuccess="onPublishSuccess"
    @publishfail="onPublishFail"
  />
</template>

<script setup lang="ts">
import { useAuthStore } from '@/store/auth';
import { onMounted } from 'vue';

const authStore = useAuthStore();

onMounted(() => {
  console.log(authStore.userId);
  setTimeout(() => {
    uni.setNavigationBarTitle({
      title: '亮乡源话题' + (authStore.userId || '') ,
    })
  }, 1000);
});

function onError(e: any) {
  console.error(e);
}
function onPublishSuccess(e: any) {
  console.log(e);
}
function onPublishFail(e: any) {
  console.error(e);
}

</script>