add
This commit is contained in:
parent
0a8c7b0504
commit
a75f9284f8
|
@ -103,7 +103,8 @@
|
||||||
<view class="classify">
|
<view class="classify">
|
||||||
<scroll-view style="height: 90rpx;" scroll-x @scrolltolower="getgoodClassList(leftActive)">
|
<scroll-view style="height: 90rpx;" scroll-x @scrolltolower="getgoodClassList(leftActive)">
|
||||||
<view class="classify-list">
|
<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)">
|
v-for="(item, index) in goodClassThree" :key="index" @click="changeThree(item, index)">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</view>
|
</view>
|
||||||
|
@ -114,7 +115,8 @@
|
||||||
<up-icon name="arrow-down"></up-icon>
|
<up-icon name="arrow-down"></up-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-by">
|
<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' }"
|
<view class="item" :class="{ 'order-active': where.order == 'desc' || where.order == 'asc' }"
|
||||||
@click="changeOrder(where.order == 'asc' ? 'desc' : 'asc')">价格</view>
|
@click="changeOrder(where.order == 'asc' ? 'desc' : 'asc')">价格</view>
|
||||||
<view class="item" :class="{ 'order-active': where.order == 'sales' }"
|
<view class="item" :class="{ 'order-active': where.order == 'sales' }"
|
||||||
|
@ -128,16 +130,18 @@
|
||||||
<view class="classify-list">
|
<view class="classify-list">
|
||||||
<view class="classify-list-item u-line-1"
|
<view class="classify-list-item u-line-1"
|
||||||
:class="{ 'item-active': rightActive === item.id }"
|
: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 }}
|
{{ item.name }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</viewPopup>
|
</viewPopup>
|
||||||
<scroll-view class="list" id='drag_area' style="overscroll-behavior: none;" @scroll="hideHeadView" scroll-y
|
<scroll-view class="list" id='drag_area' style="overscroll-behavior: none;" @scroll="hideHeadView"
|
||||||
@scrolltolower="loadMoreGood">
|
scroll-y @scrolltolower="loadMoreGood">
|
||||||
<view class="shop-item" v-for="(item, index) in goodList" :key="item.id" @click="openGoodPopup(item)">
|
<view class="shop-item" v-for="(item, index) in goodList" :key="item.id"
|
||||||
|
@click="openGoodPopup(item)">
|
||||||
<view class="shop-img"
|
<view class="shop-img"
|
||||||
:style="{ backgroundImage: `url(${item.image}?x-oss-process=image/format,webp)` }">
|
:style="{ backgroundImage: `url(${item.image}?x-oss-process=image/format,webp)` }">
|
||||||
</view>
|
</view>
|
||||||
|
@ -158,7 +162,13 @@
|
||||||
<text class='price' style="font-size: 24rpx;">/{{ item.unit_name }}</text>
|
<text class='price' style="font-size: 24rpx;">/{{ item.unit_name }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="price-btn">
|
<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">
|
<view class="btn">
|
||||||
<u--icon name="plus-circle-fill" size="20" color="#20b128"></u--icon>
|
<u--icon name="plus-circle-fill" size="20" color="#20b128"></u--icon>
|
||||||
</view>
|
</view>
|
||||||
|
@ -173,7 +183,12 @@
|
||||||
<view class="price-info">
|
<view class="price-info">
|
||||||
<view class="row">
|
<view class="row">
|
||||||
<view>合计</view>
|
<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>
|
||||||
<!-- <view class="row">
|
<!-- <view class="row">
|
||||||
<view style="color: #777;">原价 ¥50.00</view>
|
<view style="color: #777;">原价 ¥50.00</view>
|
||||||
|
@ -232,7 +247,7 @@ import {
|
||||||
import useUserStore from "@/store/user";
|
import useUserStore from "@/store/user";
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const STORE_INFO = reactive({
|
const STORE_INFO = reactive({
|
||||||
id: 4,
|
id: 23,
|
||||||
store_name: "农(特)产品直营店"
|
store_name: "农(特)产品直营店"
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -546,6 +561,7 @@ const settleAccounts = () => {
|
||||||
// 购物车相关
|
// 购物车相关
|
||||||
const cartInfo = ref({
|
const cartInfo = ref({
|
||||||
total_price: '0.00',
|
total_price: '0.00',
|
||||||
|
pay_price: 0,
|
||||||
count: 0
|
count: 0
|
||||||
})
|
})
|
||||||
const getCartList = (res) => {
|
const getCartList = (res) => {
|
||||||
|
@ -555,6 +571,7 @@ const getCartList = (res) => {
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
cartInfo.value = {
|
cartInfo.value = {
|
||||||
total_price: res.data?.extend?.total_price || '0.00',
|
total_price: res.data?.extend?.total_price || '0.00',
|
||||||
|
pay_price: res.data?.extend?.pay_price || '0.00',
|
||||||
count: res.data?.count || 0
|
count: res.data?.count || 0
|
||||||
}
|
}
|
||||||
cartStore.setCartList(res.data?.lists.map(item => item.id))
|
cartStore.setCartList(res.data?.lists.map(item => item.id))
|
||||||
|
|
|
@ -9,8 +9,7 @@
|
||||||
@click="callPhone(shopInfo.phone)">
|
@click="callPhone(shopInfo.phone)">
|
||||||
<view class="top" style="align-items: flex-start;">
|
<view class="top" style="align-items: flex-start;">
|
||||||
<view style="color: #333;display: flex;align-items: center;flex-shrink: 0;">
|
<view style="color: #333;display: flex;align-items: center;flex-shrink: 0;">
|
||||||
<up-icon name="map"></up-icon>
|
<text style="margin: 0 10rpx;color:#20B128">推荐自提点</text>
|
||||||
<text style="margin: 0 10rpx;">自提点</text>
|
|
||||||
</view>
|
</view>
|
||||||
<view v-if="shopInfo.id">
|
<view v-if="shopInfo.id">
|
||||||
<view style="color: #333;">
|
<view style="color: #333;">
|
||||||
|
|
Loading…
Reference in New Issue