Compare commits

..

No commits in common. "bffef94202a35b98750f86f2d70e1b7b98446361" and "9233478364b8bf30de1c73f46c6cd94683520ebd" have entirely different histories.

3 changed files with 33 additions and 132 deletions

View File

@ -67,7 +67,7 @@ const handTown = (index) => {
})
}
const getTownListsFn = async (area_code = 510521) => {
const getTownListsFn = async (area_code = 510502) => {
let res = await apigetTownLists({ area_code })
townLists.value = res.data;
}
@ -83,6 +83,7 @@ const props = defineProps({
//
const page = ref(1)
const sendFn = (event, data = '') => {
if (data.page) page.value = data.page;
sendMsg({ channel: props.channel, event, data })
}

View File

@ -1,28 +1,12 @@
<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="handArea1">
<div class="area" @click="flag = !flag">
<div class="area-top">
<div class="town">{{ area }}</div>
<div class="town">{{ town }}</div>
@ -35,8 +19,7 @@ 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("泸县")
@ -44,76 +27,48 @@ let areaCode = 0
const handTown = (e) => {
town.value = e.name
getLandList(areaCode, e.code)
getLandList(areaCode ,e.code)
}
const handArea = (e) => {
area.value = e.name
areaCode = e.code
areaCode=e.code
town.value = ''
getLandList(e.code)
}
const landList = ref([])
const getLandList = async (areaCode = 510521, streetCode = '') => {
const landList=ref([])
const getLandList = async (areaCode=510521,streetCode='') => {
let res = await landListApi({
areaCode,
streetCode,
})
landList.value = res.data.list
landList.value=res.data.list
console.log(landList.value)
}
getLandList()
const handClick = (item) => {
let data = {
id: item.id,
landName: item.title,
areaCode: item.county_code,
townCode: item.town_code,
town_name: item.town_name
const handClick=(item)=>{
let data={
id:item.id,
landName:item.title,
areaCode:item.county_code,
townCode:item.town_code,
town_name:item.town_name
}
sendMsg({ channel: 'user-plant', event: 'choseLand', data })
sendMsg({ channel: 'user-plant', event:'choseLand', data })
// sendFn('choseLand', {id:item.id,landName:item.title,townCode:item.town_code} )
}
//
const sendFn = (event, data = '') => {
sendMsg({ channel:'user-plant', event, data })
}
const handArea1=()=>{
flag.value=!flag.value
if(!flag.value){
sendFn('choserArea', { name: '泸县', code:510521 })
}
if (data.page) page.value = data.page;
sendMsg({ channel: 'user-plant', event, data })
}
</script>
<style lang="scss" scoped>
// .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 {
.content {
height: 500px;
width: 90vw;
position: absolute;
@ -123,74 +78,17 @@ const handArea1=()=>{
box-sizing: border-box;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
justify-content: center;
overflow-y: auto;
.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;
.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;
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 {
@ -223,4 +121,5 @@ const handArea1=()=>{
height: 57px;
background-size: 100% 100%;
transform: translateY(-20px);
}</style>
}
</style>

View File

@ -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" @click="sendFn('header3-3',{id:item.mer_id})">
<div class="card" v-for="item in merchant_list" :key="item.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" >登录</div>
<div class="login" @click="sendFn('header3-3',{id:item.mer_id})">登录</div>
</div>
</div>
</div>
@ -153,6 +153,7 @@ const getmerchant_list = async () => {
limit: 50
})
merchant_list.value=res.data.list
console.log(merchant_list.value)
}
const sendFn = (event, data = '') => {