details.js 5.7 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/details"],{"19c7":function(e,t,n){},"6b2e":function(e,t,n){"use strict";var o=n("19c7"),i=n.n(o);i.a},"86e0":function(e,t,n){"use strict";(function(e){n("a940");o(n("66fd"));var t=o(n("c8b5"));function o(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=n,e(t.default)}).call(this,n("543d")["createPage"])},9261:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return o}));var o={uniPopup:function(){return n.e("uni_modules/uni-popup/components/uni-popup/uni-popup").then(n.bind(null,"450c"))},uParse:function(){return Promise.all([n.e("common/vendor"),n.e("components/u-parse/u-parse")]).then(n.bind(null,"0c26"))}},i=function(){var e=this,t=e.$createElement,n=(e._self._c,e.__map(e.boxDetail.goodslist,(function(t,n){var o=e.__get_orig(t),i=t.image.indexOf("http");return{$orig:o,g0:i}})));e._isMounted||(e.e0=function(t){return e.$refs.regulation.open()},e.e1=function(t){return e.$refs.regulation.close()}),e.$mp.data=Object.assign({},{$root:{l0:n}})},a=[]},c8b5:function(e,t,n){"use strict";n.r(t);var o=n("9261"),i=n("d253");for(var a in i)"default"!==a&&function(e){n.d(t,e,(function(){return i[e]}))}(a);n("6b2e");var s,u=n("f0c5"),c=Object(u["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],s);t["default"]=c.exports},d253:function(e,t,n){"use strict";n.r(t);var o=n("f0a9"),i=n.n(o);for(var a in o)"default"!==a&&function(e){n.d(t,e,(function(){return o[e]}))}(a);t["default"]=i.a},f0a9:function(e,t,n){"use strict";(function(e){function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(){n.e("components/payment").then(function(){return resolve(n("cce2"))}.bind(null,n)).catch(n.oe)},a=function(){n.e("components/show-result").then(function(){return resolve(n("dee5"))}.bind(null,n)).catch(n.oe)},s=function(){n.e("components/recycle").then(function(){return resolve(n("e95a"))}.bind(null,n)).catch(n.oe)},u=function(){n.e("components/goods-detail").then(function(){return resolve(n("d6ea"))}.bind(null,n)).catch(n.oe)},c=function(){n.e("components/lunbobox").then(function(){return resolve(n("ec7c"))}.bind(null,n)).catch(n.oe)},r=function(){n.e("components/prize-flying").then(function(){return resolve(n("0411"))}.bind(null,n)).catch(n.oe)},l=e.createInnerAudioContext(),f=o({components:{payment:i,showResult:a,recycle:s,goodsDetail:u,lunbobox:c,prizeFlying:r},data:function(){return{box_id:null,message:"",boxDetail:{},capital:{box:0,coin:0},price:0,boxNum:1,type:0,record3:[],notice_to_buyers:"",rates:[{value:"0.1%",tag:"传说"},{value:"10.9%",tag:"史诗"},{value:"22.5%",tag:"稀有"},{value:"76.5%",tag:"普通"}]}},computed:{totalPrice:function(){return this.boxNum*this.boxDetail.coin_price}},created:function(){console.log(this.box_id)},mounted:function(){},methods:{lookImg:function(t){e.previewImage({urls:[t],longPressActions:{itemList:["发送给朋友","保存图片","收藏"],success:function(e){console.log("选中了第"+(e.tapIndex+1)+"个按钮,第"+(e.index+1)+"张图片")},fail:function(e){console.log(e.errMsg)}}})},lookDetail:function(e){var t=this.rates.find((function(t){return t.tag==e.tag}));console.log(this.rates),this.$refs["goods-detail"].open(e,t)},changePlay:function(){this.isPlay=!this.isPlay,e.setStorageSync("isPlay",this.isPlay),this.isPlay?l.play():l.pause()},recharge:function(){e.navigateTo({url:"/pages/me/recharge"})},changeStar:function(){var t=this;this.$api.star({box_id:this.box_id}).then((function(n){1===n.code&&(1==n.data.is_star?t.boxDetail.is_star=1:t.boxDetail.is_star=0,e.showToast({title:n.msg}))}))},wfsm:function(){e.navigateTo({url:"/pages/index/wfsm"})},toMyBox:function(){this.$refs["result-popup"].close(),e.navigateTo({url:"/pages/me/myBox"})},returnTop:function(){e.navigateBack()},getDetails:function(){var e=this;this.$api.boxDetail({box_id:this.box_id}).then((function(t){1===t.code&&(e.boxDetail=t.data,e.record3=t.data.record.slice(0,3),e.rates[0].value=(1*t.data.more.tags.legend).toFixed(2),e.rates[1].value=(1*t.data.more.tags.supreme).toFixed(2),e.rates[2].value=(1*t.data.more.tags.rare).toFixed(2),e.rates[3].value=(1*t.data.more.tags.normal).toFixed(2),console.log(e.boxDetail))}))},haveTry:function(){this.type=1,this.boxNum=1,this.$refs["payment"].open(1,1)},selectNum:function(){this.type=0,this.boxNum=1,this.$refs["num-popup"].open()},createOder:function(e){this.boxNum=e,this.$refs["payment"].open(0,this.boxNum)},closeNumPopup:function(){this.$refs["num-popup"].close()},showResult:function(e){1!=this.type?this.$refs["result-popup"].open(e):this.$refs["result-popup"].open({prizeInfo:e.goodsInfo})},recycle:function(e){this.$refs["result-popup"].close(),this.$refs["recycle"].recycle(e.prizeInfo)},getMessage:function(){var e=this;this.$api.agreement({name:"notice_to_buyers"}).then((function(t){1===t.code&&(e.message=t.data.content)}))}},onUnload:function(){l.pause()},onLoad:function(e){var t=e.id;console.log(t,"123456"),this.box_id=parseInt(t),this.getDetails(),this.getMessage()},onShow:function(){this.isPlay=e.getStorageSync("isPlay"),this.isPlay?l.play():l.pause()}},"onShow",(function(){var t=this;this.$api.getUserCapital().then((function(e){var n=e.code,o=e.data;1==n&&(t.capital=o)}));var n=e.getStorageSync("is_notice");e.removeStorageSync("is_notice"),1==n&&setTimeout((function(){e.showModal({title:"提示",content:"恭喜,获得10金币",success:function(e){e.confirm?console.log("用户点击确定"):e.cancel&&console.log("用户点击取消")}})}),1e3)}));t.default=f}).call(this,n("543d")["default"])}},[["86e0","common/runtime","common/vendor"]]]);