微信小程序页面迁移校验之前 P5任务处理之前

This commit is contained in:
Neo
2026-03-09 01:19:21 +08:00
parent 263bf96035
commit 6e20987d2f
1112 changed files with 153824 additions and 219694 deletions

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1,39 @@
Component({
properties: {
/** 是否显示 */
visible: {
type: Boolean,
value: true,
},
/** 跳转目标页面 */
targetUrl: {
type: String,
value: '/pages/chat/chat',
},
/** 可选:携带客户 ID 参数 */
customerId: {
type: String,
value: '',
},
/** 距底部距离rpxTabBar 页面用 200非 TabBar 页面用 120 */
bottom: {
type: Number,
value: 200,
},
},
methods: {
onTap() {
let url = this.data.targetUrl
if (this.data.customerId) {
url += `?customerId=${this.data.customerId}`
}
wx.navigateTo({
url,
fail: () => {
wx.showToast({ title: '页面跳转失败', icon: 'none' })
},
})
},
},
})

View File

@@ -0,0 +1,14 @@
<!-- AI 悬浮对话按钮 — SVG 机器人 + 渐变流动背景 -->
<view
class="ai-float-btn-container"
wx:if="{{visible}}"
style="bottom: {{bottom}}rpx"
bindtap="onTap"
>
<view class="ai-float-btn">
<!-- 高光叠加层 -->
<view class="ai-float-btn-highlight"></view>
<!-- 机器人 SVG小程序用 image 引用) -->
<image class="ai-icon-svg" src="/assets/icons/ai-robot.svg" mode="aspectFit" />
</view>
</view>

View File

@@ -0,0 +1,57 @@
/* AI 悬浮按钮 — 忠于 H5 原型:渐变流动背景 + 机器人 SVG */
/* H5: 56px → 56×2×0.875 = 98rpx */
.ai-float-btn-container {
position: fixed;
right: 28rpx;
z-index: 100;
}
.ai-float-btn {
width: 98rpx;
height: 98rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
position: relative;
overflow: hidden;
/* 渐变动画背景 — 忠于 H5 原型 */
background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #667eea 100%);
background-size: 400% 400%;
animation: gradientShift 8s ease infinite;
box-shadow: 0 8rpx 40rpx rgba(102, 126, 234, 0.4);
}
.ai-float-btn:active {
transform: scale(0.95);
}
/* 高光叠加层 */
.ai-float-btn-highlight {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(145deg, rgba(255,255,255,0.2) 0%, transparent 50%, rgba(0,0,0,0.1) 100%);
border-radius: 50%;
pointer-events: none;
}
/* 背景渐变流动动画 */
@keyframes gradientShift {
0% { background-position: 0% 50%; }
25% { background-position: 50% 100%; }
50% { background-position: 100% 50%; }
75% { background-position: 50% 0%; }
100% { background-position: 0% 50%; }
}
/* SVG 图标 H5: 30px → 52rpx */
.ai-icon-svg {
width: 52rpx;
height: 52rpx;
position: relative;
z-index: 1;
}