This commit is contained in:
parent
db2e8fb6e5
commit
88632945e8
10
src/api.js
10
src/api.js
|
@ -24,6 +24,11 @@ const instacneTrade = axios.create({
|
|||
timeout: 30000,
|
||||
});
|
||||
|
||||
const instacneTrike = axios.create({
|
||||
baseURL: "https://crmeb-test.shop.lihaink.cn/",
|
||||
timeout: 30000,
|
||||
});
|
||||
|
||||
const configInstacne=(ins)=>{
|
||||
ins.interceptors.request.use(
|
||||
(config) => {
|
||||
|
@ -62,6 +67,7 @@ const configInstacne=(ins)=>{
|
|||
configInstacne(instacne)
|
||||
configInstacne(instacnePlant)
|
||||
configInstacne(instacneTrade)
|
||||
configInstacne(instacneTrike)
|
||||
|
||||
|
||||
export function sendMsg(params) {
|
||||
|
@ -72,7 +78,9 @@ export function landListApi(params) {
|
|||
return instacnePlant.get('/api/dataview.land/landList', { params })
|
||||
}
|
||||
|
||||
|
||||
export function vehicleListApi(params) {
|
||||
return instacneTrike.get('/api/dataview/vehicle_list', { params })
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
|
|
|
@ -6,20 +6,28 @@
|
|||
<el-select v-model="townCode" class="m-2" @change="changeTown" placeholder="Select" size="large">
|
||||
<el-option v-for="item in townOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
<button @click="sendFn('back', { name: '泸县' }), townCode = ''">返回首页</button>
|
||||
<button @click="sendFn('refresh'), townCode = ''">刷新</button>
|
||||
<button @click="sendFn('choseLand', { landName: item.title,id:item.id })" v-for="item in landList"> {{ item.title }}</button>
|
||||
<button @click="sendFn('backHome', { name: '泸县' }), townCode = ''">返回首页</button>
|
||||
<button @click="sendFn('detail', { name: item.title,id:item.id })" v-for="item in landList"> {{ item.title }}</button>
|
||||
<div v-if="nowPages=='index'">
|
||||
<button @click="sendFn('more_order_index')">更多订单</button>
|
||||
<button @click="sendFn('c_car_index', { index: index })" v-for="(item, index) in vehicleList" :key="'car'+index"> {{ item.license }}</button>
|
||||
</div>
|
||||
<div v-else>
|
||||
<button @click="sendFn('back', { name: '泸县' }), townCode = ''">返回首页</button>
|
||||
<button @click="sendFn('more_order')">更多订单</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p>地块</p>
|
||||
</template>
|
||||
<script setup scoped>
|
||||
import { ref, reactive } from "vue"
|
||||
import { sendMsg } from "@/api.js"
|
||||
import axios from "axios"
|
||||
import { landListApi } from "@/api.js"
|
||||
import { vehicleListApi } from "@/api.js"
|
||||
|
||||
const nowPages = ref('index');
|
||||
|
||||
// 镇列表
|
||||
const options = [
|
||||
|
@ -77,7 +85,6 @@ const changeTown = (e) => {
|
|||
}
|
||||
})
|
||||
|
||||
getLandList()
|
||||
}
|
||||
|
||||
const getTownList = () => {
|
||||
|
@ -94,19 +101,21 @@ const getTownList = () => {
|
|||
})
|
||||
}
|
||||
|
||||
const landList=ref([])
|
||||
const vehicleList=ref([])
|
||||
const getLandList = async () => {
|
||||
let res = await landListApi({
|
||||
let res = await vehicleListApi({
|
||||
areaCode: areaCode.value,
|
||||
streetCode: townCode.value
|
||||
})
|
||||
landList.value=res.data.list
|
||||
vehicleList.value=res.data.list
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
getTownList()
|
||||
getLandList()
|
||||
// 发送消息
|
||||
const page = ref(1)
|
||||
const sendFn = (event, data = '') => {
|
||||
|
|
Loading…
Reference in New Issue