From 87a56274d598af9842b593ec972f517161f60707 Mon Sep 17 00:00:00 2001
From: 陶杰 <1378534974@qq.com>
Date: 星期日, 19 一月 2025 18:44:27 +0800
Subject: [PATCH] 1.v6-屏蔽微信登录
---
pages/home/components/home-top-flow.vue | 110 ++++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 85 insertions(+), 25 deletions(-)
diff --git a/pages/home/components/home-top-flow.vue b/pages/home/components/home-top-flow.vue
index 1b5e2ba..f08eece 100644
--- a/pages/home/components/home-top-flow.vue
+++ b/pages/home/components/home-top-flow.vue
@@ -1,39 +1,53 @@
<template>
<view class="home-top-flow">
- <view class="item flex" v-for="(item,index) of list" :key="index">
+ <view class="item flex" v-for="(item,index) of list" :key="index" @click="toDetail(item)">
<view class="img">
- <image class="img img100"
- src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/ff/fff3027bd0a146478fd1f0aae816a028%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20240710224139.png">
+ <image class="img img100" :class="[!item.stock?'':'']" :src="item.cover" :lazy-load="true">
</image>
<view class="level">
- A级
+ {{ item.levelStr}}
</view>
</view>
<view class="m-l-12 info-container flex1">
<view class="title">
- 橙色芭比
- <view class="price">
- ¥6.60/扎
+ <view style="max-width: 200rpx;word-break: break-all;">
+ {{ item.name || '-' }}
</view>
+ <!-- <span v-if="item.categoryStr" class="m-l-10">{{item.categoryStr || '-'}}</span> -->
+
+ <view class="price component-price-new">
+ <span class="tip">会员价</span>¥<span class="p">{{item.priceMember||item.price}}</span>/扎
+ <view class="component-price-old">
+ ¥{{item.price}}/扎
+ </view>
+ </view>
+
</view>
- <view class="tags">
- <view class="tag red">限时抢购</view>
- <view class="tag green">品质严选</view>
+ <view class="tags" v-if="item.tags">
+ <view class="tag red" v-for="(tag,k) of item.tagArr" :class="[k===0?'red':'green']" :key="tag">{{
+ tag
+ }}
+ </view>
+ <!-- <view class="tag red">限时抢购</view>-->
+ <!-- <view class="tag green">品质严选</view>-->
</view>
<view class="shop-name">
- 小石头花卉
+ {{ item.supplierName || '佚名' }}
</view>
<view class="other-info flex">
<view class="m-r-15">
- 已售:7
+ 已售:{{ ((item.sales||0) +(item.realSales||0)) || 0 }}
</view>
<view class="m-r-15">
- 剩余:13
+ 剩余:{{ item.stock || 0 }}
</view>
<view class="m-r-15">
- 1支/扎
+ {{ item.unit || 0 }}
</view>
+ </view>
+ <view class="button-buy m-l-a m-r-0" v-if="item.status=='UP'">
+ 立即抢购
</view>
</view>
</view>
@@ -44,9 +58,44 @@
export default {
data() {
return {
- list: [{}, {}, {}, {}]
+ // list: [{}, {}, {}, {}]
+ query: {
+ status: 'UP',
+ recommend: true
+ }
};
- }
+ },
+ mounted() {
+ this.listApi = '/api/customer/flower/list'
+ this.page.size = 20
+ this.page.current = 1
+ this.getList('post')
+ },
+
+ methods: {
+ init() {
+ this.refreshList('post')
+ },
+ fun_GetMore() {
+ this.getMore('post')
+ },
+ getList_after() {
+ if (this.list) {
+ for (var item of this.list) {
+ item.tagArr = []
+ if (item.tags) {
+ item.tagArr = item.tags.split(",") || []
+ }
+ }
+ }
+ },
+ toDetail(item) {
+ uni.navigateTo({
+ url: '/sub_pages/customer/trade/detail?id=' + item.id
+ })
+ }
+ },
+
}
</script>
@@ -59,7 +108,17 @@
padding: 10rpx;
.info-container {
-
+ .button-buy {
+ width: 128rpx;
+ height: 48rpx;
+ border-radius: 30rpx;
+ border: 2rpx solid #CF0000;
+ font-size: 24rpx;
+ color: #CF0000;
+ line-height: 48rpx;
+ text-align: center;
+ }
+
.other-info {
margin-top: 6rpx;
font-size: 24rpx;
@@ -80,21 +139,22 @@
display: flex;
.tag {
- min-width: 80rpx;
- padding-left: 20rpx;
- padding-right: 20rpx;
- line-height: 36rpx;
+ // min-width: 60rpx;
+ padding-left: 10rpx;
+ padding-right: 10rpx;
+ line-height: 30rpx;
background: #FEE6E6;
- border-radius: 21rpx;
- font-size: 24rpx;
+ border-radius: 10rpx;
+ font-size: 18rpx;
color: #CD1212;
- margin-right: 12rpx;
+ margin-right: 6rpx;
+ text-align: center;
}
.tag.green {
color: rgba(110, 159, 102, 1);
background: rgba(202, 229, 214, 1);
- border-radius: 21rpx;
+ border-radius: 10rpx;
// opacity: 0.57;
}
}
--
Gitblit v1.9.3