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>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
dd25c0ae63
commit
77e5cb9510
+176
-210
@@ -1,22 +1,46 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class='nr_item' v-for="(item,index) in lookList" :key="index" @click="toDetail(item.id)">
|
||||
<image class="nr_img" :src="item.mainPic||'https://aliyunoss.hn12301.net/sd/all_moren.png'"></image>
|
||||
<view class="nr_item_r">
|
||||
<text class="n_text">{{item.name||''}}</text>
|
||||
<view class="nr_tags">
|
||||
<text :class="index1==0?'t_text1':index1==1?'t_text':index1==2?'t_text2':'t_text3'"
|
||||
v-for="(item1,index1) in ['节日福利/春游秋游','余额券','满减券']" :key="index1">{{item1}}</text>
|
||||
<view class="page mm-page">
|
||||
<!-- xuchao: 景区卡片列表 —— 整卡可点进详情,入场逐个渐显 -->
|
||||
<view class="list mm-stagger">
|
||||
<view class="card mm-card mm-fade-up" v-for="(item,index) in lookList" :key="index"
|
||||
@click="toDetail(item.id)">
|
||||
<image class="card__img" mode="aspectFill"
|
||||
:src="item.mainPic||'https://aliyunoss.hn12301.net/sd/all_moren.png'"></image>
|
||||
<view class="card__body">
|
||||
<view class="card__name">{{item.name||''}}</view>
|
||||
<view class="card__desc" v-if="item.subTypeId">{{item.subTypeId}}</view>
|
||||
<view class="card__foot">
|
||||
<view class="card__price">
|
||||
<view class="card__origin">原价 <text
|
||||
class="card__origin-num">¥{{(item.price/100).toFixed(0)}}</text></view>
|
||||
<view class="card__now">
|
||||
<text class="card__cur">¥</text>
|
||||
<text class="card__num mm-display mm-grad-text">{{(item.unitPrice/100).toFixed(0)}}</text>
|
||||
<text class="card__unit">元</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card__cta mm-grad">
|
||||
<text>预订</text>
|
||||
<u-icon name="arrow-right" color="#ffffff" size="22"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="r_text">{{item.subTypeId}}</view>
|
||||
<view class="nr_origin">原售价<text
|
||||
class="nr_origin_num">{{(item.price/100).toFixed(0)}}</text>元</view>
|
||||
<view class="p_text"><text class="p_label">会员补贴价</text><text class="p_symbol">¥</text><text
|
||||
class="p_num">{{(item.unitPrice/100).toFixed(0)}}</text><text class="p_unit">元</text></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- xuchao: 空态(首次请求返回空列表才显示,避免加载中闪烁) -->
|
||||
<view class="empty mm-fade-up" v-if="showEmpty">
|
||||
<u-icon name="empty-coupon" color="#CBD5E1" size="120"></u-icon>
|
||||
<view class="empty__text">暂无在售门票产品</view>
|
||||
</view>
|
||||
|
||||
<!-- xuchao: 列表底部:仅分页加载时显示"正在加载…" -->
|
||||
<view class="foot" v-if="lookList.length > 0 && !isLoad">
|
||||
<text>正在加载…</text>
|
||||
</view>
|
||||
|
||||
<!-- xuchao: 订单悬浮按钮 -->
|
||||
<gmy-float-touch :mainImg="mainImg" @menuClick="floatTouchClick"></gmy-float-touch>
|
||||
<gmy-float-touch @menuClick="floatTouchClick"></gmy-float-touch>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -30,10 +54,11 @@
|
||||
components: { gmyFloatTouch },
|
||||
data() {
|
||||
return {
|
||||
mainImg: "../../static/logo4.png",
|
||||
pageAll: 2,
|
||||
isLoad: true,
|
||||
lookList: [],
|
||||
// xuchao: 首次请求是否已返回,用于区分"加载中"与"真没数据"
|
||||
firstLoaded: false,
|
||||
obj: {
|
||||
"name": "",
|
||||
"typeId": "",
|
||||
@@ -44,6 +69,11 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
showEmpty() {
|
||||
return this.firstLoaded && this.lookList.length === 0
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
that = this
|
||||
// xuchao: 未登录则(正式)跳登录页 / (开发)静默假登录
|
||||
@@ -59,8 +89,10 @@
|
||||
this.isLoad = false
|
||||
this.$u.api.queryTicketsPage(this.obj).then(res => {
|
||||
this.isLoad = true
|
||||
this.firstLoaded = true
|
||||
this.obj.pageNum = this.obj.pageNum * 1 + 1
|
||||
this.pageAll = Math.ceil(res.data.total / 10)
|
||||
this.total = res.data.total
|
||||
this.lookList = this.lookList.concat(res.data.list)
|
||||
})
|
||||
}
|
||||
@@ -82,209 +114,143 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background: #FFEFD5;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="less">
|
||||
.nr_item {
|
||||
// xuchao: 左右边距用百分比,随屏幕宽度等比变化;宽度自适应(去掉固定 702rpx)
|
||||
width: auto;
|
||||
box-sizing: border-box;
|
||||
margin: 24rpx 3.2% 0;
|
||||
display: flex;
|
||||
background: #fff;
|
||||
padding: 12rpx;
|
||||
|
||||
.nr_img {
|
||||
width: 268rpx;
|
||||
height: 268rpx;
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.nr_item_r {
|
||||
// xuchao: 右侧信息列改为弹性填充,配合卡片宽度自适应
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
margin-left: 20rpx;
|
||||
display: flex;
|
||||
gap: 8rpx;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
|
||||
.nr_tags {
|
||||
display: flex;
|
||||
gap: 12rpx;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.p_text {
|
||||
position: absolute;
|
||||
bottom: 0rpx;
|
||||
right: 0rpx;
|
||||
// xuchao: border-box 让盒子精确等于底图宽度;右侧 padding 让出蓝色箭头区,文字在橙色槽内居中
|
||||
width: 250rpx;
|
||||
height: 50rpx;
|
||||
box-sizing: border-box;
|
||||
background: url('https://aliyunoss.hn12301.net/xgh/image_bj_text.png');
|
||||
background-size: 100% 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
padding-left: 14rpx;
|
||||
padding-right: 51rpx;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.p_label {
|
||||
font-size: 16rpx;
|
||||
}
|
||||
|
||||
.p_symbol {
|
||||
font-size: 18rpx;
|
||||
margin: 0 2rpx 0 6rpx;
|
||||
}
|
||||
|
||||
.p_num {
|
||||
font-size: 32rpx;
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.p_unit {
|
||||
font-size: 16rpx;
|
||||
// xuchao: 价格与"元"之间留出明显间距(8rpx ≈ 375 屏 4px)
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
|
||||
.nr_origin {
|
||||
position: absolute;
|
||||
bottom: 60rpx;
|
||||
right: 0rpx;
|
||||
width: 100%;
|
||||
text-align: right;
|
||||
color: #4F4F4F;
|
||||
font-size: 12rpx;
|
||||
}
|
||||
|
||||
.nr_origin_num {
|
||||
font-size: 28rpx;
|
||||
text-decoration: line-through;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.r_text {
|
||||
width: 100%;
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis !important;
|
||||
display: -webkit-box !important;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
|
||||
.n_text {
|
||||
color: #008F90;
|
||||
font-weight: bolder;
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis !important;
|
||||
display: -webkit-box !important;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.t_text {
|
||||
background-color: #FDEEC3;
|
||||
font-size: 18rpx;
|
||||
padding: 5rpx 10rpx;
|
||||
color: #D57817;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.t_text1 {
|
||||
background-color: #FDF4ED;
|
||||
font-size: 18rpx;
|
||||
padding: 5rpx 10rpx;
|
||||
color: #AF4744;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.t_text2 {
|
||||
background-color: #cbebfb;
|
||||
font-size: 18rpx;
|
||||
padding: 5rpx 10rpx;
|
||||
color: #6ba0b3;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.t_text3 {
|
||||
background-color: #F0F1F5;
|
||||
font-size: 18rpx;
|
||||
padding: 5rpx 10rpx;
|
||||
color: #525357;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
}
|
||||
.page {
|
||||
padding: 32rpx 32rpx 40rpx;
|
||||
}
|
||||
|
||||
// 以下为旧版遗留、当前模板未使用的样式(.item / .r_text1 / .n_text1),按约定仅提示不删
|
||||
.item {
|
||||
width: 702rpx;
|
||||
padding: 12rpx;
|
||||
border-radius: 8rpx;
|
||||
background-color: #fff;
|
||||
position: relative;
|
||||
margin-top: 24rpx;
|
||||
/* ---------- 卡片列表 ---------- */
|
||||
.list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 24rpx;
|
||||
}
|
||||
|
||||
.card {
|
||||
display: flex;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
transition: transform 0.2s ease-out, box-shadow 0.3s ease-out;
|
||||
}
|
||||
|
||||
.card:active {
|
||||
transform: scale(0.985);
|
||||
box-shadow: var(--mm-shadow-sm);
|
||||
}
|
||||
|
||||
.card__img {
|
||||
width: 208rpx;
|
||||
height: 208rpx;
|
||||
flex: none;
|
||||
border-radius: 18rpx;
|
||||
background: var(--mm-muted);
|
||||
}
|
||||
|
||||
.card__body {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
margin-left: 24rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.item_name {
|
||||
width: 434rpx;
|
||||
line-height: normal;
|
||||
color: #000;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis !important;
|
||||
display: -webkit-box !important;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
.card__name {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
letter-spacing: -0.01em;
|
||||
color: var(--mm-fg);
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis !important;
|
||||
display: -webkit-box !important;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
||||
.tag {
|
||||
font-size: 20rpx;
|
||||
color: #fff;
|
||||
padding: 6rpx 5rpx;
|
||||
background: linear-gradient(180deg, #FF9E49 0%, #ED3B1A 100%);
|
||||
border-radius: 4rpx;
|
||||
margin-top: 12rpx;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
.card__desc {
|
||||
margin-top: 8rpx;
|
||||
font-size: 22rpx;
|
||||
line-height: 1.45;
|
||||
color: var(--mm-muted-fg);
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis !important;
|
||||
display: -webkit-box !important;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
||||
.tag1 {
|
||||
font-size: 20rpx;
|
||||
color: #999999;
|
||||
padding: 5rpx;
|
||||
border: 2rpx #999999 solid;
|
||||
border-radius: 4rpx;
|
||||
margin-top: 12rpx;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
.card__foot {
|
||||
margin-top: auto;
|
||||
padding-top: 12rpx;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.hot_tag {
|
||||
height: 36rpx;
|
||||
color: #fff;
|
||||
font-size: 20rpx;
|
||||
position: absolute;
|
||||
top: 12rpx;
|
||||
left: 12rpx;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
padding: 0rpx 8rpx;
|
||||
border-radius: 8rpx 0rpx 8rpx 0rpx;
|
||||
line-height: 36rpx;
|
||||
}
|
||||
.card__origin {
|
||||
font-size: 20rpx;
|
||||
color: var(--mm-muted-fg);
|
||||
}
|
||||
|
||||
.card__origin-num {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.card__now {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.card__cur {
|
||||
font-size: 24rpx;
|
||||
font-weight: 600;
|
||||
color: var(--mm-accent);
|
||||
margin-right: 2rpx;
|
||||
}
|
||||
|
||||
.card__num {
|
||||
font-size: 46rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.card__unit {
|
||||
font-size: 20rpx;
|
||||
color: var(--mm-muted-fg);
|
||||
margin-left: 6rpx;
|
||||
}
|
||||
|
||||
/* xuchao: 预订按钮 —— 渐变胶囊 + 箭头,承担整卡的行动号召 */
|
||||
.card__cta {
|
||||
flex: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6rpx;
|
||||
height: 60rpx;
|
||||
padding: 0 26rpx;
|
||||
border-radius: 999rpx;
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
box-shadow: 0 6rpx 16rpx rgba(0, 82, 255, 0.25);
|
||||
}
|
||||
|
||||
/* ---------- 空态与底部 ---------- */
|
||||
.empty {
|
||||
margin-top: 160rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 24rpx;
|
||||
}
|
||||
|
||||
.empty__text {
|
||||
font-size: 26rpx;
|
||||
color: var(--mm-muted-fg);
|
||||
}
|
||||
|
||||
.foot {
|
||||
padding: 44rpx 0 20rpx;
|
||||
text-align: center;
|
||||
font-size: 22rpx;
|
||||
letter-spacing: 0.1em;
|
||||
color: var(--mm-muted-fg);
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user