commission-auth.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <!-- 分销权限弹窗:再没有权限时,进行提示 -->
  2. <template>
  3. <su-popup
  4. :show="state.show"
  5. type="center"
  6. round="10"
  7. @close="state.show = false"
  8. :isMaskClick="false"
  9. maskBackgroundColor="rgba(0, 0, 0, 0.7)"
  10. >
  11. <view class="notice-box">
  12. <view class="img-wrap">
  13. <image
  14. class="notice-img"
  15. :src="sheep.$url.static('/static/images/forbidden.png')"
  16. mode="aspectFill"
  17. />
  18. </view>
  19. <view class="notice-title"> 抱歉!您没有分销权限 </view>
  20. <view class="notice-detail"> 该功能暂不可用 </view>
  21. <button
  22. class="ss-reset-button notice-btn ui-Shadow-Main ui-BG-Main-Gradient"
  23. @tap="sheep.$router.back()"
  24. >
  25. 知道了
  26. </button>
  27. <button class="ss-reset-button back-btn" @tap="sheep.$router.back()"> 返回 </button>
  28. </view>
  29. </su-popup>
  30. </template>
  31. <script setup>
  32. import { onShow } from '@dcloudio/uni-app';
  33. import sheep from '@/sheep';
  34. import { reactive } from 'vue';
  35. import BrokerageApi from '@/sheep/api/trade/brokerage';
  36. const state = reactive({
  37. show: false,
  38. });
  39. onShow(async () => {
  40. // 读取是否有分销权限
  41. const { code, data } = await BrokerageApi.getBrokerageUser();
  42. if (code === 0 && !data?.brokerageEnabled) {
  43. state.show = true;
  44. }
  45. });
  46. </script>
  47. <style lang="scss" scoped>
  48. .notice-box {
  49. display: flex;
  50. flex-direction: column;
  51. justify-content: center;
  52. align-items: center;
  53. background-color: #fff;
  54. width: 612rpx;
  55. min-height: 658rpx;
  56. background: #ffffff;
  57. padding: 30rpx;
  58. border-radius: 20rpx;
  59. .img-wrap {
  60. margin-bottom: 50rpx;
  61. .notice-img {
  62. width: 180rpx;
  63. height: 170rpx;
  64. }
  65. }
  66. .notice-title {
  67. font-size: 35rpx;
  68. font-weight: bold;
  69. color: #333;
  70. margin-bottom: 28rpx;
  71. }
  72. .notice-detail {
  73. font-size: 28rpx;
  74. font-weight: 400;
  75. color: #999999;
  76. line-height: 36rpx;
  77. margin-bottom: 50rpx;
  78. }
  79. .notice-btn {
  80. width: 492rpx;
  81. line-height: 70rpx;
  82. border-radius: 35rpx;
  83. font-size: 28rpx;
  84. font-weight: 500;
  85. color: #ffffff;
  86. margin-bottom: 10rpx;
  87. }
  88. .back-btn {
  89. width: 492rpx;
  90. line-height: 70rpx;
  91. font-size: 28rpx;
  92. font-weight: 500;
  93. color: var(--ui-BG-Main-gradient);
  94. background: none;
  95. }
  96. }
  97. </style>