1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/gift/order/order"],{"5a93":function(t,e,n){"use strict";n.r(e);var r=n("abc8"),i=n("8b7b");for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);n("f6c1");var a,s=n("f0c5"),u=Object(s["a"])(i["default"],r["b"],r["c"],!1,null,"8b063fb2",null,!1,r["a"],a);e["default"]=u.exports},"5d05":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n("4795")),i=n("2f62");function o(t){return t&&t.__esModule?t:{default:t}}function a(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 s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(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 c(t){return p(t)||d(t)||f(t)||l()}function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function f(t,e){if(t){if("string"===typeof t)return h(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,e):void 0}}function d(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function p(t){if(Array.isArray(t))return h(t)}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function g(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(c){return void n(c)}s.done?e(u):Promise.resolve(u).then(r,i)}function b(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){g(o,r,i,a,s,"next",t)}function s(t){g(o,r,i,a,s,"throw",t)}a(void 0)}))}}var m=function(){n.e("plugins/gift/components/announcement/gift-navigation").then(function(){return resolve(n("bb05"))}.bind(null,n)).catch(n.oe)},v=function(){n.e("plugins/gift/components/order/switch-tab").then(function(){return resolve(n("1cc6"))}.bind(null,n)).catch(n.oe)},_=function(){n.e("plugins/gift/components/order/order-list").then(function(){return resolve(n("1351"))}.bind(null,n)).catch(n.oe)},w=function(){Promise.all([n.e("common/vendor"),n.e("components/basic-component/app-empty-bottom/app-empty-bottom")]).then(function(){return resolve(n("51dc"))}.bind(null,n)).catch(n.oe)},y=function(){n.e("plugins/gift/components/order/order-win-list").then(function(){return resolve(n("ed8f"))}.bind(null,n)).catch(n.oe)},O=function(){n.e("plugins/gift/components/order/order-involved-list").then(function(){return resolve(n("9b84"))}.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("9f9b"))}.bind(null,n)).catch(n.oe)},j={name:"order",data:function(){return{tab_status:0,list:[],page_count:1,page:1,url:"",share:!1,shareUrl:"",gift_id:-1,turn_no:"",share_img:"",bless_word:""}},onLoad:function(){var t=this;this.list=[],this.url=this.$api.gift.send_list,this.$nextTick((function(){t.request()}))},onShow:function(){},onShareAppMessage:function(t){return"button"==t.from?this.$shareAppMessage({path:"/plugins/gift/index/index",imageUrl:this.share_img,title:this.bless_word,params:{gift_id:this.gift_id,turn_no:this.turn_no}}):this.$shareAppMessage({path:"/plugins/gift/index/index",title:this.bless_word,imageUrl:this.big_gift_pic})},onReachBottom:function(){this.page<this.page_count&&(this.page++,this.request())},methods:{setTab:function(t){switch(this.tab_status=t,this.list=[],this.page=1,t){case 0:this.url=this.$api.gift.send_list;break;case 1:this.url=this.$api.gift.my_win;break;case 2:this.url=this.$api.gift.my_join}this.request()},request:function(){var e=this;return b(r.default.mark((function n(){var i,o;return r.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.$utils.showLoading(),n.prev=1,n.next=4,e.$request({url:e.url,methods:"get",data:{page:e.page}});case 4:i=n.sent,0===i.code?((o=e.list).push.apply(o,c(i.data.list)),e.page_count=i.data.pagination.page_count):t.showModal({title:"提示",content:i.msg}),e.$utils.hideLoading(),n.next=13;break;case 9:throw n.prev=9,n.t0=n["catch"](1),e.$utils.hideLoading(),new Error(n.t0);case 13:case"end":return n.stop()}}),n,null,[[1,9]])})))()},setShare:function(e){var n=this;return b(r.default.mark((function i(){var o;return r.default.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return n.$utils.showLoading(),r.next=3,n.$request({url:n.$api.gift.turn,data:{id:e.id}});case 3:o=r.sent,0===o.code?(n.turn_no=o.data.turn_no,n.gift_id=e.gift_id,n.bless_word=e.bless_word,1===e.item.is_big_gift?n.share_img=n.big_gift_pic:n.share_img=e.item.detail[0].cover_pic,n.share=!0):t.showModal({title:"提示",content:o.msg}),n.$utils.hideLoading();case 6:case"end":return r.stop()}}),i)})))()},receipt:function(e){console.log(e);var n=this;t.showModal({title:"提示",content:"确认收货",success:function(t){t.confirm&&n.$request({url:n.$api.order.confirm,data:{id:n.list[e].giftOrder[0].order_id}}).then((function(t){0===t.code&&(n.list[e].status="已完成",n.list[e].status_num=7)}))}})}},computed:s({},(0,i.mapState)("gift",{theme:function(t){return t.theme},big_gift_pic:function(t){return t.big_gift_pic}})),components:{"gift-navigation":m,"switch-tab":v,"order-list":_,"app-empty-bottom":w,"order-win-list":y,"order-involved-list":O,"app-share-qr-code-poster":$}};e.default=j}).call(this,n("543d")["default"])},"8b7b":function(t,e,n){"use strict";n.r(e);var r=n("5d05"),i=n.n(r);for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e["default"]=i.a},"8ca8":function(t,e,n){"use strict";(function(t){n("8748");r(n("66fd"));var e=r(n("5a93"));function r(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},a994:function(t,e,n){},abc8:function(t,e,n){"use strict";var r,i=function(){var t=this,e=t.$createElement,n=(t._self._c,Number(96));t.$mp.data=Object.assign({},{$root:{m0:n}})},o=[];n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return r}))},f6c1:function(t,e,n){"use strict";var r=n("a994"),i=n.n(r);i.a}},[["8ca8","common/runtime","common/vendor"]]]);
|