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 line
12 KiB
1 line
12 KiB
1 year ago
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["user-pages-coupon-share"],{"23ee":function(t,e,n){var i=n("e42b");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("4f06").default;a("44110aad",i,!0,{sourceMap:!1,shadowMode:!1})},"7e1d":function(t,e,n){"use strict";n.r(e);var i=n("b189"),a=n("d257");for(var s in a)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(s);n("87fa");var o=n("f0c5"),r=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,"20f58138",null,!1,i["a"],void 0);e["default"]=r.exports},8546:function(t,e,n){"use strict";n("7a82");var i=n("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("99af"),n("caad"),n("2532");var a=i(n("5530")),s=i(n("c7eb")),o=i(n("1da1")),r=n("26cb"),u=i(n("7296")),c=(i(n("7ded")),{components:{countdown:u.default},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,r.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},over_time_text:function(){return(new Date).getTime()+1e3*this.detail.end_time}}),onLoad:function(t){var e=this;return(0,o.default)((0,s.default)().mark((function n(){return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.$util.showLoading(),n.next=3,e.updateCommonOptions(t);case 3:return t=n.sent,e.options=t,console.log(t,"======options"),n.next=8,e.initIndex();case 8:case"end":return n.stop()}}),n)})))()},onPullDownRefresh:function(){uni.showNavigationBarLoading(),this.initRefresh(),uni.stopPullDownRefresh()},onShareAppMessage:function(t){var e=this.detail,n=e.id,i=e.share_img,a=this.userInfo.id,s="/user/pages/coupon/share?pid=".concat(a,"&coupon_atv_id=").concat(n);return this.$util.log(s),this.$refs.show_share_item.close(),{title:"",imageUrl:i,path:s}},methods:(0,a.default)((0,a.default)((0,a.default)({},(0,r.mapActions)(["getConfigInfo","getUserInfo","updateCommonOptions"])),(0,r.mapMutations)(["updateUserItem"])),{},{initIndex:function(){var t=arguments,e=this;return(0,o.default)((0,s.default)().mark((function n(){var i;return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(i=t.length>0&&void 0!==t[0]&&t[0],e.configInfo.id&&!i){n.next=4;break}return n.next=4,e.getConfigInfo();case 4:return n.next=6,e.getDetail();case 6:if(e.$util.setNavigationBarColor({bg:e.primaryColor}),i||!e.$jweixin.isWechat()){n.next=11;break}return n.next=10,e.$jweixin.initJssdk();case 10:e.toAppShare();case 11:case"end":return n.stop()}}),n)})))()},initRefresh:function(){this.initIndex(!0)},getDetail:function(){var t=this;return(0,o.default)((0,s.default)().mark((function e(){var n,i,a,o,r;return(0,s.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.options.coupon_atv_id,i=void 0===n?0:n,e.next=3,t.$api.mine.couponAtvInfo({id:i});case 3:a=e.sent,o=a.record_list,r=a.atv_info,1!==r.status&&(r.end_time=0),t.detail=r,t.record_list=o,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,o.default)((0,s.default)().mark((function e(){var n,i;return(0,s.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:i=e.sent,t.$util.hideAll(),t.qr_code=i;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)})))()},toPoste
|