wangguoyu 3 tygodni temu
rodzic
commit
3c1a838f69
3 zmienionych plików z 124 dodań i 8 usunięć
  1. 7 0
      pages.json
  2. 71 8
      pages/zhuanti/index.vue
  3. 46 0
      pages/zhuanti/zhuantiInfo.vue

+ 7 - 0
pages.json

@@ -28,6 +28,13 @@
 				"navigationBarTitleText": "专题",
 				"navigationStyle": "custom"
 			}
+		},	
+		{
+			"path": "pages/zhuanti/zhuantiInfo",
+			"style": {
+				"navigationBarTitleText": "专题",
+				"navigationStyle": "custom"
+			}
 		},
 			{
 			"path": "pages/study/index",

+ 71 - 8
pages/zhuanti/index.vue

@@ -1,8 +1,16 @@
 <template>
 	<view>
-		<CustomTabBar  :currentTabNumber="1"></CustomTabBar>
+		<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>
@@ -17,17 +25,72 @@
 
 	import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
 	import {
-		onLoad
-	} from '@dcloudio/uni-app';
-	import {
 		reactive,
 		ref
 	} from "vue";
 	import {
-		onShow
+		onLoad
 	} from '@dcloudio/uni-app';
-	onShow(() => {
+	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
+		}
 	})
-	const agreeType = ref(null);
+
+	function goZhuantiInfo(data) {
+		console.log('data', data);
+		uni.redirectTo({
+			url: '/pages/zhuanti/zhuantiInfo?type='+data.type
+		})
+	}
 </script>

+ 46 - 0
pages/zhuanti/zhuantiInfo.vue

@@ -0,0 +1,46 @@
+<template>
+	<view>
+		<view class="icon-title-navBar-box">
+			<view @click="goUpPage" class="nav-bar-icon"></view>
+			<text class="nav-bar-title">详情</text>
+		</view>
+		<view>
+			asdfasdfasdfasdfas
+		</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);
+	onLoad((options) => {
+		console.log('opt', options);
+	})
+
+	function goUpPage() {
+		uni.redirectTo({
+			url: `/pages/zhuanti/index`
+
+		})
+	}
+</script>