|
@@ -1,17 +1,40 @@
|
|
|
<template>
|
|
|
- <Page title='首页'>
|
|
|
- <template v-slot:body>
|
|
|
+ <template v-if="userInfo.userNameNeedTranslate == 1">
|
|
|
+ <template v-if="Array.isArray(openId)">
|
|
|
+ <template v-for="(item, index) in openId">
|
|
|
+ <ww-open-data :type='type' :openid='item'></ww-open-data>
|
|
|
+ <span v-if="index < openId.length - 1">,</span>
|
|
|
+ </template>
|
|
|
</template>
|
|
|
- </Page>
|
|
|
+ <ww-open-data :type='type' :openid='openId' v-else></ww-open-data>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ {{ Array.isArray(openId) ? openId.join(',') : openId }} 😔
|
|
|
+ </template>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
import { ref } from 'vue';
|
|
|
-import { useLifecycle } from '@hooks/useCommon.js';
|
|
|
+import { useLifecycle, useEnv } from '@hooks/useCommon.js';
|
|
|
+import useInfoStore from '@store/useInfoStore'
|
|
|
+
|
|
|
+const props = defineProps({
|
|
|
+ openId: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: () => '',
|
|
|
+ },
|
|
|
+ type: {
|
|
|
+ type: String,
|
|
|
+ default: () => 'userName',
|
|
|
+ }
|
|
|
+});
|
|
|
+const userInfo = useInfoStore()
|
|
|
+
|
|
|
|
|
|
useLifecycle({
|
|
|
load: () => {
|
|
|
// 添加加载逻辑
|
|
|
+ console.log(useEnv(), '<==== useEnv')
|
|
|
}
|
|
|
});
|
|
|
</script>
|