Jelajahi Sumber

充值调整 - 样式 ,功能

zhengkaixin 3 tahun lalu
induk
melakukan
c01fc2cb83
1 mengubah file dengan 25 tambahan dan 4 penghapusan
  1. 25 4
      pages/user/finance/recharge.vue

+ 25 - 4
pages/user/finance/recharge.vue

@@ -52,10 +52,17 @@
 			<img id="qrcode" style="display: none;" >
 					
 			<view class="recharge-btn">
-				<u-checkbox-group>
-					<u-checkbox active-color="green" v-model="checked" shape="circle" @change="checkboxChange()">我已阅读并同意《充值协议》</u-checkbox>
-				</u-checkbox-group>
-				<u-button class="success-btn" shape="circle" type="success" @click="rechargeNow">
+				<view>
+					<u-checkbox-group>
+						<u-checkbox active-color="green" v-model="checked" shape="circle" @change="checkboxChange()"></u-checkbox>
+					</u-checkbox-group>
+					我已阅读并同意<span @click="gotoUrl('pages/article/details?code=CZXY')" style="color:#00B962" >《充值协议》</span>
+					
+				</view>
+				
+				<u-button
+				 :class="checked?'success-btn':'nosuccess-btn'"
+				shape="circle" type="success" @click="rechargeNow">
 					<span>立即充值</span>
 				</u-button>
 			</view>
@@ -263,6 +270,12 @@
 				})
 			},
 			rechargeNow() {
+				if(!this.checked){
+					uni.showToast({
+						title:"请同意《充值协议》后进行充值"
+					})
+					return
+				}
 				uni.showLoading({
 					title: "加载中",
 					mask: true,
@@ -404,4 +417,12 @@
 		border-color: #00B962 !important;
 		color: #fff !important;
 	}
+	.nosuccess-btn {
+		margin-top: 10px;
+		background-color: #a7dbc2 !important;
+	
+		flex: 1;
+		border-color: #a7dbc2 !important;
+		color: #fff !important;
+	}
 </style>