isSignIn.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <template>
  2. <view class="container content-sign-in">
  3. <view class="content-box">
  4. <upload-contact v-if="!isBindMobile" :codeId="codeId" @getDetail="getDetail" />
  5. <signInItem :itemDetail="dataDetail" v-else />
  6. </view>
  7. </view>
  8. </template>
  9. <script>
  10. import signInItem from "./components/signInItem.vue";
  11. import UploadContact from "./components/uploadContact.vue";
  12. import { Mine } from "@/config/api.js";
  13. export default {
  14. components: { signInItem, UploadContact },
  15. data() {
  16. return {
  17. dataDetail: {},
  18. isBindMobile: false,
  19. codeId: 0,
  20. };
  21. },
  22. methods: {
  23. async getDetail() {
  24. const res = await Mine.activity_signin_detail({
  25. ActivityId: this.codeId,
  26. });
  27. if (res.Ret === 200) {
  28. console.log(res);
  29. this.dataDetail = res.Data.Detail;
  30. this.isBindMobile = res.Data.IsBindingMobile;
  31. }
  32. },
  33. },
  34. onLoad(options) {
  35. this.codeId = Number(options.scene) || 0;
  36. this.codeId && this.getDetail();
  37. },
  38. };
  39. </script>
  40. <style lang="scss" scoped>
  41. .content-sign-in {
  42. width: 100%;
  43. height: 100%;
  44. background: url("https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/sign_in_bg_icon.jpg") no-repeat;
  45. background-size: 100% 100%;
  46. display: flex;
  47. .content-box {
  48. margin: 165rpx auto;
  49. width: 710rpx;
  50. height: 1004rpx;
  51. background: url("https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/sign_in_box_bg.jpg") no-repeat;
  52. background-size: 100% 100%;
  53. border-radius: 18rpx;
  54. overflow: hidden;
  55. padding-top: 77rpx;
  56. }
  57. }
  58. </style>