| 1 |
- (my["webpackJsonp"]=my["webpackJsonp"]||[]).push([["pages/index/details"],{"7d63":function(e,t,n){"use strict";n.r(t);var o=n("bd1c"),i=n("f85a");for(var a in i)"default"!==a&&function(e){n.d(t,e,(function(){return i[e]}))}(a);n("b923");var s,c=n("f0c5"),u=Object(c["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],s);t["default"]=u.exports},"8e32":function(e,t,n){"use strict";(function(e){n("6f14");o(n("66fd"));var t=o(n("7d63"));function o(e){return e&&e.__esModule?e:{default:e}}my.__webpack_require_UNI_MP_PLUGIN__=n,e(t.default)}).call(this,n("c11b")["createPage"])},b923:function(e,t,n){"use strict";var o=n("dbe4"),i=n.n(o);i.a},bd1c: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,i=function(){},a=[]},d5ec: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("faa2"))}.bind(null,n)).catch(n.oe)},a=function(){n.e("components/show-result").then(function(){return resolve(n("63f2"))}.bind(null,n)).catch(n.oe)},s=function(){n.e("components/recycle").then(function(){return resolve(n("f1c1"))}.bind(null,n)).catch(n.oe)},c=function(){n.e("components/goods-detail").then(function(){return resolve(n("fa19"))}.bind(null,n)).catch(n.oe)},u=e.createInnerAudioContext();u.autoplay=!0,u.loop=!0,u.src="/static/image/home/bj.mp3";var r=o({components:{payment:i,showResult:a,recycle:s,goodsDetail:c},data:function(){var e;return e={box_id:null,message:"",boxDetail:{},isPlay:!0,capital:{box:0,coin:0},price:0,boxNum:1,type:0,record3:[]},o(e,"isPlay",!0),o(e,"notice_to_buyers",""),o(e,"rates",[{value:"0.2%",name:"稀有款",tag:"稀有"},{value:"10.8%",name:"珍贵款",tag:"珍贵"},{value:"89.0%",name:"普通款",tag:"普通"}]),e},computed:{totalPrice:function(){return this.boxNum*this.price}},created:function(){console.log(this.box_id)},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}));this.$refs["goods-detail"].open(e,t)},changePlay:function(){this.isPlay=!this.isPlay,e.setStorageSync("isPlay",this.isPlay),this.isPlay?u.play():u.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),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:"play_rule"}).then((function(t){1===t.code&&(e.message=t.data.content)})),this.$api.agreement({name:"notice_to_buyers"}).then((function(t){1===t.code&&(e.notice_to_buyers=t.data.content)}))}},onUnload:function(){u.pause()},onLoad:function(e){var t=e.id;this.box_id=parseInt(t),this.getDetails(),this.getMessage()},onShow:function(){this.isPlay=e.getStorageSync("isPlay"),this.isPlay?u.play():u.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=r}).call(this,n("c11b")["default"])},dbe4:function(e,t,n){},f85a:function(e,t,n){"use strict";n.r(t);var o=n("d5ec"),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}},[["8e32","common/runtime","common/vendor"]]]);
|