- 业务源码统一迁入 src/,H5 模板移到 public/index.html - 新增 @vue/cli 4.5 + @dcloudio 2.0.2-5020620260917001 全套依赖与 scripts - 保留 vue.config.js 的 ROUTES 注入(uni-simple-router 运行时依赖) - 新增 scripts/node-compat.cjs 兼容 Node 23+ 移除的 util.isRegExp 等 API - README 补充构建/运行/回退说明
321 lines
6.1 KiB
Vue
321 lines
6.1 KiB
Vue
<template>
|
||
<view class="normar_container">
|
||
<page-nav title="404"></page-nav>
|
||
<view class="page-not-found">
|
||
|
||
<!-- 主要内容 -->
|
||
<view class="content">
|
||
|
||
<!-- 标题 -->
|
||
<text class="title">页面开发中</text>
|
||
|
||
<!-- 描述 -->
|
||
<text class="description">该功能正在紧锣密鼓的开发中,敬请期待!</text>
|
||
|
||
<!-- 提示信息 -->
|
||
<view class="tips">
|
||
<text class="tip-text">💡 您可以:</text>
|
||
<view class="tip-items">
|
||
<text class="tip-item">1. 返回上一页继续操作</text>
|
||
<text class="tip-item">2. 联系客服反馈需求</text>
|
||
<text class="tip-item">3. 查看其他可用功能</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 操作按钮 -->
|
||
<view class="action-buttons">
|
||
<u-button type="primary" shape="circle" @click="goBack" :custom-style="{marginBottom: '20rpx'}">
|
||
<u-icon name="arrow-left" size="24" color="#fff" style="margin-right: 8px;"></u-icon>
|
||
返回上一页
|
||
</u-button>
|
||
|
||
<u-button type="home" shape="circle" @click="goHome">
|
||
<u-icon name="home" size="24" color="#fff" style="margin-right: 8px;"></u-icon>
|
||
返回首页
|
||
</u-button>
|
||
|
||
</view>
|
||
|
||
</view>
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
export default {
|
||
data() {
|
||
return {
|
||
// 页面配置
|
||
showTimeline: true,
|
||
showProgress: true,
|
||
}
|
||
},
|
||
computed: {
|
||
// 根据进度设置颜色
|
||
progressColor() {
|
||
if (this.progress < 30) return '#dd524d'; // 红色
|
||
if (this.progress < 70) return '#f0ad4e'; // 黄色
|
||
return '#4cd964'; // 绿色
|
||
}
|
||
},
|
||
onLoad(options) {
|
||
// 可以通过页面传参自定义显示内容
|
||
if (options.pageName) {
|
||
this.pageName = options.pageName;
|
||
}
|
||
|
||
// 记录访问日志(可选)
|
||
this.logAccess();
|
||
},
|
||
methods: {
|
||
// 记录页面访问
|
||
logAccess() {
|
||
console.log(`页面未开发提示:${this.pageName || '当前页面'}`);
|
||
},
|
||
|
||
// 返回上一页
|
||
goBack() {
|
||
uni.navigateBack({
|
||
delta: 1,
|
||
fail: () => {
|
||
// 如果无法返回,则跳转到首页
|
||
uni.switchTab({
|
||
url: '/pages/index/index'
|
||
});
|
||
}
|
||
});
|
||
},
|
||
|
||
// 返回首页
|
||
goHome() {
|
||
uni.switchTab({
|
||
url: '/pages/index/index'
|
||
});
|
||
},
|
||
|
||
// 联系客服
|
||
contactSupport() {
|
||
// 这里可以跳转到客服页面或拨打电话
|
||
const phone = '400-123-4567';
|
||
|
||
uni.showActionSheet({
|
||
itemList: [`拨打客服电话: ${phone}`, '在线客服'],
|
||
success: (res) => {
|
||
if (res.tapIndex === 0) {
|
||
// 拨打电话
|
||
uni.makePhoneCall({
|
||
phoneNumber: phone
|
||
});
|
||
} else if (res.tapIndex === 1) {
|
||
// 跳转到在线客服页面
|
||
uni.navigateTo({
|
||
url: '/pages/customer-service/index'
|
||
});
|
||
}
|
||
}
|
||
});
|
||
},
|
||
|
||
// 分享页面(可选)
|
||
onShareAppMessage() {
|
||
return {
|
||
title: '功能即将上线,敬请期待!',
|
||
path: '/pages/common/under-development'
|
||
};
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style lang="scss" scoped>
|
||
.page-not-found {
|
||
background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
|
||
display: flex;
|
||
flex-direction: column;
|
||
|
||
// 头部
|
||
.header {
|
||
height: 120rpx;
|
||
background-color: #fff;
|
||
display: flex;
|
||
align-items: center;
|
||
padding: 0 30rpx;
|
||
border-bottom: 1px solid #f0f0f0;
|
||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
|
||
|
||
.header-title {
|
||
font-size: 36rpx;
|
||
font-weight: bold;
|
||
color: #333;
|
||
margin-left: 30rpx;
|
||
}
|
||
}
|
||
|
||
// 主要内容
|
||
.content {
|
||
flex: 1;
|
||
padding: 60rpx 40rpx;
|
||
text-align: center;
|
||
|
||
// 图标
|
||
.icon-container {
|
||
margin-bottom: 50rpx;
|
||
animation: pulse 2s infinite;
|
||
}
|
||
|
||
// 标题
|
||
.title {
|
||
display: block;
|
||
font-size: 48rpx;
|
||
font-weight: bold;
|
||
color: #333;
|
||
margin-bottom: 30rpx;
|
||
}
|
||
|
||
// 描述
|
||
.description {
|
||
display: block;
|
||
font-size: 32rpx;
|
||
color: #666;
|
||
margin-bottom: 60rpx;
|
||
line-height: 1.6;
|
||
}
|
||
|
||
// 时间线
|
||
.timeline {
|
||
background-color: #fff;
|
||
border-radius: 20rpx;
|
||
padding: 40rpx;
|
||
margin-bottom: 40rpx;
|
||
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08);
|
||
|
||
.timeline-title {
|
||
display: block;
|
||
font-size: 30rpx;
|
||
color: #999;
|
||
margin-bottom: 15rpx;
|
||
}
|
||
|
||
.timeline-date {
|
||
display: block;
|
||
font-size: 42rpx;
|
||
font-weight: bold;
|
||
color: #4cd964;
|
||
}
|
||
}
|
||
|
||
// 进度条
|
||
.progress-section {
|
||
background-color: #fff;
|
||
border-radius: 20rpx;
|
||
padding: 40rpx;
|
||
margin-bottom: 40rpx;
|
||
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08);
|
||
|
||
.progress-title {
|
||
display: block;
|
||
font-size: 30rpx;
|
||
color: #999;
|
||
margin-bottom: 30rpx;
|
||
text-align: left;
|
||
}
|
||
|
||
.progress-text {
|
||
display: block;
|
||
font-size: 28rpx;
|
||
color: #666;
|
||
margin-top: 20rpx;
|
||
text-align: left;
|
||
}
|
||
}
|
||
|
||
// 提示信息
|
||
.tips {
|
||
background-color: #fff;
|
||
border-radius: 20rpx;
|
||
padding: 40rpx;
|
||
margin-bottom: 40rpx;
|
||
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08);
|
||
text-align: left;
|
||
|
||
.tip-text {
|
||
display: block;
|
||
font-size: 32rpx;
|
||
font-weight: 500;
|
||
color: #333;
|
||
margin-bottom: 25rpx;
|
||
}
|
||
|
||
.tip-items {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 20rpx;
|
||
|
||
.tip-item {
|
||
font-size: 28rpx;
|
||
color: #666;
|
||
line-height: 1.6;
|
||
|
||
&::before {
|
||
content: "• ";
|
||
color: #4cd964;
|
||
font-weight: bold;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
// 操作按钮
|
||
.action-buttons {
|
||
padding: 0 40rpx 40rpx;
|
||
|
||
::v-deep .u-btn {
|
||
height: 100rpx;
|
||
font-size: 34rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
}
|
||
|
||
// 底部
|
||
.footer {
|
||
padding: 30rpx 0 40rpx;
|
||
text-align: center;
|
||
border-top: 1px solid #f0f0f0;
|
||
background-color: #fff;
|
||
|
||
.footer-text {
|
||
display: block;
|
||
font-size: 24rpx;
|
||
color: #999;
|
||
margin-bottom: 15rpx;
|
||
}
|
||
|
||
.version {
|
||
display: block;
|
||
font-size: 24rpx;
|
||
color: #ccc;
|
||
}
|
||
}
|
||
|
||
// 动画
|
||
@keyframes pulse {
|
||
0% {
|
||
transform: scale(1);
|
||
opacity: 1;
|
||
}
|
||
|
||
50% {
|
||
transform: scale(1.05);
|
||
opacity: 0.8;
|
||
}
|
||
|
||
100% {
|
||
transform: scale(1);
|
||
opacity: 1;
|
||
}
|
||
}
|
||
}
|
||
</style> |