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

问题反馈修复

parent 8010e319
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</view> </view>
</view> </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> </view>
</template> </template>
......
...@@ -13,7 +13,9 @@ ...@@ -13,7 +13,9 @@
<!-- 图片--> <!-- 图片-->
<view class="nav"> <view class="nav">
<wd-swiper <wd-swiper
:list="dataDetails.prod.imgs" :list="
dataDetails.prod?.imgs?.length ? dataDetails.prod.imgs : [imgUrl + dataDetails.prod.pic]
"
autoplay autoplay
:indicator="{ type: 'fraction' }" :indicator="{ type: 'fraction' }"
indicatorPosition="bottom-right" indicatorPosition="bottom-right"
......
...@@ -166,7 +166,6 @@ onMounted(async () => { ...@@ -166,7 +166,6 @@ onMounted(async () => {
getPresale(); getPresale();
presaleSortList(); presaleSortList();
getshoppingCartListFn(); getshoppingCartListFn();
chooseBTab(0, '3444');
}); });
// 搜索 // 搜索
const toSearch = () => { const toSearch = () => {
...@@ -206,6 +205,8 @@ const presaleSortList = () => { ...@@ -206,6 +205,8 @@ const presaleSortList = () => {
}); });
sortList.value = res.data; sortList.value = res.data;
chooseTab(0, sortList.value[0].categoryId); chooseTab(0, sortList.value[0].categoryId);
chooseBTab(0, sortList.value[0].categoryId);
// chooseBTab(0, '3444');
}); });
}; };
const chooseTab = (index, categoryId) => { const chooseTab = (index, categoryId) => {
......
...@@ -8,7 +8,9 @@ ...@@ -8,7 +8,9 @@
<input <input
type="text" type="text"
:value="test" :value="test"
focus
class="text" class="text"
id="input"
@confirm="toSearch" @confirm="toSearch"
placeholder="请输入搜索内容" placeholder="请输入搜索内容"
confirm-type="搜索" confirm-type="搜索"
...@@ -55,7 +57,8 @@ ...@@ -55,7 +57,8 @@
</block> </block>
</wd-tabs> --> </wd-tabs> -->
<view class="shopitem" v-for="(item, index) in commoditys" :key="index" @tap="toDetail(item)"> <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"> <view class="middle">
<text class="text">{{ item.prodName }}</text> <text class="text">{{ item.prodName }}</text>
<text class="text2">{{ item.price }}</text> <text class="text2">{{ item.price }}</text>
...@@ -68,6 +71,7 @@ ...@@ -68,6 +71,7 @@
<script setup> <script setup>
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { searchCommodity, searchBusiness } from '@/api/assistingAgriculture/search'; import { searchCommodity, searchBusiness } from '@/api/assistingAgriculture/search';
import { ref } from 'vue';
const tab = ref(0); const tab = ref(0);
const tabs = ref(['商品']); const tabs = ref(['商品']);
const value = ref(5); const value = ref(5);
...@@ -101,6 +105,8 @@ const toSearch = (data) => { ...@@ -101,6 +105,8 @@ const toSearch = (data) => {
params.prodName = keyword; params.prodName = keyword;
searchCommodity(params).then((res) => { searchCommodity(params).then((res) => {
active.value = true; active.value = true;
console.log(res);
res.data.data.forEach((item) => { res.data.data.forEach((item) => {
if (item.imgs) { if (item.imgs) {
const imgs = item.imgs.split(','); 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