diff --git a/src/view/breedScreen/index.vue b/src/view/breedScreen/index.vue index 88552e1..1376114 100644 --- a/src/view/breedScreen/index.vue +++ b/src/view/breedScreen/index.vue @@ -28,11 +28,11 @@ - +
-
江陽區
-
江陽區
+
{{ chooseInfo.area.name || '未选择' }}
+
{{ chooseInfo.town.name || '未选择' }}
@@ -110,10 +110,23 @@ const changeTown = (e) => { } const farmList = ref([]); -const handTown = (a, s)=>{ +const chooseInfo = ref({ + area: { + code: '510521', + name: '泸县' + }, + town: {} +}); +const handArea = (e)=>{ + chooseInfo.value.area = e; + chooseInfo.value.town = {}; +} + +const handTown = (e)=>{ + chooseInfo.value.town = e; breedFarmCount({ - areaCode: a, - streetCode: s + areaCode: chooseInfo.value?.area?.code, + streetCode: e.code }).then(res=>{ farmList.value = res.data.farmList || []; flag.value = true; diff --git a/src/view/components/areaChose.vue b/src/view/components/areaChose.vue index 429cb15..cd96152 100644 --- a/src/view/components/areaChose.vue +++ b/src/view/components/areaChose.vue @@ -55,19 +55,14 @@ 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},) + emit('handArea', { name: options[index].label, code: options[index].value }) } const handTown = (index) => { - // townLists.value.forEach(item => { - // if (item.value == townLists[index].value) { - // sendFn('choseTown', { name: item.label, code: item.value }) - // } - // }) townLists.value.forEach(item => { if (item.code == townLists.value[index].code) { sendFn('choseTown', { name: item.name, code: item.code }) - emit('handTown', {name:item.name,code:item.code}) + emit('handTown', { name: item.name, code: item.code}) } }) } @@ -77,7 +72,7 @@ const getTownListsFn = async (area_code = 510521) => { townLists.value = res.data; } -getTownListsFn() +getTownListsFn(options[0].value) const props = defineProps({ channel: { diff --git a/src/view/logisticsScreen/index.vue b/src/view/logisticsScreen/index.vue index 9248a62..a977b2e 100644 --- a/src/view/logisticsScreen/index.vue +++ b/src/view/logisticsScreen/index.vue @@ -19,21 +19,25 @@
-
-
- {{ item.farm_name }} -
-
-
商户姓名: {{ item.master }}
- +
三轮车配送
+
+
+
+ +
+
+
{{ item.courier_name }}
+
{{ item.license }}
+
+
查看详情
- +
-
江陽區
-
江陽區
+
{{ chooseInfo.area.name || '未选择' }}
+
{{ chooseInfo.town.name || '未选择' }}
@@ -86,10 +90,6 @@ const options = [ // 区列表 const townOptions = [] -const areaCode = ref('510521') - -const townCode = ref("") - const changeArea = (e) => { townCode.value = '' getTownList() @@ -110,13 +110,27 @@ const changeTown = (e) => { } -const handTown = (a, s)=>{ +const chooseInfo = ref({ + area: { + code: '510521', + name: '泸县' + }, + town: {} +}); +const handArea = (e)=>{ + chooseInfo.value.area = e; + chooseInfo.value.town = {}; + getLandList(); +} +const handTown = (e)=>{ + chooseInfo.value.town = e; + getLandList(); } const getTownList = () => { townOptions.splice(0, 99999999) - axios.get(`https://crmeb-test.shop.lihaink.cn/api/city/get_street?area_code=${areaCode.value}`) + axios.get(`https://crmeb-test.shop.lihaink.cn/api/city/get_street?area_code=${chooseInfo.value.area.code}`) .then(function (res) { res.data.data.forEach(item => { townOptions.push({ @@ -131,13 +145,11 @@ const getTownList = () => { const vehicleList=ref([]) const getLandList = async () => { let res = await vehicleListApi({ - areaCode: areaCode.value, - streetCode: townCode.value + areaCode: chooseInfo.value.area.code, + streetCode: chooseInfo.value.town.code }) vehicleList.value=res.data.list - - } @@ -163,17 +175,39 @@ const sendFn = (event, data = '') => { flex-wrap: wrap; justify-content: space-between; overflow-y: auto; + background-image: url('/static/img/breedScreen/vebg.webp'); + + .title{ + position: absolute; + left: 80px; + top: 14%; + color: #fff; + } + + .card-list{ + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + padding: 120px 70px; + + } .card { - width: 378px; - height: 223px; + width: 190px; + height: 260px; margin-bottom: 10px; - background-image: url('/static/img/breedScreen/bg.png'); + background-image: url('/static/img/breedScreen/item.webp'); background-size: 100% 100%; font-size: 16px; padding: 10px; color: white; position: relative; + display: flex; + flex-direction: column; + justify-content: space-between; + text-align: center; .card-tit { color: #00D6DD; @@ -203,7 +237,8 @@ const sendFn = (event, data = '') => { } - // background-color: red; + + } .cont::-webkit-scrollbar { diff --git a/static/img/breedScreen/item.webp b/static/img/breedScreen/item.webp new file mode 100644 index 0000000..d0928da Binary files /dev/null and b/static/img/breedScreen/item.webp differ diff --git a/static/img/breedScreen/vebg.webp b/static/img/breedScreen/vebg.webp new file mode 100644 index 0000000..cb3a2b7 Binary files /dev/null and b/static/img/breedScreen/vebg.webp differ