s-wallet-modal.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <template>
  2. <!-- 规格弹窗 -->
  3. <!-- showClose -->
  4. <su-popup :show="show" @close="colseWalletModal" type="center" round="10">
  5. <view class="model-box ss-flex-col">
  6. <view class="ss-m-t-56 ss-flex-col ss-col-center">
  7. <text class="cicon-check-round"></text>
  8. <template v-if="!state.msg">
  9. <view class="score-title">{{ t('pop.congratulations') }}</view>
  10. <template v-if="state.points && state.points !== 'null' && points2point(state.points) > 0 || state.socialStatus && state.socialStatus !== 'null'">
  11. <view class="model-title ss-flex ss-col-center ss-m-t-15 ss-font-35" v-if="state.points && points2point(state.points) > 0">
  12. {{ t('pop.commission_earned') }}:{{ points2point(state.points) }}
  13. </view>
  14. <view class="model-title ss-flex ss-col-center ss-m-t-15 ss-font-35" v-if="state.socialStatus">
  15. {{ t('pop.social_value_earned') }}:{{state.socialStatus}}
  16. </view>
  17. </template>
  18. <template v-else>
  19. <view class="model-title ss-flex ss-col-center ss-m-y-15 " >
  20. {{ t('pop.order_success') }}
  21. </view>
  22. </template>
  23. </template>
  24. <template v-else>
  25. <view class="model-title ss-flex ss-col-center ss-m-y-15 ">{{state.msg}}</view>
  26. </template>
  27. </view>
  28. <view class="model-bg ss-flex-col ss-col-center ss-row-right">
  29. <view class="ss-m-b-40">
  30. <button class="ss-reset-button confirm-btn" @tap="colseWalletModal();">{{ t('common.confirm') }}</button>
  31. </view>
  32. </view>
  33. </view>
  34. </su-popup>
  35. </template>
  36. <script setup>
  37. import {
  38. computed,
  39. reactive,
  40. ref,
  41. watch
  42. } from 'vue';
  43. import sheep from '@/sheep';
  44. import {
  45. showWalletModal,
  46. colseWalletModal
  47. } from '@/sheep/hooks/useModal';
  48. import {
  49. points2point
  50. } from '@/sheep/hooks/useGoods';
  51. import { t } from '@/locale'
  52. const headerBg = sheep.$url.css('/static/images/sign.png');
  53. const show = computed(() => sheep.$store('modal').getWallet);
  54. const state = computed(() => sheep.$store('modal').getWalletInfo)
  55. // 监听签到成功 3s之后自动关闭
  56. // watch(() => show.value, (newValue) => {
  57. // if(newValue){
  58. // setTimeout(colseSignUpModal,3000)
  59. // }
  60. // })
  61. </script>
  62. <style lang="scss" scoped>
  63. .model-box {
  64. width: 520rpx;
  65. // height: 590rpx;
  66. background: linear-gradient(177deg, #ff6000 0%, #fe832a 100%);
  67. // background: linear-gradient(177deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
  68. border-radius: 10rpx;
  69. .cicon-check-round {
  70. // font-size: 70rpx;
  71. color: #fff;
  72. }
  73. .score-title {
  74. font-size: 34rpx;
  75. font-family: OPPOSANS;
  76. font-weight: 500;
  77. color: #fcff00;
  78. }
  79. .model-title {
  80. // font-size: 28rpx;
  81. font-weight: 500;
  82. color: #ffffff;
  83. }
  84. .model-bg {
  85. width: 520rpx;
  86. height: 6.75rem;
  87. background-size: 100% 100%;
  88. background-image: v-bind(headerBg);
  89. background-repeat: no-repeat;
  90. border-radius: 0 0 10rpx 10rpx;
  91. .title {
  92. font-size: 34rpx;
  93. font-weight: bold;
  94. // color: var(--ui-BG-Main);
  95. color: #ff6000;
  96. }
  97. .subtitle {
  98. font-size: 26rpx;
  99. font-weight: 500;
  100. color: #999999;
  101. }
  102. .cancel-btn {
  103. width: 220rpx;
  104. height: 70rpx;
  105. border: 2rpx solid #ff6000;
  106. border-radius: 35rpx;
  107. font-size: 28rpx;
  108. font-weight: 500;
  109. color: #ff6000;
  110. line-height: normal;
  111. margin-right: 10rpx;
  112. }
  113. .confirm-btn {
  114. width: 300rpx;
  115. height: 70rpx;
  116. background: linear-gradient(90deg, #ff6000, #fe832a);
  117. box-shadow: 0 0.2em 0.5em rgba(#ff6000, 0.4);
  118. border-radius: 35rpx;
  119. font-size: 28rpx;
  120. font-weight: 500;
  121. color: #ffffff;
  122. line-height: normal;
  123. }
  124. }
  125. }
  126. </style>