test
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
17 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-mainPages-payment-payment"],{"0c37":function(a,e,t){"use strict";t.r(e);var i=t("0cce"),n=t.n(i);for(var s in i)"default"!==s&&function(a){t.d(e,a,(function(){return i[a]}))}(s);e["default"]=n.a},"0cce":function(a,e,t){"use strict";var i=t("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(t("2c7c")),s=(i(t("ec93")),{data:function(){return{time:"",type:1,orderid:"",payInfo:{},plugin:"",types:null,phoneHight:null,deliverystring:null,img:"",pageName:"",examineing:1}},onLoad:function(a){var e=this;e.img=this.imgfixUrl;var t=uni.getStorageSync("TextSubstitution");this.examineing=t.examineing||0,this.orderid=a.orderid,this.plugin=a.plugin,this.deliverystring=a.deliverystring,this.init(),a.types&&(this.types=a.types),a.page&&(this.pageName=a.page),uni.getSystemInfo({success:function(a){e.phoneHight=a.windowHeight+"px"}})},onShow:function(){},methods:{goduurUrl:function(a){var e=window.location.href,t=a+"&backurl="+encodeURIComponent(e);console.log(t),location.href=t,a=encodeURIComponent(a)},init:function(){var a=this;a.getOrderInfo()},checkPay:function(a){var e=this;e.type==a?uni.showToast({title:"请选择至少一个支付方式",icon:"none"}):e.type=a},getOrderInfo:function(){var a=this,e={orderid:"0"==a.orderid?"":a.orderid?a.orderid:1645,plugin:a.plugin||"wlfightgroup",deliverystring:a.deliverystring};n.default._post_form("&p=pay&do=getOrderInfo",e,(function(e){if(a.payInfo=e.data,e.data.diy_userInfo?a.type=5:0==e.data.wechat?0==e.data.credit?a.type=3:a.type=1:a.type=2,0==e.data.wechat&&0!=e.data.yunpay&&0==e.data.credit&&0==e.data.alipay&&(a.type=5),void 0!==e.data.sytime&&0!=e.data.sytime)var t=setInterval((function(){a.payInfo.sytime--,a.time=a.payInfo.sytime;var e=Math.floor(a.time%3600);a.time=Math.floor(a.time/3600)+":"+Math.floor(e/60)+":"+a.time%60,0==a.payInfo.sytime&&clearInterval(t)}),1e3);0==e.data.sytime&&(a.time="00:00:00")}))},goPay:function(){var a=this,e=a.payInfo,t=a.type,i=1===t?a.textSubData.moneytext:2===t?"微信":4===t?"余额支付":5===t?"银联云收单":0==a.examineing?"支付宝":"渠道1",s=n.default.getClientType(),o={order_no:e.tid,name:e.goodname,pay_type:4===t?1:t};1===t?uni.showModal({title:"温馨提示",content:"确认使用".concat(i,"方式付款"),success:function(i){i.confirm&&(uni.showLoading({title:"正在处理..."}),n.default._post_form("&p=pay&do=requestPay",o,(function(i){1==a.types?"postDetails"==a.pageName?n.default.showSuccess("支付成功",(function(){uni.navigateBack({delta:1})})):"mobilerecharge"!=a.plugin||a.pageName?n.default.navigationTo({url:"pages/mainPages/successRelease/successRelease?id="+i.data.tieziid}):n.default.showSuccess("支付成功",(function(){n.default.navigationTo({url:"pages/subPages2/voucherCenter/phoneOrders",navType:"rediRect"})})):1!==t&&4!==t||(1===i.data.status?n.default.showSuccess("支付成功",(function(){n.default.navigationTo({url:"pages/subPages/paySuccess/paySuccess?tid="+e.tid+"&plugin="+a.plugin,navType:"rediRect"})})):2===i.data.status?(o.pay_type=2,o.blendflag=1,n.default._post_form("&p=pay&do=requestPay",o,(function(e){a.wechatPayment(e.data,s),uni.hideLoading()}),(function(e){console.log(e.data.data.neworder),e.data.data.neworder&&""!=e.data.data.neworder&&(console.log(a.payInfo.tid,e.data.data.neworder),a.payInfo.tid=e.data.data.neworder),uni.hideLoading()}))):"mobilerecharge"==a.plugin?n.default.showError("支付失败",(function(){n.default.navigationTo({url:"pages/subPages2/voucherCenter/voucherCenter",navType:"rediRect"})})):n.default.showError("支付失败",(function(){n.default.navigationTo({url:"pages/subPages/orderList/orderList?type=0",navType:"reLaunch"})}))),uni.hideLoading()}),(function(e){console.log(e),e.data.data.neworder&&""!=e.data.data.neworder&&(console.log(a.payInfo.tid,e.data.data.neworder),a.payInfo.tid=e.data.data.neworder),"余额不足"==e.data.message&&n.default.navigationTo({url:"pages/subPages/balance/balance"}),uni.hideLoading()})))}}):4===t?(uni.showLoading({title:"正在处理..."}),n.default._post_form("&p=pay&do=requestPay",o,(function(i){1==a.types?(console.info(111111),"postDetails"==a.pageName?n.default.showSuccess("支付成功",(function(){uni.navigateBack({delta:1})})):"mobilerecharge"!=a.plugin||a.pageName?n.default.navigationTo({url:"pages/mainPages/successRelease/successRelease?id="+i.data.tieziid}):n.default.showSuccess("支付成功",(function(){n.default.navigationTo({url:"pages/subPages2/voucherCenter/phoneOrders",navType:"rediRect"})}))):(console.info(22222),4===t&&(1===i.data.status?n.default.showSuccess("支付成功",(function(){n.default.navigationTo({url:"pages/subPages/paySuccess/paySuccess?tid="+e.tid+"&plugin="+a.plugin,navType:"rediRect"})})):2===i.data.status?(a.type=5,o.pay_type=2,o.blendflag=1,n.default._post_form("&p=pay&do=requestPay",o,(function(e){a.wechatPayment(e.data,s),uni.hideLoading()}),(function(e){console.log(e.data.data.neworder),e.data.data.neworder&&""!=e.data.data.neworder&&(console.log(a.payInfo.tid,e.data.data.neworder),a.payInfo.tid=e.data.data.neworder),uni.hideLoading()}))):"mobilerecharge"==a.plugin?n.default.showError("支付失败",(function(){n.default.navigationTo({url:"pages/subPages2/voucherCenter/voucherCenter",navType:"rediRect"})})):n.default.showError("支付失败",(function(){n.default.navigationTo({url:"pages/subPages/orderList/orderList?type=0",navType:"reLaunch"})}))))}),(function(e){console.log(e.data.data.neworder),e.data.data.neworder&&""!=e.data.data.neworder&&(console.log(a.payInfo.tid,e.data.data.neworder),a.payInfo.tid=e.data.data.neworder),uni.hideLoading()}))):(uni.showLoading({title:"正在处理..."}),console.log("进来了",JSON.stringify(o)),n.default._post_form("&p=pay&do=requestPay",o,(function(e){2!==t&&5!==t||(console.log("进来了"),a.wechatPayment(e.data,s)),3===t&&a.aliPayment(e.data),uni.hideLoading()}),(function(e){console.log(e),e.data.data.neworder&&""!=e.data.data.neworder&&(a.payInfo.tid=e.data.data.neworder),uni.hideLoading()})))},aliPayment:function(a){console.log(a);var e=new this.$util.Base64,t=e.encode(a);n.default.navigationTo({url:"pages/mainPages/payment/pay?goto="+t})},wechatPayment:function(a,e){console.log(a,e);var t=this,i=a;"2"===e?location.href=i:"1"===e&&WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:i.appId,timeStamp:i.timeStamp,nonceStr:i.nonceStr,package:i.package,signType:i.signType,paySign:i.paySign},(function(a){"get_brand_wcpay_request:ok"==a.err_msg?1==t.types?"postDetails"==t.pageName?n.default.showSuccess("支付成功",(function(){uni.navigateBack({delta:1})})):"mobilerecharge"!=t.plugin||t.pageName?n.default.navigationTo({url:"pages/subPages/paySuccess/paySuccess?tid="+t.payInfo.tid,navType:"rediRect"}):n.default.showSuccess("支付成功",(function(){n.default.navigationTo({url:"pages/subPages2/voucherCenter/phoneOrders",navType:"rediRect"})})):n.default.navigationTo({url:"pages/subPages/paySuccess/paySuccess?tid="+t.payInfo.tid,navType:"rediRect"}):"mobilerecharge"==t.plugin?n.default.showError("支付失败",(function(){n.default.navigationTo({url:"pages/subPages2/voucherCenter/voucherCenter",navType:"rediRect"})})):n.default.showError("支付失败",(function(){n.default.navigationTo({url:"pages/subPages/orderList/orderList?type=0",navType:"reLaunch"})}))}))}},computed:{textSubData:function(){return uni.getStorageSync("TextSubstitution")}}});e.default=s},"286a":function(a,e,t){"use strict";t.r(e);var i=t("57a8"),n=t("0c37");for(var s in n)"default"!==s&&function(a){t.d(e,a,(function(){return n[a]}))}(s);t("6e52");var o,c=t("f0c5"),u=Object(c["a"])(n["default"],i["b"],i["c"],!1,null,"0853826e",null,!1,i["a"],o);e["default"]=u.exports},"57a8":function(a,e,t){"use strict";var i;t.d(e,"b",(function(){return n})),t.d(e,"c",(function(){return s})),t.d(e,"a",(function(){return i}));var n=function(){var a=this,e=a.$createElement,t=a._self._c||e;return t("v-uni-scroll-view",{staticClass:"payment",style:{height:a.phoneHight},attrs:{"scroll-y":!0,"scroll-x":!1}},[t("v-uni-view",{staticClass:"paymentPackage"},[0!==a.payInfo.sytime?t("v-uni-view",{staticClass:"surplusTime"},[t("span",[a._v("支付剩余时间 "+a._s(a.time))])]):a._e(),t("v-uni-view",{staticClass:"price"},[t("span",[a._v("¥"),t("span",[a._v(a._s(a.payInfo.price))])])]),t("v-uni-view",{staticClass:"goodsInfo"},[t("span",[a._v(a._s(a.payInfo.goodname))])]),t("v-uni-view",{staticClass:"paymentTypePackage"},[1!=a.payInfo.credit||a.payInfo.diy_userInfo?a._e():t("v-uni-view",{staticClass:"paymentTypeList",on:{click:function(e){arguments[0]=e=a.$handleEvent(e),a.checkPay(1)}}},[t("v-uni-view",{staticClass:"imgPackage"},[t("v-uni-image",{attrs:{src:a.imgfixUrls+"merchant/balancePay.svg"}})],1),t("v-uni-view",{staticClass:"inputPackage"},[t("v-uni-view",{staticClass:"inputPackageMain"},[t("v-uni-view",{staticClass:"inputPackageLeft"},[t("v-uni-view",{staticClass:"inputPackageLeftTitle"},[a._v(a._s(a.textSubData.moneytext)+"支付")]),t("v-uni-view",{staticClass:"inputPackageLeftBody"},[a._v("账户余额:¥"+a._s(a.payInfo.balance))])],1),1==a.type?t("v-uni-view",{staticClass:"inputPackageRightCheck"},[t("v-uni-image",{attrs:{src:a.imgfixUrls+"merchant/payCheck.svg"}})],1):a._e(),1!==a.type?t("v-uni-view",{staticClass:"inputPackageRight"}):a._e()],1)],1)],1),a.payInfo.diy_userInfo?t("v-uni-view",{staticClass:"paymentTypeList",on:{click:function(e){arguments[0]=e=a.$handleEvent(e),a.checkPay(4)}}},[t("v-uni-view",{staticClass:"imgPackage"},[t("v-uni-image",{attrs:{src:a.imgfixUrls+"merchant/balancePay.svg"}})],1),t("v-uni-view",{staticClass:"inputPackage"},[t("v-uni-view",{staticClass:"inputPackageMain"},[t("v-uni-view",{staticClass:"inputPackageLeft",staticStyle:{flex:"1"}},[t("v-uni-view",{staticClass:"inputPackageLeftTitle"},[a._v("兑换券抵扣"),t("v-uni-text",{staticStyle:{padding:"0 10upx"}},[a._v(":")]),a._v("可用兑换券金额"),t("v-uni-text",{staticStyle:{padding:"0 10upx",color:"#EF4740","font-weight":"700"}},[a._v(a._s(a.payInfo.balance))]),t("v-uni-text",{staticStyle:{padding:"0 10upx"}},[a._v("(可抵用"),t("v-uni-text",{staticStyle:{padding:"0 10upx",color:"#EF4740","font-weight":"700"}},[a._v(a._s(a.payInfo.diy_userInfo.dkprice))]),a._v("元)")],1)],1),t("v-uni-view",{staticClass:"inputPackageLeftBody dis-flex",staticStyle:{color:"#333333"}},[t("v-uni-view",[a._v(a._s(a.payInfo.diy_userInfo.dhtip2))]),t("v-uni-view",{staticClass:"conversion",on:{click:function(e){e.stopPropagation(),arguments[0]=e=a.$handleEvent(e),a.goduurUrl(a.payInfo.diy_userInfo.dhurl)}}},[a._v("去兑换"),t("v-uni-text",{staticClass:"iconfont icon-right",staticStyle:{"font-size":"24upx"}})],1)],1)],1),4==a.type?t("v-uni-view",{staticClass:"inputPackageRightCheck"},[t("v-uni-image",{attrs:{src:a.imgfixUrls+"merchant/payCheck.svg"}})],1):a._e(),4!==a.type?t("v-uni-view",{staticClass:"inputPackageRight"}):a._e()],1)],1)],1):a._e(),1==a.payInfo.wechat?t("v-uni-view",{staticClass:"paymentTypeList",on:{click:function(e){arguments[0]=e=a.$handleEvent(e),a.checkPay(2)}}},[t("v-uni-view",{staticClass:"imgPackage"},[t("v-uni-image",{attrs:{src:a.imgfixUrls+"merchant/wechatPay.svg"}})],1),t("v-uni-view",{staticClass:"inputPackage"},[t("v-uni-view",{staticClass:"inputPackageMain"},[t("v-uni-view",{staticClass:"inputPackageLeft"},[t("v-uni-view",{staticClass:"inputPackageLeftTitle"},[a._v("微信支付")]),t("v-uni-view",{staticClass:"inputPackageLeftBody"},[a._v("微信支付,安全快捷")])],1),2==a.type?t("v-uni-view",{staticClass:"inputPackageRightCheck"},[t("v-uni-image",{attrs:{src:a.imgfixUrls+"merchant/payCheck.svg"}})],1):a._e(),2!==a.type?t("v-uni-view",{staticClass:"inputPackageRight"}):a._e()],1)],1)],1):a._e(),1==a.payInfo.yunpay?t("v-uni-view",{staticClass:"paymentTypeList",on:{click:function(e){arguments[0]=e=a.$handleEvent(e),a.checkPay(5)}}},[t("v-uni-view",{staticClass:"imgPackage"},[t("v-uni-image",{attrs:{src:a.payInfo.yunset.logo?a.payInfo.yunset.logo:a.imgfixUrls+"merchant/wechatPay.svg"}})],1),t("v-uni-view",{staticClass:"inputPackage"},[t("v-uni-view",{staticClass:"inputPackageMain"},[t("v-uni-view",{staticClass:"inputPackageLeft"},[t("v-uni-view",{staticClass:"inputPackageLeftTitle"},[a._v(a._s(a.payInfo.yunset.title))]),t("v-uni-view",{staticClass:"inputPackageLeftBody"},[a._v(a._s(a.payInfo.yunset.desc))])],1),5==a.type?t("v-uni-view",{staticClass:"inputPackageRightCheck"},[t("v-uni-image",{attrs:{src:a.imgfixUrls+"merchant/payCheck.svg"}})],1):a._e(),5!==a.type?t("v-uni-view",{staticClass:"inputPackageRight"}):a._e()],1)],1)],1):a._e(),1==a.payInfo.alipay?t("v-uni-view",{staticClass:"paymentTypeList",on:{click:function(e){arguments[0]=e=a.$handleEvent(e),a.checkPay(3)}}},[t("v-uni-view",{staticClass:"imgPackage"},[t("v-uni-image",{attrs:{src:a.imgfixUrls+"merchant/payPal.svg"}})],1),t("v-uni-view",{staticClass:"inputPackage1"},[t("v-uni-view",{staticClass:"inputPackageMain"},[t("v-uni-view",{staticClass:"inputPackageLeft"},[t("v-uni-view",{staticClass:"inputPackageLeftTitle"},[a._v(a._s(0==a.examineing?"支付宝账号":"渠道1")+"支付")]),t("v-uni-view",{staticClass:"inputPackageLeftBody"},[a._v("简单、安全、快速")])],1),3==a.type?t("v-uni-view",{staticClass:"inputPackageRightCheck"},[t("v-uni-image",{attrs:{src:a.imgfixUrls+"merchant/payCheck.svg"}})],1):a._e(),3!==a.type?t("v-uni-view",{staticClass:"inputPackageRight"}):a._e()],1)],1)],1):a._e()],1),t("v-uni-view",{staticClass:"paySubmitPackage",style:{marginTop:a.payInfo.diy_userInfo?"0":"100upx"}},[a.payInfo.diy_userInfo?t("v-uni-view",{staticClass:"t-c",staticStyle:{"padding-top":"70upx","padding-bottom":"200upx"}},[t("v-uni-view",{staticClass:"t-c f-24",staticStyle:{color:"#E44131"}},[a._v("实付款")]),t("v-uni-view",{staticClass:"f-w",staticStyle:{color:"#E44131","padding-top":"10upx"}},[t("v-uni-text",{staticClass:"f-38",staticStyle:{"padding-right":"10upx"}},[a._v("¥")]),2==a.type||3==a.type?t("v-uni-text",{staticStyle:{"font-size":"60upx"}},[a._v(a._s(a.payInfo.price))]):a._e(),2!==a.type&&3!==a.type?t("v-uni-text",{staticStyle:{"font-size":"60upx"}},[a._v(a._s(Math.round(100*(Math.abs(parseFloat(a.payInfo.diy_userInfo.dkprice)-parseFloat(a.payInfo.price))+Number.EPSILON))/100))]):a._e()],1),2==a.type||3==a.type?t("v-uni-view",{staticClass:"f-24",staticStyle:{color:"#999999","padding-top":"10upx"}},[a._v("总价:¥"+a._s(a.payInfo.price)+",兑换券抵扣:0.00")]):a._e(),2!==a.type&&3!==a.type?t("v-uni-view",{staticClass:"f-24",staticStyle:{color:"#999999","padding-top":"10upx"}},[a._v("总价:¥"+a._s(a.payInfo.price)+",兑换券抵扣:¥"+a._s(a.payInfo.diy_userInfo.dkprice))]):a._e()],1):a._e(),t("v-uni-view",{staticClass:"paySubmit",on:{click:function(e){arguments[0]=e=a.$handleEvent(e),a.goPay.apply(void 0,arguments)}}},[t("span",[a._v("确认支付")])])],1)],1)],1)},s=[]},"6e52":function(a,e,t){"use strict";var i=t("bfff"),n=t.n(i);n.a},bfff:function(a,e,t){var i=t("cc78");"string"===typeof i&&(i=[[a.i,i,""]]),i.locals&&(a.exports=i.locals);var n=t("4f06").default;n("184b2795",i,!0,{sourceMap:!1,shadowMode:!1})},cc78:function(a,e,t){var i=t("24fb");e=i(!1),e.push([a.i,"uni-page-body[data-v-0853826e]{background:#fff!important;overflow-x:hidden}.payment[data-v-0853826e]{font-size:0;background:#fff!important;padding-bottom:%?50?%}.paymentPackage[data-v-0853826e]{border:1px solid transparent}.surplusTime[data-v-0853826e]{margin-top:%?99?%;text-align:center}.surplusTime > span[data-v-0853826e]{font-size:%?24?%;color:#999}.conversion[data-v-0853826e]{padding:%?6?% %?10?%;margin-left:%?20?%;min-width:%?100?%;height:%?40?%;line-height:%?38?%;display:inline-block;color:#fff;background:linear-gradient(90deg,#ee3023,#fa6033);border-radius:%?7?%}.price[data-v-0853826e]{margin-top:%?29?%;text-align:center}.price > span[data-v-0853826e]{font-size:%?48?%;font-weight:700;color:#333}.price > span > span[data-v-0853826e]{font-size:%?72?%}.goodsInfo[data-v-0853826e]{text-align:center;width:%?367?%;margin:%?28?% auto 0 auto}.goodsInfo > span[data-v-0853826e]{font-size:%?24?%;color:#999}.paymentTypePackage[data-v-0853826e]{margin-top:%?60?%;padding:0 %?30?%}.paymentTypeList[data-v-0853826e]{margin-top:%?39?%}.paymentTypeList > uni-view[data-v-0853826e]{display:inline-block}.imgPackage[data-v-0853826e]{vertical-align:top;width:%?45?%;height:%?50?%}.imgPackage > uni-image[data-v-0853826e]{width:%?45?%;height:%?50?%}.inputPackage[data-v-0853826e]{vertical-align:top;margin-left:%?38?%;width:%?600?%;border-bottom:1px solid #eee}.inputPackage1[data-v-0853826e]{vertical-align:top;margin-left:%?38?%;width:%?600?%}.inputPackageLeftTitle[data-v-0853826e]{font-size:%?28?%;color:#333}.inputPackageMain[data-v-0853826e]{width:%?600?%;padding-bottom:%?40?%;display:flex;justify-content:space-between}.inputPackageMain > uni-view[data-v-0853826e]{vertical-align:middle;display:inline-block}.inputPackageLeftBody[data-v-0853826e]{margin-top:%?9?%;font-size:%?24?%;color:#999}.paySubmit[data-v-0853826e]{position:fixed;bottom:10vh;margin-left:%?60?%;width:%?630?%;height:%?80?%;background:#f44;border-radius:%?10?%;text-align:center}.paySubmit > span[data-v-0853826e]{font-size:%?28?%;color:#fff;line-height:%?80?%}.inputPackageRight[data-v-0853826e]{margin-top:%?20?%;width:%?40?%;height:%?40?%;border:%?1?% solid #ccc;border-radius:50%}.inputPackageRightCheck[data-v-0853826e]{margin-top:%?20?%;width:%?40?%;height:%?40?%;background:#f44;border-radius:50%;text-align:center;overflow:hidden}.inputPackageRightCheck > uni-image[data-v-0853826e]{margin-top:%?11?%;width:%?28?%;height:%?23?%}body.?%PAGE?%[data-v-0853826e]{background:#fff!important}",""]),a.exports=e}}]);