|
@@ -91,6 +91,8 @@ const handleCommon = (res, callback) => {
|
|
}
|
|
}
|
|
callback && callback()
|
|
callback && callback()
|
|
}
|
|
}
|
|
|
|
+let silver_open_box_big = require('@/assets/img/icon-silver-open-box-big.png')
|
|
|
|
+let gold_open_box_big = require('@/assets/img/icon-gold-open-box-big.png')
|
|
|
|
|
|
state.treasureOpen = () => {
|
|
state.treasureOpen = () => {
|
|
treasureOpen({
|
|
treasureOpen({
|
|
@@ -100,8 +102,20 @@ state.treasureOpen = () => {
|
|
}
|
|
}
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
|
|
+ for (let i in state.open_box) {
|
|
|
|
+ if (state.boxs[i].id == state.treasureId) {
|
|
|
|
+ if (i > 0) {
|
|
|
|
+ state.open_box.icon = gold_open_box_big
|
|
|
|
+ } else {
|
|
|
|
+ state.open_box.icon = silver_open_box_big
|
|
|
|
+ }
|
|
|
|
+ break
|
|
|
|
+ }
|
|
|
|
+ }
|
|
state.open_box.show = true
|
|
state.open_box.show = true
|
|
state.open_box.data = res.data
|
|
state.open_box.data = res.data
|
|
|
|
+
|
|
|
|
+ // icon
|
|
state.init(() => {
|
|
state.init(() => {
|
|
state.inviteInit()
|
|
state.inviteInit()
|
|
})
|
|
})
|