Files
h5-meike/components/gmy-back-touch/gmy-back-touch.vue
T
jacobxu666andClaude Opus 4.8 77e5cb9510 feat: 全站 UI 按 Minimalist Modern 重设计,新增返回悬浮钮
- 设计令牌层:mm-* CSS 变量与工具类、uView 换肤、优设标题黑字体
- 九个页面全部重写为新风格(列表/详情/下单/出行人/订单/支付成功/登录)
- 补齐 H5 运行时缺失的基础样式(uni-view/scroll-view/toast/swiper 等,App.vue 全局)
- 修复:详情头图轮播、预订须知弹层滚动、出行人数量按购买数限制、订单详情去箭头
- 新增 gmy-back-touch 返回悬浮钮,除首页外全页接入,点击返回上一页

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-05 12:48:45 +08:00

58 lines
1.4 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template name="gmy-back-touch">
<!-- xuchao: 返回悬浮钮 —— 交互效果与首页订单钮一致(外层定位盒响应点击、按压缩放),位置上移 100px -->
<view class="gbt-box" @click="onTap">
<image class="gbt-btn" src="/static/back.png"></image>
</view>
</template>
<script>
export default {
name: "gmy-back-touch",
methods: {
// xuchao: 返回上一页;H5 下 navigateBack 实为 history.back,
// 新标签直开(应用内无栈且无浏览历史)时它不触发回调,需直接兜底回首页
onTap: function() {
if (getCurrentPages().length <= 1 && history.length <= 1) {
uni.reLaunch({
url: '/pages/ticket/scenic'
})
return
}
uni.navigateBack({
delta: 1,
fail: () => {
uni.reLaunch({
url: '/pages/ticket/scenic'
})
}
})
}
}
}
</script>
<style lang="scss">
/* xuchao: 类名加 gbt- 前缀,组件样式全局生效,避免裸类名撞名 */
.gbt-box {
position: fixed;
left: 24rpx;
/* xuchao: 在首页订单钮位置基础上向上移动 50px */
bottom: calc(100rpx + 50px);
z-index: 999;
}
/* xuchao: 与 gft-btn 同款尺寸、蓝色投影、按压缩放反馈 */
.gbt-btn {
width: 104rpx;
height: 104rpx;
border-radius: 50%;
display: block;
box-shadow: 0 12rpx 28rpx rgba(0, 82, 255, 0.35);
transition: transform 0.12s ease;
}
.gbt-box:active .gbt-btn {
transform: scale(0.9);
}
</style>