XSLu08042 há 2 dias atrás
pai
commit
cdb16d2797
2 ficheiros alterados com 47 adições e 13 exclusões
  1. 1 2
      pages_course/components/turntableOne.vue
  2. 46 11
      pages_course/video.vue

+ 1 - 2
pages_course/components/turntableOne.vue

@@ -176,8 +176,7 @@
 				}, 100);
 			},
 			endSuccess(code) {
-				// this.targetIdx = this.list.findIndex(it=>it.code == code)
-				this.targetIdx = 4
+				this.targetIdx = this.list.findIndex(it=>it.code == code)
 				const that = this
 				this.spinning = false;
 				clearInterval(this.idleTimer);

+ 46 - 11
pages_course/video.vue

@@ -200,14 +200,18 @@
 				<view class="answerPopup-desc" v-html="errDesc"></view>
 				<!-- 选择奖励 -->
 				<view class="reward-list" v-if="errTitle == '恭喜你,回答正确'">
-					<radio-group class="reward-list-group" @change="rewardChange">
+					<view :class="item.value == currentReward?'reward-item reward-active':'reward-item'" 
+					v-for="(item, index) in rewardType" :key="item.value" @click="rewardChange(item)">
+						{{item.name}}
+					</view>
+					<!-- <radio-group class="reward-list-group" @change="rewardChange">
 						<label class="reward-list-option" v-for="(item, index) in rewardType" :key="item.value">
 							<radio :value="item.value+ ''" :checked="item.value == currentReward"
 								activeBorderColor="#FF5C03" activeBackgroundColor="#FF5C03"
 								style="transform:scale(0.7)" color="#FF5C03" />
 							<view :style="{color: item.value == currentReward ? '#FF5C03':''}">{{item.name}}</view>
 						</label>
-					</radio-group>
+					</radio-group> -->
 				</view>
 				<!-- 错误题目 -->
 				<view class="errQuesbox" v-if="errQues&&errQues.length>0">
@@ -471,8 +475,6 @@
 					icon: 'none'
 				});
 			}
-			this.getConfigByKey()
-			this.getVideoRewardTypes()
 		},
 		mounted() {
 			this.getIP()
@@ -964,7 +966,7 @@
 			},
 			// 选择
 			rewardChange(e) {
-				this.currentReward = e.detail.value
+				this.currentReward = e.value
 			},
 			closeAnswerPopup() {
 				this.$refs.answerPopup.close()
@@ -1185,7 +1187,9 @@
 											uni.setStorageSync('userInfo', JSON.stringify(res.user));
 											this.user = res.user
 											this.isLogin = true
-											this.getIsAddKf() 
+											this.getIsAddKf()
+											this.getConfigByKey()
+											this.getVideoRewardTypes()
 										 } else {
 											uni.showToast({
 												title: res.msg,
@@ -1221,6 +1225,8 @@
 									this.isLogin = isLogin
 									if(isLogin){
 										this.getIsAddKf() 
+										this.getConfigByKey()
+										this.getVideoRewardTypes()
 									} else {
 										this.goLogin()
 									}
@@ -1414,6 +1420,35 @@
 		align-items: $alignI;
 		justify-content: $justifyC;
 	}
+	.reward-list {
+		display: flex;
+		align-items: center;
+		flex-wrap: wrap;
+		margin-top: 40rpx;
+		margin-bottom: -24rpx;
+	}
+	.reward-item{
+		padding: 16rpx 10rpx;
+		box-sizing: border-box;
+		border-radius: 10rpx;
+		width: calc(50% - 14rpx);
+		overflow: hidden;
+		text-align: center;
+		border-radius: 8rpx;
+		border: 1rpx solid #ededef;
+		// margin: 10rpx 5px;
+		margin-bottom: 24rpx;
+		color: #222;
+		background-color: #fff;
+		&:nth-child(odd) {
+			margin-right: 20rpx;
+		}
+	}
+	.reward-active {
+		border: 1rpx solid #ff5c03 !important;
+		color: #ff5c03 !important;
+		background: #FCF0E7 !important;
+	}
 	.footer-tips {
 		margin-top: 14rpx;
 		text-align: center;
@@ -1456,8 +1491,8 @@
 	}
 	.reward-list {
 		width: 100%;
-		margin-top: 20rpx;
-		margin-bottom: -40rpx;
+		// margin-top: 20rpx;
+		// margin-bottom: -40rpx;
 
 		&-group {
 			font-family: PingFang SC, PingFang SC;
@@ -1691,7 +1726,7 @@
 
 	.answerPopup {
 		&-box {
-			width: 560rpx;
+			width: 620rpx;
 			background: linear-gradient(180deg, #FFFAF6 0%, #FEECD8 100%);
 			border-radius: 32rpx 32rpx 32rpx 32rpx;
 			background-color: #fff;
@@ -1718,12 +1753,12 @@
 
 		&-desc {
 			margin-top: 10rpx;
-			font-size: 28rpx;
+			font-size: 30rpx;
 			color: #757575;
 		}
 
 		&-btn {
-			width: 464rpx;
+			width: 484rpx;
 			height: 84rpx;
 			margin-top: 54rpx;
 			margin-bottom: 16rpx;