fix: 修复页面跳转问题,优化导航逻辑
This commit is contained in:
parent
a4d2f1e2ac
commit
09c4f250d5
@ -66,10 +66,6 @@
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
// uni.hideTabBar({
|
||||
// fail() {
|
||||
// }
|
||||
// })
|
||||
this.$refs.loginRef.open()
|
||||
},
|
||||
close() {
|
||||
|
@ -266,6 +266,7 @@
|
||||
pageSize: 5,
|
||||
id: ''
|
||||
},
|
||||
isLogin: false, // Added for the new favorBreweryFun method
|
||||
};
|
||||
},
|
||||
onLoad({
|
||||
@ -467,8 +468,7 @@
|
||||
},
|
||||
// 收藏品牌方
|
||||
favorBreweryFun(status) {
|
||||
const token = uni.getStorageSync('token')
|
||||
if (!token) {
|
||||
if (!this.isLogin) {
|
||||
this.$refs.loginRef.open()
|
||||
return
|
||||
}
|
||||
@ -873,6 +873,7 @@
|
||||
min-height: 600rpx;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
animation: simple-fade 0.2s ease-out;
|
||||
}
|
||||
|
||||
/* 滚动容器 */
|
||||
@ -901,6 +902,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0rpx 1rpx 3rpx 0rpx rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
/* 商品网格 */
|
||||
@ -912,6 +914,7 @@
|
||||
gap: 24rpx;
|
||||
// padding: 0 24rpx;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0rpx 1rpx 3rpx 0rpx rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
/* 商品卡片 */
|
||||
@ -1094,30 +1097,49 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* 上滑加载动画 */
|
||||
@keyframes slide-in {
|
||||
/* 简化的淡入动画 */
|
||||
@keyframes simple-fade {
|
||||
from {
|
||||
transform: translateY(100%);
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
transform: translateY(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* 活动列表项动画 */
|
||||
.activity-item {
|
||||
animation: slide-in 0.3s ease-out;
|
||||
}
|
||||
|
||||
/* 商品卡片动画 */
|
||||
.goods-item {
|
||||
animation: slide-in 0.3s ease-out;
|
||||
}
|
||||
|
||||
/* 啤酒卡片动画 */
|
||||
/* 移除所有复杂的动画效果 */
|
||||
.activity-item,
|
||||
.goods-item,
|
||||
.beer-card {
|
||||
animation: slide-in 0.3s ease-out;
|
||||
animation: none;
|
||||
}
|
||||
|
||||
/* 移除旧的动画定义 */
|
||||
@keyframes tab-fade-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes item-slide-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* 移除延迟动画 */
|
||||
.beer-card:nth-child(2n),
|
||||
.activity-item:nth-child(2n),
|
||||
.goods-item:nth-child(2n),
|
||||
.beer-card:nth-child(3n),
|
||||
.activity-item:nth-child(3n),
|
||||
.goods-item:nth-child(3n) {
|
||||
animation-delay: 0s;
|
||||
}
|
||||
</style>
|
@ -9,11 +9,16 @@
|
||||
<image :src="bannerJoin.bannerUrl" class="img" mode="aspectFill" :lazy-load="true"></image>
|
||||
</view>
|
||||
<!-- 轮播 -->
|
||||
<swiper v-else class="join-box" circular :autoplay="true" :indicator-dots="true">
|
||||
<swiper v-else class="join-box"
|
||||
circular
|
||||
:autoplay="true"
|
||||
:indicator-dots="true"
|
||||
:indicator-color="'rgba(255,255,255,0.4)'"
|
||||
:indicator-active-color="'#FFFFFF'"
|
||||
>
|
||||
<swiper-item v-for="(item,index) in homeBanner" :key="index">
|
||||
<image :src="item.bannerUrl" class="img" mode="aspectFill" :lazy-load="true"></image>
|
||||
</swiper-item>
|
||||
|
||||
</swiper>
|
||||
|
||||
<!-- 快捷导航 -->
|
||||
@ -213,17 +218,26 @@
|
||||
|
||||
this.loading = true
|
||||
try {
|
||||
const res = await getActivities({
|
||||
const params = {
|
||||
pageNum: this.pageNum,
|
||||
pageSize: this.pageSize,
|
||||
keyword: this.keyword
|
||||
})
|
||||
keyword: this.keyword,
|
||||
orderType: 'latest' // 默认按最新发布排序
|
||||
}
|
||||
|
||||
const res = await getActivities(params)
|
||||
|
||||
if (res.rows && res.rows.length > 0) {
|
||||
// 处理剩余天数
|
||||
const processedRows = res.rows.map(it => {
|
||||
it.remainingDays = this.getRemainingDays(it.endDate)
|
||||
return it
|
||||
})
|
||||
|
||||
if (this.pageNum === 1) {
|
||||
this.featurePageList = res.rows
|
||||
this.featurePageList = processedRows
|
||||
} else {
|
||||
this.featurePageList = [...this.featurePageList, ...res.rows]
|
||||
this.featurePageList = [...this.featurePageList, ...processedRows]
|
||||
}
|
||||
this.total = res.total
|
||||
this.pageNum++
|
||||
@ -233,6 +247,9 @@
|
||||
this.finished = true
|
||||
}
|
||||
} else {
|
||||
if (this.pageNum === 1) {
|
||||
this.featurePageList = []
|
||||
}
|
||||
this.finished = true
|
||||
}
|
||||
} catch (error) {
|
||||
@ -245,6 +262,15 @@
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
|
||||
// 计算剩余天数
|
||||
getRemainingDays(date) {
|
||||
const targetDate = new Date(date)
|
||||
const currentDate = new Date()
|
||||
const timeDiff = targetDate.getTime() - currentDate.getTime()
|
||||
const remainingDays = Math.ceil(timeDiff / (1000 * 3600 * 24))
|
||||
return remainingDays
|
||||
},
|
||||
// 加载更多
|
||||
changePage() {
|
||||
if (!this.loading && !this.finished) {
|
||||
@ -260,11 +286,16 @@
|
||||
// 处理活动点击
|
||||
handleActivityClick(item) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activityList/details?id=${item.id}`
|
||||
url: `/pagesActivity/activityDetail?id=${item.id}`
|
||||
})
|
||||
},
|
||||
// 跳转酒评页
|
||||
toReview(it) {
|
||||
const token = uni.getStorageSync('token')
|
||||
if (!token) {
|
||||
this.$refs.loginRef.show()
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: "/pages/index/review?beerId=" + it.id
|
||||
})
|
||||
@ -275,44 +306,98 @@
|
||||
this.homeBanner = []
|
||||
this.bannerJoin = null
|
||||
getBannerList().then(res => {
|
||||
if (!res.data || !Array.isArray(res.data)) return
|
||||
|
||||
res.data.forEach(it => {
|
||||
if (it.bannerType == 'homeAD') { // 开屏广告
|
||||
if (it.bannerType === 'homeAD') { // 开屏广告
|
||||
this.ADList.push(it)
|
||||
} else if (it.bannerType == 'homeJoin') { // 认证门店
|
||||
} else if (it.bannerType === 'homeJoin') { // 认证门店
|
||||
this.bannerJoin = it
|
||||
} else if (it.bannerType == 'homeBanner') { // 首页banner
|
||||
} else if (it.bannerType === 'homeBanner') { // 首页banner
|
||||
this.homeBanner.push(it)
|
||||
}
|
||||
})
|
||||
|
||||
let showHomeAD = uni.getStorageSync('showHomeAD')
|
||||
if (!showHomeAD) {
|
||||
// 检查是否需要显示开屏广告
|
||||
const lastShowTime = uni.getStorageSync('lastShowHomeADTime')
|
||||
const currentTime = new Date().getTime()
|
||||
// 如果从未显示过或者距离上次显示超过24小时
|
||||
if (!lastShowTime || (currentTime - lastShowTime > 24 * 60 * 60 * 1000)) {
|
||||
if (this.ADList.length > 0) {
|
||||
this.$refs.ADRef.open()
|
||||
}
|
||||
}
|
||||
}).catch(err => {
|
||||
console.error('获取banner列表失败:', err)
|
||||
})
|
||||
},
|
||||
// 关闭广告
|
||||
closeAd() {
|
||||
uni.setStorageSync('showHomeAD', true)
|
||||
// 记录广告显示时间
|
||||
uni.setStorageSync('lastShowHomeADTime', new Date().getTime())
|
||||
uni.setTabBarStyle({
|
||||
backgroundColor: '#ffffff'
|
||||
})
|
||||
this.$refs.ADRef.close()
|
||||
},
|
||||
handleAD(item) {
|
||||
if (!item || !item.bannerLink) return
|
||||
|
||||
this.closeAd()
|
||||
if (item.bannerLink) {
|
||||
// 处理不同类型的链接
|
||||
if (item.bannerLink.startsWith('/')) {
|
||||
// 内部页面跳转
|
||||
uni.navigateTo({
|
||||
url: item.bannerLink,
|
||||
fail: () => {
|
||||
// 如果普通跳转失败,尝试switchTab
|
||||
uni.switchTab({
|
||||
url: item.bannerLink,
|
||||
fail: (err) => {
|
||||
console.error('页面跳转失败:', err)
|
||||
uni.showToast({
|
||||
title: '页面跳转失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else if (item.bannerLink.startsWith('http')) {
|
||||
// 外部链接,可以使用web-view页面打开
|
||||
uni.navigateTo({
|
||||
url: `/pages/webview/webview?url=${encodeURIComponent(item.bannerLink)}`
|
||||
})
|
||||
}
|
||||
},
|
||||
// 立即认证门店
|
||||
toJoin() {
|
||||
if (!this.bannerJoin) return
|
||||
if (!this.bannerJoin || !this.bannerJoin.bannerLink) return
|
||||
|
||||
// 处理不同类型的链接
|
||||
if (this.bannerJoin.bannerLink.startsWith('/')) {
|
||||
// 内部页面跳转
|
||||
uni.navigateTo({
|
||||
url: this.bannerJoin.bannerLink,
|
||||
fail: () => {
|
||||
// 如果普通跳转失败,尝试switchTab
|
||||
uni.switchTab({
|
||||
url: this.bannerJoin.bannerLink,
|
||||
fail: (err) => {
|
||||
console.error('页面跳转失败:', err)
|
||||
uni.showToast({
|
||||
title: '页面跳转失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else if (this.bannerJoin.bannerLink.startsWith('http')) {
|
||||
// 外部链接,使用web-view页面打开
|
||||
uni.navigateTo({
|
||||
url: `/pages/webview/webview?url=${encodeURIComponent(this.bannerJoin.bannerLink)}`
|
||||
})
|
||||
}
|
||||
},
|
||||
// 搜索
|
||||
toSearch() {
|
||||
@ -330,7 +415,7 @@
|
||||
break;
|
||||
case 2: // 生成酒单
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/featureInfo'
|
||||
url: '/pagesActivity/winelist'
|
||||
})
|
||||
break;
|
||||
case 3: // 酒币换购
|
||||
@ -340,7 +425,7 @@
|
||||
break;
|
||||
case 4: // 关注厂牌
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/myJoin'
|
||||
url: '/pagesMy/myAttention'
|
||||
})
|
||||
break;
|
||||
}
|
||||
@ -354,6 +439,26 @@
|
||||
if (!e.show) {
|
||||
this.closeAd()
|
||||
}
|
||||
},
|
||||
// 跳转到生成酒单页面
|
||||
toBeerList() {
|
||||
uni.switchTab({
|
||||
url: '/pages/index/beerList'
|
||||
})
|
||||
},
|
||||
|
||||
// 跳转到酒币兑换页面
|
||||
toBeerCoin() {
|
||||
uni.switchTab({
|
||||
url: '/pages/index/beerCoin'
|
||||
})
|
||||
},
|
||||
|
||||
// 跳转到我的关注页面
|
||||
toMyAttention() {
|
||||
uni.switchTab({
|
||||
url: '/pages/index/myAttention'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -383,6 +488,25 @@
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
/deep/ .uni-swiper-dots {
|
||||
bottom: 20rpx;
|
||||
|
||||
.uni-swiper-dot {
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
border-radius: 6rpx;
|
||||
margin: 0 6rpx;
|
||||
transition: all 0.3s ease;
|
||||
background: rgba(255, 255, 255, 0.4);
|
||||
|
||||
&.uni-swiper-dot-active {
|
||||
width: 28rpx;
|
||||
background-color: #FFFFFF;
|
||||
box-shadow: 0 2rpx 8rpx rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,11 @@
|
||||
</view>
|
||||
<view class="login-text flex align-center">
|
||||
<view class="flex-col status-text">
|
||||
<block v-if="userStatus === 'guest'">
|
||||
<block v-if="!hasNetwork">
|
||||
<text class="text-xl font-bold">网络连接失败</text>
|
||||
<text class="text-xs text-gray">请检查网络设置后重试</text>
|
||||
</block>
|
||||
<block v-else-if="userStatus === 'guest'">
|
||||
<text class="text-xl font-bold">登录/认证</text>
|
||||
</block>
|
||||
<block v-else-if="userStatus === 'unverified'">
|
||||
@ -44,33 +48,9 @@
|
||||
</view>
|
||||
<!-- 数据统计区域 -->
|
||||
<view class="data-section">
|
||||
<view class="coin-section">
|
||||
<!-- 左侧扫码统计 -->
|
||||
<view class="coin-box left-box">
|
||||
<block v-if="userStatus === 'verified'">
|
||||
<view class="title">
|
||||
<image src="/static/tag.svg" class="tag-icon" />
|
||||
<text>本周累计扫码</text>
|
||||
</view>
|
||||
<view class="amount-row">
|
||||
<text class="amount">20</text>
|
||||
<text class="unit">桶</text>
|
||||
</view>
|
||||
<view class="trend-row">
|
||||
<view class="trend-item up">
|
||||
<image src="/static/up.svg" class="trend-icon" />
|
||||
<text class="trend-text">同比增长13.2%</text>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="unauth-tip">
|
||||
<text class="tip-text">欢迎加入啤啤猩球</text>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<!-- 右侧啤酒币轮播 -->
|
||||
<swiper class="coin-box right-box"
|
||||
<view class="coin-section" v-if="isLoggedIn">
|
||||
<!-- 啤酒币轮播 -->
|
||||
<swiper class="coin-box"
|
||||
:current="currentBrandIndex"
|
||||
@change="onSwiperChange"
|
||||
:duration="100"
|
||||
@ -83,16 +63,23 @@
|
||||
<view class="brand-content">
|
||||
<view class="brand-header">
|
||||
<image class="brand-logo" :src="item.brandLogo || '/static/logo.png'" mode="aspectFill"></image>
|
||||
<view class="brand-info">
|
||||
<text class="title">{{item.brandName}}</text>
|
||||
<text class="sub-title">{{item.barCity || '全国'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coin-info">
|
||||
<view class="amount-row">
|
||||
<text class="label">啤酒币余额</text>
|
||||
<view class="amount-wrapper">
|
||||
<text class="amount">{{item.balance}}</text>
|
||||
<text class="cuIcon-rechargefill coin-icon"></text>
|
||||
</view>
|
||||
<view class="desc">{{item.goodsNum}}款热门商品可兑换</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
<!-- 添加空数据状态提示 -->
|
||||
<!-- 空数据状态提示 -->
|
||||
<swiper-item v-if="sortedBrandCoins.length === 0">
|
||||
<view class="brand-content empty-content">
|
||||
<view class="empty-icon">
|
||||
@ -189,6 +176,7 @@
|
||||
sortedBrandCoins: [],
|
||||
scanCount: 0,
|
||||
userInfo: null,
|
||||
hasNetwork: true,
|
||||
// 扫码统计数据
|
||||
weekScanStats: {
|
||||
total: 20,
|
||||
@ -217,6 +205,7 @@
|
||||
},
|
||||
onLoad() {
|
||||
this.statusBaeHeight = uni.getWindowInfo.statusBarHeight
|
||||
this.checkNetwork()
|
||||
},
|
||||
onShow() {
|
||||
console.log('页面显示,检查登录状态');
|
||||
@ -309,8 +298,35 @@
|
||||
console.error('获取扫码数据失败:', error);
|
||||
}
|
||||
},
|
||||
// 检查网络状态
|
||||
checkNetwork() {
|
||||
uni.getNetworkType({
|
||||
success: (res) => {
|
||||
this.hasNetwork = res.networkType !== 'none'
|
||||
if (this.hasNetwork) {
|
||||
this.checkLoginStatus()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// 监听网络状态变化
|
||||
uni.onNetworkStatusChange((res) => {
|
||||
this.hasNetwork = res.isConnected
|
||||
if (this.hasNetwork) {
|
||||
this.checkLoginStatus()
|
||||
}
|
||||
})
|
||||
},
|
||||
// 处理用户信息区域点击
|
||||
handleUserBoxClick() {
|
||||
if (!this.hasNetwork) {
|
||||
uni.showToast({
|
||||
title: '网络连接失败,请检查网络设置',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
switch (this.userStatus) {
|
||||
case 'guest':
|
||||
this.$refs.loginRef.open();
|
||||
@ -450,7 +466,7 @@
|
||||
// 跳转到设置页面
|
||||
toSettings() {
|
||||
uni.navigateTo({
|
||||
url: '/pagesMy/settings'
|
||||
url: '/pagesMy/setting'
|
||||
});
|
||||
},
|
||||
|
||||
@ -924,199 +940,89 @@
|
||||
|
||||
/* 币种区域样式 */
|
||||
.coin-section {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
/* 左侧扫码统计卡片样式 */
|
||||
.left-box {
|
||||
width: 298rpx;
|
||||
height: 180rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 16rpx;
|
||||
padding: 24rpx;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
|
||||
border: 1rpx solid rgba(242, 242, 242, 0.8);
|
||||
|
||||
.title {
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
font-weight: 600;
|
||||
margin-bottom: 8rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
padding: 8rpx 0;
|
||||
margin-top: -24rpx;
|
||||
position: relative;
|
||||
|
||||
.tag-icon {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
margin-top: 32rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
margin-top: -20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.amount-row {
|
||||
margin-bottom: 8rpx;
|
||||
margin-left: 150rpx;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
padding-right: 12rpx;
|
||||
margin-top: -24rpx;
|
||||
|
||||
.amount {
|
||||
font-size: 48rpx;
|
||||
color: #1A1A1A;
|
||||
font-weight: 600;
|
||||
line-height: 48rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
.unit {
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
line-height: 48rpx;
|
||||
padding-bottom: 8rpx;
|
||||
margin-bottom: -8rpx;
|
||||
transform: translateY(8rpx);
|
||||
}
|
||||
}
|
||||
|
||||
.trend-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 20rpx;
|
||||
color: #606060;
|
||||
line-height: 28rpx;
|
||||
margin-bottom: 12rpx;
|
||||
position: relative;
|
||||
/* 啤酒币轮播卡片样式 */
|
||||
.coin-box {
|
||||
width: 100%;
|
||||
|
||||
.trend-item {
|
||||
position: absolute;
|
||||
top: 8rpx;
|
||||
right: 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
|
||||
.trend-icon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
margin-right: 56rpx;
|
||||
}
|
||||
|
||||
.trend-text {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&.up {
|
||||
color: #606060;
|
||||
}
|
||||
|
||||
&.down {
|
||||
color: #52C41A;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.unauth-tip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
|
||||
.tip-text {
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
line-height: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 右侧品牌啤酒币轮播卡片样式 */
|
||||
.right-box {
|
||||
width: 382rpx;
|
||||
height: 180rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 16rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
|
||||
height: 220rpx;
|
||||
background: linear-gradient(135deg, #FFFFFF 0%, #F8F9FC 100%);
|
||||
border-radius: 20rpx;
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
|
||||
border: 1rpx solid rgba(242, 242, 242, 0.8);
|
||||
overflow: hidden;
|
||||
|
||||
/* 品牌内容容器 */
|
||||
.brand-content {
|
||||
height: 100%;
|
||||
padding: 0 24rpx;
|
||||
padding: 24rpx;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
|
||||
/* 品牌标题区域 */
|
||||
.brand-header {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
padding: 8rpx;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.brand-logo {
|
||||
width: 72rpx;
|
||||
height: 72rpx;
|
||||
margin-top: 12rpx;
|
||||
// margin-left: 12rpx;
|
||||
border-radius: 12rpx;
|
||||
margin-right: 12rpx;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 16rpx;
|
||||
margin-right: 16rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.brand-info {
|
||||
flex: 1;
|
||||
|
||||
.title {
|
||||
font-size: 28rpx;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
font-weight: 600;
|
||||
text-align: right;
|
||||
flex: 1;
|
||||
padding-top: 8rpx;
|
||||
margin-bottom: 4rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.sub-title {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 币种数量行样式 */
|
||||
.coin-info {
|
||||
.amount-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
padding-right: 12rpx;
|
||||
margin-bottom: 8rpx;
|
||||
margin-top: -24rpx;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 16rpx;
|
||||
|
||||
.label {
|
||||
font-size: 26rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.amount-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.amount {
|
||||
font-size: 48rpx;
|
||||
color: #1A1A1A;
|
||||
color: #19367A;
|
||||
font-weight: 600;
|
||||
line-height: 48rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.coin-icon {
|
||||
color: #FFD700;
|
||||
font-size: 30rpx;
|
||||
margin-left: 10rpx;
|
||||
line-height: 48rpx;
|
||||
font-size: 32rpx;
|
||||
margin-left: 8rpx;
|
||||
text-shadow: 0 2rpx 4rpx rgba(255, 215, 0, 0.3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 底部描述文字样式 */
|
||||
.desc {
|
||||
font-size: 20rpx;
|
||||
color: #606060;
|
||||
text-align: right;
|
||||
line-height: 28rpx;
|
||||
padding-right: 20rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
/* 空数据状态样式 */
|
||||
@ -1126,26 +1032,78 @@
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
background: linear-gradient(135deg, #F8F9FC 0%, #FFFFFF 100%);
|
||||
|
||||
.empty-icon {
|
||||
font-size: 40rpx;
|
||||
font-size: 48rpx;
|
||||
color: #CCCCCC;
|
||||
margin-bottom: 8rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
font-size: 26rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
font-weight: 500;
|
||||
margin-bottom: 6rpx;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.empty-desc {
|
||||
font-size: 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 未登录状态样式 */
|
||||
.unlogin-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
background: linear-gradient(135deg, #F8F9FC 0%, #FFFFFF 100%);
|
||||
|
||||
.unlogin-icon {
|
||||
font-size: 48rpx;
|
||||
color: #CCCCCC;
|
||||
margin-bottom: 12rpx;
|
||||
|
||||
.cuIcon-lock {
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.unlogin-text {
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
font-weight: 500;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.unlogin-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 12rpx 32rpx;
|
||||
background: #19367A;
|
||||
border-radius: 32rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
box-shadow: 0 4rpx 12rpx rgba(25, 54, 122, 0.2);
|
||||
transition: all 0.3s ease;
|
||||
|
||||
.cuIcon-right {
|
||||
font-size: 24rpx;
|
||||
margin-left: 4rpx;
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: scale(0.98);
|
||||
opacity: 0.9;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -569,6 +569,21 @@
|
||||
}
|
||||
},
|
||||
|
||||
// 跳转到酒评页面
|
||||
toReview(item) {
|
||||
if (!item || !item.id) {
|
||||
uni.showToast({
|
||||
title: '酒款信息不完整',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
uni.navigateTo({
|
||||
url: "/pages/index/review?beerId=" + item.id
|
||||
})
|
||||
},
|
||||
|
||||
// 检查网络状态
|
||||
checkNetwork() {
|
||||
uni.getNetworkType({
|
||||
|
@ -65,12 +65,12 @@
|
||||
<view class="dat"></view>
|
||||
<view style="font-size: 28rpx;color: #3D3D3D;margin-bottom: 8rpx;">需要在平台下单采购吗?</view>
|
||||
</view>
|
||||
<view class="content">任意渠道您采购的桶装产品,都可以参与活动,只要确定酒标有'枝点酒掌柜'的二维码,扫码即可.</view>
|
||||
<view class="content">任意渠道您采购的桶装产品,都可以参与活动,只要确定酒标有'啤啤猩球'的二维码,扫码即可.</view>
|
||||
<view class="flex align-center">
|
||||
<view class="dat"></view>
|
||||
<view style="font-size: 28rpx;color: #3D3D3D;margin-bottom: 8rpx;">我的酒,没有二维码怎么办?</view>
|
||||
</view>
|
||||
<view class="content">1.如果您商品品牌方未入驻"枝点"暂时无法提供服务 </br>2.若品牌方已入驻,需最新批次产品将会体现"枝点"二维码.</view>
|
||||
<view class="content">1.如果您商品品牌方未入驻"啤啤猩球"暂时无法提供服务 </br>2.若品牌方已入驻,需最新批次产品将会体现"啤啤猩球"二维码.</view>
|
||||
</view>
|
||||
<!-- <template v-else>
|
||||
<view class="flex justify-center align-center" style="height: 100vh;">
|
||||
@ -88,7 +88,7 @@
|
||||
<view class="p-body flex flex-col" style="width: 500rpx;height: 660rpx;">
|
||||
<view style="padding: 28rpx;flex:1">
|
||||
<view class="title">什么酒参与</view>
|
||||
<view class="p-text margin-bottom">您可查看桶装啤酒的酒标/吊牌等,只要发现有'枝点酒掌柜'标志的二维码,扫码即可参与. </view>
|
||||
<view class="p-text margin-bottom">您可查看桶装啤酒的酒标/吊牌等,只要发现有'啤啤猩球'标志的二维码,扫码即可参与. </view>
|
||||
<view class="p-text">多家精酿品牌陆续入驻中.敬请期待</view>
|
||||
</view>
|
||||
<view class="p-btn" @click="closeP(1)">我知道了</view>
|
||||
@ -98,7 +98,7 @@
|
||||
<view class="p-body flex flex-col" style="width: 500rpx;height: 660rpx;">
|
||||
<view style="padding: 28rpx;flex:1">
|
||||
<view class="title">目标多少</view>
|
||||
<view class="p-text margin-bottom">可以查看枝点发布的'活动招募',不同品牌方发布的活动目标不同. </view>
|
||||
<view class="p-text margin-bottom">可以查看啤啤猩球发布的'活动招募',不同品牌方发布的活动目标不同. </view>
|
||||
<view class="p-text">扫码后系统会自动判定酒款符合的活动,您选择要参与的具体活动即可开始,无需额外报名. </view>
|
||||
</view>
|
||||
<view class="p-btn" @click="closeP(2)">我知道了</view>
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
<view class="benefits">
|
||||
<view class="benefit-item">
|
||||
<text class="cuIcon-gift text-xl"></text>
|
||||
<image src="/static/medal-star.svg" class="benefit-icon"></image>
|
||||
<view class="info">
|
||||
<view class="title">专属优惠</view>
|
||||
<view class="desc">第一时间获取优惠信息</view>
|
||||
@ -144,6 +144,14 @@
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.benefit-icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-right: 24rpx;
|
||||
color: #19367A;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.cuIcon-gift,
|
||||
.cuIcon-service,
|
||||
.cuIcon-activity {
|
||||
|
@ -19,7 +19,7 @@
|
||||
<view class="tips-content">
|
||||
<view class="tip-item">
|
||||
<text class="cuIcon-info"></text>
|
||||
<text>当前可变更次数:<text class="highlight">2</text>次</text>
|
||||
<text>当前可变更次数:<text class="highlight">{{remainingChanges}}</text>次</text>
|
||||
</view>
|
||||
<view class="tip-item">
|
||||
<text class="cuIcon-warn"></text>
|
||||
@ -52,7 +52,8 @@
|
||||
address: '',
|
||||
latitude: '',
|
||||
longitude: ''
|
||||
}
|
||||
},
|
||||
remainingChanges: 0 // 剩余可变更次数
|
||||
};
|
||||
},
|
||||
onLoad(){
|
||||
@ -66,6 +67,7 @@
|
||||
this.form.address = res.data.address
|
||||
this.form.latitude = res.data.latitude
|
||||
this.form.longitude = res.data.longitude
|
||||
this.remainingChanges = res.data.addressChangeCount || 0 // 从接口获取可变更次数
|
||||
})
|
||||
},
|
||||
// 保存地址
|
||||
|
@ -31,7 +31,12 @@
|
||||
<template v-else>
|
||||
<view v-if="tabCur == 0" class="my-container">
|
||||
<template v-if="favoriteBeerList.length > 0">
|
||||
<scroll-view style="height: 100%;" enable-flex scroll-y @scrolltolower="changeBeerPage">
|
||||
<scroll-view
|
||||
class="beer-scroll-view"
|
||||
scroll-y
|
||||
@scrolltolower="changeBeerPage"
|
||||
:style="{ height: `calc(100vh - ${statusBarHeight}px - 88rpx)` }"
|
||||
>
|
||||
<view class="beer-list">
|
||||
<view class="beer-item" v-for="(item, index) in favoriteBeerList" :key="index" @click="toBeer(item)">
|
||||
<view class="beerCard flex align-center">
|
||||
@ -381,14 +386,26 @@
|
||||
}
|
||||
|
||||
.my-container {
|
||||
padding: 28rpx 36rpx;
|
||||
padding: 0 36rpx;
|
||||
margin-top: 88rpx;
|
||||
height: calc(100vh - 88rpx);
|
||||
position: relative;
|
||||
|
||||
.beer-scroll-view {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.beer-list {
|
||||
padding: 28rpx 0;
|
||||
|
||||
.beer-item {
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.beerCard {
|
||||
border-radius: 12rpx;
|
||||
background: #FFFFFF;
|
||||
@ -480,10 +497,10 @@
|
||||
justify-content: center;
|
||||
padding: 60rpx;
|
||||
|
||||
.empty-image {
|
||||
width: 240rpx;
|
||||
height: 240rpx;
|
||||
margin-bottom: 20rpx;
|
||||
.empty-icon {
|
||||
font-size: 48rpx;
|
||||
color: #CCCCCC;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
|
@ -261,24 +261,11 @@
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 8rpx;
|
||||
height: 100%;
|
||||
background: linear-gradient(to bottom, #19367A, #4A6FCC);
|
||||
border-radius: 4rpx 0 0 4rpx;
|
||||
}
|
||||
|
||||
.review-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
// margin-bottom: 24rpx;
|
||||
padding-bottom: 24rpx;
|
||||
// border-bottom: 1rpx solid rgba(0, 0, 0, 0.05);
|
||||
|
||||
.beer-info {
|
||||
flex: 1;
|
||||
@ -389,7 +376,6 @@
|
||||
align-items: center;
|
||||
margin-top: 16rpx;
|
||||
padding-top: 16rpx;
|
||||
// border-top: 1rpx solid rgba(0, 0, 0, 0.05);
|
||||
|
||||
.image-scroll {
|
||||
flex: 1;
|
||||
|
BIN
static/.DS_Store
vendored
BIN
static/.DS_Store
vendored
Binary file not shown.
@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="20" height="12" viewBox="0 0 20 12"><g><path d="M14,12C14,12,16.29,9.71,16.29,9.71C16.29,9.71,11.41,4.83,11.41,4.83C11.41,4.83,7.41,8.83,7.41,8.83C7.41,8.83,0,1.41,0,1.41C0,1.41,1.41,0,1.41,0C1.41,0,7.41,6,7.41,6C7.41,6,11.41,2,11.41,2C11.41,2,17.71,8.29,17.71,8.29C17.71,8.29,20,6,20,6C20,6,20,12,20,12C20,12,14,12,14,12Z" fill="#F93C65" fill-opacity="1"/></g></svg>
|
Before Width: | Height: | Size: 483 B |
1
static/medal-star.svg
Normal file
1
static/medal-star.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 7.7 KiB |
@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="13.333333969116211" height="9" viewBox="0 0 13.333333969116211 9"><g><path d="M9.33333,0C9.33333,0,10.86,1.7175,10.86,1.7175C10.86,1.7175,7.60667,5.3775,7.60667,5.3775C7.60667,5.3775,4.94,2.3775,4.94,2.3775C4.94,2.3775,0,7.9425,0,7.9425C0,7.9425,0.94,9,0.94,9C0.94,9,4.94,4.5,4.94,4.5C4.94,4.5,7.60667,7.5,7.60667,7.5C7.60667,7.5,11.8067,2.7825,11.8067,2.7825C11.8067,2.7825,13.3333,4.5,13.3333,4.5C13.3333,4.5,13.3333,0,13.3333,0C13.3333,0,9.33333,0,9.33333,0Z" fill="#00B69B" fill-opacity="1"/></g></svg>
|
Before Width: | Height: | Size: 622 B |
@ -9,6 +9,7 @@ const pageConfig = {
|
||||
'/pages/index/chooseLogin', // 登录页面
|
||||
'/pages/index/registration', // 注册页面
|
||||
'/pages/index/userAgreement', // 用户协议
|
||||
'/pages/index/review', // 酒评页面
|
||||
],
|
||||
|
||||
// 需要登录的页面(不需要认证门店)
|
||||
|
Loading…
x
Reference in New Issue
Block a user