add
This commit is contained in:
parent
d0675eb007
commit
9a4e2b08e1
|
@ -55,7 +55,6 @@ const handChose = (index) => {
|
|||
actIndex.value = index;
|
||||
getTownListsFn(options[index].value);
|
||||
sendFn('choserArea', { name: options[index].label, code: options[index].value })
|
||||
|
||||
emit('handArea', {name:options[actIndex.value].label,code:options[actIndex.value].value},)
|
||||
}
|
||||
|
||||
|
@ -73,7 +72,7 @@ const handTown = (index) => {
|
|||
})
|
||||
}
|
||||
|
||||
const getTownListsFn = async (area_code = 510502) => {
|
||||
const getTownListsFn = async (area_code = 510521) => {
|
||||
let res = await apigetTownLists({ area_code })
|
||||
townLists.value = res.data;
|
||||
}
|
||||
|
@ -89,7 +88,6 @@ const props = defineProps({
|
|||
// 发送消息
|
||||
const page = ref(1)
|
||||
const sendFn = (event, data = '') => {
|
||||
if (data.page) page.value = data.page;
|
||||
sendMsg({ channel: props.channel, event, data })
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,28 @@
|
|||
<template>
|
||||
<div class="content" v-if="flag">
|
||||
<!-- <div class="content" v-if="flag">
|
||||
<div class="plant-li" v-for="item in landList" :key="item.id" @click="handClick(item)">
|
||||
{{ item.title }}
|
||||
</div>
|
||||
</div> -->
|
||||
<img src="/static/img/tradeScreen/FH.png" @click="router.go(-1)" class="back-btn" alt="">
|
||||
<div class="cont" v-if="flag">
|
||||
<div class="card" v-for="(item, index) in landList" :key="index" @click="handClick(item)">
|
||||
<div class="card-tit">
|
||||
{{ item.town_name }}
|
||||
</div>
|
||||
<div class="card-cotnet">
|
||||
<div>
|
||||
{{ item.title }}
|
||||
|
||||
</div>
|
||||
<div class="login" @click="lookFarmDetail(item)">查看详情</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<areaChose v-else channel="user-plant" @handTown="handTown" @handArea="handArea"></areaChose>
|
||||
<div class="area" @click="flag = !flag">
|
||||
<div class="area"
|
||||
@click="handArea1">
|
||||
<div class="area-top">
|
||||
<div class="town">{{ area }}</div>
|
||||
<div class="town">{{ town }}</div>
|
||||
|
@ -19,7 +35,8 @@ import { ref, reactive } from "vue"
|
|||
import { sendMsg } from "@/api.js"
|
||||
import { landListApi } from "@/api.js"
|
||||
import areaChose from "../components/areaChose.vue"
|
||||
|
||||
import { useRouter } from "vue-router"
|
||||
const router = useRouter()
|
||||
const flag = ref(true)
|
||||
const town = ref("")
|
||||
const area = ref("泸县")
|
||||
|
@ -63,12 +80,40 @@ const handClick=(item)=>{
|
|||
}
|
||||
// 发送消息
|
||||
const sendFn = (event, data = '') => {
|
||||
if (data.page) page.value = data.page;
|
||||
sendMsg({ channel:'user-plant', event, data })
|
||||
}
|
||||
const handArea1=()=>{
|
||||
flag.value=!flag.value
|
||||
if(!flag.value){
|
||||
sendFn('choserArea', { name: '泸县', code:510521 })
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
// .content {
|
||||
// height: 500px;
|
||||
// width: 90vw;
|
||||
// position: absolute;
|
||||
// top: 50%;
|
||||
// left: 50%;
|
||||
// transform: translate(-50%, -50%);
|
||||
// box-sizing: border-box;
|
||||
// display: flex;
|
||||
// flex-wrap: wrap;
|
||||
// justify-content: center;
|
||||
// overflow-y: auto;
|
||||
|
||||
// .plant-li {
|
||||
// width: 165.9px;
|
||||
// height: 190.48px;
|
||||
// background-image: url('/static/img/plantScreen/A.png');
|
||||
// text-align: center;
|
||||
// line-height: 190.48px;
|
||||
// color: white;
|
||||
// }
|
||||
// }
|
||||
.cont {
|
||||
height: 500px;
|
||||
width: 90vw;
|
||||
position: absolute;
|
||||
|
@ -78,17 +123,74 @@ const sendFn = (event, data = '') => {
|
|||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
overflow-y: auto;
|
||||
|
||||
.plant-li {
|
||||
width: 165.9px;
|
||||
height: 190.48px;
|
||||
background-image: url('/static/img/plantScreen/A.png');
|
||||
text-align: center;
|
||||
line-height: 190.48px;
|
||||
.card {
|
||||
width: 378px;
|
||||
height: 223px;
|
||||
margin-bottom: 10px;
|
||||
background-image: url('/static/img/breedScreen/bg.png');
|
||||
background-size: 100% 100%;
|
||||
font-size: 16px;
|
||||
padding: 10px;
|
||||
color: white;
|
||||
position: relative;
|
||||
|
||||
.card-tit {
|
||||
color: #00D6DD;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.card-cotnet {
|
||||
margin-top: 50px;
|
||||
|
||||
.login {
|
||||
width: 170px;
|
||||
height: 34px;
|
||||
text-align: center;
|
||||
line-height: 34px;
|
||||
background-image: url('/static/img/tradeScreen/DL.png');
|
||||
background-size: 100% 100%;
|
||||
margin-top: 20px;
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// background-color: red;
|
||||
}
|
||||
|
||||
.cont::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
background-color: #153041;
|
||||
}
|
||||
|
||||
.cont::-webkit-scrollbar-track {
|
||||
background-color: #153041;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: #084D89;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.back-btn {
|
||||
width: 86.21px;
|
||||
height: 31px;
|
||||
position: absolute;
|
||||
top: 70px;
|
||||
left: 60.96px;
|
||||
z-index: 9;
|
||||
|
||||
}
|
||||
|
||||
.area {
|
||||
|
@ -121,5 +223,4 @@ const sendFn = (event, data = '') => {
|
|||
height: 57px;
|
||||
background-size: 100% 100%;
|
||||
transform: translateY(-20px);
|
||||
}
|
||||
</style>
|
||||
}</style>
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<img src="/static/img/tradeScreen/FH.png" @click="router.go(-1)" class="back-btn" alt="">
|
||||
<div class="cont" v-if="flag">
|
||||
<div class="card" v-for="item in merchant_list" :key="item.id">
|
||||
<div class="card" v-for="item in merchant_list" :key="item.id" @click="sendFn('header3-3',{id:item.mer_id})">
|
||||
<div class="card-tit">
|
||||
{{ item.mer_name }}
|
||||
<span style="font-size: 14px;color: white;">{{ item.create_time.substring(0,10) }}</span>
|
||||
|
@ -10,7 +10,7 @@
|
|||
<div>商户姓名: {{ item.real_name }}</div>
|
||||
<div style="margin: 20px 0;">商户属地: {{ item.mer_address }}</div>
|
||||
<div>商户分类: {{ item.merchantCategory?.category_name }}</div>
|
||||
<div class="login" @click="sendFn('header3-3',{id:item.mer_id})">登录</div>
|
||||
<div class="login" >登录</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -153,7 +153,6 @@ const getmerchant_list = async () => {
|
|||
limit: 50
|
||||
})
|
||||
merchant_list.value=res.data.list
|
||||
console.log(merchant_list.value)
|
||||
}
|
||||
|
||||
const sendFn = (event, data = '') => {
|
||||
|
|
Loading…
Reference in New Issue