From ec17a3732f0f80f4a8d7f7867249f2581b221a27 Mon Sep 17 00:00:00 2001
From: Liuyi <candymxq888@outlook.com>
Date: 星期六, 16 十一月 2024 17:19:27 +0800
Subject: [PATCH] 添加积分商城

---
 pages/index/index.vue |   97 +++++++++++++++++++++---------------------------
 1 files changed, 42 insertions(+), 55 deletions(-)

diff --git a/pages/index/index.vue b/pages/index/index.vue
index a6a8d1a..2609622 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -77,23 +77,6 @@
 			scanType: ['qrCode'],
 			success: async function (res) {
 				console.log('条码内容:' + res.result);
-				// let data = {
-				// 	cardType:cardInfo.value.cardType,
-				// 	card:cardInfo.value.waterCardNumber,
-				// 	sn:res.result
-				// }
-				// await buyWaterApi(data).then((res) =>{
-				// 	if(res.code == 200){
-				// 		uni.navigateTo({
-				// 			url:'/pages/scanWater/index'
-				// 		})
-				// 	}else{
-				// 		uni.showToast({
-				// 			title:'扫码失败!',
-				// 			icon:'none'
-				// 		})
-				// 	}
-				// })
 				uni.navigateTo({
 							url:`/pages/scanWater/index?facilityCode=${res.result}`
 						})
@@ -218,7 +201,7 @@
 	function upGrade(){
 		uni.showToast({
 			title: '该功能正在升级中!',
-			duration: 2000,
+			duration: 1000,
 			icon:'none',
 		});
 	}
@@ -253,11 +236,10 @@
 					<image v-else class="user-img" src='../../static/images/index/head.png' alt=''></image>
 					<text @click="navTo('/pages/userInfo/index')">{{cardInfo.userName}}</text>
 					<image @click="navTo('/pages/userInfo/index')" class="user-more"src="../../static/images/index/back.png"></image>
-					<!-- <view class="user-add-card" @click="navTo('/pages/addCard/index')"> -->
-					<view class="user-add-card">
+					<!-- <view class="user-add-card" @click="navTo('/pages/addCard/index')">
 						<image src='../../static/images/index/vip-add.png' alt=''></image>
 						<text>添加会员卡</text>
-					</view>
+					</view> -->
 				</view>
 				<view class="card">
 					<image class="card-bg" src="../../static/images/index/card11.png" alt=""></image>
@@ -267,22 +249,21 @@
 							<view class="left-top">
 								<view>
 									<image v-if="isVip"  src="../../static/images/index/code1.png" alt=""></image>
-									<text>会员卡&nbsp;</text>
+									<text v-if="isVip">会员卡&nbsp;</text>
+									<text v-if="!isVip">未绑定&nbsp;</text>
 									<text class="lossed" v-if="isLoss && isVip">&nbsp;[已挂失]</text>
 								</view>
 								<view v-if="isVip">ID:{{cardInfo.waterCardNumber}}</view>
 							</view>
-							<!-- <view v-if="cardInfo.userPhone" class="left-bottom">电话:{{cardInfo.userPhone}}</view> -->
 						</view>
 						<view class="card-right">
 							<view class="card-right-top">
-								<!-- <view @click="navTo('/pages/addCard/index')">
+								<text v-if="isVip">金额卡</text>
+								<text v-if="isVip">{{cardInfo.balance}}元</text>
+								<view v-if="!isVip" class="user-add-card" @click="navTo('/pages/addCard/index')">
 									<image src='../../static/images/index/vip-add.png' alt=''></image>
 									<text>添加会员卡</text>
-								</view> -->
-								<text v-if="isVip">金额卡</text>
-								<text v-if="!isVip">未绑定会员卡</text>
-								<text v-if="isVip">{{cardInfo.balance}}元</text>
+								</view>
 							</view>
 							<view v-if="isVip" class="card-right-bottom" @click="navTo('/pages/recharge/index')">充值</view>
 						</view>
@@ -290,7 +271,7 @@
 				</view>
 			</view>
 			<view class="function-box1">
-				<view class="box1-bg box1-one" @click="navTo('/pages/sendWater/index')">
+				<view class="box1-bg box1-one" @click="upGrade">
 					<image src="../../static/images/index/home21.png" alt=""></image>
 					<view>送水到家</view>
 				</view>
@@ -314,7 +295,12 @@
 					</block>
 				</view>
 			</view>
-			<view class="advertisement-box" @click="upGrade"><image src="../../static/images/index/bg4.png" alt=""></image></view>
+			<!-- 积分商城 -->
+			<view class="advertisement-box" @click="navTo('/pages/pointsMall/index')">
+			<!-- <view class="advertisement-box" @click="upGrade"> -->
+				<image src="../../static/images/index/banner2.png" alt=""></image>
+				<image src="../../static/images/index/banner1.png" alt=""></image>
+			</view>
 			<view class="service-box">
 				<view class="service-title"><text>服务指南</text></view>
 				<view class="service-content">
@@ -329,8 +315,8 @@
 							<image src="../../static/images/index/more-info5.png" alt=""></image>
 						</view>
 					</view>
-					<!-- <view class="service-bg" @click="upGrade"> -->
-					<view class="service-bg" @click="navTo('/pages/counterRecharge/index')">
+					<view class="service-bg" @click="upGrade">
+					<!-- <view class="service-bg" @click="navTo('/pages/counterRecharge/index')"> -->
 							<view>
 								<image src="../../static/images/index/notice5.png" alt=""></image>
 								<text>公示公告</text>
@@ -364,14 +350,11 @@
 				.user-info{
 					width:100%;
 					height:100rpx;
-					// background: #06BF5E;
-					display: flex;
 					align-items: center;
 					padding-left:15rpx;
 					box-sizing: border-box;
 					margin-bottom: 14rpx;
 					display:flex;
-					position:relative;
 					.user-img{
 						width:90rpx;
 						height:90rpx;
@@ -385,23 +368,6 @@
 					.user-more{
 						width: 12rpx;
 						height: 28rpx;
-					}
-					.user-add-card{
-						display:flex;
-						align-items:center;
-						height:40rpx;
-						font-size:22rpx;
-						background:linear-gradient(to right,#B1D9FD,#65A7FD);
-						border-radius:50rpx;
-						padding: 0 8rpx;
-						position: absolute;
-						bottom:0;
-						right:0;
-						image{
-							width:28rpx;
-							height:28rpx;
-							margin-right:10rpx;
-						}
 					}
 				}
 				.card{
@@ -481,6 +447,24 @@
 								justify-content: space-between;
 								flex-direction: column;
 								font-size:34rpx;
+								.user-add-card{
+									display:flex;
+									align-items:center;
+									height:52rpx;
+									font-size:28rpx;
+									background:linear-gradient(to right,#B1D9FD 0%,#65A7FD 70%,#65A7FD 100%);
+									border-radius:50rpx;
+									padding: 0 20rpx;
+									image{
+										width:36rpx;
+										height:36rpx;
+										margin-right:6rpx;
+										opacity:0.8;
+									}
+									text{
+										color:#FFF;
+									}
+								}
 								text:last-child{
 									font-weight:500;
 								}
@@ -653,12 +637,15 @@
 			}
 			.advertisement-box{
 				width:100%;
-				height: 188rpx;
+				height: 160rpx;
 				padding:0 32rpx 10rpx; 
 				box-sizing: border-box;
+				display: flex;
+				justify-content: space-around;
 				image{
-					width:100%;
-					height: 178rpx;
+					width:320rpx;
+					height:136rpx;
+					border-radius:10rpx;
 				}
 			}
 			.service-box{

--
Gitblit v1.9.3