123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <template>
- <view>
- <view>
- {{yhName}}
- </view>
- <view v-for="(item,index) in biaoqingList" :key="index" >
- <view @click="goZhuantiInfo(item)">{{item.name}}</view>
- <view >{{item.icon}}</view>
- </view>
- <CustomTabBar :currentTabNumber="1"></CustomTabBar>
- </view>
- </template>
- <script setup>
- import {
- toast,
- getUserIdentity
- } from "@/utils/common";
- import cacheManager from '@/utils/cacheManager.js';
- import {
- } from '@/api/zhuanti.js'
- import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
- import {
- reactive,
- ref
- } from "vue";
- import {
- onLoad
- } from '@dcloudio/uni-app';
- const youkeFlag = ref(null);
- const yhName = ref(null);
- const biaoqingList = ref(
- [{
- icon: '',
- name: '开心',
- type: 'kaixin'
- },
- {
- icon: '',
- name: '愤怒',
- type: 'fennu'
- },
- {
- icon: '',
- name: '悲伤',
- type: 'beishang'
- },
- {
- icon: '',
- name: '害怕',
- type: 'haipa'
- },
- {
- icon: '',
- name: '得意',
- type: 'deyi'
- },
- {
- icon: '',
- name: '嫉妒',
- type: 'jidu'
- },
- {
- icon: '',
- name: '压抑',
- type: 'yayi'
- },
- {
- icon: '',
- name: '抱怨',
- type: 'baoyuan'
- }
- ]
- )
- onLoad((options) => {
- if (cacheManager.get('auth')) {
- youkeFlag.value = true
- yhName.value = cacheManager.get('auth').realName || ''
- } else {
- // 游客
- youkeFlag.value = false
- }
- })
- function goZhuantiInfo(data) {
- console.log('data', data);
- uni.redirectTo({
- url: '/pages/zhuanti/zhuantiInfo?type='+data.type
- })
- }
- </script>
|