1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/gift/detail/detail"],{"3c1f":function(t,e,n){"use strict";n.r(e);var i=n("540a"),r=n.n(i);for(var a in i)"default"!==a&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=r.a},"540a":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=a(n("a34a")),r=n("2f62");function a(t){return t&&t.__esModule?t:{default:t}}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t,e,n,i,r,a,o){try{var c=t[a](o),u=c.value}catch(s){return void n(s)}c.done?e(u):Promise.resolve(u).then(i,r)}function d(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var a=t.apply(e,n);function o(t){s(a,i,r,o,c,"next",t)}function c(t){s(a,i,r,o,c,"throw",t)}o(void 0)}))}}var f=function(){n.e("plugins/gift/components/detail/order").then(function(){return resolve(n("d1eb"))}.bind(null,n)).catch(n.oe)},l=function(){n.e("plugins/gift/components/detail/order-information").then(function(){return resolve(n("9d8c"))}.bind(null,n)).catch(n.oe)},g=function(){n.e("plugins/gift/components/detail/win-order-information").then(function(){return resolve(n("3abd"))}.bind(null,n)).catch(n.oe)},p=function(){n.e("plugins/gift/components/detail/receiving-status").then(function(){return resolve(n("053e"))}.bind(null,n)).catch(n.oe)},h=function(){n.e("components/basic-component/app-empty-bottom/app-empty-bottom").then(function(){return resolve(n("42cd"))}.bind(null,n)).catch(n.oe)},b=function(){n.e("plugins/gift/components/detail/win-order").then(function(){return resolve(n("462a"))}.bind(null,n)).catch(n.oe)},_=function(){n.e("components/page-component/app-share-qr-code-poster/app-share-qr-code-poster").then(function(){return resolve(n("c169"))}.bind(null,n)).catch(n.oe)},m=function(){n.e("plugins/gift/components/detail/logistics").then(function(){return resolve(n("1617"))}.bind(null,n)).catch(n.oe)},v={name:"detail",data:function(){return{gift_id:-1,detail:{},gift_status:-1,win_detail:{},share:!1,turn_no:"",loading:!1}},onLoad:function(t){this.$commonLoad.onload(t),this.gift_id=t.gift_id,this.gift_status=t.status,this.$store.dispatch("gift/getConfig",this.$api.gift.config)},onShow:function(){var t=this.$api.gift,e=t.send_detail,n=t.win_detail,i=t.join_detail;switch(this.gift_status){case"0":this.getDetail({url:e,data:{gift_id:this.gift_id}});break;case"1":this.getDetail({url:n,data:{user_order_id:this.gift_id}});break;case"2":this.getDetail({url:i,data:{user_order_id:this.gift_id}});break}},onShareAppMessage:function(t){if("button"===t.from)return this.$shareAppMessage({path:"/plugins/gift/index/index",imageUrl:0===this.detail.is_big_gift?this.detail.detail[0].cover_pic:this.big_gift_pic,title:this.detail.giftLog.bless_word,params:{gift_id:this.detail.gift_id,turn_no:this.turn_no}})},methods:{getDetail:function(e){var n=this;return d(i.default.mark((function r(){var a;return i.default.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return n.$utils.showLoading(),i.prev=1,i.next=4,n.$request({url:e.url,method:"get",data:c({},e.data)});case 4:a=i.sent,n.$utils.hideLoading(),0===a.code?(n.detail=a.data.detail,n.loading=!0):t.showModal({title:"提示",content:a.msg}),i.next=13;break;case 9:throw i.prev=9,i.t0=i["catch"](1),n.$utils.hideLoading(),new Error(i.t0);case 13:case"end":return i.stop()}}),r,null,[[1,9]])})))()},setShare:function(){var e=this;return d(i.default.mark((function n(){var r;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.$utils.showLoading(),n.next=3,e.$request({url:e.$api.gift.turn,data:{id:e.gift_id}});case 3:r=n.sent,0===r.code?(e.turn_no=r.data.turn_no,e.share=!0):t.showModal({title:"提示",content:r.msg}),e.$utils.hideLoading();case 6:case"end":return n.stop()}}),n)})))()},setSwitch:function(t){this.detail.detail[t].switch=!this.detail.detail[t].switch},receipt:function(e){var n=this;t.showModal({title:"提示",content:"确认收货",success:function(t){t.confirm&&n.$request({url:n.$api.order.confirm,data:{id:e}}).then((function(t){if(0===t.code)switch(n.gift_status){case"0":n.getDetail({url:n.$api.gift.send_detail,data:{gift_id:n.gift_id}});break;case"1":n.getDetail({url:n.$api.gift.win_detail,data:{user_order_id:n.gift_id}});break;case"2":n.getDetail({url:n.$api.gift.join_detail,data:{user_order_id:n.gift_id}});break}}))}})}},computed:c({},(0,r.mapState)("gift",{theme:function(t){return t.theme},big_gift_pic:function(t){return t.big_gift_pic}})),components:{order:f,"order-information":l,"receiving-status":p,"app-empty-bottom":h,"win-order":b,"win-order-information":g,"app-share-qr-code-poster":_,logistics:m}};e.default=v}).call(this,n("543d")["default"])},"9f83":function(t,e,n){"use strict";var i;n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return i}));var r=function(){var t=this,e=t.$createElement,n=(t._self._c,t.loading?Number(110):null);t.$mp.data=Object.assign({},{$root:{m0:n}})},a=[]},b503:function(t,e,n){"use strict";(function(t){n("2d0a");i(n("66fd"));var e=i(n("ff7a"));function i(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},c4aa:function(t,e,n){"use strict";var i=n("cab3"),r=n.n(i);r.a},cab3:function(t,e,n){},ff7a:function(t,e,n){"use strict";n.r(e);var i=n("9f83"),r=n("3c1f");for(var a in r)"default"!==a&&function(t){n.d(e,t,(function(){return r[t]}))}(a);n("c4aa");var o,c=n("f0c5"),u=Object(c["a"])(r["default"],i["b"],i["c"],!1,null,"d6a86370",null,!1,i["a"],o);e["default"]=u.exports}},[["b503","common/runtime","common/vendor"]]]);
|