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.
 
 
 
 
high-mini/unpackage/dist/build/mp-weixin/pages/goods/coupons-info-details/coupons-info-details.js

1 lines
2.7 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/goods/coupons-info-details/coupons-info-details"],{"78b6":function(t,n,e){"use strict";e.r(n);var o=e("a71e"),i=e("cd4d");for(var c in i)"default"!==c&&function(t){e.d(n,t,(function(){return i[t]}))}(c);e("fcb8");var a,u=e("f0c5"),r=Object(u["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],a);n["default"]=r.exports},a71e:function(t,n,e){"use strict";var o;e.d(n,"b",(function(){return i})),e.d(n,"c",(function(){return c})),e.d(n,"a",(function(){return o}));var i=function(){var t=this,n=t.$createElement,e=(t._self._c,t._f("formatDate")(t.salesEndTime,"-"));t.$mp.data=Object.assign({},{$root:{f0:e}})},c=[]},c3c2:function(t,n,e){},cd4d:function(t,n,e){"use strict";e.r(n);var o=e("fa45"),i=e.n(o);for(var c in o)"default"!==c&&function(t){e.d(n,t,(function(){return o[t]}))}(c);n["default"]=i.a},dc50:function(t,n,e){"use strict";(function(t){e("e5b1");o(e("66fd"));var n=o(e("78b6"));function o(t){return t&&t.__esModule?t:{default:t}}t(n.default)}).call(this,e("543d")["createPage"])},fa45:function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=e("53e0"),i=getApp(),c={data:function(){return{minecoupones:[],imageUrl:i.globalData.imgUrl,pageNum:1,pageSize:10,isNoMoreData:!1,couponsDetails:"",salesEndTime:"",codes:""}},filters:{formatDate:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",e=new Date(t),o=e.getFullYear(),i=e.getMonth()+1,c=e.getDate(),a=e.getHours(),u=e.getMinutes(),r=e.getSeconds();return i=i>10?i:"0"+i,c=c>10?c:"0"+c,a=a>10?a:"0"+a,u=u>10?u:"0"+u,r=r>10?r:"0"+r,"".concat(o).concat(n).concat(i).concat(n).concat(c)}},onLoad:function(t){this.codes=t.id,this.getDiscountByQrCode()},methods:{getDiscountByQrCode:function(){var t=this,n={code:this.codes};(0,o.getDiscountByQrCode)(n).then((function(n){"000000"==n.return_code&&(t.couponsDetails=n.return_data,t.salesEndTime=n.return_data.highDiscount.salesEndTime,t.getCouponByDiscount(n.return_data.highDiscount.id))}))},getCouponByDiscount:function(t){var n=this,e={discountId:t};(0,o.getCouponByDiscount)(e).then((function(t){"000000"==t.return_code&&(n.minecoupones=t.return_data)}))},receiveDiscount:function(){t.showLoading({title:"领取中..."});var n={discountAgentId:this.couponsDetails.id};(0,o.receiveDiscount)(n).then((function(n){"000000"==n.return_code?(t.hideLoading(),t.showToast({icon:"none",title:n.return_data,duration:2e3})):(t.hideLoading(),t.showToast({icon:"none",title:n.return_msg,duration:2e3}))}))},toGoods:function(n){t.navigateTo({url:"../goods?id="+n})}}};n.default=c}).call(this,e("543d")["default"])},fcb8:function(t,n,e){"use strict";var o=e("c3c2"),i=e.n(o);i.a}},[["dc50","common/runtime","common/vendor"]]]);