fix some bug
This commit is contained in:
parent
69b42c93af
commit
788931f8b5
@ -16,6 +16,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { isMobile } from "@/utils/resize";
|
||||||
export default {
|
export default {
|
||||||
name: "Header",
|
name: "Header",
|
||||||
data() {
|
data() {
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
//src="https://w3w.ai/public/campaign-challenge/1222"
|
//src="https://w3w.ai/public/campaign-challenge/1222"
|
||||||
import {checkStatus} from '@/api/webapi'
|
import {checkStatus} from '@/api/webapi'
|
||||||
import { AppModule } from '@/store/modules/app';
|
import { AppModule } from '@/store/modules/app';
|
||||||
|
import { Message } from 'element-ui';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -32,7 +33,9 @@ export default {
|
|||||||
if (e.data?.type === "w3wCampaignJoinSuccess") {
|
if (e.data?.type === "w3wCampaignJoinSuccess") {
|
||||||
console.log("on get iframe message: ");
|
console.log("on get iframe message: ");
|
||||||
console.log(e.data);
|
console.log(e.data);
|
||||||
this.checkStatus()
|
this.checkStatus(function(msg){
|
||||||
|
Message.warning(msg);
|
||||||
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
let iframe = document.getElementById("iframe");
|
let iframe = document.getElementById("iframe");
|
||||||
@ -46,16 +49,21 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async checkStatus() {
|
async checkStatus(cb) {
|
||||||
let res = await checkStatus(AppModule.account)
|
let res = await checkStatus(AppModule.account)
|
||||||
if (res.errcode) {
|
if (res.errcode) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (res.status === 4) {
|
if (cb && res.status == 0 ) {
|
||||||
this.$router.push("rankinglist")
|
cb(res.errmsg);
|
||||||
} else if (res.status === 1) {
|
} else {
|
||||||
this.$router.push("recommend")
|
if (res.status === 4) {
|
||||||
|
this.$router.push("rankinglist")
|
||||||
|
} else if (res.status === 1) {
|
||||||
|
this.$router.push("recommend")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
navigator() {
|
navigator() {
|
||||||
this.$router.push("recommend");
|
this.$router.push("recommend");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user