123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- <template>
- <view class="ezy-zhuanti-page">
- <view class="zt-qipao-box">
- <!-- wgy看这↓ 如果是游客的话不显示text标签内容-->
- <view>寻觅者<text>"小小同学"</text></view>
- <view>形容一下你的心情吧?</view>
- </view>
- <view class="zt-biaoqing-box">
- <view v-for="(item,index) in biaoqingList" :key="index" @click="goZhuantiInfo(item)"
- class="biaoqing-item-box"></view>
- </view>
- <CustomTabBar :currentTabNumber="1" :cardId="cardId" :nianji="nianji" :zhangId="zhangId" :tipFlag='tipFlag' ></CustomTabBar>
- <tip-big-dialog ref="youkeDialogRef" @confirm-btn="ykConfirm" :imgShow="true"></tip-big-dialog>
- </view>
- </template>
- <script setup>
- import {
- toast,
- getUserIdentity
- } from "@/utils/common";
- import cacheManager from '@/utils/cacheManager.js';
- import tipBigDialog from '@/components/dialog/tipBigDialog.vue';
- 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 youkeDialogRef = ref(null);
- const zhangId = ref(null); //游客使用
- const nianji = ref(null); //游客使用
- const cardId = ref(null); //游客使用
- const tipFlag = ref(null); //游客使用
- let routerOpt = ref(false);
- const biaoqingList = ref(
- [{
- name: '开心',
- type: 1
- },
- {
- name: '愤怒',
- type: 2
- },
- {
- name: '悲伤',
- type: 3
- },
- {
- name: '害怕',
- type: 4
- },
- {
- name: '得意',
- type: 5
- },
- {
- name: '嫉妒',
- type: 6
- },
- {
- name: '压抑',
- type: 7
- },
- {
- name: '抱怨',
- type: 8
- }
- ]
- )
- onLoad((options) => {
- if (cacheManager.get('auth')) {
- youkeFlag.value = true
- yhName.value = cacheManager.get('auth').realName || ''
- } else {
- // 游客
- routerOpt = options;
- zhangId.value = routerOpt.zhangId
- nianji.value = routerOpt.nianji
- cardId.value = routerOpt.cardId
- tipFlag.value = routerOpt.tipFlag
- youkeFlag.value = false
- }
- })
- // 游客弹窗---确定
- function ykConfirm() {
- uni.redirectTo({
- url: '/pages/login/index'
- });
- }
- function goZhuantiInfo(data) {
- console.log('data', data);
- if (!youkeFlag.value) {
- youkeDialogRef.value.handleShow();
- return false
- }
- uni.redirectTo({
- url: '/pages/zhuanti/zhuantiInfo?type=' + data.type
- })
- }
- </script>
|