index.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <div class="loading">加载中...</div>
  3. </template>
  4. <script>
  5. import common from './mixins/common.js';
  6. export default {
  7. name: 'claimCloudPhone',
  8. auth: false,
  9. head: {
  10. title: '0元购机,尽情享受',
  11. },
  12. mixins: [common],
  13. data() {
  14. return {};
  15. },
  16. mounted() {
  17. setTimeout(() => {
  18. this.bargainingStatus();
  19. });
  20. },
  21. methods: {
  22. bargainingStatus() {
  23. this.$axios
  24. .$get('activity/v5/assist/bargaining/current/bargainingStatus')
  25. .then((res) => {
  26. if (res.success) {
  27. // bargainingStatus 0 :选择云机界面 1:砍一刀界面 2;邀请好友页面 3:成功,领取下一台云机界面 4:失败,领取下一台云机界面
  28. switch (res.data.bargainingStatus) {
  29. case 0:
  30. this.$router.replace('/claimCloudPhone/chooseCloudPhone');
  31. break;
  32. default:
  33. this.$router.replace(
  34. '/claimCloudPhone/' + res.data.bargainingStatus,
  35. );
  36. break;
  37. }
  38. }
  39. });
  40. },
  41. },
  42. };
  43. </script>
  44. <style lang="scss" scoped></style>