dggzichahu/public/pc/_nuxt/cb0640f.js

1 line
13 KiB
JavaScript
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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([[33,15,16],{404:function(t,e,r){"use strict";var n=r(11),o=r(5),c=r(116),d=r(23),l=r(15),m=r(52),f=r(251),h=r(81),v=r(7),y=r(83),_=r(82).f,x=r(42).f,w=r(22).f,S=r(405).trim,C="Number",N=o.Number,I=N.prototype,T=m(y(I))==C,E=function(t){var e,r,n,o,c,d,l,code,m=h(t,!1);if("string"==typeof m&&m.length>2)if(43===(e=(m=S(m)).charCodeAt(0))||45===e){if(88===(r=m.charCodeAt(2))||120===r)return NaN}else if(48===e){switch(m.charCodeAt(1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+m}for(d=(c=m.slice(2)).length,l=0;l<d;l++)if((code=c.charCodeAt(l))<48||code>o)return NaN;return parseInt(c,n)}return+m};if(c(C,!N(" 0o1")||!N("0b1")||N("+0x1"))){for(var O,M=function(t){var e=arguments.length<1?0:t,r=this;return r instanceof M&&(T?v((function(){I.valueOf.call(r)})):m(r)!=C)?f(new N(E(e)),r,M):E(e)},A=n?_(N):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),R=0;A.length>R;R++)l(N,O=A[R])&&!l(M,O)&&w(M,O,x(N,O));M.prototype=I,I.constructor=M,d(o,C,M)}},405:function(t,e,r){var n=r(27),o="["+r(406)+"]",c=RegExp("^"+o+o+"*"),d=RegExp(o+o+"*$"),l=function(t){return function(e){var r=String(n(e));return 1&t&&(r=r.replace(c,"")),2&t&&(r=r.replace(d,"")),r}};t.exports={start:l(1),end:l(2),trim:l(3)}},406:function(t,e){t.exports="\t\n\v\f\r    \u2028\u2029\ufeff"},407:function(t,e,r){var content=r(409);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(14).default)("03051d40",content,!0,{sourceMap:!1})},408:function(t,e,r){"use strict";r(407)},409:function(t,e,r){var n=r(13)(!1);n.push([t.i,".price-format{display:flex;align-items:baseline}",""]),t.exports=n},410:function(t,e,r){"use strict";r.r(e);r(404),r(68),r(252);var n={data:function(){return{priceSlice:{}}},components:{},props:{firstSize:{type:Number,default:14},secondSize:{type:Number,default:14},color:{type:String},weight:{type:[String,Number],default:500},price:{type:[String,Number],default:""},showSubscript:{type:Boolean,default:!0},subscriptSize:{type:Number,default:14},lineThrough:{type:Boolean,default:!1}},created:function(){this.priceFormat()},watch:{price:function(t){this.priceFormat()}},methods:{priceFormat:function(){var t=this.price,e={};null!==t&&(t=parseFloat(t),t=String(t).split("."),e.first=t[0],e.second=t[1],this.priceSlice=e)}}},o=(r(408),r(8)),component=Object(o.a)(n,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("span",{class:(t.lineThrough?"line-through":"")+"price-format",style:{color:t.color,"font-weight":t.weight}},[t.showSubscript?r("span",{style:{"font-size":t.subscriptSize+"px","margin-right":"1px"}},[t._v("¥")]):t._e(),t._v(" "),r("span",{style:{"font-size":t.firstSize+"px","margin-right":"1px"}},[t._v(t._s(t.priceSlice.first))]),t._v(" "),t.priceSlice.second?r("span",{style:{"font-size":t.secondSize+"px"}},[t._v("."+t._s(t.priceSlice.second))]):t._e()])}),[],!1,null,null,null);e.default=component.exports},416:function(t,e,r){"use strict";r.d(e,"d",(function(){return n})),r.d(e,"e",(function(){return o})),r.d(e,"c",(function(){return c})),r.d(e,"b",(function(){return d})),r.d(e,"a",(function(){return l}));var n=5,o={SMS:0,ACCOUNT:1},c={REGISTER:"ZCYZ",FINDPWD:"ZHMM",LOGIN:"YZMDL",CHANGE_MOBILE:"BGSJHM",BIND:"BDSJHM"},d={NONE:"",SEX:"sex",NICKNAME:"nickname",AVATAR:"avatar",MOBILE:"mobile"},l={NORMAL:"normal",HANDLING:"apply",FINISH:"finish"}},417:function(t,e,r){"use strict";r.r(e);r(404),r(69),r(53),r(18),r(85),r(68),r(84);var n=6e4,o=36e5,c=24*o;function d(t){return(0+t.toString()).slice(-2)}var l={components:{},props:{isSlot:{type:Boolean,default:!1},time:{type:Number,default:0},format:{type:String,default:"hh:mm:ss"},autoStart:{type:Boolean,default:!0}},watch:{time:{immediate:!0,handler:function(t){t&&this.reset()}}},data:function(){return{timeObj:{},formateTime:0}},created:function(){},computed:{},methods:{createTimer:function(t){return setTimeout(t,100)},isSameSecond:function(t,e){return Math.floor(t)===Math.floor(e)},start:function(){this.counting||(this.counting=!0,this.endTime=Date.now()+1e3*this.remain,this.setTimer())},setTimer:function(){var t=this;this.tid=this.createTimer((function(){var e=t.getRemain();t.isSameSecond(e,t.remain)&&0!==e||t.setRemain(e),0!==t.remain&&t.setTimer()}))},getRemain:function(){return Math.max(this.endTime-Date.now(),0)},pause:function(){this.counting=!1,clearTimeout(this.tid)},reset:function(){this.pause(),this.remain=this.time,this.setRemain(this.remain),this.autoStart&&this.start()},setRemain:function(t){var e=this.format;this.remain=t;var time,r=(time=t,{days:Math.floor(time/c),hours:d(Math.floor(time%c/o)),minutes:d(Math.floor(time%o/n)),seconds:d(Math.floor(time%n/1e3))});this.formateTime=function(t,e){var r=e.days,n=e.hours,o=e.minutes,c=e.seconds;return-1!==t.indexOf("dd")&&(t=t.replace("dd",r)),-1!==t.indexOf("hh")&&(t=t.replace("hh",d(n))),-1!==t.indexOf("mm")&&(t=t.replace("mm",d(o))),-1!==t.indexOf("ss")&&(t=t.replace("ss",d(c))),t}(e,r),this.$emit("change",r),0===t&&(this.pause(),this.$emit("finish"))}}},m=r(8),component=Object(m.a)(l,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.time>=0?r("div",[r("client-only",[t.isSlot?t._t("default"):r("span",[t._v(t._s(t.formateTime))])],2)],1):t._e()}),[],!1,null,null,null);e.default=component.exports},468:function(t,e,r){t.exports=r.p+"img/pay_success.3a82887.png"},483:function(t,e,r){var content=r(529);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(14).default)("27992108",content,!0,{sourceMap:!1})},527:function(t,e,r){t.exports=r.p+"img/pay_wait.2214e17.png"},528:function(t,e,r){"use strict";r(483)},529:function(t,e,r){var n=r(13)(!1);n.push([t.i,".payment[data-v-0f5057c7]{margin:16px 0;padding:0 40px}.payment .payment-hd>img[data-v-0f5057c7]{width:32px;height:32px}.payment .payment-hd .status[data-v-0f5057c7]{font-size:24px}.payment .payment-con[data-v-0f5057c7],.payment .payment-hd[data-v-0f5057c7]{padding:32px 0;border-bottom:1px dashed #e5e5e5}.payment .payment-con .item[data-v-0f5057c7]{align-items:flex-start}.payment .payment-footer[data-v-0f5057c7]{padding:32px 0}.payment .payment-footer .pay-way[data-v-0f5057c7]{width:200px;height:68px;cursor:pointer;margin-right:32px;border:1px dashed #e5e5e5}.payment .payment-footer .pay-way img[data-v-0f5057c7]{width:30px;height:30px}.payment .payment-footer .btn[data-v-0f5057c7]{width:134px;height:40px;border:1px solid #e5e5e5}.payment .el-dialog .pay-code[data-v-0f5057c7]{width:270px;height:270px}.payment .el-dialog .pay-money[data-v-0f5057c7]{font-size:18px;margin-top:24px;align-items:baseline}",""]),t.exports=n},602:function(t,e,r){"use strict";r.r(e);var n=r(3),o=(r(69),r(47),r(417)),c=r(416),d={head:function(){return{title:this.$store.getters.headTitle,link:[{rel:"icon",type:"image/x-icon",href:this.$store.getters.favicon}]}},components:{CountDown:o.default},asyncData:function(t){return Object(n.a)(regeneratorRuntime.mark((function e(){var r,n,o,data;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.query,n=t.$get,e.next=3,n("order/detail",{params:{id:r.id}});case 3:return o=e.sent,data=o.data,e.abrupt("return",{order:data});case 6:case"end":return e.stop()}}),e)})))()},data:function(){return{showWxpay:!1,showAlipay:!1,payWayArr:[],payInfo:{},cancelTime:0,alipayHtml:""}},created:function(){this.id=this.$route.query.id,this.getPayway()},beforeDestroy:function(){clearInterval(this.timer)},methods:{getPayway:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){var r,code,data;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$get("payment/payway");case 2:r=e.sent,code=r.code,data=r.data,1==code&&(t.payWayArr=data,t.payWayArr.length||t.$message({message:"请联系管理员配置支付方式",type:"error"}));case 6:case"end":return e.stop()}}),e)})))()},orderPay:function(t){var e=this;return Object(n.a)(regeneratorRuntime.mark((function r(){var n,data,code,o,d,div;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.$post("payment/pcPrepay",{order_id:e.id,pay_way:t,order_source:c.d});case 2:n=r.sent,data=n.data,code=n.code,o=n.msg,1==code?(e.payInfo=data,e.showWxpay=!0,e.createTimer()):20001==code?((d=document.getElementsByTagName("divform")).length&&document.body.removeChild(d[0]),(div=document.createElement("divform")).innerHTML=data.data,document.body.appendChild(div),document.forms[0].submit()):10001==code&&(e.$message({message:o,type:"success"}),e.getOrder());case 7:case"end":return r.stop()}}),r)})))()},clearTimer:function(){clearInterval(this.timer)},createTimer:function(){var t=this;this.timer&&clearInterval(this.timer),this.timer=setInterval((function(){t.getOrder()}),2e3)},getOrder:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){var r,data,code;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$get("order/detail",{params:{id:t.id}});case 2:r=e.sent,data=r.data,code=r.code,r.msg,1==code&&(t.order=data,1==data.pay_status&&(clearInterval(t.timer),t.showWxpay=!1));case 7:case"end":return e.stop()}}),e)})))()}},computed:{getOrderStatus:function(){return function(t){var text="";switch(t){case 0:text="待支付";break;case 1:text="待发货";break;case 2:text="待收货";break;case 3:text="已完成";break;case 4:text="订单已关闭"}return text}},getCancelTime:function(){return function(time){return time-Date.now()/1e3}}}},l=(r(528),r(8)),component=Object(l.a)(d,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"payment bg-white"},[n("div",{staticClass:"payment-hd row"},[0==t.order.pay_status?[n("img",{attrs:{src:r(527),alt:""}}),t._v(" "),n("div",{staticClass:"status ml8 mr16 bold"},[t._v("\n "+t._s(t.getOrderStatus(t.order.order_status))+"\n ")]),t._v(" "),t.getCancelTime(t.order.order_cancel_time)>0?n("div",{staticClass:"row"},[t._v("\n 请在\n "),n("count-down",{style:{color:"#FF2C3C"},attrs:{time:t.getCancelTime(t.order.order_cancel_time),format:"hh时mm分ss秒"},on:{finish:t.getOrder}}),t._v("\n 完成支付, 超时后将取消订单\n ")],1):t._e()]:t._e(),t._v(" "),1==t.order.pay_status?[n("img",{attrs:{src:r(468),alt:""}}),t._v(" "),n("div",{staticClass:"status ml8 mr16 bold"},[t._v("支付成功")])]:t._e()],2),t._v(" "),n("div",{staticClass:"payment-con"},[n("div",{staticClass:"item row mb16"},[t._v("订单编号:"+t._s(t.order.order_sn))]),t._v(" "),n("div",{staticClass:"item row mb16"},[t._v("\n 订单价格:"),n("span",{staticClass:"primary"},[t._v("¥"+t._s(t.order.order_amount))])]),t._v(" "),n("div",{staticClass:"item row mb16"},[t._v("\n 收货地址:\n "),n("div",[t._v("\n "+t._s(t.order.consignee)+" "+t._s(t.order.mobile)+"\n "),n("span",{staticClass:"ml16"},[t._v(t._s(t.order.delivery_address))])])]),t._v(" "),n("div",{staticClass:"item row mb16"},[t._v("\n 商品名称:\n "),n("div",t._l(t.order.order_goods,(function(e,r){return n("div",{key:r},[n("div",{staticClass:"row"},[t._v("\n "+t._s(e.goods_name)+" /\n "),n("span",{staticClass:"ml8"},[t._v(" "+t._s(e.spec_value))])])])})),0)])]),t._v(" "),n("div",{staticClass:"payment-footer"},[0==t.order.pay_status&&0==t.order.order_status?[n("div",{staticClass:"title lg bold"},[t._v("请选择支付方式")]),t._v(" "),n("div",{staticClass:"row mt16"},t._l(t.payWayArr,(function(e,r){return n("div",{key:r,staticClass:"pay-way row-center",on:{click:function(r){return t.orderPay(e.pay_way)}}},[n("img",{attrs:{src:e.icon,alt:""}}),t._v(" "),n("span",{staticClass:"ml16 xxl"},[t._v(t._s(e.name))])])})),0)]:n("nuxt-link",{staticClass:"btn row-center",attrs:{to:"/user/order"}},[t._v("查看订单")])],2),t._v(" "),n("el-dialog",{attrs:{title:"微信支付",visible:t.showWxpay,width:"700px",center:""},on:{"update:visible":function(e){t.showWxpay=e},close:t.clearTimer}},[n("div",{staticClass:"column-center black"},[n("img",{staticClass:"pay-code",attrs:{src:t.payInfo.data,alt:""}}),t._v(" "),n("div",{staticClass:"mt8",staticStyle:{"font-size":"18px"}},[t._v("微信扫一扫,完成支付")]),t._v(" "),n("div",{staticClass:"pay-money row"},[n("span",[t._v("需支付金额:")]),t._v(" "),n("span",{staticClass:"primary"},[n("price-formate",{attrs:{price:t.payInfo.order_amount,"subscript-size":18,"first-size":28,"second-size":28}})],1)])])])],1)}),[],!1,null,"0f5057c7",null);e.default=component.exports;installComponents(component,{PriceFormate:r(410).default})}}]);