Files
crmeb-mp/components/emptyPage.vue
karlcarlo a5c5d753b6 feat: 添加静态资源文件及基础组件
- 新增大量图片资源,包括图标、背景图、海报等,用于页面展示
- 添加字体文件及样式配置,支持自定义字体
- 引入 uni-ui 组件库,包括图标、弹窗、日期选择器等常用组件
- 添加网络状态监听、加密工具等基础工具函数
- 配置 Vuex 状态管理,包括购物车数量、热门搜索词等
- 增加页面组件,如用户协议、分销信息、提现状态等
- 配置项目构建和忽略文件,优化开发体验
2026-02-26 17:59:51 +08:00

62 lines
1.2 KiB
Vue

<template>
<!-- 无数据时显示 -->
<view class="empty-page w-full flex-col flex-center pt-82 bg--w111-fff rd-24rpx">
<image class="empty-img" :src="imgSrc"></image>
<view v-if="!isLogin" class="fs-28 fw-500 text--w111-282828">暂未登录</view>
<view class="fs-26 text--w111-999 lh-36rpx pt-16">{{title}}</view>
<view class="w-360 h-72 rd-36rpx flex-center font-num fw-500 fs-26 theme-border mt-48"
v-if="!isLogin" @tap="goLog">立即登录</view>
<slot name="bottom"></slot>
</view>
</template>
<script>
import {HTTP_REQUEST_URL} from '@/config/app';
import { toLogin } from '@/libs/login.js';
export default{
props: {
title: {
type: String,
default: '暂无记录',
},
src:{
type: String,
default: '/statics/images/empty-box.gif',
},
isLogin:{
type:Boolean,
default: true
}
},
data(){
return{
imgHost:HTTP_REQUEST_URL
}
},
computed:{
imgSrc(){
return HTTP_REQUEST_URL + this.src
}
},
methods:{
goLog(){
toLogin()
}
}
}
</script>
<style lang="scss">
.pt-82{
padding: 82rpx 0 160rpx;
}
.empty-img{
width: 440rpx;
height: 360rpx;
}
.theme-border{
border: 1px solid var(--view-theme);
}
</style>