Forráskód Böngészése

fix: 农资详情

lxf 1 hete
szülő
commit
d8347fe3c2

+ 4 - 4
src/views/old_mini/agri_services/components/servicesHall.vue

@@ -44,7 +44,7 @@
                     <div class="task-item" v-for="item in agriculturalStoreList" :key="item.id" @click="handleDetail(item)">
                         <div class="task-content">
                             <div class="content-t">
-                                <img class="content-img" :src="item.bgUrl" alt="" />
+                                <img class="content-img" :src="item.bgUrl || require('@/assets/img/home/nz.png')" alt="" />
                                 <div class="content-info">
                                     <div class="content-name">{{ item.storeName }} <span>{{ item.score||0 }}分</span></div>
                                     <div class="content-text">
@@ -147,9 +147,9 @@ onMounted(() => {
 });
 
 onActivated(() => {
-    if(props.active == 1){
-        getStoreList();
-    }
+    // if(props.active == 1){
+    //     getStoreList();
+    // }
 });
 
 const handleDetail = (item) => {

+ 6 - 4
src/views/old_mini/expert_detail/index.vue

@@ -59,6 +59,7 @@
                                 {{ item }}
                                 <span v-if="index !== storeDetail?.serviceTypeJson.length - 1">、</span>
                             </span>
+                            <span v-if="!storeDetail?.serviceTypeJson || storeDetail?.serviceTypeJson.length === 0">--</span>
                         </div>
                         <div class="one-info">
                             <span class="one-name">服务作物:</span>
@@ -66,6 +67,7 @@
                                 {{ item }}
                                 <span v-if="index !== storeDetail?.serviceCropsJson.length - 1">、</span>
                             </span>
+                            <span v-if="!storeDetail?.serviceCropsJson || storeDetail?.serviceCropsJson.length === 0">--</span>
                         </div>
                         <div class="one-info">
                             <span class="one-name">服务区域:</span>{{ storeDetail?.address || "--" }}
@@ -76,6 +78,7 @@
                                 {{ item }}
                                 <span v-if="index !== storeDetail?.agriculturalEquipmentJson.length - 1">、</span>
                             </span>
+                            <span v-if="!storeDetail?.agriculturalEquipmentJson || storeDetail?.agriculturalEquipmentJson.length === 0">--</span>
                         </div>
                     </div>
                     <div class="list-one" v-else>
@@ -150,6 +153,7 @@ const router = useRouter();
 let query = ref(useRoute().query);
 
 onActivated(() => {
+    query.value = useRoute().query;
     if (query.value.id && query.value.isStore) {
         getStoreDetail();
         getFarmList();
@@ -158,8 +162,7 @@ onActivated(() => {
 
 const getStoreDetail = () => {
     const params = {
-        // id: query.id,
-        id: 90,
+        id: query.value.id,
     };
     VE_API.z_agricultural_store.getStoreDetail(params).then((res) => {
         storeDetail.value = res.data || {};
@@ -170,8 +173,7 @@ const getStoreDetail = () => {
 const farmList = ref([]);
 const getFarmList = () => {
     const params = {
-        // agriculturalStoreId: query.value.id,
-        agriculturalStoreId: 90,
+        id: query.value.id,
     };
     VE_API.z_agricultural_store.getStoreList(params).then((res) => {
         farmList.value = res.data || [];

+ 2 - 9
src/views/old_mini/offer_price/component/fertilizerPrice.vue

@@ -96,20 +96,13 @@ import { ElMessageBox } from 'element-plus'
 const router = useRouter();
 const searchVal = ref("");
 
-const filterType = ref(["全部", "农药", "调节", "肥料"]);
+const filterType = ref(["全部"]);
 
 const activePlanIndex = ref(0);
 // 记录已展开卡片索引的集合
 const expandedSet = ref(new Set());
 
-const priceList = ref([
-    { name: "46%尿素", brand: "东巨", typeName: "农药类/杀虫剂/胃毒性", useMode: "根部施", unit: "克", unitUsage: "5-7.5公斤", unitWaterAmount: "水稻", price: "0.02", cost: '0.007', stock: "43015" },
-    { name: "硫酸铵", brand: "东巨", typeName: "农药类/杀虫剂/胃毒性", useMode: "根部施", unit: "克", unitUsage: "5-7.5公斤", unitWaterAmount: "水稻", price: "0.01", cost: '0.005', stock: "33426" },
-    { name: "磷酸钙", brand: "兴发", typeName: "农药类/杀虫剂/胃毒性", useMode: "根部施", unit: "千克", unitUsage: "10-15公斤", unitWaterAmount: "水稻", price: "1.6", cost: '1.2', stock: "6745" },
-    { name: "0.2%磷酸二氢钾溶液", brand: "亚泰", typeName: "农药类/杀虫剂/胃毒性", useMode: "叶面施", unit: "克", unitUsage: "50-100克", unitWaterAmount: "水稻", price: "0.04", cost: '0.01', stock: "17236" },
-    { name: "0.15%-0.25%矮壮素", brand: "瑞普生", price: "0.03", cost: '0.01', stock: "2542", unit: "毫升", unitUsage: "按使用说明", typeName: "农药类/杀虫剂/胃毒性", useMode: "叶面施", unitWaterAmount: "水稻" },
-    { name: "20%氯虫苯甲酰胺悬浮剂", brand: "立占", price: "0.08", cost: '0.02', stock: "3125", unit: "克", unitUsage: "10-15毫升", typeName: "农药类/杀虫剂/胃毒性", useMode: "叶面施", unitWaterAmount: "水稻" },
-]);
+const priceList = ref([]);
 
 onMounted(() => {
     fetchPesticideCount()