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