Explorar o código

feat:任意充限制充值金额1-100

xyh8905170 %!s(int64=2) %!d(string=hai) anos
pai
achega
20af673972
Modificáronse 2 ficheiros con 12 adicións e 3 borrados
  1. 11 3
      myPages/recharge/index.vue
  2. 1 0
      myPages/systemSwitch/index.vue

+ 11 - 3
myPages/recharge/index.vue

@@ -99,7 +99,7 @@
 						<u-icon name="rmb" color="#333" size="22"></u-icon>
 					</view>
 					<view class="h-money">
-						<input v-model="reqOrderParm.rechargeAmount" @click="cancelChooseMoney" placeholder="请输入金额" type="number">
+						<input v-model="reqOrderParm.rechargeAmount"  @click="cancelChooseMoney"  placeholder="请输入金额" type="number">
 					</view>
 				</view>
 
@@ -187,7 +187,6 @@
 			this.userInfo = uni.getStorageSync('userInfo');
 		},
 		methods: {
-
 			AboutByType(type) {
 				this.$api.AboutByType({type:9}).then(res => {
 					this.aboutContent = res.data.data.aboutContent
@@ -203,6 +202,7 @@
 			},
 			// 提交订单
 			submitOrder(){
+
         const that = this;
 				if(!this.isSelected){ // 是否确定协议
 					uni.showToast({
@@ -221,9 +221,17 @@
 				}
 
         if(!this.reqOrderParm.strategyId){
+          if(this.reqOrderParm.rechargeAmount <1 ||this.reqOrderParm.rechargeAmount>100){
+            console.log(1111111111)
+            uni.showToast({
+              icon: 'none',
+              title: '任意充金额需大于等于1并且小于等于100!'
+            });
+            return;
+          }
           uni.showModal({
             title: '警告!',
-            content: '您选择任意金额充值不会获得任何优惠,是否确认充值',
+            content: '您选择任意充不会获得任何优惠,是否确认充值??',
             success: function (res) {
               if (res.confirm) {
                 console.log('用户点击确定');

+ 1 - 0
myPages/systemSwitch/index.vue

@@ -215,6 +215,7 @@
         <view style="text-align: center">
           <text class="text" >您确定要迁移资产?</text>
         </view>
+        <view style="height:40px" ></view>
         <view class="button-popup">
           <button class="h-btn" style="background-color: #EEEEEE;" @click="this.$refs.popupMigrate.close()">取消</button>
           <view class="h-btn" style="background-color: #FFE05C;" @click="nextStep(4)"