From 830b5482f06cbb19fdb80879c85388af9af85f5d Mon Sep 17 00:00:00 2001
From: dengj <209192278@qq.com>
Date: Wed, 15 Nov 2023 17:43:52 +0800
Subject: [PATCH] =?UTF-8?q?=E9=82=93=E6=B4=81=20:=20=E5=9C=B0=E5=9D=80?=
=?UTF-8?q?=E8=BD=AC=E4=B8=BA=E7=BB=8F=E7=BA=AC=E5=BA=A6=E5=87=BD=E6=95=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/index/index.vue | 4 +--
.../publishTransfer/publishTransfer.vue | 27 +++++++++++++++----
service/request.js | 1 +
3 files changed, 25 insertions(+), 7 deletions(-)
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 0e48559..7dddafe 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -51,8 +51,8 @@
methods: {
getBanner(){
this.$api.getBanner().then(res=>{
- console.log('lunbo',res.data.data);
- this.swiperList = res.data.data.map(item=>item.img)
+ console.log('轮播图',res.data.data);
+ this.swiperList = res.data.data.map(item=>this.$api.imgUrl+item.img)
})
},
getNotice(){
diff --git a/pages/publish/publishTransfer/publishTransfer.vue b/pages/publish/publishTransfer/publishTransfer.vue
index a281b2b..de83147 100644
--- a/pages/publish/publishTransfer/publishTransfer.vue
+++ b/pages/publish/publishTransfer/publishTransfer.vue
@@ -20,7 +20,7 @@
+ @change="changeAddress">
请选择行业类型
@@ -132,13 +132,30 @@
console.log("失败信息:" + JSON.stringify(errors))
// uni.$u.toast('校验失败')
})
- }
+ },
+ changeAddress(e) {
+ console.log('changeAddress', e);
+ // this.getAddressList(e)
+ },
+ getAddressList(value) {
+ var that = this
+ uni.request({
+ url: 'https://apis.map.qq.com/ws/geocoder/v1/?address=' + value + '&key=' +
+ that.$api.key,
+ success(res) {
+ console.log('diz', res.data.result.location);
+ console.log('lat', res.data.result.location.lat);
+ console.log('lng', res.data.result.location.lng);
+ },
+ fail(err) {
+ console.log('请求区域失败:', err);
+ }
+ })
+ },
},
-
onReady() {
this.$refs.uForm.setRules(this.rules)
- },
-
+ }
}
diff --git a/service/request.js b/service/request.js
index dd9939f..f2a842a 100644
--- a/service/request.js
+++ b/service/request.js
@@ -128,6 +128,7 @@ const toast = {
}
const apiService = {
serverHost,
+ imgUrl:'https://spsp.feashow.com/',
key:'ZRKBZ-Q7FWL-GVZPK-MCRBU-4XFB5-ATBDB',
uploadImgUrl: serverHost + `/upload/image/`,
//登录接口