diff --git a/src/assets/temporaryAddress.json b/src/assets/temporaryAddress.json new file mode 100644 index 0000000..37135ad --- /dev/null +++ b/src/assets/temporaryAddress.json @@ -0,0 +1,458 @@ +{ + "province": [ + { + "id": 12, + "platformId": 20, + "code": "34", + "parentCode": "0", + "name": "安徽省", + "latitude": 31.859253, + "longitude": 117.216, + "level": 1, + "region": 2, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + } + ], + "city":[ + { + "id": 129, + "platformId": 20, + "code": "3401", + "parentCode": "34", + "name": "合肥市", + "latitude": 31.866941, + "longitude": 117.2827, + "level": 2, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + }, + { + "id": 130, + "platformId": 20, + "code": "3402", + "parentCode": "34", + "name": "芜湖市", + "latitude": 31.36602, + "longitude": 118.38411, + "level": 2, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + }, + { + "id": 131, + "platformId": 20, + "code": "3403", + "parentCode": "34", + "name": "蚌埠市", + "latitude": 32.9295, + "longitude": 117.35708, + "level": 2, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + }, + { + "id": 132, + "platformId": 20, + "code": "3404", + "parentCode": "34", + "name": "淮南市", + "latitude": 32.64281, + "longitude": 117.01864, + "level": 2, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + }, + { + "id": 133, + "platformId": 20, + "code": "3405", + "parentCode": "34", + "name": "马鞍山市", + "latitude": 31.688528, + "longitude": 118.515884, + "level": 2, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + }, + { + "id": 134, + "platformId": 20, + "code": "3406", + "parentCode": "34", + "name": "淮北市", + "latitude": 33.960022, + "longitude": 116.79145, + "level": 2, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + }, + { + "id": 135, + "platformId": 20, + "code": "3407", + "parentCode": "34", + "name": "铜陵市", + "latitude": 30.94093, + "longitude": 117.81943, + "level": 2, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + }, + { + "id": 136, + "platformId": 20, + "code": "3408", + "parentCode": "34", + "name": "安庆市", + "latitude": 30.537897, + "longitude": 117.05874, + "level": 2, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + }, + { + "id": 137, + "platformId": 20, + "code": "3410", + "parentCode": "34", + "name": "黄山市", + "latitude": 29.734434, + "longitude": 118.29357, + "level": 2, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + }, + { + "id": 138, + "platformId": 20, + "code": "3411", + "parentCode": "34", + "name": "滁州市", + "latitude": 32.317352, + "longitude": 118.32457, + "level": 2, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + }, + { + "id": 139, + "platformId": 20, + "code": "3412", + "parentCode": "34", + "name": "阜阳市", + "latitude": 32.90121, + "longitude": 115.82093, + "level": 2, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + }, + { + "id": 140, + "platformId": 20, + "code": "3413", + "parentCode": "34", + "name": "宿州市", + "latitude": 33.636772, + "longitude": 116.98869, + "level": 2, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + }, + { + "id": 141, + "platformId": 20, + "code": "3415", + "parentCode": "34", + "name": "六安市", + "latitude": 31.755558, + "longitude": 116.50525, + "level": 2, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + }, + { + "id": 142, + "platformId": 20, + "code": "3416", + "parentCode": "34", + "name": "亳州市", + "latitude": 33.871212, + "longitude": 115.787926, + "level": 2, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + }, + { + "id": 143, + "platformId": 20, + "code": "3417", + "parentCode": "34", + "name": "池州市", + "latitude": 30.660019, + "longitude": 117.49448, + "level": 2, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + }, + { + "id": 144, + "platformId": 20, + "code": "3418", + "parentCode": "34", + "name": "宣城市", + "latitude": 30.951643, + "longitude": 118.7521, + "level": 2, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + } + ], + "county": [ + { + "id": 1434, + "platformId": 20, + "code": "340101", + "parentCode": "3401", + "name": "市辖区", + "latitude": null, + "longitude": null, + "level": 3, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + }, + { + "id": 1435, + "platformId": 20, + "code": "340102", + "parentCode": "3401", + "name": "瑶海区", + "latitude": 31.905375, + "longitude": 117.33122, + "level": 3, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + }, + { + "id": 1436, + "platformId": 20, + "code": "340103", + "parentCode": "3401", + "name": "庐阳区", + "latitude": 31.9129, + "longitude": 117.24783, + "level": 3, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + }, + { + "id": 1437, + "platformId": 20, + "code": "340104", + "parentCode": "3401", + "name": "蜀山区", + "latitude": 31.838184, + "longitude": 117.23128, + "level": 3, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + }, + { + "id": 1438, + "platformId": 20, + "code": "340111", + "parentCode": "3401", + "name": "包河区", + "latitude": 31.790724, + "longitude": 117.35391, + "level": 3, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + }, + { + "id": 1439, + "platformId": 20, + "code": "340121", + "parentCode": "3401", + "name": "长丰县", + "latitude": 32.28611, + "longitude": 117.17444, + "level": 3, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + }, + { + "id": 1440, + "platformId": 20, + "code": "340122", + "parentCode": "3401", + "name": "肥东县", + "latitude": 32.00319, + "longitude": 117.57586, + "level": 3, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + }, + { + "id": 1441, + "platformId": 20, + "code": "340123", + "parentCode": "3401", + "name": "肥西县", + "latitude": 31.732637, + "longitude": 117.03626, + "level": 3, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + }, + { + "id": 1442, + "platformId": 20, + "code": "340124", + "parentCode": "3401", + "name": "庐江县", + "latitude": 31.2556651, + "longitude": 117.287345, + "level": 3, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + }, + { + "id": 1443, + "platformId": 20, + "code": "340171", + "parentCode": "3401", + "name": "合肥高新技术产业开发区", + "latitude": null, + "longitude": null, + "level": 3, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + }, + { + "id": 1444, + "platformId": 20, + "code": "340172", + "parentCode": "3401", + "name": "合肥经济技术开发区", + "latitude": null, + "longitude": null, + "level": 3, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + }, + { + "id": 1445, + "platformId": 20, + "code": "340173", + "parentCode": "3401", + "name": "合肥新站高新技术产业开发区", + "latitude": null, + "longitude": null, + "level": 3, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + }, + { + "id": 1446, + "platformId": 20, + "code": "340181", + "parentCode": "3401", + "name": "巢湖市", + "latitude": null, + "longitude": null, + "level": 3, + "region": null, + "status": 1, + "created": null, + "modified": null, + "yn": 1 + } + ] +} diff --git a/src/http/api/equip.ts b/src/http/api/equip.ts index 8dc3a25..ffad84d 100644 --- a/src/http/api/equip.ts +++ b/src/http/api/equip.ts @@ -1,10 +1,24 @@ -import { post,get } from '../index' +import { post,get,put } from '../index' // 获取装备列表 export const getList = (params = {}) => { return post('/dev/list',params) } +//获取装备详情 export const getDetail = (id = '') => { return get(`/dev/${id}`) } + +//获取 推荐装备列表 +export const getHotList = (params) => { + return get('/dev/hotList',params) +} + +export const equipCollect = (params = {}) => { + return put('/collect',params) +} + +export const apiSubmitLease = (params = {}) => { + return post('/details',params) +} diff --git a/src/http/index.ts b/src/http/index.ts index fba0d52..be34dd5 100644 --- a/src/http/index.ts +++ b/src/http/index.ts @@ -72,7 +72,6 @@ export function post(url: string, params: any) { }) .then((res: any) => { NProgress.done() - console.log('---------------------------', res) if (res.code == '200') { resolve(res) } else { @@ -131,3 +130,45 @@ export function download(url: string, params: any) { }) }) } + +export function put(url: string, params: any) { + return new Promise((resolve, reject) => { + NProgress.start() + service + .put(url, params, { + headers: { 'Content-Type': 'application/json; charset=utf-8' } + }) + .then((res: any) => { + NProgress.done() + if (res.code == '200') { + resolve(res) + } else { + reject(res) + } + }) + .catch((err) => { + NProgress.done() + reject(err) + }) + }) +} + +export function detele(url: string, params: any) { + return new Promise((resolve, reject) => { + NProgress.start() + service + .delete(url, { params }) + .then((res: any) => { + NProgress.done() + if (res.code == '200') { + resolve(res) + } else { + reject(res) + } + }) + .catch((err) => { + NProgress.done() + reject(err.data) + }) + }) +} diff --git a/src/store/main.ts b/src/store/main.ts index bb776ef..a3ea04b 100644 --- a/src/store/main.ts +++ b/src/store/main.ts @@ -2,7 +2,7 @@ export const useStore = defineStore('main', { state: () => { return { loadingFlag: false, //loading控制, - token: 'eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6Ijc5MjRkNDc1LTRjMmUtNGViYy05ZDU0LTA2NzNmNWU0MDhiMyIsInVzZXJuYW1lIjoiYWRtaW4ifQ.M3H9jHnfFAKJ3szdiDb79hIHfiS8AWvaI51mP65l01Q2G0jcLSTvjlub8FykYV3A27If7V6GBRo83u8spRDquw' + token: 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6ImMyN2M5N2Y5LWQwOGItNDJlNy05N2MzLTYwMDVmODVmNmVhZiIsInVzZXJuYW1lIjoiYWRtaW4ifQ.KNJdSL3g7tjju4OxkUQyBWHBTiuBo5bZFtDWkbZVmm7iR9hA06OS5FSI1_9kb4jPNjE6vc7MGkH4GhQJsIwHnA' } }, getters: {}, diff --git a/src/views/equip/detail.vue b/src/views/equip/detail.vue index f80407a..9670226 100644 --- a/src/views/equip/detail.vue +++ b/src/views/equip/detail.vue @@ -96,10 +96,20 @@
为您推荐
-
换一批
+
换一批
- +
@@ -107,6 +117,7 @@ v-model="dialoglease" title="填写租赁信息" lock-scroll + class="dialoglease" width="60%" > @@ -122,7 +133,7 @@ - + @@ -147,7 +158,9 @@ - + + + @@ -183,7 +196,7 @@ - @@ -205,7 +218,7 @@ >