index.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <view class="alert-wrapper" :style="viewColor">
  3. <view class="alert-box">
  4. <image :src="domain+'/static/diy/success'+keyColor+'.png'" mode=""></image>
  5. <view class="txt">{{msg}}</view>
  6. <view class="btn" @click="close">鎴戠煡閬撲簡</view>
  7. </view>
  8. </view>
  9. </template>
  10. <script>
  11. // +----------------------------------------------------------------------
  12. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  13. // +----------------------------------------------------------------------
  14. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  15. // +----------------------------------------------------------------------
  16. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  17. // +----------------------------------------------------------------------
  18. // | Author: CRMEB Team <admin@crmeb.com>
  19. // +----------------------------------------------------------------------
  20. import { mapGetters } from "vuex";
  21. import { HTTP_REQUEST_URL } from '@/config/app';
  22. export default{
  23. data() {
  24. return {
  25. domain: HTTP_REQUEST_URL,
  26. }
  27. },
  28. props:{
  29. msg:{
  30. type:String,
  31. default:''
  32. },
  33. },
  34. computed: mapGetters(['viewColor','keyColor']),
  35. methods:{
  36. close(){
  37. this.$emit('bindClose');
  38. }
  39. }
  40. }
  41. </script>
  42. <style lang="scss">
  43. .alert-wrapper{
  44. position: fixed;
  45. left: 0;
  46. top: 0;
  47. width: 100%;
  48. height: 100%;
  49. background-color: rgba(0,0,0,.5);
  50. z-index: 10;
  51. .alert-box{
  52. position: absolute;
  53. left: 50%;
  54. top: 50%;
  55. transform: translate(-50%,-50%);
  56. display: flex;
  57. flex-direction: column;
  58. align-items: center;
  59. justify-content: center;
  60. width: 500rpx;
  61. height: 540rpx;
  62. background-color: #fff;
  63. border-radius: 10rpx;
  64. font-size: 34rpx;
  65. image{
  66. width: 149rpx;
  67. height: 230rpx;
  68. }
  69. .txt{
  70. margin-bottom: 20rpx;
  71. }
  72. .btn{
  73. width:340rpx;
  74. height:90rpx;
  75. line-height: 90rpx;
  76. text-align: center;
  77. background-image:linear-gradient(-90deg,var(--view-bntColor21) 0%,var(--view-bntColor22) 100%);
  78. border-radius:45rpx;
  79. color: #fff;
  80. }
  81. }
  82. }
  83. </style>