H5-ThreeDoorder/unpackage/dist/build/web/static/js/pages-diy-pay-status-pay-st...

1 line
14 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-diy-pay-status-pay-status"],{"097c":function(t,e,n){"use strict";n.r(e);var r=n("f359"),i=n("6c85");for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);n("8c93");var o=n("828b"),c=Object(o["a"])(i["default"],r["b"],r["c"],!1,null,"4a7992f5",null,!1,r["a"],void 0);e["default"]=c.exports},"6c85":function(t,e,n){"use strict";n.r(e);var r=n("e1f3"),i=n.n(r);for(var a in r)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(a);e["default"]=i.a},"7f6b":function(t,e,n){var r=n("f71d");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var i=n("967d").default;i("4049a0b7",r,!0,{sourceMap:!1,shadowMode:!1})},"80e1":function(t,e,n){"use strict";(function(t){n("6a54");var r=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("c223"),n("5ef2"),n("5c47"),n("0506"),n("aa9c"),n("64aa"),n("c9b5"),n("bf0f"),n("ab80"),n("a1c1"),n("e966"),n("d4b5"),n("7a76");var i=r(n("fcf3")),a=r(n("9b1b")),o=(n("35ff"),n("03cc")),c=n("1bcb"),s=n("8f59"),u=n("4e62"),l={computed:{},methods:(0,a.default)((0,a.default)({},(0,s.mapMutations)(["GetState"])),{},{qnyurl:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"v2";return"https://img.agrimedia.cn/chwl/".concat(e,"/").concat(t)},RetainDecimalPoint:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=2;e&&(t/=100);var r=""+t;if(-1!=r.indexOf(".")){var i=r.indexOf("."),a=r.substring(i+1,r.length);if(!(a["length"]<n))return r.substring(0,i+3);for(var o=0;o<n-a["length"];o++)r+="0";return r}var c=/(^[1-9]\d*$)/;if(c.test(t)){for(var s=[],u="",l=0;l<r["length"];l++)s.push(r[l]);for(var d=0;d<s.length;d++)if(u+=s[d],d>=s.length-1){u+=".";for(var f=0;f<n;f++)u+="0"}return u}return r},RetainDecimalPoints:function(e){var n=e.num,r=void 0===n?0:n,i=e.iscarry,a=void 0===i||i,o=e.toFixed,c=void 0===o?2:o;if(t.log(r.__proto__.constructor.name,"numnum"),"string"!==r.__proto__.constructor.name&&"string"!==typeof r)throw"所传参数不是字符串";c=Number(c),a&&(r=""+r/100);var s=r.indexOf(".");if(-1!=s)if(c>0){var u=r.substring(s+1,r.length);if(u["length"]>c)r=r.substring(0,s+1+c);else for(var l=0;l<c-u["length"];l++)r+="0"}else r=r.substring(0,s);else{if(/(^[1-9]\d*$)/.test(r)){var d,f="";d=r.split("");for(var p=0;p<d.length;p++)if(f+=d[p],p>=d.length-1){f+=".";for(var v=0;v<c;v++)f+="0"}r=f}}return r},_commission:function(t){return this.RetainDecimalPoints({num:String(t),iscarry:!1,toFixed:4})},_fixed:function(t){return t.toFixed(2)},_amount:function(t){return this.RetainDecimalPoints({num:String(t),iscarry:!0,toFixed:2})},__amount:function(t){return this.RetainDecimalPoints({num:String(t),iscarry:!1,toFixed:2})},_deduction_prop_:function(e,n,r){var i=this.RetainDecimalPoints({num:String(n*(e/100)),iscarry:!1,toFixed:0});t.log(i,"补贴了多少");var a=this.RetainDecimalPoints({num:String(n-i),iscarry:!0,toFixed:2});t.log(a,"补贴后的价格");var o={Subsidyprice:this.RetainDecimalPoints({num:String(i),iscarry:!0,toFixed:2}),AfterSubsidy:a};return r?o[r]:o},calc:function(t,e,n){var r,i,a,o,c,s,u,l,d=0,f=0,p=1;switch(r=t.toString(),i=e.toString(),s=-1!=r.indexOf("."),u=-1!=i.indexOf("."),s&&(d=r.split(".")[1].length),u&&(f=i.split(".")[1].length),a=d>f?d:f,o=d<f?d:f,n){case"+":case"-":case"/":c=a-o;for(var v=0;v<c;v++)d==o?r+="0":i+="0";break;case"*":a+=o;break;default:return"暂不支持的计算类型,现已支持的有加法、减法、乘法、除法"}r=r.replace(".",""),i=i.replace(".","");for(v=0;v<a;v++)p*=10;switch(t=parseInt(r),e=parseInt(i),n){case"+":l=(t+e)/p;break;case"-":l=(t-e)/p;break;case"*":l=t*e/p;break;case"/":l=t/e;break;default:return"暂不支持的计算类型,现已支持的有加法、减法、乘法、除法"}return l},leftClick:function(t,e){t?uni.redirectTo({url:e}):uni.navigateBack({delta:1})},location:function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(){var e,n=null===(e=getApp()["globalData"]["parameters"])||void 0===e?void 0:e.isWechat;t.log("是否小程序环境",getApp()["globalData"]["parameters"]),n?wx.miniProgram.navigateTo({url:"/pages/wxpay/openCustomerServiceChat?url=".concat(u.RXSERVICE)}):location.href="https://work.weixin.qq.com/kfid/kfc2f4d0cb26562ffe1"})),ImgSplicing:function(t){return"https://img.agrimedia.cn/chwl/H5card/".concat(t)},openLocation:function(){uni.showToast({title:"定位功能正在维护",icon:"none"})},payment:function(e){var n;uni.showLoading({title:"加载中"});var r=e.order_sn,i=e.type,a=e.redirect_url,o=void 0===a?"":a;t.log(r,i,o,"支付方法参数1"),null!==(n=getApp()["globalData"]["parameters"])&&void 0!==n&&n.isWechat?(t.log("呼呼1"),this._H5WXPAY(e).then((function(e){uni.hideLoading(),t.log(e["data"],"微信支付参数");var n={timeStamp:encodeURIComponent(e["data"]["result"]["timestamp"]),nonceStr:encodeURIComponent(e["data"]["result"]["nonceStr"]),package:encodeURIComponent(e["data"]["result"]["package"]),signType:encodeURIComponent(e["data"]["result"]["signType"]),paySign:encodeURIComponent(e["data"]["result"]["paySign"]),order_sn:e["data"]["out_trade_no"],type:i,business:"H5Environment",return_url:o};t.log(encodeURIComponent(JSON.stringify(n)),"编码"),wx.miniProgram.navigateTo({url:"/pages/wxpay/wxpay?data=".concat(encodeURIComponent(JSON.stringify(n)),"&isencodeURL=true")})}))):(t.log("呼呼2"),(0,c.WXpayH5API)({order_sn:r,type:i,redirect_url:"".concat(getApp()["globalData"]["urlfileName"],"/pages/pay/index?order_sn=").concat(r,"&type=").concat(i,"&redirect_url=").concat(o)}).then((function(e){t.log("".concat(getApp()["globalData"]["urlfileName"],"/pages/pay/index?order_sn=").concat(r,"&type=").concat(i,"&redirect_url=").concat(o)),t.log(e["data"]["redirect_url"],"支付方法地址"),window.location.replace(e["data"]["redirect_url"])})))},_H5WXPAY:function(t){if(3==t["type"]){var e=t.order_sn,n=t.money;return(0,o.WXpayAPI)({out_order_num:e,money:n})}if(4==t["type"]){var r=t.order_sn;return(0,o.WXpayDYPAPI)({orderNo:r})}if(7==t["type"]){var i=t.order_sn,a=t.type,s=t.redirect_url;return(0,c.WXpayH5API)({order_sn:i,type:a,redirect_url:s})}},pay_statepage:function(e,n){var r="";if(r+=n,t.log(r,"判断跳转链接"),t.log("拼接参数"),"undefined"!==typeof e)for(var i in e)-1!=r.indexOf("?")?r+="&".concat(i,"=").concat(e[i]):r+="?".concat(i,"=").concat(e[i]);t.log(r,"地址"),n&&uni.redirectTo({url:r})},initScrollView:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:data,n=e.el,r=e.bottomlb,a=void 0===r?0:r,o=this;return new Promise((function(e,r){uni.getSystemInfo({success:function(r){"string"===typeof n?uni.createSelectorQuery().in(o).select(".".concat(n)).boundingClientRect((function(i){t.log(i,o["NAVHEIGHT"],a,"元素高度"),0==i["height"]&&"OrderToggleType"==n&&(a=45),e((r.windowHeight-(i["height"]+o["NAVHEIGHT"]+a))*(750/r["windowWidth"]))})).exec():"object"===(0,i.default)(n)&&function(){for(var e=[],r=0;r<n["length"];r++)uni.createSelectorQuery().in(o).select(".".concat(n[r])).boundingClientRect((function(n){e.push(n["height"]),t.log(e,"高度")})).exec()}()}})}))},deepClone:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){if(!t||"object"!==(0,i.default)(t))throw new Error("error arguments","shallowClone");var e=t.constructor===Array?[]:{};for(var n in t)t.hasOwnProperty(n)&&(t[n]&&"object"===(0,i.default)(t[n])?(e[n]=t[n].constructor===Array?[]:{},e[n]=deepClone(t[n])):e[n]=t[n]);return e})),Copy:function(t){uni.setClipboardData({data:t,success:function(){uni.showToast({title:"复制成功",icon:"none"})}})},GetUserchooseLocation:function(){return new Promise((function(e,n){uni.chooseLocation({success:function(r){getCityName2(r["latitude"],r["longitude"]).then((function(n){t.log(n,"eeeeeeeeeee");var r=n.result,i=r.address,a=r.ad_info,o=a.province,c=a.city,s=a.district,u=a.location,l=a.city_code,d=a.name,f=r.formatted_addresses.recommend;e({province:o,city:c,district:s,location:u,city_code:l,name:d,recommend:f,address:i})})).catch((function(t){n(t)}))}})}))},handleOpen:function(){},regYuanToFen:function(t,e){var n=0,r=t.toString(),i=e.toString();try{n+=r.split(".")[1].length}catch(a){}try{n+=i.split(".")[1].length}catch(a){}return Number(r.replace(".",""))*Number(i.replace(".",""))/Math.pow(10,n)},getUrlParams:function(t){try{for(var e=t.split("?")[1],n={},r=e.split("&"),i=0,a=r.length;i<a;i++){var o=r[i].split("=");n[o[0]]=o[1]}return n}catch(c){return!1}}}),filters:{OrderState:function(t){switch(t){case 0:return"待支付";case 1:return"待发货";case 2:return"待收货";case 3:return"已退款";case 4:return"已取消";case 5:return"完成"}}}};e.default=l}).call(this,n("ba7c")["default"])},"8c93":function(t,e,n){"use strict";var r=n("7f6b"),i=n.n(r);i.a},e1f3:function(t,e,n){"use strict";n("6a54");var r=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;n("8f59");var i=n("ea2c"),a=r(n("80e1")),o={mixins:[a.default],data:function(){return{order_sn:0,state:-1,OrderInfor:{},tiem:null}},onLoad:function(t){this["order_sn"]=t["order_sn"],this.GetInfor()},methods:{GetInfor:function(){var t=this;(0,i.orderInfoAPI)({order_sn:this["order_sn"]}).then((function(e){clearInterval(t["tiem"]),t["tiem"]=null,t["OrderInfor"]=e["data"],0==e["data"]["pay_status"]&&(t["tiem"]=setInterval((function(){t.GetInfor(t["order_sn"])}),1500))}))}},onUnload:function(){clearInterval(this["tiem"]),this["tiem"]=null}};e.default=o},f359:function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){}));var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"page"},[1==t.OrderInfor["pay_status"]?n("v-uni-view",{},[n("v-uni-view",{staticStyle:{"text-align":"center"}},[n("v-uni-image",{staticStyle:{width:"230rpx",height:"230rpx",margin:"auto"},attrs:{src:"https://img.agrimedia.cn/chwl/v2/pay_success.png",mode:"aspectFit"}})],1),n("v-uni-view",{staticStyle:{"background-color":"#FFFFFF","border-radius":"15rpx"}},[n("v-uni-view",{staticStyle:{display:"flex","justify-content":"space-between",padding:"0 32rpx"}},[n("v-uni-view",{staticClass:"Label"},[t._v("支付金额")]),n("v-uni-view",{staticClass:"value"},[t._v("¥"+t._s(t._amount(t.OrderInfor["pay_price"])))])],1),n("v-uni-view",{staticStyle:{display:"flex","justify-content":"space-between",padding:"0 32rpx"}},[n("v-uni-view",{staticClass:"Label"},[t._v("支付时间")]),n("v-uni-view",{staticClass:"value"},[t._v(t._s(new Date(1675218434e3).getFullYear()+"/"+(new Date(1675218434e3).getMonth()+1)+"/"+new Date(1675218434e3).getDate()+" "+new Date(1675218434e3).getHours()+":"+new Date(1675218434e3).getMinutes()+":"+new Date(1675218434e3).getSeconds()))])],1),n("v-uni-view",{staticStyle:{display:"flex","justify-content":"space-between",padding:"0 32rpx"}},[n("v-uni-view",{staticClass:"Label"},[t._v("支付方式")]),n("v-uni-view",{staticClass:"value"},[t._v(t._s(t.OrderInfor["pay_type"]?"支付宝":"微信"))])],1)],1)],1):t._e(),0==t.OrderInfor["pay_status"]?n("v-uni-view",{staticStyle:{"text-align":"center"}},[n("v-uni-image",{staticStyle:{width:"230rpx",height:"230rpx",margin:"auto"},attrs:{src:"https://img.agrimedia.cn/chwl/v2/pay_fail.png",mode:"aspectFit"}}),n("v-uni-view",{staticStyle:{"background-color":"#FFFFFF","border-radius":"15rpx"}},[n("v-uni-view",{staticStyle:{display:"flex","justify-content":"space-between",padding:"0 32rpx"}},[n("v-uni-view",{staticClass:"Label"},[t._v("支付金额")]),n("v-uni-view",{staticClass:"value"},[t._v("¥"+t._s(t._amount(t.OrderInfor["pay_price"])))])],1),n("v-uni-view",{staticStyle:{display:"flex","justify-content":"space-between",padding:"0 32rpx"}},[n("v-uni-view",{staticClass:"Label"},[t._v("下单时间")]),n("v-uni-view",{staticClass:"value"},[t._v(t._s(t.OrderInfor["create_time"]))])],1)],1)],1):t._e(),n("v-uni-navigator",{attrs:{url:"/pages/diy/orders/order-infor/order-infor?order_sn="+t.order_sn,"open-type":"redirect"}},[n("v-uni-button",{staticClass:"button_1"},[t._v("查看订单")])],1)],1)},i=[]},f71d:function(t,e,n){var r=n("c86c");e=r(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */.skeleton[data-v-4a7992f5]{background-color:#f1f2f4!important;color:#f1f2f4!important;margin:var(--skeleton)}\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.page[data-v-4a7992f5]{background-color:#f5f5f5;position:relative;width:%?750?%;height:%?1623?%;overflow:hidden;display:flex;flex-direction:column}.Label[data-v-4a7992f5], .value[data-v-4a7992f5]{font-size:%?28?%;font-weight:900;line-height:%?80?%}.button_1[data-v-4a7992f5]{color:#fff;margin:%?60?% %?32?%;background:linear-gradient(90deg,#ffad02,#fd8f3b)}',""]),t.exports=e}}]);