1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/gift/detail/detail"],{"24bf":function(t,e,i){},"3a3f":function(t,e,i){"use strict";var n,r=function(){var t=this,e=t.$createElement,i=(t._self._c,Number(110));t.$mp.data=Object.assign({},{$root:{m0:i}})},o=[];i.d(e,"b",(function(){return r})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){return n}))},"5a99":function(t,e,i){"use strict";i.r(e);var n=i("6015"),r=i.n(n);for(var o in n)"default"!==o&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=r.a},6015:function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(i("4795")),r=i("2f62");function o(t){return t&&t.__esModule?t:{default:t}}function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function c(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?a(Object(i),!0).forEach((function(e){u(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):a(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function u(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function s(t,e,i,n,r,o,a){try{var c=t[o](a),u=c.value}catch(s){return void i(s)}c.done?e(u):Promise.resolve(u).then(n,r)}function d(t){return function(){var e=this,i=arguments;return new Promise((function(n,r){var o=t.apply(e,i);function a(t){s(o,n,r,a,c,"next",t)}function c(t){s(o,n,r,a,c,"throw",t)}a(void 0)}))}}var f=function(){i.e("plugins/gift/components/detail/order").then(function(){return resolve(i("1958"))}.bind(null,i)).catch(i.oe)},l=function(){i.e("plugins/gift/components/detail/order-information").then(function(){return resolve(i("945e"))}.bind(null,i)).catch(i.oe)},p=function(){i.e("plugins/gift/components/detail/win-order-information").then(function(){return resolve(i("826f"))}.bind(null,i)).catch(i.oe)},g=function(){i.e("plugins/gift/components/detail/receiving-status").then(function(){return resolve(i("0245"))}.bind(null,i)).catch(i.oe)},h=function(){Promise.all([i.e("common/vendor"),i.e("components/basic-component/app-empty-bottom/app-empty-bottom")]).then(function(){return resolve(i("51dc"))}.bind(null,i)).catch(i.oe)},b=function(){i.e("plugins/gift/components/detail/win-order").then(function(){return resolve(i("c16b"))}.bind(null,i)).catch(i.oe)},_=function(){i.e("components/page-component/app-share-qr-code-poster/app-share-qr-code-poster").then(function(){return resolve(i("9f9b"))}.bind(null,i)).catch(i.oe)},m=function(){i.e("plugins/gift/components/detail/logistics").then(function(){return resolve(i("d591e"))}.bind(null,i)).catch(i.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.gift_id=t.gift_id,this.gift_status=t.status,this.$store.dispatch("gift/getConfig",this.$api.gift.config)},onShow:function(){switch(this.gift_status){case"0":this.getDetail({url:this.$api.gift.send_detail,data:{gift_id:this.gift_id}});break;case"1":this.getDetail({url:this.$api.gift.win_detail,data:{user_order_id:this.gift_id}});break;case"2":this.getDetail({url:this.$api.gift.join_detail,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 i=this;return d(n.default.mark((function r(){var o;return n.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return i.$utils.showLoading(),n.prev=1,n.next=4,i.$request({url:e.url,method:"get",data:c({},e.data)});case 4:o=n.sent,i.$utils.hideLoading(),0===o.code?(i.detail=o.data.detail,i.loading=!0):t.showModal({title:"提示",content:o.msg}),n.next=13;break;case 9:throw n.prev=9,n.t0=n["catch"](1),i.$utils.hideLoading(),new Error(n.t0);case 13:case"end":return n.stop()}}),r,null,[[1,9]])})))()},setShare:function(){var e=this;return d(n.default.mark((function i(){var r;return n.default.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return e.$utils.showLoading(),i.next=3,e.$request({url:e.$api.gift.turn,data:{id:e.gift_id}});case 3:r=i.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 i.stop()}}),i)})))()},setSwitch:function(t){this.detail.detail[t].switch=!this.detail.detail[t].switch},receipt:function(e){var i=this;t.showModal({title:"提示",content:"确认收货",success:function(t){t.confirm&&i.$request({url:i.$api.order.confirm,data:{id:e}}).then((function(t){if(0===t.code)switch(i.gift_status){case"0":i.getDetail({url:i.$api.gift.send_detail,data:{gift_id:i.gift_id}});break;case"1":i.getDetail({url:i.$api.gift.win_detail,data:{user_order_id:i.gift_id}});break;case"2":i.getDetail({url:i.$api.gift.join_detail,data:{user_order_id:i.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":g,"app-empty-bottom":h,"win-order":b,"win-order-information":p,"app-share-qr-code-poster":_,logistics:m}};e.default=v}).call(this,i("543d")["default"])},7168:function(t,e,i){"use strict";i.r(e);var n=i("3a3f"),r=i("5a99");for(var o in r)"default"!==o&&function(t){i.d(e,t,(function(){return r[t]}))}(o);i("e3a4");var a,c=i("f0c5"),u=Object(c["a"])(r["default"],n["b"],n["c"],!1,null,"4e0b6cd6",null,!1,n["a"],a);e["default"]=u.exports},dc13:function(t,e,i){"use strict";(function(t){i("8748");n(i("66fd"));var e=n(i("7168"));function n(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,i("543d")["createPage"])},e3a4:function(t,e,i){"use strict";var n=i("24bf"),r=i.n(n);r.a}},[["dc13","common/runtime","common/vendor"]]]);
|