zbb 6 дней назад
Родитель
Сommit
09efd802f2

+ 2 - 2
components/nav-bar/index.vue

@@ -120,6 +120,7 @@
 		left: 0;
 		left: 0;
 		width: 100%;
 		width: 100%;
 		z-index: 999;
 		z-index: 999;
+		overflow: hidden;
 	}
 	}
 
 
 	.heads {
 	.heads {
@@ -135,10 +136,9 @@
 		padding-bottom: 10rpx;
 		padding-bottom: 10rpx;
 		background: var(--bgcolor);
 		background: var(--bgcolor);
 		box-sizing: border-box;
 		box-sizing: border-box;
-
 		.bgImg {
 		.bgImg {
 			width: 100%;
 			width: 100%;
-			height: 100%;
+			// height: 100%;
 			position: absolute;
 			position: absolute;
 			top: 0;
 			top: 0;
 			left: 0;
 			left: 0;

+ 1 - 0
components/user-avatar/index.vue

@@ -162,6 +162,7 @@
 		overflow: hidden;
 		overflow: hidden;
 		width: 100%;
 		width: 100%;
 		height: 100%;
 		height: 100%;
+		box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
 	}
 	}
 
 
 	.avatar-img {
 	.avatar-img {

+ 20 - 5
pages/index/index.vue

@@ -1,9 +1,10 @@
 <template>
 <template>
-	<view class="card-container">
+	<scroll-view class="card-container" scroll-y @scroll="onScroll" :scroll-top="0">
 
 
 		<!-- 顶部背景 -->
 		<!-- 顶部背景 -->
 		<image class="top-bg" src="/static/image/home/top-bg.png" />
 		<image class="top-bg" src="/static/image/home/top-bg.png" />
-		<NavBar :title="'首页'" :show_back="false" color="#fff" :fixed="true" :bg="'transparent'">
+		
+		<NavBar :title="'首页'" :show_back="false" :color="'#fff'" :fixed="true" :bgImg="'/static/image/home/top-bg.png'" :bg="'transparent'">
 			<template #left>
 			<template #left>
 				<!-- <view class="left-title">{{appName}}</view> -->
 				<!-- <view class="left-title">{{appName}}</view> -->
 			</template>
 			</template>
@@ -59,7 +60,7 @@
 		<view class="hidden-canvas-box">
 		<view class="hidden-canvas-box">
 			<canvas id="qrPosterCanvas" type="2d" style="width: 600px; height: 700px;"></canvas>
 			<canvas id="qrPosterCanvas" type="2d" style="width: 600px; height: 700px;"></canvas>
 		</view>
 		</view>
-	</view>
+	</scroll-view>
 </template>
 </template>
 
 
 <script setup>
 <script setup>
@@ -97,6 +98,20 @@
 			title: `${cardInfo.value.nickName} 向你分享了名片`
 			title: `${cardInfo.value.nickName} 向你分享了名片`
 		};
 		};
 	});
 	});
+	// 导航栏滚动渐变
+	const navBg = ref('transparent')
+	const navColor = ref('#ffffff')
+	const onScroll = (e) => {
+		const scrollTop = e.detail.scrollTop
+		if (scrollTop > 30) {
+			navBg.value = '#ffffff'
+			navColor.value = '#333333'
+		} else {
+			navBg.value = 'transparent'
+			navColor.value = '#ffffff'
+		}
+	}
+
 	const makeCall = () => {
 	const makeCall = () => {
 		if (cardInfo.value.phonenumber) {
 		if (cardInfo.value.phonenumber) {
 			uni.makePhoneCall({
 			uni.makePhoneCall({
@@ -114,6 +129,7 @@
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 	.card-container {
 	.card-container {
 		background: #f5f6f8;
 		background: #f5f6f8;
+		height: 100vh;
 	}
 	}
 
 
 	.left-title {
 	.left-title {
@@ -124,8 +140,7 @@
 	}
 	}
 
 
 	.top-bg {
 	.top-bg {
-		width: 750rpx;
-		height: 634rpx;
+		width: 100%;
 		position: fixed;
 		position: fixed;
 		top: 0;
 		top: 0;
 		left: 0;
 		left: 0;

+ 1 - 1
pages/login/login.vue

@@ -48,7 +48,7 @@
 			<view class="wechat-login-wrapper">
 			<view class="wechat-login-wrapper">
 				<button class="wechat-login-btn" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
 				<button class="wechat-login-btn" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
 					<image class="wechat-icon-img" src="/static/image/public/wechat-icon.png" mode="aspectFit" />
 					<image class="wechat-icon-img" src="/static/image/public/wechat-icon.png" mode="aspectFit" />
-					<text class="wechat-text">微信一键登录</text>
+					<text class="wechat-text">一键登录</text>
 				</button>
 				</button>
 			</view>
 			</view>
 			<!-- #endif -->
 			<!-- #endif -->

+ 2 - 3
pages/mine/card.vue

@@ -3,7 +3,7 @@
 
 
 		<!-- 顶部背景 -->
 		<!-- 顶部背景 -->
 		<image class="top-bg" src="/static/image/home/top-bg.png" />
 		<image class="top-bg" src="/static/image/home/top-bg.png" />
-		<NavBar :title="'我的名片'" color="#fff" :fixed="true" :bg="'transparent'">
+		<NavBar :title="'我的名片'" color="#fff" :fixed="true" :bgImg="'/static/image/home/top-bg.png'" :bg="'transparent'">
 			<template #left>
 			<template #left>
 				<!-- <view class="left-title">{{appName}}</view> -->
 				<!-- <view class="left-title">{{appName}}</view> -->
 			</template>
 			</template>
@@ -117,8 +117,7 @@
 	}
 	}
 
 
 	.top-bg {
 	.top-bg {
-		width: 750rpx;
-		height: 634rpx;
+		width: 100%;
 		position: fixed;
 		position: fixed;
 		top: 0;
 		top: 0;
 		left: 0;
 		left: 0;

+ 2 - 3
pages/mine/userCard.vue

@@ -3,7 +3,7 @@
 
 
 		<!-- 顶部背景 -->
 		<!-- 顶部背景 -->
 		<image class="top-bg" src="/static/image/home/top-bg.png" />
 		<image class="top-bg" src="/static/image/home/top-bg.png" />
-		<NavBar :title="'名片信息'" :show_back="false" color="#fff" :fixed="true" :bg="'transparent'">
+		<NavBar :title="'名片信息'" :show_back="false" color="#fff" :bgImg="'/static/image/home/top-bg.png'" :fixed="true" :bg="'transparent'">
 			<template #left>
 			<template #left>
 				<!-- <view class="left-title">{{appName}}</view> -->
 				<!-- <view class="left-title">{{appName}}</view> -->
 			</template>
 			</template>
@@ -122,8 +122,7 @@
 		text-shadow: 2px 2px 0 black;
 		text-shadow: 2px 2px 0 black;
 	}
 	}
 	.top-bg {
 	.top-bg {
-		width: 750rpx;
-		height: 634rpx;
+		width: 100%;
 		position: fixed;
 		position: fixed;
 		top: 0;
 		top: 0;
 		left: 0;
 		left: 0;