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
5.6 KiB
1 lines
5.6 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["user/pages/coupon/share"],{"0714":function(t,e,n){"use strict";(function(t,e){var r=n("47a9");n("7043");r(n("3240"));var o=r(n("7ee7"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(o.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"2e32":function(t,e,n){},"6b07":function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){}));var r=function(){var t=this.$createElement,e=(this._self._c,this.isLoad?this.record_list.data.length:null),n=this.isLoad?this.record_list.data.length:null;this.$mp.data=Object.assign({},{$root:{g0:e,g1:n}})},o=[]},"7ee7":function(t,e,n){"use strict";n.r(e);var r=n("6b07"),o=n("8377");for(var i in o)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(i);n("c446");var a=n("828b"),u=Object(a["a"])(o["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],void 0);e["default"]=u.exports},8377:function(t,e,n){"use strict";n.r(e);var r=n("b391"),o=n.n(r);for(var i in r)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(i);e["default"]=o.a},b391:function(t,e,n){"use strict";(function(t){var r=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n("7eb4")),i=r(n("7ca3")),a=r(n("ee10")),u=n("8f59"),s=r(n("cf61"));function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){(0,i.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var d={components:{countdown:function(){n.e("components/min-countdown").then(function(){return resolve(n("d460"))}.bind(null,n)).catch(n.oe)}},data:function(){return{shareImg:"https://lbqny.migugu.com/admin/anmo/coupon/bg.png",isLoad:!1,options:{},detail:{end_time:""},record_list:{},qr_code:""}},computed:(0,u.mapState)({primaryColor:function(t){return t.config.configInfo.primaryColor},subColor:function(t){return t.config.configInfo.subColor},configInfo:function(t){return t.config.configInfo},commonOptions:function(t){return t.user.commonOptions},userInfo:function(t){return t.user.userInfo},isGzhLogin:function(t){return t.user.isGzhLogin},over_time_text:function(){return(new Date).getTime()+1e3*this.detail.end_time}}),onLoad:function(e){var n=this;return(0,a.default)(o.default.mark((function r(){return o.default.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return n.$util.showLoading(),r.next=3,n.updateCommonOptions(e);case 3:return e=r.sent,n.options=e,t.hideShareMenu(),r.next=8,n.initIndex();case 8:case"end":return r.stop()}}),r)})))()},onPullDownRefresh:function(){t.showNavigationBarLoading(),this.initRefresh(),t.stopPullDownRefresh()},onShareAppMessage:function(t){var e=this.detail,n=e.id,r=e.share_img,o=this.userInfo.id,i=void 0===o?0:o,a="/user/pages/coupon/share?pid=".concat(i,"&coupon_atv_id=").concat(n);return this.$util.log(a),this.$refs.show_share_item.close(),{title:"",imageUrl:r,path:a}},methods:f(f(f({},(0,u.mapActions)(["getConfigInfo","getUserInfo","updateCommonOptions"])),(0,u.mapMutations)(["updateUserItem"])),{},{initIndex:function(){var t=arguments,e=this;return(0,a.default)(o.default.mark((function n(){var r,i;return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(r=t.length>0&&void 0!==t[0]&&t[0],e.configInfo.id&&!r){n.next=4;break}return n.next=4,e.getConfigInfo();case 4:return i=e.userInfo.id,void 0===i?0:i,e.isGzhLogin,n.next=8,e.getDetail();case 8:e.$util.setNavigationBarColor({bg:e.primaryColor});case 9:case"end":return n.stop()}}),n)})))()},initRefresh:function(){this.initIndex(!0)},getDetail:function(){var t=this;return(0,a.default)(o.default.mark((function e(){var n,r,i,a,u;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.options.coupon_atv_id,r=void 0===n?0:n,e.next=3,t.$api.mine.couponAtvInfo({id:r});case 3:i=e.sent,a=i.record_list,u=i.atv_info,1!==u.status&&(u.end_time=0),t.detail=u,t.record_list=a,t.isLoad=!0,t.$util.hideAll();case 11:case"end":return e.stop()}}),e)})))()},countEnd:function(){var t=this;this.$util.log("倒计时完了"),setTimeout((function(){t.initRefresh(),t.$util.back()}),1e3)},toShare:function(){var t=this;return(0,a.default)(o.default.mark((function e(){var n,r;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(1==t.detail.status){e.next=2;break}return e.abrupt("return");case 2:if(t.qr_code){e.next=10;break}return t.$util.showLoading(),n=t.detail.id,e.next=7,t.$api.mine.atvQr({page:"user/pages/coupon/share",coupon_atv_id:n});case 7:r=e.sent,t.$util.hideAll(),t.qr_code=r;case 10:if(t.$refs.show_share_item.open(),t.detail.user_id!=t.userInfo.id){e.next=13;break}return e.abrupt("return");case 13:t.getDetail();case 14:case"end":return e.stop()}}),e)})))()},toPoster:function(){this.$refs.show_share_item.close(),this.$util.goUrl({url:"/user/pages/coupon/poster"})},toAppShare:function(){var t=this.detail,e=t.id,n=(t.share_img,t.status,this.userInfo.id),r=void 0===n?0:n,o=s.default.siteroot,i=o.split("/index.php")[0];"".concat(i,"/h5/#/user/pages/coupon/share?coupon_atv_id=").concat(e,"&pid=").concat(r)}})};e.default=d}).call(this,n("df3c")["default"])},c446:function(t,e,n){"use strict";var r=n("2e32"),o=n.n(r);o.a}},[["0714","common/runtime","common/vendor"]]]); |