Commit 33964fa8 authored by 李明环(东信)'s avatar 李明环(东信)

问题反馈修复

parent 8010e319
......@@ -40,7 +40,7 @@
</view>
</view>
</view>
<wd-status-tip image="content" tip="暂无内容" v-if="shopCardData.simpleProds.length === 0" />
<wd-status-tip image="content" tip="暂无内容" v-if="shopCardData.simpleProds?.length === 0" />
</view>
</template>
......
......@@ -13,7 +13,9 @@
<!-- 图片-->
<view class="nav">
<wd-swiper
:list="dataDetails.prod.imgs"
:list="
dataDetails.prod?.imgs?.length ? dataDetails.prod.imgs : [imgUrl + dataDetails.prod.pic]
"
autoplay
:indicator="{ type: 'fraction' }"
indicatorPosition="bottom-right"
......
......@@ -166,7 +166,6 @@ onMounted(async () => {
getPresale();
presaleSortList();
getshoppingCartListFn();
chooseBTab(0, '3444');
});
// 搜索
const toSearch = () => {
......@@ -206,6 +205,8 @@ const presaleSortList = () => {
});
sortList.value = res.data;
chooseTab(0, sortList.value[0].categoryId);
chooseBTab(0, sortList.value[0].categoryId);
// chooseBTab(0, '3444');
});
};
const chooseTab = (index, categoryId) => {
......
......@@ -8,7 +8,9 @@
<input
type="text"
:value="test"
focus
class="text"
id="input"
@confirm="toSearch"
placeholder="请输入搜索内容"
confirm-type="搜索"
......@@ -55,7 +57,8 @@
</block>
</wd-tabs> -->
<view class="shopitem" v-for="(item, index) in commoditys" :key="index" @tap="toDetail(item)">
<image class="img" :src="item.imgUrl" mode="aspectFill" />
<!-- <image class="img" :src="item.imgUrl" mode="aspectFill" /> -->
<image class="img" :src="baseImgurl + item.pic" mode="aspectFill" />
<view class="middle">
<text class="text">{{ item.prodName }}</text>
<text class="text2">{{ item.price }}</text>
......@@ -68,6 +71,7 @@
<script setup>
import { useRoute } from 'vue-router';
import { searchCommodity, searchBusiness } from '@/api/assistingAgriculture/search';
import { ref } from 'vue';
const tab = ref(0);
const tabs = ref(['商品']);
const value = ref(5);
......@@ -101,6 +105,8 @@ const toSearch = (data) => {
params.prodName = keyword;
searchCommodity(params).then((res) => {
active.value = true;
console.log(res);
res.data.data.forEach((item) => {
if (item.imgs) {
const imgs = item.imgs.split(',');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment