diff --git a/src/api.js b/src/api.js index 73a97f8..77c1f09 100644 --- a/src/api.js +++ b/src/api.js @@ -20,7 +20,7 @@ const instacnePlant = axios.create({ const instacneTrade = axios.create({ - baseURL: "http://192.168.1.24:8686/index", + baseURL: "https://shop.lihaink.cn", timeout: 30000, }); @@ -98,6 +98,10 @@ export function breedFarmCount(params) { return instacneBreed.get('/api/dataview.farm/farmCount', { params }) } +// 交易数据大屏获取商户列表 +export function merchant_listApi(params) { + return instacneTrade.get('/api/dataview/merchant_list', { params }) +} // //api/dataview/merchant?mer_id=36&areaCode=510524&streetCode=510524100 // } diff --git a/src/view/components/areaChose.vue b/src/view/components/areaChose.vue index c86fea5..7d6215c 100644 --- a/src/view/components/areaChose.vue +++ b/src/view/components/areaChose.vue @@ -1,11 +1,13 @@ @@ -15,6 +17,10 @@ import { apigetTownLists } from "@/api.js" import { sendMsg } from "@/api.js" // 镇列表 const options = reactive([ + { + value: '510521', + label: '泸县', + }, { value: '510502', label: '江阳区', @@ -27,10 +33,6 @@ const options = reactive([ value: '510504', label: '龙马潭区', }, - { - value: '510521', - label: '泸县', - }, { value: '510522', label: '合江县 ', @@ -52,26 +54,22 @@ const emit = defineEmits(['handTown', 'handArea']) const handChose = (index) => { actIndex.value = index; getTownListsFn(options[index].value); - options.forEach(item => { - if (item.value == options[index].value) { - sendFn('choserArea', { name: item.label, code: item.value }) - emit('handArea', options[actIndex.value].value,) - } - }) + sendFn('choserArea', { name: options[index].label, code: options[index].value }) + + emit('handArea', options[actIndex.value].label,) } -const handTown = (index)=>{ - console.log(townLists.value[index]); +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 }) - emit('handTown', options[actIndex.value].value, item.code) - } + if (item.code == townLists.value[index].code) { + sendFn('choseTown', { name: item.name, code: item.code }) + emit('handTown', item.name) + } }) } @@ -85,14 +83,14 @@ getTownListsFn() const props = defineProps({ channel: { type: String, - default: ()=>'user-3' + default: () => 'user-3' } }) // 发送消息 const page = ref(1) const sendFn = (event, data = '') => { - if (data.page) page.value = data.page; - sendMsg({ channel: props.channel, event, data }) + if (data.page) page.value = data.page; + sendMsg({ channel: props.channel, event, data }) } @@ -119,7 +117,7 @@ const sendFn = (event, data = '') => { color: #9AADC4; font-family: FZCYJ; cursor: pointer; - padding:0 80px; + padding: 0 80px; } @@ -138,7 +136,8 @@ const sendFn = (event, data = '') => { justify-content: space-between; margin-top: 40px; padding: 0 50px; - .town-list-li{ + + .town-list-li { font-size: 18px; color: #E4EFF5; background-image: url('/static/img/area/townbg.png'); @@ -152,18 +151,19 @@ const sendFn = (event, data = '') => { } } - -.town-list::-webkit-scrollbar { - width: 10px; - background-color: #153041; -} -.town-list::-webkit-scrollbar-track { - background-color: #153041; -} + .town-list::-webkit-scrollbar { + width: 10px; + background-color: #153041; + } -::-webkit-scrollbar-thumb { - background-color: #084D89; - border-radius: 5px; + .town-list::-webkit-scrollbar-track { + background-color: #153041; + } + + ::-webkit-scrollbar-thumb { + background-color: #084D89; + border-radius: 5px; + } } -} \ No newline at end of file + \ No newline at end of file diff --git a/src/view/home.vue b/src/view/home.vue index e1f12ed..f501e3a 100644 --- a/src/view/home.vue +++ b/src/view/home.vue @@ -17,8 +17,10 @@ for (let i = 1; i < 6; i++) { \ No newline at end of file