This commit is contained in:
zmj 2024-06-22 20:26:36 +08:00
parent 0a8c7b0504
commit a75f9284f8
2 changed files with 828 additions and 812 deletions

View File

@ -103,7 +103,8 @@
<view class="classify">
<scroll-view style="height: 90rpx;" scroll-x @scrolltolower="getgoodClassList(leftActive)">
<view class="classify-list">
<view class="classify-list-item u-line-1" :class="{ 'item-active': rightActive === item.id }"
<view class="classify-list-item u-line-1"
:class="{ 'item-active': rightActive === item.id }"
v-for="(item, index) in goodClassThree" :key="index" @click="changeThree(item, index)">
{{ item.name }}
</view>
@ -114,7 +115,8 @@
<up-icon name="arrow-down"></up-icon>
</view>
<view class="order-by">
<view class="item" :class="{ 'order-active': where.order == '' }" @click="changeOrder('')">综合</view>
<view class="item" :class="{ 'order-active': where.order == '' }" @click="changeOrder('')">综合
</view>
<view class="item" :class="{ 'order-active': where.order == 'desc' || where.order == 'asc' }"
@click="changeOrder(where.order == 'asc' ? 'desc' : 'asc')">价格</view>
<view class="item" :class="{ 'order-active': where.order == 'sales' }"
@ -128,16 +130,18 @@
<view class="classify-list">
<view class="classify-list-item u-line-1"
:class="{ 'item-active': rightActive === item.id }"
v-for="(item, index) in goodClassThree" :key="index" @click="changeThree(item, index)">
v-for="(item, index) in goodClassThree" :key="index"
@click="changeThree(item, index)">
{{ item.name }}
</view>
</view>
</scroll-view>
</view>
</viewPopup>
<scroll-view class="list" id='drag_area' style="overscroll-behavior: none;" @scroll="hideHeadView" scroll-y
@scrolltolower="loadMoreGood">
<view class="shop-item" v-for="(item, index) in goodList" :key="item.id" @click="openGoodPopup(item)">
<scroll-view class="list" id='drag_area' style="overscroll-behavior: none;" @scroll="hideHeadView"
scroll-y @scrolltolower="loadMoreGood">
<view class="shop-item" v-for="(item, index) in goodList" :key="item.id"
@click="openGoodPopup(item)">
<view class="shop-img"
:style="{ backgroundImage: `url(${item.image}?x-oss-process=image/format,webp)` }">
</view>
@ -158,7 +162,13 @@
<text class='price' style="font-size: 24rpx;">/{{ item.unit_name }}</text>
</view>
<view class="price-btn">
<view class="price" style="font-size: 24rpx;">{{ item.price }}/{{ item.unit_name }}</view>
<view class="price" style="font-size: 24rpx;"
v-if='userStore?.userInfo?.user_ship == 1'>
{{ item.price }}/{{ item.unit_name }}
</view>
<view class="price" v-else>
{{ item.price }}/{{ item.unit_name }}
</view>
<view class="btn">
<u--icon name="plus-circle-fill" size="20" color="#20b128"></u--icon>
</view>
@ -173,7 +183,12 @@
<view class="price-info">
<view class="row">
<view>合计</view>
<view class="price">¥<text style="font-size: 36rpx;">{{ cartInfo.total_price }}</text></view>
<view class="price" v-if='cartInfo.pay_price<=0||userStore?.userInfo?.user_ship !=4'>¥<text
style="font-size: 36rpx;">{{ cartInfo.total_price }}</text></view>
<view class="price" v-else>¥<text style="font-size: 30rpx;">{{ cartInfo.total_price }}</text></view>
<view class="price" v-if="cartInfo.pay_price>0 &&userStore?.userInfo?.user_ship == 4"><text
style="font-size: 36rpx;">优惠后
{{ cartInfo.pay_price }}</text></view>
</view>
<!-- <view class="row">
<view style="color: #777;">原价 ¥50.00</view>
@ -232,7 +247,7 @@ import {
import useUserStore from "@/store/user";
const userStore = useUserStore();
const STORE_INFO = reactive({
id: 4,
id: 23,
store_name: "农(特)产品直营店"
})
@ -546,6 +561,7 @@ const settleAccounts = () => {
//
const cartInfo = ref({
total_price: '0.00',
pay_price: 0,
count: 0
})
const getCartList = (res) => {
@ -555,6 +571,7 @@ const getCartList = (res) => {
}).then(res => {
cartInfo.value = {
total_price: res.data?.extend?.total_price || '0.00',
pay_price: res.data?.extend?.pay_price || '0.00',
count: res.data?.count || 0
}
cartStore.setCartList(res.data?.lists.map(item => item.id))

View File

@ -9,8 +9,7 @@
@click="callPhone(shopInfo.phone)">
<view class="top" style="align-items: flex-start;">
<view style="color: #333;display: flex;align-items: center;flex-shrink: 0;">
<up-icon name="map"></up-icon>
<text style="margin: 0 10rpx;">自提点</text>
<text style="margin: 0 10rpx;color:#20B128">推荐自提点</text>
</view>
<view v-if="shopInfo.id">
<view style="color: #333;">