mall-uniapp/pages/commission/components/commission-auth.vue

102 lines
2.4 KiB
Vue
Raw Permalink Normal View History

2023-12-27 05:54:05 +00:00
<!-- 分销权限弹窗再没有权限时进行提示 -->
2022-11-22 07:45:36 +00:00
<template>
<su-popup
:show="state.show"
type="center"
round="10"
@close="state.show = false"
:isMaskClick="false"
maskBackgroundColor="rgba(0, 0, 0, 0.7)"
>
<view class="notice-box">
<view class="img-wrap">
<image
class="notice-img"
2023-12-27 05:54:05 +00:00
:src="sheep.$url.static('/static/img/shop/commission/forbidden.png')"
2022-11-22 07:45:36 +00:00
mode="aspectFill"
2023-12-27 05:54:05 +00:00
/>
2022-11-22 07:45:36 +00:00
</view>
2023-12-27 05:54:05 +00:00
<view class="notice-title"> 抱歉您没有分销权限 </view>
<view class="notice-detail"> 该功能暂不可用 </view>
2022-11-22 07:45:36 +00:00
<button
class="ss-reset-button notice-btn ui-Shadow-Main ui-BG-Main-Gradient"
2023-12-27 05:54:05 +00:00
@tap="sheep.$router.back()"
2022-11-22 07:45:36 +00:00
>
2023-12-27 05:54:05 +00:00
知道了
2022-11-22 07:45:36 +00:00
</button>
<button class="ss-reset-button back-btn" @tap="sheep.$router.back()"> </button>
</view>
</su-popup>
</template>
<script setup>
2023-12-27 05:54:05 +00:00
import { onShow } from '@dcloudio/uni-app';
2022-11-22 07:45:36 +00:00
import sheep from '@/sheep';
2023-12-27 05:54:05 +00:00
import { reactive } from 'vue';
import BrokerageApi from '@/sheep/api/trade/brokerage';
2022-11-22 07:45:36 +00:00
const state = reactive({
show: false,
});
2023-12-27 05:54:05 +00:00
onShow(async () => {
// 读取是否有分销权限
const { code, data } = await BrokerageApi.getBrokerageUser();
if (code === 0 && !data?.brokerageEnabled) {
state.show = true;
2022-11-22 07:45:36 +00:00
}
2023-12-27 05:54:05 +00:00
});
2022-11-22 07:45:36 +00:00
</script>
<style lang="scss" scoped>
.notice-box {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-color: #fff;
width: 612rpx;
min-height: 658rpx;
background: #ffffff;
padding: 30rpx;
border-radius: 20rpx;
.img-wrap {
margin-bottom: 50rpx;
.notice-img {
width: 180rpx;
height: 170rpx;
}
}
.notice-title {
font-size: 35rpx;
font-weight: bold;
color: #333;
margin-bottom: 28rpx;
}
.notice-detail {
font-size: 28rpx;
font-weight: 400;
color: #999999;
line-height: 36rpx;
margin-bottom: 50rpx;
}
.notice-btn {
width: 492rpx;
line-height: 70rpx;
border-radius: 35rpx;
font-size: 28rpx;
font-weight: 500;
color: #ffffff;
margin-bottom: 10rpx;
}
.back-btn {
width: 492rpx;
line-height: 70rpx;
font-size: 28rpx;
font-weight: 500;
color: var(--ui-BG-Main-gradient);
background: none;
}
}
</style>