From 3a4bfb28eb94e3c4772b4f8bed6a7aa376680216 Mon Sep 17 00:00:00 2001 From: wanyongkang <937888580@qq.com> Date: Sat, 10 Oct 2020 18:20:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=8F=90=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Host/Views.Mobile/User/IndexInfo.cshtml | 76 ++++++++++++++++++++- Host/Views/Product/rebuy.cshtml | 45 +++++++------ Host/Views/User/Index.cshtml | 89 +++++++++++++++++++++++++ 3 files changed, 189 insertions(+), 21 deletions(-) diff --git a/Host/Views.Mobile/User/IndexInfo.cshtml b/Host/Views.Mobile/User/IndexInfo.cshtml index d426646..a30e15e 100644 --- a/Host/Views.Mobile/User/IndexInfo.cshtml +++ b/Host/Views.Mobile/User/IndexInfo.cshtml @@ -109,7 +109,11 @@ -
支付宝支付
-
微信支付
+
+
+
{{Tip}}
@@ -283,6 +285,7 @@ }, 'OneBuyModel.OPayType': { //加引号监听对象里的属性 handler: function (newValue, oldValue) { + this.OneBuyModel.UseAccountAmount = false; this.OneBuyModel.PayChannel = newValue == 70 ? 30 : 50; }, immediate: true @@ -307,8 +310,10 @@ }) }, onePay: function () { - if (this.PayAmount == 0 || this.OneBuyModel.UseAccountAmount) { - if (!confirm('余额和微信支付宝组合支付时,余额将立即扣除,请务必完成后续差额支付!')) return; + if (this.PayAmount > 0 ) { + if (this.OneBuyModel.UseAccountAmount){ + alert('余额不足,请充值。您也可以使用微信、支付宝支付。');return; + } } var that = this; if (this.OneBuyModel.UseAccountAmount === true) this.OneBuyModel.UseAccountAmount = 1; diff --git a/Host/Views/User/Index.cshtml b/Host/Views/User/Index.cshtml index c79a997..bfd95aa 100644 --- a/Host/Views/User/Index.cshtml +++ b/Host/Views/User/Index.cshtml @@ -99,6 +99,25 @@ display: none; } + .cash-out { + position: fixed; + width: 400px; + height: 320px; + left: 50%; + top: 50%; + margin-left: -200px; + margin-top: -160px; + z-index: 3; + background: #fff; + border-radius: 10px; + box-shadow: 0px 6px 8px 6px #ccc; + display: flex; + flex-direction: row; + flex-wrap: wrap; + padding: 30px; + display: none; + } + .chargeList form { width: 100%; } @@ -173,6 +192,28 @@ +@*提现*@ +可通过淘宝充值,或联系管理员充值
@@ -426,4 +468,51 @@ } }); } + + function cash_out() { + let cash_out_money = $('#cash-out-money').val(), + reason = $('#cash-out-reason').val(), + alipay_account = $('#alipay-account').val(); + if(cash_out_money > @Model.UserModel.RestAmount){ + alert("抱歉!您提现的额度大于余额,请重新输入提现金额!"); + return; + } + if(cash_out_money <= 0){ + alert("抱歉!请重新输入提现金额!"); + return; + } + // + let reg = /^(?:1[3-9]\d{9}|[a-zA-Z\d._-]*\@@[a-zA-Z\d.-]{1,10}\.[a-zA-Z\d]{1,20})$/; + if(alipay_account.length <= 0 || alipay_account.match(reg) == null){ + alert("抱歉!请重新输入支付宝账号!"); + return; + } + + let cashOutData = { + cash_out_money: cash_out_money, + reason: reason, + alipay_account: alipay_account, + cookie:document.cookie + } + $.ajax({ + type: 'POST', + url: 'http://autophp.wyk/order/index/index', + dataType: "json", + contentType: "application/json", + data: JSON.stringify(cashOutData), + beforeSend: function(xhr) { + xhr.withCredentials = true; + }, + crossDomain: true, + success: function (res) { + console.log(res); + if (res.Code == 10000) { + $('.cash-out').hide(); + alert('提现请求发送成功,我们会在一到两个工作日进行处理,请注意查看资金明细。'); + } else { + alert('提现异常!请重试或联系客服。'); + } + } + }); + } \ No newline at end of file