|
@@ -19,12 +19,12 @@
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 农场信息卡片 -->
|
|
<!-- 农场信息卡片 -->
|
|
|
- <div class="farm-card">
|
|
|
|
|
|
|
+ <div class="farm-card" v-for="farm in farmList" :key="farm.id">
|
|
|
<div class="farm-header">
|
|
<div class="farm-header">
|
|
|
<div class="farm-header-left">
|
|
<div class="farm-header-left">
|
|
|
<div class="farm-title">
|
|
<div class="farm-title">
|
|
|
- <span>{{ farmInfo.name }}</span>
|
|
|
|
|
- <div class="title-tags" @click="handleTitleTagClick(farmInfo.id)">
|
|
|
|
|
|
|
+ <span>{{ farm.name }}</span>
|
|
|
|
|
+ <div class="title-tags" @click="handleTitleTagClick(farm.id)">
|
|
|
<div class="title-tag tag-danger">
|
|
<div class="title-tag tag-danger">
|
|
|
<span>干旱预警</span>
|
|
<span>干旱预警</span>
|
|
|
<el-icon>
|
|
<el-icon>
|
|
@@ -33,7 +33,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="farm-subtitle">{{ farmInfo.address }}</div>
|
|
|
|
|
|
|
+ <div class="farm-subtitle">xxxxx</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="farm-more" @click="handleMoreClick">详情</div>
|
|
<div class="farm-more" @click="handleMoreClick">详情</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -94,12 +94,23 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
-import { ref } from "vue";
|
|
|
|
|
|
|
+import { ref, onMounted } from "vue";
|
|
|
import { Badge, ActionSheet } from 'vant';
|
|
import { Badge, ActionSheet } from 'vant';
|
|
|
import { useRouter } from "vue-router";
|
|
import { useRouter } from "vue-router";
|
|
|
import wx from "weixin-js-sdk";
|
|
import wx from "weixin-js-sdk";
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
|
|
|
|
|
|
|
+onMounted(() => {
|
|
|
|
|
+ fetchListByUserId();
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+const farmList = ref([]);
|
|
|
|
|
+const fetchListByUserId = async () => {
|
|
|
|
|
+ const { data } = await VE_API.home.listByUserId();
|
|
|
|
|
+ farmList.value = data || [];
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
const showAddClient = ref(false);
|
|
const showAddClient = ref(false);
|
|
|
const handleAddClientSelf = () => {
|
|
const handleAddClientSelf = () => {
|
|
|
showAddClient.value = false;
|
|
showAddClient.value = false;
|
|
@@ -125,7 +136,7 @@ const handleAddClient = () => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
-const isShowPl = ref(false);
|
|
|
|
|
|
|
+const isShowPl = ref(true);
|
|
|
const value = ref('')
|
|
const value = ref('')
|
|
|
const options = [
|
|
const options = [
|
|
|
{
|
|
{
|
|
@@ -150,12 +161,6 @@ const options = [
|
|
|
},
|
|
},
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
-const farmInfo = ref({
|
|
|
|
|
- id: 98113,
|
|
|
|
|
- name: "从化荔博园合作社",
|
|
|
|
|
- address: "广东省广州市从化区某某街道",
|
|
|
|
|
-});
|
|
|
|
|
-
|
|
|
|
|
const rows = ref([
|
|
const rows = ref([
|
|
|
{
|
|
{
|
|
|
label: "农情",
|
|
label: "农情",
|
|
@@ -442,6 +447,10 @@ const handleInviteClick = (subjectId) => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ .farm-card + .farm-card{
|
|
|
|
|
+ margin-top: 12px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
.custom-bottom-fixed-btns {
|
|
.custom-bottom-fixed-btns {
|
|
|
&.center-btn {
|
|
&.center-btn {
|
|
|
justify-content: center;
|
|
justify-content: center;
|