浏览代码

2023-10-4

cmy 2 年之前
父节点
当前提交
5484fdcffd
共有 7 个文件被更改,包括 89 次插入77 次删除
  1. 72 65
      components/footer/footer.vue
  2. 2 1
      libs/i18n/lang/cn.json
  3. 2 1
      libs/i18n/lang/en.json
  4. 2 1
      libs/i18n/lang/tw.json
  5. 5 0
      pages/index/index.vue
  6. 5 8
      pages/index/pledge.vue
  7. 1 1
      uni.scss

+ 72 - 65
components/footer/footer.vue

@@ -1,70 +1,77 @@
 <template>
-  <view class="footer d-flex p-y-xs2 bg-tab-nav fn-center"
-    ><!-- p-y-xs -->
-    <view
-      class="item line-height-1 flex-fill"
-      :class="{ 'router-link-active': tab == item.tel }"
-      v-for="item in navList"
-      :key="item.tel"
-      @click="tabChange(item.tel)"
-    >
-      <view class="icon">
-        <img
-          class="h-15"
-          v-if="tab == item.tel"
-          :src="item.activeIcon"
-          alt=""
-        />
-        <img class="h-15" v-else :src="item.icon" alt="" />
-      </view>
-      <view class="fn-12" style="margin-top: 4px">{{ $t(item.label) }}</view>
-    </view>
-  </view>
+	<view class="footer flex p-y-xs2 bg-tab-nav">
+		<view class="flex-fill" :class="{ 'router-link-active': tab == item.tel }"
+			v-for="item in navList" :key="item.tel" @click="tabChange(item.tel)">
+			<view class="icon">
+				<img class="h-15" v-if="tab == item.tel" :src="item.activeIcon" alt="" />
+				<img class="h-15" v-else :src="item.icon" alt="" />
+			</view>
+			<view class="fn-12">{{ $t(item.label) }}</view>
+		</view>
+	</view>
 </template>
 <script>
-import { navList } from "./list.js";
-export default {
-  props: {
-    tab: {
-      type: String,
-      default: "home",
-    },
-  },
-  data() {
-    return {
-      navList: navList(this),
-    };
-  },
-  methods: {
-    tabChange(v) {
-      uni.switchTab({
-        url: "/pages/base/" + v,
-      });
-      // console.log(v);
-      // console.log(this.$router);
-    },
-  },
-};
+	import {
+		navList
+	} from "./list.js";
+	export default {
+		props: {
+			tab: {
+				type: String,
+				default: "index",
+			},
+		},
+		data() {
+			return {
+				navList: navList(this),
+			};
+		},
+		created() {
+			// console.log(navList,'navList');
+		},
+		methods: {
+			tabChange(v) {
+				uni.switchTab({
+					url: "/pages/index/" + v,
+				});
+				// console.log(v);
+				// console.log(this.$router);
+			},
+		},
+	};
 </script>
 <style lang="scss" scoped>
-.p-y-xs2 {
-  padding-top: 25rpx !important;
-  padding-bottom: 30rpx !important;
-}
-.footer {
-  box-shadow: $tab-nav-shadow;
-  position: fixed;
-  bottom: 0;
-  width: 100%;
-  z-index: 999 !important;
-   height: 65rpx;
-  // color: rgba(#fff, 0.3);
-}
-.router-link-active {
-  color: $theme-1;
-  // color: var(--tab-nav-active);
-}
-.bg-tab-nav{
-	// background-color: #31313f;
-}
-</style>
+	.flex-fill{
+		text-align: center;
+		line-height: 1;
+	}
+	.p-y-xs2 {
+		padding: 5px 10px;
+	}
+	.h-15{
+		height: 20px;
+		width: 20px;
+	}
+	.footer {
+		box-shadow:  0px -7px 20px 0px rgba(37, 37, 48, 0.83);
+		position: fixed;
+		bottom: 0;
+		width: 100%;
+		z-index: 999 !important;
+		// height: 102rpx;
+		color: rgba(#fff, 0.3);
+		justify-content: space-around !important;
+	}
+	.fn-12{
+		margin-top: 4px;
+		font-size: 10px;
+	}
+	.router-link-active {
+		// color: $theme-1;
+		color:#FEB041;
+	}
+
+	.bg-tab-nav {
+		background-color: #000000;
+	}
+</style>

+ 2 - 1
libs/i18n/lang/cn.json

@@ -2,7 +2,8 @@
 	"home":{
 		"k1": "最新价格",
 		"b0": "24H涨跌幅",
-		"b8": "名称"
+		"b8": "名称",
+		"d0": "首页"
 	},
 	"add": {
 		"kt": "Airdrop",

+ 2 - 1
libs/i18n/lang/en.json

@@ -2,7 +2,8 @@
 	"home":{
 		"k1": "Latest Price",
 		"b0": "24H Rise and fall",
-		"b8": "Type"
+		"b8": "Type",
+		"d0": "Home"
 	},
 	"add": {
 		"kt": "Airdrop",

+ 2 - 1
libs/i18n/lang/tw.json

@@ -2,7 +2,8 @@
 	"home":{
 		"k1": "最新價格",
 		"b0": "24H漲跌幅",
-		"b8": "名稱"
+		"b8": "名稱",
+		"d0": "首頁"
 	},
 	"add": {
 		"ck": "存款",

+ 5 - 0
pages/index/index.vue

@@ -62,11 +62,16 @@
 				</text>
 			</view>
 		</view>
+		<taber tab='index'></taber>
 	</view>
 </template>
 <script>
 	import { mapState, mapActions } from "vuex";
+	import taber from "@/components/footer/footer.vue";
 	export default {
+		components: {
+			taber
+		},
 		data() {
 			return {
 				indicatorDots: true,

+ 5 - 8
pages/index/pledge.vue

@@ -101,14 +101,16 @@
 				</view>
 			</view>
 		</view>
-		<view class="aa">
-			
-		</view>
+		<taber tab='pledge'></taber>
 	</view>
 </template>
 
 <script>
+	import taber from "@/components/footer/footer.vue";
 	export default {
+		components: {
+			taber
+		},
 		data() {
 			return {};
 		},
@@ -221,9 +223,4 @@
 	.r3{
 		margin-top: 50rpx;
 	}
-	.aa {
-		width: 750rpx;
-		height: 20rpx;
-		background-color: #000000;
-	}
 </style>

+ 1 - 1
uni.scss

@@ -1,7 +1,7 @@
 /* 页面左右间距 */
 $page-row-spacing: 30rpx;
 //页面基础颜色
-$page-color-base: #f8f8f8; //页面背景颜色
+$page-color-base: #000; //页面背景颜色
 $page-color-light: #f8f6fc;
 // 主题颜色
 $base-color: #902020; //项目颜色