瀏覽代碼

选择奖品确认按钮修改

hwb0 3 年之前
父節點
當前提交
944555ba04
共有 1 個文件被更改,包括 38 次插入3 次删除
  1. 38 3
      pages/choice/index.vue

+ 38 - 3
pages/choice/index.vue

@@ -8,7 +8,7 @@
 				<view class="choice-list-item" v-for="(item, index) in prizeList" :key="index"
 					@click="selectPrize(item, index)">
 					<view
-						:class="{'item-info action': actionIndex == index && total > 1, 'item-info confirm': actionIndex != index ||  total == 1, 'item-info null': item.remainQty == 0}">
+						:class="{'item-info action': actionIndex == index, 'item-info confirm': actionIndex != index, 'item-info null': item.remainQty == 0}">
 						<view class="flex info-image">
 							<image :src="item.picUrl" mode="aspectFill"></image>
 						</view>
@@ -16,14 +16,20 @@
 						</view>
 						<view class="title" v-else>盲豆x {{ item.value }}</view>
 						<view class="tip" v-if="item.remainQty == 0">已兑完</view>
-						<view class="flex action-icon" v-if="actionIndex == index && total > 1">
+						<view class="flex action-icon" v-if="actionIndex == index">
 							<u-icon name="checkmark" color="#fff" size="24"></u-icon>
 						</view>
 					</view>
 				</view>
 			</view>
-			<view class="flex btn">
+			<!-- <view class="flex btn">
 				<view class="confirm" @click="confirmPrize" v-if="!tipShow">确认</view>
+			</view> -->
+		</view>
+		
+		<view class="footer-fixed" v-if="!tipShow">
+			<view class="flex btn">
+				<button type="default"  @click="confirmPrize">确认</button>
 			</view>
 		</view>
 
@@ -182,6 +188,7 @@
 		width: 100%;
 		min-height: calc(100vh - 44px - var(--status-bar-height));
 		background: url(https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/background.png) center center;
+		padding-bottom: 150rpx;
 
 		&-title {
 			padding-top: 100rpx;
@@ -290,6 +297,34 @@
 			}
 		}
 	}
+	
+	.footer-fixed {
+		position: fixed;
+		bottom: var(--window-bottom);
+		left: 0;
+		right: 0;
+		z-index: 11;
+		box-shadow: 0 -4rpx 40rpx 0 rgba(151, 151, 151, 0.24);
+		background: #fff;
+		// 设置ios刘海屏底部横线安全区域
+		padding-bottom: constant(safe-area-inset-bottom);
+		padding-bottom: env(safe-area-inset-bottom);
+	
+		.btn {
+			padding: 20rpx 0;
+	
+			/deep/ button {
+				width: 640rpx;
+				height: 90rpx;
+				line-height: 90rpx;
+				font-size: 36rpx;
+				color: #fff;
+				background-color: $uni-bg-color;
+				border: none;
+				border-radius: 20rpx;
+			}
+		}
+	}
 
 	.null-prize {
 		display: flex;