wangfukang 3 weeks ago
parent
commit
6b7f33df46
  1. 45
      package2/group/groupBuyList.vue
  2. 195
      package2/group/groupPendingList.vue
  3. 46
      package2/group/studentStoreList.vue

45
package2/group/groupBuyList.vue

@ -205,6 +205,9 @@
</template>
<script>
import { buildHomeSharePath } from '@/utils/sharePath.js'
const SHARE_TARGET_PATH = '/package2/group/groupBuyList'
const GROUP_META_CACHE_TTL = 5 * 60 * 1000
const GROUP_EAT_TYPE_CACHE_KEY = 'group_buy_eat_type_cache_v1'
const GROUP_SHOP_AREA_CACHE_PREFIX = 'group_buy_shop_area_cache_v1_'
@ -381,9 +384,11 @@
},
onLoad() {
this.enableShareMenu()
this.getShopList();
},
onShow() {
this.enableShareMenu()
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
this.searchForm.regionId = JSON.parse(uni.getStorageSync('area')).id
// uni.showLoading({
@ -391,7 +396,40 @@
// mask: true
// })
},
onShareAppMessage() {
return this.buildShareInfo()
},
onShareTimeline() {
const info = this.buildShareInfo()
return {
title: info.title,
query: info.path.split('?')[1] || '',
imageUrl: info.imageUrl
}
},
methods: {
enableShareMenu() {
if (!uni.showShareMenu) return
uni.showShareMenu({
withShareTicket: true,
menus: ['shareAppMessage', 'shareTimeline']
})
},
buildShareInfo() {
return {
title: '饭团宿舍拼饭局,约同学一起省钱吃',
path: buildHomeSharePath(SHARE_TARGET_PATH),
imageUrl: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/f7227759d693497a8beab87ff437a875.png'
}
},
backHome() {
uni.switchTab({
url: '/pages/index/index',
fail: () => {
uni.reLaunch({ url: '/pages/index/index' })
}
})
},
searchShop(type, value) {
this.searchForm.pageNumber = 1
if (type == 'area') {
@ -738,7 +776,12 @@
})
},
back() {
uni.navigateBack()
const pages = getCurrentPages ? getCurrentPages() : []
if (pages.length > 1) {
uni.navigateBack({ delta: 1 })
return
}
this.backHome()
},
searchStudentShop() {
this.searchForm.pageNumber = 1

195
package2/group/groupPendingList.vue

@ -15,12 +15,23 @@
</view>
</view>
<view class="search-card">
<view class="search-box">
<uni-icons type="search" size="18" :color="searchIconColor"></uni-icons>
<input type="text" v-model="query.keyWord" confirm-type="search" placeholder="搜索商品或商家"
@confirm="searchGroup" />
<view class="search-btn" @tap="searchGroup">搜索</view>
<view class="search-row">
<view class="search-card">
<view class="search-box">
<uni-icons type="search" size="18" :color="searchIconColor"></uni-icons>
<input type="text" v-model="query.keyWord" confirm-type="search" placeholder="搜索商品或商家"
@confirm="searchGroup" />
<view class="search-btn" @tap="searchGroup">搜索</view>
</view>
</view>
<view class="seckill-entry" @tap="goSeckillGroup">
<view class="heat-dot heat-dot-a"></view>
<view class="heat-dot heat-dot-b"></view>
<view class="seckill-entry-light"></view>
<view class="seckill-entry-info">
<view class="seckill-entry-title">秒杀团</view>
</view>
<view class="seckill-entry-btn"></view>
</view>
</view>
</view>
@ -198,6 +209,11 @@
'&isFaceToFace=0' + sceneQuery
})
},
goSeckillGroup() {
uni.navigateTo({
url: '/package3/seckill/seckillGroup'
})
},
getShopIcon(item) {
return (item.shopItem && item.shopItem.shopIcon) || item.productPicture || '/static/images/img/shangpintu.png'
},
@ -378,11 +394,20 @@
box-shadow: 0 10rpx 24rpx rgba(255, 126, 39, 0.2);
}
.search-card {
.search-row {
width: 100%;
margin: 18rpx auto 0;
padding: 16rpx;
border-radius: 34rpx;
display: flex;
align-items: center;
}
.search-card {
flex: 1;
min-width: 0;
margin-right: 14rpx;
height: 60rpx;
padding: 0;
border-radius: 999rpx;
background: rgba(255, 255, 255, 0.76);
box-shadow: 0 18rpx 42rpx rgba(20, 115, 88, 0.12);
box-sizing: border-box;
@ -395,9 +420,9 @@
}
.search-box {
height: 72rpx;
padding: 0 16rpx;
border-radius: 28rpx;
height: 60rpx;
padding: 0 12rpx;
border-radius: 999rpx;
background: #fff;
display: flex;
align-items: center;
@ -406,21 +431,21 @@
.search-box input {
flex: 1;
min-width: 0;
height: 72rpx;
margin-left: 12rpx;
font-size: 24rpx;
height: 60rpx;
margin-left: 10rpx;
font-size: 22rpx;
color: #243d36;
}
.search-btn {
width: 86rpx;
height: 44rpx;
width: 74rpx;
height: 38rpx;
border-radius: 999rpx;
background: linear-gradient(90deg, #dcff9c, #baffec);
color: #08735d;
font-size: 22rpx;
font-size: 20rpx;
font-weight: 900;
line-height: 44rpx;
line-height: 38rpx;
text-align: center;
}
@ -429,6 +454,94 @@
color: #fff;
}
.seckill-entry {
width: 172rpx;
height: 60rpx;
padding: 0 10rpx;
border-radius: 999rpx;
border: 1rpx solid rgba(255, 255, 255, 0.52);
background:
radial-gradient(circle at 18% 4%, rgba(255, 255, 255, 0.55) 0, rgba(255, 255, 255, 0) 76rpx),
linear-gradient(135deg, #ff4b27 0%, #ff8b18 48%, #ffd257 100%);
box-shadow: 0 16rpx 30rpx rgba(255, 91, 39, 0.24), 0 0 40rpx rgba(255, 188, 80, 0.26);
box-sizing: border-box;
display: flex;
align-items: center;
flex-shrink: 0;
position: relative;
overflow: hidden;
}
.seckill-entry:active {
transform: scale(0.96);
}
.seckill-entry-light {
width: 190rpx;
height: 120rpx;
background: linear-gradient(105deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.76) 46%, rgba(255, 255, 255, 0) 100%);
position: absolute;
top: -20rpx;
left: -220rpx;
transform: rotate(12deg);
animation: seckillEntrySweep 4.8s ease-in-out infinite;
}
.seckill-entry-info {
flex: 1;
min-width: 0;
padding-left: 14rpx;
position: relative;
z-index: 1;
color: #fff;
}
.seckill-entry-title {
font-size: 26rpx;
font-weight: 900;
line-height: 60rpx;
letter-spacing: 1rpx;
text-shadow: 0 3rpx 8rpx rgba(183, 35, 0, 0.24);
}
.seckill-entry-btn {
width: 42rpx;
height: 42rpx;
border-radius: 50%;
background: #fff;
color: #ff3d18;
font-size: 24rpx;
font-weight: 900;
line-height: 42rpx;
text-align: center;
position: relative;
z-index: 1;
box-shadow: 0 8rpx 18rpx rgba(158, 32, 0, 0.22);
animation: seckillBtnBeat 2.8s ease-in-out infinite;
}
.heat-dot {
width: 12rpx;
height: 12rpx;
position: absolute;
border-radius: 50%;
background: rgba(255, 255, 255, 0.92);
box-shadow: 0 0 16rpx rgba(255, 255, 255, 0.88);
z-index: 1;
animation: heatParticle 3.2s ease-in-out infinite;
}
.heat-dot-a {
left: 28rpx;
top: 18rpx;
}
.heat-dot-b {
right: 64rpx;
bottom: 16rpx;
animation-delay: 0.5s;
}
.list-wrap {
width: 94%;
margin: 0 auto;
@ -715,4 +828,48 @@
color: #fff;
box-shadow: 0 12rpx 24rpx rgba(255, 126, 39, 0.24);
}
@keyframes seckillEntrySweep {
0% {
left: -220rpx;
opacity: 0;
}
38% {
opacity: 0;
}
58% {
opacity: 1;
}
100% {
left: 220rpx;
opacity: 0;
}
}
@keyframes seckillBtnBeat {
0%,
100% {
transform: scale(1);
}
50% {
transform: scale(1.1);
}
}
@keyframes heatParticle {
0%,
100% {
opacity: 0.5;
transform: translateY(0) scale(1);
}
50% {
opacity: 1;
transform: translateY(-6rpx) scale(1.2);
}
}
</style>

46
package2/group/studentStoreList.vue

@ -140,6 +140,10 @@
</template>
<script>
import { buildHomeSharePath } from '@/utils/sharePath.js'
const SHARE_TARGET_PATH = '/package2/group/studentStoreList'
export default {
data() {
return {
@ -271,9 +275,11 @@
}
},
onLoad() {
this.enableShareMenu()
this.initRegion()
},
onShow() {
this.enableShareMenu()
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
},
onReachBottom() {
@ -281,7 +287,40 @@
this.searchForm.pageNumber += 1
this.getShopList()
},
onShareAppMessage() {
return this.buildShareInfo()
},
onShareTimeline() {
const info = this.buildShareInfo()
return {
title: info.title,
query: info.path.split('?')[1] || '',
imageUrl: info.imageUrl
}
},
methods: {
enableShareMenu() {
if (!uni.showShareMenu) return
uni.showShareMenu({
withShareTicket: true,
menus: ['shareAppMessage', 'shareTimeline']
})
},
buildShareInfo() {
return {
title: '团购杂货铺,同校好店一起拼',
path: buildHomeSharePath(SHARE_TARGET_PATH),
imageUrl: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/f7227759d693497a8beab87ff437a875.png'
}
},
backHome() {
uni.switchTab({
url: '/pages/index/index',
fail: () => {
uni.reLaunch({ url: '/pages/index/index' })
}
})
},
initRegion() {
const area = uni.getStorageSync('area')
if (!area) {
@ -530,7 +569,12 @@
return ''
},
back() {
uni.navigateBack()
const pages = getCurrentPages ? getCurrentPages() : []
if (pages.length > 1) {
uni.navigateBack({ delta: 1 })
return
}
this.backHome()
}
}
}

Loading…
Cancel
Save