index.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <template>
  2. <view id="success-container" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
  3. <view>
  4. <view style="display: flex">
  5. <image style="width: 120px; height: 120px; margin: 50px auto 20px auto" src="@/static/images/unitInfoCollection/success.png" />
  6. </view>
  7. <view style="text-align: center; font-weight: 600">{{ codeName }}</view>
  8. </view>
  9. <view class="app-button-fixed" v-if="showNow" style="box-shadow: 0px 0px 15px 0 rgba(0, 0, 0, 0)">
  10. <u-button class="app-buttom" type="primary" @click="navigateTo()" shape="circle"> 返回 </u-button>
  11. </view>
  12. </view>
  13. </template>
  14. <script setup>
  15. import config from "@/config";
  16. import { onLoad, onShow, onHide, onLaunch } from "@dcloudio/uni-app";
  17. import { ref, onMounted, inject, shallowRef, reactive, toRefs, getCurrentInstance } from "vue";
  18. import { publicStores, useStores } from "@/store/modules/index";
  19. import { getToken, setToken, removeToken } from "@/utils/auth";
  20. const publicStore = publicStores();
  21. const { proxy } = getCurrentInstance();
  22. const showNow = ref(true);
  23. const codeName = ref("");
  24. /**
  25. * @返回上一级
  26. */
  27. function navigateTo() {
  28. proxy.$tab.navigateBack(1);
  29. }
  30. onLoad((options) => {
  31. if ("showNow" in options) {
  32. showNow.value = options.showNow;
  33. }
  34. if ("codeName" in options) {
  35. codeName.value = options.codeName;
  36. }
  37. });
  38. </script>
  39. <style lang="scss" scoped>
  40. #success-container {
  41. position: fixed;
  42. top: 0;
  43. left: 0;
  44. right: 0;
  45. bottom: 0;
  46. z-index: 1;
  47. width: 100%;
  48. padding: 0 15px;
  49. margin: auto;
  50. padding-top: 20%;
  51. //#ifdef MP-WEIXIN
  52. padding-top: 30%;
  53. //#endif
  54. background-color: #ffffff;
  55. .top {
  56. }
  57. .content {
  58. display: flex;
  59. margin: 30px 0;
  60. .title {
  61. margin: auto auto auto 0;
  62. color: #000;
  63. font-size: 18px;
  64. }
  65. .icons {
  66. margin: auto 5px auto 0;
  67. }
  68. .setting {
  69. color: #2a98ff;
  70. margin: auto 0;
  71. }
  72. }
  73. }
  74. </style>